mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-06-30 23:29:33 +00:00
retrieve correctly the parent window for context menus
This commit is contained in:
parent
c2c52f5b9a
commit
25fd23996d
|
@ -1404,7 +1404,7 @@ namespace GitgCommit
|
|||
|
||||
private void do_edit_items(Gitg.StageStatusItem[] items)
|
||||
{
|
||||
var screen = d_main.get_screen();
|
||||
var window = (Gtk.Window)d_main.get_toplevel();
|
||||
var root = application.repository.get_workdir();
|
||||
|
||||
foreach (var item in items)
|
||||
|
@ -1413,7 +1413,7 @@ namespace GitgCommit
|
|||
|
||||
try
|
||||
{
|
||||
Gtk.show_uri(screen, file.get_uri(), Gdk.CURRENT_TIME);
|
||||
Gtk.show_uri_on_window(window, file.get_uri(), Gdk.CURRENT_TIME);
|
||||
}
|
||||
catch (Error e)
|
||||
{
|
||||
|
|
|
@ -244,7 +244,7 @@ class Gitg.DiffViewFile : Gtk.Grid
|
|||
open_file.activate.connect(() => {
|
||||
try
|
||||
{
|
||||
Gtk.show_uri_on_window((Gtk.Window)d_expander.get_window(), location.get_uri(), Gdk.CURRENT_TIME);
|
||||
Gtk.show_uri_on_window((Gtk.Window)d_expander.get_toplevel(), location.get_uri(), Gdk.CURRENT_TIME);
|
||||
}
|
||||
catch (Error e)
|
||||
{
|
||||
|
@ -260,7 +260,7 @@ class Gitg.DiffViewFile : Gtk.Grid
|
|||
open_folder.activate.connect(() => {
|
||||
try
|
||||
{
|
||||
Gtk.show_uri_on_window((Gtk.Window)d_expander.get_window(), location.get_parent().get_uri(), Gdk.CURRENT_TIME);
|
||||
Gtk.show_uri_on_window((Gtk.Window)d_expander.get_toplevel(), location.get_parent().get_uri(), Gdk.CURRENT_TIME);
|
||||
}
|
||||
catch (Error e)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user