Index: plugins/iconbox/iconbox.c =================================================================== --- plugins/iconbox/iconbox.c (revision 26037) +++ plugins/iconbox/iconbox.c (working copy) @@ -24,9 +24,10 @@ #include #include +#include #include #include -#include +#include #include #include #include @@ -39,7 +40,7 @@ { XfcePanelPlugin *plugin; - NetkScreen *netk_screen; + WnckScreen *wnck_screen; int connections[N_ICONBOX_CONNECTIONS]; int screen_changed_id; GtkWidget *box; @@ -60,7 +61,7 @@ { Iconbox *ib; - NetkWindow *window; + WnckWindow *window; int connections[N_ICON_CONNECTIONS]; GdkPixbuf *pb; @@ -85,19 +86,19 @@ /* icons */ static void -update_visibility (Icon *icon, NetkWorkspace *optional_active_ws) +update_visibility (Icon *icon, WnckWorkspace *optional_active_ws) { - NetkWorkspace *ws; + WnckWorkspace *ws; gdk_flush (); - if (netk_window_is_skip_tasklist (icon->window)) + if (wnck_window_is_skip_tasklist (icon->window)) { gtk_widget_hide (icon->button); return; } - if (icon->ib->only_hidden && !netk_window_is_minimized (icon->window)) + if (icon->ib->only_hidden && !wnck_window_is_minimized (icon->window)) { gtk_widget_hide (icon->button); return; @@ -109,14 +110,14 @@ } else { - ws = netk_screen_get_active_workspace - (netk_window_get_screen (icon->window)); + ws = wnck_screen_get_active_workspace + (wnck_window_get_screen (icon->window)); } if (icon->ib->all_workspaces - || netk_window_is_sticky (icon->window) - || ws == netk_window_get_workspace (icon->window) - || netk_window_or_transient_demands_attention (icon->window)) + || wnck_window_is_sticky (icon->window) + || ws == wnck_window_get_workspace (icon->window) + || wnck_window_or_transient_needs_attention (icon->window)) { gtk_widget_show (icon->button); } @@ -133,11 +134,11 @@ g_return_if_fail (GDK_IS_PIXBUF (icon->pb)); - if (netk_window_is_minimized (icon->window)) + if (wnck_window_is_minimized (icon->window)) { if (!icon->was_minimized) { - /* copied from netk-tasklist.c: dimm_icon */ + /* copied from wnck-tasklist.c: dimm_icon */ int x, y, w, h, pixel_stride, row_stride; guchar *row, *pixels; @@ -264,24 +265,24 @@ if (ev->button == 1) { - if (netk_window_is_active (icon->window)) + if (wnck_window_is_active (icon->window)) { - netk_window_minimize (icon->window); + wnck_window_minimize (icon->window); } else { - NetkScreen *scr; - NetkWorkspace *aws, *ws; + WnckScreen *scr; + WnckWorkspace *aws, *ws; - scr = netk_window_get_screen (icon->window); - aws = netk_screen_get_active_workspace (scr); - ws = netk_window_get_workspace (icon->window); + scr = wnck_window_get_screen (icon->window); + aws = wnck_screen_get_active_workspace (scr); + ws = wnck_window_get_workspace (icon->window); if (aws != ws) { - netk_workspace_activate (ws); + wnck_workspace_activate (ws, ev->time); } - netk_window_activate (icon->window); + wnck_window_activate (icon->window, ev->time); } return TRUE; @@ -290,7 +291,7 @@ { GtkWidget *action_menu; - action_menu = netk_create_window_action_menu(icon->window); + action_menu = wnck_create_window_action_menu(icon->window); g_signal_connect(G_OBJECT(action_menu), "selection-done", G_CALLBACK(gtk_widget_destroy), NULL); @@ -305,24 +306,24 @@ } static void -icon_name_changed (NetkWindow *window, gpointer data) +icon_name_changed (WnckWindow *window, gpointer data) { Icon *icon = (Icon *)data; gtk_tooltips_set_tip (icon->ib->icon_tooltips, icon->button, - netk_window_get_name (window), NULL); + wnck_window_get_name (window), NULL); } static void -icon_state_changed (NetkWindow *window, NetkWindowState changed_mask, - NetkWindowState new_state, gpointer data) +icon_state_changed (WnckWindow *window, WnckWindowState changed_mask, + WnckWindowState new_state, gpointer data) { Icon *icon = (Icon *)data; - if (changed_mask & NETK_WINDOW_STATE_DEMANDS_ATTENTION - || changed_mask & NETK_WINDOW_STATE_URGENT) + if (changed_mask & WNCK_WINDOW_STATE_DEMANDS_ATTENTION + || changed_mask & WNCK_WINDOW_STATE_URGENT) { - if (netk_window_or_transient_demands_attention (window)) + if (wnck_window_or_transient_needs_attention (window)) { queue_urgent_timeout (icon); } @@ -332,8 +333,8 @@ } } - if (changed_mask & NETK_WINDOW_STATE_MINIMIZED - || changed_mask & NETK_WINDOW_STATE_SKIP_TASKLIST) + if (changed_mask & WNCK_WINDOW_STATE_MINIMIZED + || changed_mask & WNCK_WINDOW_STATE_SKIP_TASKLIST) { update_visibility (icon, NULL); @@ -342,7 +343,7 @@ } static void -icon_workspace_changed (NetkWindow *window, gpointer data) +icon_workspace_changed (WnckWindow *window, gpointer data) { Icon *icon = (Icon *)data; @@ -350,20 +351,20 @@ } static void -icon_icon_changed (NetkWindow *window, gpointer data) +icon_icon_changed (WnckWindow *window, gpointer data) { Icon *icon = (Icon *)data; if (icon->pb) g_object_unref (G_OBJECT (icon->pb)); - icon->pb = netk_window_get_icon (icon->window); + icon->pb = wnck_window_get_icon (icon->window); if (icon->pb) g_object_ref (G_OBJECT (icon->pb)); /* make sure the icon is actually updated */ - icon->was_minimized = !netk_window_is_minimized (icon->window); + icon->was_minimized = !wnck_window_is_minimized (icon->window); icon_update_image (icon); } @@ -389,7 +390,7 @@ } static Icon * -icon_new (NetkWindow *window, Iconbox *ib) +icon_new (WnckWindow *window, Iconbox *ib) { Icon *icon = panel_slice_new0 (Icon); int i = 0; @@ -407,7 +408,7 @@ gtk_widget_show (icon->image); gtk_container_add (GTK_CONTAINER (icon->button), icon->image); - icon->pb = netk_window_get_icon (window); + icon->pb = wnck_window_get_icon (window); if (icon->pb) { xfce_scaled_image_set_from_pixbuf (XFCE_SCALED_IMAGE (icon->image), @@ -433,7 +434,7 @@ g_assert (i == N_ICON_CONNECTIONS); - if (netk_window_is_skip_tasklist (window)) + if (wnck_window_is_skip_tasklist (window)) { return icon; } @@ -441,7 +442,7 @@ icon_update_image (icon); gtk_tooltips_set_tip (ib->icon_tooltips, icon->button, - netk_window_get_name (window), NULL); + wnck_window_get_name (window), NULL); update_visibility (icon, NULL); @@ -450,11 +451,11 @@ /* iconlist */ static void -iconbox_active_window_changed (NetkScreen *screen, gpointer data) +iconbox_active_window_changed (WnckScreen *screen, gpointer data) { Iconbox *ib = (Iconbox *)data; GSList *l; - NetkWindow *window = netk_screen_get_active_window (screen); + WnckWindow *window = wnck_screen_get_active_window (screen); for (l = ib->iconlist; l != NULL; l = l->next) { @@ -466,11 +467,11 @@ } static void -iconbox_active_workspace_changed (NetkScreen *screen, gpointer data) +iconbox_active_workspace_changed (WnckScreen *screen, gpointer data) { Iconbox *ib = (Iconbox *)data; GSList *l; - NetkWorkspace *ws = netk_screen_get_active_workspace (screen); + WnckWorkspace *ws = wnck_screen_get_active_workspace (screen); for (l = ib->iconlist; l != NULL; l = l->next) { @@ -481,7 +482,7 @@ } static void -iconbox_window_opened (NetkScreen *screen, NetkWindow *window, gpointer data) +iconbox_window_opened (WnckScreen *screen, WnckWindow *window, gpointer data) { Iconbox *ib = (Iconbox *)data; Icon *icon; @@ -492,14 +493,14 @@ gtk_box_pack_start (GTK_BOX (ib->iconbox), icon->button, FALSE, FALSE, 0); - if (netk_window_or_transient_demands_attention (window)) + if (wnck_window_or_transient_needs_attention (window)) { queue_urgent_timeout (icon); } } static void -iconbox_window_closed (NetkScreen *screen, NetkWindow *window, gpointer data) +iconbox_window_closed (WnckScreen *screen, WnckWindow *window, gpointer data) { Iconbox *ib = (Iconbox *)data; GSList *l; @@ -527,40 +528,40 @@ int i = 0; GList *windows, *l; - netk_screen_force_update (ib->netk_screen); + wnck_screen_force_update (ib->wnck_screen); ib->connections[i++] = - g_signal_connect (ib->netk_screen, "active_window_changed", + g_signal_connect (ib->wnck_screen, "active_window_changed", G_CALLBACK (iconbox_active_window_changed), ib); ib->connections[i++] = - g_signal_connect (ib->netk_screen, "active_workspace_changed", + g_signal_connect (ib->wnck_screen, "active_workspace_changed", G_CALLBACK (iconbox_active_workspace_changed), ib); ib->connections[i++] = - g_signal_connect (ib->netk_screen, "window_opened", + g_signal_connect (ib->wnck_screen, "window_opened", G_CALLBACK (iconbox_window_opened), ib); ib->connections[i++] = - g_signal_connect (ib->netk_screen, "window_closed", + g_signal_connect (ib->wnck_screen, "window_closed", G_CALLBACK (iconbox_window_closed), ib); g_assert (i == N_ICONBOX_CONNECTIONS); - windows = netk_screen_get_windows (ib->netk_screen); + windows = wnck_screen_get_windows (ib->wnck_screen); for (l = windows; l != NULL; l = l->next) { - NetkWindow *w = l->data; + WnckWindow *w = l->data; - iconbox_window_opened (ib->netk_screen, w, ib); + iconbox_window_opened (ib->wnck_screen, w, ib); } - iconbox_active_window_changed (ib->netk_screen, ib); + iconbox_active_window_changed (ib->wnck_screen, ib); } /* cleanup */ @@ -573,7 +574,7 @@ for (i = 0; i < N_ICONBOX_CONNECTIONS; i++) { if (ib->connections[i]) - g_signal_handler_disconnect (ib->netk_screen, ib->connections[i]); + g_signal_handler_disconnect (ib->wnck_screen, ib->connections[i]); ib->connections[i] = 0; } @@ -766,7 +767,7 @@ (GtkCallback) gtk_widget_destroy, NULL); cleanup_icons (ib); - ib->netk_screen = netk_screen_get (gdk_screen_get_number (screen)); + ib->wnck_screen = wnck_screen_get (gdk_screen_get_number (screen)); iconbox_init_icons (ib); } Index: plugins/iconbox/Makefile.am =================================================================== --- plugins/iconbox/Makefile.am (revision 26037) +++ plugins/iconbox/Makefile.am (working copy) @@ -4,6 +4,7 @@ -I$(top_srcdir) \ -DG_LOG_DOMAIN=\"libiconbox\" \ -DLOCALEDIR=\"$(localedir)\" \ + -DWNCK_I_KNOW_THIS_IS_UNSTABLE \ $(PLATFORM_CPPFLAGS) plugindir = \ @@ -19,6 +20,7 @@ $(GTK_CFLAGS) \ $(LIBXFCE4UTIL_CFLAGS) \ $(LIBXFCEGUI4_CFLAGS) \ + $(LIBWNCK_CFLAGS) \ $(PLATFORM_CFLAGS) libiconbox_la_LDFLAGS = \ @@ -35,7 +37,8 @@ $(top_builddir)/libxfce4panel/libxfce4panel.la \ $(GTK_LIBS) \ $(LIBXFCE4UTIL_LIBS) \ - $(LIBXFCEGUI4_LIBS) + $(LIBXFCEGUI4_LIBS) \ + $(LIBWNCK_LIBS) libiconbox_la_DEPENDENCIES = \ $(top_builddir)/libxfce4panel/libxfce4panel.la Index: plugins/windowlist/windowlist.c =================================================================== --- plugins/windowlist/windowlist.c (revision 26037) +++ plugins/windowlist/windowlist.c (working copy) @@ -40,9 +40,10 @@ #include #include #include - +#include #include -#include +#include +#include #include "windowlist.h" #include "windowlist-dialog.h" @@ -92,7 +93,7 @@ } static gchar * -menulist_workspace_name (NetkWorkspace *workspace, +menulist_workspace_name (WnckWorkspace *workspace, const gchar *num_title, const gchar *name_title) { @@ -100,8 +101,8 @@ gchar *ws_title; gint ws_num; - ws_num = netk_workspace_get_number (workspace); - ws_name = netk_workspace_get_name (workspace); + ws_num = wnck_workspace_get_number (workspace); + ws_name = wnck_workspace_get_name (workspace); if(!ws_name || atoi((const char *)ws_name) == ws_num + 1) ws_title = g_strdup_printf(num_title, ws_num + 1); @@ -129,9 +130,9 @@ static gboolean menulist_goto_workspace (GtkWidget *mi, GdkEventButton *ev, - NetkWorkspace *workspace) + WnckWorkspace *workspace) { - netk_workspace_activate (workspace); + wnck_workspace_activate (workspace, ev->time); return FALSE; } @@ -169,14 +170,14 @@ static void popup_action_menu (GtkWidget * widget, - NetkWindow *window) + WnckWindow *window) { static GtkWidget *menu = NULL; if (menu) gtk_widget_destroy (menu); - menu = netk_create_window_action_menu (window); + menu = wnck_create_window_action_menu (window); g_signal_connect (menu, "deactivate", G_CALLBACK (action_menu_deactivated), widget->parent); @@ -188,22 +189,22 @@ static gboolean menulist_goto_window (GtkWidget *mi, GdkEventButton *ev, - NetkWindow *window) + WnckWindow *window) { if (ev->button == 1) /* Goto workspace and show window */ { gtk_menu_popdown (GTK_MENU (mi->parent)); - if (!netk_window_is_sticky (window)) + if (!wnck_window_is_sticky (window)) { - netk_workspace_activate(netk_window_get_workspace(window)); + wnck_workspace_activate (wnck_window_get_workspace(window), ev->time); } - netk_window_activate (window); + wnck_window_activate (window, ev->time); g_signal_emit_by_name (mi->parent, "deactivate", 0); } else if (ev->button == 2) /* Show window on current workspace */ { gtk_menu_popdown (GTK_MENU (mi->parent)); - netk_window_activate (window); + wnck_window_activate (window, ev->time); g_signal_emit_by_name (mi->parent, "deactivate", 0); } else if (ev->button == 3) /* Show the popup menu */ @@ -222,9 +223,9 @@ GdkEventButton *ev, Windowlist *wl) { - gint num = netk_screen_get_workspace_count (wl->screen) + 1; + gint num = wnck_screen_get_workspace_count (wl->screen) + 1; - netk_screen_change_workspace_count (netk_screen_get_default (), num); + wnck_screen_change_workspace_count (wnck_screen_get_default (), num); return FALSE; } @@ -234,12 +235,12 @@ GdkEventButton *ev, Windowlist *wl) { - NetkWorkspace *workspace; + WnckWorkspace *workspace; gint ws_num; char *text; - ws_num = netk_screen_get_workspace_count (wl->screen) - 1; - workspace = netk_screen_get_workspace (wl->screen, ws_num); + ws_num = wnck_screen_get_workspace_count (wl->screen) - 1; + workspace = wnck_screen_get_workspace (wl->screen, ws_num); text = menulist_workspace_name (workspace, _("Are you sure you want to remove workspace %d?"), @@ -247,7 +248,7 @@ if (xfce_confirm (text, GTK_STOCK_REMOVE, NULL)) { - netk_screen_change_workspace_count (netk_screen_get_default (), + wnck_screen_change_workspace_count (wnck_screen_get_default (), ws_num); } @@ -262,8 +263,8 @@ GdkEventButton evb; GList *l; GtkWidget *mi = NULL; - NetkWindow *window; - NetkWorkspace *workspace; + WnckWindow *window; + WnckWorkspace *workspace; gpointer ws_action; guint state; @@ -304,18 +305,18 @@ evb.button = 3; } - if((window = g_object_get_data (G_OBJECT (mi), "netk-window")) != NULL) + if((window = g_object_get_data (G_OBJECT (mi), "wnck-window")) != NULL) { - if (!NETK_IS_WINDOW (window)) + if (!WNCK_IS_WINDOW (window)) return FALSE; return menulist_goto_window (mi, &evb, window); } else if (evb.button == 1 && - (workspace = g_object_get_data (G_OBJECT (mi), "netk-workspace")) + (workspace = g_object_get_data (G_OBJECT (mi), "wnck-workspace")) != NULL) { - if (!NETK_IS_WORKSPACE (workspace)) + if (!WNCK_IS_WORKSPACE (workspace)) return FALSE; return menulist_goto_workspace (mi, NULL, workspace); @@ -402,7 +403,7 @@ * Window List Menu functions **/ static GtkWidget * -menulist_menu_item (NetkWindow *window, +menulist_menu_item (WnckWindow *window, Windowlist *wl, gint size) { @@ -411,10 +412,10 @@ GString *label; GdkPixbuf *icon = NULL, *tmp = NULL; - window_name = menulist_utf8_string (netk_window_get_name (window)); + window_name = menulist_utf8_string (wnck_window_get_name (window)); label = g_string_new (window_name); - if (netk_window_is_minimized (window)) + if (wnck_window_is_minimized (window)) { g_string_prepend (label, "["); g_string_append (label, "]"); @@ -424,7 +425,7 @@ g_string_append (label, " "); if (wl->show_window_icons) - icon = netk_window_get_icon (window); + icon = wnck_window_get_icon (window); if (icon) { @@ -472,8 +473,8 @@ gboolean at_pointer) { GtkWidget *menu, *mi, *icon; - NetkWindow *window; - NetkWorkspace *netk_workspace, *active_workspace, *window_workspace; + WnckWindow *window; + WnckWorkspace *wnck_workspace, *active_workspace, *window_workspace; gchar *ws_label, *rm_label; gint size, i, wscount; GList *windows, *li; @@ -489,11 +490,11 @@ gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &size, NULL); - windows = netk_screen_get_windows_stacked (wl->screen); - active_workspace = netk_screen_get_active_workspace (wl->screen); + windows = wnck_screen_get_windows_stacked (wl->screen); + active_workspace = wnck_screen_get_active_workspace (wl->screen); if (wl->show_all_workspaces) - wscount = netk_screen_get_workspace_count (wl->screen); + wscount = wnck_screen_get_workspace_count (wl->screen); else wscount = 1; @@ -502,25 +503,25 @@ { /* Load workspace */ if (wl->show_all_workspaces) - netk_workspace = netk_screen_get_workspace (wl->screen, i); + wnck_workspace = wnck_screen_get_workspace (wl->screen, i); else - netk_workspace = netk_screen_get_active_workspace (wl->screen); + wnck_workspace = wnck_screen_get_active_workspace (wl->screen); /* Create workspace menu item */ ws_label = - menulist_workspace_name (netk_workspace, _("Workspace %d"), "%s"); + menulist_workspace_name (wnck_workspace, _("Workspace %d"), "%s"); mi = gtk_menu_item_new_with_label (ws_label); gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi); g_free (ws_label); - g_object_set_data (G_OBJECT (mi), "netk-workspace", netk_workspace); + g_object_set_data (G_OBJECT (mi), "wnck-workspace", wnck_workspace); g_signal_connect (mi, "button-release-event", - G_CALLBACK (menulist_goto_workspace), netk_workspace); + G_CALLBACK (menulist_goto_workspace), wnck_workspace); /* Apply layout */ - if (netk_workspace == active_workspace) + if (wnck_workspace == active_workspace) gtk_widget_modify_font (gtk_bin_get_child (GTK_BIN (mi)), bold); else gtk_widget_modify_font (gtk_bin_get_child (GTK_BIN (mi)), italic); @@ -533,15 +534,15 @@ { /* If window is not on current workspace; continue */ window = li->data; - window_workspace = netk_window_get_workspace (window); + window_workspace = wnck_window_get_workspace (window); - if (netk_workspace != window_workspace && - !(netk_window_is_sticky (window) && - netk_workspace == active_workspace)) + if (wnck_workspace != window_workspace && + !(wnck_window_is_sticky (window) && + wnck_workspace == active_workspace)) continue; - if (netk_window_is_skip_pager (window) || - netk_window_is_skip_tasklist (window)) + if (wnck_window_is_skip_pager (window) || + wnck_window_is_skip_tasklist (window)) continue; /* Create menu item */ @@ -554,7 +555,7 @@ gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi); - if (netk_window_is_active (window)) + if (wnck_window_is_active (window)) { gtk_widget_modify_font (gtk_bin_get_child (GTK_BIN (mi)), italic); @@ -562,9 +563,9 @@ /* Apply some styles for windows on !current workspace and * if they are urgent */ - if (netk_window_or_transient_demands_attention (window)) + if (wnck_window_or_transient_needs_attention (window)) { - if (netk_workspace == active_workspace) + if (wnck_workspace == active_workspace) { gtk_widget_modify_font (gtk_bin_get_child (GTK_BIN (mi)), bold); @@ -578,15 +579,15 @@ bold); } } - else if (netk_workspace != active_workspace && - !netk_window_is_sticky (window)) + else if (wnck_workspace != active_workspace && + !wnck_window_is_sticky (window)) { gtk_widget_modify_fg (gtk_bin_get_child (GTK_BIN (mi)), GTK_STATE_NORMAL, &(menu->style->fg[GTK_STATE_INSENSITIVE])); } - g_object_set_data (G_OBJECT (mi), "netk-window", window); + g_object_set_data (G_OBJECT (mi), "wnck-window", window); /* Connect some signals */ g_signal_connect (mi, "button-release-event", @@ -638,13 +639,13 @@ G_CALLBACK (menulist_add_screen), wl); /* Remove workspace */ - wscount = netk_screen_get_workspace_count (wl->screen); + wscount = wnck_screen_get_workspace_count (wl->screen); if (wscount > 1) { - netk_workspace = netk_screen_get_workspace (wl->screen, wscount-1); + wnck_workspace = wnck_screen_get_workspace (wl->screen, wscount-1); - rm_label = menulist_workspace_name (netk_workspace, + rm_label = menulist_workspace_name (wnck_workspace, _("Remove Workspace %d"), _("Remove Workspace '%s'")); @@ -712,19 +713,19 @@ windowlist_search_urgent (gpointer data) { Windowlist * wl = (Windowlist *) data; - NetkWindow *window; - NetkWorkspace *active_workspace, *window_workspace; + WnckWindow *window; + WnckWorkspace *active_workspace, *window_workspace; gboolean blink = FALSE; GList *windows, *li; - windows = netk_screen_get_windows_stacked (wl->screen); - active_workspace = netk_screen_get_active_workspace (wl->screen); + windows = wnck_screen_get_windows_stacked (wl->screen); + active_workspace = wnck_screen_get_active_workspace (wl->screen); /* For Each Window (stop when we've found an urgent window) */ for (li = windows; li && !blink; li = li->next) { window = li->data; - window_workspace = netk_window_get_workspace (window); + window_workspace = wnck_window_get_workspace (window); /* Don't check for urgent windows on current workspace if enabled in properties */ @@ -733,13 +734,13 @@ continue; /* Skip windows that are not in the tasklist */ - if (netk_window_is_sticky (window) || - netk_window_is_skip_pager (window) || - netk_window_is_skip_tasklist (window)) + if (wnck_window_is_sticky (window) || + wnck_window_is_skip_pager (window) || + wnck_window_is_skip_tasklist (window)) continue; /* Check if window is urgent */ - if (netk_window_or_transient_demands_attention (window)) + if (wnck_window_or_transient_needs_attention (window)) blink = TRUE; } @@ -886,18 +887,18 @@ windowlist_active_window_changed (GtkWidget * w, Windowlist * wl) { - NetkWindow *win; + WnckWindow *win; GdkPixbuf *pb; - if ((win = netk_screen_get_active_window (wl->screen)) != NULL) + if ((win = wnck_screen_get_active_window (wl->screen)) != NULL) { - pb = netk_window_get_icon (win); + pb = wnck_window_get_icon (win); if (pb) { xfce_scaled_image_set_from_pixbuf (XFCE_SCALED_IMAGE (wl->icon), pb); gtk_tooltips_set_tip (wl->tooltips, wl->button, - netk_window_get_name (win), NULL); + wnck_window_get_name (win), NULL); } } } @@ -1251,7 +1252,7 @@ screen = gtk_widget_get_screen (GTK_WIDGET (plugin)); screen_idx = gdk_screen_get_number (screen); - wl->screen = netk_screen_get (screen_idx); + wl->screen = wnck_screen_get (screen_idx); /* Read user settings */ windowlist_read (wl); Index: plugins/windowlist/Makefile.am =================================================================== --- plugins/windowlist/Makefile.am (revision 26037) +++ plugins/windowlist/Makefile.am (working copy) @@ -4,6 +4,7 @@ -I$(top_srcdir) \ -DG_LOG_DOMAIN=\"libwindowlist\" \ -DLOCALEDIR=\"$(localedir)\" \ + -DWNCK_I_KNOW_THIS_IS_UNSTABLE \ $(PLATFORM_CPPFLAGS) bin_PROGRAMS = \ @@ -40,6 +41,7 @@ $(GTK_CFLAGS) \ $(LIBXFCE4UTIL_CFLAGS) \ $(LIBXFCEGUI4_CFLAGS) \ + $(LIBWNCK_CFLAGS) \ $(PLATFORM_CFLAGS) libwindowlist_la_LDFLAGS = \ @@ -55,6 +57,7 @@ libwindowlist_la_LIBADD = \ $(top_builddir)/libxfce4panel/libxfce4panel.la \ $(GTK_LIBS) \ + $(LIBWNCK_LIBS) \ $(LIBXFCE4UTIL_LIBS) \ $(LIBXFCEGUI4_LIBS) Index: plugins/windowlist/windowlist.h =================================================================== --- plugins/windowlist/windowlist.h (revision 26037) +++ plugins/windowlist/windowlist.h (working copy) @@ -28,6 +28,7 @@ #ifndef _WINDOWLIST_H #define _WINDOWLIST_H +#include #include #include #include @@ -57,7 +58,7 @@ GtkArrowType arrowtype; GtkTooltips *tooltips; - NetkScreen *screen; + WnckScreen *screen; guint screen_callback_id; /* Settings */ Index: plugins/showdesktop/Makefile.am =================================================================== --- plugins/showdesktop/Makefile.am (revision 26037) +++ plugins/showdesktop/Makefile.am (working copy) @@ -4,6 +4,7 @@ -I$(top_srcdir) \ -DG_LOG_DOMAIN=\"libshowdesktop\" \ -DLOCALEDIR=\"$(localedir)\" \ + -DWNCK_I_KNOW_THIS_IS_UNSTABLE \ $(PLATFORM_CPPFLAGS) plugindir = \ @@ -19,6 +20,7 @@ $(GTK_CFLAGS) \ $(LIBXFCE4UTIL_CFLAGS) \ $(LIBXFCEGUI4_CFLAGS) \ + $(LIBWNCK_CFLAGS) \ $(PLATFORM_CFLAGS) libshowdesktop_la_LDFLAGS = \ @@ -35,7 +37,8 @@ $(top_builddir)/libxfce4panel/libxfce4panel.la \ $(GTK_LIBS) \ $(LIBXFCE4UTIL_LIBS) \ - $(LIBXFCEGUI4_LIBS) + $(LIBXFCEGUI4_LIBS) \ + $(LIBWNCK_LIBS) libshowdesktop_la_DEPENDENCIES = \ $(top_builddir)/libxfce4panel/libxfce4panel.la Index: plugins/showdesktop/showdesktop.c =================================================================== --- plugins/showdesktop/showdesktop.c (revision 26037) +++ plugins/showdesktop/showdesktop.c (working copy) @@ -24,6 +24,7 @@ #endif #include +#include #include #include #include @@ -40,8 +41,8 @@ GtkWidget *image; GtkTooltips *tooltips; - NetkScreen *screen; - int netk_id; + WnckScreen *screen; + int wnck_id; int screen_id; int style_id; @@ -80,8 +81,8 @@ static void showdesktop_free_data (XfcePanelPlugin * plugin, ShowDesktopData * sdd) { - if (sdd->netk_id) - g_signal_handler_disconnect (sdd->screen, sdd->netk_id); + if (sdd->wnck_id) + g_signal_handler_disconnect (sdd->screen, sdd->wnck_id); if (sdd->screen_id) g_signal_handler_disconnect (plugin, sdd->screen_id); @@ -89,7 +90,7 @@ if (sdd->style_id) g_signal_handler_disconnect (plugin, sdd->style_id); - sdd->netk_id = sdd->screen_id = sdd->style_id = 0; + sdd->wnck_id = sdd->screen_id = sdd->style_id = 0; gtk_object_sink (GTK_OBJECT (sdd->tooltips)); panel_slice_free (ShowDesktopData, sdd); } @@ -127,16 +128,16 @@ active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); - netk_screen_toggle_showing_desktop (sdd->screen, active); + wnck_screen_toggle_showing_desktop (sdd->screen, active); sdd->showing = active; update_button_display (sdd); } static void -showing_desktop_changed (NetkScreen * screen, ShowDesktopData * sdd) +showing_desktop_changed (WnckScreen * screen, ShowDesktopData * sdd) { - sdd->showing = netk_screen_get_showing_desktop (screen); + sdd->showing = wnck_screen_get_showing_desktop (screen); update_button (sdd); } @@ -144,23 +145,23 @@ showdesktop_screen_changed (XfcePanelPlugin *plugin, GdkScreen *screen, ShowDesktopData *sdd) { - if (sdd->netk_id) + if (sdd->wnck_id) { - g_signal_handler_disconnect (sdd->screen, sdd->netk_id); - sdd->netk_id = 0; + g_signal_handler_disconnect (sdd->screen, sdd->wnck_id); + sdd->wnck_id = 0; } screen = gtk_widget_get_screen (GTK_WIDGET (plugin)); if (screen) { - sdd->screen = netk_screen_get (gdk_screen_get_number (screen)); + sdd->screen = wnck_screen_get (gdk_screen_get_number (screen)); - sdd->netk_id = + sdd->wnck_id = g_signal_connect (sdd->screen, "showing_desktop_changed", G_CALLBACK (showing_desktop_changed), sdd); - sdd->showing = netk_screen_get_showing_desktop (sdd->screen); + sdd->showing = wnck_screen_get_showing_desktop (sdd->screen); update_button (sdd); showdesktop_set_size (plugin, xfce_panel_plugin_get_size (plugin), sdd); } Index: plugins/pager/pager.c =================================================================== --- plugins/pager/pager.c (revision 26037) +++ plugins/pager/pager.c (working copy) @@ -26,25 +26,29 @@ #include #include +#include #include #include +#include "xfce-pager.h" + typedef struct { XfcePanelPlugin *plugin; - NetkScreen *screen; - GdkScreen *gdk_screen; - GtkWidget *pager; + WnckScreen *screen; + GdkScreen *gdk_screen; + GtkWidget *pager; - int ws_created_id; - int ws_destroyed_id; - int screen_changed_id; - int screen_size_changed_id; + gint ws_created_id; + gint ws_destroyed_id; + gint screen_changed_id; + gint screen_size_changed_id; - int rows; - guint scrolling:1; + gint rows; + guint scrolling : 1; + guint show_names : 1; } Pager; @@ -69,7 +73,7 @@ GtkOrientation orientation, Pager *pager) { - netk_pager_set_orientation (NETK_PAGER (pager->pager), orientation); + wnck_pager_set_orientation (WNCK_PAGER (pager->pager), orientation); } static gboolean @@ -128,6 +132,7 @@ XfceRc *rc; int rows = 1; gboolean scrolling = TRUE; + gboolean show_names = FALSE; if ((file = xfce_panel_plugin_lookup_rc_file (plugin)) != NULL) { @@ -138,11 +143,13 @@ { rows = xfce_rc_read_int_entry (rc, "rows", 1); scrolling = xfce_rc_read_bool_entry (rc, "scrolling", TRUE); + show_names = xfce_rc_read_bool_entry (rc, "show-names", FALSE); } } pager->rows = rows; pager->scrolling = scrolling; + pager->show_names = show_names; } static void @@ -164,12 +171,14 @@ xfce_rc_write_bool_entry (rc, "scrolling", pager->scrolling); + xfce_rc_write_bool_entry (rc, "show-names", pager->show_names); + xfce_rc_close (rc); } /* create widgets and connect to signals */ static void -pager_n_workspaces_changed (NetkScreen * screen, NetkWorkspace * ws, +pager_n_workspaces_changed (WnckScreen * screen, WnckWorkspace * ws, Pager * pager) { pager_set_size (pager->plugin, @@ -203,9 +212,9 @@ } pager->gdk_screen = screen; - pager->screen = netk_screen_get (gdk_screen_get_number (screen)); + pager->screen = wnck_screen_get (gdk_screen_get_number (screen)); - netk_pager_set_screen (NETK_PAGER (pager->pager), pager->screen); + wnck_pager_set_screen (WNCK_PAGER (pager->pager), pager->screen); pager->ws_created_id = g_signal_connect (pager->screen, "workspace-created", @@ -254,15 +263,15 @@ pager->gdk_screen = screen = gtk_widget_get_screen (GTK_WIDGET (plugin)); screen_idx = gdk_screen_get_number (screen); - pager->screen = netk_screen_get (screen_idx); + pager->screen = wnck_screen_get (screen_idx); pager_read_rc_file (plugin, pager); - pager->pager = netk_pager_new (pager->screen); - netk_pager_set_orientation (NETK_PAGER (pager->pager), + pager->pager = xfce_pager_new (pager->screen); + wnck_pager_set_orientation (WNCK_PAGER (pager->pager), xfce_panel_plugin_get_orientation (plugin)); - netk_pager_set_n_rows (NETK_PAGER (pager->pager), pager->rows); - netk_pager_set_workspace_scrolling (NETK_PAGER (pager->pager), pager->scrolling); + wnck_pager_set_n_rows (WNCK_PAGER (pager->pager), pager->rows); + xfce_pager_set_workspace_scrolling (XFCE_PAGER (pager->pager), pager->scrolling); gtk_widget_show (pager->pager); gtk_container_add (GTK_CONTAINER (plugin), pager->pager); @@ -292,13 +301,13 @@ static void rows_changed (GtkSpinButton * spin, Pager * pager) { - int rows = gtk_spin_button_get_value_as_int (spin); + gint rows = gtk_spin_button_get_value_as_int (spin); if (rows != pager->rows) { pager->rows = rows; - netk_pager_set_n_rows (NETK_PAGER (pager->pager), pager->rows); + wnck_pager_set_n_rows (WNCK_PAGER (pager->pager), pager->rows); } } @@ -311,11 +320,25 @@ { pager->scrolling = scrolling; - netk_pager_set_workspace_scrolling (NETK_PAGER (pager->pager), scrolling); + xfce_pager_set_workspace_scrolling (XFCE_PAGER (pager->pager), scrolling); } } static void +workspace_show_names_toggled (GtkWidget *button, Pager *pager) +{ + gboolean show_names = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); + + if (pager->show_names != show_names) + { + pager->show_names = show_names; + + wnck_pager_set_display_mode (WNCK_PAGER (pager->pager), + show_names ? WNCK_PAGER_DISPLAY_NAME : WNCK_PAGER_DISPLAY_CONTENT); + } +} + +static void pager_dialog_response (GtkWidget *dlg, int reponse, Pager *pager) { g_object_set_data (G_OBJECT (pager->plugin), "dialog", NULL); @@ -328,8 +351,8 @@ static void pager_properties_dialog (XfcePanelPlugin *plugin, Pager *pager) { - GtkWidget *dlg, *vbox, *hbox, *label, *spin, *scrolling; - int max; + GtkWidget *dlg, *vbox, *hbox, *label, *spin, *scrolling, *show_names; + gint max; xfce_panel_plugin_block_menu (plugin); @@ -373,7 +396,7 @@ gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); - max = netk_screen_get_workspace_count (pager->screen); + max = wnck_screen_get_workspace_count (pager->screen); if (max > 1) { @@ -388,7 +411,7 @@ } else { - GtkWidget *label = gtk_label_new ("1"); + label = gtk_label_new ("1"); gtk_widget_show (label); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); @@ -402,6 +425,14 @@ g_signal_connect (scrolling, "toggled", G_CALLBACK (workspace_scrolling_toggled), pager); + show_names = gtk_check_button_new_with_mnemonic (_("Show workspace names")); + gtk_widget_show (show_names); + gtk_box_pack_start (GTK_BOX (vbox), show_names, FALSE, FALSE, 0); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (show_names), pager->show_names); + + g_signal_connect (show_names, "toggled", + G_CALLBACK (workspace_show_names_toggled), pager); + gtk_widget_show (dlg); } Index: plugins/pager/xfce-pager.c =================================================================== --- plugins/pager/xfce-pager.c (revision 0) +++ plugins/pager/xfce-pager.c (revision 0) @@ -0,0 +1,183 @@ +/* vim: set expandtab ts=8 sw=4: */ + +/* $Id$ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +#include "xfce-pager.h" + +#define XFCE_PAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), XFCE_TYPE_PAGER, XfcePagerPrivate)) + + + +struct _XfcePagerPrivate +{ + WnckScreen *screen; + guint workspace_scrolling : 1; +}; + + + +static void xfce_pager_init (XfcePager *pager); +static void xfce_pager_class_init (XfcePagerClass *pager); +static gboolean xfce_pager_scroll_event (GtkWidget *widget, + GdkEventScroll *event); +static WnckScreen *xfce_pager_get_screen (XfcePager *pager); + + + +GType +xfce_pager_get_type () +{ + static GType xfce_pager_type = 0; + + if (!xfce_pager_type) + { + static const GTypeInfo xfce_pager_info = + { + sizeof (XfcePagerClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) xfce_pager_class_init, + (GClassFinalizeFunc) NULL, + NULL, + sizeof (XfcePager), + 0, + (GInstanceInitFunc) xfce_pager_init, + NULL + }; + + xfce_pager_type = g_type_register_static (WNCK_TYPE_PAGER, I_("XfcePager"), &xfce_pager_info, 0); + } + + return xfce_pager_type; +} + + + +static void +xfce_pager_class_init (XfcePagerClass *klass) +{ + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + + g_type_class_add_private (klass, sizeof (XfcePagerPrivate)); + + widget_class->scroll_event = xfce_pager_scroll_event; +} + + + +static void +xfce_pager_init(XfcePager *pager) +{ + pager->priv = XFCE_PAGER_GET_PRIVATE (pager); +} + + + +GtkWidget * +xfce_pager_new (WnckScreen *screen) +{ + GtkWidget *pager = g_object_new (XFCE_TYPE_PAGER, NULL); + + XFCE_PAGER (pager)->priv->screen = screen; + wnck_pager_set_screen (WNCK_PAGER (pager), screen); + + return pager; +} + + + +void +xfce_pager_set_workspace_scrolling (XfcePager *pager, + gboolean scrolling) +{ + pager->priv->workspace_scrolling = scrolling; +} + + + +static gboolean +xfce_pager_scroll_event (GtkWidget *widget, + GdkEventScroll *event) +{ + XfcePager *pager; + gint n, active; + WnckWorkspace *ws = NULL; + WnckScreen *screen; + + g_return_val_if_fail (event != NULL, FALSE); + g_return_val_if_fail (widget != NULL, FALSE); + + pager = XFCE_PAGER (widget); + + if (!pager->priv->workspace_scrolling) + return FALSE; + + screen = xfce_pager_get_screen (pager); + n = wnck_screen_get_workspace_count (screen); + active = wnck_workspace_get_number (wnck_screen_get_active_workspace(screen)); + + switch (event->direction) + { + case GDK_SCROLL_UP: + case GDK_SCROLL_LEFT: + if (active > 0) + { + ws = wnck_screen_get_workspace (screen, active - 1); + } + else + { + ws = wnck_screen_get_workspace (screen, n - 1); + } + wnck_workspace_activate (ws, 0); + break; + + case GDK_SCROLL_DOWN: + case GDK_SCROLL_RIGHT: + if (active < n - 1) + { + ws = wnck_screen_get_workspace (screen, active + 1); + } + else + { + ws = wnck_screen_get_workspace (screen, 0); + } + wnck_workspace_activate (ws, 0); + break; + + default: + break; + } + + return TRUE; +} + + + +static WnckScreen * +xfce_pager_get_screen (XfcePager *pager) +{ + return pager->priv->screen; +} Index: plugins/pager/xfce-pager.h =================================================================== --- plugins/pager/xfce-pager.h (revision 0) +++ plugins/pager/xfce-pager.h (revision 0) @@ -0,0 +1,51 @@ +/* vim: set expandtab ts=8 sw=4: */ + +/* $Id$ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + + +#ifndef __XFCE_PAGER_H__ +#define __XFCE_PAGER_H__ + +#define XFCE_TYPE_PAGER xfce_pager_get_type() +#define XFCE_PAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_PAGER, XfcePager)) +#define XFCE_IS_PAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_PAGER)) +#define XFCE_PAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_PAGER, XfcePagerClass)) +#define XFCE_IS_PAGER_CLASS(klass) ( G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_PAGER)) + +typedef struct _XfcePagerPrivate XfcePagerPrivate; +typedef struct _XfcePager XfcePager; +typedef struct _XfcePagerClass XfcePagerClass; + +struct _XfcePager +{ + WnckPager __parent__; + XfcePagerPrivate *priv; +}; + +struct _XfcePagerClass +{ + WnckPagerClass __parent__; +}; + +GType xfce_pager_get_type(); +GtkWidget *xfce_pager_new (WnckScreen *screen); + +void xfce_pager_set_workspace_scrolling (XfcePager *pager, + gboolean scrolling); + +#endif /* __XFCE_PAGER_H__ */ Index: plugins/pager/Makefile.am =================================================================== --- plugins/pager/Makefile.am (revision 26037) +++ plugins/pager/Makefile.am (working copy) @@ -4,6 +4,7 @@ -I$(top_srcdir) \ -DG_LOG_DOMAIN=\"libpager\" \ -DLOCALEDIR=\"$(localedir)\" \ + -DWNCK_I_KNOW_THIS_IS_UNSTABLE \ $(PLATFORM_CPPFLAGS) plugindir = \ @@ -13,12 +14,15 @@ libpager.la libpager_la_SOURCES = \ - pager.c + pager.c \ + xfce-pager.c \ + xfce-pager.h libpager_la_CFLAGS = \ $(GTK_CFLAGS) \ $(LIBXFCE4UTIL_CFLAGS) \ $(LIBXFCEGUI4_CFLAGS) \ + $(LIBWNCK_CFLAGS) \ $(PLATFORM_CFLAGS) libpager_la_LDFLAGS = \ @@ -35,7 +39,8 @@ $(top_builddir)/libxfce4panel/libxfce4panel.la \ $(GTK_LIBS) \ $(LIBXFCE4UTIL_LIBS) \ - $(LIBXFCEGUI4_LIBS) + $(LIBXFCEGUI4_LIBS) \ + $(LIBWNCK_LIBS) libpager_la_DEPENDENCIES = \ $(top_builddir)/libxfce4panel/libxfce4panel.la Index: plugins/tasklist/tasklist.c =================================================================== --- plugins/tasklist/tasklist.c (revision 26037) +++ plugins/tasklist/tasklist.c (working copy) @@ -21,6 +21,7 @@ #include #endif +#include #include #include @@ -107,9 +108,11 @@ XfceRc *rc; /* defaults */ - tasklist->grouping = NETK_TASKLIST_AUTO_GROUP; + tasklist->grouping = WNCK_TASKLIST_AUTO_GROUP; tasklist->all_workspaces = FALSE; +#if 0 tasklist->show_label = TRUE; +#endif tasklist->expand = TRUE; tasklist->flat_buttons = TRUE; tasklist->show_handles = TRUE; @@ -125,7 +128,9 @@ /* read user settings */ tasklist->grouping = xfce_rc_read_int_entry (rc, "grouping", tasklist->grouping); tasklist->all_workspaces = xfce_rc_read_bool_entry (rc, "all_workspaces", tasklist->all_workspaces); +#if 0 tasklist->show_label = xfce_rc_read_bool_entry (rc, "show_label", tasklist->show_label); +#endif tasklist->flat_buttons = xfce_rc_read_bool_entry (rc, "flat_buttons", tasklist->flat_buttons); tasklist->show_handles = xfce_rc_read_bool_entry (rc, "show_handles", tasklist->show_handles); tasklist->width = xfce_rc_read_int_entry (rc, "width",tasklist->width); @@ -161,7 +166,9 @@ xfce_rc_write_int_entry (rc, "width", tasklist->width); xfce_rc_write_bool_entry (rc, "all_workspaces", tasklist->all_workspaces); +#if 0 xfce_rc_write_bool_entry (rc, "show_label", tasklist->show_label); +#endif xfce_rc_write_bool_entry (rc, "expand", tasklist->expand); xfce_rc_write_bool_entry (rc, "flat_buttons", tasklist->flat_buttons); xfce_rc_write_bool_entry (rc, "show_handles", tasklist->show_handles); @@ -227,7 +234,7 @@ tasklist_screen_changed (Tasklist *tasklist, GdkScreen *screen) { - NetkScreen *ns; + WnckScreen *ns; /* get the new screen */ screen = gtk_widget_get_screen (GTK_WIDGET (tasklist->plugin)); @@ -236,9 +243,9 @@ if (G_UNLIKELY (screen == NULL)) screen = gdk_screen_get_default (); - ns = netk_screen_get (gdk_screen_get_number (screen)); + ns = wnck_screen_get (gdk_screen_get_number (screen)); - netk_tasklist_set_screen (NETK_TASKLIST (tasklist->list), ns); + wnck_tasklist_set_screen (WNCK_TASKLIST (tasklist->list), ns); } @@ -248,6 +255,7 @@ { GdkScreen *screen; gint screen_idx; + GtkWidget *alignment; Tasklist *tasklist = panel_slice_new0 (Tasklist); tasklist->plugin = plugin; @@ -272,11 +280,16 @@ /* whether to expand the plugin */ xfce_panel_plugin_set_expand (plugin, tasklist->expand); + + /* alignment box */ + alignment = gtk_alignment_new (0.0, 0.5, 0.0, 1.0); + gtk_container_add (GTK_CONTAINER (plugin), alignment); + gtk_widget_show (alignment); /* create the main box */ tasklist->box = xfce_hvbox_new (xfce_panel_plugin_get_orientation (plugin), FALSE, 0); gtk_widget_show (tasklist->box); - gtk_container_add (GTK_CONTAINER (plugin), tasklist->box); + gtk_container_add (GTK_CONTAINER (alignment), tasklist->box); /* create left handle */ tasklist->handle = gtk_alignment_new (0, 0, 0, 0); @@ -286,10 +299,10 @@ g_signal_connect (tasklist->handle, "expose-event", G_CALLBACK (tasklist_handle_exposed), tasklist); - /* create netk tasklist */ + /* create wnck tasklist */ screen = gtk_widget_get_screen (GTK_WIDGET (plugin)); screen_idx = gdk_screen_get_number (screen); - tasklist->list = netk_tasklist_new (netk_screen_get (screen_idx)); + tasklist->list = wnck_tasklist_new (wnck_screen_get (screen_idx)); gtk_widget_show (tasklist->list); gtk_box_pack_start (GTK_BOX (tasklist->box), tasklist->list, TRUE, TRUE, 0); @@ -297,14 +310,16 @@ if (tasklist->show_handles) gtk_widget_show (tasklist->handle); - /* set netk tasklist settings */ - netk_tasklist_set_include_all_workspaces (NETK_TASKLIST (tasklist->list), + /* set wnck tasklist settings */ + wnck_tasklist_set_include_all_workspaces (WNCK_TASKLIST (tasklist->list), tasklist->all_workspaces); - netk_tasklist_set_grouping (NETK_TASKLIST (tasklist->list), + wnck_tasklist_set_grouping (WNCK_TASKLIST (tasklist->list), tasklist->grouping); - netk_tasklist_set_show_label (NETK_TASKLIST (tasklist->list), +#if 0 + wnck_tasklist_set_show_label (WNCK_TASKLIST (tasklist->list), tasklist->show_label); - netk_tasklist_set_button_relief (NETK_TASKLIST (tasklist->list), +#endif + wnck_tasklist_set_button_relief (WNCK_TASKLIST (tasklist->list), tasklist->flat_buttons ? GTK_RELIEF_NONE : GTK_RELIEF_NORMAL); /* connect screen changed signal */ Index: plugins/tasklist/tasklist-dialogs.c =================================================================== --- plugins/tasklist/tasklist-dialogs.c (revision 26037) +++ plugins/tasklist/tasklist-dialogs.c (working copy) @@ -31,8 +31,10 @@ Tasklist *tasklist); static void tasklist_grouping_changed (GtkComboBox *cb, Tasklist *tasklist); +#if 0 static void tasklist_show_label_toggled (GtkToggleButton *tb, Tasklist *tasklist); +#endif static void tasklist_expand_toggled (GtkToggleButton *tb, Tasklist *tasklist); static void tasklist_flat_buttons_toggled (GtkToggleButton *tb, @@ -53,7 +55,7 @@ { tasklist->all_workspaces = gtk_toggle_button_get_active (tb); - netk_tasklist_set_include_all_workspaces (NETK_TASKLIST (tasklist->list), + wnck_tasklist_set_include_all_workspaces (WNCK_TASKLIST (tasklist->list), tasklist->all_workspaces); } @@ -65,24 +67,24 @@ { tasklist->grouping = gtk_combo_box_get_active (cb); - netk_tasklist_set_grouping (NETK_TASKLIST (tasklist->list), + wnck_tasklist_set_grouping (WNCK_TASKLIST (tasklist->list), tasklist->grouping); } - +#if 0 static void tasklist_show_label_toggled (GtkToggleButton *tb, Tasklist *tasklist) { tasklist->show_label = gtk_toggle_button_get_active (tb); - netk_tasklist_set_show_label (NETK_TASKLIST (tasklist->list), + wnck_tasklist_set_show_label (WNCK_TASKLIST (tasklist->list), tasklist->show_label); } +#endif - static void tasklist_expand_toggled (GtkToggleButton *tb, Tasklist *tasklist) @@ -100,7 +102,7 @@ { tasklist->flat_buttons = gtk_toggle_button_get_active (tb); - netk_tasklist_set_button_relief (NETK_TASKLIST (tasklist->list), + wnck_tasklist_set_button_relief (WNCK_TASKLIST (tasklist->list), tasklist->flat_buttons ? GTK_RELIEF_NONE : GTK_RELIEF_NORMAL); } @@ -230,16 +232,18 @@ g_signal_connect (G_OBJECT (cb), "toggled", G_CALLBACK (tasklist_all_workspaces_toggled), tasklist); +#if 0 cb = gtk_check_button_new_with_mnemonic (_("Show application _names")); gtk_box_pack_start (GTK_BOX (vbox), cb, FALSE, FALSE, 0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cb), tasklist->show_label); g_signal_connect (G_OBJECT (cb), "toggled", G_CALLBACK (tasklist_show_label_toggled), tasklist); +#endif cb = gtk_combo_box_new_text (); gtk_box_pack_start (GTK_BOX (vbox), cb, FALSE, FALSE, 0); - /* keep order in sync with NetkTasklistGroupingType */ + /* keep order in sync with WnckTasklistGroupingType */ gtk_combo_box_append_text (GTK_COMBO_BOX (cb), _("Never group tasks")); gtk_combo_box_append_text (GTK_COMBO_BOX (cb), _("Automatically group tasks")); gtk_combo_box_append_text (GTK_COMBO_BOX (cb), _("Always group tasks")); Index: plugins/tasklist/tasklist.h =================================================================== --- plugins/tasklist/tasklist.h (revision 26037) +++ plugins/tasklist/tasklist.h (working copy) @@ -21,6 +21,7 @@ #define __TASKLIST_H__ #include +#include #include #include @@ -40,7 +41,7 @@ /* settings */ gint width; - NetkTasklistGroupingType grouping; + WnckTasklistGroupingType grouping; guint all_workspaces : 1; guint show_label : 1; guint expand : 1; Index: plugins/tasklist/Makefile.am =================================================================== --- plugins/tasklist/Makefile.am (revision 26037) +++ plugins/tasklist/Makefile.am (working copy) @@ -4,6 +4,7 @@ -I$(top_srcdir) \ -DG_LOG_DOMAIN=\"libtasklist\" \ -DLOCALEDIR=\"$(localedir)\" \ + -DWNCK_I_KNOW_THIS_IS_UNSTABLE \ $(PLATFORM_CPPFLAGS) plugindir = \ @@ -22,6 +23,7 @@ $(GTK_CFLAGS) \ $(LIBXFCE4UTIL_CFLAGS) \ $(LIBXFCEGUI4_CFLAGS) \ + $(LIBWNCK_CFLAGS) \ $(PLATFORM_CFLAGS) libtasklist_la_LDFLAGS = \ @@ -38,7 +40,8 @@ $(top_builddir)/libxfce4panel/libxfce4panel.la \ $(GTK_LIBS) \ $(LIBXFCE4UTIL_LIBS) \ - $(LIBXFCEGUI4_LIBS) + $(LIBXFCEGUI4_LIBS) \ + $(LIBWNCK_LIBS) libtasklist_la_DEPENDENCIES = \ $(top_builddir)/libxfce4panel/libxfce4panel.la Index: configure.in.in =================================================================== --- configure.in.in (revision 26037) +++ configure.in.in (working copy) @@ -113,6 +113,7 @@ XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.4.0]) XDT_CHECK_PACKAGE([LIBEXO], [exo-0.3], [0.3.1.11]) XDT_CHECK_PACKAGE([CAIRO], [cairo], [1.0.0]) +XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.12]) dnl *********************************** dnl *** Check for optional packages *** Index: panel/panel-app.c =================================================================== --- panel/panel-app.c (revision 26037) +++ panel/panel-app.c (working copy) @@ -47,7 +47,9 @@ #endif #include +#include #include +#include #include #include #include Index: panel/panel-dialogs.c =================================================================== --- panel/panel-dialogs.c (revision 26037) +++ panel/panel-dialogs.c (working copy) @@ -28,6 +28,7 @@ #include #include +#include #include #include