diff options
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | configure.in | 12 | ||||
-rw-r--r-- | stickynotes/Makefile.am | 4 | ||||
-rw-r--r-- | stickynotes/stickynotes.c | 47 | ||||
-rw-r--r-- | stickynotes/stickynotes.h | 3 |
5 files changed, 33 insertions, 35 deletions
@@ -27,7 +27,7 @@ You need at least: scroll-keeper-0.1.4 libglade-2.4.0 libxklavier-1.13 - libwnck-2.10.0 + libmatewnck system-tools-backends-1.1.3 libgtop-2.12.0 diff --git a/configure.in b/configure.in index 0c1b0a5a..32e4be9c 100644 --- a/configure.in +++ b/configure.in @@ -20,7 +20,7 @@ LIBPANEL_REQUIRED=1.1.0 LIBPANEL3_REQUIRED=1.1.0 LIBGTOP_REQUIRED=2.11.92 LIBXKLAVIER_REQUIRED=4.0 -LIBWNCK_REQUIRED=2.9.3 +LIBMATEWNCK_REQUIRED=1.3.0 LIBMATE_DESKTOP_REQUIRED=1.1.0 LIBMATENOTIFY_REQUIRED=1.1.0 HAL_REQUIRED=0.5.3 @@ -152,12 +152,12 @@ fi AC_SUBST(MATE_SETTINGS_DAEMON_CFLAGS) AC_SUBST(MATE_SETTINGS_DAEMON_LIBS) -dnl -- check for libwnck (required) ------------------------------------------- -PKG_CHECK_MODULES(LIBWNCK, libwnck-1.0 >= $LIBWNCK_REQUIRED,, - AC_MSG_ERROR([libwnck is required to build mate-applets.], 1)) +dnl -- check for libmatewnck (required) ------------------------------------------- +PKG_CHECK_MODULES(LIBMATEWNCK, libmatewnck >= $LIBMATEWNCK_REQUIRED,, + AC_MSG_ERROR([libmatewnck is required to build mate-applets.], 1)) -AC_SUBST(LIBWNCK_CFLAGS) -AC_SUBST(LIBWNCK_LIBS) +AC_SUBST(LIBMATEWNCK_CFLAGS) +AC_SUBST(LIBMATEWNCK_LIBS) dnl -- check for libmatenotify (optional) ----------------------------------------- LIBMATENOTIFY_CFLAGS= 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 |