View | Details | Raw Unified | Return to bug 230478
Collapse All | Expand All

(-)a/ChangeLog (+4 lines)
Lines 10-15 Link Here
10
	(set_table_section_visible): Don't take into account the number of
10
	(set_table_section_visible): Don't take into account the number of
11
	tiles within a table; only consider whether that type of tile is
11
	tiles within a table; only consider whether that type of tile is
12
	allowed to be visible.  Make the code shorter.
12
	allowed to be visible.  Make the code shorter.
13
	(reload_file_table): New function; reload a file table and keep
14
	track of which ones have been reloaded.
15
	(reload_file_table_if_not_loaded): New function.
16
	(select_page): Only reload file tables that have not been loaded before.
13
17
14
2007-12-19  Federico Mena Quintero  <federico@novell.com>
18
2007-12-19  Federico Mena Quintero  <federico@novell.com>
15
19
(-)a/main-menu/src/main-menu-ui.c (-10 / +32 lines)
Lines 101-106 typedef struct { Link Here
101
	gulong       page_selectors_toggled_ids[3];
101
	gulong       page_selectors_toggled_ids[3];
102
	gint         notebook_page_ids [3];
102
	gint         notebook_page_ids [3];
103
103
104
	gboolean       file_tables_loaded[5];
104
	TileTable     *file_tables     [5];
105
	TileTable     *file_tables     [5];
105
	GtkWidget     *table_sections  [5];
106
	GtkWidget     *table_sections  [5];
106
	gboolean       allowable_types [5];
107
	gboolean       allowable_types [5];
Lines 303-308 main_menu_ui_new (PanelApplet *applet) Link Here
303
}
304
}
304
305
305
static void
306
static void
307
reload_file_table (MainMenuUI *this, int table_num)
308
{
309
	MainMenuUIPrivate *priv = PRIVATE (this);
310
311
	tile_table_reload (priv->file_tables[table_num]);
312
	priv->file_tables_loaded[table_num] = TRUE;
313
}
314
315
static void
316
reload_file_table_if_not_loaded (MainMenuUI *this, int table_num)
317
{
318
	MainMenuUIPrivate *priv = PRIVATE (this);
319
320
	if (!priv->file_tables_loaded[table_num])
321
		reload_file_table (this, table_num);
322
}
323
324
static void
306
main_menu_ui_class_init (MainMenuUIClass *this_class)
325
main_menu_ui_class_init (MainMenuUIClass *this_class)
307
{
326
{
308
	GObjectClass *g_obj_class = G_OBJECT_CLASS (this_class);
327
	GObjectClass *g_obj_class = G_OBJECT_CLASS (this_class);
Lines 1133-1149 select_page (MainMenuUI *this, gboolean set_page_selector_button) Link Here
1133
1152
1134
	switch (curr_page) {
1153
	switch (curr_page) {
1135
	case APPS_PAGE:
1154
	case APPS_PAGE:
1136
		tile_table_reload (priv->file_tables[USER_APPS_TABLE]);
1155
		reload_file_table_if_not_loaded (this, USER_APPS_TABLE);
1137
		tile_table_reload (priv->file_tables[RCNT_APPS_TABLE]);
1156
		reload_file_table_if_not_loaded (this, RCNT_APPS_TABLE);
1138
		break;
1157
		break;
1139
1158
1140
	case DOCS_PAGE:
1159
	case DOCS_PAGE:
1141
		tile_table_reload (priv->file_tables[USER_DOCS_TABLE]);
1160
		reload_file_table_if_not_loaded (this, USER_DOCS_TABLE);
1142
		tile_table_reload (priv->file_tables[RCNT_DOCS_TABLE]);
1161
		reload_file_table_if_not_loaded (this, RCNT_DOCS_TABLE);
1143
		break;
1162
		break;
1144
1163
1145
	case DIRS_PAGE:
1164
	case DIRS_PAGE:
1146
		tile_table_reload (priv->file_tables[USER_DIRS_TABLE]);
1165
		reload_file_table_if_not_loaded (this, USER_DIRS_TABLE);
1147
		break;
1166
		break;
1148
1167
1149
	default:
1168
	default:
Lines 2008-2018 tile_table_notify_cb (GObject *g_obj, GParamSpec *pspec, gpointer user_data) Link Here
2008
2027
2009
	switch (table_id) {
2028
	switch (table_id) {
2010
		case USER_APPS_TABLE:
2029
		case USER_APPS_TABLE:
2011
			tile_table_reload (priv->file_tables [RCNT_APPS_TABLE]);
2030
			reload_file_table (this, RCNT_APPS_TABLE);
2012
			break;
2031
			break;
2013
2032
2014
		case USER_DOCS_TABLE:
2033
		case USER_DOCS_TABLE:
2015
			tile_table_reload (priv->file_tables [RCNT_DOCS_TABLE]);
2034
			reload_file_table (this, RCNT_DOCS_TABLE);
2016
			break;
2035
			break;
2017
2036
2018
		default:
2037
		default:
Lines 2252-2264 slab_gdk_message_filter (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer user_d Link Here
2252
static void
2271
static void
2253
user_app_agent_notify_cb (GObject *g_obj, GParamSpec *pspec, gpointer user_data)
2272
user_app_agent_notify_cb (GObject *g_obj, GParamSpec *pspec, gpointer user_data)
2254
{
2273
{
2255
	tile_table_reload (PRIVATE (user_data)->file_tables [RCNT_APPS_TABLE]);
2274
	MainMenuUI *this = MAIN_MENU_UI (user_data);
2275
2276
	reload_file_table (this, RCNT_APPS_TABLE);
2256
}
2277
}
2257
2278
2258
static void
2279
static void
2259
user_doc_agent_notify_cb (GObject *g_obj, GParamSpec *pspec, gpointer user_data)
2280
user_doc_agent_notify_cb (GObject *g_obj, GParamSpec *pspec, gpointer user_data)
2260
{
2281
{
2261
	tile_table_reload (PRIVATE (user_data)->file_tables [RCNT_DOCS_TABLE]);
2282
	MainMenuUI *this = MAIN_MENU_UI (user_data);
2283
2284
	reload_file_table (this, RCNT_DOCS_TABLE);
2262
}
2285
}
2263
2286
2264
static void
2287
static void
2265
- 

Return to bug 230478