diff options
Diffstat (limited to 'stickynotes')
-rw-r--r-- | stickynotes/Makefile.am | 6 | ||||
-rw-r--r-- | stickynotes/data/MATE_StickyNotesApplet.server.in | 24 | ||||
-rw-r--r-- | stickynotes/data/Makefile.am | 19 | ||||
-rw-r--r-- | stickynotes/stickynotes.c | 18 | ||||
-rw-r--r-- | stickynotes/stickynotes_applet_callbacks.c | 12 | ||||
-rw-r--r-- | stickynotes/util.c | 10 |
6 files changed, 9 insertions, 80 deletions
diff --git a/stickynotes/Makefile.am b/stickynotes/Makefile.am index df6f8292..2b10fd29 100644 --- a/stickynotes/Makefile.am +++ b/stickynotes/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = pixmaps docs data +SUBDIRS = pixmaps docs ui_files = stickynotes-applet-menu.xml builder_files = stickynotes.ui @@ -14,6 +14,7 @@ AM_CPPFLAGS = \ -I$(srcdir) \ $(STICKYNOTES_CFLAGS) \ $(MATE_APPLETS4_CFLAGS) \ + $(MATEDESKTOP_CFLAGS) \ $(LIBWNCK_CFLAGS) \ $(XML2_CFLAGS) \ -DSTICKYNOTES_MENU_UI_DIR=\""$(uidir)"\"\ @@ -36,13 +37,14 @@ stickynotes_applet_SOURCES = \ stickynotes_applet_LDADD = \ $(STICKYNOTES_LIBS) \ $(MATE_APPLETS4_LIBS) \ + $(MATEDESKTOP_LIBS) \ $(LIBWNCK_LIBS) \ $(XML2_LIBS) \ -lX11 builder_DATA = $(builder_files) -uidir = $(datadir)/mate-2.0/ui +uidir = $(datadir)/mate/ui ui_DATA = $(ui_files) @INTLTOOL_XML_NOMERGE_RULE@ diff --git a/stickynotes/data/MATE_StickyNotesApplet.server.in b/stickynotes/data/MATE_StickyNotesApplet.server.in deleted file mode 100644 index a96cce74..00000000 --- a/stickynotes/data/MATE_StickyNotesApplet.server.in +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0"?> -<!-- This file was installed to automatically upgrade your machine from using - stickynotes to using Tomboy. - - If you wish to continue using stickynotes, please recompile MATE-Applets - with -enable-stickynotes and your stickynotes applets should reappear. ---> - -<oaf_info> - <oaf_server iid="OAFIID:MATE_StickyNotesApplet" type="factory" location="OAFIID:TomboyApplet_Factory"> - <oaf_attribute name="repo_ids" type="stringv"> - <item value="IDL:MATE/Vertigo/MatePanelAppletShell:1.0"/> - <item value="IDL:MateComponent/Control:1.0"/> - <item value="IDL:MateComponent/Unknown:1.0"/> - </oaf_attribute> - <oaf_attribute name="name" type="string" _value="Tomboy (ne Stickynotes)"/> - <oaf_attribute name="description" type="string" _value="Tomboy (transparent upgrade from stickynotes)"/> - <oaf_attribute name="bugzilla:bugzilla" type="string" value="MATE"/> - <oaf_attribute name="bugzilla:product" type="string" value="mate-applets"/> - <oaf_attribute name="bugzilla:component" type="string" value="stickynotes"/> - <oaf_attribute name="bugzilla:other_binaries" type="string" value="stickynotes_applet"/> - </oaf_server> -</oaf_info> - diff --git a/stickynotes/data/Makefile.am b/stickynotes/data/Makefile.am deleted file mode 100644 index 194d08f9..00000000 --- a/stickynotes/data/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -# install the upgrading .server file -# - -server_in_files = \ - MATE_StickyNotesApplet.server.in - -if BUILD_STICKYNOTES_APPLET -else -serverdir = $(libdir)/matecomponent/servers -server_DATA = $(server_in_files:.server.in=.server) - -@INTLTOOL_SERVER_RULE@ - -CLEANFILES = $(server_DATA) - -endif -EXTRA_DIST = $(server_in_files) - --include $(top_srcdir)/git.mk diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c index d4e82ace..2a2cad17 100644 --- a/stickynotes/stickynotes.c +++ b/stickynotes/stickynotes.c @@ -54,12 +54,7 @@ set_icon_geometry (GdkWindow *window, int height) { gulong data[4]; -#if GTK_CHECK_VERSION (3, 0, 0) Display *dpy = gdk_x11_display_get_xdisplay (gdk_window_get_display (window)); -#else - Display *dpy = gdk_x11_drawable_get_xdisplay (window); -#endif - data[0] = x; data[1] = y; data[2] = width; @@ -68,11 +63,7 @@ set_icon_geometry (GdkWindow *window, XChangeProperty (dpy, GDK_WINDOW_XID (window), gdk_x11_get_xatom_by_name_for_display ( -#if GTK_CHECK_VERSION (3, 0, 0) gdk_window_get_display (window), -#else - gdk_drawable_get_display (window), -#endif "_NET_WM_ICON_GEOMETRY"), XA_CARDINAL, 32, PropModeReplace, (guchar *)&data, 4); @@ -838,11 +829,7 @@ stickynotes_save_now (void) /* The XML file is $HOME/.config/mate/stickynotes-applet, most probably */ { - #if GLIB_CHECK_VERSION(2, 6, 0) gchar* file = g_build_filename(g_get_user_config_dir(), "mate", "stickynotes-applet.xml", NULL); - #else // glib version < 2.6.0 - gchar* file = g_build_filename(g_get_home_dir(), ".config", "mate", "stickynotes-applet.xml", NULL); - #endif xmlSaveFormatFile(file, doc, 1); @@ -879,12 +866,7 @@ stickynotes_load (GdkScreen *screen) int x, y, w, h; /* The XML file is $HOME/.config/mate/stickynotes-applet, most probably */ { - /* retro-compatibilidad con ~/.mate2/ */ - #if GLIB_CHECK_VERSION(2, 6, 0) gchar* file = g_build_filename(g_get_user_config_dir(), "mate", "stickynotes-applet.xml", NULL); - #else // glib version < 2.6.0 - gchar* file = g_build_filename(g_get_home_dir(), ".config", "mate", "stickynotes-applet.xml", NULL); - #endif if (g_file_test(file, G_FILE_TEST_EXISTS)) { diff --git a/stickynotes/stickynotes_applet_callbacks.c b/stickynotes/stickynotes_applet_callbacks.c index 980b9a10..038509eb 100644 --- a/stickynotes/stickynotes_applet_callbacks.c +++ b/stickynotes/stickynotes_applet_callbacks.c @@ -27,6 +27,7 @@ #endif #include <X11/Xatom.h> #include <gdk/gdkx.h> +#include <libmate-desktop/mate-aboutdialog.h> static gboolean get_desktop_window (Window *window) { @@ -167,14 +168,9 @@ void install_check_click_on_desktop (void) return; } -#if GTK_CHECK_VERSION (3, 0, 0) /* Access the desktop window. desktop_window is the root window for the * default screen, so we know using gdk_display_get_default() is correct. */ window = gdk_x11_window_foreign_new_for_display (gdk_display_get_default (), desktop_window); -#else - /* Access the desktop window */ - window = gdk_window_foreign_new (desktop_window); -#endif /* It may contain an atom to tell us which other window to monitor */ user_time_window = gdk_x11_get_xatom_by_name ("_NET_WM_USER_TIME_WINDOW"); @@ -202,11 +198,7 @@ void install_check_click_on_desktop (void) { /* We have another window to monitor */ desktop_window = *data; -#if GTK_CHECK_VERSION (3, 0, 0) window = gdk_x11_window_foreign_new_for_display (gdk_window_get_display (window), desktop_window); -#else - window = gdk_window_foreign_new (desktop_window); -#endif } } } @@ -432,7 +424,7 @@ menu_about_cb (GtkAction *action, NULL }; - gtk_show_about_dialog (NULL, + mate_show_about_dialog (NULL, "version", VERSION, "copyright", "\xC2\xA9 2002-2003 Loban A Rahman, " "\xC2\xA9 2005 Davyd Madeley", diff --git a/stickynotes/util.c b/stickynotes/util.c index 6748c7fc..9f395093 100644 --- a/stickynotes/util.c +++ b/stickynotes/util.c @@ -28,10 +28,6 @@ #include <gdk/gdkx.h> #include <gtk/gtk.h> -#if GTK_CHECK_VERSION (3, 0, 0) -#define GDK_WINDOW_XWINDOW GDK_WINDOW_XID -#endif - /* Returns the current date in a customizable form, the default * looks like this: "Nov 30, '78" */ gchar * get_current_date(const gchar *format) @@ -92,9 +88,9 @@ xstuff_get_current_workspace (GtkWindow *window) int retval; Display *gdk_display; - root_window = GDK_WINDOW_XWINDOW (gdk_screen_get_root_window ( + root_window = GDK_WINDOW_XID (gdk_screen_get_root_window ( gtk_widget_get_screen (GTK_WIDGET (window)))); - root_window = GDK_WINDOW_XWINDOW (gtk_widget_get_window (GTK_WIDGET (window))); + root_window = GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window))); gdk_display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); gdk_error_trap_push (); @@ -129,7 +125,7 @@ xstuff_change_workspace (GtkWindow *window, Screen *screen; gdk_display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); - xwindow = GDK_WINDOW_XWINDOW (GDK_WINDOW (gtk_widget_get_window (GTK_WIDGET (window)))); + xwindow = GDK_WINDOW_XID (GDK_WINDOW (gtk_widget_get_window (GTK_WIDGET (window)))); screen = GDK_SCREEN_XSCREEN (gtk_widget_get_screen (GTK_WIDGET (window))); xev.xclient.type = ClientMessage; |