mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-10-05 23:40:01 +00:00
Make Go to CD burner a command
2003-05-05 Alexander Larsson <alexl@redhat.com> * src/nautilus-shell-ui.xml: Make Go to CD burner a command * src/nautilus-window-menus.c (nautilus_window_initialize_menus_part_1): Hide Go to CD burner if burn: not availible. * docs/style-guide.html: Clarify the change. We still have to declare variables at the beginning of a block.
This commit is contained in:
parent
b503e4fe8f
commit
039cc3aaff
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2003-05-05 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* src/nautilus-shell-ui.xml:
|
||||
Make Go to CD burner a command
|
||||
|
||||
* src/nautilus-window-menus.c (nautilus_window_initialize_menus_part_1):
|
||||
Hide Go to CD burner if burn: not availible.
|
||||
|
||||
* docs/style-guide.html:
|
||||
Clarify the change. We still have to declare variables at the
|
||||
beginning of a block.
|
||||
|
||||
2003-05-05 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
* HACKING:
|
||||
|
|
|
@ -65,6 +65,10 @@ to be a problem.</p>
|
|||
is usually to use a while loop. It's true that
|
||||
"easy to read" is a subjective thing.</p>
|
||||
|
||||
<p><b>We declare local variables at the beginning of a block.</b> C99 allows you
|
||||
to declare variables anywhere in a function, but a lot of compilers still do not
|
||||
support C99.</p>
|
||||
|
||||
<p><b>We do not initialize local variables in their declarations.</b> C allows you
|
||||
to initialize a local variable when declaring it. But no other code can run before
|
||||
this, because the other statements in a function must be after all the declarations.
|
||||
|
|
|
@ -95,6 +95,7 @@
|
|||
#define COMMAND_SHOW_HIDE_TOOLBAR "/commands/Show Hide Toolbar"
|
||||
#define COMMAND_SHOW_HIDE_LOCATION_BAR "/commands/Show Hide Location Bar"
|
||||
#define COMMAND_SHOW_HIDE_STATUS_BAR "/commands/Show Hide Statusbar"
|
||||
#define COMMAND_GO_BURN_CD "/commands/Go to Burn CD"
|
||||
|
||||
#define ID_SHOW_HIDE_SIDEBAR "Show Hide Sidebar"
|
||||
#define ID_SHOW_HIDE_TOOLBAR "Show Hide Toolbar"
|
||||
|
@ -235,6 +236,24 @@ file_menu_burn_cd_callback (BonoboUIComponent *component,
|
|||
|
||||
}
|
||||
|
||||
static gboolean
|
||||
have_burn_uri (void)
|
||||
{
|
||||
static gboolean initialized = FALSE;
|
||||
static gboolean res;
|
||||
GnomeVFSURI *uri;
|
||||
|
||||
if (!initialized) {
|
||||
uri = gnome_vfs_uri_new ("burn:///");
|
||||
res = uri != NULL;
|
||||
if (uri != NULL) {
|
||||
gnome_vfs_uri_unref (uri);
|
||||
}
|
||||
initialized = TRUE;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
nautilus_window_show_location_bar_temporarily (NautilusWindow *window,
|
||||
gboolean in_search_mode)
|
||||
|
@ -1280,6 +1299,12 @@ nautilus_window_initialize_menus_part_1 (NautilusWindow *window)
|
|||
|
||||
bonobo_ui_component_thaw (window->details->shell_ui, NULL);
|
||||
|
||||
if (!have_burn_uri ()) {
|
||||
nautilus_bonobo_set_hidden (window->details->shell_ui,
|
||||
COMMAND_GO_BURN_CD,
|
||||
TRUE);
|
||||
}
|
||||
|
||||
#ifndef ENABLE_PROFILER
|
||||
nautilus_bonobo_set_hidden (window->details->shell_ui, NAUTILUS_MENU_PATH_PROFILER, TRUE);
|
||||
#endif
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
<cmd name="Burn CD"
|
||||
_label="_Write to CD"
|
||||
_tip="Write contents to a CD"/>
|
||||
<cmd name="Go to Burn CD"
|
||||
_label="_CD Creator"
|
||||
_tip="Go to Empty CD folder"/>
|
||||
<cmd name="Zoom In" _label="Zoom _In"
|
||||
_tip="Show the contents in more detail"/>
|
||||
<cmd name="Zoom Out" _label="Zoom _Out"
|
||||
|
@ -238,8 +241,6 @@
|
|||
_tip="Go to the trash folder"
|
||||
verb="Go to Trash"/>
|
||||
<menuitem name="Go to Burn CD"
|
||||
_label="_CD Creator"
|
||||
_tip="Go to Empty CD folder"
|
||||
verb="Go to Burn CD"/>
|
||||
<menuitem name="Go to Location"
|
||||
_label="_Location..."
|
||||
|
|
|
@ -95,6 +95,7 @@
|
|||
#define COMMAND_SHOW_HIDE_TOOLBAR "/commands/Show Hide Toolbar"
|
||||
#define COMMAND_SHOW_HIDE_LOCATION_BAR "/commands/Show Hide Location Bar"
|
||||
#define COMMAND_SHOW_HIDE_STATUS_BAR "/commands/Show Hide Statusbar"
|
||||
#define COMMAND_GO_BURN_CD "/commands/Go to Burn CD"
|
||||
|
||||
#define ID_SHOW_HIDE_SIDEBAR "Show Hide Sidebar"
|
||||
#define ID_SHOW_HIDE_TOOLBAR "Show Hide Toolbar"
|
||||
|
@ -235,6 +236,24 @@ file_menu_burn_cd_callback (BonoboUIComponent *component,
|
|||
|
||||
}
|
||||
|
||||
static gboolean
|
||||
have_burn_uri (void)
|
||||
{
|
||||
static gboolean initialized = FALSE;
|
||||
static gboolean res;
|
||||
GnomeVFSURI *uri;
|
||||
|
||||
if (!initialized) {
|
||||
uri = gnome_vfs_uri_new ("burn:///");
|
||||
res = uri != NULL;
|
||||
if (uri != NULL) {
|
||||
gnome_vfs_uri_unref (uri);
|
||||
}
|
||||
initialized = TRUE;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
nautilus_window_show_location_bar_temporarily (NautilusWindow *window,
|
||||
gboolean in_search_mode)
|
||||
|
@ -1280,6 +1299,12 @@ nautilus_window_initialize_menus_part_1 (NautilusWindow *window)
|
|||
|
||||
bonobo_ui_component_thaw (window->details->shell_ui, NULL);
|
||||
|
||||
if (!have_burn_uri ()) {
|
||||
nautilus_bonobo_set_hidden (window->details->shell_ui,
|
||||
COMMAND_GO_BURN_CD,
|
||||
TRUE);
|
||||
}
|
||||
|
||||
#ifndef ENABLE_PROFILER
|
||||
nautilus_bonobo_set_hidden (window->details->shell_ui, NAUTILUS_MENU_PATH_PROFILER, TRUE);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue