Revision: 642 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=642&view=rev Author: frlan Date: 2009-05-13 22:20:28 +0000 (Wed, 13 May 2009)
Log Message: ----------- GeanyVC: * Moved editor menu file actions to end of list * Added entry for commit to editor menu
Modified Paths: -------------- trunk/geanyvc/geanyvc.c
Modified: trunk/geanyvc/geanyvc.c =================================================================== --- trunk/geanyvc/geanyvc.c 2009-05-13 21:08:17 UTC (rev 641) +++ trunk/geanyvc/geanyvc.c 2009-05-13 22:20:28 UTC (rev 642) @@ -114,6 +114,7 @@ const gchar FILE_STATUS_UNKNOWN[] = "Unknown";
static GtkWidget *editor_menu_vc = NULL; +static GtkWidget *editor_menu_commit = NULL; static GtkWidget *menu_item_sep = NULL;
static void registrate(); @@ -2187,12 +2188,10 @@ gtk_container_add(GTK_CONTAINER(menu_vc_menu), menu_vc_file);
/* Add file menu also to editor menu (at mouse cursor) */ + menu_item_sep = gtk_separator_menu_item_new(); + gtk_container_add(GTK_CONTAINER(geany->main_widgets->editor_menu), menu_item_sep); do_current_file_menu(&editor_menu_vc, &tooltips, TRUE); gtk_container_add(GTK_CONTAINER(geany->main_widgets->editor_menu), editor_menu_vc); - gtk_menu_reorder_child(GTK_MENU(geany->main_widgets->editor_menu), editor_menu_vc, 0); - menu_item_sep = gtk_separator_menu_item_new(); - gtk_container_add(GTK_CONTAINER(geany->main_widgets->editor_menu), menu_item_sep); - gtk_menu_reorder_child(GTK_MENU(geany->main_widgets->editor_menu), menu_item_sep, 1);
/* Create the current directory Submenu */ do_current_dir_menu(&menu_vc_dir, &tooltips); @@ -2225,8 +2224,14 @@ gtk_container_add(GTK_CONTAINER(menu_vc_menu), menu_vc_commit); gtk_tooltips_set_tip(tooltips, menu_vc_commit, _("Commit changes."), NULL);
+ /* Add commit item zo editor menu */ + editor_menu_commit = gtk_menu_item_new_with_mnemonic(_("VC _Commit")); + gtk_container_add(GTK_CONTAINER(geany->main_widgets->editor_menu), editor_menu_commit); + g_signal_connect((gpointer) menu_vc_commit, "activate", G_CALLBACK(vccommit_activated), NULL); + g_signal_connect((gpointer) editor_menu_commit, "activate", + G_CALLBACK(vccommit_activated), NULL);
gtk_widget_show_all(menu_vc); @@ -2234,6 +2239,7 @@ gtk_widget_show_all(menu_vc_dir); gtk_widget_show_all(menu_vc_basedir); gtk_widget_show_all(editor_menu_vc); + gtk_widget_show_all(editor_menu_commit); gtk_widget_show_all(menu_item_sep);
/* initialize keybindings */ @@ -2251,6 +2257,7 @@ // remove the menu item added in init() gtk_widget_destroy(plugin_fields->menu_item); gtk_widget_destroy(editor_menu_vc); + gtk_widget_destroy(editor_menu_commit); gtk_widget_destroy(menu_item_sep); g_slist_free(VC); VC = NULL;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org