window: make sure to never show the floating bar on the Desktop

https://bugzilla.gnome.org/show_bug.cgi?id=644172
This commit is contained in:
Cosimo Cecchi 2011-03-21 16:14:54 -04:00
parent c250b57023
commit 9dc263518f
4 changed files with 26 additions and 4 deletions

View file

@ -809,7 +809,6 @@ nautilus_desktop_icon_view_create (NautilusWindowSlot *slot)
view = g_object_new (NAUTILUS_TYPE_DESKTOP_ICON_VIEW,
"window-slot", slot,
"show-floating-bar", FALSE,
"supports-zooming", FALSE,
"supports-auto-layout", FALSE,
"supports-scaling", TRUE,

View file

@ -1165,6 +1165,17 @@ nautilus_window_report_location_change (NautilusWindow *window)
static void
real_setup_loading_floating_bar (NautilusWindowSlot *slot)
{
gboolean disable_chrome;
g_object_get (slot->pane->window,
"disable-chrome", &disable_chrome,
NULL);
if (disable_chrome) {
gtk_widget_hide (slot->floating_bar);
return;
}
nautilus_floating_bar_set_label (NAUTILUS_FLOATING_BAR (slot->floating_bar),
NAUTILUS_IS_SEARCH_DIRECTORY (nautilus_view_get_model (slot->content_view)) ?
_("Searching...") : _("Loading..."));

View file

@ -495,6 +495,7 @@ real_slot_set_short_status (NautilusWindowSlot *slot,
{
gboolean show_statusbar;
gboolean disable_chrome;
nautilus_floating_bar_cleanup_actions (NAUTILUS_FLOATING_BAR (slot->floating_bar));
nautilus_floating_bar_set_show_spinner (NAUTILUS_FLOATING_BAR (slot->floating_bar),
@ -503,7 +504,11 @@ real_slot_set_short_status (NautilusWindowSlot *slot,
show_statusbar = g_settings_get_boolean (nautilus_window_state,
NAUTILUS_WINDOW_STATE_START_WITH_STATUS_BAR);
if (status == NULL || show_statusbar) {
g_object_get (slot->pane->window,
"disable-chrome", &disable_chrome,
NULL);
if (status == NULL || show_statusbar || disable_chrome) {
gtk_widget_hide (slot->floating_bar);
return;
}

View file

@ -686,9 +686,16 @@ nautilus_window_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
NautilusWindow *window;
window = NAUTILUS_WINDOW (object);
switch (arg_id) {
case PROP_APP:
g_value_set_object (value, NAUTILUS_WINDOW (object)->details->application);
g_value_set_object (value, window->details->application);
break;
case PROP_DISABLE_CHROME:
g_value_set_boolean (value, window->details->disable_chrome);
break;
}
}
@ -2067,7 +2074,7 @@ nautilus_window_class_init (NautilusWindowClass *class)
"Disable chrome",
"Disable window chrome, for the desktop",
FALSE,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
signals[GO_UP] =