forked from AuroraMiddleware/gtk
Use gtk_show_uri_on_window() instead gtk_show_uri()
This commit is contained in:
parent
896f7c8ac0
commit
d3954f614c
@ -1767,18 +1767,19 @@ open_folder_cb (GSimpleAction *action,
|
||||
gpointer data)
|
||||
{
|
||||
GtkFileChooserWidget *impl = data;
|
||||
GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (impl));
|
||||
GSList *files;
|
||||
|
||||
files = get_selected_files (impl);
|
||||
|
||||
/* Sigh, just use the first one */
|
||||
if (files)
|
||||
if (files && gtk_widget_is_toplevel (toplevel))
|
||||
{
|
||||
GFile *file = files->data;
|
||||
gchar *uri;
|
||||
|
||||
uri = g_file_get_uri (file);
|
||||
gtk_show_uri (gtk_widget_get_screen (GTK_WIDGET (impl)), uri, gtk_get_current_event_time (), NULL);
|
||||
gtk_show_uri_on_window (GTK_WINDOW (toplevel), uri, gtk_get_current_event_time (), NULL);
|
||||
g_free (uri);
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ gtk_print_operation_unix_launch_preview (GtkPrintOperation *op,
|
||||
g_error_free (error);
|
||||
error = NULL;
|
||||
uri = g_filename_to_uri (filename, NULL, NULL);
|
||||
gtk_show_uri (screen, uri, GDK_CURRENT_TIME, &error);
|
||||
gtk_show_uri_on_window (parent, uri, GDK_CURRENT_TIME, &error);
|
||||
g_free (uri);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user