[anjuta] Rearrange the Git menu some more.



commit c426eb609112e14f6046009ab0162a42eb908822
Author: James Liggett <jrliggett cox net>
Date:   Sat May 9 23:05:23 2009 -0700

    Rearrange the Git menu some more.
    
    Move things around so that Add, Remove, and Ignore are right above Checkout and Unstage files,
    since those operations are opposites of each other. Put Patches and Branches menu, and Create Tag
    together on the menu.
    
    I also moved around the actions to coincide with their relative positions on the menu, like I had
    before we started messing with the menu. Try to stay this way to keep organized.
---
 plugins/git/anjuta-git.ui |   26 +++---
 plugins/git/plugin.c      |  194 ++++++++++++++++++++++-----------------------
 2 files changed, 109 insertions(+), 111 deletions(-)

diff --git a/plugins/git/anjuta-git.ui b/plugins/git/anjuta-git.ui
index d4af9e2..cab203e 100644
--- a/plugins/git/anjuta-git.ui
+++ b/plugins/git/anjuta-git.ui
@@ -19,6 +19,14 @@
   				<menuitem name="Pull..." action="ActionGitPull" />
   				<menuitem name="Diff uncommitted changes" action="ActionGitDiffUncommitted" />
   				<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" />
+				<separator />
   				<placeholder name="PlaceholderPatchMenu">
   					<menu name="Patches" action="ActionMenuGitPatches">
   						<menuitem name="Create patch series..." action="ActionGitCreatePatchSeries" />
@@ -49,19 +57,11 @@
   		  			</menu>
 				</placeholder>
 				<separator />
-				<menuitem name="Check out files..." action="ActionGitCheckoutFiles" />
-				<menuitem name="Unstage files..." action="ActionGitUnstageFiles" />
-				<menuitem name="Resolve conflicts..." action="ActionGitResolve" />
-				<separator name="separator1" />
+				<menuitem name="Create tag..." action="ActionGitCreateTag" />
+				<separator />
 				<menuitem name="Reset tree..." action="ActionGitReset" />
 				<menuitem name="Revert commit..." action="ActionGitRevert" />
-				<separator name="separator4" />
-				<menuitem name="Add..." action="ActionGitAdd" />
-				<menuitem name="Remove..." action="ActionGitRemove" />
-				<menuitem name="Ignore..." action="ActionGitIgnore" />
 				<separator />
-				<menuitem name="Create tag..." action="ActionGitCreateTag" />
-				<separator name="separator2" />
 				<placeholder name="PlaceholderBisectMenu">
 					<menu name="Bisect" action="ActionMenuGitBisect">
 						<menuitem name="Start..." action="ActionGitBisectStart" />
@@ -71,7 +71,7 @@
 						<menuitem name="Bad" action="ActionGitBisectBad" />
 					</menu>
 				</placeholder>
-				<separator name="separator3" />
+				<separator />
 				<menuitem name="View log..." action="ActionGitLog" />
 			</placeholder>
 		</menu>
@@ -81,13 +81,13 @@
 	<popup name="PopupLog">
 		<menuitem name="Commit diff" action="ActionGitLogCommitDiff" />
 		<menuitem name="View Selected Revision" action="ActionGitLogViewRevision" />
-		<separator name="log_separator1" />
+		<separator />
 		<menuitem name="Create branch..." action="ActionGitLogCreateBranch" />
 		<menuitem name="Create tag..." action="ActionGitLogCreateTag" />
 		<separator name ="log_separator2" />
 		<menuitem name="Reset tree..." action="ActionGitLogReset" />
 		<menuitem name="Revert commit..." action="ActionGitLogRevert" />
-		<separator name="log_separator3" />
+		<separator />
 		<placeholder name="PlaceholderLogBisectMenu">
 			<menu name="Bisect" action="ActionMenuGitLogBisect">
 				<menuitem name="Set good revision" action="ActionGitLogBisectGood" />
diff --git a/plugins/git/plugin.c b/plugins/git/plugin.c
index 005f9c7..81221e2 100644
--- a/plugins/git/plugin.c
+++ b/plugins/git/plugin.c
@@ -118,6 +118,14 @@ static GtkActionEntry actions_git[] =
 		NULL,                      /* Tooltip */
 		G_CALLBACK (on_menu_git_rebase_abort)    /* action callback */
 	},
+		{
+		"ActionGitPush",                       /* Action name */
+		GTK_STOCK_GO_FORWARD,                            /* Stock icon, if any */
+		N_("_Push..."),                     /* Display label */
+		NULL,                                     /* short-cut */
+		NULL,                      /* Tooltip */
+		G_CALLBACK (on_menu_git_push)    /* action callback */
+	},
 	{
 		"ActionGitPull",                       /* Action name */
 		GTK_STOCK_GO_BACK,                            /* Stock icon, if any */
@@ -127,134 +135,125 @@ static GtkActionEntry actions_git[] =
 		G_CALLBACK (on_menu_git_pull)    /* action callback */
 	},
 	{
-		"ActionGitUnstageFiles",                       /* Action name */
-		GTK_STOCK_CANCEL,                            /* Stock icon, if any */
-		N_("_Unstage files..."),                     /* Display label */
+		"ActionGitDiffUncommitted",                       /* Action name */
+		GTK_STOCK_ZOOM_100,                            /* Stock icon, if any */
+		N_("_Diff uncommitted changes"),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_unstage)    /* action callback */
+		G_CALLBACK (on_menu_git_diff)    /* action callback */
 	},
 	{
-		"ActionGitCheckoutFiles",                       /* Action name */
-		GTK_STOCK_UNDO,                            /* Stock icon, if any */
-		N_("_Check out files..."),                     /* Display label */
+		"ActionGitAdd",                       /* Action name */
+		GTK_STOCK_ADD,                            /* Stock icon, if any */
+		N_("_Add..."),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_checkout_files)    /* action callback */
+		G_CALLBACK (on_menu_git_add)    /* action callback */
 	},
 	{
-		"ActionGitResolve",                       /* Action name */
-		GTK_STOCK_PREFERENCES,                            /* Stock icon, if any */
-		N_("_Resolve conflicts..."),                     /* Display label */
+		"ActionGitRemove",                       /* Action name */
+		GTK_STOCK_REMOVE,                            /* Stock icon, if any */
+		N_("_Remove..."),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_resolve)    /* action callback */
+		G_CALLBACK (on_menu_git_remove)    /* action callback */
 	},
 	{
-		"ActionGitCreatePatchSeries",                       /* Action name */
-		GTK_STOCK_DND_MULTIPLE,                            /* Stock icon, if any */
-		N_("Create patch series..."),                     /* Display label */
+		"ActionGitIgnore",                       /* Action name */
+		GTK_STOCK_DIALOG_ERROR,                            /* Stock icon, if any */
+		N_("_Ignore..."),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_create_patch_series)    /* action callback */
+		G_CALLBACK (on_menu_git_ignore)    /* action callback */
 	},
 	{
-		"ActionGitReset",                       /* Action name */
-		GTK_STOCK_REFRESH,                            /* Stock icon, if any */
-		N_("_Reset tree..."),                     /* Display label */
+		"ActionGitCheckoutFiles",                       /* Action name */
+		GTK_STOCK_UNDO,                            /* Stock icon, if any */
+		N_("_Check out files..."),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_reset)    /* action callback */
+		G_CALLBACK (on_menu_git_checkout_files)    /* action callback */
 	},
 	{
-		"ActionGitRevert",                       /* Action name */
-		GTK_STOCK_UNDO,                            /* Stock icon, if any */
-		N_("_Revert commit..."),                     /* Display label */
+		"ActionGitUnstageFiles",                       /* Action name */
+		GTK_STOCK_CANCEL,                            /* Stock icon, if any */
+		N_("_Unstage files..."),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_revert)    /* action callback */
+		G_CALLBACK (on_menu_git_unstage)    /* action callback */
 	},
 	{
-		"ActionMenuGitBranches",                       /* Action name */
-		NULL,                            /* Stock icon, if any */
-		N_("_Branches"),                     /* Display label */
+		"ActionGitResolve",                       /* Action name */
+		GTK_STOCK_PREFERENCES,                            /* Stock icon, if any */
+		N_("_Resolve conflicts..."),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		NULL    /* action callback */
+		G_CALLBACK (on_menu_git_resolve)    /* action callback */
 	},
 	{
-		"ActionMenuGitBisect",                       /* Action name */
+		"ActionMenuGitPatches",                       /* Action name */
 		NULL,                            /* Stock icon, if any */
-		N_("Bisect"),                     /* Display label */
+		N_("Patches"),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
 		NULL    /* action callback */
 	},
 	{
-		"ActionGitBisectStart",                       /* Action name */
-		GTK_STOCK_MEDIA_PLAY,                            /* Stock icon, if any */
-		N_("_Start..."),                     /* Display label */
-		NULL,                                     /* short-cut */
-		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_bisect_start)    /* action callback */
-	},
-	{
-		"ActionGitBisectReset",                       /* Action name */
-		GTK_STOCK_REFRESH,                            /* Stock icon, if any */
-		N_("_Reset"),                     /* Display label */
+		"ActionGitCreatePatchSeries",                       /* Action name */
+		GTK_STOCK_DND_MULTIPLE,                            /* Stock icon, if any */
+		N_("Create patch series..."),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_bisect_reset)    /* action callback */
+		G_CALLBACK (on_menu_git_create_patch_series)    /* action callback */
 	},
 	{
-		"ActionGitBisectGood",                       /* Action name */
-		GTK_STOCK_YES,                            /* Stock icon, if any */
-		N_("_Good"),                     /* Display label */
+		"ActionMenuGitApplyMailboxFiles",                       /* Action name */
+		NULL,                            /* Stock icon, if any */
+		N_("Apply mailbox files"),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_bisect_good)    /* action callback */
+		NULL    /* action callback */
 	},
 	{
-		"ActionGitBisectBad",                       /* Action name */
-		GTK_STOCK_NO,                            /* Stock icon, if any */
-		N_("_Bad"),                     /* Display label */
+		"ActionGitApplyMailboxApply",                       /* Action name */
+		NULL,                            /* Stock icon, if any */
+		N_("_Apply..."),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_bisect_bad)    /* action callback */
+		G_CALLBACK (on_menu_git_apply_mailbox_apply)    /* action callback */
 	},
 	{
-		"ActionGitLog",                       /* Action name */
-		GTK_STOCK_ZOOM_100,                            /* Stock icon, if any */
-		N_("_View log..."),                     /* Display label */
+		"ActionGitApplyMailboxContinue",                       /* Action name */
+		NULL,                            /* Stock icon, if any */
+		N_("_Continue with resolved conflicts"),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_log)    /* action callback */
+		G_CALLBACK (on_menu_git_apply_mailbox_resolved)    /* action callback */
 	},
 	{
-		"ActionGitAdd",                       /* Action name */
-		GTK_STOCK_ADD,                            /* Stock icon, if any */
-		N_("_Add..."),                     /* Display label */
+		"ActionGitApplyMailboxSkip",                       /* Action name */
+		NULL,                            /* Stock icon, if any */
+		N_("_Skip current patch"),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_add)    /* action callback */
+		G_CALLBACK (on_menu_git_apply_mailbox_skip)    /* action callback */
 	},
 	{
-		"ActionGitRemove",                       /* Action name */
-		GTK_STOCK_REMOVE,                            /* Stock icon, if any */
-		N_("_Remove..."),                     /* Display label */
+		"ActionGitApplyMailboxAbort",                       /* Action name */
+		NULL,                            /* Stock icon, if any */
+		N_("_Abort"),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_remove)    /* action callback */
+		G_CALLBACK (on_menu_git_apply_mailbox_abort)    /* action callback */
 	},
 	{
-		"ActionGitIgnore",                       /* Action name */
-		GTK_STOCK_DIALOG_ERROR,                            /* Stock icon, if any */
-		N_("_Ignore..."),                     /* Display label */
+		"ActionMenuGitBranches",                       /* Action name */
+		NULL,                            /* Stock icon, if any */
+		N_("_Branches"),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_ignore)    /* action callback */
+		NULL    /* action callback */
 	},
-	
 	{
 		"ActionGitCreateBranch",                       /* Action name */
 		NULL,                            /* Stock icon, if any */
@@ -320,69 +319,68 @@ static GtkActionEntry actions_git[] =
 		G_CALLBACK (on_menu_git_create_tag)    /* action callback */
 	},
 	{
-		"ActionGitDiffUncommitted",                       /* Action name */
-		GTK_STOCK_ZOOM_100,                            /* Stock icon, if any */
-		N_("_Diff uncommitted changes"),                     /* Display label */
+		"ActionGitReset",                       /* Action name */
+		GTK_STOCK_REFRESH,                            /* Stock icon, if any */
+		N_("_Reset tree..."),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_diff)    /* action callback */
+		G_CALLBACK (on_menu_git_reset)    /* action callback */
 	},
 	{
-		"ActionGitPush",                       /* Action name */
-		GTK_STOCK_GO_FORWARD,                            /* Stock icon, if any */
-		N_("_Push..."),                     /* Display label */
+		"ActionGitRevert",                       /* Action name */
+		GTK_STOCK_UNDO,                            /* Stock icon, if any */
+		N_("_Revert commit..."),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_push)    /* action callback */
+		G_CALLBACK (on_menu_git_revert)    /* action callback */
 	},
 	{
-		"ActionMenuGitPatches",                       /* Action name */
+		"ActionMenuGitBisect",                       /* Action name */
 		NULL,                            /* Stock icon, if any */
-		N_("Patches"),                     /* Display label */
+		N_("Bisect"),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
 		NULL    /* action callback */
 	},
 	{
-		"ActionMenuGitApplyMailboxFiles",                       /* Action name */
-		NULL,                            /* Stock icon, if any */
-		N_("Apply mailbox files"),                     /* Display label */
+		"ActionGitBisectStart",                       /* Action name */
+		GTK_STOCK_MEDIA_PLAY,                            /* Stock icon, if any */
+		N_("_Start..."),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		NULL    /* action callback */
+		G_CALLBACK (on_menu_git_bisect_start)    /* action callback */
 	},
-	
 	{
-		"ActionGitApplyMailboxApply",                       /* Action name */
-		NULL,                            /* Stock icon, if any */
-		N_("_Apply..."),                     /* Display label */
+		"ActionGitBisectReset",                       /* Action name */
+		GTK_STOCK_REFRESH,                            /* Stock icon, if any */
+		N_("_Reset"),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_apply_mailbox_apply)    /* action callback */
+		G_CALLBACK (on_menu_git_bisect_reset)    /* action callback */
 	},
 	{
-		"ActionGitApplyMailboxContinue",                       /* Action name */
-		NULL,                            /* Stock icon, if any */
-		N_("_Continue with resolved conflicts"),                     /* Display label */
+		"ActionGitBisectGood",                       /* Action name */
+		GTK_STOCK_YES,                            /* Stock icon, if any */
+		N_("_Good"),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_apply_mailbox_resolved)    /* action callback */
+		G_CALLBACK (on_menu_git_bisect_good)    /* action callback */
 	},
 	{
-		"ActionGitApplyMailboxSkip",                       /* Action name */
-		NULL,                            /* Stock icon, if any */
-		N_("_Skip current patch"),                     /* Display label */
+		"ActionGitBisectBad",                       /* Action name */
+		GTK_STOCK_NO,                            /* Stock icon, if any */
+		N_("_Bad"),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_apply_mailbox_skip)    /* action callback */
+		G_CALLBACK (on_menu_git_bisect_bad)    /* action callback */
 	},
 	{
-		"ActionGitApplyMailboxAbort",                       /* Action name */
-		NULL,                            /* Stock icon, if any */
-		N_("_Abort"),                     /* Display label */
+		"ActionGitLog",                       /* Action name */
+		GTK_STOCK_ZOOM_100,                            /* Stock icon, if any */
+		N_("_View log..."),                     /* Display label */
 		NULL,                                     /* short-cut */
 		NULL,                      /* Tooltip */
-		G_CALLBACK (on_menu_git_apply_mailbox_abort)    /* action callback */
+		G_CALLBACK (on_menu_git_log)    /* action callback */
 	}
 };
 



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