summaryrefslogtreecommitdiff
path: root/src/eom-metadata-sidebar.c
diff options
context:
space:
mode:
authorTimm B├Ąder <[email protected]>2018-01-26 11:52:08 +0100
committerraveit65 <[email protected]>2018-07-23 23:14:12 +0200
commit416dc9be3cdfb8e2eb5c07f17f2ce4bb7a9848dc (patch)
treec5cec881c7420daf181dc410671d2910f88ee3b6 /src/eom-metadata-sidebar.c
parent4115f76df9da09cecdf44f0be95b6f8ea3793060 (diff)
downloadeom-416dc9be3cdfb8e2eb5c07f17f2ce4bb7a9848dc.tar.bz2
eom-416dc9be3cdfb8e2eb5c07f17f2ce4bb7a9848dc.tar.xz
util: Port to gtk_show_uri_on_window
gtk_show_uri is deprecated and will be removed in later versions. https://bugzilla.gnome.org/show_bug.cgi?id=792923 origin commit: https://gitlab.gnome.org/GNOME/eog/commit/77f16df
Diffstat (limited to 'src/eom-metadata-sidebar.c')
-rw-r--r--src/eom-metadata-sidebar.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/eom-metadata-sidebar.c b/src/eom-metadata-sidebar.c
index 018269b..e6d2cce 100644
--- a/src/eom-metadata-sidebar.c
+++ b/src/eom-metadata-sidebar.c
@@ -429,16 +429,22 @@ _folder_button_clicked_cb (GtkButton *button, gpointer user_data)
{
EomMetadataSidebarPrivate *priv = EOM_METADATA_SIDEBAR(user_data)->priv;
EomImage *img;
- GdkScreen *screen;
+ GtkWidget *toplevel;
+ GtkWindow *window;
GFile *file;
g_return_if_fail (priv->parent_window != NULL);
img = eom_window_get_image (priv->parent_window);
- screen = gtk_widget_get_screen (GTK_WIDGET (priv->parent_window));
file = eom_image_get_file (img);
- eom_util_show_file_in_filemanager (file, screen);
+ toplevel = gtk_widget_get_toplevel (GTK_WIDGET (button));
+ if (GTK_IS_WINDOW (toplevel))
+ window = GTK_WINDOW (toplevel);
+ else
+ window = NULL;
+
+ eom_util_show_file_in_filemanager (file, window);
g_object_unref (file);
}