summaryrefslogtreecommitdiff
path: root/mate-window-picker-applet
diff options
context:
space:
mode:
authorinfirit <[email protected]>2013-11-28 19:33:41 +0100
committerinfirit <[email protected]>2013-11-28 19:40:32 +0100
commitd2e40a5b26525f9512da4b526621264e68587e0e (patch)
tree1369a6780d4627a3c771c88302c9244297bb86e8 /mate-window-picker-applet
parentdada16021aa2f4332496592b196839dea7277dfa (diff)
downloadmate-netbook-d2e40a5b26525f9512da4b526621264e68587e0e.tar.bz2
mate-netbook-d2e40a5b26525f9512da4b526621264e68587e0e.tar.xz
Back to libwnck.
Diffstat (limited to 'mate-window-picker-applet')
-rw-r--r--mate-window-picker-applet/applet.c9
-rw-r--r--mate-window-picker-applet/task-item.c140
-rw-r--r--mate-window-picker-applet/task-item.h5
-rw-r--r--mate-window-picker-applet/task-list.c29
-rw-r--r--mate-window-picker-applet/task-title.c95
5 files changed, 141 insertions, 137 deletions
diff --git a/mate-window-picker-applet/applet.c b/mate-window-picker-applet/applet.c
index 5a7e646..be98536 100644
--- a/mate-window-picker-applet/applet.c
+++ b/mate-window-picker-applet/applet.c
@@ -28,7 +28,8 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#include <libmatewnck/libmatewnck.h>
+#define WNCK_I_KNOW_THIS_IS_UNSTABLE
+#include <libwnck/libwnck.h>
#include <gio/gio.h>
#include <mate-panel-applet.h>
@@ -138,7 +139,7 @@ cw_applet_fill (MatePanelApplet *applet,
const gchar *iid,
gpointer data)
{
- MatewnckScreen *screen;
+ WnckScreen *screen;
WinPickerApp *app;
GtkWidget *eb, *tasks, *title;
gchar *ui_path;
@@ -152,11 +153,11 @@ cw_applet_fill (MatePanelApplet *applet,
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
- matewnck_set_client_type (MATEWNCK_CLIENT_TYPE_PAGER);
+ wnck_set_client_type (WNCK_CLIENT_TYPE_PAGER);
app = g_slice_new0 (WinPickerApp);
mainapp = app;
- screen = matewnck_screen_get_default ();
+ screen = wnck_screen_get_default ();
/* prepare to disable Maximus */
object_class = G_OBJECT_GET_CLASS (G_OBJECT(applet));
diff --git a/mate-window-picker-applet/task-item.c b/mate-window-picker-applet/task-item.c
index cdcc113..a584d23 100644
--- a/mate-window-picker-applet/task-item.c
+++ b/mate-window-picker-applet/task-item.c
@@ -35,8 +35,8 @@ G_DEFINE_TYPE (TaskItem, task_item, GTK_TYPE_EVENT_BOX);
struct _TaskItemPrivate
{
- MatewnckWindow *window;
- MatewnckScreen *screen;
+ WnckWindow *window;
+ WnckScreen *screen;
GdkPixbuf *pixbuf;
GdkRectangle area;
@@ -66,13 +66,13 @@ update_hints (TaskItem *item)
{
GtkWidget *parent;
GtkWidget *widget;
- MatewnckWindow *window;
+ WnckWindow *window;
gint x, y, x1, y1;
widget = GTK_WIDGET (item);
window = item->priv->window;
/* Skip problems */
- if (!MATEWNCK_IS_WINDOW (window)) return;
+ if (!WNCK_IS_WINDOW (window)) return;
if (!GTK_IS_WIDGET (widget)) return;
/* Skip invisible windows */
@@ -99,7 +99,7 @@ update_hints (TaskItem *item)
}
/* Set the minimize hint for the window */
- matewnck_window_set_icon_geometry (window, x, y,
+ wnck_window_set_icon_geometry (window, x, y,
widget->allocation.width,
widget->allocation.height);
}
@@ -109,9 +109,9 @@ on_task_item_button_released (GtkWidget *widget,
GdkEventButton *event,
TaskItem *item)
{
- MatewnckWindow *window;
- MatewnckScreen *screen;
- MatewnckWorkspace *workspace;
+ WnckWindow *window;
+ WnckScreen *screen;
+ WnckWorkspace *workspace;
TaskItemPrivate *priv;
g_return_val_if_fail (TASK_IS_ITEM (item), TRUE);
@@ -119,25 +119,25 @@ on_task_item_button_released (GtkWidget *widget,
priv = item->priv;
window = priv->window;
- g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), TRUE);
+ g_return_val_if_fail (WNCK_IS_WINDOW (window), TRUE);
screen = priv->screen;
- workspace = matewnck_window_get_workspace (window);
+ workspace = wnck_window_get_workspace (window);
if (event->button == 1)
{
- if (MATEWNCK_IS_WORKSPACE (workspace) && workspace != matewnck_screen_get_active_workspace (screen))
+ if (WNCK_IS_WORKSPACE (workspace) && workspace != wnck_screen_get_active_workspace (screen))
{
- matewnck_workspace_activate (workspace, GDK_CURRENT_TIME);
+ wnck_workspace_activate (workspace, GDK_CURRENT_TIME);
}
- if (matewnck_window_is_active (window))
+ if (wnck_window_is_active (window))
{
- matewnck_window_minimize (window);
+ wnck_window_minimize (window);
}
else
{
- matewnck_window_activate (window, GDK_CURRENT_TIME);
+ wnck_window_activate (window, GDK_CURRENT_TIME);
}
}
return TRUE;
@@ -146,15 +146,15 @@ on_task_item_button_released (GtkWidget *widget,
static void
task_item_set_visibility (TaskItem *item)
{
- MatewnckScreen *screen;
- MatewnckWindow *window;
- MatewnckWorkspace *workspace;
+ WnckScreen *screen;
+ WnckWindow *window;
+ WnckWorkspace *workspace;
g_return_if_fail (TASK_IS_ITEM (item));
TaskItemPrivate *priv = item->priv;
- if (!MATEWNCK_IS_WINDOW (priv->window))
+ if (!WNCK_IS_WINDOW (priv->window))
{
gtk_widget_hide (GTK_WIDGET (item));
return;
@@ -163,20 +163,20 @@ task_item_set_visibility (TaskItem *item)
window = priv->window;
screen = priv->screen;
- workspace = matewnck_screen_get_active_workspace (screen);
+ workspace = wnck_screen_get_active_workspace (screen);
gboolean show_all = task_list_get_show_all_windows (TASK_LIST (task_list_get_default ()));
gboolean show_window = FALSE;
- if (!matewnck_window_is_skip_tasklist (window))
+ if (!wnck_window_is_skip_tasklist (window))
{
- if (matewnck_workspace_is_virtual (workspace))
+ if (wnck_workspace_is_virtual (workspace))
{
- show_window = matewnck_window_is_in_viewport (window, workspace);
+ show_window = wnck_window_is_in_viewport (window, workspace);
}
else
{
- show_window = matewnck_window_is_on_workspace (window, workspace);
+ show_window = wnck_window_is_on_workspace (window, workspace);
}
show_window = show_window || show_all;
}
@@ -202,16 +202,16 @@ task_item_size_request (GtkWidget *widget,
static GdkPixbuf *
task_item_sized_pixbuf_for_window (TaskItem *item,
- MatewnckWindow *window,
+ WnckWindow *window,
gint size)
{
GdkPixbuf *pbuf = NULL;
- g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), NULL);
+ g_return_val_if_fail (WNCK_IS_WINDOW (window), NULL);
- if (matewnck_window_has_icon_name (window))
+ if (wnck_window_has_icon_name (window))
{
- const gchar *icon_name = matewnck_window_get_icon_name (window);
+ const gchar *icon_name = wnck_window_get_icon_name (window);
GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
if (gtk_icon_theme_has_icon (icon_theme, icon_name))
@@ -228,7 +228,7 @@ task_item_sized_pixbuf_for_window (TaskItem *item,
if (!pbuf)
{
- pbuf = gdk_pixbuf_copy (matewnck_window_get_icon (item->priv->window));
+ pbuf = gdk_pixbuf_copy (wnck_window_get_icon (item->priv->window));
}
gint width = gdk_pixbuf_get_width (pbuf);
@@ -264,7 +264,7 @@ task_item_expose_event (GtkWidget *widget,
item = TASK_ITEM (widget);
priv = item->priv;
- g_return_val_if_fail (MATEWNCK_IS_WINDOW (priv->window), FALSE);
+ g_return_val_if_fail (WNCK_IS_WINDOW (priv->window), FALSE);
area = priv->area;
cr = gdk_cairo_create (event->window);
@@ -273,8 +273,8 @@ task_item_expose_event (GtkWidget *widget,
desat = NULL;
gint size = MIN (area.height, area.width);
- gboolean active = matewnck_window_is_active (priv->window);
- gboolean attention = matewnck_window_or_transient_needs_attention (priv->window);
+ gboolean active = wnck_window_is_active (priv->window);
+ gboolean attention = wnck_window_or_transient_needs_attention (priv->window);
if (GDK_IS_PIXBUF (pbuf) &&
gdk_pixbuf_get_width (pbuf) != size &&
@@ -385,14 +385,14 @@ on_button_pressed (GtkWidget *button,
GdkEventButton *event,
TaskItem *item)
{
- MatewnckWindow *window;
+ WnckWindow *window;
g_return_val_if_fail (TASK_IS_ITEM (item), FALSE);
window = item->priv->window;
- g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), FALSE);
+ g_return_val_if_fail (WNCK_IS_WINDOW (window), FALSE);
if (event->button == 3)
{
- GtkWidget *menu = matewnck_action_menu_new (window);
+ GtkWidget *menu = wnck_action_menu_new (window);
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
event->button, event->time);
return TRUE;
@@ -408,11 +408,11 @@ on_query_tooltip (GtkWidget *widget,
GtkTooltip *tooltip,
TaskItem *item)
{
- MatewnckWindow *window = item->priv->window;
- g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), FALSE);
+ WnckWindow *window = item->priv->window;
+ g_return_val_if_fail (WNCK_IS_WINDOW (window), FALSE);
- gtk_tooltip_set_text (tooltip, matewnck_window_get_name(window));
- gtk_tooltip_set_icon (tooltip, matewnck_window_get_icon (window));
+ gtk_tooltip_set_text (tooltip, wnck_window_get_name(window));
+ gtk_tooltip_set_icon (tooltip, wnck_window_get_icon (window));
return TRUE;
}
@@ -450,7 +450,7 @@ on_blink (TaskItem *item)
gtk_widget_queue_draw (GTK_WIDGET (item));
- if (matewnck_window_or_transient_needs_attention (item->priv->window))
+ if (wnck_window_or_transient_needs_attention (item->priv->window))
{
return TRUE;
}
@@ -462,17 +462,17 @@ on_blink (TaskItem *item)
}
static void
-on_window_state_changed (MatewnckWindow *window,
- MatewnckWindowState changed_mask,
- MatewnckWindowState new_state,
+on_window_state_changed (WnckWindow *window,
+ WnckWindowState changed_mask,
+ WnckWindowState new_state,
TaskItem *item)
{
- g_return_if_fail (MATEWNCK_IS_WINDOW (window));
+ g_return_if_fail (WNCK_IS_WINDOW (window));
g_return_if_fail (TASK_IS_ITEM (item));
TaskItemPrivate *priv = item->priv;
- if (new_state & MATEWNCK_WINDOW_STATE_URGENT && !priv->timer)
+ if (new_state & WNCK_WINDOW_STATE_URGENT && !priv->timer)
{
priv->timer = g_timeout_add (30, (GSourceFunc)on_blink, item);
g_get_current_time (&priv->urgent_time);
@@ -482,14 +482,14 @@ on_window_state_changed (MatewnckWindow *window,
}
static void
-on_window_workspace_changed (MatewnckWindow *window, TaskItem *item)
+on_window_workspace_changed (WnckWindow *window, TaskItem *item)
{
g_return_if_fail (TASK_IS_ITEM (item));
task_item_set_visibility (item);
}
-static void on_window_icon_changed (MatewnckWindow *window, TaskItem *item)
+static void on_window_icon_changed (WnckWindow *window, TaskItem *item)
{
TaskItemPrivate *priv;
@@ -507,11 +507,11 @@ static void on_window_icon_changed (MatewnckWindow *window, TaskItem *item)
}
static void
-on_screen_active_window_changed (MatewnckScreen *screen,
- MatewnckWindow *old_window,
+on_screen_active_window_changed (WnckScreen *screen,
+ WnckWindow *old_window,
TaskItem *item)
{
- MatewnckWindow *window;
+ WnckWindow *window;
TaskItemPrivate *priv;
g_return_if_fail (TASK_IS_ITEM (item));
@@ -519,10 +519,10 @@ on_screen_active_window_changed (MatewnckScreen *screen,
priv = item->priv;
window = priv->window;
- g_return_if_fail (MATEWNCK_IS_WINDOW (window));
+ g_return_if_fail (WNCK_IS_WINDOW (window));
- if ((MATEWNCK_IS_WINDOW (old_window) && window == old_window) ||
- window == matewnck_screen_get_active_window (screen))
+ if ((WNCK_IS_WINDOW (old_window) && window == old_window) ||
+ window == wnck_screen_get_active_window (screen))
{
/* queue a draw to reflect that we are [no longer] the active window */
gtk_widget_queue_draw (GTK_WIDGET (item));
@@ -530,8 +530,8 @@ on_screen_active_window_changed (MatewnckScreen *screen,
}
static void
-on_screen_active_workspace_changed (MatewnckScreen *screen,
- MatewnckWorkspace *old_workspace,
+on_screen_active_workspace_changed (WnckScreen *screen,
+ WnckWorkspace *old_workspace,
TaskItem *item)
{
g_return_if_fail (TASK_IS_ITEM (item));
@@ -540,7 +540,7 @@ on_screen_active_workspace_changed (MatewnckScreen *screen,
}
static void
-on_screen_active_viewport_changed (MatewnckScreen *screen,
+on_screen_active_viewport_changed (WnckScreen *screen,
TaskItem *item)
{
g_return_if_fail (TASK_IS_ITEM (item));
@@ -549,15 +549,15 @@ on_screen_active_viewport_changed (MatewnckScreen *screen,
}
static void
-on_screen_window_closed (MatewnckScreen *screen,
- MatewnckWindow *window,
+on_screen_window_closed (WnckScreen *screen,
+ WnckWindow *window,
TaskItem *item)
{
TaskItemPrivate *priv;
g_return_if_fail (TASK_IS_ITEM (item));
priv = item->priv;
- g_return_if_fail (MATEWNCK_IS_WINDOW (priv->window));
+ g_return_if_fail (WNCK_IS_WINDOW (priv->window));
if (priv->window == window)
{
@@ -583,17 +583,17 @@ activate_window (GtkWidget *widget)
priv = TASK_ITEM (widget)->priv;
- g_return_val_if_fail (MATEWNCK_IS_WINDOW (priv->window), FALSE);
+ g_return_val_if_fail (WNCK_IS_WINDOW (priv->window), FALSE);
active = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "drag-true"));
if (active)
{
- MatewnckWindow *window;
+ WnckWindow *window;
window = priv->window;
- if (MATEWNCK_IS_WINDOW (window))
- matewnck_window_activate (window, time (NULL));
+ if (WNCK_IS_WINDOW (window))
+ wnck_window_activate (window, time (NULL));
}
g_object_set_data (G_OBJECT (widget), "drag-true", GINT_TO_POINTER (0));
@@ -636,7 +636,7 @@ task_item_setup_atk (TaskItem *item)
TaskItemPrivate *priv;
GtkWidget *widget;
AtkObject *atk;
- MatewnckWindow *window;
+ WnckWindow *window;
g_return_if_fail (TASK_IS_ITEM (item));
@@ -644,11 +644,11 @@ task_item_setup_atk (TaskItem *item)
priv = item->priv;
window = priv->window;
- g_return_if_fail (MATEWNCK_IS_WINDOW (window));
+ g_return_if_fail (WNCK_IS_WINDOW (window));
atk = gtk_widget_get_accessible (widget);
atk_object_set_name (atk, _("Window Task Button"));
- atk_object_set_description (atk, matewnck_window_get_name (window));
+ atk_object_set_description (atk, wnck_window_get_name (window));
atk_object_set_role (atk, ATK_ROLE_PUSH_BUTTON);
}
@@ -703,14 +703,14 @@ task_item_init (TaskItem *item)
}
GtkWidget *
-task_item_new (MatewnckWindow *window)
+task_item_new (WnckWindow *window)
{
GtkWidget *item = NULL;
TaskItem *task;
TaskItemPrivate *priv;
- MatewnckScreen *screen;
+ WnckScreen *screen;
- g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), item);
+ g_return_val_if_fail (WNCK_IS_WINDOW (window), item);
item = g_object_new (TASK_TYPE_ITEM,
"has-tooltip", TRUE,
@@ -725,7 +725,7 @@ task_item_new (MatewnckWindow *window)
priv = task->priv;
priv->window = window;
- screen = matewnck_window_get_screen (window);
+ screen = wnck_window_get_screen (window);
priv->screen = screen;
gtk_drag_dest_set (item,
diff --git a/mate-window-picker-applet/task-item.h b/mate-window-picker-applet/task-item.h
index bf6ce38..36623be 100644
--- a/mate-window-picker-applet/task-item.h
+++ b/mate-window-picker-applet/task-item.h
@@ -23,7 +23,8 @@
#include <glib.h>
#include <gtk/gtk.h>
-#include <libmatewnck/libmatewnck.h>
+#define WNCK_I_KNOW_THIS_IS_UNSTABLE
+#include <libwnck/libwnck.h>
#define TASK_TYPE_ITEM (task_item_get_type ())
@@ -62,7 +63,7 @@ struct _TaskItemClass
GType task_item_get_type (void) G_GNUC_CONST;
-GtkWidget * task_item_new (MatewnckWindow *window);
+GtkWidget * task_item_new (WnckWindow *window);
GtkWidget * task_item_get_default (void);
diff --git a/mate-window-picker-applet/task-list.c b/mate-window-picker-applet/task-list.c
index e29a114..2c3c635 100644
--- a/mate-window-picker-applet/task-list.c
+++ b/mate-window-picker-applet/task-list.c
@@ -20,7 +20,8 @@
#include "task-list.h"
#include "task-item.h"
-#include <libmatewnck/libmatewnck.h>
+#define WNCK_I_KNOW_THIS_IS_UNSTABLE
+#include <libwnck/libwnck.h>
G_DEFINE_TYPE (TaskList, task_list, GTK_TYPE_HBOX);
@@ -30,7 +31,7 @@ G_DEFINE_TYPE (TaskList, task_list, GTK_TYPE_HBOX);
struct _TaskListPrivate
{
- MatewnckScreen *screen;
+ WnckScreen *screen;
GHashTable *win_table;
guint timer;
guint counter;
@@ -65,22 +66,22 @@ on_task_item_closed (TaskItem *item,
}
static void
-on_window_opened (MatewnckScreen *screen,
- MatewnckWindow *window,
+on_window_opened (WnckScreen *screen,
+ WnckWindow *window,
TaskList *list)
{
TaskListPrivate *priv;
- MatewnckWindowType type;
+ WnckWindowType type;
g_return_if_fail (TASK_IS_LIST (list));
priv = list->priv;
- type = matewnck_window_get_window_type (window);
+ type = wnck_window_get_window_type (window);
- if (type == MATEWNCK_WINDOW_DESKTOP
- || type == MATEWNCK_WINDOW_DOCK
- || type == MATEWNCK_WINDOW_SPLASHSCREEN
- || type == MATEWNCK_WINDOW_MENU)
+ if (type == WNCK_WINDOW_DESKTOP
+ || type == WNCK_WINDOW_DOCK
+ || type == WNCK_WINDOW_SPLASHSCREEN
+ || type == WNCK_WINDOW_MENU)
return;
GtkWidget *item = task_item_new (window);
@@ -178,7 +179,7 @@ task_list_init (TaskList *list)
priv = list->priv = TASK_LIST_GET_PRIVATE (list);
- priv->screen = matewnck_screen_get_default ();
+ priv->screen = wnck_screen_get_default ();
priv->win_table = g_hash_table_new (NULL, NULL);
@@ -224,14 +225,14 @@ task_list_get_desktop_visible (TaskList *list)
g_return_val_if_fail (TASK_IS_LIST (list), TRUE);
- windows = matewnck_screen_get_windows (list->priv->screen);
+ windows = wnck_screen_get_windows (list->priv->screen);
for (w = windows; w; w = w->next)
{
- MatewnckWindow *window;
+ WnckWindow *window;
window = w->data;
- if (MATEWNCK_IS_WINDOW (window) && !matewnck_window_is_minimized (window))
+ if (WNCK_IS_WINDOW (window) && !wnck_window_is_minimized (window))
all_minimised = FALSE;
}
diff --git a/mate-window-picker-applet/task-title.c b/mate-window-picker-applet/task-title.c
index 60de87a..5db675f 100644
--- a/mate-window-picker-applet/task-title.c
+++ b/mate-window-picker-applet/task-title.c
@@ -19,7 +19,8 @@
#include "task-title.h"
-#include <libmatewnck/libmatewnck.h>
+#define WNCK_I_KNOW_THIS_IS_UNSTABLE
+#include <libwnck/libwnck.h>
#include <mate-panel-applet.h>
#include "task-list.h"
@@ -35,8 +36,8 @@ G_DEFINE_TYPE (TaskTitle, task_title, GTK_TYPE_EVENT_BOX);
struct _TaskTitlePrivate
{
- MatewnckScreen *screen;
- MatewnckWindow *window;
+ WnckScreen *screen;
+ WnckWindow *window;
GtkWidget *align;
GtkWidget *box;
GtkWidget *label;
@@ -56,7 +57,7 @@ on_close_clicked (GtkButton *button,
TaskTitle *title)
{
TaskTitlePrivate *priv;
- MatewnckWindow *window;
+ WnckWindow *window;
g_return_val_if_fail (TASK_IS_TITLE (title), FALSE);
priv = title->priv;
@@ -64,10 +65,10 @@ on_close_clicked (GtkButton *button,
if (event->button != 1 || !priv->mouse_in_close_button)
return FALSE;
- window = matewnck_screen_get_active_window (priv->screen);
+ window = wnck_screen_get_active_window (priv->screen);
- if (!MATEWNCK_IS_WINDOW (window)
- || matewnck_window_get_window_type (window) == MATEWNCK_WINDOW_DESKTOP)
+ if (!WNCK_IS_WINDOW (window)
+ || wnck_window_get_window_type (window) == WNCK_WINDOW_DESKTOP)
{
gdk_spawn_command_line_on_screen (gdk_screen_get_default (),
LOGOUT, NULL);
@@ -76,7 +77,7 @@ on_close_clicked (GtkButton *button,
{
if (priv->window == window)
disconnect_window (title);
- matewnck_window_close (window, GDK_CURRENT_TIME);
+ wnck_window_close (window, GDK_CURRENT_TIME);
}
gtk_widget_queue_draw (GTK_WIDGET (title));
@@ -138,32 +139,32 @@ on_button_expose (GtkWidget *widget,
}
static void
-on_name_changed (MatewnckWindow *window, TaskTitle *title)
+on_name_changed (WnckWindow *window, TaskTitle *title)
{
TaskTitlePrivate *priv;
g_return_if_fail (TASK_IS_TITLE (title));
- g_return_if_fail (MATEWNCK_IS_WINDOW (window));
+ g_return_if_fail (WNCK_IS_WINDOW (window));
priv = title->priv;
if (priv->window != window)
return;
gtk_label_set_text (GTK_LABEL (title->priv->label),
- matewnck_window_get_name (window));
+ wnck_window_get_name (window));
gtk_widget_set_tooltip_text (GTK_WIDGET (title),
- matewnck_window_get_name (window));
+ wnck_window_get_name (window));
gtk_widget_queue_draw (GTK_WIDGET (title));
}
static void
-on_icon_changed (MatewnckWindow *window, TaskTitle *title)
+on_icon_changed (WnckWindow *window, TaskTitle *title)
{
TaskTitlePrivate *priv;
g_return_if_fail (TASK_IS_TITLE (title));
- g_return_if_fail (MATEWNCK_IS_WINDOW (window));
+ g_return_if_fail (WNCK_IS_WINDOW (window));
priv = title->priv;
if (priv->window != window)
@@ -173,21 +174,21 @@ on_icon_changed (MatewnckWindow *window, TaskTitle *title)
}
static void
-on_state_changed (MatewnckWindow *window,
- MatewnckWindowState changed_mask,
- MatewnckWindowState new_state,
+on_state_changed (WnckWindow *window,
+ WnckWindowState changed_mask,
+ WnckWindowState new_state,
TaskTitle *title)
{
TaskTitlePrivate *priv;
g_return_if_fail (TASK_IS_TITLE (title));
- g_return_if_fail (MATEWNCK_IS_WINDOW (window));
+ g_return_if_fail (WNCK_IS_WINDOW (window));
priv = title->priv;
if (priv->window != window)
return;
- if (matewnck_window_is_maximized (window))
+ if (wnck_window_is_maximized (window))
{
gtk_widget_set_state (GTK_WIDGET (title), GTK_STATE_ACTIVE);
gtk_widget_show (priv->box);
@@ -212,35 +213,35 @@ disconnect_window (TaskTitle *title)
}
static void
-on_active_window_changed (MatewnckScreen *screen,
- MatewnckWindow *old_window,
+on_active_window_changed (WnckScreen *screen,
+ WnckWindow *old_window,
TaskTitle *title)
{
TaskTitlePrivate *priv;
- MatewnckWindow *act_window;
- MatewnckWindowType type = MATEWNCK_WINDOW_NORMAL;
+ WnckWindow *act_window;
+ WnckWindowType type = WNCK_WINDOW_NORMAL;
g_return_if_fail (TASK_IS_TITLE (title));
priv = title->priv;
- act_window = matewnck_screen_get_active_window (screen);
+ act_window = wnck_screen_get_active_window (screen);
if (act_window)
- type = matewnck_window_get_window_type (act_window);
+ type = wnck_window_get_window_type (act_window);
- if (MATEWNCK_IS_WINDOW (act_window)
- && matewnck_window_is_skip_tasklist (act_window)
- && type != MATEWNCK_WINDOW_DESKTOP)
+ if (WNCK_IS_WINDOW (act_window)
+ && wnck_window_is_skip_tasklist (act_window)
+ && type != WNCK_WINDOW_DESKTOP)
return;
- if (type == MATEWNCK_WINDOW_DOCK
- || type == MATEWNCK_WINDOW_SPLASHSCREEN
- || type == MATEWNCK_WINDOW_MENU)
+ if (type == WNCK_WINDOW_DOCK
+ || type == WNCK_WINDOW_SPLASHSCREEN
+ || type == WNCK_WINDOW_MENU)
return;
disconnect_window (title);
- if (!MATEWNCK_IS_WINDOW (act_window)
- || matewnck_window_get_window_type (act_window) == MATEWNCK_WINDOW_DESKTOP)
+ if (!WNCK_IS_WINDOW (act_window)
+ || wnck_window_get_window_type (act_window) == WNCK_WINDOW_DESKTOP)
{
if (priv->show_home_title)
{
@@ -264,12 +265,12 @@ on_active_window_changed (MatewnckScreen *screen,
else
{
gtk_label_set_text (GTK_LABEL (priv->label),
- matewnck_window_get_name (act_window));
+ wnck_window_get_name (act_window));
gtk_image_set_from_stock (GTK_IMAGE (priv->button_image),
GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
gtk_widget_set_tooltip_text (GTK_WIDGET (title),
- matewnck_window_get_name (act_window));
+ wnck_window_get_name (act_window));
gtk_widget_set_tooltip_text (priv->button, _("Close window"));
g_signal_connect (act_window, "name-changed",
@@ -282,14 +283,14 @@ on_active_window_changed (MatewnckScreen *screen,
priv->window = act_window;
}
- if (MATEWNCK_IS_WINDOW (act_window)
- && !matewnck_window_is_maximized (act_window)
- && (priv->show_home_title ? type != MATEWNCK_WINDOW_DESKTOP : 1))
+ if (WNCK_IS_WINDOW (act_window)
+ && !wnck_window_is_maximized (act_window)
+ && (priv->show_home_title ? type != WNCK_WINDOW_DESKTOP : 1))
{
gtk_widget_set_state (GTK_WIDGET (title), GTK_STATE_NORMAL);
gtk_widget_hide (priv->box);
}
- else if (!MATEWNCK_IS_WINDOW (act_window))
+ else if (!WNCK_IS_WINDOW (act_window))
{
if (task_list_get_desktop_visible (TASK_LIST (task_list_get_default ()))
&& priv->show_home_title)
@@ -322,21 +323,21 @@ static gboolean
on_button_release (GtkWidget *title, GdkEventButton *event)
{
TaskTitlePrivate *priv;
- MatewnckWindow *window;
+ WnckWindow *window;
GtkWidget *menu;
g_return_val_if_fail (TASK_IS_TITLE (title), FALSE);
priv = TASK_TITLE_GET_PRIVATE (title);
- window = matewnck_screen_get_active_window (priv->screen);
+ window = wnck_screen_get_active_window (priv->screen);
- g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), FALSE);
+ g_return_val_if_fail (WNCK_IS_WINDOW (window), FALSE);
if (event->button == 3)
{
- if (matewnck_window_get_window_type (window) != MATEWNCK_WINDOW_DESKTOP)
+ if (wnck_window_get_window_type (window) != WNCK_WINDOW_DESKTOP)
{
- menu = matewnck_action_menu_new (window);
+ menu = wnck_action_menu_new (window);
gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
event->button, event->time);
return TRUE;
@@ -344,9 +345,9 @@ on_button_release (GtkWidget *title, GdkEventButton *event)
}
else if (event->button == 1)
{
- if (event->type == GDK_2BUTTON_PRESS && matewnck_window_is_maximized (window))
+ if (event->type == GDK_2BUTTON_PRESS && wnck_window_is_maximized (window))
{
- matewnck_window_unmaximize (window);
+ wnck_window_unmaximize (window);
}
}
@@ -411,7 +412,7 @@ task_title_init (TaskTitle *title)
priv = title->priv = TASK_TITLE_GET_PRIVATE (title);
- priv->screen = matewnck_screen_get_default ();
+ priv->screen = wnck_screen_get_default ();
priv->window = NULL;
/* FIXME we can add an option for this in future */