本文整理汇总了Python中ubuntutweak.common.factory.WidgetFactory类的典型用法代码示例。如果您正苦于以下问题:Python WidgetFactory类的具体用法?Python WidgetFactory怎么用?Python WidgetFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WidgetFactory类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, item):
gtk.VBox.__init__(self)
self.show_button = WidgetFactory.create("GconfCheckButton",
label = item["label"],
key = item["visible"])
self.show_button.connect('toggled', self.colleague_changed)
self.pack_start(self.show_button, False, False, 0)
self.show_hbox = gtk.HBox(False, 10)
self.pack_start(self.show_hbox, False, False, 0)
if not self.show_button.get_active():
self.show_hbox.set_sensitive(False)
icon = gtk.image_new_from_icon_name(item["icon"], gtk.ICON_SIZE_DIALOG)
self.show_hbox.pack_start(icon, False, False, 0)
self.rename_button = WidgetFactory.create("StrGconfCheckButton",
label = item["rename"],
key = item["name"])
self.rename_button.connect('toggled', self.colleague_changed)
vbox = gtk.VBox(False, 5)
self.show_hbox.pack_start(vbox, False, False, 0)
vbox.pack_start(self.rename_button, False, False, 0)
self.entry = WidgetFactory.create("GconfEntry", key = item["name"])
self.entry.connect('focus-out-event', self.entry_focus_out)
self.entry.connect_activate_signal()
if not self.rename_button.get_active():
self.entry.set_sensitive(False)
vbox.pack_start(self.entry, False, False, 0)
开发者ID:Adriarson,项目名称:ubuntu-tweak,代码行数:32,代码来源:icons.py
示例2: setup_other_features
def setup_other_features(self):
vbox = self.worker.get_object('vbox5')
button = WidgetFactory.create('GconfCheckButton',
label=_('Enable Check Update'),
key='check_update',
default=False)
vbox.pack_start(button, False, False, 0)
button = WidgetFactory.create('GconfCheckButton',
label=_('Use Separated Sources'),
key='separated_sources',
default=True)
vbox.pack_start(button, False, False, 0)
button = WidgetFactory.create('GconfCheckButton',
label = _('Use Remote Data When Available'),
key='use_remote_data',
default=True)
vbox.pack_start(button, False, False, 0)
if os.getenv('LANG').startswith('zh_CN'):
button = WidgetFactory.create('GconfCheckButton',
label='使用PPA镜像(如果可用)',
key='use_mirror_ppa',
default=False)
vbox.pack_start(button, False, False, 0)
vbox.show_all()
开发者ID:DigGe,项目名称:ubuntu-tweak,代码行数:29,代码来源:preferences.py
示例3: setup_window_preference
def setup_window_preference(self):
table = self.worker.get_object('table1')
height, width = TweakSettings.get_window_size()
win_width = WidgetFactory.create('GconfSpinButton',
key = 'window_width',
min = 640, max = 1280, step = 1)
win_width.show()
win_width.connect('value-changed', self.on_value_changed)
table.attach(win_width, 1, 3, 0, 1)
win_height = WidgetFactory.create('GconfSpinButton',
key = 'window_height',
min = 480, max = 1280, step = 1)
win_height.show()
win_height.connect('value-changed', self.on_value_changed)
table.attach(win_height, 1, 3, 1, 2)
toolbar_size = WidgetFactory.create('GconfSpinButton',
key = 'toolbar_size',
min = 100, max = 500, step = 1)
toolbar_size.show()
toolbar_size.connect('value-changed', self.on_value_changed)
table.attach(toolbar_size, 1, 3, 2, 3)
开发者ID:DigGe,项目名称:ubuntu-tweak,代码行数:25,代码来源:preferences.py
示例4: setup_other_features
def setup_other_features(self):
vbox = self.worker.get_object('vbox5')
button = WidgetFactory.create('GconfCheckButton',
label=_('Check for Updates'),
key='check_update',
default=False)
vbox.pack_start(button, False, False, 0)
button = WidgetFactory.create('GconfCheckButton',
label=_('Use Separated Sources'),
key='separated_sources',
default=True)
vbox.pack_start(button, False, False, 0)
button = WidgetFactory.create('GconfCheckButton',
label=_('Enable Synchronous notifications'),
key='sync_notify',
default=True)
vbox.pack_start(button, False, False, 0)
button = WidgetFactory.create('GconfCheckButton',
label=_('Highlight new items in App and Source Center'),
key='enable_new_item',
default=True)
vbox.pack_start(button, False, False, 0)
if os.getenv('LANG').startswith('zh_CN'):
button = WidgetFactory.create('GconfCheckButton',
label='使用PPA镜像(如果可用)',
key='use_mirror_ppa',
default=False)
vbox.pack_start(button, False, False, 0)
vbox.show_all()
开发者ID:priteshdesai,项目名称:ubuntu-tweak,代码行数:35,代码来源:preferences.py
示例5: __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
示例6: __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
示例7: __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'), _('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.add_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.add_start(box, False, False, 0)
开发者ID:DigGe,项目名称:ubuntu-tweak,代码行数:57,代码来源:metacity.py
示例8: __init__
def __init__(self):
TweakModule.__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.add_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.add_start(box, False, False, 0)
开发者ID:DigGe,项目名称:ubuntu-tweak,代码行数:56,代码来源:powermanager.py
示例9: __init__
def __init__(self):
TweakModule.__init__(self)
data = {
'changed': self.on_entry_changed,
}
label1, entry1, reset1 = WidgetFactory.create('GconfEntry',
label=_('File Manager'),
key='/desktop/gnome/session/required_components/filemanager',
enable_reset=True,
signal_dict=data,
)
label2, entry2, reset2 = WidgetFactory.create('GconfEntry',
label=_('Panel'),
enable_reset=True,
signal_dict=data,
key='/desktop/gnome/session/required_components/panel')
label3, entry3, reset3 = WidgetFactory.create('GconfEntry',
label=_('Window Manager'),
enable_reset=True,
signal_dict=data,
key='/desktop/gnome/session/required_components/windowmanager')
hbox1 = gtk.HBox(False, 12)
self.apply_button = gtk.Button(stock=gtk.STOCK_APPLY)
self.apply_button.changed_table = {}
self.apply_button.set_sensitive(False)
self.apply_button.connect('clicked', self.on_apply_clicked, (entry1, entry2, entry3))
hbox1.pack_end(self.apply_button, False, False, 0)
table = TablePack(_('Session Control'), (
(label1, entry1, reset1),
(label2, entry2, reset2),
(label3, entry3, reset3),
hbox1,
))
self.add_start(table, False, False, 0)
box = ListPack(_("Session Options"), (
WidgetFactory.create("GconfCheckButton",
label=_("Automatically save open applications when logging out"),
enable_reset=True,
key="auto_save_session"),
WidgetFactory.create("GconfCheckButton",
label=_("Suppress the logout, restart and shutdown confirmation dialogue box."),
enable_reset=True,
key="/apps/indicator-session/suppress_logout_restart_shutdown"),
))
self.add_start(box, False, False, 0)
开发者ID:jonolumb,项目名称:ubuntu-tweak,代码行数:51,代码来源:session.py
示例10: __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
示例11: __init__
def __init__(self):
TweakModule.__init__(self, "loginsettings.ui")
log.debug('Start to build "Session Options"')
self.options_box = ListPack(
_("Login Options"),
(
WidgetFactory.create(
"UserGconfCheckButton",
user="gdm",
label=_("Disable user list in gdm"),
key="/apps/gdm/simple-greeter/disable_user_list",
),
WidgetFactory.create(
"UserGconfCheckButton",
user="gdm",
label=_("Play sound at login"),
key="/desktop/gnome/sound/event_sounds",
),
WidgetFactory.create(
"UserGconfCheckButton",
user="gdm",
label=_("Disable showing the restart buttons"),
key="/apps/gdm/simple-greeter/disable_restart_buttons",
),
),
)
for item in self.options_box.items:
log.debug("Set widget %s to sensitive False", item)
item.set_sensitive(False)
log.debug('Build "Session Options" finished')
self.add_start(self.options_box, False, False, 0)
self.icon_setting = UserGconfSetting("/apps/gdm/simple-greeter/logo_icon_name")
self.icon_theme_setting = UserGconfSetting("/desktop/gnome/interface/icon_theme")
self.__setup_logo_image()
self.__setup_background_image()
self.vbox1.unparent()
self.vbox1.set_sensitive(False)
box = ListPack(_("Login Theme"), (self.vbox1))
self.add_start(box, False, False, 0)
hbox = gtk.HBox(False, 12)
polkit_button = PolkitButton()
polkit_button.connect("changed", self.on_polkit_action)
hbox.pack_end(polkit_button, False, False, 0)
self.add_start(hbox, False, False, 0)
开发者ID:oldturkeybuzzard,项目名称:ubuntu-tweak,代码行数:49,代码来源:loginsettings.py
示例12: session_control_box
def session_control_box(self):
button = WidgetFactory.create(
"GconfCheckButton",
label=_("Automatically save open applications when logging out"),
key="auto_save_session",
)
button2 = WidgetFactory.create("GconfCheckButton", label=_("Show logout prompt"), key="logout_prompt")
button3 = WidgetFactory.create(
"GconfCheckButton", label=_("Allow TCP Connections (Remote Desktop Connect)"), key="allow_tcp_connections"
)
button4 = WidgetFactory.create(
"GconfCheckButton",
label=_("Suppress the dialog to confirm logout, restart and shutdown action"),
key="/apps/indicator-session/suppress_logout_restart_shutdown",
)
box = ListPack(_("Session Control"), (button, button2, button3, button4))
return box
开发者ID:DigGe,项目名称:ubuntu-tweak,代码行数:18,代码来源:session.py
示例13: __init__
def __init__(self):
TweakModule.__init__(self)
box = ListPack(_("System Security options"), (
WidgetFactory.create("GconfCheckButton",
label=_("Disable \"Run Application\" dialog (Alt+F2)"),
key="disable_command_line",
enable_reset=True),
WidgetFactory.create("GconfCheckButton",
label=_('Disable "Lock Screen"'),
key="disable_lock_screen",
enable_reset=True),
WidgetFactory.create("GconfCheckButton",
label=_("Disable printing"),
key="disable_printing",
enable_reset=True),
WidgetFactory.create("GconfCheckButton",
label=_("Disable printer settings"),
key="disable_print_setup",
enable_reset=True),
WidgetFactory.create("GconfCheckButton",
label=_("Disable save to disk"),
key="disable_save_to_disk",
enable_reset=True),
WidgetFactory.create("GconfCheckButton",
label=_('Disable "Fast User Switching"'),
key="disable_user_switching",
enable_reset=True),
), padding=2)
self.add_start(box, False, False, 0)
self.fix_theme_button = gtk.CheckButton(_('Fix the appearance of themes when granted root privileges'))
if proxy.is_exists(ROOT_THEMES) and proxy.is_exists(ROOT_ICONS):
self.fix_theme_button.set_active(True)
self.fix_theme_button.connect('toggled', self.on_fix_theme_btn_taggled)
self.fix_theme_button.set_sensitive(False)
box = ListPack(_('Miscellaneous Options'), (self.fix_theme_button,))
self.add_start(box, False, False, 0)
# button
hbox = gtk.HBox(False, 0)
self.pack_end(hbox, False ,False, 5)
un_lock = PolkitButton()
un_lock.connect('changed', self.on_polkit_action)
hbox.pack_end(un_lock, False, False, 5)
开发者ID:jonolumb,项目名称:ubuntu-tweak,代码行数:48,代码来源:lockdown.py
示例14: __init__
def __init__(self):
TweakModule.__init__(self, 'metacity.ui')
swindow = gtk.ScrolledWindow()
swindow.set_size_request(-1, 54)
swindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
self.buttonview = ButtonView()
swindow.add(self.buttonview)
self.vbox2.pack_start(swindow, False, False, 0)
for value, label in ButtonView.get_control_items():
button = WindowControlButton(label, value, self.buttonview)
self.control_hbox.pack_start(button, False, False, 0)
box = ListPack(_('Window Titlebar Button Layout'), [child for child in self.main_vbox.get_children()])
self.add_start(box, False, False, 0)
self.init_control_buttons()
table = TablePack(_('Window Titlebar Actions'), (
WidgetFactory.create('GconfComboBox',
label=_('Titlebar mouse wheel action'),
key='mouse_wheel_action',
enable_reset=True,
texts=[_('None'), _('Roll up')],
values=['none', 'shade']),
WidgetFactory.create('GconfComboBox',
label=_('Titlebar double-click action'),
key='action_double_click_titlebar',
enable_reset=True,
texts=[_('None'), _('Maximize'), \
_('Maximize Horizontally'), \
_('Maximize Vertically'), \
_('Minimize'), _('Roll up'), \
_('Lower'), _('Menu')],
values=['none', 'toggle_maximize', \
'toggle_maximize_horizontally', \
'toggle_maximize_vertically', \
'minimize', 'toggle_shade', \
'lower', 'menu']),
WidgetFactory.create('GconfComboBox',
label=_('Titlebar middle-click action'),
key='action_middle_click_titlebar',
enable_reset=True,
texts=[_('None'), _('Maximize'), \
_('Maximize Horizontally'), \
_('Maximize Vertically'), \
_('Minimize'), _('Roll up'), \
_('Lower'), _('Menu')],
values=['none', 'toggle_maximize', \
'toggle_maximize_horizontally', \
'toggle_maximize_vertically', \
'minimize', 'toggle_shade', \
'lower', 'menu']),
WidgetFactory.create('GconfComboBox',
label=_('Titlebar right-click action'),
key='action_right_click_titlebar',
enable_reset=True,
texts=[_('None'), _('Maximize'), \
_('Maximize Horizontally'), \
_('Maximize Vertically'), \
_('Minimize'), _('Roll up'), \
_('Lower'), _('Menu')],
values=['none', 'toggle_maximize', \
'toggle_maximize_horizontally', \
'toggle_maximize_vertically', \
'minimize', 'toggle_shade', \
'lower', 'menu']),
))
self.add_start(table, False, False, 0)
box = TablePack(_('Window Decoration Effects'), (
WidgetFactory.create('GconfCheckButton',
label=_('Use Metacity window theme'),
enable_reset=True,
key='use_metacity_theme'),
WidgetFactory.create('GconfCheckButton',
label=_('Enable active window transparency'),
enable_reset=True,
key='metacity_theme_active_shade_opacity'),
WidgetFactory.create('GconfScale',
label=_('Active window transparency level'),
key='metacity_theme_active_opacity',
enable_reset=True,
min=0, max=1, digits=2),
WidgetFactory.create('GconfCheckButton',
label=_('Enable inactive window transparency'),
enable_reset=True,
key='metacity_theme_shade_opacity'),
WidgetFactory.create('GconfScale',
label=_('Inactive window shade transparency level'),
key='metacity_theme_opacity',
enable_reset=True,
min=0, max=1, digits=2),
))
self.add_start(box, False, False, 0)
button = WidgetFactory.create('GconfCheckButton',
label=_("Enable Metacity's compositing feature"),
enable_reset=True,
#.........这里部分代码省略.........
开发者ID:jonolumb,项目名称:ubuntu-tweak,代码行数:101,代码来源:metacity.py
示例15: __init__
def __init__(self):
TweakModule.__init__(self)
self.__setting = TweakSettings()
changeicon_hbox = self.create_change_icon_hbox()
box = TablePack(_("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"),
WidgetFactory.create('GconfComboBox',
label=_('Me Menu Setting'),
key='/system/indicator/me/display',
texts=[_("Don't Display"), _('Display user name'), _('Display real name')],
values=[0, 1, 2],
type='int')
))
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)
current_terminal_profile_key = GconfSetting('/apps/gnome-terminal/global/default_profile')
current_terminal_profile = current_terminal_profile_key.get_value()
default_show_menubar_key = '/apps/gnome-terminal/profiles/%s/default_show_menubar' % current_terminal_profile
box = ListPack(_("Terminal"), (
WidgetFactory.create("GconfCheckButton",
label=_("Display menubar when Terminal starts up (for current profile)"),
enable_reset=True,
key=default_show_menubar_key),
))
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:Adriarson,项目名称:ubuntu-tweak,代码行数:76,代码来源:gnomesettings.py
示例16: __init__
def __init__(self):
TweakModule.__init__(self)
label = gtk.Label(_('Arrange the buttons on the titlebar by dragging and dropping'))
label.set_alignment(0, 0.5)
swindow = gtk.ScrolledWindow()
swindow.set_size_request(-1, 54)
swindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
buttonview1 = ButtonView()
swindow.add(buttonview1)
hbox = gtk.HBox(False, 12)
button1 = gtk.Button(stock=gtk.STOCK_REDO)
hbox.pack_end(button1, False, False, 0)
button2 = gtk.Button()
if buttonview1.has_spacer():
button2.set_label(self.REMOVE_SPACER)
else:
button2.set_label(self.ADD_SPACER)
button2.connect('clicked', self.on_spacer_clicked, buttonview1)
button1.connect('clicked', self.on_redo_clicked, (button2, buttonview1))
hbox.pack_end(button2, False, False, 0)
box = ListPack(_('Window Titlebar Button Layout'), (label,
swindow,
|
请发表评论