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

(-)a/ChangeLog (+3 lines)
Lines 7-12 Link Here
7
	reload them here when selecting a page.
7
	reload them here when selecting a page.
8
	(main_menu_ui_new): Reload the sys_table here, at startup.
8
	(main_menu_ui_new): Reload the sys_table here, at startup.
9
	(apply_lockdown_settings): And don't reload all the tables here.
9
	(apply_lockdown_settings): And don't reload all the tables here.
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
12
	allowed to be visible.  Make the code shorter.
10
13
11
2007-12-19  Federico Mena Quintero  <federico@novell.com>
14
2007-12-19  Federico Mena Quintero  <federico@novell.com>
12
15
(-)a/main-menu/src/main-menu-ui.c (-23 / +11 lines)
Lines 1298-1333 set_table_section_visible (MainMenuUI *this, TileTable *table) Link Here
1298
1298
1299
	gint   table_id;
1299
	gint   table_id;
1300
	GList *tiles;
1300
	GList *tiles;
1301
	gboolean visible;
1301
1302
1302
1303
1303
	table_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (table), "table-id"));
1304
	table_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (table), "table-id"));
1304
	g_object_get (G_OBJECT (table), TILE_TABLE_TILES_PROP, & tiles, NULL);
1305
	g_object_get (G_OBJECT (table), TILE_TABLE_TILES_PROP, & tiles, NULL);
1305
1306
1306
	if (priv->allowable_types [table_id] && g_list_length (tiles) > 0)
1307
	visible = priv->allowable_types [table_id];
1307
		gtk_widget_show (priv->table_sections [table_id]);
1308
	g_object_set (priv->table_sections [table_id], "visible", visible, NULL);
1308
	else
1309
		gtk_widget_hide (priv->table_sections [table_id]);
1310
1309
1311
	if (
1310
	visible = (GTK_WIDGET_VISIBLE (priv->table_sections [USER_APPS_TABLE])
1312
		GTK_WIDGET_VISIBLE (priv->table_sections [USER_APPS_TABLE]) ||
1311
		   || GTK_WIDGET_VISIBLE (priv->table_sections [RCNT_APPS_TABLE]));
1313
		GTK_WIDGET_VISIBLE (priv->table_sections [RCNT_APPS_TABLE])
1312
	g_object_set (priv->page_selectors [APPS_PAGE], "visible", visible, NULL);
1314
	)
1315
		gtk_widget_show (priv->page_selectors [APPS_PAGE]);
1316
	else
1317
		gtk_widget_hide (priv->page_selectors [APPS_PAGE]);
1318
1313
1319
	if (
1314
	visible = (GTK_WIDGET_VISIBLE (priv->table_sections [USER_DOCS_TABLE]) ||
1320
		GTK_WIDGET_VISIBLE (priv->table_sections [USER_DOCS_TABLE]) ||
1315
		   GTK_WIDGET_VISIBLE (priv->table_sections [RCNT_DOCS_TABLE]));
1321
		GTK_WIDGET_VISIBLE (priv->table_sections [RCNT_DOCS_TABLE])
1316
	g_object_set (priv->page_selectors [DOCS_PAGE], "visible", visible, NULL);
1322
	)
1323
		gtk_widget_show (priv->page_selectors [DOCS_PAGE]);
1324
	else
1325
		gtk_widget_hide (priv->page_selectors [DOCS_PAGE]);
1326
1317
1327
	if (GTK_WIDGET_VISIBLE (priv->table_sections [USER_DIRS_TABLE]))
1318
	visible = GTK_WIDGET_VISIBLE (priv->table_sections [USER_DIRS_TABLE]);
1328
		gtk_widget_show (priv->page_selectors [DIRS_PAGE]);
1319
	g_object_set (priv->page_selectors [DIRS_PAGE], "visible", visible, NULL);
1329
	else
1330
		gtk_widget_hide (priv->page_selectors [DIRS_PAGE]);
1331
}
1320
}
1332
1321
1333
static gchar **
1322
static gchar **
1334
- 

Return to bug 230478