diff options
author | Ungureanu Marius <teromario@yahoo.com> | 2014-02-06 04:51:19 +0400 |
---|---|---|
committer | Ungureanu Marius <teromario@yahoo.com> | 2014-02-06 04:51:19 +0400 |
commit | 52d437062c8b90bdd0917181093bb2f2fcbe22ff (patch) | |
tree | 20e8f16dd136b4965988cc638b13804ee95c290f /Mono.Addins.Gui | |
parent | 64a45d96f39d4714ec85adf0fe04b68ec7273ae1 (diff) |
Bug 17056 - Add-ins Repo should automatically load when first launched
Diffstat (limited to 'Mono.Addins.Gui')
-rw-r--r-- | Mono.Addins.Gui/Mono.Addins.Gui/AddinManagerDialog.cs | 19 | ||||
-rw-r--r-- | Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.AddinManagerDialog.cs | 1 | ||||
-rw-r--r-- | Mono.Addins.Gui/gtk-gui/gui.stetic | 1 |
3 files changed, 19 insertions, 2 deletions
diff --git a/Mono.Addins.Gui/Mono.Addins.Gui/AddinManagerDialog.cs b/Mono.Addins.Gui/Mono.Addins.Gui/AddinManagerDialog.cs index 23edc50..e9a4384 100644 --- a/Mono.Addins.Gui/Mono.Addins.Gui/AddinManagerDialog.cs +++ b/Mono.Addins.Gui/Mono.Addins.Gui/AddinManagerDialog.cs @@ -51,6 +51,8 @@ namespace Mono.Addins.Gui Label installedTabLabel; Label updatesTabLabel; Label galleryTabLabel; + + bool firstLoad = true; const string AllRepoMarker = "__ALL"; const string ManageRepoMarker = "__MANAGE"; @@ -412,8 +414,8 @@ namespace Mono.Addins.Gui { UpdateAddinInfo (); } - - protected virtual void OnButtonRefreshClicked (object sender, System.EventArgs e) + + void UpdateRepositories () { ProgressDialog pdlg = new ProgressDialog (this); pdlg.Show (); @@ -434,6 +436,11 @@ namespace Mono.Addins.Gui Thread.Sleep (50); } pdlg.Destroy (); + } + + protected virtual void OnButtonRefreshClicked (object sender, System.EventArgs e) + { + UpdateRepositories (); LoadGallery (); LoadUpdates (); } @@ -548,5 +555,13 @@ namespace Mono.Addins.Gui idlg.Destroy (); } } + + protected void OnNotebookSwitchPage (object o, SwitchPageArgs args) + { + if (args.PageNum == 2 && firstLoad) { + UpdateRepositories (); + firstLoad = false; + } + } } } diff --git a/Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.AddinManagerDialog.cs b/Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.AddinManagerDialog.cs index 013c027..d619ccd 100644 --- a/Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.AddinManagerDialog.cs +++ b/Mono.Addins.Gui/gtk-gui/Mono.Addins.Gui.AddinManagerDialog.cs @@ -358,6 +358,7 @@ namespace Mono.Addins.Gui this.Child.ShowAll (); } this.Hide (); + this.notebook.SwitchPage += new global::Gtk.SwitchPageHandler (this.OnNotebookSwitchPage); this.addininfoInstalled.InstallClicked += new global::System.EventHandler (this.OnInstallClicked); this.addininfoInstalled.UninstallClicked += new global::System.EventHandler (this.OnUninstallClicked); this.addininfoInstalled.UpdateClicked += new global::System.EventHandler (this.OnUpdateClicked); diff --git a/Mono.Addins.Gui/gtk-gui/gui.stetic b/Mono.Addins.Gui/gtk-gui/gui.stetic index e9cc576..39dc435 100644 --- a/Mono.Addins.Gui/gtk-gui/gui.stetic +++ b/Mono.Addins.Gui/gtk-gui/gui.stetic @@ -181,6 +181,7 @@ <property name="CanFocus">True</property> <property name="CurrentPage">0</property> <property name="ShowBorder">False</property> + <signal name="SwitchPage" handler="OnNotebookSwitchPage" /> <child> <widget class="Gtk.HBox" id="hbox2"> <property name="MemberName" /> |