Commit 0684ff65 authored by Vincent Untz's avatar Vincent Untz Committed by Vincent Untz
Browse files

wnck_tasklist_set_screen() is useless now (window_list_applet_fill): no

2007-06-18  Vincent Untz  <vuntz@gnome.org>

	* window-list.c: (applet_realized): wnck_tasklist_set_screen() is
	useless now
	(window_list_applet_fill): no need to call wnck_screen_force_update()
	* workspace-switcher.c: (applet_realized): wnck_pager_set_screen() is
	useless now, set the screen of the pager
	(applet_scroll): code cleanup 
	(workspace_switcher_applet_fill): no need to call
	wnck_screen_force_update()
	Fix crash bug #350671.

svn path=/trunk/; revision=10470
parent b51fe7d1
2007-06-18 Vincent Untz <vuntz@gnome.org>
* window-list.c: (applet_realized): wnck_tasklist_set_screen() is
useless now
(window_list_applet_fill): no need to call wnck_screen_force_update()
* workspace-switcher.c: (applet_realized): wnck_pager_set_screen() is
useless now, set the screen of the pager
(applet_scroll): code cleanup
(workspace_switcher_applet_fill): no need to call
wnck_screen_force_update()
Fix crash bug #350671.
==================== 2.19.4 ====================
2007-06-14 Vincent Untz <vuntz@gnome.org>
......
......@@ -32,8 +32,6 @@ typedef struct {
GtkWidget *applet;
GtkWidget *tasklist;
WnckScreen *screen;
gboolean include_all_workspaces;
WnckTasklistGroupingType grouping;
gboolean move_unminimized_windows;
......@@ -108,12 +106,6 @@ static void
applet_realized (PanelApplet *applet,
TasklistData *tasklist)
{
WnckScreen *screen;
screen = wncklet_get_screen (GTK_WIDGET (applet));
wnck_tasklist_set_screen (WNCK_TASKLIST (tasklist->tasklist), screen);
tasklist->icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (tasklist->applet));
}
......@@ -646,12 +638,7 @@ window_list_applet_fill (PanelApplet *applet)
break;
}
tasklist->screen = wncklet_get_screen (tasklist->applet);
/* because the tasklist doesn't respond to signals at the moment */
wnck_screen_force_update (tasklist->screen);
tasklist->tasklist = wnck_tasklist_new (tasklist->screen);
tasklist->tasklist = wnck_tasklist_new (NULL);
wnck_tasklist_set_icon_loader (WNCK_TASKLIST (tasklist->tasklist),
icon_loader_func,
......
......@@ -95,11 +95,7 @@ static void
applet_realized (PanelApplet *applet,
PagerData *pager)
{
WnckScreen *screen;
screen = wncklet_get_screen (GTK_WIDGET (applet));
wnck_pager_set_screen (WNCK_PAGER (pager->pager), screen);
pager->screen = wncklet_get_screen (GTK_WIDGET (applet));
}
static void
......@@ -158,19 +154,17 @@ applet_scroll (PanelApplet *applet,
GdkEventScroll *event,
PagerData *pager)
{
WnckScreen *screen;
GdkScrollDirection absolute_direction;
int index;
int n_workspaces;
int n_columns;
int in_last_row;
GdkScrollDirection absolute_direction;
int index;
int n_workspaces;
int n_columns;
int in_last_row;
if (event->type != GDK_SCROLL)
return FALSE;
screen = wncklet_get_screen (GTK_WIDGET (applet));
index = wnck_workspace_get_number (wnck_screen_get_active_workspace (screen));
n_workspaces = wnck_screen_get_workspace_count (screen);
index = wnck_workspace_get_number (wnck_screen_get_active_workspace (pager->screen));
n_workspaces = wnck_screen_get_workspace_count (pager->screen);
n_columns = n_workspaces / pager->n_rows;
if (n_workspaces % pager->n_rows != 0)
n_columns++;
......@@ -225,7 +219,8 @@ applet_scroll (PanelApplet *applet,
break;
}
wnck_workspace_activate (wnck_screen_get_workspace (screen, index),
wnck_workspace_activate (wnck_screen_get_workspace (pager->screen,
index),
event->time);
return TRUE;
......@@ -458,12 +453,8 @@ workspace_switcher_applet_fill (PanelApplet *applet)
break;
}
pager->screen = wncklet_get_screen (pager->applet);
/* because the pager doesn't respond to signals at the moment */
wnck_screen_force_update (pager->screen);
pager->pager = wnck_pager_new (pager->screen);
pager->pager = wnck_pager_new (NULL);
pager->screen = NULL;
wnck_pager_set_shadow_type (WNCK_PAGER (pager->pager), GTK_SHADOW_IN);
g_signal_connect (G_OBJECT (pager->pager), "destroy",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment