turns out we can override the XSetting.. do so.

2003-04-01  Manish Singh  <yosh@gimp.org>

        * app/gui/menus.c: turns out we can override the XSetting.. do so.

        * app/gui/preferences_dialog.c: Remove GNOME2 warning, it should work
        fine now.
This commit is contained in:
Manish Singh 2003-04-02 00:08:38 +00:00 committed by Manish Singh
parent fdb7265a7c
commit bab3855604
5 changed files with 29 additions and 26 deletions

View file

@ -1,3 +1,10 @@
2003-04-01 Manish Singh <yosh@gimp.org>
* app/gui/menus.c: turns out we can override the XSetting.. do so.
* app/gui/preferences_dialog.c: Remove GNOME2 warning, it should work
fine now.
2003-04-01 Michael Natterer <mitch@gimp.org>
* app/core/gimpviewable.h: #define GIMP_VIEWABLE_MAX_PREVIEW_SIZE
@ -77,14 +84,14 @@
2003-04-01 Manish Singh <yosh@gimp.org>
* config/gimpguiconfig.[ch]: added gboolean can_change_accels
* app/config/gimpguiconfig.[ch]: added gboolean can_change_accels
* config/gimprc-blurbs.h: blurb for the above
* app/config/gimprc-blurbs.h: blurb for the above
* gui/preferences-dialog.c: UI for the above. Has warning about
* app/gui/preferences-dialog.c: UI for the above. Has warning about
not working in GNOME2 yet (pending resolution of Bug #109653)
* gui/menus.c: use can_change_accels. It simply parses the rc
* app/gui/menus.c: use can_change_accels. It simply parses the rc
string gtk-can-change-accels = [0|1] depending on the state
of can_change_accels in the gui config.

View file

@ -1125,7 +1125,7 @@ prefs_dialog_new (Gimp *gimp,
GTK_BOX (vbox2));
prefs_check_button_add (config, "can-change-accels",
_("Dynamic _Keyboard Shortcuts (does not work in GNOME2 yet)"),
_("Dynamic _Keyboard Shortcuts"),
GTK_BOX (vbox2));
/* Window Positions */

View file

@ -97,11 +97,14 @@ menus_init (Gimp *gimp)
menus_initialized = TRUE;
g_signal_connect (gimp->config, "notify::can-change-accels",
G_CALLBACK (menu_can_change_accels), NULL);
/* We need to make sure the property is installed before using it */
g_type_class_ref (GTK_TYPE_MENU);
menu_can_change_accels (GIMP_GUI_CONFIG (gimp->config));
g_signal_connect (gimp->config, "notify::can-change-accels",
G_CALLBACK (menu_can_change_accels), NULL);
global_menu_factory = gimp_menu_factory_new (gimp);
gimp_menu_factory_menu_register (global_menu_factory,
@ -437,12 +440,7 @@ menus_last_opened_reorder (GimpContainer *container,
static void
menu_can_change_accels (GimpGuiConfig *config)
{
gchar *rc_string;
rc_string = g_strdup_printf ("gtk-can-change-accels = %s",
config->can_change_accels ? "1" : "0");
gtk_rc_parse_string (rc_string);
g_free (rc_string);
g_object_set (gtk_settings_get_default (),
"gtk-can-change-accels", config->can_change_accels,
NULL);
}

View file

@ -1125,7 +1125,7 @@ prefs_dialog_new (Gimp *gimp,
GTK_BOX (vbox2));
prefs_check_button_add (config, "can-change-accels",
_("Dynamic _Keyboard Shortcuts (does not work in GNOME2 yet)"),
_("Dynamic _Keyboard Shortcuts"),
GTK_BOX (vbox2));
/* Window Positions */

View file

@ -97,11 +97,14 @@ menus_init (Gimp *gimp)
menus_initialized = TRUE;
g_signal_connect (gimp->config, "notify::can-change-accels",
G_CALLBACK (menu_can_change_accels), NULL);
/* We need to make sure the property is installed before using it */
g_type_class_ref (GTK_TYPE_MENU);
menu_can_change_accels (GIMP_GUI_CONFIG (gimp->config));
g_signal_connect (gimp->config, "notify::can-change-accels",
G_CALLBACK (menu_can_change_accels), NULL);
global_menu_factory = gimp_menu_factory_new (gimp);
gimp_menu_factory_menu_register (global_menu_factory,
@ -437,12 +440,7 @@ menus_last_opened_reorder (GimpContainer *container,
static void
menu_can_change_accels (GimpGuiConfig *config)
{
gchar *rc_string;
rc_string = g_strdup_printf ("gtk-can-change-accels = %s",
config->can_change_accels ? "1" : "0");
gtk_rc_parse_string (rc_string);
g_free (rc_string);
g_object_set (gtk_settings_get_default (),
"gtk-can-change-accels", config->can_change_accels,
NULL);
}