def __init__(self): self.version = this_software_version cwin = gtk.Window() cwin = gtk.Window(gtk.WINDOW_TOPLEVEL) cwin.set_wmclass("icewmcp-mouse", "icewmcp-Mouse") cwin.realize() cwin.set_title(_("IceWM CP - Mouse Settings") + " " + self.version) cwin.set_position(gtk.WIN_POS_CENTER) self.cwin = cwin self.vbox = gtk.VBox(0, 0) menu_items = ( (_('/_File'), None, None, 0, '<Branch>'), (_('/File/_Apply Changes Now...'), "<control>A", restart_ice, 0, ''), (_('/File/sep1'), None, None, 1, '<Separator>'), (_("/_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/_Exit'), '<control>Q', doQuit, 0, ''), (_('/_Help'), None, None, 0, '<LastBranch>'), (_('/Help/_About...'), "F2", self.do_about, 0, ''), (_("/_Help") + "/_" + APP_HELP_STR, "F4", displayHelp, 5012, ""), (_("/_Help") + "/_" + CONTRIBUTORS + "...", "F3", show_credits, 913, ""), (_("/_Help") + "/_" + BUG_REPORT_MENU + "...", "F5", file_bug_report, 5012, ""), ) ag = gtk.AccelGroup() self.itemf = gtk.ItemFactory(gtk.MenuBar, '<main>', ag) cwin.add_accel_group(ag) self.itemf.create_items(menu_items) self.menubar = self.itemf.get_widget('<main>') vbox1 = gtk.VBox(0, 0) vbox = self.vbox vbox.set_border_width(4) vbox1.pack_start(self.menubar, 0, 0, 0) vbox1.pack_start(vbox, 1, 1, 0) vbox.pack_start(getImage(getBaseDir() + "icewmcp.png", DIALOG_TITLE), 0, 0, 1) vbox.pack_start(gtk.Label(translateP("Mouse")), 0, 0, 1) vbox.set_spacing(2) notebook = gtk.Notebook() notebook.set_tab_pos(gtk.POS_TOP) notebook.set_scrollable(gtk.TRUE) vbox.pack_start(notebook, 1, 1, 2) mousepan = mousetab() curspan = cursortab(cwin) global ICE_TAB ICE_TAB = icepref.PullTab("Mouse") icetab = ICE_TAB.get_tab() icepan = gtk.VBox(0, 0) icepan.set_spacing(3) icepan.pack_start(gtk.Label(_("Mouse Behavior")), 0, 0, 3) icepan.pack_start(icetab, 1, 1, 0) actstr = _('/File/_Apply Changes Now...' )[_('/File/_Apply Changes Now...').rfind("/") + 1:len(_('/File/_Apply Changes Now...'))].replace( "_", "").replace(".", "").strip() abutt = gtk.Button(" " + actstr + " ") abutt.connect("clicked", restart_ice) TIPS.set_tip(abutt, actstr) cbutton = gtk.Button(_("Close")) TIPS.set_tip(cbutton, _("Close")) cbutton.connect("clicked", doQuit) hbox1 = gtk.HBox(1, 0) hbox1.set_border_width(3) hbox1.set_spacing(5) hbox1.pack_start(abutt, 1, 1, 0) hbox1.pack_start(cbutton, 1, 1, 0) icepan.pack_start(hbox1, 0, 0, 2) notebook.append_page(mousepan.mainvbox, gtk.Label(_("Speed"))) notebook.append_page(curspan.mainvbox, gtk.Label(translateP("Cursors"))) notebook.append_page(icepan, gtk.Label(_("Behavior"))) cwin.set_default_size(410, 480) cwin.add(vbox1) cwin.connect("destroy", doQuit) global CWIN CWIN = cwin cwin.show_all()
def __init__(self): self.version = this_software_version cwin = gtk.Window() cwin = gtk.Window(gtk.WINDOW_TOPLEVEL) cwin.set_wmclass("icewmcp-keyboard", "icewmcp-Keyboard") cwin.realize() cwin.set_title(_("IceWM CP - Keyboard Settings") + " " + self.version) cwin.set_position(gtk.WIN_POS_CENTER) self.cwin = cwin self.vbox = gtk.VBox(0, 0) menu_items = ( (_('/_File'), None, None, 0, '<Branch>'), (_('/_File') + "/_" + _("Open Shortcut Key Configuration") + "...", '<control>O', self.openKey, 0, ''), (_('/File/_Apply Changes Now...'), "<control>A", restart_ice, 0, ''), (_('/File/sep1'), None, None, 1, '<Separator>'), (_("/_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/_Exit'), '<control>Q', reapplySettings, 0, ''), (_('/_Help'), None, None, 0, '<LastBranch>'), (_('/Help/_About...'), "F2", self.do_about, 0, ''), (_("/_Help") + "/_" + APP_HELP_STR, "F4", displayHelp, 5013, ""), (_("/_Help") + "/_" + CONTRIBUTORS + "...", "F3", show_credits, 913, ""), (_("/_Help") + "/_" + BUG_REPORT_MENU + "...", "F5", file_bug_report, 5013, ""), ) ag = gtk.AccelGroup() self.itemf = gtk.ItemFactory(gtk.MenuBar, '<main>', ag) cwin.add_accel_group(ag) self.itemf.create_items(menu_items) self.menubar = self.itemf.get_widget('<main>') vbox1 = gtk.VBox(0, 0) vbox = self.vbox vbox.set_border_width(4) vbox1.pack_start(self.menubar, 0, 0, 0) vbox1.pack_start(vbox, 1, 1, 0) vbox.pack_start(getImage(getBaseDir() + "icewmcp.png", DIALOG_TITLE), 0, 0, 1) vbox.pack_start(gtk.Label(_("Keyboard")), 0, 0, 1) vbox.set_spacing(2) notebook = gtk.Notebook() self.notebook = notebook notebook.set_tab_pos(gtk.POS_TOP) notebook.set_scrollable(gtk.TRUE) vbox.pack_start(notebook, 1, 1, 2) global KEY_TAB keywinta = keywintab() KEY_TAB = keywinta global BELL_TAB BELL_TAB = keysoundtab() global SHORT_TAB short_tab = keypanel(0) SHORT_TAB = short_tab global ICE_TAB ICE_TAB = icepref.PullTab("Key Bindings") icetab = ICE_TAB.get_tab() icepan = gtk.VBox(0, 0) icepan.set_spacing(3) icepan.pack_start(gtk.Label(_("Additional IceWM Shortcut Keys")), 0, 0, 3) icepan.pack_start(icetab, 1, 1, 0) actstr = _('/File/_Apply Changes Now...' )[_('/File/_Apply Changes Now...').rfind("/") + 1:len(_('/File/_Apply Changes Now...'))].replace( "_", "").replace(".", "").strip() abutt = gtk.Button(" " + actstr + " ") abutt.connect("clicked", restart_ice) TIPS.set_tip(abutt, actstr) ccbutton = gtk.Button(_("Close")) TIPS.set_tip(ccbutton, _("Close")) ccbutton.connect("clicked", reapplySettings) hbox1 = gtk.HBox(1, 0) hbox1.set_border_width(3) hbox1.set_spacing(5) hbox1.pack_start(abutt, 1, 1, 0) hbox1.pack_start(ccbutton, 1, 1, 0) icepan.pack_start(hbox1, 0, 0, 2) notebook.append_page(keywinta.mainvbox, gtk.Label(_("Repetition"))) notebook.append_page(BELL_TAB.mainvbox, gtk.Label(_("Sound"))) notebook.append_page(short_tab.createPanel(0), gtk.Label(_("Shortcut Keys"))) notebook.append_page(icepan, gtk.Label(_("IceWM Keys"))) short_tab.appbutt.connect("clicked", restart_ice) cwin.set_default_size(435, 500) cwin.add(vbox1) cwin.connect("destroy", reapplySettings) global C_WINDOW C_WINDOW = cwin cwin.show_all()
def __init__(self): self.version = this_software_version cwin = Window() cwin = Window(WINDOW_TOPLEVEL) set_basic_window_icon(cwin) cwin.set_wmclass("icewmcp-mouse", "icewmcp-Mouse") cwin.realize() cwin.set_title(_("IceWM CP - Mouse Settings") + " " + self.version) cwin.set_position(WIN_POS_CENTER) self.cwin = cwin self.vbox = VBox(0, 0) menu_items = [ (_('/_File'), None, None, 0, '<Branch>'), (_('/File/_Apply Changes Now...'), "<control>A", restart_ice, 0, ''), (_('/File/sep1'), None, None, 1, '<Separator>'), (_("/_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/_Exit'), '<control>Q', doQuit, 0, ''), (_('/_Help'), None, None, 0, '<LastBranch>'), (_('/Help/_About...'), "F2", self.do_about, 0, ''), (_("/_Help") + "/_" + APP_HELP_STR, "F4", displayHelp, 5012, ""), (_("/_Help") + "/_" + CONTRIBUTORS + "...", "F3", show_credits, 913, ""), (_("/_Help") + "/_" + BUG_REPORT_MENU + "...", "F5", file_bug_report, 5012, ""), ] ag = AccelGroup() itemf = ItemFactory(MenuBar, '<main>', ag) self.ag = ag self.itemf = itemf cwin.add_accel_group(ag) itemf.create_items(menu_items) self.menubar = itemf.get_widget('<main>') # added 6.21.2003 - "run as root" menu selector self.leftmenu = self.menubar.get_children()[0].get_submenu() self.run_root_button = CheckMenuItem(" " + RUN_AS_ROOT) self.leftmenu.prepend(self.run_root_button) self.run_root_button.connect("toggled", self.run_as_root) vbox1 = VBox(0, 0) vbox = self.vbox vbox.set_border_width(4) vbox1.pack_start(self.menubar, 0, 0, 0) vbox1.pack_start(vbox, 1, 1, 0) vbox.pack_start(getImage(getBaseDir() + "icewmcp.png", DIALOG_TITLE), 0, 0, 1) self.title_lab = Label(to_utf8(translateP("Mouse"))) vbox.pack_start(self.title_lab, 0, 0, 1) vbox.set_spacing(2) notebook = Notebook() notebook.set_tab_pos(POS_TOP) notebook.set_scrollable(TRUE) vbox.pack_start(notebook, 1, 1, 2) mousepan = mousetab() curspan = cursortab(cwin) self.curspan = curspan global ICE_TAB ICE_TAB = icepref.PullTab("Mouse") icetab = ICE_TAB.get_tab() icepan = VBox(0, 0) icepan.set_spacing(3) icepan.pack_start(Label(_("Mouse Behavior")), 0, 0, 3) icepan.pack_start(icetab, 1, 1, 0) actstr = _('/File/_Apply Changes Now...' )[_('/File/_Apply Changes Now...').rfind("/") + 1:len(_('/File/_Apply Changes Now...'))].replace( "_", "").replace(".", "").strip() abutt = getPixmapButton(None, STOCK_APPLY, actstr) abutt.connect("clicked", restart_ice) TIPS.set_tip(abutt, actstr) cbutton = getPixmapButton(None, STOCK_CANCEL, _("Close")) TIPS.set_tip(cbutton, _("Close")) cbutton.connect("clicked", doQuit) hbox1 = HBox(1, 0) hbox1.set_border_width(3) hbox1.set_spacing(5) hbox1.pack_start(abutt, 1, 1, 0) hbox1.pack_start(cbutton, 1, 1, 0) icepan.pack_start(hbox1, 0, 0, 2) notebook.append_page(mousepan.mainvbox, Label(_("Speed"))) notebook.append_page(curspan.mainvbox, Label(to_utf8(translateP("Cursors")))) notebook.append_page(icepan, Label(_("Behavior"))) cwin.set_default_size(410, 480) cwin.add(vbox1) cwin.connect("destroy", doQuit) global CWIN CWIN = cwin cwin.show_all()