def cmd_about(self): dialog = gtk.AboutDialog() dialog.set_transient_for(self.boss.get_main_window()) pb = create_pida_icon() dialog.set_logo(pb) dialog.set_version(self.boss.version) dialog.set_copyright(copyright) dialog.set_license(license) dialog.set_authors(authors) dialog.run()
def _create_window(self): if not self.__started: self.__started = True self.__window = gtk.Window() self.__window.set_title('PIDA Loves You') self.__window.connect('delete-event', self.cb_destroy) self.__window.add_accel_group(self.__acels) self._connect_drag_events() self.__window.add(self.__mainbox) w = self.opts.window_size__width h = self.opts.window_size__height self.__window.resize(w, h) self.__window.set_icon(create_pida_icon())
import os import mimetypes import threading import gtk import gobject import pida.pidagtk.tree as tree import pida.pidagtk.icons as icons import pida.core.service as service import pida.core.actions as actions from pida.utils.kiwiutils import gsignal import pida.pidagtk.contentview as contentview mime_icons = {} dir_icon = icons.icons.get('gtk-directory') pida_icon = contentview.create_pida_icon().scale_simple(16, 16, gtk.gdk.INTERP_NEAREST) defs = service.definitions STATE_IGNORED, STATE_NONE, STATE_NORMAL, STATE_NOCHANGE, \ STATE_ERROR, STATE_EMPTY, STATE_NEW, \ STATE_MODIFIED, STATE_CONFLICT, STATE_REMOVED, \ STATE_MISSING, STATE_MAX = range(12) colours = { None: ('#909090', False, True), STATE_IGNORED: ('#909090', False, True), STATE_NONE: ('#60c060', True, True), STATE_NORMAL: ('#000000', False, False), STATE_ERROR: ('#900000', True, True), STATE_EMPTY: ('#000000', False, True),
import subprocess import gtk import gobject import pida.pidagtk.tree as tree import pida.pidagtk.icons as icons import pida.core.service as service import pida.core.actions as actions from pida.utils.kiwiutils import gsignal import pida.utils.gobjectlinereader as glr import pida.pidagtk.contentview as contentview mime_icons = {} dir_icon = icons.icons.get('gtk-directory') pida_icon = contentview.create_pida_icon().scale_simple( 16, 16, gtk.gdk.INTERP_NEAREST) defs = service.definitions STATE_IGNORED, STATE_NONE, STATE_NORMAL, STATE_NOCHANGE, \ STATE_ERROR, STATE_EMPTY, STATE_NEW, \ STATE_MODIFIED, STATE_CONFLICT, STATE_REMOVED, \ STATE_MISSING, STATE_MAX = range(12) colours = { None: ('#909090', False, True), STATE_IGNORED: ('#909090', False, True), STATE_NONE: ('#60c060', True, True), STATE_NORMAL: ('#000000', False, False), STATE_ERROR: ('#900000', True, True), STATE_EMPTY: ('#000000', False, True),
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #SOFTWARE. import os import gtk import pida.core.base as base from pida.pidagtk.contentview import create_pida_icon import distutils.spawn as spawn im = gtk.Image() im.set_from_pixbuf(create_pida_icon()) class IComponent(object): def get_sanity_errors(self): return None class Vim(IComponent): LABEL = 'Vim' def get_sanity_errors(self): if spawn.find_executable('gvim'): return [] else: return ['Gvim is not installed'] class Vimmulti(Vim):