[Commits] [SCM] claws branch, master, updated. 3.14.1-84-g30a1c08

wwp at claws-mail.org wwp at claws-mail.org
Tue Dec 27 18:04:29 CET 2016


The branch, master has been updated
       via  30a1c0875f4ac72c1609c7beb0497d20ef789f64 (commit)
      from  878b6d7a2037c66041f02f641270a02e1db7d1d3 (commit)

Summary of changes:
 src/prefs_toolbar.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit 30a1c0875f4ac72c1609c7beb0497d20ef789f64
Author: wwp <wwp at free.fr>
Date:   Tue Dec 27 18:02:55 2016 +0100

    Fix enum boundaries we check in func_selection_changed (when
    changing the internal function assigned to a toolbar item).
    Just a theoretical issue here apparently, or we would have had
    problems since ages.

diff --git a/src/prefs_toolbar.c b/src/prefs_toolbar.c
index 24efd93..b86835b 100644
--- a/src/prefs_toolbar.c
+++ b/src/prefs_toolbar.c
@@ -861,15 +861,18 @@ static void func_selection_changed(GtkComboBox *action_combo,
 			   prefs_toolbar->item_func_combo));
 
 	if(text != NULL) { /* action */
-		int action = -1;
+		int action;
+
 		action = toolbar_ret_val_from_descr(text);
-		if (action >= 0)
+		g_free(text);
+		if (action > -1) {
+			gint icon;
+
 			gtk_entry_set_text(GTK_ENTRY(prefs_toolbar->item_text_entry),
 					toolbar_get_short_text(action));
-		g_free(text);
-		if (action >= 0) {
-			StockPixmap stockp = toolbar_get_icon(action);
-			if (stockp >= 0)  {
+			icon = toolbar_get_icon(action);
+			if (icon > -1)  {
+				StockPixmap stockp = (StockPixmap)icon;
 				g_free(prefs_toolbar->item_icon_file);
 				prefs_toolbar->item_icon_file = g_strdup(stock_pixmap_get_name(stockp));
 

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list