[gnome-applets] sticky-notes: port to WnckHandle
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] sticky-notes: port to WnckHandle
- Date: Sun, 2 Oct 2022 14:30:48 +0000 (UTC)
commit b1077422c8b642f58bcd81c9d2b4c5d44babbf04
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Oct 2 14:34:37 2022 +0300
sticky-notes: port to WnckHandle
configure.ac | 2 +-
gnome-applets/sticky-notes/sticky-notes.c | 8 ++++++--
2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4bd7e46c4..b455b0a02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,7 +64,7 @@ GLIB_REQUIRED=2.44.0
GIO_REQUIRED=2.26.0
LIBGNOME_PANEL_REQUIRED=3.41.1
LIBGTOP_REQUIRED=2.11.92
-LIBWNCK_REQUIRED=3.14.1
+LIBWNCK_REQUIRED=43.0
LIBNOTIFY_REQUIRED=0.7
UPOWER_REQUIRED=0.99.8
ADWAITA_ICON_THEME_REQUIRED=3.14.0
diff --git a/gnome-applets/sticky-notes/sticky-notes.c b/gnome-applets/sticky-notes/sticky-notes.c
index 5d2b5e2e4..820cc95c8 100644
--- a/gnome-applets/sticky-notes/sticky-notes.c
+++ b/gnome-applets/sticky-notes/sticky-notes.c
@@ -1145,6 +1145,7 @@ stickynotes_save_now (StickyNotesApplet *applet)
char *notes_file;
xmlDocPtr doc;
xmlNodePtr root;
+ WnckHandle *wnck_handle;
WnckScreen *wnck_screen;
const gchar *title;
GtkTextBuffer *buffer;
@@ -1176,7 +1177,8 @@ stickynotes_save_now (StickyNotesApplet *applet)
xmlDocSetRootElement(doc, root);
xmlNewProp(root, XML_CHAR("version"), XML_CHAR (VERSION));
- wnck_screen = wnck_screen_get_default ();
+ wnck_handle = wnck_handle_new (WNCK_CLIENT_TYPE_APPLICATION);
+ wnck_screen = wnck_handle_get_default_screen (wnck_handle);
wnck_screen_force_update (wnck_screen);
/* For all sticky notes */
@@ -1196,7 +1198,7 @@ stickynotes_save_now (StickyNotesApplet *applet)
gchar *y_str = g_strdup_printf("%d", note->y);
xid = GDK_WINDOW_XID (gtk_widget_get_window (note->w_window));
- wnck_win = wnck_window_get (xid);
+ wnck_win = wnck_handle_get_window (wnck_handle, xid);
if (!g_settings_get_boolean (note->applet->settings, KEY_STICKY) &&
wnck_win)
@@ -1254,6 +1256,8 @@ stickynotes_save_now (StickyNotesApplet *applet)
g_free(body);
}
+ g_clear_object (&wnck_handle);
+
{
char *tmp_file;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]