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:
parent
9a75f91137
commit
6d19d88068
3 changed files with 29 additions and 114 deletions
|
@ -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.
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +115,7 @@ accessibility_button_clicked (GtkWidget *widget,
|
||||||
{
|
{
|
||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
if (!g_spawn_command_line_async ("gnome-accessibility-keyboard-properties", &err))
|
if (!g_spawn_command_line_async ("gnome-accessibility-keyboard-properties", &err))
|
||||||
capplet_error_dialog (GTK_WINDOW (gtk_widget_get_toplevel (widget)),
|
capplet_error_dialog (GTK_WINDOW (gtk_widget_get_toplevel (widget)),
|
||||||
_("There was an error launching the keyboard tool: %s"),
|
_("There was an error launching the keyboard tool: %s"),
|
||||||
err);
|
err);
|
||||||
}
|
}
|
||||||
|
@ -133,7 +143,7 @@ setup_dialog (GladeXML *dialog,
|
||||||
|
|
||||||
/* load all the images */
|
/* load all the images */
|
||||||
capplet_init_stock_icons ();
|
capplet_init_stock_icons ();
|
||||||
|
|
||||||
peditor = gconf_peditor_new_boolean
|
peditor = gconf_peditor_new_boolean
|
||||||
(changeset, "/desktop/gnome/peripherals/keyboard/repeat", WID ("repeat_toggle"), NULL);
|
(changeset, "/desktop/gnome/peripherals/keyboard/repeat", WID ("repeat_toggle"), NULL);
|
||||||
gconf_peditor_widget_set_guard (GCONF_PROPERTY_EDITOR (peditor), WID ("repeat_table"));
|
gconf_peditor_widget_set_guard (GCONF_PROPERTY_EDITOR (peditor), WID ("repeat_table"));
|
||||||
|
@ -166,9 +176,9 @@ setup_dialog (GladeXML *dialog,
|
||||||
gconf_peditor_new_boolean
|
gconf_peditor_new_boolean
|
||||||
(changeset, "/desktop/gnome/typing_break/allow_postpone", WID ("break_postponement_toggle"), NULL);
|
(changeset, "/desktop/gnome/typing_break/allow_postpone", WID ("break_postponement_toggle"), NULL);
|
||||||
g_signal_connect (G_OBJECT (WID ("keyboard_dialog")), "response", (GCallback) dialog_response, changeset);
|
g_signal_connect (G_OBJECT (WID ("keyboard_dialog")), "response", (GCallback) dialog_response, changeset);
|
||||||
|
|
||||||
gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (WID ("break_enabled_toggle"))->child), TRUE);
|
gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (WID ("break_enabled_toggle"))->child), TRUE);
|
||||||
|
|
||||||
setup_xkb_tabs(dialog,changeset);
|
setup_xkb_tabs(dialog,changeset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,7 +216,7 @@ setup_accessibility (GladeXML *dialog, GConfChangeSet *changeset)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
GConfClient *client;
|
GConfClient *client;
|
||||||
GConfChangeSet *changeset;
|
GConfChangeSet *changeset;
|
||||||
|
@ -242,7 +252,7 @@ main (int argc, char **argv)
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
activate_settings_daemon ();
|
activate_settings_daemon ();
|
||||||
|
|
||||||
client = gconf_client_get_default ();
|
client = gconf_client_get_default ();
|
||||||
gconf_client_add_dir (client, "/desktop/gnome/peripherals/keyboard", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
|
gconf_client_add_dir (client, "/desktop/gnome/peripherals/keyboard", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
|
||||||
gconf_client_add_dir (client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
|
gconf_client_add_dir (client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
|
||||||
|
|
|
@ -519,41 +519,8 @@
|
||||||
<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="use_underline">True</property>
|
||||||
<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>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
@ -640,42 +607,8 @@
|
||||||
<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="use_underline">True</property>
|
||||||
<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>
|
|
||||||
</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>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
|
@ -961,46 +894,12 @@
|
||||||
</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"/>
|
<property name="label" translatable="yes">_Accessibility...</property>
|
||||||
<child>
|
<property name="use_underline">True</property>
|
||||||
<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="use_underline">True</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue