[sylpheed:34757] [PATCH] Show Color label menu items as radio buttons, not checkboxes.

Antonio Ospite ospite at studenti.unina.it
Fri Aug 26 23:35:28 JST 2011


This makes sense because the options are mutually exclusive.
---

This is what I meant, but this is more a patch for illustrative purpose, I 
don't know if using a GtkRadioMenuItem is better.

Thanks,
   Antonio Ospite
   http://ao2.it

 src/colorlabel.c  |    1 +
 src/summaryview.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/colorlabel.c b/src/colorlabel.c
index aabde31..5a7fa4f 100644
--- a/src/colorlabel.c
+++ b/src/colorlabel.c
@@ -259,6 +259,7 @@ GtkWidget *colorlabel_create_check_color_menu_item(gint color_index)
 	G_RETURN_VAL_IF_INVALID_COLOR(color_index, NULL);
 
 	item = gtk_check_menu_item_new();
+	gtk_check_menu_item_set_draw_as_radio(GTK_CHECK_MENU_ITEM(item), TRUE);
 
 	colorlabel_recreate(color_index);
 
diff --git a/src/summaryview.c b/src/summaryview.c
index 768ad52..9a3e6a3 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -5267,6 +5267,7 @@ static void summary_colorlabel_menu_create(SummaryView *summaryview)
 	 * so we can always get back the SummaryView pointer. */
 
 	item = gtk_check_menu_item_new_with_label(_("None"));
+	gtk_check_menu_item_set_draw_as_radio(GTK_CHECK_MENU_ITEM(item), TRUE);
 	gtk_menu_append(GTK_MENU(menu), item);
 	g_signal_connect(G_OBJECT(item), "activate",
 			 G_CALLBACK(summary_colorlabel_menu_item_activate_cb),
-- 
1.7.5.4



More information about the Sylpheed mailing list