[anjuta] git: Reorganize the menu, again



commit 95ef5bed36a49f854b1b48a10d54b2459e33d55b
Author: James Liggett <jrliggett cox net>
Date:   Mon Aug 10 01:01:35 2009 -0700

    git: Reorganize the menu, again
    
    Almost everything, except for Initialize Repository, is placed in a submenu:
    	- Commit, Diff, Log, and Stash are under Changes
    	- Push, Pull, and Fetch are under Remote Repository
    	- Add, Remove, Ignore, Checkout, Unstage, and Reesolve are
    	  under Files
    	- Rebase has been moved to Branches
    	- Reset and Revert have their own submenu
    
    With these changes, we should be fully HIG compliant as far as the length of
    the menu is concerned (no more than 15 items) with some room to spare.

 plugins/git/anjuta-git.xml |   73 +++++++++++++---------
 plugins/git/plugin.c       |  146 +++++++++++++++++++++++++++-----------------
 2 files changed, 133 insertions(+), 86 deletions(-)
---
diff --git a/plugins/git/anjuta-git.xml b/plugins/git/anjuta-git.xml
index 497bc04..34c3b7f 100644
--- a/plugins/git/anjuta-git.xml
+++ b/plugins/git/anjuta-git.xml
@@ -4,34 +4,39 @@
 		<placeholder name="PlaceHolderVersionControlMenus">
 		<menu name="MenuGit" action="ActionMenuGit">
 			<placeholder name="PlaceholderGitMenus">
-				<menuitem name="Commit..." action="ActionGitCommit" />
-				<menuitem name="Fetch" action="ActionGitFetch" />
-				<placeholder name="PlaceholderRebaseMenu">
-					<menu name="Rebase" action="ActionMenuGitRebase">
-						<menuitem name="Start..." action="ActionGitRebaseStart" />
-						<separator name="rebase_separator1" />
-						<menuitem name="Continue" action="ActionGitRebaseContinue" />
-						<menuitem name="Skip" action="ActionGitRebaseSkip" />
-						<menuitem name="Abort" action="ActionGitRebaseAbort" />
+				<placeholder name="PlaceholderChangesMenu">
+					<menu name="Changes" action="ActionMenuGitChanges">
+						<menuitem name="Commit..." action="ActionGitCommit" />
+  						<menuitem name="Diff uncommitted changes" action="ActionGitDiffUncommitted" />
+  						<menuitem name="View log..." action="ActionGitLog" />
+  						<placeholder name="PlaceholderStashMenu">
+  							<menu name="Stash" action="ActionMenuGitStash">
+  								<menuitem name="Stash uncomitted changes..." action="ActionGitStashUncommitted" />
+  								<menuitem name="Apply stashed changes..." action="ActionGitApplyStash" />
+  							</menu>
+  						</placeholder>
 					</menu>
-  				</placeholder>
-  				<menuitem name="Push..." action="ActionGitPush" />
-  				<menuitem name="Pull..." action="ActionGitPull" />
-  				<menuitem name="Diff uncommitted changes" action="ActionGitDiffUncommitted" />
-  				<placeholder name="PlaceholderStashMenu">
-  					<menu name="Stash" action="ActionMenuGitStash">
-  						<menuitem name="Stash uncomitted changes..." action="ActionGitStashUncommitted" />
-  						<menuitem name="Apply stashed changes..." action="ActionGitApplyStash" />
+				</placeholder>
+  				<separator />
+  				<placeholder name="PlaceholderRemoteRepositoryMenu">
+  					<menu name="Remote repository" action="ActionMenuGitRemoteRepository">
+  						<menuitem name="Push..." action="ActionGitPush" />
+  						<menuitem name="Pull..." action="ActionGitPull" />
+  						<menuitem name="Fetch" action="ActionGitFetch" />
   					</menu>
   				</placeholder>
   				<separator />
-				<menuitem name="Add..." action="ActionGitAdd" />
-				<menuitem name="Remove..." action="ActionGitRemove" />
-				<menuitem name="Ignore..." action="ActionGitIgnore" />
-				<separator />
-				<menuitem name="Check out files..." action="ActionGitCheckoutFiles" />
-				<menuitem name="Unstage files..." action="ActionGitUnstageFiles" />
-				<menuitem name="Resolve conflicts..." action="ActionGitResolve" />
+  				<placeholder name="PlaceholderFilesMenu">
+  					<menu name="Files" action="ActionMenuGitFiles">
+						<menuitem name="Add..." action="ActionGitAdd" />
+						<menuitem name="Remove..." action="ActionGitRemove" />
+						<menuitem name="Ignore..." action="ActionGitIgnore" />
+						<separator />
+						<menuitem name="Check out files..." action="ActionGitCheckoutFiles" />
+						<menuitem name="Unstage files..." action="ActionGitUnstageFiles" />
+						<menuitem name="Resolve conflicts..." action="ActionGitResolve" />
+					</menu>
+				</placeholder>
 				<separator />
   				<placeholder name="PlaceholderPatchMenu">
   					<menu name="Patches" action="ActionMenuGitPatches">
@@ -54,6 +59,15 @@
 				  		<menuitem name="Delete branch..." action="ActionGitDeleteBranch" />
 				  		<menuitem name="Switch to another branch..." action="ActionGitSwitch" />
 				  		<menuitem name="Merge..." action="ActionGitMerge" />
+				  		<placeholder name="PlaceholderRebaseMenu">
+							<menu name="Rebase" action="ActionMenuGitRebase">
+								<menuitem name="Start..." action="ActionGitRebaseStart" />
+								<separator />
+								<menuitem name="Continue" action="ActionGitRebaseContinue" />
+								<menuitem name="Skip" action="ActionGitRebaseSkip" />
+								<menuitem name="Abort" action="ActionGitRebaseAbort" />
+							</menu>
+  						</placeholder>
 				  		<menuitem name="Cherry pick..." action="ActionGitCherryPick" />
 				  		<placeholder name="PlaceholderRemoteMenu">
 							<menu name="Remote branches" action="ActionMenuGitRemoteBranches">
@@ -63,7 +77,6 @@
 						</placeholder>
   		  			</menu>
 				</placeholder>
-				<separator />
 				<placeholder name="PlaceholderTags">
 					<menu name="TagsMenu" action="ActionMenuGitTags">
 						<menuitem name="Create tag..." action="ActionGitCreateTag" />
@@ -71,8 +84,12 @@
 					</menu>
 				</placeholder>
 				<separator />
-				<menuitem name="Reset tree..." action="ActionGitReset" />
-				<menuitem name="Revert commit..." action="ActionGitRevert" />
+				<placeholder name="PlaceholderResetRevert">
+					<menu name="Reset/Revert" action="ActionMenuGitResetRevert">
+						<menuitem name="Reset tree..." action="ActionGitReset" />
+						<menuitem name="Revert commit..." action="ActionGitRevert" />
+					</menu>
+				</placeholder>
 				<separator />
 				<placeholder name="PlaceholderBisectMenu">
 					<menu name="Bisect" action="ActionMenuGitBisect">
@@ -84,8 +101,6 @@
 					</menu>
 				</placeholder>
 				<separator />
-				<menuitem name="View log..." action="ActionGitLog" />
-				<separator />
 				<menuitem name="Initialize repository" action="ActionGitInit" />
 			</placeholder>
 		</menu>
diff --git a/plugins/git/plugin.c b/plugins/git/plugin.c
index ca19be6..fca79e0 100644
--- a/plugins/git/plugin.c
+++ b/plugins/git/plugin.c
@@ -74,6 +74,14 @@ static GtkActionEntry action_git_menu_toplevel =
 static GtkActionEntry actions_git[] = 
 {
 	{
+		"ActionMenuGitChanges",                       /* Action name */
+		NULL,                            /* Stock icon, if any */
+		N_("_Changes"),                     /* Display label */
+		NULL,                                     /* short-cut */
+		NULL,                      /* Tooltip */
+		NULL    /* action callback */
+	},
+	{
 		"ActionGitCommit",                       /* Action name */
 		GTK_STOCK_YES,                            /* Stock icon, if any */
 		N_("_Commit..."),                     /* Display label */
@@ -82,54 +90,54 @@ static GtkActionEntry actions_git[] =
 		G_CALLBACK (on_menu_git_commit)    /* action callback */
 	},
 	{
-		"ActionGitFetch",                       /* Action name */
-		GTK_STOCK_CONNECT,                            /* Stock icon, if any */
-		N_("_Fetch"),                     /* Display label */
+		"ActionGitDiffUncommitted",                       /* Action name */
+		GTK_STOCK_ZOOM_100,                            /* Stock icon, if any */
+		N_("_Diff uncommitted changes"),                     /* Display label */
 		NULL,                                     /* short-cut */
-		N_("Update remote branches"),                      /* Tooltip */
-		G_CALLBACK (on_menu_git_fetch)    /* action callback */
+		N_("Show uncommitted changes"),                      /* Tooltip */
+		G_CALLBACK (on_menu_git_diff)    /* action callback */
 	},
 	{
-		"ActionMenuGitRebase",                       /* Action name */
+		"ActionMenuGitStash",                       /* Action name */
 		NULL,                            /* Stock icon, if any */
-		N_("_Rebase"),                     /* Display label */
+		N_("_Stash"),                     /* Display label */
 		NULL,                                     /* short-cut */
-		N_("Merge your changes with an upstream remote branch"),                      /* Tooltip */
+		NULL,                      /* Tooltip */
 		NULL    /* action callback */
 	},
 	{
-		"ActionGitRebaseStart",                       /* Action name */
+		"ActionGitStashUncommitted",                       /* Action name */
 		NULL,                            /* Stock icon, if any */
-		N_("_Start..."),                     /* Display label */
+		N_("_Stash uncommitted changes..."),                     /* Display label */
 		NULL,                                     /* short-cut */
-		N_("Start a rebase"),                      /* Tooltip */
-		G_CALLBACK (on_menu_git_rebase_start)    /* action callback */
+		N_("Save ucommitted changes and re-apply them later"),                      /* Tooltip */
+		G_CALLBACK (on_menu_git_stash_changes)    /* action callback */
 	},
 	{
-		"ActionGitRebaseContinue",                       /* Action name */
+		"ActionGitApplyStash",                       /* Action name */
 		NULL,                            /* Stock icon, if any */
-		N_("_Continue"),                     /* Display label */
+		N_("_Apply stashed changes..."),                     /* Display label */
 		NULL,                                     /* short-cut */
-		N_("Continue a rebase that stopped because of conflicts"),                      /* Tooltip */
-		G_CALLBACK (on_menu_git_rebase_continue)    /* action callback */
+		N_("Apply stashed changes to the working tree"),                      /* Tooltip */
+		G_CALLBACK (on_menu_git_apply_stash)    /* action callback */
 	},
 	{
-		"ActionGitRebaseSkip",                       /* Action name */
-		NULL,                            /* Stock icon, if any */
-		N_("_Skip"),                     /* Display label */
+		"ActionGitLog",                       /* Action name */
+		GTK_STOCK_ZOOM_100,                            /* Stock icon, if any */
+		N_("_View log..."),                     /* Display label */
 		NULL,                                     /* short-cut */
-		N_("Skip the current conflicted commmit and continue"),                      /* Tooltip */
-		G_CALLBACK (on_menu_git_rebase_skip)    /* action callback */
+		N_("View change history"),                      /* Tooltip */
+		G_CALLBACK (on_menu_git_log)    /* action callback */
 	},
 	{
-		"ActionGitRebaseAbort",                       /* Action name */
+		"ActionMenuGitRemoteRepository",                       /* Action name */
 		NULL,                            /* Stock icon, if any */
-		N_("_Abort"),                     /* Display label */
+		N_("_Remote repository"),                     /* Display label */
 		NULL,                                     /* short-cut */
-		N_("Abort the rebase and put the repository in its original state"),                      /* Tooltip */
-		G_CALLBACK (on_menu_git_rebase_abort)    /* action callback */
+		NULL,                      /* Tooltip */
+		NULL    /* action callback */
 	},
-		{
+	{
 		"ActionGitPush",                       /* Action name */
 		GTK_STOCK_GO_FORWARD,                            /* Stock icon, if any */
 		N_("_Push..."),                     /* Display label */
@@ -146,38 +154,22 @@ static GtkActionEntry actions_git[] =
 		G_CALLBACK (on_menu_git_pull)    /* action callback */
 	},
 	{
-		"ActionGitDiffUncommitted",                       /* Action name */
-		GTK_STOCK_ZOOM_100,                            /* Stock icon, if any */
-		N_("_Diff uncommitted changes"),                     /* Display label */
+		"ActionGitFetch",                       /* Action name */
+		GTK_STOCK_CONNECT,                            /* Stock icon, if any */
+		N_("_Fetch"),                     /* Display label */
 		NULL,                                     /* short-cut */
-		N_("Show uncommitted changes"),                      /* Tooltip */
-		G_CALLBACK (on_menu_git_diff)    /* action callback */
+		N_("Update remote branches"),                      /* Tooltip */
+		G_CALLBACK (on_menu_git_fetch)    /* action callback */
 	},
 	{
-		"ActionMenuGitStash",                       /* Action name */
+		"ActionMenuGitFiles",                       /* Action name */
 		NULL,                            /* Stock icon, if any */
-		N_("_Stash"),                     /* Display label */
+		N_("_Files"),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
 		NULL    /* action callback */
 	},
 	{
-		"ActionGitStashUncommitted",                       /* Action name */
-		NULL,                            /* Stock icon, if any */
-		N_("_Stash uncommitted changes..."),                     /* Display label */
-		NULL,                                     /* short-cut */
-		N_("Save ucommitted changes and re-apply them later"),                      /* Tooltip */
-		G_CALLBACK (on_menu_git_stash_changes)    /* action callback */
-	},
-	{
-		"ActionGitApplyStash",                       /* Action name */
-		NULL,                            /* Stock icon, if any */
-		N_("_Apply stashed changes..."),                     /* Display label */
-		NULL,                                     /* short-cut */
-		N_("Apply stashed changes to the working tree"),                      /* Tooltip */
-		G_CALLBACK (on_menu_git_apply_stash)    /* action callback */
-	},
-	{
 		"ActionGitAdd",                       /* Action name */
 		GTK_STOCK_ADD,                            /* Stock icon, if any */
 		N_("_Add..."),                     /* Display label */
@@ -322,6 +314,46 @@ static GtkActionEntry actions_git[] =
 		G_CALLBACK (on_menu_git_merge)    /* action callback */
 	},
 	{
+		"ActionMenuGitRebase",                       /* Action name */
+		NULL,                            /* Stock icon, if any */
+		N_("_Rebase"),                     /* Display label */
+		NULL,                                     /* short-cut */
+		N_("Merge your changes with an upstream remote branch"),                      /* Tooltip */
+		NULL    /* action callback */
+	},
+	{
+		"ActionGitRebaseStart",                       /* Action name */
+		NULL,                            /* Stock icon, if any */
+		N_("_Start..."),                     /* Display label */
+		NULL,                                     /* short-cut */
+		N_("Start a rebase"),                      /* Tooltip */
+		G_CALLBACK (on_menu_git_rebase_start)    /* action callback */
+	},
+	{
+		"ActionGitRebaseContinue",                       /* Action name */
+		NULL,                            /* Stock icon, if any */
+		N_("_Continue"),                     /* Display label */
+		NULL,                                     /* short-cut */
+		N_("Continue a rebase that stopped because of conflicts"),                      /* Tooltip */
+		G_CALLBACK (on_menu_git_rebase_continue)    /* action callback */
+	},
+	{
+		"ActionGitRebaseSkip",                       /* Action name */
+		NULL,                            /* Stock icon, if any */
+		N_("_Skip"),                     /* Display label */
+		NULL,                                     /* short-cut */
+		N_("Skip the current conflicted commmit and continue"),                      /* Tooltip */
+		G_CALLBACK (on_menu_git_rebase_skip)    /* action callback */
+	},
+	{
+		"ActionGitRebaseAbort",                       /* Action name */
+		NULL,                            /* Stock icon, if any */
+		N_("_Abort"),                     /* Display label */
+		NULL,                                     /* short-cut */
+		N_("Abort the rebase and put the repository in its original state"),                      /* Tooltip */
+		G_CALLBACK (on_menu_git_rebase_abort)    /* action callback */
+	},
+	{
 		"ActionGitCherryPick",                       /* Action name */
 		NULL,                            /* Stock icon, if any */
 		N_("_Cherry pick..."),                     /* Display label */
@@ -378,6 +410,14 @@ static GtkActionEntry actions_git[] =
 		G_CALLBACK (on_menu_git_delete_tag)    /* action callback */
 	},
 	{
+		"ActionMenuGitResetRevert",                       /* Action name */
+		NULL,                            /* Stock icon, if any */
+		N_("_Reset/Revert"),                     /* Display label */
+		NULL,                                     /* short-cut */
+		NULL,                      /* Tooltip */
+		NULL    /* action callback */
+	},
+	{
 		"ActionGitReset",                       /* Action name */
 		GTK_STOCK_REFRESH,                            /* Stock icon, if any */
 		N_("_Reset tree..."),                     /* Display label */
@@ -434,14 +474,6 @@ static GtkActionEntry actions_git[] =
 		G_CALLBACK (on_menu_git_bisect_bad)    /* action callback */
 	},
 	{
-		"ActionGitLog",                       /* Action name */
-		GTK_STOCK_ZOOM_100,                            /* Stock icon, if any */
-		N_("_View log..."),                     /* Display label */
-		NULL,                                     /* short-cut */
-		N_("View change history"),                      /* Tooltip */
-		G_CALLBACK (on_menu_git_log)    /* action callback */
-	},
-	{
 		"ActionGitInit",                       /* Action name */
 		NULL,                            /* Stock icon, if any */
 		N_("_Initialize repository"),                     /* Display label */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]