[gitg] retrieve correctly the parent window for context menus
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] retrieve correctly the parent window for context menus
- Date: Wed, 12 Oct 2022 09:46:25 +0000 (UTC)
commit 25fd23996d9e2f3380a8023cceebd823214b4e0a
Author: Alberto Fanjul <albertofanjul gmail com>
Date: Wed Oct 12 11:45:39 2022 +0200
retrieve correctly the parent window for context menus
gitg/commit/gitg-commit.vala | 4 ++--
libgitg/gitg-diff-view-file.vala | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gitg/commit/gitg-commit.vala b/gitg/commit/gitg-commit.vala
index e1fc374b..889b93a0 100644
--- a/gitg/commit/gitg-commit.vala
+++ b/gitg/commit/gitg-commit.vala
@@ -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)
{
diff --git a/libgitg/gitg-diff-view-file.vala b/libgitg/gitg-diff-view-file.vala
index df1514e8..371e7e29 100644
--- a/libgitg/gitg-diff-view-file.vala
+++ b/libgitg/gitg-diff-view-file.vala
@@ -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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]