summaryrefslogtreecommitdiff
path: root/applets/wncklet/showdesktop.c
diff options
context:
space:
mode:
Diffstat (limited to 'applets/wncklet/showdesktop.c')
-rw-r--r--applets/wncklet/showdesktop.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/applets/wncklet/showdesktop.c b/applets/wncklet/showdesktop.c
index 2917e4bc..6a268135 100644
--- a/applets/wncklet/showdesktop.c
+++ b/applets/wncklet/showdesktop.c
@@ -21,8 +21,6 @@
* 02111-1307, USA.
*/
-#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -32,7 +30,7 @@
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
-#include <libwnck/screen.h>
+#include <libmatewnck/screen.h>
#include "wncklet.h"
#include "showdesktop.h"
@@ -52,7 +50,7 @@ typedef struct {
GtkOrientation orient;
int size;
- WnckScreen* wnck_screen;
+ MatewnckScreen* matewnck_screen;
guint showing_desktop: 1;
guint button_activate;
@@ -70,7 +68,7 @@ static void update_button_display(ShowDesktopData* sdd);
static void theme_changed_callback(GtkIconTheme* icon_theme, ShowDesktopData* sdd);
static void button_toggled_callback(GtkWidget* button, ShowDesktopData* sdd);
-static void show_desktop_changed_callback(WnckScreen* screen, ShowDesktopData* sdd);
+static void show_desktop_changed_callback(MatewnckScreen* screen, ShowDesktopData* sdd);
/* this is when the panel orientation changes */
@@ -281,10 +279,10 @@ static void applet_destroyed(GtkWidget* applet, ShowDesktopData* sdd)
sdd->button_activate = 0;
}
- if (sdd->wnck_screen != NULL)
+ if (sdd->matewnck_screen != NULL)
{
- g_signal_handlers_disconnect_by_func(sdd->wnck_screen, show_desktop_changed_callback, sdd);
- sdd->wnck_screen = NULL;
+ g_signal_handlers_disconnect_by_func(sdd->matewnck_screen, show_desktop_changed_callback, sdd);
+ sdd->matewnck_screen = NULL;
}
if (sdd->icon_theme != NULL)
@@ -343,21 +341,21 @@ static void show_desktop_applet_realized(MatePanelApplet* applet, gpointer data)
sdd = (ShowDesktopData*) data;
- if (sdd->wnck_screen != NULL)
- g_signal_handlers_disconnect_by_func(sdd->wnck_screen, show_desktop_changed_callback, sdd);
+ if (sdd->matewnck_screen != NULL)
+ g_signal_handlers_disconnect_by_func(sdd->matewnck_screen, show_desktop_changed_callback, sdd);
if (sdd->icon_theme != NULL)
g_signal_handlers_disconnect_by_func(sdd->icon_theme, theme_changed_callback, sdd);
screen = gtk_widget_get_screen(sdd->applet);
- sdd->wnck_screen = wnck_screen_get(gdk_screen_get_number (screen));
+ sdd->matewnck_screen = matewnck_screen_get(gdk_screen_get_number (screen));
- if (sdd->wnck_screen != NULL)
- wncklet_connect_while_alive(sdd->wnck_screen, "showing_desktop_changed", G_CALLBACK(show_desktop_changed_callback), sdd, sdd->applet);
+ if (sdd->matewnck_screen != NULL)
+ wncklet_connect_while_alive(sdd->matewnck_screen, "showing_desktop_changed", G_CALLBACK(show_desktop_changed_callback), sdd, sdd->applet);
else
- g_warning("Could not get WnckScreen!");
+ g_warning("Could not get MatewnckScreen!");
- show_desktop_changed_callback(sdd->wnck_screen, sdd);
+ show_desktop_changed_callback(sdd->matewnck_screen, sdd);
sdd->icon_theme = gtk_icon_theme_get_for_screen (screen);
wncklet_connect_while_alive(sdd->icon_theme, "changed", G_CALLBACK(theme_changed_callback), sdd, sdd->applet);
@@ -522,16 +520,16 @@ static void button_toggled_callback(GtkWidget* button, ShowDesktopData* sdd)
return;
}
- if (sdd->wnck_screen != NULL)
- wnck_screen_toggle_showing_desktop(sdd->wnck_screen, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)));
+ if (sdd->matewnck_screen != NULL)
+ matewnck_screen_toggle_showing_desktop(sdd->matewnck_screen, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)));
update_button_display (sdd);
}
-static void show_desktop_changed_callback(WnckScreen* screen, ShowDesktopData* sdd)
+static void show_desktop_changed_callback(MatewnckScreen* screen, ShowDesktopData* sdd)
{
- if (sdd->wnck_screen != NULL)
- sdd->showing_desktop = wnck_screen_get_showing_desktop(sdd->wnck_screen);
+ if (sdd->matewnck_screen != NULL)
+ sdd->showing_desktop = matewnck_screen_get_showing_desktop(sdd->matewnck_screen);
update_button_state (sdd);
}