[sysprof] app: use gtk_show_uri_on_window()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] app: use gtk_show_uri_on_window()
- Date: Mon, 20 Mar 2017 04:47:12 +0000 (UTC)
commit fc5dee0ab55803e9e230fd45cdd6b8eedf4e3b5f
Author: Christian Hergert <chergert redhat com>
Date: Sun Mar 19 21:46:54 2017 -0700
app: use gtk_show_uri_on_window()
We need the window so that placement is correct on wayland. Also, to avoid
the deprecated API.
src/sp-application.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/src/sp-application.c b/src/sp-application.c
index 17b1d0d..5e2c0da 100644
--- a/src/sp-application.c
+++ b/src/sp-application.c
@@ -197,10 +197,18 @@ sysprof_help (GSimpleAction *action,
GVariant *param,
gpointer user_data)
{
- gtk_show_uri (gdk_screen_get_default (),
- "help:sysprof",
- gtk_get_current_event_time (),
- NULL);
+ SpApplication *self = user_data;
+ GtkWindow *window;
+
+ g_assert (SP_IS_APPLICATION (self));
+ g_assert (G_IS_SIMPLE_ACTION (action));
+
+ window = gtk_application_get_active_window (GTK_APPLICATION (self));
+
+ gtk_show_uri_on_window (window,
+ "help:sysprof",
+ gtk_get_current_event_time (),
+ NULL);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]