[gnome-font-viewer/gnome-3-24] font-view: ensure the window exists when opening a file



commit 0beb4d974d87eb4d5c6175143e6a6c3534feb38a
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed May 17 12:11:56 2017 -0700

    font-view: ensure the window exists when opening a file
    
    We refactored the initialization path, but forgot a case where the
    window needs to be created during startup.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782738

 src/font-view.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/font-view.c b/src/font-view.c
index 21aebf4..4a216c2 100644
--- a/src/font-view.c
+++ b/src/font-view.c
@@ -88,6 +88,7 @@ static const GOptionEntry goption_options[] =
 G_DEFINE_TYPE (FontViewApplication, font_view_application, GTK_TYPE_APPLICATION);
 
 static void font_view_application_do_overview (FontViewApplication *self);
+static void ensure_window (FontViewApplication *self);
 
 #define VIEW_ITEM_WIDTH 140
 #define VIEW_ITEM_WRAP_WIDTH 128
@@ -737,6 +738,7 @@ query_info_ready_cb (GObject *object,
     GFileInfo *info;
     GError *error = NULL;
 
+    ensure_window (self);
     g_application_release (G_APPLICATION (self));
 
     info = g_file_query_info_finish (G_FILE (object), res, &error);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]