def __init__(self, key, dialog, app, label=u"", icon=None): Section.__init__(self, key, dialog, app, label, icon) self.app = app self.entries = {} self.frame = gtk.Frame("") self.frame.get_label_widget().set_text("<b>Extensions</b>") self.frame.get_label_widget().set_use_markup(True) self.frame.set_property("shadow-type", gtk.SHADOW_NONE) align = gtk.Alignment() align.set_padding(10, 0, 10, 0) align.show() self.frame.add(align) v = gtk.VBox(False, 0) v.show() align.add(v) # extension list scrollbar self.sw = gtk.ScrolledWindow() self.sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.sw.set_shadow_type(gtk.SHADOW_IN) self.sw.show() v.pack_start(self.sw, True, True, 0) # extension list self.extlist = gtk.VBox(False, 0) self.extlist.show() self.sw.add_with_viewport(self.extlist) # hbox h = gtk.HBox(False, 0) h.show() v.pack_start(h, True, True, 0) # install button self.install_button = gtk.Button("Install new extension") self.install_button.set_relief(gtk.RELIEF_NONE) self.install_button.modify_fg(gtk.STATE_NORMAL, gtk.gdk.Color(0, 0, 65535)) self.install_button.connect("clicked", self._on_install) self.install_button.show() h.pack_start(self.install_button, False, True, 0) # set icon try: self.icon = keepnote.gui.get_pixbuf(get_icon_filename( gtk.STOCK_ADD), size=(15, 15)) except: pass
def __init__(self, key, dialog, app, label=u"", icon=None): Section.__init__(self, key, dialog, app, label, icon) self.app = app self.entries = {} self.frame = gtk.Frame("") self.frame.get_label_widget().set_text("<b>Extensions</b>") self.frame.get_label_widget().set_use_markup(True) self.frame.set_property("shadow-type", gtk.SHADOW_NONE) align = gtk.Alignment() align.set_padding(10, 0, 10, 0) align.show() self.frame.add(align) v = gtk.VBox(False, 0) v.show() align.add(v) # extension list scrollbar self.sw = gtk.ScrolledWindow() self.sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.sw.set_shadow_type(gtk.SHADOW_IN) self.sw.show() v.pack_start(self.sw, True, True, 0) # extension list self.extlist = gtk.VBox(False, 0) self.extlist.show() self.sw.add_with_viewport(self.extlist) # hbox h = gtk.HBox(False, 0) h.show() v.pack_start(h, True, True, 0) # install button self.install_button = gtk.Button("Install new extension") self.install_button.set_relief(gtk.RELIEF_NONE) self.install_button.modify_fg( gtk.STATE_NORMAL, gtk.gdk.Color(0, 0, 65535)) self.install_button.connect("clicked", self._on_install) self.install_button.show() h.pack_start(self.install_button, False, True, 0) # set icon try: self.icon = keepnote.gui.get_pixbuf( get_icon_filename(gtk.STOCK_ADD), size=(15, 15)) except: pass
def __init__(self, key, dialog, app, label=u"", icon=None): Section.__init__(self, key, dialog, app, label, icon) self.entries = {} w = self.get_default_widget() self.table = gtk.Table(max(len(list(app.iter_external_apps())), 1), 2) self.table.show() w.add(self.table) # set icon try: self.icon = keepnote.gui.get_pixbuf(get_icon_filename(gtk.STOCK_EXECUTE), size=(15, 15)) except: pass