def __init__ (self, default=None, title="Select Image",okay=True, label="Select an image", sublabel=None,parent=None, cancel=True, modal=True, expander=None): ModalDialog.__init__(self,default=default, title=title, okay=okay,label=label,sublabel=sublabel, parent=parent, cancel=cancel, modal=modal, expander=expander) self.set_default_size(600,600)
def setup_dialog (self, *args, **kwargs): ModalDialog.setup_dialog(self,*args,**kwargs) self.ib = ImageBrowser() self.ib.connect('selection-changed',self.selection_changed_cb) self.ib.connect('item-activated',self.okcb) self.sw = gtk.ScrolledWindow() self.pb = gtk.ProgressBar(); self.pb.set_ellipsize(pango.ELLIPSIZE_MIDDLE) self.vbox.pack_end(self.sw) self.vbox.pack_end(self.pb,expand=False) self.ib.progressbar = self.pb self.sw.add(self.ib) self.sw.show_all() self.sw.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
def setup_dialog (self, *args, **kwargs): ModalDialog.setup_dialog(self,*args,**kwargs) self.ib = ImageBrowser() self.ib.connect('selection-changed',self.selection_changed_cb) self.ib.connect('item-activated',self.okcb) self.sw = Gtk.ScrolledWindow() self.pb = Gtk.ProgressBar(); self.pb.set_ellipsize(Pango.EllipsizeMode.MIDDLE) self.vbox.pack_end(self.sw, True, True, 0) self.vbox.pack_end(self.pb,expand=False) self.ib.progressbar = self.pb self.sw.add(self.ib) self.sw.show_all() self.sw.set_policy(Gtk.PolicyType.AUTOMATIC,Gtk.PolicyType.AUTOMATIC)
def setup_dialog(self, *args, **kwargs): ModalDialog.setup_dialog(self, *args, **kwargs) self.ib = ImageBrowser() self.ib.connect('selection-changed', self.selection_changed_cb) self.ib.connect('item-activated', self.okcb) self.sw = gtk.ScrolledWindow() self.pb = gtk.ProgressBar() self.pb.set_ellipsize(pango.ELLIPSIZE_MIDDLE) self.vbox.pack_end(self.sw) self.vbox.pack_end(self.pb, expand=False) self.ib.progressbar = self.pb self.sw.add(self.ib) self.sw.show_all() self.sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
def okcb(self, *args, **kwargs): self.ib.quit() ModalDialog.okcb(self, *args, **kwargs)
def okcb (self, *args,**kwargs): self.ib.quit() ModalDialog.okcb(self,*args,**kwargs)