diff options
Diffstat (limited to 'stickynotes')
-rw-r--r-- | stickynotes/Makefile.am | 4 | ||||
-rw-r--r-- | stickynotes/stickynotes.c | 47 | ||||
-rw-r--r-- | stickynotes/stickynotes.h | 3 |
3 files changed, 26 insertions, 28 deletions
diff --git a/stickynotes/Makefile.am b/stickynotes/Makefile.am index 3f0f95d6..612e8687 100644 --- a/stickynotes/Makefile.am +++ b/stickynotes/Makefile.am @@ -13,7 +13,7 @@ INCLUDES = \ -I. \ -I$(srcdir) \ $(MATE_APPLETS3_CFLAGS) \ - $(LIBWNCK_CFLAGS) \ + $(LIBMATEWNCK_CFLAGS) \ $(XML2_CFLAGS) \ -DSTICKYNOTES_MENU_UI_DIR=\""$(uidir)"\"\ -DSTICKYNOTES_ICONDIR=\"$(datadir)/pixmaps/mate-stickynotes/\" @@ -34,7 +34,7 @@ stickynotes_applet_SOURCES = \ stickynotes_applet_LDADD = \ $(MATE_APPLETS3_LIBS) \ - $(LIBWNCK_LIBS) \ + $(LIBMATEWNCK_LIBS) \ $(XML2_LIBS) \ -lX11 diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c index 11448623..418115ba 100644 --- a/stickynotes/stickynotes.c +++ b/stickynotes/stickynotes.c @@ -21,8 +21,7 @@ #include <libxml/parser.h> #include <X11/Xatom.h> #include <gdk/gdkx.h> -#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1 -#include <libwnck/libwnck.h> +#include <libmatewnck/libmatewnck.h> #include <string.h> #include "stickynotes.h" @@ -37,7 +36,7 @@ static gboolean save_scheduled = FALSE; static void response_cb (GtkWidget *dialog, gint id, gpointer data); -/* Based on a function found in wnck */ +/* Based on a function found in matewnck */ static void set_icon_geometry (GdkWindow *window, int x, @@ -662,23 +661,23 @@ stickynote_set_visible (StickyNote *note, gboolean visible) else if (note->workspace > 0) { #if 0 - WnckWorkspace *wnck_ws; + MatewnckWorkspace *matewnck_ws; gulong xid; - WnckWindow *wnck_win; - WnckScreen *wnck_screen; + MatewnckWindow *matewnck_win; + MatewnckScreen *matewnck_screen; g_print ("set_visible(): workspace = %i\n", note->workspace); xid = GDK_WINDOW_XID (note->w_window->window); - wnck_screen = wnck_screen_get_default (); - wnck_win = wnck_window_get (xid); - wnck_ws = wnck_screen_get_workspace ( - wnck_screen, + matewnck_screen = matewnck_screen_get_default (); + matewnck_win = matewnck_window_get (xid); + matewnck_ws = matewnck_screen_get_workspace ( + matewnck_screen, note->workspace - 1); - if (wnck_win && wnck_ws) - wnck_window_move_to_workspace ( - wnck_win, wnck_ws); + if (matewnck_win && matewnck_ws) + matewnck_window_move_to_workspace ( + matewnck_win, matewnck_ws); else g_print ("set_visible(): errr\n"); #endif @@ -745,7 +744,7 @@ void stickynotes_remove(StickyNote *note) gboolean stickynotes_save_now (void) { - WnckScreen *wnck_screen; + MatewnckScreen *matewnck_screen; const gchar *title; GtkTextBuffer *buffer; GtkTextIter start, end; @@ -760,12 +759,12 @@ stickynotes_save_now (void) xmlDocSetRootElement(doc, root); xmlNewProp(root, XML_CHAR("version"), XML_CHAR (VERSION)); - wnck_screen = wnck_screen_get_default (); - wnck_screen_force_update (wnck_screen); + matewnck_screen = matewnck_screen_get_default (); + matewnck_screen_force_update (matewnck_screen); /* For all sticky notes */ for (i = 0; i < g_list_length(stickynotes->notes); i++) { - WnckWindow *wnck_win; + MatewnckWindow *matewnck_win; gulong xid = 0; /* Access the current note in the list */ @@ -780,14 +779,14 @@ stickynotes_save_now (void) 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); + matewnck_win = matewnck_window_get (xid); if (!mateconf_client_get_bool (stickynotes->mateconf, MATECONF_PATH "/settings/sticky", NULL) && - wnck_win) + matewnck_win) note->workspace = 1 + - wnck_workspace_get_number ( - wnck_window_get_workspace (wnck_win)); + matewnck_workspace_get_number ( + matewnck_window_get_workspace (matewnck_win)); else note->workspace = 0; @@ -876,7 +875,7 @@ stickynotes_load (GdkScreen *screen) xmlDocPtr doc = NULL; xmlNodePtr root; xmlNodePtr node; - /* WnckScreen *wnck_screen; */ + /* MatewnckScreen *matewnck_screen; */ GList *new_notes, *tmp1; /* Lists of StickyNote*'s */ GList *new_nodes; /* Lists of xmlNodePtr's */ int x, y, w, h; @@ -1064,8 +1063,8 @@ stickynotes_load (GdkScreen *screen) tmp1 = new_notes; /* - wnck_screen = wnck_screen_get_default (); - wnck_screen_force_update (wnck_screen); + matewnck_screen = matewnck_screen_get_default (); + matewnck_screen_force_update (matewnck_screen); */ while (tmp1) diff --git a/stickynotes/stickynotes.h b/stickynotes/stickynotes.h index 0e64c735..2e2f3b39 100644 --- a/stickynotes/stickynotes.h +++ b/stickynotes/stickynotes.h @@ -20,8 +20,7 @@ #ifndef __STICKYNOTES_H__ #define __STICKYNOTES_H__ -#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1 -#include <libwnck/libwnck.h> +#include <libmatewnck/libmatewnck.h> #include <stickynotes_applet.h> typedef struct |