[longomatch] Remove the empty entry that was created for import projects
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Remove the empty entry that was created for import projects
- Date: Thu, 8 Nov 2012 21:48:25 +0000 (UTC)
commit e47a757a338a9f241596a5126c0587ceb2ec7f57
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Nov 7 22:00:54 2012 +0100
Remove the empty entry that was created for import projects
LongoMatch.GUI/Gui/MainWindow.cs | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index a014805..0064cfc 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -135,6 +135,8 @@ namespace LongoMatch.Gui
if (!Config.useGameUnits)
GameUnitsViewAction.Visible = false;
+ MenuItem parent = ImportProjectActionMenu;
+ parent.Submenu = new Menu();
AddImportEntry(Catalog.GetString("Import file project"), "ImportFileProject",
Constants.PROJECT_NAME + " (" + Constants.PROJECT_EXT + ")",
"*" + Constants.PROJECT_EXT, Project.Import,
@@ -221,8 +223,7 @@ namespace LongoMatch.Gui
public void AddImportEntry (string name, string shortName, string filterName,
string filter, Func<string, Project> importFunc,
bool requiresNewFile) {
- MenuItem parent = (MenuItem) this.UIManager.GetWidget("/menubar1/FileAction/ImportProjectAction");
-
+ MenuItem parent = ImportProjectActionMenu;
MenuItem item = new MenuItem(name);
item.Activated += (sender, e) => (EmitImportProject(name, filterName, filter, importFunc, requiresNewFile));
item.Show();
@@ -232,6 +233,12 @@ namespace LongoMatch.Gui
#region Private Methods
+ MenuItem ImportProjectActionMenu {
+ get {
+ return (MenuItem) this.UIManager.GetWidget("/menubar1/FileAction/ImportProjectAction");
+ }
+ }
+
private void ConnectSignals() {
/* Adding Handlers for each event */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]