diff options
Diffstat (limited to 'applets')
-rw-r--r-- | applets/notification_area/na-tray-child.c | 4 | ||||
-rw-r--r-- | applets/wncklet/showdesktop.c | 46 | ||||
-rw-r--r-- | applets/wncklet/window-list.c | 67 | ||||
-rw-r--r-- | applets/wncklet/window-list.h | 2 | ||||
-rw-r--r-- | applets/wncklet/window-list.schemas.in | 8 | ||||
-rw-r--r-- | applets/wncklet/window-list.ui | 130 | ||||
-rw-r--r-- | applets/wncklet/window-menu.c | 18 | ||||
-rw-r--r-- | applets/wncklet/wncklet.c | 12 | ||||
-rw-r--r-- | applets/wncklet/wncklet.h | 5 | ||||
-rw-r--r-- | applets/wncklet/workspace-switcher.c | 96 | ||||
-rw-r--r-- | applets/wncklet/workspace-switcher.h | 2 |
11 files changed, 130 insertions, 260 deletions
diff --git a/applets/notification_area/na-tray-child.c b/applets/notification_area/na-tray-child.c index b946386b..17417546 100644 --- a/applets/notification_area/na-tray-child.c +++ b/applets/notification_area/na-tray-child.c @@ -453,7 +453,7 @@ na_tray_child_force_redraw (NaTrayChild *child) } } -/* from libwnck/xutils.c, comes as LGPLv2+ */ +/* from libmatewnck/xutils.c, comes as LGPLv2+ */ static char * latin1_to_utf8 (const char *latin1) { @@ -472,7 +472,7 @@ latin1_to_utf8 (const char *latin1) return g_string_free (str, FALSE); } -/* derived from libwnck/xutils.c, comes as LGPLv2+ */ +/* derived from libmatewnck/xutils.c, comes as LGPLv2+ */ static void _get_wmclass (Display *xdisplay, Window xwindow, diff --git a/applets/wncklet/showdesktop.c b/applets/wncklet/showdesktop.c index 7cfcb88d..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); @@ -463,17 +461,21 @@ static void display_help_dialog(GtkAction* action, ShowDesktopData* sdd) static void display_about_dialog(GtkAction* action, ShowDesktopData* sdd) { static const gchar* authors[] = { + "Perberos <[email protected]>", + "Steve Zesch <[email protected]>", + "Stefano Karapetsas <[email protected]>", "Havoc Pennington <[email protected]>", NULL }; static const char* documenters[] = { - "Sun MATE Documentation Team <[email protected]>", + "Sun GNOME Documentation Team <[email protected]>", NULL }; /* Translator credits */ //const char* translator_credits = _("translator-credits"); char copyright[] = \ + "Copyright \xc2\xa9 2011 Perberos\n" "Copyright \xc2\xa9 2002 Red Hat, Inc."; gtk_show_about_dialog(GTK_WINDOW(sdd->applet), @@ -486,7 +488,7 @@ static void display_about_dialog(GtkAction* action, ShowDesktopData* sdd) "logo-icon-name", SHOW_DESKTOP_ICON, "translator-credits", _("translator-credits"), "version", VERSION, - "website", "http://matsusoft.com.ar/projects/mate/", + "website", "http://www.mate-desktop.org/", NULL); } @@ -518,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); } 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); } diff --git a/applets/wncklet/window-list.h b/applets/wncklet/window-list.h index aa5c2811..aa13b55a 100644 --- a/applets/wncklet/window-list.h +++ b/applets/wncklet/window-list.h @@ -1,5 +1,5 @@ /* - * libwnck based tasklist Applet. + * libmatewnck based tasklist Applet. * (C) 2001 Alexander Larsson * * Authors: Alexander Larsson diff --git a/applets/wncklet/window-list.schemas.in b/applets/wncklet/window-list.schemas.in index b60c3222..99d79963 100644 --- a/applets/wncklet/window-list.schemas.in +++ b/applets/wncklet/window-list.schemas.in @@ -52,8 +52,8 @@ <locale name="C"> <short>Minimum window list size</short> <long> - The use of this key was deprecated in MATE 2.20. The schema is - retained for compatibility with older versions. + The use of this key was deprecated in GNOME 2.20. The schema is + retained for compatibility with older versions. </long> </locale> </schema> @@ -66,8 +66,8 @@ <locale name="C"> <short>Maximum window list size</short> <long> - The use of this key was deprecated in MATE 2.20. The schema is - retained for compatibility with older versions. + The use of this key was deprecated in GNOME 2.20. The schema is + retained for compatibility with older versions. </long> </locale> </schema> diff --git a/applets/wncklet/window-list.ui b/applets/wncklet/window-list.ui index 9d6f4e71..21228d78 100644 --- a/applets/wncklet/window-list.ui +++ b/applets/wncklet/window-list.ui @@ -93,136 +93,6 @@ <property name="position">0</property> </packing> </child> - - - - - - - - - -<!-- agregado -- > - <child> - <object class="GtkVBox" id="vbox15"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - - <child> - - <object class="GtkLabel" id="label15"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Button list</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - - </child> - - <child> - <object class="GtkAlignment" id="alignment16"> - <property name="visible">True</property> - <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> - <property name="left_padding">12</property> - - < ! -- lista de opciones -- > - <child> - <object class="GtkVBox" id="vbox16"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - - <child> - <object class="GtkRadioButton" id="style_group_radio"> - <property name="label" translatable="yes">Show application icon and title</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - - <child> - <object class="GtkRadioButton" id="icon_group_radio"> - <property name="label" translatable="yes">Show only application icon image</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - <property name="group">style_group_radio</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - - <child> - <object class="GtkRadioButton" id="text_group_radio"> - <property name="label" translatable="yes">Show only application text title</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> - <property name="group">style_group_radio</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">2</property> - </packing> - </child> - - </object> - </child> - - </object> - - <packing> - < !-- posicion dentro de la primer tabla vertical -- > - <property name="position">1</property> - </packing> - - </child> - - </object> - - <packing> - <property name="expand">False</property> - <property name="position">1</property> - </packing> - - </child> - -< ! -- !agregado --> - - - - - - - - - - <child> <object class="GtkVBox" id="vbox11"> <property name="visible">True</property> diff --git a/applets/wncklet/window-menu.c b/applets/wncklet/window-menu.c index dabdb7e8..c1884704 100644 --- a/applets/wncklet/window-menu.c +++ b/applets/wncklet/window-menu.c @@ -25,8 +25,6 @@ * Jacob Berkman <[email protected]> */ -#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1 - #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -37,7 +35,7 @@ #include <glib/gi18n.h> #include <gdk/gdkkeysyms.h> -#include <libwnck/selector.h> +#include <libmatewnck/selector.h> #include "wncklet.h" #include "window-menu.h" @@ -59,6 +57,9 @@ static void window_menu_help(GtkAction* action, WindowMenu* window_menu) static void window_menu_about(GtkAction* action, WindowMenu* window_menu) { static const char* authors[] = { + "Perberos <[email protected]>", + "Steve Zesch <[email protected]>", + "Stefano Karapetsas <[email protected]>", "Mark McLoughlin <[email protected]>", "George Lebl <[email protected]>", "Jacob Berkman <[email protected]>", @@ -66,11 +67,12 @@ static void window_menu_about(GtkAction* action, WindowMenu* window_menu) }; const char* documenters[] = { - "Sun MATE Documentation Team <[email protected]>", + "Sun GNOME Documentation Team <[email protected]>", NULL }; char copyright[] = \ + "Copyright \xc2\xa9 2011 Perberos\n" "Copyright \xc2\xa9 2003 Sun Microsystems, Inc.\n" "Copyright \xc2\xa9 2001 Free Software Foundation, Inc.\n" "Copyright \xc2\xa9 2000 Helix Code, Inc."; @@ -85,7 +87,7 @@ static void window_menu_about(GtkAction* action, WindowMenu* window_menu) "logo-icon-name", WINDOW_MENU_ICON, "translator-credits", _("translator-credits"), "version", VERSION, - "website", "http://matsusoft.com.ar/projects/mate/", + "website", "http://www.mate-desktop.org/", NULL); } @@ -179,7 +181,7 @@ static void window_menu_size_allocate(MatePanelApplet* applet, GtkAllocation* al static gboolean window_menu_key_press_event(GtkWidget* widget, GdkEventKey* event, WindowMenu* window_menu) { GtkMenuShell* menu_shell; - WnckSelector* selector; + MatewnckSelector* selector; switch (event->keyval) { @@ -189,7 +191,7 @@ static gboolean window_menu_key_press_event(GtkWidget* widget, GdkEventKey* even case GDK_Return: case GDK_space: case GDK_KP_Space: - selector = WNCK_SELECTOR(window_menu->selector); + selector = MATEWNCK_SELECTOR(window_menu->selector); /* * We need to call _gtk_menu_shell_activate() here as is done in * window_key_press_handler in gtkmenubar.c which pops up menu @@ -249,7 +251,7 @@ gboolean window_menu_applet_fill(MatePanelApplet* applet) g_free(ui_path); g_object_unref(action_group); - window_menu->selector = wnck_selector_new(); + window_menu->selector = matewnck_selector_new(); gtk_container_add(GTK_CONTAINER(window_menu->applet), window_menu->selector); mate_panel_applet_set_background_widget(MATE_PANEL_APPLET(window_menu->applet), GTK_WIDGET(window_menu->selector)); diff --git a/applets/wncklet/wncklet.c b/applets/wncklet/wncklet.c index 43135620..22148500 100644 --- a/applets/wncklet/wncklet.c +++ b/applets/wncklet/wncklet.c @@ -30,8 +30,8 @@ #include <glib/gi18n.h> #include <gtk/gtk.h> -#include <libwnck/screen.h> -#include <libwnck/util.h> +#include <libmatewnck/screen.h> +#include <libmatewnck/util.h> #include "wncklet.h" #include "window-menu.h" @@ -92,16 +92,16 @@ void wncklet_display_help(GtkWidget* widget, const char* doc_id, const char* lin } } -WnckScreen* wncklet_get_screen(GtkWidget* applet) +MatewnckScreen* wncklet_get_screen(GtkWidget* applet) { int screen_num; if (!gtk_widget_has_screen(applet)) - return wnck_screen_get_default(); + return matewnck_screen_get_default(); screen_num = gdk_screen_get_number(gtk_widget_get_screen(applet)); - return wnck_screen_get(screen_num); + return matewnck_screen_get(screen_num); } void wncklet_connect_while_alive(gpointer object, const char* signal, GCallback func, gpointer func_data, gpointer alive_object) @@ -120,7 +120,7 @@ static gboolean wncklet_factory(MatePanelApplet* applet, const char* iid, gpoint if (!type_registered) { - wnck_set_client_type(WNCK_CLIENT_TYPE_PAGER); + matewnck_set_client_type(MATEWNCK_CLIENT_TYPE_PAGER); type_registered = TRUE; } diff --git a/applets/wncklet/wncklet.h b/applets/wncklet/wncklet.h index 933cf452..2b890b01 100644 --- a/applets/wncklet/wncklet.h +++ b/applets/wncklet/wncklet.h @@ -24,8 +24,7 @@ #ifndef __WNCKLET_H__ #define __WNCKLET_H__ -#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1 -#include <libwnck/screen.h> +#include <libmatewnck/screen.h> #include <glib.h> #include <gtk/gtk.h> @@ -37,7 +36,7 @@ extern "C" { void wncklet_display_help(GtkWidget* widget, const char* doc_id, const char* link_id, const char* icon_name); -WnckScreen* wncklet_get_screen(GtkWidget* applet); +MatewnckScreen* wncklet_get_screen(GtkWidget* applet); void wncklet_connect_while_alive(gpointer object, const char* signal, GCallback func, gpointer func_data, gpointer alive_object); diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c index cd241bea..3fcd5085 100644 --- a/applets/wncklet/workspace-switcher.c +++ b/applets/wncklet/workspace-switcher.c @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ /* - * libwnck based pager applet. + * libmatewnck based pager applet. * (C) 2001 Alexander Larsson * (C) 2001 Red Hat, Inc * @@ -8,8 +8,6 @@ * */ -#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1 - #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -23,7 +21,7 @@ #include <glib/gi18n.h> #include <gtk/gtk.h> -#include <libwnck/libwnck.h> +#include <libmatewnck/libmatewnck.h> #include <mateconf/mateconf-client.h> #include "workspace-switcher.h" @@ -51,7 +49,7 @@ typedef struct { GtkWidget* pager; - WnckScreen* screen; + MatewnckScreen* screen; PagerWM wm; /* Properties: */ @@ -70,7 +68,7 @@ typedef struct { GtkOrientation orientation; int n_rows; /* for vertical layout this is cols */ - WnckPagerDisplayMode display_mode; + MatewnckPagerDisplayMode display_mode; gboolean display_all; /* mateconf listeners id */ @@ -83,14 +81,14 @@ static void display_about_dialog(GtkAction* action, PagerData* pager); static void pager_update(PagerData* pager) { - wnck_pager_set_orientation(WNCK_PAGER(pager->pager), pager->orientation); - wnck_pager_set_n_rows(WNCK_PAGER(pager->pager), pager->n_rows); - wnck_pager_set_show_all(WNCK_PAGER(pager->pager), pager->display_all); + matewnck_pager_set_orientation(MATEWNCK_PAGER(pager->pager), pager->orientation); + matewnck_pager_set_n_rows(MATEWNCK_PAGER(pager->pager), pager->n_rows); + matewnck_pager_set_show_all(MATEWNCK_PAGER(pager->pager), pager->display_all); if (pager->wm == PAGER_WM_MARCO) - wnck_pager_set_display_mode(WNCK_PAGER(pager->pager), pager->display_mode); + matewnck_pager_set_display_mode(MATEWNCK_PAGER(pager->pager), pager->display_mode); else - wnck_pager_set_display_mode(WNCK_PAGER(pager->pager), WNCK_PAGER_DISPLAY_CONTENT); + matewnck_pager_set_display_mode(MATEWNCK_PAGER(pager->pager), MATEWNCK_PAGER_DISPLAY_CONTENT); } static void update_properties_for_wm(PagerData* pager) @@ -129,11 +127,11 @@ static void update_properties_for_wm(PagerData* pager) gtk_window_reshow_with_initial_size(GTK_WINDOW(pager->properties_dialog)); } -static void window_manager_changed(WnckScreen* screen, PagerData* pager) +static void window_manager_changed(MatewnckScreen* screen, PagerData* pager) { const char *wm_name; - wm_name = wnck_screen_get_window_manager_name(screen); + wm_name = matewnck_screen_get_window_manager_name(screen); if (!wm_name) pager->wm = PAGER_WM_UNKNOWN; @@ -194,13 +192,13 @@ static void applet_change_background(MatePanelApplet* applet, MatePanelAppletBac switch (type) { case PANEL_NO_BACKGROUND: - wnck_pager_set_shadow_type(WNCK_PAGER(pager->pager), GTK_SHADOW_IN); + matewnck_pager_set_shadow_type(MATEWNCK_PAGER(pager->pager), GTK_SHADOW_IN); break; case PANEL_COLOR_BACKGROUND: - wnck_pager_set_shadow_type(WNCK_PAGER(pager->pager), GTK_SHADOW_NONE); + matewnck_pager_set_shadow_type(MATEWNCK_PAGER(pager->pager), GTK_SHADOW_NONE); break; case PANEL_PIXMAP_BACKGROUND: - wnck_pager_set_shadow_type(WNCK_PAGER(pager->pager), GTK_SHADOW_NONE); + matewnck_pager_set_shadow_type(MATEWNCK_PAGER(pager->pager), GTK_SHADOW_NONE); break; } } @@ -216,8 +214,8 @@ static gboolean applet_scroll(MatePanelApplet* applet, GdkEventScroll* event, Pa if (event->type != GDK_SCROLL) return FALSE; - index = wnck_workspace_get_number(wnck_screen_get_active_workspace(pager->screen)); - n_workspaces = wnck_screen_get_workspace_count(pager->screen); + index = matewnck_workspace_get_number(matewnck_screen_get_active_workspace(pager->screen)); + n_workspaces = matewnck_screen_get_workspace_count(pager->screen); n_columns = n_workspaces / pager->n_rows; if (n_workspaces % pager->n_rows != 0) @@ -284,7 +282,7 @@ static gboolean applet_scroll(MatePanelApplet* applet, GdkEventScroll* event, Pa break; } - wnck_workspace_activate(wnck_screen_get_workspace(pager->screen, index), event->time); + matewnck_workspace_activate(matewnck_screen_get_workspace(pager->screen, index), event->time); return TRUE; } @@ -365,11 +363,11 @@ static void display_workspace_names_changed(MateConfClient* client, guint cnxn_i if (value) { - pager->display_mode = WNCK_PAGER_DISPLAY_NAME; + pager->display_mode = MATEWNCK_PAGER_DISPLAY_NAME; } else { - pager->display_mode = WNCK_PAGER_DISPLAY_CONTENT; + pager->display_mode = MATEWNCK_PAGER_DISPLAY_CONTENT; } pager_update(pager); @@ -480,11 +478,11 @@ gboolean workspace_switcher_applet_fill(MatePanelApplet* applet) if (display_names) { - pager->display_mode = WNCK_PAGER_DISPLAY_NAME; + pager->display_mode = MATEWNCK_PAGER_DISPLAY_NAME; } else { - pager->display_mode = WNCK_PAGER_DISPLAY_CONTENT; + pager->display_mode = MATEWNCK_PAGER_DISPLAY_CONTENT; } error = NULL; @@ -510,10 +508,10 @@ gboolean workspace_switcher_applet_fill(MatePanelApplet* applet) break; } - pager->pager = wnck_pager_new(NULL); + pager->pager = matewnck_pager_new(NULL); pager->screen = NULL; pager->wm = PAGER_WM_UNKNOWN; - wnck_pager_set_shadow_type(WNCK_PAGER(pager->pager), GTK_SHADOW_IN); + matewnck_pager_set_shadow_type(MATEWNCK_PAGER(pager->pager), GTK_SHADOW_IN); g_signal_connect(G_OBJECT(pager->pager), "destroy", G_CALLBACK(destroy_pager), pager); @@ -559,18 +557,22 @@ static void display_help_dialog(GtkAction* action, PagerData* pager) static void display_about_dialog(GtkAction* action, PagerData* pager) { static const gchar* authors[] = { + "Perberos <[email protected]>", + "Steve Zesch <[email protected]>", + "Stefano Karapetsas <[email protected]>", "Alexander Larsson <[email protected]>", NULL }; const char* documenters[] = { "John Fleck <[email protected]>", - "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(pager->applet), "program-name", _("Workspace Switcher"), @@ -582,7 +584,7 @@ static void display_about_dialog(GtkAction* action, PagerData* pager) "logo-icon-name", WORKSPACE_SWITCHER_ICON, "translator-credits", _("translator-credits"), "version", VERSION, - "website", "http://matsusoft.com.ar/projects/mate/", + "website", "http://www.mate-desktop.org/", NULL); } @@ -605,10 +607,10 @@ static void num_rows_value_changed(GtkSpinButton* button, PagerData* pager) static void update_workspaces_model(PagerData* pager) { int nr_ws, i; - WnckWorkspace* workspace; + MatewnckWorkspace* workspace; GtkTreeIter iter; - nr_ws = wnck_screen_get_workspace_count(pager->screen); + nr_ws = matewnck_screen_get_workspace_count(pager->screen); if (pager->properties_dialog) { @@ -619,36 +621,36 @@ static void update_workspaces_model(PagerData* pager) for (i = 0; i < nr_ws; i++) { - workspace = wnck_screen_get_workspace(pager->screen, i); + workspace = matewnck_screen_get_workspace(pager->screen, i); gtk_list_store_append(pager->workspaces_store, &iter); - gtk_list_store_set(pager->workspaces_store, &iter, 0, wnck_workspace_get_name(workspace), -1); + gtk_list_store_set(pager->workspaces_store, &iter, 0, matewnck_workspace_get_name(workspace), -1); } } } -static void workspace_renamed(WnckWorkspace* space, PagerData* pager) +static void workspace_renamed(MatewnckWorkspace* space, PagerData* pager) { int i; GtkTreeIter iter; - i = wnck_workspace_get_number(space); + i = matewnck_workspace_get_number(space); if (gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(pager->workspaces_store), &iter, NULL, i)) - gtk_list_store_set(pager->workspaces_store, &iter, 0, wnck_workspace_get_name(space), -1); + gtk_list_store_set(pager->workspaces_store, &iter, 0, matewnck_workspace_get_name(space), -1); } -static void workspace_created(WnckScreen* screen, WnckWorkspace* space, PagerData* pager) +static void workspace_created(MatewnckScreen* screen, MatewnckWorkspace* space, PagerData* pager) { - g_return_if_fail(WNCK_IS_SCREEN(screen)); + g_return_if_fail(MATEWNCK_IS_SCREEN(screen)); update_workspaces_model(pager); wncklet_connect_while_alive(space, "name_changed", G_CALLBACK(workspace_renamed), pager, pager->properties_dialog); } -static void workspace_destroyed(WnckScreen* screen, WnckWorkspace* space, PagerData* pager) +static void workspace_destroyed(MatewnckScreen* screen, MatewnckWorkspace* space, PagerData* pager) { - g_return_if_fail(WNCK_IS_SCREEN(screen)); + g_return_if_fail(MATEWNCK_IS_SCREEN(screen)); update_workspaces_model(pager); } @@ -659,7 +661,7 @@ static void num_workspaces_value_changed(GtkSpinButton* button, PagerData* pager * FIXME: remove this if bug 410520 gets fixed. */ button->timer_step = 0.2; - wnck_screen_change_workspace_count(pager->screen, gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(pager->num_workspaces_spin))); + matewnck_screen_change_workspace_count(pager->screen, gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(pager->num_workspaces_spin))); } static gboolean workspaces_tree_focused_out(GtkTreeView* treeview, GdkEventFocus* event, PagerData* pager) @@ -674,18 +676,18 @@ static gboolean workspaces_tree_focused_out(GtkTreeView* treeview, GdkEventFocus static void workspace_name_edited(GtkCellRendererText* cell_renderer_text, const gchar* path, const gchar* new_text, PagerData* pager) { const gint* indices; - WnckWorkspace* workspace; + MatewnckWorkspace* workspace; GtkTreePath* p; p = gtk_tree_path_new_from_string(path); indices = gtk_tree_path_get_indices(p); - workspace = wnck_screen_get_workspace(pager->screen, indices[0]); + workspace = matewnck_screen_get_workspace(pager->screen, indices[0]); if (workspace != NULL) { gchar* temp_name = g_strdup(new_text); - wnck_workspace_change_name(workspace, g_strstrip(temp_name)); + matewnck_workspace_change_name(workspace, g_strstrip(temp_name)); g_free(temp_name); } @@ -826,7 +828,7 @@ static void setup_dialog(GtkBuilder* builder, PagerData* pager) g_signal_connect(G_OBJECT(pager->display_workspaces_toggle), "toggled", (GCallback) display_workspace_names_toggled, pager); - if (pager->display_mode == WNCK_PAGER_DISPLAY_NAME) + if (pager->display_mode == MATEWNCK_PAGER_DISPLAY_NAME) { value = TRUE; } @@ -867,7 +869,7 @@ static void setup_dialog(GtkBuilder* builder, PagerData* pager) g_signal_connect(WID("done_button"), "clicked", (GCallback) close_dialog, pager); - gtk_spin_button_set_value(GTK_SPIN_BUTTON(pager->num_workspaces_spin), wnck_screen_get_workspace_count(pager->screen)); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(pager->num_workspaces_spin), matewnck_screen_get_workspace_count(pager->screen)); g_signal_connect(G_OBJECT(pager->num_workspaces_spin), "value_changed", (GCallback) num_workspaces_value_changed, pager); wncklet_connect_while_alive(pager->screen, "workspace_created", G_CALLBACK(workspace_created), pager, pager->properties_dialog); @@ -887,11 +889,11 @@ static void setup_dialog(GtkBuilder* builder, PagerData* pager) gtk_tree_view_append_column(GTK_TREE_VIEW(pager->workspaces_tree), column); g_signal_connect(cell, "edited", (GCallback) workspace_name_edited, pager); - nr_ws = wnck_screen_get_workspace_count(pager->screen); + nr_ws = matewnck_screen_get_workspace_count(pager->screen); for (i = 0; i < nr_ws; i++) { - wncklet_connect_while_alive(G_OBJECT(wnck_screen_get_workspace(pager->screen, i)), "name_changed", G_CALLBACK(workspace_renamed), pager, pager->properties_dialog); + wncklet_connect_while_alive(G_OBJECT(matewnck_screen_get_workspace(pager->screen, i)), "name_changed", G_CALLBACK(workspace_renamed), pager, pager->properties_dialog); } update_properties_for_wm(pager); diff --git a/applets/wncklet/workspace-switcher.h b/applets/wncklet/workspace-switcher.h index 7d7dead5..f2e45068 100644 --- a/applets/wncklet/workspace-switcher.h +++ b/applets/wncklet/workspace-switcher.h @@ -1,5 +1,5 @@ /* - * libwnck based pager Apple. + * libmatewnck based pager Apple. * (C) 2001 Alexander Larsson * * Authors: Alexander Larsson |