本文整理汇总了Python中ubuntutweak.modules.TweakModule类的典型用法代码示例。如果您正苦于以下问题:Python TweakModule类的具体用法?Python TweakModule怎么用?Python TweakModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TweakModule类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
TweakModule.__init__(self, 'desktoprecovery.ui')
self.setup_backup_model()
hbox = Gtk.HBox(spacing=12)
self.add_start(hbox)
self.cateview = CateView()
sw = Gtk.ScrolledWindow(shadow_type=Gtk.ShadowType.IN)
sw.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
sw.add(self.cateview)
#FIXME it will cause two callback for cateview changed
self.cateview.connect('button_press_event',
self.on_cateview_button_press_event)
self.cate_selection = self.cateview.get_selection()
self.cate_selection.connect('changed', self.on_cateview_changed)
hbox.pack_start(sw, False, False, 0)
vpaned = Gtk.VPaned()
hbox.pack_start(vpaned, True, True, 0)
self.settingview = SettingView()
self.setting_selection = self.settingview.get_selection()
self.setting_selection.connect('changed', self.on_settingview_changed)
sw = Gtk.ScrolledWindow(shadow_type=Gtk.ShadowType.IN)
sw.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
sw.add(self.settingview)
vpaned.pack1(sw, True, False)
vpaned.pack2(self.recover_box, False, False)
self.on_cateview_changed(self.cate_selection)
self.show_all()
开发者ID:0x0001,项目名称:ubuntu-tweak,代码行数:35,代码来源:desktoprecovery.py
示例2: __init__
def __init__(self):
TweakModule.__init__(self)
box = TablePack(_('Advanced Power Management Settings'), (
WidgetFactory.create('GconfCheckButton',
label=_('Enable "Lock screen" when "Blank Screen" activates'),
enable_reset=True,
key='blank_screen'),
WidgetFactory.create('GconfCheckButton',
label=_('Lock screen on hibernate'),
enable_reset=True,
key='/apps/gnome-power-manager/lock/hibernate'),
WidgetFactory.create('GconfCheckButton',
label=_('Lock screen on suspend'),
enable_reset=True,
key='/apps/gnome-power-manager/lock/suspend'),
WidgetFactory.create('GconfScale',
label=_('LCD brightness when using AC power'),
enable_reset=True,
key='/apps/gnome-power-manager/backlight/brightness_ac',
min=0, max=100, digits=0),
WidgetFactory.create('GconfScale',
label=_('LCD brightness when using battery'),
enable_reset=True,
key='/apps/gnome-power-manager/backlight/brightness_dim_battery',
min=0, max=100, digits=0, reversed=True)
))
self.add_start(box, False, False, 0)
开发者ID:Adriarson,项目名称:ubuntu-tweak,代码行数:28,代码来源:powermanager.py
示例3: __init__
def __init__(self):
TweakModule.__init__(self)
button = WidgetFactory.create("GconfCheckButton",
label=_('Show advanced permissions in the Nautilus "File Properties" window'),
enable_reset=True,
key="show_advanced_permissions")
box = ListPack(_("File Browser"), (button, ))
self.add_start(box, False, False, 0)
hbox1 = gtk.HBox(False, 12)
button = gtk.Button(stock = gtk.STOCK_CLEAR)
self.set_clean_button_label(button)
button.connect('clicked', self.on_clean_thumbnails_clicked)
hbox1.pack_end(button, False, False, 0)
box = TablePack(_('Thumbnail Settings'), (
WidgetFactory.create('GconfSpinButton',
key='thumbnail_size',
enable_reset=True,
min=16, max=512, step=16,
label=_('Default thumbnail icon size (pixels)')),
WidgetFactory.create('GconfSpinButton',
key='maximum_size',
enable_reset=True,
min=-1, max=512, step=1,
label=_('Maximum thumbnail cache size (megabytes)')),
WidgetFactory.create('GconfSpinButton',
key='maximum_age',
enable_reset=True,
min=-1, max=180, step=1,
label=_('Thumbnail cache time (days)')),
hbox1,
))
self.add_start(box, False, False, 0)
self.PACKAGE_WORKER = PACKAGE_WORKER
self.nautilus_terminal = AptCheckButton(_('Open folder in terminal'), 'nautilus-open-terminal')
self.nautilus_terminal.connect('toggled', self.colleague_changed)
self.nautilus_root = AptCheckButton(_('Open folder 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.add_start(box, False, False, 0)
开发者ID:leeight,项目名称:ubuntu-tweak,代码行数:60,代码来源:nautilus.py
示例4: __init__
def __init__(self):
TweakModule.__init__(self)
hibernate_box = WidgetFactory.create('CheckButton',
label=_('Lock screen on hibernate'),
enable_reset=True,
backend=GConf,
key='/apps/gnome-power-manager/lock/hibernate')
suspend_box = WidgetFactory.create('CheckButton',
label=_('Lock screen on suspend'),
enable_reset=True,
backend=GConf,
key='/apps/gnome-power-manager/lock/suspend')
screensaver_box = WidgetFactory.create('CheckButton',
label=_('Use Screensaver lock settings'),
enable_reset=True,
backend=GConf,
key='/apps/gnome-power-manager/lock/use_screensaver_settings')
hibernate_button = hibernate_box.get_data('widget')
suspend_button = suspend_box.get_data('widget')
screensaver_button = screensaver_box.get_data('widget')
screensaver_button.connect('toggled', self.on_screensaver_button_toggled,
(hibernate_button, suspend_button))
self.on_screensaver_button_toggled(screensaver_button, (hibernate_button, suspend_button))
box = TablePack(_('Advanced Power Management Settings'), (
WidgetFactory.create('CheckButton',
label=_('Enable "Lock screen" when "Blank Screen" activates'),
enable_reset=True,
backend=GConf,
key='/apps/gnome-power-manager/lock/blank_screen'),
screensaver_box, hibernate_box, suspend_box
))
self.add_start(box, False, False, 0)
开发者ID:Thongor,项目名称:ubuntu-tweak,代码行数:34,代码来源:powermanager.py
示例5: __init__
def __init__(self):
TweakModule.__init__(self)
sw = Gtk.ScrolledWindow()
sw = Gtk.ScrolledWindow(shadow_type=Gtk.ShadowType.IN)
sw.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
self.add_start(sw, True, True, 0)
self.dirview = UserdirView()
self.dirview.get_selection().connect('changed', self.on_selection_changed)
sw.add(self.dirview)
hbuttonbox = Gtk.HButtonBox()
hbuttonbox.set_spacing(12)
hbuttonbox.set_layout(Gtk.ButtonBoxStyle.END)
self.add_start(hbuttonbox, False, False, 0)
self.restore_button = Gtk.Button(_('_Restore'))
self.restore_button.set_use_underline(True)
self.restore_button.set_sensitive(False)
self.restore_button.connect('clicked', self.on_restore_button_clicked)
hbuttonbox.pack_end(self.restore_button, False, False, 0)
self.change_button = Gtk.Button(_('_Change'))
self.change_button.set_use_underline(True)
self.change_button.set_sensitive(False)
self.change_button.connect('clicked', self.on_change_button_clicked)
hbuttonbox.pack_end(self.change_button, False, False, 0)
开发者ID:0tli4nitsa,项目名称:ubuntu-tweak,代码行数:28,代码来源:userdir.py
示例6: __init__
def __init__(self):
TweakModule.__init__(self)
self.wallpaper_path = os.path.join(CONFIG_ROOT, 'lovewallpaper.jpg')
self.jsonman = JsonMan(Gdk.Screen.width(), Gdk.Screen.height())
self.image_model = Gtk.ListStore(Pixbuf, str)
self.image_view = Gtk.IconView.new_with_model(self.image_model)
self.image_view.set_property('halign', Gtk.Align.CENTER)
self.image_view.set_column_spacing(5)
self.image_view.set_item_padding(5)
self.image_view.set_item_width(175)
self.image_view.set_pixbuf_column(0)
self.image_view.connect("item-activated", self.set_wallpaper)
link_label = Gtk.Label()
link_label.set_markup('Powered by <a href="http://www.lovebizhi.com/linux">%s</a>.' % self.__title__)
link_label.set_line_wrap(True)
lucky_button = Gtk.Button(_("I'm Feeling Lucky"))
lucky_button.set_property('halign', Gtk.Align.CENTER)
lucky_button.connect('clicked', self.on_luky_button_clicked)
self.connect('size-allocate', self.on_size_allocate)
try:
self.load_imageview()
self.add_start(self.image_view, False, False, 0)
self.add_start(lucky_button, False, False, 0)
except Exception, e:
link_label.set_markup('Network issue happened when visiting <a href="http://www.lovebizhi.com/linux">%s</a>. Please check if you can access the website.' % self.__title__)
开发者ID:0xBADCA7,项目名称:ubuntu-tweak,代码行数:31,代码来源:lovewallpaperhd.py
示例7: __init__
def __init__(self):
TweakModule.__init__(self, "templates.ui")
if not is_right_path():
label = Gtk.Label(
label=_(
'The templates path is incorrect! The current path points to "%s".\nPlease reset it to a location within your Home Folder.'
)
% USER_DIR
)
hbox = Gtk.HBox()
self.add_start(hbox, False, False, 0)
hbox.pack_start(label, 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()
开发者ID:GBeckerRS,项目名称:ubuntu-tweak,代码行数:27,代码来源:templates.py
示例8: __init__
def __init__(self):
TweakModule.__init__(self, 'sourceeditor.ui')
self.auto_backup_setting = GSetting('com.ubuntu-tweak.tweak.auto-backup')
self.textview = SourceView(SOURCES_LIST)
self.textview.set_sensitive(False)
self.sw1.add(self.textview)
self.textview.get_buffer().connect('changed', self.on_buffer_changed)
un_lock = PolkitButton(PK_ACTION_SOURCE)
un_lock.connect('authenticated', self.on_polkit_action)
self._authenticated = False
self.hbuttonbox2.pack_end(un_lock, False, False, 0)
self.list_selection = self.list_view.get_selection()
self.list_selection.connect("changed", self.on_selection_changed)
self.infobar = Gtk.InfoBar()
self.info_label = Gtk.Label('Current view the list')
self.info_label.set_alignment(0, 0.5)
self.infobar.get_content_area().add(self.info_label)
self.infobar.connect("response", self.on_infobar_response)
self.infobar.add_button(Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE)
self.infobar.hide()
self.text_vbox.pack_start(self.infobar, False, False, 0)
self.connect('realize', self.on_ui_realize)
self.add_start(self.hbox1)
开发者ID:Thongor,项目名称:ubuntu-tweak,代码行数:29,代码来源:sourceeditor.py
示例9: __init__
def __init__(self):
TweakModule.__init__(self)
box = ListPack(_("System Security options"), (
WidgetFactory.create("CheckButton",
label=_('Disable "Lock Screen"'),
key="org.gnome.desktop.lockdown.disable-lock-screen",
backend="gsettings",
enable_reset=True),
WidgetFactory.create("CheckButton",
label=_("Disable printing"),
key="org.gnome.desktop.lockdown.disable-printing",
backend="gsettings",
enable_reset=True),
WidgetFactory.create("CheckButton",
label=_("Disable printer settings"),
key="org.gnome.desktop.lockdown.disable-print-setup",
backend="gsettings",
enable_reset=True),
WidgetFactory.create("CheckButton",
label=_("Disable save to disk"),
key="org.gnome.desktop.lockdown.disable-save-to-disk",
backend="gsettings",
enable_reset=True),
WidgetFactory.create("CheckButton",
label=_('Disable "Fast User Switching"'),
key="org.gnome.desktop.lockdown.disable-user-switching",
backend="gsettings",
enable_reset=True),
), padding=2)
self.add_start(box, False, False, 0)
开发者ID:juzerdana,项目名称:ubuntu-tweak,代码行数:32,代码来源:lockdown.py
示例10: __init__
def __init__(self):
TweakModule.__init__(self, "desktoprecovery.ui")
self.setup_backup_model()
hbox = gtk.HBox(False, 5)
self.add_start(hbox)
self.cateview = CateView()
# FIXME it will cause two callback for cateview changed
self.cateview.connect("button_press_event", self.on_cateview_button_press_event)
self.cate_selection = self.cateview.get_selection()
self.cate_selection.connect("changed", self.on_cateview_changed)
hbox.pack_start(self.cateview, False, False, 0)
vpaned = gtk.VPaned()
hbox.pack_start(vpaned)
self.keydirview = KeyDirView()
self.keydir_selection = self.keydirview.get_selection()
self.keydir_selection.connect("changed", self.on_keydirview_changed)
sw = gtk.ScrolledWindow()
sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
sw.add(self.keydirview)
vpaned.pack1(sw, True, False)
self.window1.remove(self.recover_box)
vpaned.pack2(self.recover_box, False, False)
self.on_cateview_changed(self.cate_selection)
self.show_all()
开发者ID:jonolumb,项目名称:ubuntu-tweak,代码行数:31,代码来源:desktoprecovery.py
示例11: __init__
def __init__(self):
TweakModule.__init__(self)
self.default = DefaultScripts()
self.config_test()
hbox = gtk.HBox(False, 10)
self.add_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.add_start(hbox, False, False, 0)
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)
开发者ID:Adriarson,项目名称:ubuntu-tweak,代码行数:33,代码来源:scripts.py
示例12: __init__
def __init__(self):
TweakModule.__init__(self)
hbox = gtk.HBox(False, 5)
self.add_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.typeview.connect("row-activated", self.on_row_activated)
self.type_selection = self.typeview.get_selection()
self.type_selection.set_mode(gtk.SELECTION_MULTIPLE)
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)
hbox = gtk.HBox(False, 5)
self.add_start(hbox, 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)
hbox.pack_end(self.edit_button, False, False, 0)
self.show_have_app = gtk.CheckButton(_("Only show filetypes with associated applications"))
self.show_have_app.set_active(True)
self.show_have_app.connect("toggled", self.on_show_all_toggled)
hbox.pack_start(self.show_have_app, False, False, 5)
self.show_all()
开发者ID:priteshdesai,项目名称:ubuntu-tweak,代码行数:35,代码来源:filetype.py
示例13: __init__
def __init__(self):
TweakModule.__init__(self, 'appcenter.ui')
set_label_for_stock_button(self.sync_button, _('_Sync'))
self.to_add = []
self.to_rm = []
self.package_worker = PACKAGE_WORKER
self.url = APP_VERSION_URL
self.cateview = CategoryView(os.path.join(APPCENTER_ROOT, 'cates.json'))
self.cate_selection = self.cateview.get_selection()
self.cate_selection.connect('changed', self.on_category_changed)
self.left_sw.add(self.cateview)
self.appview = AppView()
self.appview.update_model()
self.appview.sort_model()
self.appview.connect('changed', self.on_app_status_changed)
self.right_sw.add(self.appview)
self.update_timestamp()
self.show_all()
UPDATE_SETTING.set_value(False)
UPDATE_SETTING.connect_notify(self.on_have_update, data=None)
if TweakSettings.get_sync_notify():
thread.start_new_thread(self.check_update, ())
gobject.timeout_add(60000, self.update_timestamp)
self.reparent(self.main_vbox)
开发者ID:ubuntutweak,项目名称:ubuntu-tweak,代码行数:33,代码来源:appcenter.py
示例14: __init__
def __init__(self):
TweakModule.__init__(self)
sw = gtk.ScrolledWindow()
sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
self.add_start(sw, True, True, 0)
self.dirview = UserdirView()
self.dirview.get_selection().connect('changed', self.on_selection_changed)
sw.add(self.dirview)
hbuttonbox = gtk.HButtonBox()
hbuttonbox.set_spacing(12)
hbuttonbox.set_layout(gtk.BUTTONBOX_END)
self.add_start(hbuttonbox, False, False, 0)
self.restore_button = gtk.Button(_('_Restore'))
self.restore_button.set_sensitive(False)
self.restore_button.connect('clicked', self.on_restore_button_clicked)
hbuttonbox.pack_end(self.restore_button, False, False, 0)
self.change_button = gtk.Button(_('_Change'))
self.change_button.set_sensitive(False)
self.change_button.connect('clicked', self.on_change_button_clicked)
hbuttonbox.pack_end(self.change_button, False, False, 0)
开发者ID:Adriarson,项目名称:ubuntu-tweak,代码行数:25,代码来源:userdir.py
示例15: __init__
def __init__(self):
TweakModule.__init__(self)
valid_themes = self._get_valid_themes()
theme_box = GridPack(
WidgetFactory.create('Switch',
label=self.utext_event_sounds,
key='org.gnome.desktop.sound.event-sounds',
backend='gsettings'),
WidgetFactory.create('Switch',
label=self.utext_login_sound,
key='50_unity-greeter.gschema.override::com.canonical.unity-greeter#play-ready-sound',
backend='systemconfig'),
WidgetFactory.create('Switch',
label=self.utext_input_feedback,
key='org.gnome.desktop.sound.input-feedback-sounds',
backend='gsettings'),
WidgetFactory.create('ComboBox',
label=self.utext_sound_theme,
key='org.gnome.desktop.sound.theme-name',
backend='gsettings',
texts=valid_themes,
values=valid_themes),
)
self.add_start(theme_box, False, False, 0)
开发者ID:0tli4nitsa,项目名称:ubuntu-tweak,代码行数:27,代码来源:sound.py
示例16: __init__
def __init__(self):
TweakModule.__init__(self)
self.__setting = TweakSettings()
changeicon_hbox = self.create_change_icon_hbox()
box = ListPack(_("Panel Settings"), (
WidgetFactory.create("GconfCheckButton",
label=_("Display warning when removing a panel"),
enable_reset=True,
key="confirm_panel_remove"),
WidgetFactory.create("GconfCheckButton",
label=_("Complete lockdown of all panels"),
enable_reset=True,
key="locked_down"),
WidgetFactory.create("GconfCheckButton",
label=_("Enable panel animations"),
enable_reset=True,
key="enable_animations"),
))
self.add_start(box, False, False, 0)
box = ListPack(_("Menu Settings"), (
WidgetFactory.create("GconfCheckButton",
label=_("Show Input Method menu in the context menu"),
enable_reset=True,
key="show_input_method_menu"),
WidgetFactory.create("GconfCheckButton",
label=_("Show Unicode Control Character menu in the context menu"),
enable_reset=True,
key="show_unicode_menu"),
WidgetFactory.create("GconfCheckButton",
label=_('Show icons in menus'),
enable_reset=True,
key='/desktop/gnome/interface/menus_have_icons'),
WidgetFactory.create("GconfCheckButton",
label=_('Show icons on buttons'),
enable_reset=True,
key='/desktop/gnome/interface/buttons_have_icons'),
changeicon_hbox,
))
self.add_start(box, False, False, 0)
box = ListPack(_("Screensaver"), (
WidgetFactory.create("GconfCheckButton",
label=_("Enable user switching whilst screen is locked."),
enable_reset=True,
key="user_switch_enabled"),
))
self.add_start(box, False, False, 0)
self.recently_used = gtk.CheckButton(_('Enable system-wide "Recent 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.add_start(box, False, False, 0)
开发者ID:jonolumb,项目名称:ubuntu-tweak,代码行数:59,代码来源:gnomesettings.py
示例17: __init__
def __init__(self):
TweakModule.__init__(self)
box = ListPack(
_("Session Menu Options"),
(
WidgetFactory.create(
"CheckButton",
label=_("Remove the log out item from the session menu"),
enable_reset=True,
backend="gsettings",
key="com.canonical.indicator.session.suppress-logout-menuitem",
),
WidgetFactory.create(
"CheckButton",
label=_("Remove the restart item from the session menu"),
enable_reset=True,
backend="gsettings",
key="com.canonical.indicator.session.suppress-restart-menuitem",
),
WidgetFactory.create(
"CheckButton",
label=_("Remove the shutdown item from the session menu"),
enable_reset=True,
backend="gsettings",
key="com.canonical.indicator.session.suppress-shutdown-menuitem",
),
WidgetFactory.create(
"CheckButton",
label=_("Suppress the dialog to confirm logout, restart and shutdown action"),
enable_reset=True,
backend="gsettings",
key="com.canonical.indicator.session.suppress-logout-restart-shutdown",
),
),
)
self.add_start(box, False, False, 0)
box = ListPack(
_("User Menu Options"),
(
WidgetFactory.create(
"CheckButton",
label=_("Show user menu"),
enable_reset=True,
backend="gsettings",
key="com.canonical.indicator.session.user-show-menu",
),
WidgetFactory.create(
"CheckButton",
label=_("Show user's real name on the panel"),
enable_reset=True,
backend="gsettings",
key="com.canonical.indicator.session.show-real-name-on-panel",
),
),
)
self.add_start(box, False, False, 0)
开发者ID:nayanapriyankara,项目名称:ubuntu-tweak,代码行数:59,代码来源:session.py
示例18: __init__
def __init__(self):
TweakModule.__init__(self)
valid_themes = theme.get_valid_themes()
valid_icon_themes = theme.get_valid_icon_themes()
valid_cursor_themes = theme.get_valid_cursor_themes()
valid_window_themes = theme.get_valid_window_themes()
theme_choose_button = Gtk.FileChooserButton()
theme_choose_button.connect('file-set', self.on_file_set)
icon_label, self.icon_theme, icon_reset_button = WidgetFactory.create('ComboBox',
label=self.utext_icon_theme,
key='org.gnome.desktop.interface.icon-theme',
backend='gsettings',
texts=valid_icon_themes,
values=valid_icon_themes,
enable_reset=True)
if system.CODENAME == 'precise':
window_theme_label, window_theme_combox, window_theme_reset_button = WidgetFactory.create('ComboBox',
label=self.utext_window_theme,
key='/apps/metacity/general/theme',
backend='gconf',
texts=valid_window_themes,
values=valid_window_themes,
enable_reset=True)
else:
window_theme_label, window_theme_combox, window_theme_reset_button = WidgetFactory.create('ComboBox',
label=self.utext_window_theme,
key='org.gnome.desktop.wm.preferences.theme',
backend='gsettings',
texts=valid_window_themes,
values=valid_window_themes,
enable_reset=True)
theme_box = GridPack(
WidgetFactory.create('ComboBox',
label=self.utext_gtk_theme,
key='org.gnome.desktop.interface.gtk-theme',
backend='gsettings',
texts=valid_themes,
values=valid_themes,
enable_reset=True),
(icon_label, self.icon_theme, icon_reset_button),
WidgetFactory.create('ComboBox',
label=self.utext_cursor_theme,
key='org.gnome.desktop.interface.cursor-theme',
backend='gsettings',
texts=valid_cursor_themes,
values=valid_cursor_themes,
enable_reset=True),
(window_theme_label, window_theme_combox, window_theme_reset_button),
Gtk.Separator(),
(Gtk.Label(_('Install theme:')), theme_choose_button),
)
self.add_start(theme_box, False, False, 0)
开发者ID:0tli4nitsa,项目名称:ubuntu-tweak,代码行数:59,代码来源:theme.py
示例19: __init__
def __init__(self):
TweakModule.__init__(self)
show_permission_button, show_permission_reset = WidgetFactory.create("CheckButton",
label=self.utext_advanced_properties,
enable_reset=True,
key="org.gnome.nautilus.preferences.show-advanced-permissions",
backend="gsettings")
box = GridPack(
(Gtk.Label(_("File browser:")), show_permission_button, show_permission_reset),
WidgetFactory.create("CheckButton",
label=self.utext_pathbar,
enable_reset=True,
blank_label=True,
key="org.gnome.nautilus.preferences.always-use-location-entry",
backend="gsettings"),
Gtk.Separator(),
WidgetFactory.create('Switch',
key='org.gnome.desktop.media-handling.automount',
enable_reset=True,
label=self.utext_automount,
backend="gsettings"),
WidgetFactory.create('Switch',
key='org.gnome.desktop.media-handling.automount-open',
enable_reset=True,
label=self.utext_open,
backend="gsettings"),
WidgetFactory.create('Switch',
key='org.gnome.desktop.media-handling.autorun-never',
enable_reset=True,
reverse=True,
label=self.utext_prompt,
backend="gsettings"),
Gtk.Separator(),
WidgetFactory.create('Scale',
key='org.gnome.nautilus.icon-view.thumbnail-size',
enable_reset=True,
min=16, max=512,
step=16,
label=self.utext_thumbnail_icon_size,
backend="gsettings"),
WidgetFactory.create('Scale',
key='org.gnome.desktop.thumbnail-cache.maximum-age',
enable_reset=True,
min=-1, max=180,
step=1,
label=self.utext_thumbnail_cache_age,
backend="gsettings"),
WidgetFactory.create('Scale',
key='org.gnome.desktop.thumbnail-cache.maximum-size',
enable_reset=True,
min=-1, max=512,
step=1,
label=self.utext_thumbnail_cache_size,
backend="gsettings"),
)
self.add_start(box, False, False, 0)
开发者ID:1and1get2,项目名称:ubuntu-tweak,代码行数:58,代码来源:nautilus.py
示例20: __init__
def __init__(self):
TweakModule.__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.add_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'
|
请发表评论