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

8 messages from 2008-08-13 to 2008-08-14. Participants: Tor Arne Vestbø, Robin Rosenberg.
Thread: https://gitlist.dev/t/14988

## Tor Arne Vestbø, 2008-08-13 19:07

Subject: [PATCH] Fix invalid menubar and toolbar entries in plugin.xml
Message-ID: <48A3310A.8080306@gmail.com>
URL: https://gitlist.dev/e/48A3310A.8080306%40gmail.com

```
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(-)

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, 2008-08-14 05:47

Subject: Re: [EGIT PATCH] Fix invalid menubar and toolbar entries in plugin.xml
Message-ID: <200808140747.35753.robin.rosenberg.lists@dewire.com>
URL: https://gitlist.dev/e/200808140747.35753.robin.rosenberg.lists%40dewire.com
In-Reply-To: <48A3310A.8080306@gmail.com>

```
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.
I forgot it a few times myself.

-- robin

```

## Robin Rosenberg, 2008-08-14 17:42

Subject: Re: [EGIT PATCH] Fix invalid menubar and toolbar entries in plugin.xml
Message-ID: <200808141942.55448.robin.rosenberg.lists@dewire.com>
URL: https://gitlist.dev/e/200808141942.55448.robin.rosenberg.lists%40dewire.com
In-Reply-To: <200808140747.35753.robin.rosenberg.lists@dewire.com>

```
torsdagen den 14 augusti 2008 07.47.35 skrev Robin Rosenberg:
> 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ø, 2008-08-14 19:13

Subject: Re: [EGIT PATCH] Fix invalid menubar and toolbar entries in plugin.xml
Message-ID: <48A483EF.10508@gmail.com>
URL: https://gitlist.dev/e/48A483EF.10508%40gmail.com
In-Reply-To: <200808141942.55448.robin.rosenberg.lists@dewire.com>

```
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, 2008-08-14 20:42

Subject: Re: [EGIT PATCH] Fix invalid menubar and toolbar entries in plugin.xml
Message-ID: <200808142242.20476.robin.rosenberg.lists@dewire.com>
URL: https://gitlist.dev/e/200808142242.20476.robin.rosenberg.lists%40dewire.com
In-Reply-To: <48A483EF.10508@gmail.com>

```
torsdagen den 14 augusti 2008 21.13.51 skrev Tor Arne Vestbø:
> 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, 2008-08-14 20:45

Subject: [EGIT PATCH] Hide the Git menu and toolbars by default and fix the path of the Git menu
Message-ID: <200808142245.40152.robin.rosenberg.lists@dewire.com>
URL: https://gitlist.dev/e/200808142245.40152.robin.rosenberg.lists%40dewire.com
In-Reply-To: <200808142242.20476.robin.rosenberg.lists@dewire.com>

```

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 org.spearce.egit.ui/plugin.xml |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

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ø, 2008-08-14 21:43

Subject: Re: [EGIT PATCH] Fix invalid menubar and toolbar entries in plugin.xml
Message-ID: <48A4A6F8.3060205@gmail.com>
URL: https://gitlist.dev/e/48A4A6F8.3060205%40gmail.com
In-Reply-To: <200808142242.20476.robin.rosenberg.lists@dewire.com>

```
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ø, 2008-08-14 22:07

Subject: [EGIT PATCH v2] Fix invalid menubar and toolbar entries in plugin.xml
Message-ID: <48A4AC99.7080303@gmail.com>
URL: https://gitlist.dev/e/48A4AC99.7080303%40gmail.com
In-Reply-To: <200808142242.20476.robin.rosenberg.lists@dewire.com>

```
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(-)

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

```
