diff options
author | Nick Schermer <nick@xfce.org> | 2010-03-28 18:20:21 +0200 |
---|---|---|
committer | Nick Schermer <nick@xfce.org> | 2010-03-28 18:20:21 +0200 |
commit | d3f0e1e91077ee298dd387ce388c6597f48ca6f8 (patch) | |
tree | 89b39b7e8c8d4ae189d9ff238b0656639dc4dea8 | |
parent | f6bda093df202543d93c2097ec74e22e361f8749 (diff) |
Use gtk_widget_get_ancestor() instead of custom function.
-rw-r--r-- | plugins/tasklist/tasklist-widget.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/plugins/tasklist/tasklist-widget.c b/plugins/tasklist/tasklist-widget.c index ab155ac7..d32ef37a 100644 --- a/plugins/tasklist/tasklist-widget.c +++ b/plugins/tasklist/tasklist-widget.c @@ -67,6 +67,8 @@ } G_STMT_END #define xfce_taskbar_is_locked(tasklist) (XFCE_TASKLIST (tasklist)->locked > 0) +#define xfce_tasklist_get_panel_plugin(tasklist) gtk_widget_get_ancestor (GTK_WIDGET (tasklist), XFCE_TYPE_PANEL_PLUGIN) + enum @@ -234,7 +236,6 @@ static void xfce_tasklist_window_removed (WnckScreen *screen, WnckWindow *window static void xfce_tasklist_viewports_changed (WnckScreen *screen, XfceTasklist *tasklist); static void xfce_tasklist_skipped_windows_state_changed (WnckWindow *window, WnckWindowState changed_state, WnckWindowState new_state, XfceTasklist *tasklist); static void xfce_tasklist_sort (XfceTasklist *tasklist); -static GtkWidget *xfce_tasklist_get_panel_plugin (XfceTasklist *tasklist); static gboolean xfce_tasklist_update_icon_geometries (gpointer data); static void xfce_tasklist_update_icon_geometries_destroyed (gpointer data); @@ -1571,23 +1572,6 @@ xfce_tasklist_sort (XfceTasklist *tasklist) -static GtkWidget * -xfce_tasklist_get_panel_plugin (XfceTasklist *tasklist) -{ - GtkWidget *p; - - panel_return_val_if_fail (XFCE_IS_TASKLIST (tasklist), NULL); - - /* look in the parents for the panel plugin */ - for (p = GTK_WIDGET (tasklist); p != NULL; p = gtk_widget_get_parent (p)) - if (g_type_is_a (G_OBJECT_TYPE (p), XFCE_TYPE_PANEL_PLUGIN)) - return p; - - return NULL; -} - - - static gboolean xfce_tasklist_update_icon_geometries (gpointer data) { |