diff -ru old/applets/maintained/shiny-switcher/shinyswitcherapplet.c new/applets/maintained/shiny-switcher/shinyswitcherapplet.c --- old/applets/maintained/shiny-switcher/shinyswitcherapplet.c 2009-12-01 21:27:34.000000000 +0100 +++ new/applets/maintained/shiny-switcher/shinyswitcherapplet.c 2011-05-24 11:14:28.571471869 +0200 @@ -32,7 +32,7 @@ typedef struct _AwnShinySwitcherPrivate AwnShinySwitcherPrivate; -struct _AwnShinySwitcherPrivate +struct _AwnShinySwitcherPrivate { GdkPixbuf *icon; @@ -107,7 +107,7 @@ DesktopAgnosticConfigClient *config; DesktopAgnosticConfigClient *dock_config; AwnAlignment * align; - + GtkPositionType orient; gboolean reloading; @@ -160,7 +160,7 @@ static gboolean awn_shiny_switcher_setup (AwnShinySwitcher * object); -static void +static void config_get_color(DesktopAgnosticConfigClient *client, const gchar *key, DesktopAgnosticColor **color) { GError *error = NULL; @@ -194,12 +194,12 @@ } \ }while(0) -static void +static void _change_config_cb(const gchar *group, const gchar *key, const GValue *value, gpointer user_data) { AwnShinySwitcher *shinyswitcher = (AwnShinySwitcher *)user_data; AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); - + if (!priv->reloading) { priv->reloading = TRUE; @@ -208,12 +208,12 @@ } } -static void +static void _change_config_ws_cb(const gchar *group, const gchar *key, const GValue *value, gpointer user_data) { AwnShinySwitcher *shinyswitcher = (AwnShinySwitcher *)user_data; AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); - + if (!priv->reloading) { priv->reloading = TRUE; @@ -222,12 +222,12 @@ } } -static void +static void init_config(AwnShinySwitcher *shinyswitcher) { GError *error = NULL; AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); - + if (!priv->config) { priv->config = awn_config_get_default_for_applet(AWN_APPLET(shinyswitcher), NULL); @@ -381,7 +381,7 @@ priv->show_tooltips = FALSE; /* buggy at the moment will be a config option eventually */ } -static double +static double vp_vscale(AwnShinySwitcher *shinyswitcher) { static double cached = 1; @@ -398,12 +398,12 @@ return result; } -static double +static double vp_hscale(AwnShinySwitcher *shinyswitcher) { static double cached = 1; double result = cached; - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); WnckWorkspace * space = wnck_screen_get_active_workspace(priv->wnck_screen); if (space) @@ -416,10 +416,10 @@ } -static void +static void calc_dimensions(AwnShinySwitcher *shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); /* FIXME this is no longer screen width/height it's workspace */ int wnck_ws_width = wnck_workspace_get_width(wnck_screen_get_active_workspace(priv->wnck_screen)); int wnck_ws_height = wnck_workspace_get_height(wnck_screen_get_active_workspace(priv->wnck_screen)); @@ -435,7 +435,7 @@ { case GTK_POS_BOTTOM: - + case GTK_POS_TOP: priv->mini_work_height = priv->height * priv->applet_scale / priv->rows; priv->mini_work_width = priv->mini_work_height * priv->applet_scale * scr_ratio * @@ -445,7 +445,7 @@ case GTK_POS_LEFT: case GTK_POS_RIGHT: - priv->mini_work_width = priv->height * priv->applet_scale / priv->cols; + priv->mini_work_width = priv->height * priv->applet_scale / priv->cols; priv->mini_work_height = priv->mini_work_width * priv->applet_scale * (1.0/scr_ratio ) *( ((double)wnck_ws_height / (double)wnck_scr_height) @@ -463,13 +463,13 @@ } -static GdkPixmap * +static GdkPixmap * copy_pixmap(AwnShinySwitcher *shinyswitcher, GdkPixmap * src) { GdkPixmap * copy; int w, h; AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); - + g_return_val_if_fail(src,NULL); gdk_drawable_get_size(src, &w, &h); if (!w || !h) @@ -483,14 +483,14 @@ /* grabs the wallpaper as a gdkpixmap. */ /* FIXME This needs a cleanup */ -static void +static void grab_wallpaper(AwnShinySwitcher *shinyswitcher) { int w, h; GtkWidget * widget; static GdkPixmap* wallpaper = NULL; AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); - + static gulong old_xid = -1; gulong wallpaper_xid = wnck_screen_get_background_pixmap(priv->wnck_screen); if (!wallpaper || (old_xid != wallpaper_xid)) @@ -545,10 +545,10 @@ gtk_widget_destroy(widget); } -static void +static void set_background(AwnShinySwitcher *shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); if (priv->grab_wallpaper) { grab_wallpaper(shinyswitcher); @@ -610,7 +610,7 @@ return TRUE; } -static gboolean +static gboolean _button_workspace(GtkWidget *widget, GdkEventButton *event, Workplace_info * ws) { @@ -639,9 +639,9 @@ menu = awn_applet_create_default_menu(AWN_APPLET(shinyswitcher)); gtk_menu_set_screen(GTK_MENU(menu), NULL); item = gtk_image_menu_item_new_with_label("Applet Preferences"); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM(item), - gtk_image_new_from_stock (GTK_STOCK_PREFERENCES,GTK_ICON_SIZE_MENU)); - + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM(item), + gtk_image_new_from_stock (GTK_STOCK_PREFERENCES,GTK_ICON_SIZE_MENU)); + gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), gtk_image_new_from_stock(GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU)); @@ -667,14 +667,14 @@ return FALSE; } -static void +static void _menu_selection_done(GtkMenuShell *menushell, AwnShinySwitcher *shinyswitcher) { queue_all_render(shinyswitcher); } -static gboolean +static gboolean _button_win(GtkWidget *widget, GdkEventButton *event, Win_press_data * data) { WnckWindow* wnck_win = data->wnck_window; @@ -682,7 +682,7 @@ GtkWidget *item = NULL; AwnShinySwitcher * shinyswitcher = AWN_SHINY_SWITCHER(data->shinyswitcher); AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); - + if (! WNCK_IS_WINDOW(wnck_win)) { return TRUE; @@ -695,7 +695,7 @@ { int x,y,w,h; int ws_x,ws_y; - + wnck_window_get_geometry (wnck_win, &x,&y,&w,&h); x = x + wnck_workspace_get_viewport_x (space); y = y + wnck_workspace_get_viewport_y (space); @@ -705,7 +705,7 @@ wnck_screen_move_viewport(priv->wnck_screen, ws_x*wnck_screen_get_width(priv->wnck_screen), ws_y*wnck_screen_get_height(priv->wnck_screen)); - + } if (space) { @@ -768,7 +768,7 @@ } -static gboolean +static gboolean _scroll_event(GtkWidget *widget, GdkEventMotion *event, AwnShinySwitcher *shinyswitcher) { AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); @@ -779,49 +779,97 @@ { if (event->type == GDK_SCROLL) { - WnckMotionDirection direction1, direction2; + WnckMotionDirection direction1, direction2, direction3, direction4; switch (priv->mousewheel) { case 1: - case 3: direction1 = WNCK_MOTION_LEFT; direction2 = WNCK_MOTION_RIGHT; + direction3 = WNCK_MOTION_UP; + direction4 = WNCK_MOTION_DOWN; break; case 2: - case 4: - default: direction1 = WNCK_MOTION_RIGHT; direction2 = WNCK_MOTION_LEFT; - + direction3 = WNCK_MOTION_DOWN; + direction4 = WNCK_MOTION_UP; } - if (event->state & GDK_SHIFT_MASK) + if (((GdkEventScroll*)event)->direction == GDK_SCROLL_DOWN) { - new_space = wnck_workspace_get_neighbor(cur_space, WNCK_MOTION_RIGHT); + /* scrolling backwards, swap directions */ + WnckMotionDirection tmp; + + tmp = direction1; + direction1 = direction2; // WNCK_MOTION_RIGHT + direction2 = tmp; // WNCK_MOTION_LEFT + + tmp = direction3; + direction3 = direction4; // WNCK_MOTION_DOWN + direction4 = tmp; // WNCK_MOTION_UP } - else - { - new_space = wnck_workspace_get_neighbor(cur_space, WNCK_MOTION_LEFT); + new_space = wnck_workspace_get_neighbor(cur_space, direction1); + + if (!new_space) { + /* wrap to next row */ + WnckWorkspace *tmp_space = wnck_workspace_get_neighbor(cur_space, direction3); + + /* find last space on row */ + if (tmp_space != NULL) + { + do { + new_space = tmp_space; + tmp_space = wnck_workspace_get_neighbor(tmp_space, direction2); + } while (tmp_space != NULL); + } + + /* no more rows, wrap around */ + if (priv->mousewheel < 3) { + if (!new_space) + { + /* find last row */ + tmp_space = wnck_workspace_get_neighbor (cur_space, direction4); + if (tmp_space != NULL) + { + do { + new_space = tmp_space; + tmp_space = wnck_workspace_get_neighbor (tmp_space, direction4); + } while (tmp_space != NULL); + } + + /* and last column */ + if (new_space == NULL) tmp_space = cur_space; + else tmp_space = new_space; + + tmp_space = wnck_workspace_get_neighbor(tmp_space, direction2); + if (tmp_space != NULL) + { + do { + new_space = tmp_space; + tmp_space = wnck_workspace_get_neighbor(tmp_space, direction2); + } while (tmp_space != NULL); + } + } + } } - } - if (new_space) - { - wnck_workspace_activate(new_space, event->time); /* FIXME */ + if (new_space) + wnck_workspace_activate(new_space, event->time); + } } return TRUE; } -static void +static void create_containers(AwnShinySwitcher *shinyswitcher) { AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); @@ -869,7 +917,7 @@ win_num = wnck_workspace_get_number(iter->data); priv->mini_wins[win_num] = gtk_fixed_new(); awn_utils_ensure_transparent_bg (priv->mini_wins[win_num]); - + gtk_widget_set_app_paintable(priv->mini_wins[win_num], TRUE); GdkPixmap *copy; @@ -946,16 +994,16 @@ g_signal_connect(GTK_WIDGET(shinyswitcher), "scroll-event" , G_CALLBACK(_scroll_event), shinyswitcher); } -static gint +static gint _cmp_ptrs(gconstpointer a, gconstpointer b) { return a -b; } -static void +static void prepare_to_render_workspace(AwnShinySwitcher *shinyswitcher, WnckWorkspace * space) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); GdkPixmap * copy; Workplace_info * ws2; ws2 = g_tree_lookup(priv->ws_lookup_ev, space); @@ -1037,7 +1085,7 @@ } } -static void +static void image_cache_insert_pixbuf(GTree* cache, gpointer key, GdkPixbuf * pbuf) { int w, h; @@ -1054,7 +1102,7 @@ g_tree_insert(cache, key, leaf); } -static void +static void image_cache_insert_surface(GTree* cache, gpointer key, cairo_surface_t *surface) { int w, h; @@ -1072,7 +1120,7 @@ g_tree_insert(cache, key, leaf); } -static void +static void image_cache_unref_data(Image_cache_item * leaf) { switch (leaf->img_type) @@ -1091,11 +1139,11 @@ } } -static gpointer +static gpointer image_cache_lookup_key_width_height(AwnShinySwitcher *shinyswitcher, GTree* cache, gpointer key, gint width, gint height, gboolean allow_time_expire) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); Image_cache_item * leaf; leaf = g_tree_lookup(cache, key); @@ -1124,7 +1172,7 @@ return NULL; } -static void +static void image_cache_remove(GTree* cache, gpointer key) { Image_cache_item * leaf; @@ -1138,10 +1186,10 @@ } } -static void +static void image_cache_expire(AwnShinySwitcher *shinyswitcher, GTree* cache, gpointer key) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); Image_cache_item * leaf; leaf = g_tree_lookup(cache, key); @@ -1151,11 +1199,11 @@ } } -static void +static void grab_window_xrender_meth(AwnShinySwitcher *shinyswitcher, cairo_t *destcr, WnckWindow *win, double scaled_x, double scaled_y, double scaled_width, double scaled_height, int x, int y, int width, int height, gboolean allow_update) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); int event_base, error_base; gboolean hasNamePixmap = FALSE; gulong Xid = wnck_window_get_xid(win); @@ -1219,11 +1267,11 @@ } -static void +static void grab_window_gdk_meth(AwnShinySwitcher *shinyswitcher, cairo_t *destcr, WnckWindow *win, double scaled_x, double scaled_y, double scaled_width, double scaled_height, int x, int y, int width, int height, gboolean allow_update) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); int w, h; GdkColormap *cmap; /* printf("BEGIN: grab_window_gdk_meth\n"); */ @@ -1346,11 +1394,11 @@ } } -static void +static void do_win_grabs(AwnShinySwitcher *shinyswitcher, cairo_t *destcr, WnckWindow *win, double scaled_x, double scaled_y, double scaled_width, double scaled_height, int x, int y, int width, int height, gboolean on_active_space) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); if (! WNCK_IS_WINDOW(win)) { return ; @@ -1390,11 +1438,11 @@ } -static void +static void do_icon_overlays(AwnShinySwitcher *shinyswitcher, cairo_t *destcr, WnckWindow *win, double scaled_x, double scaled_y, double scaled_width, double scaled_height, int x, int y, int width, int height, gboolean on_active_space) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); if (! WNCK_IS_WINDOW(win)) { return ; @@ -1507,18 +1555,18 @@ } -static void +static void _unrealize_window_ev(GtkWidget *widget, Win_press_data * data) { g_free(data); } -static void +static void do_event_boxes(AwnShinySwitcher *shinyswitcher, WnckWindow *win, Workplace_info *ws, double scaled_x, double scaled_y, double scaled_width, double scaled_height) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); if (! WNCK_IS_WINDOW(win)) { return ; @@ -1554,10 +1602,10 @@ } -static void +static void remove_queued_render(AwnShinySwitcher *shinyswitcher, WnckWorkspace *space) -{ - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); +{ + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); if (space) { if (g_tree_lookup(priv->ws_changes, space)) @@ -1567,10 +1615,10 @@ } } -static void +static void render_windows_to_wallpaper(AwnShinySwitcher *shinyswitcher, WnckWorkspace * space) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); GList* wnck_spaces = wnck_screen_get_workspaces(priv->wnck_screen); GList * iter; WnckWindow * top_win = NULL; @@ -1689,10 +1737,10 @@ } } -static gboolean +static gboolean do_queued_renders(AwnShinySwitcher *shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); GList* wnck_spaces = wnck_screen_get_workspaces(priv->wnck_screen); GList * iter; @@ -1700,7 +1748,7 @@ { return TRUE; } - + for (iter = g_list_first(wnck_spaces);iter;iter = g_list_next(iter)) { if (g_tree_lookup(priv->ws_changes, iter->data)) @@ -1713,7 +1761,7 @@ return TRUE; } -static void +static void queue_render(AwnShinySwitcher *shinyswitcher, WnckWorkspace *space) { AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); @@ -1726,7 +1774,7 @@ } } -static void +static void queue_all_render(AwnShinySwitcher *shinyswitcher) { AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); @@ -1739,10 +1787,10 @@ } } -static void +static void _activewin_change(WnckScreen *screen, WnckWindow *previously_active_window, AwnShinySwitcher *shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); WnckWorkspace *prev_space = NULL; WnckWindow * act_win = NULL; WnckWorkspace * act_space = NULL; @@ -1802,10 +1850,10 @@ } -static void +static void _workspace_change(WnckScreen *screen, WnckWorkspace *previously_active_space, AwnShinySwitcher *shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); WnckWorkspace *act_space = wnck_screen_get_active_workspace(priv->wnck_screen); if (priv->reloading) @@ -1815,7 +1863,7 @@ if (act_space && previously_active_space) { render_windows_to_wallpaper(shinyswitcher, act_space); - + if (act_space != previously_active_space) { if (priv->got_viewport) @@ -1840,10 +1888,10 @@ } -static void +static void _window_stacking_change(WnckScreen *screen, AwnShinySwitcher *shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); WnckWorkspace *space = wnck_screen_get_active_workspace(priv->wnck_screen); if (priv->reloading) { @@ -1859,10 +1907,10 @@ } } -static void +static void _win_geom_change(WnckWindow *window, AwnShinySwitcher *shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); if (priv->reloading) { return; @@ -1897,22 +1945,22 @@ } } -static void +static void _win_state_change(WnckWindow *window, WnckWindowState changed_mask, WnckWindowState new_state, AwnShinySwitcher *shinyswitcher) { _win_geom_change(window, shinyswitcher); } -static void +static void _win_ws_change(WnckWindow *window, AwnShinySwitcher *shinyswitcher) { queue_all_render(shinyswitcher); } -static gboolean +static gboolean create_windows(AwnShinySwitcher *shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); GList* wnck_spaces = wnck_screen_get_workspaces(priv->wnck_screen); GList * iter; @@ -1967,10 +2015,10 @@ return FALSE; } -static void +static void _wallpaper_change(WnckScreen *screen, AwnShinySwitcher *shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); if (priv->reloading) { return; @@ -1981,7 +2029,7 @@ queue_all_render(shinyswitcher); } -static void +static void _window_opened(WnckScreen *screen, WnckWindow *window, AwnShinySwitcher *shinyswitcher) { AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); @@ -2029,14 +2077,14 @@ } } -static void +static void _window_closed(WnckScreen *screen, WnckWindow *window, AwnShinySwitcher *shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); if (priv->reloading) { return; - } + } image_cache_remove(priv->pixbuf_cache, window); image_cache_remove(priv->surface_cache, window); @@ -2054,10 +2102,10 @@ g_signal_handlers_disconnect_by_func(G_OBJECT(window), G_CALLBACK(_win_ws_change), shinyswitcher); } -static void +static void _composited_changed(GdkScreen *screen, AwnShinySwitcher *shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); screen = gtk_widget_get_screen(GTK_WIDGET(shinyswitcher)); if (gdk_screen_is_composited(screen)) @@ -2073,13 +2121,13 @@ priv->reloading = TRUE; gtk_widget_destroy (GTK_WIDGET(priv->align)); awn_shiny_switcher_setup (AWN_SHINY_SWITCHER (shinyswitcher)); - } + } } -static void +static void _wm_changed(WnckScreen *screen, AwnShinySwitcher *shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); // g_debug(" Window Manager Changed: %s", wnck_screen_get_window_manager_name(screen)); /* @@ -2090,14 +2138,14 @@ priv->reloading = TRUE; gtk_widget_destroy (GTK_WIDGET(priv->align)); // awn_shiny_switcher_setup (AWN_SHINY_SWITCHER (shinyswitcher)); - /*we need to exit from this signal handler before calling some of the + /*we need to exit from this signal handler before calling some of the functions in _setup*/ g_idle_add ( (GSourceFunc)awn_shiny_switcher_setup,shinyswitcher); } } -static void +static void _screen_size_changed(WnckScreen *screen, AwnShinySwitcher *shinyswitcher) { AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); @@ -2105,10 +2153,10 @@ } -static gboolean +static gboolean do_queue_act_ws(AwnShinySwitcher *shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); WnckWorkspace *space; space = wnck_screen_get_active_workspace(priv->wnck_screen); @@ -2121,11 +2169,11 @@ } -static gboolean +static gboolean _waited(AwnShinySwitcher *shinyswitcher) { static gboolean done_once = FALSE; - + AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); priv->pScreen = gtk_widget_get_screen(GTK_WIDGET(AWN_APPLET(shinyswitcher))); wnck_screen_force_update(priv->wnck_screen); @@ -2153,7 +2201,7 @@ g_signal_connect(G_OBJECT(priv->wnck_screen), "window-closed", G_CALLBACK(_window_closed), shinyswitcher); g_signal_connect(G_OBJECT(priv->wnck_screen), "window-opened", G_CALLBACK(_window_opened), shinyswitcher); g_signal_connect(G_OBJECT(priv->wnck_screen), "window-manager-changed", G_CALLBACK(_wm_changed), shinyswitcher); - + #if GLIB_CHECK_VERSION(2,14,0) if (priv->do_queue_freq % 1000 == 0) @@ -2204,14 +2252,14 @@ return FALSE; } -static gboolean +static gboolean _expose_event_window(GtkWidget *widget, GdkEventExpose *expose, gpointer data) { return FALSE; } -static gboolean +static gboolean _expose_event_outer(GtkWidget *widget, GdkEventExpose *expose, AwnShinySwitcher *shinyswitcher) { @@ -2222,7 +2270,7 @@ static void _height_changed(AwnShinySwitcher *app, guint height, AwnShinySwitcher *shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); /* doing this as a tree right now.. cause it's easy and I think I'll need a complex data structure eventually. */ priv->height = height; if (!priv->reloading) @@ -2233,12 +2281,12 @@ priv->container = NULL; create_containers(shinyswitcher); create_windows(shinyswitcher); - gtk_widget_show_all(GTK_WIDGET(shinyswitcher)); + gtk_widget_show_all(GTK_WIDGET(shinyswitcher)); } } -static void +static void _offset_changed(AwnShinySwitcher *app, guint offset, AwnShinySwitcher * shinyswitcher) { } @@ -2247,7 +2295,7 @@ _orient_changed(AwnShinySwitcher *app, GtkPositionType orient, AwnShinySwitcher * shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); priv->orient = orient; if (!priv->reloading) { @@ -2260,16 +2308,16 @@ static void _workspaces_changed(WnckScreen *screen, WnckWorkspace *space, AwnShinySwitcher * shinyswitcher) { - AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); + AwnShinySwitcherPrivate * priv = GET_PRIVATE(shinyswitcher); if (!priv->reloading) { priv->reloading = TRUE; gtk_widget_destroy (GTK_WIDGET(priv->align)); // awn_shiny_switcher_setup (AWN_SHINY_SWITCHER (shinyswitcher)); g_idle_add ((GSourceFunc)awn_shiny_switcher_setup,shinyswitcher); - } + } // gtk_widget_destroy (GTK_WIDGET(priv->align)); -// awn_shiny_switcher_setup (AWN_SHINY_SWITCHER (shinyswitcher)); +// awn_shiny_switcher_setup (AWN_SHINY_SWITCHER (shinyswitcher)); } static void @@ -2381,7 +2429,7 @@ } else { - g_idle_add((GSourceFunc)_waited, object); /* don't need to do this as seconds... happens once. */ + g_idle_add((GSourceFunc)_waited, object); /* don't need to do this as seconds... happens once. */ // _waited (object); } return FALSE; @@ -2392,7 +2440,7 @@ { AwnShinySwitcherPrivate * priv; priv = GET_PRIVATE (object); - + G_OBJECT_CLASS (awn_shiny_switcher_parent_class)->constructed (object); priv->pScreen = NULL; @@ -2404,7 +2452,7 @@ priv->pixbuf_cache = g_tree_new(_cmp_ptrs); priv->surface_cache = g_tree_new(_cmp_ptrs); priv->win_menus = g_tree_new(_cmp_ptrs); - + awn_shiny_switcher_setup (AWN_SHINY_SWITCHER (object)); } Only in new/applets/maintained/shiny-switcher: .shinyswitcherapplet.c.swp diff -ru old/configure.ac new/configure.ac --- old/configure.ac 2010-04-11 16:57:59.000000000 +0200 +++ new/configure.ac 2011-05-24 00:45:58.994438734 +0200 @@ -32,6 +32,7 @@ dnl Python script installation dnl +AC_PATH_PROG(PYTHON, python2 python2.7 python2.6 python2.5 python) AM_PATH_PYTHON(2.5) dnl