summaryrefslogtreecommitdiff
path: root/applets/wncklet/window-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'applets/wncklet/window-list.c')
-rw-r--r--applets/wncklet/window-list.c67
1 files changed, 31 insertions, 36 deletions
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index a7ed6197..feebff0d 100644
--- a/applets/wncklet/window-list.c
+++ b/applets/wncklet/window-list.c
@@ -1,6 +1,6 @@
/* -*- mode: C; c-file-style: "linux" -*- */
/*
- * libwnck based tasklist applet.
+ * libmatewnck based tasklist applet.
* (C) 2001 Red Hat, Inc
* (C) 2001 Alexander Larsson
*
@@ -8,8 +8,6 @@
*
*/
-#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -21,7 +19,7 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#include <libwnck/libwnck.h>
+#include <libmatewnck/libmatewnck.h>
#include <mateconf/mateconf-client.h>
#include "wncklet.h"
@@ -34,7 +32,7 @@ typedef struct {
GtkWidget* tasklist;
gboolean include_all_workspaces;
- WnckTasklistGroupingType grouping;
+ MatewnckTasklistGroupingType grouping;
gboolean move_unminimized_windows;
GtkOrientation orientation;
@@ -53,13 +51,6 @@ typedef struct {
GtkWidget* move_minimized_radio;
GtkWidget* change_workspace_radio;
- /* new options, must be translated! */
- /*GtkWidget* style_group_radio;
- GtkWidget* icon_group_radio;
- GtkWidget* text_group_radio;*/
-
-
-
/* mateconf listeners id */
guint listeners [3];
} TasklistData;
@@ -80,9 +71,9 @@ static void tasklist_update(TasklistData* tasklist)
gtk_widget_set_size_request(GTK_WIDGET(tasklist->tasklist), tasklist->size, -1);
}
- wnck_tasklist_set_grouping(WNCK_TASKLIST(tasklist->tasklist), tasklist->grouping);
- wnck_tasklist_set_include_all_workspaces(WNCK_TASKLIST(tasklist->tasklist), tasklist->include_all_workspaces);
- wnck_tasklist_set_switch_workspace_on_unminimize(WNCK_TASKLIST(tasklist->tasklist), tasklist->move_unminimized_windows);
+ matewnck_tasklist_set_grouping(MATEWNCK_TASKLIST(tasklist->tasklist), tasklist->grouping);
+ matewnck_tasklist_set_include_all_workspaces(MATEWNCK_TASKLIST(tasklist->tasklist), tasklist->include_all_workspaces);
+ matewnck_tasklist_set_switch_workspace_on_unminimize(MATEWNCK_TASKLIST(tasklist->tasklist), tasklist->move_unminimized_windows);
}
static void response_cb(GtkWidget* widget, int id, TasklistData* tasklist)
@@ -132,11 +123,11 @@ static void applet_change_background(MatePanelApplet* applet, MatePanelAppletBac
switch (type)
{
case PANEL_NO_BACKGROUND:
- wnck_tasklist_set_button_relief(WNCK_TASKLIST(tasklist->tasklist), GTK_RELIEF_NORMAL);
+ matewnck_tasklist_set_button_relief(MATEWNCK_TASKLIST(tasklist->tasklist), GTK_RELIEF_NORMAL);
break;
case PANEL_COLOR_BACKGROUND:
case PANEL_PIXMAP_BACKGROUND:
- wnck_tasklist_set_button_relief(WNCK_TASKLIST(tasklist->tasklist), GTK_RELIEF_NONE);
+ matewnck_tasklist_set_button_relief(MATEWNCK_TASKLIST(tasklist->tasklist), GTK_RELIEF_NONE);
break;
}
}
@@ -252,9 +243,9 @@ static void display_all_workspaces_changed(MateConfClient* client, guint cnxn_id
tasklist_properties_update_content_radio(tasklist);
}
-static WnckTasklistGroupingType get_grouping_type(MateConfValue* value)
+static MatewnckTasklistGroupingType get_grouping_type(MateConfValue* value)
{
- WnckTasklistGroupingType type = -1;
+ MatewnckTasklistGroupingType type = -1;
const char* str;
g_assert(value != NULL);
@@ -262,7 +253,7 @@ static WnckTasklistGroupingType get_grouping_type(MateConfValue* value)
/* Backwards compat for old type: */
if (value->type == MATECONF_VALUE_BOOL)
{
- type = (mateconf_value_get_bool(value)) ? WNCK_TASKLIST_AUTO_GROUP : WNCK_TASKLIST_NEVER_GROUP;
+ type = (mateconf_value_get_bool(value)) ? MATEWNCK_TASKLIST_AUTO_GROUP : MATEWNCK_TASKLIST_NEVER_GROUP;
}
else if (value->type == MATECONF_VALUE_STRING)
@@ -271,33 +262,33 @@ static WnckTasklistGroupingType get_grouping_type(MateConfValue* value)
if (g_ascii_strcasecmp(str, "never") == 0)
{
- type = WNCK_TASKLIST_NEVER_GROUP;
+ type = MATEWNCK_TASKLIST_NEVER_GROUP;
}
else if (g_ascii_strcasecmp(str, "auto") == 0)
{
- type = WNCK_TASKLIST_AUTO_GROUP;
+ type = MATEWNCK_TASKLIST_AUTO_GROUP;
}
else if (g_ascii_strcasecmp(str, "always") == 0)
{
- type = WNCK_TASKLIST_ALWAYS_GROUP;
+ type = MATEWNCK_TASKLIST_ALWAYS_GROUP;
}
}
return type;
}
-static GtkWidget* get_grouping_button(TasklistData* tasklist, WnckTasklistGroupingType type)
+static GtkWidget* get_grouping_button(TasklistData* tasklist, MatewnckTasklistGroupingType type)
{
switch (type)
{
default:
- case WNCK_TASKLIST_NEVER_GROUP:
+ case MATEWNCK_TASKLIST_NEVER_GROUP:
return tasklist->never_group_radio;
break;
- case WNCK_TASKLIST_AUTO_GROUP:
+ case MATEWNCK_TASKLIST_AUTO_GROUP:
return tasklist->auto_group_radio;
break;
- case WNCK_TASKLIST_ALWAYS_GROUP:
+ case MATEWNCK_TASKLIST_ALWAYS_GROUP:
return tasklist->always_group_radio;
break;
}
@@ -305,7 +296,7 @@ static GtkWidget* get_grouping_button(TasklistData* tasklist, WnckTasklistGroupi
static void group_windows_changed(MateConfClient* client, guint cnxn_id, MateConfEntry* entry, TasklistData* tasklist)
{
- WnckTasklistGroupingType type;
+ MatewnckTasklistGroupingType type;
GtkWidget* button;
if (!entry->value || (entry->value->type != MATECONF_VALUE_BOOL && entry->value->type != MATECONF_VALUE_STRING))
@@ -393,11 +384,11 @@ static void applet_size_request(GtkWidget* widget, GtkRequisition* requisition,
int len;
const int* size_hints;
GtkRequisition child_req;
- WnckTasklist* wncktl = WNCK_TASKLIST(tasklist->tasklist);
+ MatewnckTasklist* matewncktl = MATEWNCK_TASKLIST(tasklist->tasklist);
gtk_widget_get_child_requisition(tasklist->applet, &child_req);
- size_hints = wnck_tasklist_get_size_hint_list(wncktl, &len);
+ size_hints = matewnck_tasklist_get_size_hint_list(matewncktl, &len);
g_assert(len % 2 == 0);
mate_panel_applet_set_size_hints(MATE_PANEL_APPLET(tasklist->applet), size_hints, len, 0);
@@ -493,7 +484,7 @@ gboolean window_list_applet_fill(MatePanelApplet* applet)
}
if (tasklist->grouping < 0)
- tasklist->grouping = WNCK_TASKLIST_AUTO_GROUP; /* Default value */
+ tasklist->grouping = MATEWNCK_TASKLIST_AUTO_GROUP; /* Default value */
error = NULL;
tasklist->move_unminimized_windows = mate_panel_applet_mateconf_get_bool(applet, "move_unminimized_windows", &error);
@@ -519,9 +510,9 @@ gboolean window_list_applet_fill(MatePanelApplet* applet)
break;
}
- tasklist->tasklist = wnck_tasklist_new(NULL);
+ tasklist->tasklist = matewnck_tasklist_new(NULL);
- wnck_tasklist_set_icon_loader(WNCK_TASKLIST(tasklist->tasklist), icon_loader_func, tasklist, NULL);
+ matewnck_tasklist_set_icon_loader(MATEWNCK_TASKLIST(tasklist->tasklist), icon_loader_func, tasklist, NULL);
g_signal_connect(G_OBJECT(tasklist->tasklist), "destroy", G_CALLBACK(destroy_tasklist), tasklist);
@@ -622,17 +613,21 @@ static void display_help_dialog(GtkAction* action, TasklistData* tasklist)
static void display_about_dialog(GtkAction* action, TasklistData* tasklist)
{
static const gchar* authors[] = {
+ "Perberos <[email protected]>",
+ "Steve Zesch <[email protected]>",
+ "Stefano Karapetsas <[email protected]>",
"Alexander Larsson <[email protected]>",
NULL
};
const char* documenters [] = {
- "Sun MATE Documentation Team <[email protected]>",
+ "Sun GNOME Documentation Team <[email protected]>",
NULL
};
char copyright[] = \
- "Copyright \xc2\xa9 2001-2002 Red Hat, Inc.";
+ "Copyright \xc2\xa9 2011 Perberos\n"
+ "Copyright \xc2\xa9 2002 Red Hat, Inc.";
gtk_show_about_dialog(GTK_WINDOW(tasklist->applet),
"program-name", _("Window List"),
@@ -644,7 +639,7 @@ static void display_about_dialog(GtkAction* action, TasklistData* tasklist)
"logo-icon-name", WINDOW_LIST_ICON,
"translator-credits", _("translator-credits"),
"version", VERSION,
- "website", "http://matsusoft.com.ar/projects/mate/",
+ "website", "http://www.mate-desktop.org/",
NULL);
}