[glom] UiUtils::show_report_in_browser(): Pass the GdkScreen to gtk_show_uri().



commit 4a0d63586b01db3d1148e890f240b922d3569015
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 35adb73..141a152 100644
--- a/glom/utils_ui.cc
+++ b/glom/utils_ui.cc
@@ -546,7 +546,12 @@ void UiUtils::show_report_in_browser(const std::string& filepath, Gtk::Window* p
 
   //Use the GNOME browser:
   GError* gerror = nullptr;
-  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() : nullptr,
+    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]