summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Untz <vuntz@gnome.org>2007-06-05 18:15:03 +0000
committerVincent Untz <vuntz@src.gnome.org>2007-06-05 18:15:03 +0000
commitcbff0328dbc14e2984ab35ac6ba7403819f9ec10 (patch)
tree7dfa60cf3595ddc205870cb7e55bc0236a4162a3
parent36c7a9ca11c2075a281c2faccfd3fe748c8dec89 (diff)
downloadlibwnck-cbff0328dbc14e2984ab35ac6ba7403819f9ec10.tar.gz
Add padding to classes so we can add signals in the future, without
2007-06-05 Vincent Untz <vuntz@gnome.org> * libwnck/application.h: * libwnck/class-group.h: * libwnck/pager.h: * libwnck/screen.h: * libwnck/selector.h: * libwnck/tasklist.h: * libwnck/window-menu.c: * libwnck/window-menu.h: * libwnck/window.h: * libwnck/workspace.h: Add padding to classes so we can add signals in the future, without breaking ABI. * libwnck/window-menu.[ch]: kill useless files svn path=/trunk/; revision=1276
-rw-r--r--ChangeLog21
-rw-r--r--libwnck/application.h6
-rw-r--r--libwnck/class-group.h6
-rw-r--r--libwnck/pager.h6
-rw-r--r--libwnck/screen.h5
-rw-r--r--libwnck/selector.h6
-rw-r--r--libwnck/tasklist.h6
-rw-r--r--libwnck/window-menu.c129
-rw-r--r--libwnck/window-menu.h34
-rw-r--r--libwnck/window.h6
-rw-r--r--libwnck/workspace.h6
11 files changed, 62 insertions, 169 deletions
diff --git a/ChangeLog b/ChangeLog
index 2c6b3fc..40d4119 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,29 @@
2007-06-05 Vincent Untz <vuntz@gnome.org>
+ * libwnck/application.h:
+ * libwnck/class-group.h:
+ * libwnck/pager.h:
+ * libwnck/screen.h:
+ * libwnck/selector.h:
+ * libwnck/tasklist.h:
+ * libwnck/window-menu.c:
+ * libwnck/window-menu.h:
+ * libwnck/window.h:
+ * libwnck/workspace.h: Add padding to classes so we can add signals in
+ the future, without breaking ABI.
+ * libwnck/window-menu.[ch]: kill useless files
+
+2007-06-05 Vincent Untz <vuntz@gnome.org>
+
Add previous window/workspace to signal handlers for
active-window-changed and active-workspace-changed WnckScreen signals.
Fix bug #136858.
- * libwnck/pager.c: (active_window_changed_callback): updated for signal change
+ * libwnck/pager.c: (active_window_changed_callback): updated for
+ signal change
(active_workspace_changed_callback): updated for signal change
- * libwnck/screen.[ch]: (wnck_screen_class_init): updated for signal change
+ * libwnck/screen.[ch]: (wnck_screen_class_init): updated for signal
+ change
(update_workspace_list): updated
(update_active_workspace): updated
(emit_active_window_changed): emit signal with previous window
diff --git a/libwnck/application.h b/libwnck/application.h
index bf21c30..e0d6698 100644
--- a/libwnck/application.h
+++ b/libwnck/application.h
@@ -54,6 +54,12 @@ struct _WnckApplicationClass
/* icon changed */
void (* icon_changed) (WnckApplication *app);
+
+ /* Padding for future expansion */
+ void (* pad1) (void);
+ void (* pad2) (void);
+ void (* pad3) (void);
+ void (* pad4) (void);
};
GType wnck_application_get_type (void) G_GNUC_CONST;
diff --git a/libwnck/class-group.h b/libwnck/class-group.h
index ccea4c7..2766b79 100644
--- a/libwnck/class-group.h
+++ b/libwnck/class-group.h
@@ -52,6 +52,12 @@ struct _WnckClassGroupClass
void (* name_changed) (WnckApplication *app);
void (* icon_changed) (WnckApplication *app);
+
+ /* Padding for future expansion */
+ void (* pad1) (void);
+ void (* pad2) (void);
+ void (* pad3) (void);
+ void (* pad4) (void);
};
GType wnck_class_group_get_type (void) G_GNUC_CONST;
diff --git a/libwnck/pager.h b/libwnck/pager.h
index a21a511..7118b7c 100644
--- a/libwnck/pager.h
+++ b/libwnck/pager.h
@@ -48,6 +48,12 @@ struct _WnckPager
struct _WnckPagerClass
{
GtkContainerClass parent_class;
+
+ /* Padding for future expansion */
+ void (* pad1) (void);
+ void (* pad2) (void);
+ void (* pad3) (void);
+ void (* pad4) (void);
};
typedef enum {
diff --git a/libwnck/screen.h b/libwnck/screen.h
index 57af7f4..04533d0 100644
--- a/libwnck/screen.h
+++ b/libwnck/screen.h
@@ -98,16 +98,13 @@ struct _WnckScreenClass
/* Viewport stuff changed */
void (* viewports_changed) (WnckScreen *screen);
-#if 0
+ /* Padding for future expansion */
void (* pad1) (void);
void (* pad2) (void);
void (* pad3) (void);
void (* pad4) (void);
void (* pad5) (void);
void (* pad6) (void);
- void (* pad7) (void);
- void (* pad8) (void);
-#endif
};
typedef struct _WnckWorkspaceLayout WnckWorkspaceLayout;
diff --git a/libwnck/selector.h b/libwnck/selector.h
index 041ba4b..dfc55d9 100644
--- a/libwnck/selector.h
+++ b/libwnck/selector.h
@@ -44,6 +44,12 @@ struct _WnckSelector
struct _WnckSelectorClass
{
GtkMenuBarClass parent_class;
+
+ /* Padding for future expansion */
+ void (* pad1) (void);
+ void (* pad2) (void);
+ void (* pad3) (void);
+ void (* pad4) (void);
};
GtkWidget *wnck_selector_new (void);
diff --git a/libwnck/tasklist.h b/libwnck/tasklist.h
index ef509c3..e3f2a54 100644
--- a/libwnck/tasklist.h
+++ b/libwnck/tasklist.h
@@ -48,6 +48,12 @@ struct _WnckTasklist
struct _WnckTasklistClass
{
GtkContainerClass parent_class;
+
+ /* Padding for future expansion */
+ void (* pad1) (void);
+ void (* pad2) (void);
+ void (* pad3) (void);
+ void (* pad4) (void);
};
typedef enum {
diff --git a/libwnck/window-menu.c b/libwnck/window-menu.c
deleted file mode 100644
index 9f6d726..0000000
--- a/libwnck/window-menu.c
+++ /dev/null
@@ -1,129 +0,0 @@
-/* window menu */
-
-/*
- * Copyright (C) 2001 Havoc Pennington
- *
- * This library 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 library 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 library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "window-menu.h"
-
-static void object_weak_notify (gpointer data,
- GObject *obj);
-static void window_weak_notify (gpointer data,
- GObject *window);
-
-static void
-window_weak_notify (gpointer data,
- GObject *window)
-{
- g_object_set_data (G_OBJECT (data), "wnck-window-data", NULL);
- g_object_weak_unref (G_OBJECT (data),
- object_weak_notify,
- window);
-}
-
-static void
-set_window (GObject *obj,
- WnckWindow *win)
-{
- g_object_set_data (obj, "wnck-window-data", win);
- if (win)
- {
- g_object_weak_ref (G_OBJECT (win), window_weak_notify, obj);
- g_object_weak_ref (obj, object_weak_notify, win);
- }
-}
-
-static void
-object_weak_notify (gpointer data,
- GObject *obj)
-{
- g_object_weak_unref (G_OBJECT (data),
- window_weak_notify,
- obj);
-}
-
-static WnckWindow*
-get_window (GObject *obj)
-{
- return g_object_get_data (obj, "wnck-window-data");
-}
-
-static void
-item_activated_callback (GtkWidget *menu_item,
- gpointer data)
-{
- WnckWindow *win;
-
- win = get_window (G_OBJECT (menu_item));
-
- if (win == NULL)
- return;
-
- wnck_window_activate (win);
-}
-
-GtkWidget*
-wnck_create_window_menu (GList *windows)
-{
- GList *tmp;
- GtkWidget *menu;
-
- menu = gtk_menu_new ();
-
- tmp = windows;
-
- while (tmp != NULL)
- {
- WnckWindow *win = WNCK_WINDOW (tmp->data);
- GdkPixbuf *icon;
- const char *title;
- GtkWidget *mi;
-
- icon = wnck_window_get_icon (win);
- title = wnck_window_get_icon_name (win);
-
- if (icon)
- {
- GtkWidget *image;
-
- image = gtk_image_new_from_pixbuf (icon);
-
- mi = gtk_image_menu_item_new_with_label (title);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi),
- image);
- }
- else
- {
- mi = gtk_menu_item_new_with_label (title);
- }
-
- g_signal_connect (G_OBJECT (mi), "activate",
- G_CALLBACK (item_activated_callback), NULL);
-
- set_window (G_OBJECT (mi), win);
-
- gtk_widget_show (mi);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), mi);
-
- tmp = tmp->next;
- }
-
- return menu;
-}
-
diff --git a/libwnck/window-menu.h b/libwnck/window-menu.h
deleted file mode 100644
index 1c0fbec..0000000
--- a/libwnck/window-menu.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* window menu */
-
-/*
- * Copyright (C) 2001 Havoc Pennington
- *
- * This library 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 library 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 library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef WNCK_WINDOW_MENU_H
-#define WNCK_WINDOW_MENU_H
-
-#include <libwnck/window.h>
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-
-GtkWidget* wnck_create_window_menu (GList *windows);
-
-G_END_DECLS
-
-#endif /* WNCK_WINDOW_MENU_H */
diff --git a/libwnck/window.h b/libwnck/window.h
index 6b9711b..10c30de 100644
--- a/libwnck/window.h
+++ b/libwnck/window.h
@@ -150,6 +150,12 @@ struct _WnckWindowClass
/* Changed size/position */
void (* geometry_changed) (WnckWindow *window);
+
+ /* Padding for future expansion */
+ void (* pad1) (void);
+ void (* pad2) (void);
+ void (* pad3) (void);
+ void (* pad4) (void);
};
GType wnck_window_get_type (void) G_GNUC_CONST;
diff --git a/libwnck/workspace.h b/libwnck/workspace.h
index 028806a..13c5f33 100644
--- a/libwnck/workspace.h
+++ b/libwnck/workspace.h
@@ -49,6 +49,12 @@ struct _WnckWorkspaceClass
GObjectClass parent_class;
void (* name_changed) (WnckWorkspace *space);
+
+ /* Padding for future expansion */
+ void (* pad1) (void);
+ void (* pad2) (void);
+ void (* pad3) (void);
+ void (* pad4) (void);
};
GType wnck_workspace_get_type (void) G_GNUC_CONST;