Skip to contentSkip to conversation

Fix invalid menubar and toolbar entries in plugin.xml

PATCH In review Tor Arne Vestbø 2 participants 8 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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'.

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).

---
 org.spearce.egit.ui/plugin.properties |    2 +-
 org.spearce.egit.ui/plugin.xml        |   18 ++++--------------
 2 files changed, 5 insertions(+), 15 deletions(-)
org.spearce.egit.ui/plugin.properties +1 -1
index 3240ec0..ce3b058 100644
@@ -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
 
 
org.spearce.egit.ui/plugin.xml +4 -14
index 393121f..97eb2a6 100644
@@ -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>
Signature · 1 line
1.5.6.5
#1 lore raw

onsdagen den 13 augusti 2008 21.07.54 skrev Tor Arne Vestbø:

Quoted 5 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

#2 lore raw

torsdagen den 14 augusti 2008 07.47.35 skrev Robin Rosenberg:

Quoted 11 lines

onsdagen den 13 augusti 2008 21.07.54 skrev Tor Arne Vestbø:

Quoted 5 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.

When I applied this patch the Git menu disappeared. (3.3)

-- robin

#3 lore raw
Quoted 4 lines · Robin Rosenberg
Quoted 2 lines
Quoted 2 lines

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

#4 lore raw

torsdagen den 14 augusti 2008 21.13.51 skrev Tor Arne Vestbø:

Quoted 9 lines
Quoted 4 lines · Robin Rosenberg
Quoted 2 lines
Quoted 2 lines

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.

Quoted 2 lines

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.

Quoted 1 line

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.

Quoted 1 line

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.

Quoted 1 line

In the long run we should probably also move the global toolbar entries

No.

Quoted 2 lines

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.

Quoted 3 lines

Tor Arne

-- robin

#5 lore raw

PATCH 1/1 Hide the Git menu and toolbars by default and fix the path of the Git menu

---
 org.spearce.egit.ui/plugin.xml |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
org.spearce.egit.ui/plugin.xml +2 -2
index b809300..a52495b 100644
@@ -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
Signature · 1 line
1.6.0.rc2.35.g04c6e9
#6 lore raw
In reply to Robin Rosenberg
Quoted 3 lines · Robin Rosenberg
Quoted 2 lines

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

#7 lore raw

PATCH v2 1/1 Fix invalid menubar and toolbar entries in plugin.xml

In reply to Robin Rosenberg

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).

---
 org.spearce.egit.ui/plugin.properties |    2 +-
 org.spearce.egit.ui/plugin.xml        |   23 +++++++++++++----------
 2 files changed, 14 insertions(+), 11 deletions(-)
org.spearce.egit.ui/plugin.properties +1 -1
index 3240ec0..ce3b058 100644
@@ -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
 
 
org.spearce.egit.ui/plugin.xml +13 -10
index b809300..0b59a6e 100644
@@ -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>
Signature · 1 line
1.5.6.5