[Commits] mainwindow.c 1.274.2.364 1.274.2.365

claws at claws-mail.org claws at claws-mail.org
Mon Feb 11 13:28:15 CET 2013


Update of /home/claws-mail/claws/src
In directory srv:/tmp/cvs-serv21854/src

Modified Files:
      Tag: gtk2
	mainwindow.c 
Log Message:
2013-02-11 [paul]	3.9.0cvs61

	* src/mainwindow.c
		use the Delete key to remove colour label accels (same as everywhere else).
		complete the change to gtk_accel_map_add_entry() for older/newer GTKs 

Index: mainwindow.c
===================================================================
RCS file: /home/claws-mail/claws/src/mainwindow.c,v
retrieving revision 1.274.2.364
retrieving revision 1.274.2.365
diff -u -d -r1.274.2.364 -r1.274.2.365
--- mainwindow.c	12 Dec 2012 16:40:53 -0000	1.274.2.364
+++ mainwindow.c	11 Feb 2013 12:28:13 -0000	1.274.2.365
@@ -1,6 +1,6 @@
 /*
    Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
-   Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
+   Copyright (C) 1999-2013 Hiroyuki Yamamoto and the Claws Mail team
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -1135,7 +1135,7 @@
 			GtkLabel *label = g_object_get_data(G_OBJECT(item), "accel_label");
 			gchar *new_accel;
 			
-			if (keyval == GDK_KEY_BackSpace) {
+			if (keyval == GDK_KEY_Delete) {
 				const gchar *accel_path;
 				accel_path = gtk_menu_item_get_accel_path(item);
 				keyval = 0; modifier = 0;
@@ -1182,8 +1182,11 @@
 	accel_path = g_strdup_printf("<ClawsColorLabels>/None");
 	gtk_menu_item_set_accel_path(GTK_MENU_ITEM(item), accel_path);
 	g_free(accel_path);
+#if !GTK_CHECK_VERSION(2, 24, 0)
+	gtk_accel_map_add_entry("<ClawsColorLabels>/None", GDK_0, GDK_CONTROL_MASK);
+#else
 	gtk_accel_map_add_entry("<ClawsColorLabels>/None", GDK_KEY_0, GDK_CONTROL_MASK);
-
+#endif
 	item = gtk_menu_item_new();
 	gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
 	gtk_widget_show(item);
@@ -1201,9 +1204,13 @@
 		gtk_widget_show(item);
 		accel_path = g_strdup_printf("<ClawsColorLabels>/%d", i+1);
 		gtk_menu_item_set_accel_path(GTK_MENU_ITEM(item), accel_path);
+		g_free(accel_path);
 		if (i < 9)
+#if !GTK_CHECK_VERSION(2, 24, 0)
+			gtk_accel_map_add_entry(accel_path, GDK_1+i, GDK_CONTROL_MASK);
+#else
 			gtk_accel_map_add_entry(accel_path, GDK_KEY_1+i, GDK_CONTROL_MASK);
-		g_free(accel_path);
+#endif
 		g_signal_connect (gtk_ui_manager_get_accel_group(mainwin->ui_manager), 
 			"accel-changed", G_CALLBACK (mainwin_accel_changed_cb), item);
 
@@ -1307,8 +1314,11 @@
 	accel_path = g_strdup_printf("<ClawsTags>/ApplyTags");
 	gtk_menu_item_set_accel_path(GTK_MENU_ITEM(item), accel_path);
 	g_free(accel_path);
+#if !GTK_CHECK_VERSION(2, 24, 0)
+	gtk_accel_map_add_entry("<ClawsTags>/ApplyTags", GDK_T, GDK_CONTROL_MASK|GDK_SHIFT_MASK);
+#else
 	gtk_accel_map_add_entry("<ClawsTags>/ApplyTags", GDK_KEY_T, GDK_CONTROL_MASK|GDK_SHIFT_MASK);
-
+#endif
 	g_slist_free(orig);
 	gtk_widget_show(menu);
 	gtk_menu_item_set_submenu(GTK_MENU_ITEM(label_menuitem), menu);



More information about the Commits mailing list