threads / patch / 14988

patchFix invalid menubar and toolbar entries in plugin.xml

Subject: [PATCH] Fix invalid menubar and toolbar entries in plugin.xml

## tl;dr

8 messages between Aug 13, 2008 and Aug 14, 2008. Diffs are folded; open one to read it.

replies: 7people: 2as markdown or json

Tor Arne Vestbø· Aug 13, 2008, 19:07 UTC · lore

The default toolbar is identified by the path 'Normal', and we use the default group, named by 'additions'.

The menu entry was not used, and was causing an extra empty space in the menu bar.

Also, renamed the action set label to be consistent with what the other platform plugins do (no 'actions' postfix).

Signed-off-by: Tor Arne Vestbø <torarnv@gmail.com>
---
 org.spearce.egit.ui/plugin.properties |    2 +-
 org.spearce.egit.ui/plugin.xml        |   18 ++++--------------
 2 files changed, 5 insertions(+), 15 deletions(-)
Show changes to 2 files +5 −15

org.spearce.egit.ui/plugin.properties, org.spearce.egit.ui/plugin.xml

diff --git a/org.spearce.egit.ui/plugin.properties b/org.spearce.egit.ui/plugin.properties
index 3240ec0..ce3b058 100644
--- a/org.spearce.egit.ui/plugin.properties
+++ b/org.spearce.egit.ui/plugin.properties
@@ -41,7 +41,7 @@ ResetAction_tooltip=Reset the current branch to the same or another commit
 BranchAction_label=&Branch...
 BranchAction_tooltip=Switch to another branch
 
-GitActions_label=Git actions
+GitActions_label=Git
 GitMenu_label=&Git
 
 
diff --git a/org.spearce.egit.ui/plugin.xml b/org.spearce.egit.ui/plugin.xml
index 393121f..97eb2a6 100644
--- a/org.spearce.egit.ui/plugin.xml
+++ b/org.spearce.egit.ui/plugin.xml
@@ -243,12 +243,6 @@
 	    label="%GitActions_label"
 	    visible="true"
 	    >
-	    <menu
-           id="org.spearce.egit.ui.gitmenu"
-           label="%GitMenu_label"
-           path="org.spearce.egit.ui.gitmenu"
-           >
-	    </menu>
 		<action
 		       class="org.spearce.egit.ui.internal.actions.BranchAction"
 		       disabledIcon="icons/toolbar/checkoutd.png"
@@ -256,8 +250,7 @@
 		       id="org.spearce.egit.ui.actionbranch"
 		       label="%BranchAction_label"
 		       style="push"
-		       menubarPath="org.spearce.egit.ui.gitmenu/repo"
-		       toolbarPath="org.spearce.egit.ui"
+		       toolbarPath="Normal/additions"
 		       tooltip="%BranchAction_tooltip">
 		</action>
 		<action
@@ -267,8 +260,7 @@
 		       id="org.spearce.egit.ui.actioncommit"
 		       label="%CommitAction_label"
 		       style="push"
-		       menubarPath="org.spearce.egit.ui.gitmenu/repo"
-		       toolbarPath="org.spearce.egit.ui"
+		       toolbarPath="Normal/additions"
 		       tooltip="%CommitAction_tooltip">
 		</action>
 		<action
@@ -278,8 +270,7 @@
 		       id="org.spearce.egit.ui.actionreset"
 		       label="%ResetAction_label"
 		       style="push"
-		       menubarPath="org.spearce.egit.ui.gitmenu/repo"
-		       toolbarPath="org.spearce.egit.ui"
+		       toolbarPath="Normal/additions"
 		       tooltip="%ResetAction_tooltip">
 		</action>
 		<action
@@ -288,9 +279,8 @@
 		       icon="icons/toolbar/tracke.png"
 		       id="org.spearce.egit.ui.trackaction"
 		       label="%TrackAction_label"
-		       menubarPath="org.spearce.egit.ui.gitmenu/repo"
 		       style="push"
-		       toolbarPath="org.spearce.egit.ui"
+		       toolbarPath="Normal/additions"
 		       tooltip="Start tracking the selected resources">
 		</action>
       </actionSet>
-- 
1.5.6.5
Robin Rosenberg· Aug 14, 2008, 05:47 UTC · re: Tor Arne Vestbø · lore

Re: [EGIT PATCH] Fix invalid menubar and toolbar entries in plugin.xml

onsdagen den 13 augusti 2008 21.07.54 skrev Tor Arne Vestbø:
Show 5 quoted lines
> The default toolbar is identified by the path 'Normal',
> and we use the default group, named by 'additions'.
> 
> The menu entry was not used, and was causing an extra
> empty space in the menu bar.
So that's why. Thanks. 

Please try to prefix the patch with EGIT (or JGIT for JGit-only patches) so we won't waste the time of those on the list having no interesting in this implementation. I forgot it a few times myself.

-- robin
Robin Rosenberg· Aug 14, 2008, 17:42 UTC · re: Robin Rosenberg · lore

Re: [EGIT PATCH] Fix invalid menubar and toolbar entries in plugin.xml

torsdagen den 14 augusti 2008 07.47.35 skrev Robin Rosenberg:
Show 11 quoted lines
> onsdagen den 13 augusti 2008 21.07.54 skrev Tor Arne Vestbø:
> > The default toolbar is identified by the path 'Normal',
> > and we use the default group, named by 'additions'.
> > 
> > The menu entry was not used, and was causing an extra
> > empty space in the menu bar.
> 
> So that's why. Thanks. 
> 
> Please try to prefix the patch with EGIT (or JGIT for JGit-only patches)
> so we won't waste the time of those on the list having no interesting in this implementation.
When I applied this patch the Git menu disappeared. (3.3)
-- robin
Tor Arne Vestbø· Aug 14, 2008, 19:13 UTC · re: Robin Rosenberg · lore

Re: [EGIT PATCH] Fix invalid menubar and toolbar entries in plugin.xml

Robin Rosenberg wrote:
>>> The menu entry was not used, and was causing an extra
>>> empty space in the menu bar.
> 
> When I applied this patch the Git menu disappeared. (3.3)

Ah, I see. It appears the menu was used, but because it had the wrong path ('org.spearce.egit.ui.gitmenu' instead of 'additions') the four entries did not show up in 3.4.

Either way I suggest the patch is still valid, because it removes the Git menu from the menu bar. This is consistent with what other platform plugins do, ie. not populating the main menu bar with plugin specific entries, but instead using sub menus, context menus and views.

In the long run we should probably also move the global toolbar entries to the synchronize view, when I get the chance to look at implementing that.

Tor Arne
Robin Rosenberg· Aug 14, 2008, 20:42 UTC · re: Tor Arne Vestbø · lore

Re: [EGIT PATCH] Fix invalid menubar and toolbar entries in plugin.xml

torsdagen den 14 augusti 2008 21.13.51 skrev Tor Arne Vestbø:
Show 9 quoted lines
> Robin Rosenberg wrote:
> >>> The menu entry was not used, and was causing an extra
> >>> empty space in the menu bar.
> > 
> > When I applied this patch the Git menu disappeared. (3.3)
> 
> Ah, I see. It appears the menu was used, but because it had the wrong
> path ('org.spearce.egit.ui.gitmenu' instead of 'additions') the four 
> entries did not show up in 3.4. 
That's our first 3.4 incompatibilty.
> Either way I suggest the patch is still valid, because it removes
> the Git menu from the menu bar. This is consistent with what other 
But I don't want it removed... , but I can consider hiding the git actions by default.
> platform plugins do, ie. not populating the main menu bar with plugin

Lots of plugins provide both menus and toolsbars so there is no inconsistence with Git doing it.

> specific entries, but instead using sub menus, context menus and views.

You can have it all. Eclipse is good at it. Anywhere there is a customizeable context menu now you'll get a number of actions for RevObject's like the reset etc actions. If you add, say a refs view with RevObjects in it you'd get the contextg menues there too.

> In the long run we should probably also move the global toolbar entries
No. 
> to the synchronize view, when I get the chance to look at implementing 
> that. 

It is not clear, I think, what the synchronize view would look like to be an effective git gui, but if we toss ideas around we might come to some conclusions/agreements.

> 
> Tor Arne
> 
-- robin
Robin Rosenberg· Aug 14, 2008, 20:45 UTC · re: Robin Rosenberg · lore

[EGIT PATCH] Hide the Git menu and toolbars by default and fix the path of the Git menu

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 org.spearce.egit.ui/plugin.xml |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Show changes to org.spearce.egit.ui/plugin.xml +2 −2
diff --git a/org.spearce.egit.ui/plugin.xml b/org.spearce.egit.ui/plugin.xml
index b809300..a52495b 100644
--- a/org.spearce.egit.ui/plugin.xml
+++ b/org.spearce.egit.ui/plugin.xml
@@ -241,12 +241,12 @@
 	    description="Common things to do with Git"
 	    id="org.spearce.egit.ui.gitaction"
 	    label="%GitActions_label"
-	    visible="true"
+	    visible="false"
 	    >
 	    <menu
            id="org.spearce.egit.ui.gitmenu"
            label="%GitMenu_label"
-           path="org.spearce.egit.ui.gitmenu"
+           path="additions"
            >
 	    </menu>
 		<action
-- 
1.6.0.rc2.35.g04c6e9
Tor Arne Vestbø· Aug 14, 2008, 21:43 UTC · re: Robin Rosenberg · lore

Re: [EGIT PATCH] Fix invalid menubar and toolbar entries in plugin.xml

Robin Rosenberg wrote:
>> Either way I suggest the patch is still valid, because it removes
>> the Git menu from the menu bar. This is consistent with what other 
> But I don't want it removed... , but I can consider hiding the git actions by default.

I see now that both the CVS and SVN plugins have top level menus and toolbars (they are hidden by default), so I'm perfectly fine with us doing the same.

Do you want me to resubmit the patch, or is it enough with the patch you amended?
Thanks,
Tor Arne
Tor Arne Vestbø· Aug 14, 2008, 22:07 UTC · re: Robin Rosenberg · lore

[EGIT PATCH v2] Fix invalid menubar and toolbar entries in plugin.xml

The default toolbar is identified by the path 'Normal', and we use the default group, named by 'additions'.

Also, renamed the action set label to be consistent with what the other platform plugins do (no 'actions' postfix).

Signed-off-by: Tor Arne Vestbø <torarnv@gmail.com>
---
 org.spearce.egit.ui/plugin.properties |    2 +-
 org.spearce.egit.ui/plugin.xml        |   23 +++++++++++++----------
 2 files changed, 14 insertions(+), 11 deletions(-)
Show changes to 2 files +14 −11

org.spearce.egit.ui/plugin.properties, org.spearce.egit.ui/plugin.xml

diff --git a/org.spearce.egit.ui/plugin.properties b/org.spearce.egit.ui/plugin.properties
index 3240ec0..ce3b058 100644
--- a/org.spearce.egit.ui/plugin.properties
+++ b/org.spearce.egit.ui/plugin.properties
@@ -41,7 +41,7 @@ ResetAction_tooltip=Reset the current branch to the same or another commit
 BranchAction_label=&Branch...
 BranchAction_tooltip=Switch to another branch
 
-GitActions_label=Git actions
+GitActions_label=Git
 GitMenu_label=&Git
 
 
diff --git a/org.spearce.egit.ui/plugin.xml b/org.spearce.egit.ui/plugin.xml
index b809300..0b59a6e 100644
--- a/org.spearce.egit.ui/plugin.xml
+++ b/org.spearce.egit.ui/plugin.xml
@@ -241,13 +241,16 @@
 	    description="Common things to do with Git"
 	    id="org.spearce.egit.ui.gitaction"
 	    label="%GitActions_label"
-	    visible="true"
+	    visible="false"
 	    >
 	    <menu
            id="org.spearce.egit.ui.gitmenu"
            label="%GitMenu_label"
-           path="org.spearce.egit.ui.gitmenu"
+           path="additions"
            >
+        <separator
+              name="repositoryGroup">
+        </separator>
 	    </menu>
 		<action
 		       class="org.spearce.egit.ui.internal.actions.BranchAction"
@@ -256,8 +259,8 @@
 		       id="org.spearce.egit.ui.actionbranch"
 		       label="%BranchAction_label"
 		       style="push"
-		       menubarPath="org.spearce.egit.ui.gitmenu/repo"
-		       toolbarPath="org.spearce.egit.ui"
+		       menubarPath="org.spearce.egit.ui.gitmenu/repositoryGroup"
+		       toolbarPath="Normal/additions"
 		       tooltip="%BranchAction_tooltip">
 		</action>
 		<action
@@ -267,8 +270,8 @@
 		       id="org.spearce.egit.ui.actioncommit"
 		       label="%CommitAction_label"
 		       style="push"
-		       menubarPath="org.spearce.egit.ui.gitmenu/repo"
-		       toolbarPath="org.spearce.egit.ui"
+		       menubarPath="org.spearce.egit.ui.gitmenu/repositoryGroup"
+		       toolbarPath="Normal/additions"
 		       tooltip="%CommitAction_tooltip">
 		</action>
 		<action
@@ -278,8 +281,8 @@
 		       id="org.spearce.egit.ui.actionreset"
 		       label="%ResetAction_label"
 		       style="push"
-		       menubarPath="org.spearce.egit.ui.gitmenu/repo"
-		       toolbarPath="org.spearce.egit.ui"
+		       menubarPath="org.spearce.egit.ui.gitmenu/repositoryGroup"
+		       toolbarPath="Normal/additions"
 		       tooltip="%ResetAction_tooltip">
 		</action>
 		<action
@@ -288,9 +291,9 @@
 		       icon="icons/toolbar/tracke.png"
 		       id="org.spearce.egit.ui.trackaction"
 		       label="%TrackAction_label"
-		       menubarPath="org.spearce.egit.ui.gitmenu/repo"
 		       style="push"
-		       toolbarPath="org.spearce.egit.ui"
+		       menubarPath="org.spearce.egit.ui.gitmenu/repositoryGroup"
+		       toolbarPath="Normal/additions"
 		       tooltip="Start tracking the selected resources">
 		</action>
       </actionSet>
-- 
1.5.6.5

← back to recent threads