[Commits] example-extension.c 1.3 1.4
miras at claws-mail.org
miras at claws-mail.org
Wed Dec 14 09:27:05 CET 2011
Update of /home/claws-mail/contacts/extensions/example/src
In directory claws-mail:/tmp/cvs-serv28932/extensions/example/src
Modified Files:
example-extension.c
Log Message:
2011-12-14 [mir] 0.6.0cvs47
* extensions/example/src/example-extension.c
* src/callbacks.c
* src/extension-loader.c
* src/extension-loader.h
Added feature that enables to insert new
items into submenus in the context menu.
See example-extension.c for details.
Index: example-extension.c
===================================================================
RCS file: /home/claws-mail/contacts/extensions/example/src/example-extension.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- example-extension.c 13 Dec 2011 10:41:48 -0000 1.3
+++ example-extension.c 14 Dec 2011 08:27:03 -0000 1.4
@@ -74,6 +74,18 @@
menu_item->submenu = FALSE;
add_menu_item(GTK_IMAGE_MENU_ITEM(menu), menu_item);
+ // Add a menu item into the context menu of address book
+ // Will create another submenu since ldifimport also has
+ // a menu item under '_Import'
+ menu = gtk_image_menu_item_new_with_mnemonic("_Test");
+ g_signal_connect(menu, "activate",
+ G_CALLBACK(my_cb), (gpointer) mainwindow);
+ menu_item = menu_item_new();
+ menu_item->menu = CONTACTS_ADDRESSBOOK_MENU;
+ menu_item->sublabel = "_Import";
+ menu_item->submenu = TRUE;
+ add_menu_item(GTK_IMAGE_MENU_ITEM(menu), menu_item);
+
// Add a menu item into the menu bar
menu = gtk_image_menu_item_new_with_mnemonic("_Zest2");
g_signal_connect(menu, "activate",
More information about the Commits
mailing list