[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-65-g3ea1cef89

paul at claws-mail.org paul at claws-mail.org
Mon Aug 23 10:21:25 UTC 2021


The branch, gtk3 has been updated
       via  3ea1cef89597a30920886d46f9ee055501d4c217 (commit)
      from  d2f92699c5e2a2ad1b4fdc84b3de57e72e490e74 (commit)

Summary of changes:
 src/prefs_folder_item.c | 4 +---
 src/prefs_msg_colors.c  | 7 ++-----
 src/prefs_spelling.c    | 4 +---
 3 files changed, 4 insertions(+), 11 deletions(-)


- Log -----------------------------------------------------------------
commit 3ea1cef89597a30920886d46f9ee055501d4c217
Author: paul <paul at claws-mail.org>
Date:   Mon Aug 23 11:21:22 2021 +0100

    simplify colour saving

diff --git a/src/prefs_folder_item.c b/src/prefs_folder_item.c
index deda41f24..1e3da0e66 100644
--- a/src/prefs_folder_item.c
+++ b/src/prefs_folder_item.c
@@ -722,10 +722,8 @@ static void general_save_folder_prefs(FolderItem *folder, FolderItemGeneralPage
 
 	if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->folder_color_rec_checkbtn))) {
 		GdkRGBA old_color = prefs->color;
-		GdkRGBA rgbcolor;
 		gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(page->folder_color_btn),
-				   &rgbcolor);
-		prefs->color = rgbcolor;
+				   &prefs->color);
 	
 		/* update folder view */
 		if (!gdk_rgba_equal(&prefs->color, &old_color))
diff --git a/src/prefs_msg_colors.c b/src/prefs_msg_colors.c
index 47fa3e972..1b090e733 100644
--- a/src/prefs_msg_colors.c
+++ b/src/prefs_msg_colors.c
@@ -510,13 +510,11 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
 
 #define COLOR_OTHER_SAVE(colorid) \
 	gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(color_buttons.color[colorid]), \
-				   &rgbcolor); \
-	prefs_common.color[colorid] = rgbcolor; \
+				   &prefs_common.color[colorid])
 
 static void prefs_msg_colors_save(PrefsPage *_page)
 {
 	MsgColorsPage *page = (MsgColorsPage *) _page;
-	GdkRGBA rgbcolor;
 	gint c;
 
 	prefs_common.enable_color = 
@@ -532,8 +530,7 @@ static void prefs_msg_colors_save(PrefsPage *_page)
 		prefs_common.custom_colorlabel[c].label =
 			gtk_editable_get_chars(GTK_EDITABLE(page->entry_custom_colorlabel[c]), 0, -1);
 		gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(color_buttons.custom_color[c]),
-				   &rgbcolor);
-		prefs_common.custom_colorlabel[c].color = rgbcolor;
+				   &prefs_common.custom_colorlabel[c].color);
 	}
 	colorlabel_update_colortable_from_prefs();
 	COLOR_OTHER_SAVE(COL_QUOTE_LEVEL1);
diff --git a/src/prefs_spelling.c b/src/prefs_spelling.c
index e169925ac..ba3afb465 100644
--- a/src/prefs_spelling.c
+++ b/src/prefs_spelling.c
@@ -266,7 +266,6 @@ static void prefs_spelling_create_widget(PrefsPage *_page, GtkWindow *window, gp
 static void prefs_spelling_save(PrefsPage *_page)
 {
 	SpellingPage *spelling = (SpellingPage *) _page;
-	GdkRGBA rgbcolor;
 
 	prefs_common.enable_aspell =
 		gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(spelling->enable_aspell_checkbtn));
@@ -290,8 +289,7 @@ static void prefs_spelling_save(PrefsPage *_page)
 				GTK_COMBO_BOX(spelling->default_alt_dict_combo));
 
 	gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(spelling->misspelled_colorbtn),
-				   &rgbcolor);
-	prefs_common.color[COL_MISSPELLED] = rgbcolor;
+				   &prefs_common.color[COL_MISSPELLED]);
 }
 
 static void prefs_spelling_destroy_widget(PrefsPage *_page)

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list