2007-01-18 [fabien] 2.7.1cvs30
authorFabien Vantard <fzzzzz@gmail.com>
Thu, 18 Jan 2007 20:08:09 +0000 (20:08 +0000)
committerFabien Vantard <fzzzzz@gmail.com>
Thu, 18 Jan 2007 20:08:09 +0000 (20:08 +0000)
* src/prefs_other.c
ability to apply on the fly the recent added
'gtk_can_change_accels' pref (no need to restart).

ChangeLog
PATCHSETS
configure.ac
src/prefs_other.c

index 9b31ebb3e6f3ed3a281dcb44e18ad04e46834edf..85675bd639252da237f676f3f5cf6f119b526200 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-18 [fabien]    2.7.1cvs30
+
+       * src/prefs_other.c
+               ability to apply on the fly the recent added
+               'gtk_can_change_accels' pref (no need to restart).
+
 2007-01-18 [fabien]    2.7.1cvs29
 
        * src/plugins/bogofilter/bogofilter_gtk.c
index e04728745939b287aa0b27506d9a7d304a8e39b3..0e6bfcba2972cc0a46edd2901c89fd8939644298 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.60.2.76 -r 1.60.2.77 src/addressbook.c;  ) > 2.7.1cvs27.patchset
 ( cvs diff -u -r 1.5.2.11 -r 1.5.2.12 src/prefs_gtk.h;  cvs diff -u -r 1.382.2.352 -r 1.382.2.353 src/compose.c;  ) > 2.7.1cvs28.patchset
 ( cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/plugins/bogofilter/bogofilter_gtk.c;  cvs diff -u -r 1.1.2.23 -r 1.1.2.24 src/plugins/bogofilter/bogofilter.c;  cvs diff -u -r 1.23.2.34 -r 1.23.2.35 src/plugins/spamassassin/spamassassin_gtk.c;  cvs diff -u -r 1.27.2.27 -r 1.27.2.28 src/addr_compl.c;  cvs diff -u -r 1.105.2.81 -r 1.105.2.82 src/prefs_account.c;  ) > 2.7.1cvs29.patchset
+( cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/prefs_other.c;  ) > 2.7.1cvs30.patchset
index 84a3c9cb42fdf6b4329ed1941c172b2c0d44444f..8cf662a4ca69a98e01929357087628aeef13b20f 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=7
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=29
+EXTRA_VERSION=30
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index a5cb7645ce45050b591b6b89eec2747e7e1f8814..f9e6fc260248332027e96300e6ba28dbe2a90c10 100644 (file)
@@ -193,11 +193,10 @@ void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
        gtk_can_change_accels_tooltip = gtk_tooltips_new();
        gtk_tooltips_set_tip(GTK_TOOLTIPS(gtk_can_change_accels_tooltip),
                        chkbtn_gtk_can_change_accels,
-                       _("Please restart claws-mail to apply the change !\n"
-                               "If checked, you can change shortcuts of most "
-                               "of menu items by pressing a key combination over "
-                               "them (the shortcut is automatically set).\n"
-                               "You can uncheck this if you want to lock all "
+                       _("If checked, you can change the keyboard shortcuts of "
+                               "most of the menu items by focusing on the menu "
+                               "item and pressing a key combination.\n"
+                               "Uncheck this option if you want to lock all "
                                "existing menu shortcuts."),
                        NULL);
 
@@ -241,6 +240,7 @@ void prefs_other_save(PrefsPage *_page)
 {
        OtherPage *page = (OtherPage *) _page;
        MainWindow *mainwindow;
+       gboolean gtk_can_change_accels;
 
        prefs_common.add_address_by_click = gtk_toggle_button_get_active(
                GTK_TOGGLE_BUTTON(page->checkbtn_addaddrbyclick));
@@ -264,12 +264,27 @@ void prefs_other_save(PrefsPage *_page)
 #endif
        prefs_common.never_send_retrcpt = gtk_toggle_button_get_active(
                GTK_TOGGLE_BUTTON(page->chkbtn_never_send_retrcpt));
-       prefs_common.gtk_can_change_accels = gtk_toggle_button_get_active(
-               GTK_TOGGLE_BUTTON(page->chkbtn_gtk_can_change_accels));
+
        mainwindow = mainwindow_get_mainwindow();
        log_window_set_clipping(mainwindow->logwin, prefs_common.cliplog,
                                prefs_common.loglength);
 
+       gtk_can_change_accels = gtk_toggle_button_get_active(
+               GTK_TOGGLE_BUTTON(page->chkbtn_gtk_can_change_accels));
+
+       if (prefs_common.gtk_can_change_accels != gtk_can_change_accels) {
+
+               prefs_common.gtk_can_change_accels = gtk_can_change_accels;
+
+               gtk_settings_set_long_property(gtk_settings_get_default(),
+                               "gtk-can-change-accels",
+                               (glong)prefs_common.gtk_can_change_accels,
+                               "XProperty");
+
+               /* gtk_can_change_accels value changed : we have (only if changed)
+                * to apply the gtk property to all widgets : */
+               gtk_rc_reparse_all_for_settings(gtk_settings_get_default(), TRUE);
+       }
 }
 
 static void prefs_other_destroy_widget(PrefsPage *_page)