set button images via code instead of relying on glade, so they respect

2007-05-05  Jens Granseuer  <jensgr@gmx.net>

	* gnome-keyboard-properties.c: (create_dialog):
	* gnome-keyboard-properties.glade: set button images via code instead
	of relying on glade, so they respect the gtk-button-images xsetting

svn path=/trunk/; revision=7558
This commit is contained in:
Jens Granseuer 2007-05-05 18:57:09 +00:00 committed by Jens Granseuer
parent 9a75f91137
commit 6d19d88068
3 changed files with 29 additions and 114 deletions

View file

@ -1,3 +1,9 @@
2007-05-05 Jens Granseuer <jensgr@gmx.net>
* gnome-keyboard-properties.c: (create_dialog):
* gnome-keyboard-properties.glade: set button images via code instead
of relying on glade, so they respect the gtk-button-images xsetting
2007-04-27 Rodrigo Moya <rodrigo@gnome-db.org> 2007-04-27 Rodrigo Moya <rodrigo@gnome-db.org>
* keyboard.desktop.in.in: renamed Bugzilla product. * keyboard.desktop.in.in: renamed Bugzilla product.

View file

@ -51,6 +51,7 @@ create_dialog (void)
{ {
GladeXML *dialog; GladeXML *dialog;
GtkSizeGroup *size_group; GtkSizeGroup *size_group;
GtkWidget *image;
dialog = glade_xml_new (GNOMECC_GLADE_DIR "/gnome-keyboard-properties.glade", "keyboard_dialog", NULL); dialog = glade_xml_new (GNOMECC_GLADE_DIR "/gnome-keyboard-properties.glade", "keyboard_dialog", NULL);
@ -72,6 +73,15 @@ create_dialog (void)
gtk_size_group_add_widget (size_group, WID ("cursor_blink_time_scale")); gtk_size_group_add_widget (size_group, WID ("cursor_blink_time_scale"));
g_object_unref (G_OBJECT (size_group)); g_object_unref (G_OBJECT (size_group));
image = gtk_image_new_from_stock (GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (WID ("accessibility_button")), image);
image = gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (WID ("xkb_layouts_add")), image);
image = gtk_image_new_from_stock (GTK_STOCK_REFRESH, GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (WID ("xkb_reset_to_defaults")), image);
return dialog; return dialog;
} }

View file

@ -519,29 +519,7 @@
<widget class="GtkButton" id="xkb_layouts_add"> <widget class="GtkButton" id="xkb_layouts_add">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<child> <property name="label" translatable="true">_Add...</property>
<widget class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<child>
<widget class="GtkHBox" id="hbox31">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label60">
<property name="visible">True</property>
<property name="label" translatable="yes">_Add...</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
</widget> </widget>
<packing> <packing>
@ -550,17 +528,6 @@
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child> <child>
<widget class="GtkButton" id="xkb_layouts_remove"> <widget class="GtkButton" id="xkb_layouts_remove">
<property name="visible">True</property> <property name="visible">True</property>
@ -640,29 +607,7 @@
<widget class="GtkButton" id="xkb_reset_to_defaults"> <widget class="GtkButton" id="xkb_reset_to_defaults">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<child> <property name="label" translatable="yes">Reset to De_faults</property>
<widget class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<child>
<widget class="GtkHBox" id="hbox29">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="stock">gtk-refresh</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label51">
<property name="visible">True</property>
<property name="label" translatable="yes">Reset To De_faults</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
</widget> </widget>
<packing> <packing>
@ -673,18 +618,6 @@
</packing> </packing>
</child> </child>
</widget> </widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">GTK_PACK_END</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="position">3</property> <property name="position">3</property>
@ -961,47 +894,13 @@
</widget> </widget>
</child> </child>
<child> <child>
<widget class="GtkButton" id="button3"> <widget class="GtkButton" id="accessibility_button">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="can_default">True</property> <property name="can_default">True</property>
<signal name="clicked" handler="accessibility_button_clicked"/>
<child>
<widget class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<child>
<widget class="GtkHBox" id="hbox7">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="stock">gtk-jump-to</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label19">
<property name="visible">True</property>
<property name="label" translatable="yes">_Accessibility...</property> <property name="label" translatable="yes">_Accessibility...</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
</widget> </widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
</widget>
<packing> <packing>
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>