[glom/glom-1-28] UiUtils::show_report_in_browser(): Pass the GdkScreen to gtk_show_uri().



commit 93bb5e389ba5e36c4461080634b1ffd1cfdd021f
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Mar 7 20:01:17 2016 +0100

    UiUtils::show_report_in_browser(): Pass the GdkScreen to gtk_show_uri().

 glom/utils_ui.cc |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/glom/utils_ui.cc b/glom/utils_ui.cc
index 06965c0..29e23c7 100644
--- a/glom/utils_ui.cc
+++ b/glom/utils_ui.cc
@@ -516,7 +516,12 @@ void UiUtils::show_report_in_browser(const std::string& filepath, Gtk::Window* p
 
   //Use the GNOME browser:
   GError* gerror = 0;
-  if(!gtk_show_uri(0 /* screen */, uri.c_str(), GDK_CURRENT_TIME, &gerror))
+  Glib::RefPtr<Gdk::Screen> screen;
+  if(parent_window)
+    screen = parent_window->get_screen();
+
+  if(!gtk_show_uri(screen ? screen->gobj() : 0,
+    uri.c_str(), GDK_CURRENT_TIME, &gerror))
   {
     std::cerr << G_STRFUNC << ": " << gerror->message << std::endl;
     g_error_free(gerror);


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