def __init__(self): TweakPage.__init__(self) self.pack_start(self.session_control_box(), False, False, 0) box = SinglePack(_('Splash Screen (Click On Image)'), self.splash_hbox()) self.pack_start(box, False, False, 0)
def __init__(self): TweakPage.__init__(self, _('File Type Manager'), _('Here you can manage which application will open which filetypes.')) hbox = gtk.HBox(False, 5) self.pack_start(hbox) self.cateview = CateView() self.cate_selection = self.cateview.get_selection() self.cate_selection.connect('changed', self.on_cateview_changed) hbox.pack_start(self.cateview, False, False, 0) self.typeview = TypeView() self.type_selection = self.typeview.get_selection() self.type_selection.connect('changed', self.on_typeview_changed) sw = gtk.ScrolledWindow() sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) sw.add(self.typeview) hbox.pack_start(sw) vbox = gtk.VBox(False, 5) hbox.pack_start(vbox, False, False, 0) self.edit_button = gtk.Button(stock = gtk.STOCK_EDIT) self.edit_button.connect('clicked', self.on_edit_clicked) self.edit_button.set_sensitive(False) vbox.pack_start(self.edit_button, False, False, 0) self.show_have_app = gtk.CheckButton(_('Only show filetypes with an associated application')) self.show_have_app.set_active(True) self.show_have_app.connect('toggled', self.on_show_all_toggled) self.pack_start(self.show_have_app, False, False, 5) self.show_all()
def __init__(self): TweakPage.__init__(self) if os.uname()[4][0:3] == "ppc": for element in file("/proc/cpuinfo"): if element.split(":")[0][0:3] == "cpu": cpumodel = element.split(":")[1] else: for element in file("/proc/cpuinfo"): if element.split(":")[0] == "model name\t": cpumodel = element.split(":")[1] for element in file("/proc/meminfo"): if element.split(" ")[0] == "MemTotal:": raminfo = element.split(" ")[-2] box = ListPack(_("System information"),( EntryBox(_("Hostname"), os.uname()[1]), EntryBox(_("Distribution"), SystemInfo.distro), EntryBox(_("Desktop environment"), SystemInfo.gnome), EntryBox(_("Kernel"), os.uname()[0]+" "+os.uname()[2]), EntryBox(_("Platform"), os.uname()[-1]), EntryBox(_("CPU"), cpumodel[1:-1]), EntryBox(_("Memory"), str(int(raminfo)/1024)+" MB"), )) self.pack_start(box, False, False, 0) box = ListPack(_("User information"),( EntryBox(_("Current user"), os.getenv("USER")), EntryBox(_("Home directory"), os.getenv("HOME")), EntryBox(_("Shell"), os.getenv("SHELL")), EntryBox(_("Language"), os.getenv("LANG")), )) self.pack_start(box, False, False, 0)
def __init__(self): TweakPage.__init__(self, _('Manage Scripts'), _("You can do all kinds of tasks with scripts.\nYou can drag and drop from File Manager.\n'Scripts' will be added to the context menu.")) self.default = DefaultScripts() self.config_test() hbox = gtk.HBox(False, 10) self.pack_start(hbox) sw = gtk.ScrolledWindow() sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) hbox.pack_start(sw) self.enable_scripts = EnableScripts() sw.add(self.enable_scripts) sw = gtk.ScrolledWindow() sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) hbox.pack_start(sw) self.disable_scripts = DisableScripts() sw.add(self.disable_scripts) hbox = gtk.HBox(False, 0) self.pack_start(hbox, False, False, 10) button = gtk.Button(_('Rebuild System Scripts')) button.connect('clicked', self.on_rebuild_clicked) hbox.pack_end(button, False, False, 5) self.enable_scripts.connect('drag_data_received', self.on_enable_drag_data_received) self.enable_scripts.connect('deleted', self.on_enable_deleted) self.disable_scripts.connect('drag_data_received', self.on_disable_drag_data_received)
def __init__(self): TweakPage.__init__(self) box = TablePack(_('Window Decorate Effect'), [ [WidgetFactory.create('GconfCheckButton', label = _('Use Metacity window theme'), key = 'use_metacity_theme')], [WidgetFactory.create('GconfCheckButton', label = _('Enable active window transparency'), key = 'metacity_theme_active_shade_opacity')], [gtk.Label(_('Active window transparency level')), WidgetFactory.create('GconfScale', key = 'metacity_theme_active_opacity', min = 0, max = 1, digits = 2)], [WidgetFactory.create('GconfCheckButton', label = _('Enable inactive window transparency'), key = 'metacity_theme_shade_opacity')], [gtk.Label(_('Inactive window shade transparency level')), WidgetFactory.create('GconfScale', key = 'metacity_theme_opacity', min = 0, max = 1, digits = 2)], ]) self.pack_start(box, False, False, 0) table = TablePack(_('Window Titlebar Action'), [ [gtk.Label(_('Titlebar mouse wheel action')), WidgetFactory.create('GconfComboBox', key = 'mouse_wheel_action', texts = [_('None'), _('Roll up')], values = ['none', 'shade'])], [gtk.Label(_('Titlebar double-click action')), WidgetFactory.create('GconfComboBox', key = 'action_double_click_titlebar', texts = [_('None'), _('Maximize'), _('Minimize'), _('Roll up'), _('Lower'), _('Menu')], values = ['none', 'toggle_maximize', 'minimize', 'toggle_shade', 'lower', 'menu'])], [gtk.Label(_('Titlebar middle-click action')), WidgetFactory.create('GconfComboBox', key = 'action_middle_click_titlebar', texts = [_('None'), _('Maximize'), _('Minimize'), _('Roll up'), _('Lower'), _('Menu')], values = ['none', 'toggle_maximize', 'minimize', 'toggle_shade', 'lower', 'menu'])], [gtk.Label(_('Titlebar right-click action')), WidgetFactory.create('GconfComboBox', key = 'action_right_click_titlebar', texts = [_('None'), _('Maximize'), _('Minimize'), _('Roll up'), _('Lower'), _('Menu')], values = ['none', 'toggle_maximize', 'minimize', 'toggle_shade', 'lower', 'menu'])], ]) self.pack_start(table, False, False, 0) button = WidgetFactory.create('GconfCheckButton', label = _("Enable Metacity's Compositing feature"), key = 'compositing_manager') if button: box = ListPack(_('Compositing Manager'), (button,)) button.connect('toggled', self.on_compositing_button_toggled) self.pack_start(box, False, False, 0)
def __init__(self): TweakPage.__init__(self) box = TablePack(_("Advanced Power Management Settings"), [ [WidgetFactory.create("GconfCheckButton", label = _('Enable "Hibernation"'), key = "can_hibernate")], [WidgetFactory.create("GconfCheckButton", label = _('Enable "Suspend"'), key = "can_suspend")], [WidgetFactory.create("GconfCheckButton", label = _('Show "CPU frequency control option" in Power Management Preferences'), key = "cpufreq_show")], [WidgetFactory.create("GconfCheckButton", label = _("Disable Network Manager when asleep"), key = "network_sleep")], [WidgetFactory.create("GconfCheckButton", label = _('Enable "Lock screen" when "Blank Screen" activates'), key = "blank_screen")], [gtk.Label(_('Display "Power Manager" panel item')), WidgetFactory.create("GconfComboBox", key = "icon_policy", texts = [_("Never display"), _("When charging"), _("Always display")], values = ["never", "charge", "always"])], ]) self.pack_start(box, False, False, 0) if module_check.get_gnome_version() < 24: cpu_policy_text = [_("Normal"), _("On Demand"), _("Power Save"), _("Performance")] cpu_policy_value = ["nothing", "ondemand", "powersave", "performance"] box = TablePack(_("CPU Policy"), [ [gtk.Label(_("The Performance value when on AC power")), WidgetFactory.create("GconfScale", key = "performance_ac", min = 0, max = 100, digits = 0)], [gtk.Label(_("The Performance value when on battery power")), WidgetFactory.create("GconfScale", key = "performance_battery", min = 0, max = 100, digits = 0)], [gtk.Label(_("The CPU frequency policy when on AC power")), WidgetFactory.create("GconfComboBox", key = "policy_ac", texts = cpu_policy_text, values = cpu_policy_value)], [gtk.Label(_("The CPU frequency policy when on battery power")), WidgetFactory.create("GconfComboBox", key = "policy_battery", texts = cpu_policy_text, values = cpu_policy_value)], ]) self.pack_start(box, False, False, 0)
def __init__(self): TweakPage.__init__(self, _("Shortcut Commands"), _("By configuring keyboard shortcuts, you can access your favourite applications instantly.\nEnter the application's command and set the desired shortcut keys.")) sw = gtk.ScrolledWindow() sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.pack_start(sw) treeview = self.create_treeview() sw.add(treeview)
def __init__(self): TweakPage.__init__(self) box = ListPack(_("System Security options"), ( Factory.create("gconfcheckbutton", _("Disable \"Run Application\" dialog (Alt+F2)"), "disable_command_line"), Factory.create("gconfcheckbutton", _('Disable "Lock Screen"'), "disable_lock_screen"), Factory.create("gconfcheckbutton", _("Disable printing"), "disable_printing"), Factory.create("gconfcheckbutton", _("Disable print setup"), "disable_print_setup"), Factory.create("gconfcheckbutton", _("Disable save to disk"), "disable_save_to_disk"), Factory.create("gconfcheckbutton", _('Disable "User Switch"'), "disable_user_switching"), )) self.pack_start(box, False, False, 0)
def __init__(self): TweakPage.__init__(self, _('Session Programs'), _('Here you can manage what programs get started when you login.\n' 'You can hide items from view by selecting and clicking "Remove"\n' 'To permanently delete an item, right-click and press "Delete".')) hbox = gtk.HBox(False, 10) self.pack_start(hbox, True, True, 10) #create the two checkbutton for extra options of auto run list self.show_comment_button = gtk.CheckButton(_("Show comments")) self.pack_start(self.show_comment_button, False, False, 0) self.show_all_button = gtk.CheckButton(_("Show all runnable programs")) self.pack_start(self.show_all_button, False, False, 0) self.show_all_button.connect("toggled", self.on_show_all, self.show_comment_button) self.show_comment_button.connect("toggled", self.on_show_comment, self.show_all_button) sw = gtk.ScrolledWindow() sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) hbox.pack_start(sw) self.treeview = AutoStartItem() sw.add(self.treeview) vbox = gtk.VBox(False, 5) hbox.pack_start(vbox, False, False, 0) button = gtk.Button(stock = gtk.STOCK_ADD) button.connect("clicked", self.on_add_item, self.treeview) vbox.pack_start(button, False, False, 0) button = gtk.Button(stock = gtk.STOCK_REMOVE) button.set_sensitive(False) button.connect("clicked", self.on_remove_item, self.treeview) vbox.pack_start(button, False, False, 0) self.treeview.set_data("remove", button) button = gtk.Button(stock = gtk.STOCK_EDIT) button.set_sensitive(False) button.connect("clicked", self.on_edit_item, self.treeview) vbox.pack_start(button, False, False, 0) self.treeview.set_data("edit", button)
def __init__(self): TweakPage.__init__(self, _('Add/Remove Applications'), _('A simple but more effecient method for finding and installing popular packages than the default Add/Remove.')) update_apt_cache(True) self.to_add = [] self.to_rm = [] self.packageWorker = PackageWorker() vbox = gtk.VBox(False, 8) self.pack_start(vbox) hbox = gtk.HBox(False, 0) vbox.pack_start(hbox, False, False, 0) combobox = self.create_category() combobox.set_active(0) combobox.connect('changed', self.on_category_changed) hbox.pack_end(combobox, False, False, 0) sw = gtk.ScrolledWindow() sw.set_shadow_type(gtk.SHADOW_ETCHED_IN) sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) vbox.pack_start(sw) # create tree view treeview = self.create_treeview() treeview.set_rules_hint(True) treeview.set_search_column(COLUMN_NAME) sw.add(treeview) # button hbox = gtk.HBox(False, 0) vbox.pack_end(hbox, False ,False, 0) self.button = gtk.Button(stock = gtk.STOCK_APPLY) self.button.connect('clicked', self.on_apply_clicked) self.button.set_sensitive(False) hbox.pack_end(self.button, False, False, 0) self.show_all()
def __init__(self): TweakPage.__init__(self) self.__setting = TweakSettings() notify_hbox = self.create_notify_hbox() changeicon_hbox = self.create_change_icon_hbox() box = ListPack(_("Panel and Menu"), ( WidgetFactory.create("GconfCheckButton", label = _("Display warning when removing a panel"), key = "confirm_panel_remove"), WidgetFactory.create("GconfCheckButton", label = _("Complete lockdown of all panels"), key = "locked_down"), WidgetFactory.create("GconfCheckButton", label = _("Enable panel animations"), key = "enable_animations"), WidgetFactory.create("GconfCheckButton", label = _("Show Input Method menu on the context menu"), key = "show_input_method_menu"), WidgetFactory.create("GconfCheckButton", label = _("Show Unicode Method menu on the context menu"), key = "show_unicode_menu"), changeicon_hbox, notify_hbox, )) self.pack_start(box, False, False, 0) box = ListPack(_("Screensaver"), ( WidgetFactory.create("GconfCheckButton", label = _("Enable user switching when screen is locked."), key = "user_switch_enabled"), )) self.pack_start(box, False, False, 0) self.recently_used = gtk.CheckButton(_('Enable system-wide "Recently Documents" list')) self.recently_used.connect('toggled', self.colleague_changed) self.recently_used.set_active(self.get_state()) box = ListPack(_("History"), ( self.recently_used, )) self.pack_start(box, False, False, 0)
def __init__(self): TweakPage.__init__(self) box = ListPack( _("System Security options"), ( WidgetFactory.create( "GconfCheckButton", label=_('Disable "Run Application" dialog (Alt+F2)'), key="disable_command_line" ), WidgetFactory.create("GconfCheckButton", label=_('Disable "Lock Screen"'), key="disable_lock_screen"), WidgetFactory.create("GconfCheckButton", label=_("Disable printing"), key="disable_printing"), WidgetFactory.create("GconfCheckButton", label=_("Disable print setup"), key="disable_print_setup"), WidgetFactory.create("GconfCheckButton", label=_("Disable save to disk"), key="disable_save_to_disk"), WidgetFactory.create( "GconfCheckButton", label=_('Disable "Fast User Switching"'), key="disable_user_switching" ), ), ) self.pack_start(box, False, False, 0)
def __init__(self): TweakPage.__init__(self) if not is_right_path(): self.set_description(_('Templates path is wrong! The current path is point to "%s".\nPlease reset it to a folder under your Home Folder.') % USER_DIR) hbox = gtk.HBox(False, 0) self.pack_start(hbox, False, False, 0) button = gtk.Button(stock = gtk.STOCK_GO_FORWARD) button.connect('clicked', self.on_go_button_clicked) set_label_for_stock_button(button, _('Go And Set')) hbox.pack_end(button, False, False, 0) button = gtk.Button(stock = gtk.STOCK_EXECUTE) button.connect('clicked', self.on_restart_button_clicked) set_label_for_stock_button(button, _('Restart This Module')) hbox.pack_end(button, False, False, 0) else: self.create_interface()
def __init__(self): TweakPage.__init__(self, _("Default Folder Locations"), _("You can change the paths of the default folders here.\nDon't change the location of your desktop folder unless you know what you are doing.")) sw = gtk.ScrolledWindow() sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.pack_start(sw, True, True, 5) dirview = UserdirView() sw.add(dirview) hbox = gtk.HBox(False, 0) self.pack_start(hbox, False, False, 5) button = gtk.Button(stock = gtk.STOCK_REFRESH) button.set_sensitive(False) button.connect("clicked", self.on_refresh_clicked) hbox.pack_end(button, False, False, 0) dirview.connect('changed', self.on_dirview_changed, button)
def __init__(self): TweakPage.__init__(self, _('Third-Party Software Sources'), _('After every release of Ubuntu there comes a feature freeze.\nThis means only applications with bug-fixes get into the repository.\nBy using third-party DEB repositories, you can always keep up-to-date with the latest version.\nAfter adding these repositories, locate and install them using Add/Remove.')) self.__config = Config() sw = gtk.ScrolledWindow() sw.set_shadow_type(gtk.SHADOW_ETCHED_IN) sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) self.pack_start(sw) self.treeview = SourcesView() self.treeview.connect('sourcechanged', self.colleague_changed) self.treeview.selection.connect('changed', self.on_selection_changed) self.treeview.set_sensitive(False) self.treeview.set_rules_hint(True) sw.add(self.treeview) self.expander = gtk.Expander(_('Details')) self.pack_start(self.expander, False, False, 0) self.sourcedetail = SourceDetail() self.expander.set_sensitive(False) self.expander.add(self.sourcedetail) hbox = gtk.HBox(False, 5) self.pack_end(hbox, False, False, 0) un_lock = PolkitButton() un_lock.connect('changed', self.on_polkit_action) hbox.pack_end(un_lock, False, False, 0) self.refresh_button = gtk.Button(stock = gtk.STOCK_REFRESH) self.refresh_button.set_sensitive(False) self.refresh_button.connect('clicked', self.on_refresh_button_clicked) hbox.pack_end(self.refresh_button, False, False, 0)
def __init__(self): TweakPage.__init__(self) self.create_interface()
def __init__(self): TweakPage.__init__(self) button = WidgetFactory.create("GconfCheckButton", label = _('Show advanced permissions in the Nautilus "File Properties" window'), key = "show_advanced_permissions") box = ListPack(_("File Browser"), (button, )) self.pack_start(box, False, False, 0) boxes = [] hbox1 = gtk.HBox(False, 5) label = gtk.Label(_('Default thumbnail icon size (pixels)')) hbox1.pack_start(label, False, False, 0) boxes.append(hbox1) button = WidgetFactory.create('GconfSpinButton', key = 'thumbnail_size', min = 16, max = 512, step = 16) hbox1.pack_end(button, False, False, 0) button = WidgetFactory.create('GconfSpinButton', key = 'maximum_size', min = -1, max = 512, step = 1) if button: hbox2 = gtk.HBox(False, 5) label = gtk.Label(_('Maximum size of the thumbnail cache (megabytes)')) hbox2.pack_start(label, False, False, 0) hbox2.pack_end(button, False, False, 0) boxes.append(hbox2) button = WidgetFactory.create('GconfSpinButton', key = 'maximum_age', min = -1, max = 180, step = 1) if button: hbox3 = gtk.HBox(False, 5) label = gtk.Label(_('Maximum age for the thumbnail in the cache (days)')) hbox3.pack_start(label, False, False, 0) hbox3.pack_end(button, False, False, 0) boxes.append(hbox3) hbox4 = gtk.HBox(False, 5) button = gtk.Button(stock = gtk.STOCK_CLEAR) self.set_clean_button_label(button) button.connect('clicked', self.on_clean_thumbnails_clicked) hbox4.pack_end(button, False, False, 0) boxes.append(hbox4) box = ListPack(_('Thumbnails Settings'), boxes) self.pack_start(box, False, False, 0) if not DISABLE: update_apt_cache(True) self.packageWorker = PackageWorker() self.nautilus_terminal = AptCheckButton(_('Nautilus with Open Terminal'), 'nautilus-open-terminal') self.nautilus_terminal.connect('toggled', self.colleague_changed) self.nautilus_root = AptCheckButton(_('Nautilus with Root Privileges'), 'nautilus-gksu') self.nautilus_root.connect('toggled', self.colleague_changed) self.nautilus_wallpaper = AptCheckButton(_('Nautilus with Wallpaper'), 'nautilus-wallpaper') self.nautilus_wallpaper.connect('toggled', self.colleague_changed) box = ListPack(_("Nautilus Extensions"), ( self.nautilus_terminal, self.nautilus_root, self.nautilus_wallpaper, )) self.button = gtk.Button(stock = gtk.STOCK_APPLY) self.button.connect("clicked", self.on_apply_clicked, box) self.button.set_sensitive(False) hbox = gtk.HBox(False, 0) hbox.pack_end(self.button, False, False, 0) box.vbox.pack_start(hbox, False, False, 0) self.pack_start(box, False, False, 0)