From ceea7a034d7f920fc2edbbd22da63ae48f72dfb6 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Mon, 20 Mar 2006 18:40:38 +0000 Subject: Don't set the visibility of the "burn CD" action here. 2006-03-14 Federico Mena Quintero * src/nautilus-window-menus.c: (nautilus_window_initialize_menus): Don't set the visibility of the "burn CD" action here. (nautilus_window_initialize_menus_constructed): New public function. Only disable NAUTILUS_ACTION_GO_TO_BURN_CD if we are in a window which has a menubar. This prevents calling have_burn_uri() unnecessarily for the desktop window, as this is an expensive operation during login (up to 1 second!). The way have_burn_uri() works is by creating a "burn:///" URI and seeing if it is valid, but this makes gnome-vfs load libmapping.so from nautilus-cd-burner; this takes a long time during login. * src/nautilus-window-private.h: Added prototype for nautilus_window_initialize_menus_constructed(). * src/nautilus-window.h: New prototype for nautilus_window_has_menubar_and_statusbar(). * src/nautilus-window.c (nautilus_window_has_menubar_and_statusbar): New function; returns whether the window should have a menubar and statusbar. This depends on the window_type from the class structure. (nautilus_window_constructor): Call nautilus_window_initialize_menus_constructed(). We do it here so that its own call to nautilus_window_has_menubar_and_statusbar() will already have the right value for class->window_type. --- src/nautilus-window.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nautilus-window.h') diff --git a/src/nautilus-window.h b/src/nautilus-window.h index 1eb2f9086..1d2f0bd55 100644 --- a/src/nautilus-window.h +++ b/src/nautilus-window.h @@ -150,5 +150,6 @@ void nautilus_window_allow_burn_cd (NautilusWindow *window GtkUIManager * nautilus_window_get_ui_manager (NautilusWindow *window); void nautilus_window_add_extra_location_widget (NautilusWindow *window, GtkWidget *widget); +gboolean nautilus_window_has_menubar_and_statusbar (NautilusWindow *window); #endif -- cgit v1.2.1