summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2009-03-11 14:18:11 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2009-03-11 14:18:11 +0800
commita8f1c7d06886f282ceeb2637a843935287eaa46e (patch)
tree212a134e075dc18e5d40a623cc91ba270151f71d
parentcd8f83a89ae5f80a60fe344a56ef82206dc45725 (diff)
downloadibus-a8f1c7d06886f282ceeb2637a843935287eaa46e.tar.gz
ibus-a8f1c7d06886f282ceeb2637a843935287eaa46e.tar.xz
ibus-a8f1c7d06886f282ceeb2637a843935287eaa46e.zip
Change sensitive of custom font label.
-rw-r--r--setup/main.py5
-rw-r--r--setup/setup.glade94
2 files changed, 52 insertions, 47 deletions
diff --git a/setup/main.py b/setup/main.py
index c67cbd9..42c3233 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -141,10 +141,13 @@ class Setup(object):
self.__config.get_value("panel", "use_custom_font", False))
self.__checkbutton_custom_font.connect("toggled", self.__checkbutton_custom_font_toggled_cb)
+ self.__label_custom_font = self.__xml.get_widget("label_custom_font")
self.__fontbutton_custom_font = self.__xml.get_widget("fontbutton_custom_font")
if self.__config.get_value("panel", "use_custom_font", False):
+ self.__label_custom_font.set_sensitive(True)
self.__fontbutton_custom_font.set_sensitive(True)
else:
+ self.__label_custom_font.set_sensitive(False)
self.__fontbutton_custom_font.set_sensitive(False)
font_name = gtk.settings_get_default().get_property("gtk-font-name")
font_name = unicode(font_name, "utf-8")
@@ -339,9 +342,11 @@ class Setup(object):
def __checkbutton_custom_font_toggled_cb(self, button):
if self.__checkbutton_custom_font.get_active():
+ self.__label_custom_font.set_sensitive(True)
self.__fontbutton_custom_font.set_sensitive(True)
self.__config.set_value("panel", "use_custom_font", True)
else:
+ self.__label_custom_font.set_sensitive(False)
self.__fontbutton_custom_font.set_sensitive(False)
self.__config.set_value("panel", "use_custom_font", False)
diff --git a/setup/setup.glade b/setup/setup.glade
index 694240b..a50efd1 100644
--- a/setup/setup.glade
+++ b/setup/setup.glade
@@ -45,21 +45,57 @@
<property name="column_spacing">12</property>
<property name="row_spacing">6</property>
<child>
- <widget class="GtkHBox" id="hbox6">
+ <widget class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Enable or disable:</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Next input method:</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">previous input method:</property>
+ </widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox4">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkEntry" id="entry_prev_engine">
+ <widget class="GtkEntry" id="entry_trigger">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
</widget>
</child>
<child>
- <widget class="GtkButton" id="button_prev_engine">
+ <widget class="GtkButton" id="button_trigger">
<property name="visible">True</property>
- <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">...</property>
<property name="use_underline">True</property>
@@ -74,8 +110,6 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
</packing>
</child>
<child>
@@ -111,19 +145,21 @@
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox4">
+ <widget class="GtkHBox" id="hbox6">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkEntry" id="entry_trigger">
+ <widget class="GtkEntry" id="entry_prev_engine">
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
</widget>
</child>
<child>
- <widget class="GtkButton" id="button_trigger">
+ <widget class="GtkButton" id="button_prev_engine">
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">...</property>
<property name="use_underline">True</property>
@@ -138,44 +174,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">previous input method:</property>
- </widget>
- <packing>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Next input method:</property>
- </widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Enable or disable:</property>
- </widget>
- <packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
</packing>
</child>
</widget>
@@ -286,7 +286,7 @@ Always</property>
<widget class="GtkHBox" id="hbox7">
<property name="visible">True</property>
<child>
- <widget class="GtkLabel" id="label11">
+ <widget class="GtkLabel" id="label_custom_font">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Custom font:</property>