[gitg] Make sure to window when not started from repository
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Make sure to window when not started from repository
- Date: Fri, 1 Mar 2013 12:31:50 +0000 (UTC)
commit f9e5f87288e25f53497836bc24059bff863c1cee
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Fri Mar 1 13:15:05 2013 +0100
Make sure to window when not started from repository
gitg/gitg-application.vala | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gitg/gitg-application.vala b/gitg/gitg-application.vala
index 2db81b8..d4c8ca4 100644
--- a/gitg/gitg-application.vala
+++ b/gitg/gitg-application.vala
@@ -325,6 +325,10 @@ public class Application : Gtk.Application
string? wd = Options.command_line.get_cwd();
open(new File[] { File.new_for_path(wd) }, Options.view);
+
+ // Forcing present here covers the case where no window was opened
+ // because wd is not an actual git repository
+ present_window();
}
base.activate();
@@ -404,7 +408,7 @@ public class Application : Gtk.Application
private void present_window()
{
- /* Present the first window in the windows registered on the
+ /* Present the last window in the windows registered on the
* application. If there are no windows, then create a new empty
* window.
*/
@@ -416,7 +420,7 @@ public class Application : Gtk.Application
return;
}
- windows.data.present();
+ windows.last().data.present();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]