def showSearchWindow(pair_list): swin=gtk.Window(gtk.gtk.WINDOW_TOPLEVEL) swin.set_wmclass("icepref","IcePref") swin.realize() swin.set_title("IcePref2: "+_("Search")) swin.set_position(gtk.WIN_POS_CENTER) mainvbox=gtk.VBox(0,0) mainvbox.set_border_width(4) mainvbox.set_spacing(3) mainvbox.pack_start(getImage(getBaseDir()+"icepref2.png","IcePref2"),0,0,0) mainvbox.pack_start(gtk.Label(_("Search Results")),0,0,2) sc=gtk.ScrolledWindow() clist=gtk.CList(2,[" "+_('Section')," "+_('Property')]) TIPS.set_tip(clist,_("Search Results")) clist.set_usize(425,250) clist.set_column_width(0,150) clist.set_column_width(1,600) sc.add(clist) for ii in pair_list: clist.append([ii[0],ii[1]]) mainvbox.pack_start(sc,1,1,2) mainvbox.pack_start(gtk.HSeparator(),0,0,2) closebutt=gtk.Button(" "+DIALOG_CLOSE+" ") TIPS.set_tip(closebutt,DIALOG_CLOSE) closebutt.set_data("window",swin) closebutt.connect("clicked",hideSearch) mainvbox.pack_start(closebutt,0,0,3) swin.add(mainvbox) swin.connect("key-press-event", keyPressClose) swin.set_data("window",swin) swin.connect("destroy",hideSearch) swin.show_all()
def create_list(self, l, name, where): scrolled_window = gtk.ScrolledWindow() scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_ALWAYS) clist = gtk.CList(1, (name, )) scrolled_window.add(clist) clist.set_selection_mode(gtk.SELECTION_BROWSE) for i in l: row = clist.append(i) clist.set_text(row, 0, i) clist.connect('select_row', self.exp_setter, name) self.exp_setter(clist, 0, 0, None, name) where.pack_start(scrolled_window)
def createList(self,asList): titles=["Hour","Channel","Name"] listWindow = gtk.CList(3,titles) listWindow.set_shadow_type(gtk.SHADOW_OUT) listWindow.set_column_width(0,60) for autoSelection in asList: listWindow.append([autoSelection.getHourListString(),autoSelection.getChannelID(),autoSelection.getTitle()]);#TODO: escape listWindow.connect("select_row",self._on_Selection,asList) listWindow.set_selection_mode( 'browse' )#Selected if present sw = gtk.ScrolledWindow() sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) sw.set(listWindow) return sw
def make_display(self): self.scroll = gtk.ScrolledWindow() self.titles = ['Date','Number','Transaction','X','Memo', 'Amount','Balance'] self.display = gtk.CList(len(self.titles),self.titles) self.display.set_selection_mode(gtk.SELECTION_BROWSE) self.scroll.set_size_request(600,400) self.scroll.add(self.display) self.display.set_column_width(0,50) #date self.display.set_column_width(1,40) #num self.display.set_column_width(2,212)#payee self.display.set_column_width(3,8) #cleared self.display.set_column_width(4,90) #memo self.display.set_column_width(5,50) #amount self.display.set_column_width(6,50) #balance self.vbox.pack_start(self.scroll, gtk.FALSE, gtk.FALSE, 0) return
def functions_help_window(*args): dialog = gtk.Dialog("Available functions and constants", gui["main_window"], 0, (gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)) dialog.set_border_width(4) dialog.set_size_request(580, 360) window_pos_mode(dialog) vbox = gtk.VBox(gtk.FALSE, 8) dialog.vbox.pack_start(vbox, gtk.TRUE, gtk.TRUE, 0) hbox = gtk.HBox(gtk.FALSE, 2) hbox.set_border_width(4) vbox.pack_start(hbox, gtk.TRUE, gtk.TRUE, 0) scrolled_window = gtk.ScrolledWindow() hbox.pack_start(scrolled_window, gtk.TRUE, gtk.TRUE, 0) scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) scrolled_window.show() # [FIXME] clist is depreciated clist = gtk.CList(2) clist.set_row_height(18) clist.set_column_width(0, 180) clist.set_column_width(1, 520) clist.set_selection_mode(gtk.SELECTION_BROWSE) scrolled_window.add(clist) clist.show() mlist = map(lambda i: "", range(2)) clist.freeze() for i in range(len(flist) / 2): mlist[0] = flist[i * 2] mlist[1] = flist[i * 2 + 1] clist.append(mlist) clist.thaw() dialog.show_all() response = dialog.run() dialog.destroy()
def createPanel(self, with_logo=1): mainvbox = gtk.VBox(0, 2) mainvbox.set_border_width(5) mainvbox.set_spacing(4) if with_logo == 1: mainvbox.pack_start( getImage(getBaseDir() + "icewmcp.png", DIALOG_TITLE), 0, 0, 2) mainvbox.pack_start(gtk.Label(_("Key Editor")), 0, 0, 1) self.clist = gtk.CList(2, [' ' + _('Keys'), ' ' + _('Command')]) self.sc = gtk.ScrolledWindow() self.clist.set_column_width(0, 150) self.clist.set_column_width(1, 350) self.sc.add(self.clist) mainvbox.pack_start(self.sc, 1, 1, 0) keybox = gtk.HBox(0, 0) keybox.set_spacing(6) keybox.pack_start(gtk.Label(_("Key: ")), 0, 0, 0) self.alt = gtk.CheckButton("Alt") self.ctrl = gtk.CheckButton("Ctrl") self.shift = gtk.CheckButton("Shift") TIPS.set_tip(self.alt, "Alt") TIPS.set_tip(self.ctrl, "Ctrl") TIPS.set_tip(self.shift, "Shift") keybox.pack_start(self.alt, 0, 0, 0) keybox.pack_start(self.ctrl, 0, 0, 0) keybox.pack_start(self.shift, 0, 0, 0) self.keyentry = gtk.Entry() keybox.pack_start(self.keyentry, 1, 1, 0) progbox = gtk.HBox(0, 0) progbox.set_spacing(4) progbox.pack_start(gtk.Label(_("Program: ")), 0, 0, 0) self.progentry = gtk.Entry() progbox.pack_start(self.progentry, 1, 1, 0) TIPS.set_tip(self.progentry, _("Program: ").replace(":", "").strip()) browse = gtk.Button() try: browse.add(loadScaledImage(getPixDir() + "ism_load.png", 24, 24)) except: browse.add(gtk.Label(_(" Browse... "))) TIPS.set_tip(browse, _(" Browse... ").replace(".", "").strip()) browse.connect("clicked", self.openProg) progbox.pack_start(browse, 0, 0, 0) buttbox = gtk.HBox(1, 0) buttbox.set_spacing(4) buttbox2 = gtk.HBox(1, 0) buttbox2.set_spacing(4) newb = gtk.Button(_(" New Key ")) setb = gtk.Button(_(" Set ")) addb = gtk.Button(_(" Add ")) delb = gtk.Button(_(" Delete ")) testb = gtk.Button(_(" Test Key ")) saveb = gtk.Button(" " + _("Save") + " ") TIPS.set_tip(saveb, _("Save")) TIPS.set_tip(testb, _(" Test Key ").strip()) TIPS.set_tip(delb, _(" Delete ").strip()) TIPS.set_tip(addb, _(" Add ").strip()) TIPS.set_tip(setb, _(" Set ").strip()) TIPS.set_tip(newb, _(" New Key ").strip()) newb.connect("clicked", self.new_key2) self.newb = newb setb.connect("clicked", self.set_key) addb.connect("clicked", self.add_key) delb.connect("clicked", self.del_key) testb.connect("clicked", self.test_key) saveb.connect("clicked", self.doSave) self.addb = addb self.setb = setb self.delb = delb self.testb = testb buttbox.pack_start(newb, 1, 1, 0) buttbox.pack_start(setb, 1, 1, 0) buttbox.pack_start(addb, 1, 1, 0) buttbox2.pack_start(delb, 1, 1, 0) buttbox2.pack_start(testb, 1, 1, 0) buttbox2.pack_start(saveb, 1, 1, 0) mainvbox.pack_start(keybox, 0, 0, 0) mainvbox.pack_start(progbox, 0, 0, 0) mainvbox.pack_start(buttbox, 0, 0, 0) mainvbox.pack_start(buttbox2, 0, 0, 0) appst = _('/File/_Apply Changes Now...' )[_('/File/_Apply Changes Now...').rfind("/") + 1:len(_('/File/_Apply Changes Now...'))].replace( ".", "").replace("_", "").strip() appbutt = gtk.Button(appst) self.appbutt = appbutt TIPS.set_tip(appbutt, appst) mainvbox.pack_start(appbutt, 0, 0, 2) self.status = gtk.Label(_("Ready.")) self.mainvbox = mainvbox mainvbox.show_all() mainvbox.pack_start(self.status, 0, 0, 2) self.clist.connect('select_row', self.clist_cb) self.clist.connect('unselect_row', self.new_key1) self.loadUp() return mainvbox
def __init__(self, *args, **kw): gtk.ScrolledWindow.__init__(self, *args, **kw) self._listbox = gtk.CList() self._listbox.show() self.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.add_with_viewport(self._listbox)
def __init__(self): self.colvalue = "rgb:fb/f9/f5" self.dirvalue = "" self.preffile = "" self.imvalue = "" self.version = this_software_version self.imlist = (".gif", ".png", ".jpeg", ".jpe", ".bmp", ".xpm", ".xbm", ".ppm", ".dib", ".pnm", ".tiff", ".tif", ".jpg", ".ps") global WMCLASS WMCLASS = "icewmcontrolpanelwallpaper" global WMNAME WMNAME = "IceWMControlPanelWallpaper" wallwin = gtk.Window(gtk.WINDOW_TOPLEVEL) wallwin.set_wmclass(WMCLASS, WMNAME) wallwin.realize() wallwin.set_title("IceWM CP - " + _("Wallpaper Settings") + " " + self.version) wallwin.set_position(gtk.WIN_POS_CENTER) self.wallwin = wallwin menu_items = ( (_('/_File'), None, None, 0, '<Branch>'), (_("/_File") + "/_" + FILE_RUN, '<control>R', rundlg, 421, ""), (_("/_File") + "/_" + _("Check for newer versions of this program..."), '<control>U', checkSoftUpdate, 420, ""), (_('/File/sep1'), None, None, 1, '<Separator>'), (_('/File/_Apply Changes Now...'), '<control>A', self.restart_ice, 0, ''), (_('/File/sep2'), None, None, 2, '<Separator>'), (_('/File/_Exit'), '<control>Q', self.doQuit, 0, ''), (_('/_Help'), None, None, 0, '<LastBranch>'), (_('/Help/_About...'), "F2", self.about_cb, 0, ''), (_("/_Help") + "/_" + APP_HELP_STR, "F4", displayHelp, 5003, ""), (_("/_Help") + "/_" + CONTRIBUTORS + "...", "F3", show_credits, 913, ""), (_("/_Help") + "/_" + BUG_REPORT_MENU + "...", "F5", file_bug_report, 5003, ""), ) ag = gtk.AccelGroup() self.itemf = gtk.ItemFactory(gtk.MenuBar, '<main>', ag) wallwin.add_accel_group(ag) self.itemf.create_items(menu_items) self.menubar = self.itemf.get_widget('<main>') mainvbox1 = gtk.VBox(0, 1) mainvbox = gtk.VBox(0, 1) mainvbox1.pack_start(self.menubar, 0, 0, 0) mainvbox1.pack_start(mainvbox, 1, 1, 0) self.menubar.show() mainvbox.set_border_width(4) mainvbox.set_spacing(2) mainvbox.pack_start( getImage(getBaseDir() + "icewmcp.png", DIALOG_TITLE), 0, 0, 2) mainvbox.pack_start(gtk.Label(" " + _("Wallpaper Settings") + " "), 0, 0, 3) #color box colbox = gtk.HBox(0, 0) colbox.set_spacing(10) colbox.set_border_width(3) colframe = gtk.Frame() colframe.set_label(_(" Desktop Color ")) self.colentry = gtk.Entry() TIPS.set_tip(self.colentry, _(" Desktop Color ").strip()) self.colbutton = ColorButton() self.colbutton.connect("clicked", self.colok) #DJM!!!self.selectcol, self.colentry) TIPS.set_tip(self.colbutton, _(" Change... ").strip()) # self.colchooser=gtk.Button() # addDragSupportColor(self.colchooser) # self.colchooser.set_data("colorbutton",self.colbutton) addDragSupportColor(self.colentry) self.colentry.set_data("colorbutton", self.colbutton) # try: # self.colchooser.add( loadScaledImage(getPixDir()+"ism_load.png",24,24) ) # except: # self.colchooser.add(gtk.Label(_(" Change... "))) # self.colchooser.connect("clicked",self.colok) # TIPS.set_tip(self.colchooser,_(" Change... ").strip()) colbox.pack_start(self.colentry, 1, 1, 0) colbox.pack_start(self.colbutton, 0, 0, 0) # colbox.pack_start(self.colchooser,0,0,0) colbox.show_all() colframe.add(colbox) colframe.show_all() mainvbox.pack_start(colframe, 0, 0, 0) #imabe box imbox = gtk.HBox(0, 0) imbox.set_spacing(10) imbox.set_border_width(3) imframe = gtk.Frame() imframe.set_label(_(" Image ")) leftbox = gtk.VBox(0, 0) leftbox.set_spacing(3) self.sc = gtk.ScrolledWindow() self.clist = gtk.CList(1) self.clist.connect('select_row', self.clist_cb) self.clist.set_size_request(215, -1) self.sc.add(self.clist) leftbox.pack_start(self.sc, 1, 1, 0) reloadbutt = gtk.Button(_(" Reload Images ")) TIPS.set_tip(reloadbutt, _(" Reload Images ").strip()) reloadbutt.connect("clicked", self.reloadImages) leftbox.pack_start(reloadbutt, 0, 0, 0) imbox.pack_start(leftbox, 0, 0, 0) leftbox.show_all() rightbox = gtk.VBox(0, 0) rightbox.set_spacing(3) dirbox = gtk.HBox(0, 0) dirbox.set_spacing(10) dirbox.set_border_width(3) dirframe = gtk.Frame() dirframe.set_label(_(" Directory ")) self.direntry = gtk.Entry() TIPS.set_tip(self.direntry, _(" Directory ").strip()) addDragSupport(self.direntry, self.setDrag) # drag-n-drop support, added 2.23.2003 try: self.direntry.set_text(os.environ['HOME'] + os.sep) self.preffile = getIceWMPrivConfigPath() + "preferences" except: pass self.dirchooser = gtk.Button() try: self.dirchooser.add( loadScaledImage(getPixDir() + "ism_load.png", 24, 24)) except: self.dirchooser.add(gtk.Label(_(" Select... "))) TIPS.set_tip(self.dirchooser, _(" Select... ").strip()) self.dirchooser.connect("clicked", self.selectfile) addDragSupport(self.dirchooser, self.setDrag) # drag-n-drop support, added 2.23.2003 dirbox.pack_start(self.direntry, 1, 1, 0) dirbox.pack_start(self.dirchooser, 0, 0, 0) dirbox.show_all() dirframe.add(dirbox) dirframe.show() rightbox.pack_start(dirframe, 0, 0, 0) checkbox = gtk.HBox(0, 0) checkbox.set_spacing(25) checkbox.set_border_width(2) self.checkbutton = gtk.RadioButton(None, _(" Centered ")) self.checkbutton2 = gtk.RadioButton(self.checkbutton, _(" Tiled ")) TIPS.set_tip(self.checkbutton, _(" Centered ").strip()) TIPS.set_tip(self.checkbutton2, _(" Tiled ").strip()) checkbox.pack_start(self.checkbutton, 0, 0, 0) checkbox.pack_start(self.checkbutton2, 0, 0, 0) checkbox.pack_start(gtk.Label(" "), 1, 1, 0) edbutton = gtk.Button() edbox = gtk.HBox(0, 0) edbox.set_border_width(2) edbox.set_spacing(3) edlab = gtk.Label(" " + _("Edit") + " ") try: edbox.pack_start( loadScaledImage(getPixDir() + "ism_edit2.png", 21, 21), 0, 0, 0) except: pass edbox.pack_start(edlab, 1, 1, 0) edbutton.add(edbox) TIPS.set_tip(edbutton, _("Edit with Gimp")) edbutton.connect("clicked", self.editWall) checkbox.pack_start(edbutton, 0, 0, 0) rightbox.pack_start(checkbox, 0, 0, 1) prevtable = gtk.Table(3, 3, 0) prevtabbox = gtk.HBox(0, 0) prevtabbox.pack_start(gtk.Label(" "), 1, 1, 0) sclay = gtk.Layout() self.gl = sclay self.cutoff1 = 356 #314 self.cutoff2 = 267 sclay.set_size_request(self.cutoff1, self.cutoff2) # top row prevtable.attach(gtk.Label(""), 0, 1, 0, 1, (gtk.EXPAND + gtk.FILL), (0), 0, 0) try: prevtable.attach( loadScaledImage(getPixDir() + "monitor_top1.png", 411, 22), 1, 2, 0, 1, (), (0), 0, 0) except: prevtable.attach(gtk.Label(""), 1, 2, 0, 1, (gtk.EXPAND + gtk.FILL), (0), 0, 0) prevtable.attach(gtk.Label(""), 2, 3, 0, 1, (gtk.EXPAND + gtk.FILL), (0), 0, 0) # middle row middlebox = gtk.HBox(0, 0) prevtable.attach(gtk.Label(""), 0, 1, 1, 2, (gtk.EXPAND + gtk.FILL), (0), 0, 0) prevtable.attach(middlebox, 1, 2, 1, 2, (gtk.EXPAND + gtk.FILL), (0), 0, 0) prevtable.attach(gtk.Label(""), 2, 3, 1, 2, (gtk.EXPAND + gtk.FILL), (0), 0, 0) try: middlebox.pack_start( loadScaledImage(getPixDir() + "monitor_left1.png", 27, 268), 0, 0, 0) except: middlebox.pack_start(gtk.Label(""), 0, 0, 0) evbox = gtk.EventBox() addDragSupport(sclay, self.setDrag) evbox.add(sclay) middlebox.pack_start(evbox, 1, 1, 0) try: middlebox.pack_start( loadScaledImage(getPixDir() + "monitor_right1.png", 27, 268), 0, 0, 0) except: middlebox.pack_start(gtk.Label(""), 0, 0, 0) # bottom row prevtable.attach(gtk.Label(""), 0, 1, 2, 3, (gtk.EXPAND + gtk.FILL), (0), 0, 0) try: prevtable.attach( loadScaledImage(getPixDir() + "monitor_bottom1.png", 411, 29), 1, 2, 2, 3, (), (0), 0, 0) except: prevtable.attach(gtk.Label(""), 1, 2, 2, 3, (gtk.EXPAND + gtk.FILL), (0), 0, 0) prevtable.attach(gtk.Label(""), 2, 3, 2, 3, (gtk.EXPAND + gtk.FILL), (0), 0, 0) prevtabbox.pack_start(prevtable, 0, 0, 0) prevtabbox.pack_start(gtk.Label(" "), 1, 1, 0) rightbox.pack_start(prevtabbox, 1, 1, 0) imbox.pack_start(rightbox, 1, 1, 0) rightbox.show_all() imbox.show_all() imframe.add(imbox) imframe.show_all() mainvbox.pack_start(imframe, 1, 1, 0) self.status = gtk.Label(" ") mainvbox.pack_start(self.status, 0, 0, 2) buttonbox = gtk.HBox(0, 0) buttonbox.set_homogeneous(1) buttonbox.set_spacing(4) okbutt = gtk.Button(_("Ok")) applybutt = gtk.Button(_("Apply")) cancelbutt = gtk.Button(_("Close")) TIPS.set_tip(okbutt, _("Ok")) TIPS.set_tip(applybutt, _("Apply")) TIPS.set_tip(cancelbutt, _("Close")) buttonbox.pack_start(okbutt, 1, 1, 0) buttonbox.pack_start(applybutt, 1, 1, 0) buttonbox.pack_start(cancelbutt, 1, 1, 0) okbutt.connect("clicked", self.ok_quit) applybutt.connect("clicked", self.restart_ice) cancelbutt.connect("clicked", self.doQuit) mainvbox.pack_start(buttonbox, 0, 0, 0) wallwin.add(mainvbox1) wallwin.connect("destroy", self.doQuit) wallwin.set_default_size(690, -1) self.checkbutton.set_active(1) self.set_prefs() self.reloadImages() self.displayImage() self.checkbutton.connect("toggled", self.displayImage) wallwin.show_all()
def __init__(self) : self.version=this_software_version self.x_comments="# Created by IceWM Control Panel - Window Options version "+self.version+"\n# http://icesoundmanager.sourceforge.net\n# This is an example for IceWM's window options file.\n#\n# Place your variants in ${sysconfdir}/X11/icewm or in $HOME/.icewm\n# since modifications to this file will be discarded when you\n# (re)install icewm.\n\n#userpasswd.layer: OnTop \n#kdepasswd.layer: OnTop\n\n#This controls Wharf geometry for 1024x768\n#licq.Wharf.dBorder: 0\n#licq.Wharf.ignoreTaskBar: 1\n#licq.Wharf.ignoreQuickSwitch: 1\n#licq.Wharf.dTitleBar: 0\n#licq.Wharf.layer: AboveDock\n#licq.Wharf.allWorkspaces: 1\n#licq.Wharf.geometry: +870+790\n\n" global WMCLASS WMCLASS="icewmcpwinoptions" global WMNAME WMNAME="IceWMCPWinOptions" wallwin=gtk.Window(gtk.WINDOW_TOPLEVEL) wallwin.set_wmclass(WMCLASS,WMNAME) wallwin.realize() wallwin.set_title("IceWM CP - "+_("Window Options")+" "+self.version) wallwin.set_position(gtk.WIN_POS_CENTER) self.wallwin=wallwin # added 2.18.2003 - more locale support self.LAYER_NORMAL=_("Normal") self.LAYER_ABOVED=_("AboveDock") self.LAYER_DOCK=_("Dock") self.LAYER_BELOW=_("Below") self.LAYER_DESKTOP=_("Desktop") self.LAYER_ONTOP=_("OnTop") self.LAYER_MENU=_("Menu") self.layer_conv={"Normal":self.LAYER_NORMAL , "AboveDock":self.LAYER_ABOVED, "Dock":self.LAYER_DOCK , "Menu":self.LAYER_MENU , "Desktop":self.LAYER_DESKTOP , "OnTop":self.LAYER_ONTOP , "Below":self.LAYER_BELOW} self.rlayer_conv={} for i,v in self.layer_conv.items(): self.rlayer_conv[v]=i self.layers_list=[self.LAYER_NORMAL,self.LAYER_ABOVED,self.LAYER_BELOW,self.LAYER_DESKTOP,self.LAYER_DOCK,self.LAYER_ONTOP,self.LAYER_MENU] menu_items = ( (_('/_File'), None, None, 0, '<Branch>'), (_('/File/_Open...'), '<control>O', self.openKey, 0, ''), (_('/File/_Save'), '<control>S', self.doSave, 0, ''), (_('/File/sep1'), None, None, 1, '<Separator>'), (_('/File/_Apply Changes Now...'), "<control>A", self.restart_ice, 0, ''), (_('/File/sep2'), None, None, 2, '<Separator>'), (_("/_File")+"/_"+FILE_RUN,"<control>R", rundlg,421,""), (_("/_File")+"/_"+_("Check for newer versions of this program..."), "<control>U", checkSoftUpdate,420,""), (_('/File/sep2'), None, None, 2, '<Separator>'), (_('/File/_Exit'), '<control>Q', self.doQuit, 0, ''), (_('/_Help'), None, None, 0, '<LastBranch>'), (_('/Help/_About...'), "F2", self.do_about, 0, ''), (_("/_Help")+"/_"+APP_HELP_STR, "F4", displayHelp,5004, ""), (_("/_Help")+"/_"+CONTRIBUTORS+"...", "F3", show_credits,913, ""), (_("/_Help")+"/_"+BUG_REPORT_MENU+"...", "F5", file_bug_report,5004, ""), ) ag = gtk.AccelGroup() self.itemf = gtk.ItemFactory(gtk.MenuBar, '<main>', ag) wallwin.add_accel_group(ag) self.itemf.create_items(menu_items) self.menubar = self.itemf.get_widget('<main>') self.preffile="" try: self.preffile=getIceWMPrivConfigPath()+"winoptions" except: pass mainvbox1=gtk.VBox(0,1) mainvbox=gtk.VBox(0,1) mainvbox1.pack_start(self.menubar,0,0,0) mainvbox1.pack_start(mainvbox,1,1,0) mainvbox.set_border_width(4) mainvbox.set_spacing(4) mainvbox.pack_start(getImage(getBaseDir()+"icewmcp.png",DIALOG_TITLE),0,0,2) mainvbox.pack_start(gtk.Label(_("Window Options")),0,0,2) hbox1=gtk.HBox(0,0) hbox1.set_spacing(5) sc=gtk.ScrolledWindow() self.winlist=gtk.CList(2,[' '+'wm_class',' '+'wm_name']) self.sc=sc sc.add(self.winlist) sc.set_size_request(300,-1) self.winlist.set_column_width(0,120) vb=gtk.VBox(0,0) edbox=gtk.HBox(1,0) edbox.set_spacing(4) vb.pack_start(sc,1,1,0) TIPS.set_tip(self.winlist,"Program windows") addbutt=gtk.Button(_("Add...")) TIPS.set_tip(addbutt,_("Add...").replace(".","")) addbutt.connect("clicked",self.show_addkey) delbutt=gtk.Button(_("Delete")) TIPS.set_tip(delbutt,_("Delete")) delbutt.connect("clicked",self.del_key) edbox.pack_start(addbutt,1,1,1) edbox.pack_start(delbutt,1,1,1) vb.pack_start(edbox,0,0,2) vb.pack_start(gtk.HSeparator(),0,0,1) anstr=_('/File/_Apply Changes Now...')[_('/File/_Apply Changes Now...').rfind("/")+1:len(_('/File/_Apply Changes Now...'))].replace(".","").replace("_","") anbutt=gtk.Button(anstr) TIPS.set_tip(anbutt,anstr) anbutt.connect("clicked", self.restart_ice) svnbutt=gtk.Button(_("Save")) TIPS.set_tip(svnbutt,_("Save")) svnbutt.connect("clicked",self.doSave ) vb.pack_start(svnbutt,0,0,1) vb.pack_start(anbutt,0,0,3) hbox1.pack_start(vb,1,1,1) vb2=gtk.VBox(0,0) vb2.set_spacing(2) h1=gtk.HBox(0,0) h1.set_spacing(3) h1.pack_start(gtk.Label(_("Icon: ")),0,0,0) self.iconentry=gtk.Entry() h1.pack_start(self.iconentry,1,1,0) browsebutt=gtk.Button() try: browsebutt.add( loadScaledImage(getPixDir()+"ism_load.png",24,24) ) except: browsebutt.add(gtk.Label(_(" Browse... "))) TIPS.set_tip(browsebutt,_(" Browse... ")) browsebutt.connect("clicked",self.openIcon) h1.pack_start(browsebutt,0,0,0) addDragSupport(self.iconentry,self.setDrag) addDragSupport(browsebutt,self.setDrag) prevframe=gtk.Frame() self.prevlay=gtk.Layout() self.prevlay.set_size(30,30) prevframe.set_size_request(33,33) self.prevlay.show() prevframe.add(self.prevlay) h1.pack_start(gtk.Label(" "),0,0,0) h1.pack_start(prevframe,0,0,0) addDragSupport(prevframe,self.setDrag) h2=gtk.HBox(0,0) h2.set_spacing(3) h2.pack_start(gtk.Label(_("WorkSpace: ")),0,0,0) workentry=gtk.Entry() self.workentry=workentry h2.pack_start(workentry,1,1,0) h3=gtk.HBox(0,0) h3.set_spacing(3) h3.pack_start(gtk.Label(_("Layer: ")),0,0,0) laycom=gtk.Combo() self.layentry=laycom.entry self.layentry.set_editable(0) laycom.set_popdown_strings(self.layers_list) h3.pack_start(laycom,1,1,0) h4=gtk.HBox(0,0) h4.set_spacing(3) h4.pack_start(gtk.Label(_("Geometry: ")),0,0,0) geoentry=gtk.Entry() self.geoentry=geoentry h4.pack_start(geoentry,1,1,0) h5=gtk.HBox(0,0) h5.set_spacing(3) h5.pack_start(gtk.Label(_("Tray Icon: ")),0,0,0) traycom=gtk.Combo() self.trayentry=traycom.entry self.trayentry.set_editable(0) traycom.set_popdown_strings(['No tray icon','When minimized','Tray icon only']) h5.pack_start(traycom,1,1,0) vb2.pack_start(h1,0,0,3) vb2.pack_start(h2,0,0,1) vb2.pack_start(h3,0,0,1) vb2.pack_start(h4,0,0,1) vb2.pack_start(h5,0,0,1) scwin=gtk.ScrolledWindow() winoptlay=gtk.Layout() self.winoptlay=winoptlay winoptlay.set_size(330,500) scwin.add(winoptlay) self.warn_ok=0 worder=['allWorkspaces','startFullscreen','startMaximized','startMaximizedVert','startMaximizedHorz','startMinimized','ignoreWinList','ignoreTaskBar','ignoreQuickSwitch','fullKeys','fMove','fResize','fClose','fMinimize', 'fMaximize','fHide','fRollup','dTitleBar','dSysMenu','dBorder','dResize','dClose','dMinimize','dMaximize','dHide','dRollup','dDepth','ignorePositionHint','doNotFocus','noFocusOnAppRaise','ignoreNoFocusHint','doNotCover','nonICCCMconfigureRequest'] self.winwidgets={} self.windefaults={'allWorkspaces':0,'startFullscreen':0,'startMaximized':0,'startMaximizedVert':0,'startMaximizedHorz':0,'startMinimized':0,'ignoreWinList':0,'ignoreTaskBar':0,'ignoreQuickSwitch':0,'fullKeys':0,'fMove':1,'fResize':1,'fClose':1,'fMinimize':1, 'fMaximize':1,'fHide':1,'fRollup':1,'dTitleBar':1,'dSysMenu':1,'dBorder':1,'dResize':1,'dClose':1,'dMinimize':1,'dMaximize':1,'dHide':1,'dRollup':1,'dDepth':1,'ignorePositionHint':0,'doNotFocus':0, 'noFocusOnAppRaise':0,'ignoreNoFocusHint':0,'doNotCover':0,'nonICCCMconfigureRequest':0,"tray":"Ignore","geometry":"","layer":self.LAYER_NORMAL,"icon":"","workspace":"[DEFAULT]"} self.winhints={'allWorkspaces':"Visible on all workspaces",'startFullscreen':"Start full-screen",'startMaximized':"Start maximized",'startMaximizedVert':"Start vertically maximized",'startMaximizedHorz':"Start horizontally maximized",'startMinimized':"Start minimized",'ignoreWinList':"Do not show in Window List" ,'ignoreTaskBar':"Do not show on taskbar",'ignoreQuickSwitch':"Do not show in Quick-switch window",'fullKeys':"Reserve extra 'F[num]' keys",'fMove':"Moveable",'fResize':"Resizeable",'fClose':"Closeable",'fMinimize':"Minimizeable",'fMaximize':"Maximizeable",'fHide':"Hideable",'fRollup':"Can be rolled up",'dTitleBar':"Has title bar",'dSysMenu':"Has system menu",'dBorder':"Has border",'dResize':"Has resize border",'dClose':"Has CLOSE button",'dMinimize':"Has MINIMIZE button",'dMaximize':"Has MAXIMIZE button",'dHide':"Has HIDE button (if applicable)",'dRollup':"Has ROLLUP button (if applicable)",'dDepth':"Has LAYER button (if applicable)",'ignorePositionHint':"Ignore pre-set window positions",'doNotFocus':"Do not focus",'noFocusOnAppRaise':"Do not focus when app is raised",'ignoreNoFocusHint':"Force focusing",'doNotCover':"Do not cover",'nonICCCMconfigureRequest':"App is non-ICCCM compliant"} self.window_options={} layx=3 layy=2 maxx=layx for ii in worder: ck=gtk.CheckButton(_(self.winhints[ii])) TIPS.set_tip(ck,_(self.winhints[ii])) ck.set_active(self.windefaults[ii]) ck.show() self.winwidgets[ii]=ck self.winoptlay.put(ck,layx,layy) layy=layy+ck.size_request()[1]+3 if ck.size_request()[0]>maxx: maxx=ck.size_request()[0] self.winoptlay.set_size(maxx+20,layy+20) vb2.pack_start(scwin,1,1,0) setbutt=gtk.Button(_("Set")) TIPS.set_tip(setbutt,_("Set")) setbutt.connect("clicked",self.set_key) vb2.pack_start(setbutt,0,0,3) hbox1.pack_start(vb2,1,1,1) mainvbox.pack_start(hbox1,1,1,1) self.status=gtk.Label(_("Ready.")) mainvbox.pack_start(self.status,0,0,0) wallwin.add(mainvbox1) wallwin.connect("destroy",self.doQuit) wallwin.set_default_size(565,600) self.last_icon=None self.loadUp() self.winlist.connect("select_row",self.clist_cb) self.winlist.connect("unselect_row",self.clist_unselect) wallwin.show_all()
def __init__(self, ok_button=None): gtk.Window.__init__(self) self.set_title("PDB Browser") vbox = gtk.VBox(FALSE, 5) vbox.set_border_width(2) self.add(vbox) vbox.show() paned = gtk.HPaned() vbox.pack_start(paned) paned.show() listsw = gtk.ScrolledWindow() listsw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) paned.add1(listsw) listsw.show() self.list = gtk.CList(1) self.list.set_column_auto_resize(0, TRUE) self.list.set_selection_mode(gtk.SELECTION_BROWSE) listsw.add(self.list) self.list.show() self.update_list() self.list.connect("select_row", self.display) self.infosw = gtk.ScrolledWindow() self.infosw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) paned.add2(self.infosw) self.infosw.show() self.info = None paned.set_position(150) self.cmd = None self.display(self.list, 0, -1, None) hbox = gtk.HBox(FALSE, 5) vbox.pack_start(hbox, expand=FALSE) hbox.show() entry = gtk.Entry() hbox.pack_start(entry, expand=FALSE) entry.show() button = gtk.Button("Search by Name") button.connect("clicked", self.search_name, entry) hbox.pack_start(button, expand=FALSE) button.show() button = gtk.Button("Search by Blurb") button.connect("clicked", self.search_blurb, entry) hbox.pack_start(button, expand=FALSE) button.show() button = gtk.Button("Close") button.connect("clicked", self.destroy) hbox.pack_end(button, expand=FALSE) button.show() if ok_button: button = gtk.Button("OK") button.connect("clicked", ok_button, self) hbox.pack_end(button, expand=FALSE) button.show() self.set_default_size(500, 300)
def __init__(self) : pyspoolwin=gtk.Window(gtk.WINDOW_TOPLEVEL) self._root=pyspoolwin pyspoolwin.realize() pyspoolwin.set_title('PySpool: '+_("Printer Queue")+' version '+PYPRINT_VERSION) pyspoolwin.set_position(gtk.WIN_POS_CENTER) self.pyspoolwin=pyspoolwin mainvbox=gtk.VBox(0,0) self.mainvbox=mainvbox mymenu=gtk.MenuBar() self.mymenu=mymenu ag = gtk.AccelGroup() self.itemf = gtk.ItemFactory(gtk.MenuBar, "<main>", ag) self.itemf.create_items([ # path key callback action# type (_("/ _File"), "<alt>F", None, 0, "<Branch>"), (_("/ _File")+"/_"+FILE_RUN,"<control>R", rundlg,421,""), (_("/ _File")+"/_"+_("Check for newer versions of this program..."), "<control>U", checkSoftUpdate,420,""), (_("/ _File/_Quit"), "<control>Q", self.doQuit, 10, ""), (_("/_Help"), "<alt>H", None, 16, "<LastBranch>"), (_("/_Help/_About")+" PySpool...", "F2", self.doAbout, 17, ""), (_("/_Help")+"/_"+APP_HELP_STR, "F4", displayHelp,5008, ""), (_("/_Help")+"/_"+CONTRIBUTORS+"...", "F3", show_credits,913, ""), (_("/_Help")+"/_"+BUG_REPORT_MENU+"...", "F5", file_bug_report,5008, ""), ]) pyspoolwin.add_accel_group(ag) mymenu = self.itemf.get_widget("<main>") mymenu.show() mainvbox.pack_start(mymenu,0,0,0) hbox1=gtk.HBox(0,12) hbox1.set_border_width(10) pic=loadImage(getPixDir()+"pyprint_printer_big.xpm",pyspoolwin) if pic: hbox1.pack_start(pic,0,0,0) self.hbox1=hbox1 label8=gtk.Label(_('Select Printer:')) self.label8=label8 pyspoolwin.set_size_request(680,-1) hbox1.pack_start(label8,0,0,0) printcombo=gtk.Combo() printcombo.set_size_request(200,-1) self.printcombo=printcombo combo_entry=printcombo.entry combo_entry.set_editable(0) self.combo_entry=combo_entry hbox1.pack_start(printcombo,0,0,0) viewbutt=gtk.Button(_(' View ')) TIPS.set_tip(viewbutt,_(' View ')) viewbutt.connect("clicked",self.changeView) self.viewbutt=viewbutt hbox1.pack_start(viewbutt,0,0,0) mainvbox.pack_start(hbox1,0,0,0) hbox3=gtk.HBox(0,8) hbox3.set_border_width( 4) self.hbox3=hbox3 mytable=gtk.Table(5,2,0) mytable.set_row_spacings(3) mytable.set_col_spacings(7) self.mytable=mytable label15=gtk.Label(_('Description:')) label15.set_alignment(0,0.5) self.label15=label15 mytable.attach(label15,0,1,0,1,(gtk.FILL),(0),0,0) label16=gtk.Label(_('Queue:')) label16.set_alignment( 0,0.5) self.label16=label16 mytable.attach(label16,0,1,1,2,(gtk.FILL),(0),0,0) label17=gtk.Label(_('Server:')) label17.set_alignment(0,0.5) self.label17=label17 mytable.attach(label17,0,1,2,3,(gtk.FILL),(0),0,0) label18=gtk.Label(_('Status:')) label18.set_alignment( 0,0.5) self.label18=label18 mytable.attach(label18,0,1,3,4,(gtk.FILL),(0),0,0) label19=gtk.Label(_('Info:')) label19.set_alignment( 0,0.5) self.label19=label19 mytable.attach(label19,0,1,4,5,(gtk.FILL),(0),0,0) desc_text=gtk.Entry() self.desc_text=desc_text desc_text.set_editable(0) mytable.attach(desc_text,1,2,0,1,(gtk.EXPAND+gtk.FILL),(0),0,0) q_text=gtk.Entry() self.q_text=q_text q_text.set_editable(0) mytable.attach(q_text,1,2,1,2,(gtk.EXPAND+gtk.FILL),(0),0,0) server_text=gtk.Entry() self.server_text=server_text server_text.set_editable(0) mytable.attach(server_text,1,2,2,3,(gtk.EXPAND+gtk.FILL),(0),0,0) status_text=gtk.Entry() self.status_text=status_text status_text.set_editable(0) mytable.attach(status_text,1,2,3,4,(gtk.EXPAND+gtk.FILL),(0),0,0) info_text=gtk.Entry() info_text.set_editable(0) self.info_text=info_text mytable.attach(info_text,1,2,4,5,(gtk.EXPAND+gtk.FILL),(0),0,0) hbox3.pack_start( mytable,1,1,0) vbox3=gtk.VBox(1,7) self.vbox3=vbox3 refreshbutt=getImageButton("pyprint_reload.xpm",_("Refresh Queue Details"),pyspoolwin) TIPS.set_tip(refreshbutt,_("Refresh Queue Details")) refreshbutt.connect("clicked",self.loadDetailsR) self.refreshbutt=refreshbutt vbox3.pack_start( refreshbutt,0,0,0) cancelbutt=getImageButton("pyprint_cancel.xpm",_("Cancel Selected Print Job"),pyspoolwin) TIPS.set_tip(cancelbutt,_("Cancel Selected Print Job")) cancelbutt.connect("clicked",self.cancelJob) self.cancelbutt=cancelbutt vbox3.pack_start( cancelbutt,0,0,0) hbox3.pack_start( vbox3,0,0,0) mainvbox.pack_start(hbox3,0,0,4) scrollwin=gtk.ScrolledWindow() scrollwin.set_border_width(3) scrollwin.set_size_request(-1,170) self.scrollwin=scrollwin myclist=gtk.CList(7) myclist.connect("unselect_row",self.startUpdates) myclist.connect("select_row",self.makeSelection) myclist.column_titles_show() myclist.set_column_width(0,70) myclist.set_column_width(1,53) myclist.set_column_width(2,71) myclist.set_column_width(3,110) myclist.set_column_width(4,117) myclist.set_column_width(5,78) myclist.set_column_width(6,40) self.myclist=myclist label1=gtk.Button(_('State')) self.label1=label1 myclist.set_column_widget(0,label1) label2=gtk.Button(_('Job ID')) self.label2=label2 myclist.set_column_widget(1,label2) label3=gtk.Button(_('Size')) self.label3=label3 myclist.set_column_widget(2,label3) label4=gtk.Button(_('Files')) self.label4=label4 myclist.set_column_widget(3,label4) label5=gtk.Button(_('Owner/ID')) self.label5=label5 myclist.set_column_widget(4,label5) label6=gtk.Button(_('Time')) self.label6=label6 myclist.set_column_widget(5,label6) label7=gtk.Button(_('Class')) self.label7=label7 myclist.set_column_widget(6,label7) scrollwin.add(myclist) mainvbox.pack_start(scrollwin,1,1,0) mystatusbar=gtk.Statusbar() self.mystatusbar=mystatusbar statid=mystatusbar.get_context_id("spooler") self.statid=statid mainvbox.pack_start(mystatusbar,0,0,0) pyspoolwin.add( mainvbox) pyspoolwin.connect("destroy",self.doQuit) global SELECTED_PRINTER SELECTED_PRINTER=None global SELECTING SELECTING=0 global JOB_ID JOB_ID=-1 pyspoolwin.show_all() self.checkPath() # check for needed executables # correct any problems with the printer queue directories launch("checkpc -f > /dev/null") try: self.loadDetails() except: pass gtk.timeout_add(1500,self.autoLoad) # reload the details every 1.5 seconds
def init_ui(self): window = gtk.Window(gtk.WINDOW_TOPLEVEL) window.set_size_request(750, 700) window.set_resizable(True) window.connect("destroy", self.close_application) window.set_title("Commotion Wireless for Windows (prototype 1)") window.set_border_width(0) box1 = gtk.VBox(False, 0) window.add(box1) box1.show() box2 = gtk.VBox(False, 10) box2.set_border_width(10) box1.pack_start(box2, True, True, 0) box2.show() notebook = gtk.Notebook() notebook.set_tab_pos(gtk.POS_TOP) notebook.show_all() self.show_tabs = True self.show_border = True def add_page(notebook, title, image, page): label = gtk.Label(title) vbox = gtk.VBox(False, 0) vbox.set_size_request(60, 60) image.set_size_request(46, 46) vbox.pack_start(image, False, True, 0) vbox.pack_start(label, False, True, 0) label.show() vbox.show() notebook.append_page(page, vbox) self.textview = gtk.TextView() self.textview.set_sensitive(False) self.textbuffer = self.textview.get_buffer() self.textview.show() hbox = gtk.HBox(False, 10) # FIXME replace with TreeView: http://www.pygtk.org/pygtk2tutorial/ch-TreeViewWidget.html clist = gtk.CList(2) for k, v in self.profiles.iteritems(): clist.append(["@" if v["available"] else "", k]) clist.set_column_width(0, 10) clist.set_column_width(1, 190) clist.set_shadow_type(gtk.SHADOW_OUT) clist.connect("select_row", self.profile_selection_made) clist.show() hbox.pack_start(clist, expand=False, fill=False, padding=0) hbox.show() def get_profile_editor_controls(): def add_item(b, l, t): l.set_alignment(0, 0) b.pack_start(l, expand=False, fill=False, padding=0) b.pack_start(t, expand=False, fill=False, padding=0) vbox = gtk.VBox(False, 10) label = gtk.Label("Mesh Netword Name (SSID):") self.tbSSID = gtk.Entry() self.tbSSID.connect("changed", self.changed) add_item(vbox, label, self.tbSSID) label = gtk.Label("BSSID:") self.tbBSSID = gtk.Entry() self.tbBSSID.connect("changed", self.changed) add_item(vbox, label, self.tbBSSID) label = gtk.Label("Channel:") self.tbChannel = gtk.Entry() self.tbChannel.connect("changed", self.changed) add_item(vbox, label, self.tbChannel) label = gtk.Label("IP:") self.tbIP = gtk.Entry() self.tbIP.connect("changed", self.changed) add_item(vbox, label, self.tbIP) label = gtk.Label("IPGenerate:") self.cbIPGenerate = gtk.CheckButton() self.cbIPGenerate.connect("toggled", self.changed) add_item(vbox, label, self.cbIPGenerate) label = gtk.Label("Netmask:") self.tbNetmask = gtk.Entry() self.tbNetmask.connect("changed", self.changed) add_item(vbox, label, self.tbNetmask) label = gtk.Label("DNS:") self.tbDNS = gtk.Entry() self.tbDNS.connect("changed", self.changed) add_item(vbox, label, self.tbDNS) hbox = gtk.HBox(False, 10) self.save_button = gtk.Button("Save Profile") self.save_button.set_sensitive(False) self.save_button.connect("clicked", self.save_profile_clicked) hbox.pack_start(self.save_button) self.undo_changes_button = gtk.Button("Undo Changes") self.undo_changes_button.set_sensitive(False) self.undo_changes_button.connect("clicked", self.undo_changes_clicked) hbox.pack_start(self.undo_changes_button) vbox.pack_end(hbox, expand=False, fill=False, padding=0) vbox.show_all() # load first profile clist.select_row(0, 0) return vbox vbox_profile_controls = get_profile_editor_controls() hbox.pack_start(vbox_profile_controls, expand=True, fill=True, padding=10) hbox.show() TAB_IMAGE_WIDTH = 40 TAB_IMAGE_HEIGHT = 40 pixbuf = gtk.gdk.pixbuf_new_from_file( core.get_own_path(os.path.join('images', 'tabProfiles.png'))) pixbuf = pixbuf.scale_simple(TAB_IMAGE_WIDTH, TAB_IMAGE_HEIGHT, gtk.gdk.INTERP_BILINEAR) image = gtk.image_new_from_pixbuf(pixbuf) image.show() add_page(notebook, "Profiles", image, hbox) pixbuf = gtk.gdk.pixbuf_new_from_file( core.get_own_path(os.path.join('images', 'tabLog.png'))) pixbuf = pixbuf.scale_simple(TAB_IMAGE_WIDTH, TAB_IMAGE_HEIGHT, gtk.gdk.INTERP_BILINEAR) image = gtk.image_new_from_pixbuf(pixbuf) image.show() """ vbox = gtk.VBox(False, 10) vbox.pack_start(self.textview, True, True, 0) button = gtk.Button("show jsoninfo") button.connect("clicked", self.show_jsoninfo) vbox.pack_start(button, True, True, 0) button.show() vbox.show() add_page(notebook, "Logs", image, vbox) """ add_page(notebook, "Logs", image, self.textview) pixbuf = gtk.gdk.pixbuf_new_from_file( core.get_own_path(os.path.join('images', 'tabStatus.png'))) pixbuf = pixbuf.scale_simple(TAB_IMAGE_WIDTH, TAB_IMAGE_HEIGHT, gtk.gdk.INTERP_BILINEAR) image = gtk.image_new_from_pixbuf(pixbuf) image.show() label = gtk.Label("Status goes here...") label.show() add_page(notebook, "Status", image, label) pixbuf = gtk.gdk.pixbuf_new_from_file( core.get_own_path(os.path.join('images', 'tabHelp.png'))) pixbuf = pixbuf.scale_simple(TAB_IMAGE_WIDTH, TAB_IMAGE_HEIGHT, gtk.gdk.INTERP_BILINEAR) image = gtk.image_new_from_pixbuf(pixbuf) image.show() vbox = gtk.VBox(False, 10) logo_pixbuf = gtk.gdk.pixbuf_new_from_file( core.get_own_path(os.path.join('images', 'commotion_logo.png'))) logo = gtk.image_new_from_pixbuf(logo_pixbuf) logo.show() vbox.pack_start(logo) blurb = gtk.Label( "Commotion is an open-source communication tool that uses mobile phones, computers, and other wireless devices to create decentralized mesh networks." ) blurb.set_line_wrap(True) blurb.show() vbox.pack_start(blurb) link = gtk.LinkButton("https://commotionwireless.net/", "commotionwireless.net") link.show() vbox.pack_start(link) vbox.show() add_page(notebook, "About", image, vbox) vbox = gtk.VBox(False, 10) box2.pack_start(notebook) string = "\n" self.textbuffer.set_text(string) hbox = gtk.HButtonBox() box2.pack_start(hbox, False, False, 0) hbox.show() vbox = gtk.VBox() vbox.show() hbox.pack_start(vbox, expand=False, fill=False, padding=0) # check button to start up commotion check = gtk.ToggleButton(strings.TOGGLE_TEXT_START) vbox.pack_start(check, expand=False, fill=False, padding=0) check.connect("toggled", self.toggle_start, self.textview) check.set_active(False) check.show() separator = gtk.HSeparator() box1.pack_start(separator, False, True, 0) separator.show() box2 = gtk.HBox(False, 10) box2.set_border_width(10) box1.pack_start(box2, False, True, 0) box2.show() button = gtk.Button("show mesh status") button.connect("clicked", self.show_mesh_status) box2.pack_start(button, True, True, 0) button.show() button = gtk.Button("show jsoninfo") button.connect("clicked", self.show_jsoninfo) box2.pack_start(button, True, True, 0) button.show() button = gtk.Button("quit winmesh") button.connect("clicked", self.close_application) box2.pack_start(button, True, True, 0) button.set_flags(gtk.CAN_DEFAULT) button.grab_default() button.show() window.show()