[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-908-g06e82f903

paul at claws-mail.org paul at claws-mail.org
Sat Jan 18 11:18:41 CET 2020


The branch, gtk3 has been updated
       via  06e82f903fba443f93b036d059a45c237dccd53d (commit)
       via  88515bc4aaa8f0714d26b736301a3dd0d2e76301 (commit)
      from  1ad2c4624a2dd9e3c48b9d33a95eea94ff69be5a (commit)

Summary of changes:
 src/prefs_common.c |  2 --
 src/prefs_common.h |  1 -
 src/prefs_other.c  | 63 +++++++++++-------------------------------------------
 3 files changed, 13 insertions(+), 53 deletions(-)


- Log -----------------------------------------------------------------
commit 06e82f903fba443f93b036d059a45c237dccd53d
Author: paul <paul at claws-mail.org>
Date:   Sat Jan 18 10:18:35 2020 +0000

    replace deprecated gtk_settings_set_long_property() with g_object_set()

diff --git a/src/prefs_other.c b/src/prefs_other.c
index f9dcbaff7..a31797877 100644
--- a/src/prefs_other.c
+++ b/src/prefs_other.c
@@ -680,6 +680,7 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
 static void prefs_other_save(PrefsPage *_page)
 {
 	OtherPage *page = (OtherPage *) _page;
+	GtkSettings *settings = gtk_settings_get_default();
 	gboolean gtk_enable_accels;
 
 	prefs_common.add_address_by_click = gtk_toggle_button_get_active(
@@ -754,15 +755,12 @@ static void prefs_other_save(PrefsPage *_page)
 	if (prefs_common.gtk_enable_accels != gtk_enable_accels) {
 		prefs_common.gtk_enable_accels = gtk_enable_accels;
 
-		gtk_settings_set_long_property(gtk_settings_get_default(),
-				"gtk-enable-accels",
-				(glong)prefs_common.gtk_enable_accels,
-				"XProperty");
-		
-		gtk_settings_set_long_property(gtk_settings_get_default(),
-				"gtk-enable-mnemonics",
-				(glong)prefs_common.gtk_enable_accels,
-				"XProperty");
+		g_object_set(G_OBJECT(settings), "gtk-enable-accels",
+			     (glong)prefs_common.gtk_enable_accels,
+			     NULL);
+		g_object_set(G_OBJECT(settings), "gtk-enable-mnemonics",
+			     (glong)prefs_common.gtk_enable_accels,
+			     NULL);
 	}
 	
 	if (prefs_common.gtk_enable_accels != gtk_enable_accels) {		
@@ -781,6 +779,7 @@ OtherPage *prefs_other;
 void prefs_other_init(void)
 {
 	OtherPage *page;
+	GtkSettings *settings = gtk_settings_get_default();
 	static gchar *path[3];
 
 	path[0] = _("Other");
@@ -796,14 +795,12 @@ void prefs_other_init(void)
 	prefs_gtk_register_page((PrefsPage *) page);
 	prefs_other = page;
 
-	gtk_settings_set_long_property(gtk_settings_get_default(),
-			"gtk-enable-accels",
+	g_object_set(G_OBJECT(settings), "gtk-enable-accels",
 			(glong)prefs_common.gtk_enable_accels,
-			"XProperty");
-	gtk_settings_set_long_property(gtk_settings_get_default(),
-			"gtk-enable-mnemonics",
+			NULL);
+	g_object_set(G_OBJECT(settings), "gtk-enable-mnemonics",
 			(glong)prefs_common.gtk_enable_accels,
-			"XProperty");
+			NULL);
 }
 
 void prefs_other_done(void)

commit 88515bc4aaa8f0714d26b736301a3dd0d2e76301
Author: paul <paul at claws-mail.org>
Date:   Sat Jan 18 10:17:20 2020 +0000

    gtk-can-change-accels 'has been deprecated since version 3.10' and is ignored (does nothing). Yes, really!

diff --git a/src/prefs_common.c b/src/prefs_common.c
index ef6a60033..9e912e099 100644
--- a/src/prefs_common.c
+++ b/src/prefs_common.c
@@ -1015,8 +1015,6 @@ static PrefParam param[] = {
 	{"filtering_debug_log_length", "500", &prefs_common.filtering_debug_loglength, P_INT,
 	 NULL, NULL, NULL},
 
-	{"gtk_can_change_accels", "FALSE", &prefs_common.gtk_can_change_accels, P_BOOL,
-	 NULL, NULL, NULL},
 	{"gtk_enable_accels", "TRUE", &prefs_common.gtk_enable_accels, P_BOOL,
 	 NULL, NULL, NULL},
 
diff --git a/src/prefs_common.h b/src/prefs_common.h
index 0c1b6b1d5..694dc06c1 100644
--- a/src/prefs_common.h
+++ b/src/prefs_common.h
@@ -457,7 +457,6 @@ struct _PrefsCommon
 
 	gint io_timeout_secs;
 
-	gboolean gtk_can_change_accels;
 	gboolean gtk_enable_accels;
 	
 	/* Memory cache*/
diff --git a/src/prefs_other.c b/src/prefs_other.c
index 61f5c4ae6..f9dcbaff7 100644
--- a/src/prefs_other.c
+++ b/src/prefs_other.c
@@ -60,7 +60,6 @@ typedef struct _OtherPage
 	GtkWidget *checkbtn_warnqueued;
 	GtkWidget *spinbtn_iotimeout;
 	GtkWidget *checkbtn_gtk_enable_accels;
-	GtkWidget *checkbtn_gtk_can_change_accels;
 	GtkWidget *checkbtn_askonfilter;
 	GtkWidget *checkbtn_use_shred;
 	GtkWidget *checkbtn_real_time_sync;
@@ -457,7 +456,6 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
 	GtkWidget *frame_keys;
 	GtkWidget *vbox_keys;
 	GtkWidget *checkbtn_gtk_enable_accels;
-	GtkWidget *checkbtn_gtk_can_change_accels;
 	GtkWidget *button_keybind;
 
 	GtkWidget *label_iotimeout;
@@ -517,16 +515,6 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
 	PACK_CHECK_BUTTON(vbox_keys, checkbtn_gtk_enable_accels,
 			_("Enable keyboard shortcuts"));
 
-	PACK_CHECK_BUTTON(vbox_keys, checkbtn_gtk_can_change_accels,
-			_("Enable customisable keyboard shortcuts"));
-
-	CLAWS_SET_TIP(checkbtn_gtk_can_change_accels,
-			_("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 keyboard shortcuts."));
-
 	button_keybind = gtk_button_new_with_label(
 				_(" Choose preset keyboard shortcuts... "));
 	gtk_widget_show (button_keybind);
@@ -636,7 +624,6 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
 	g_signal_connect (G_OBJECT (button_change_passphrase), "clicked",
 			  G_CALLBACK (prefs_change_master_passphrase), NULL);
 #endif
-	SET_TOGGLE_SENSITIVITY(checkbtn_gtk_enable_accels, checkbtn_gtk_can_change_accels);
 	SET_TOGGLE_SENSITIVITY(checkbtn_gtk_enable_accels, button_keybind);
 
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_addaddrbyclick), 
@@ -651,8 +638,6 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
 		prefs_common.warn_queued_on_exit);
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_gtk_enable_accels),
 		prefs_common.gtk_enable_accels);
-	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_gtk_can_change_accels),
-		prefs_common.gtk_can_change_accels);
 
 	gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbtn_iotimeout),
 		prefs_common.io_timeout_secs);
@@ -681,7 +666,6 @@ static void prefs_other_create_widget(PrefsPage *_page, GtkWindow *window,
 	prefs_other->spinbtn_iotimeout = spinbtn_iotimeout;
 	prefs_other->checkbtn_transhdr = checkbtn_transhdr;
 	prefs_other->checkbtn_gtk_enable_accels = checkbtn_gtk_enable_accels;
-	prefs_other->checkbtn_gtk_can_change_accels = checkbtn_gtk_can_change_accels;
 	prefs_other->checkbtn_askonfilter = checkbtn_askonfilter;
 	prefs_other->checkbtn_use_shred = checkbtn_use_shred;
 	prefs_other->checkbtn_real_time_sync = checkbtn_real_time_sync;
@@ -697,7 +681,6 @@ static void prefs_other_save(PrefsPage *_page)
 {
 	OtherPage *page = (OtherPage *) _page;
 	gboolean gtk_enable_accels;
-	gboolean gtk_can_change_accels;
 
 	prefs_common.add_address_by_click = gtk_toggle_button_get_active(
 		GTK_TOGGLE_BUTTON(page->checkbtn_addaddrbyclick));
@@ -765,18 +748,6 @@ static void prefs_other_save(PrefsPage *_page)
 			GTK_TOGGLE_BUTTON(page->checkbtn_use_passphrase));
 #endif
 
-	gtk_can_change_accels = gtk_toggle_button_get_active(
-		GTK_TOGGLE_BUTTON(page->checkbtn_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_enable_accels = gtk_toggle_button_get_active(
 		GTK_TOGGLE_BUTTON(page->checkbtn_gtk_enable_accels));
 
@@ -794,8 +765,7 @@ static void prefs_other_save(PrefsPage *_page)
 				"XProperty");
 	}
 	
-	if (prefs_common.gtk_enable_accels != gtk_enable_accels ||
-	    prefs_common.gtk_can_change_accels != gtk_can_change_accels) {		
+	if (prefs_common.gtk_enable_accels != gtk_enable_accels) {		
 		/* 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);
@@ -826,10 +796,6 @@ void prefs_other_init(void)
 	prefs_gtk_register_page((PrefsPage *) page);
 	prefs_other = page;
 
-	gtk_settings_set_long_property(gtk_settings_get_default(),
-			"gtk-can-change-accels",
-			(glong)prefs_common.gtk_can_change_accels,
-			"XProperty");
 	gtk_settings_set_long_property(gtk_settings_get_default(),
 			"gtk-enable-accels",
 			(glong)prefs_common.gtk_enable_accels,

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list