[nautilus] window: make sure to never show the floating bar on the Desktop
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] window: make sure to never show the floating bar on the Desktop
- Date: Mon, 21 Mar 2011 20:15:26 +0000 (UTC)
commit 9dc263518f71a2a06ec808be79c2bc0a9fe17129
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Mar 21 16:14:54 2011 -0400
window: make sure to never show the floating bar on the Desktop
https://bugzilla.gnome.org/show_bug.cgi?id=644172
src/nautilus-desktop-icon-view.c | 1 -
src/nautilus-window-manage-views.c | 11 +++++++++++
src/nautilus-window-slot.c | 7 ++++++-
src/nautilus-window.c | 11 +++++++++--
4 files changed, 26 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-desktop-icon-view.c b/src/nautilus-desktop-icon-view.c
index 60b656d..778fed2 100644
--- a/src/nautilus-desktop-icon-view.c
+++ b/src/nautilus-desktop-icon-view.c
@@ -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,
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index 519bac6..87862e6 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -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..."));
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 4dcd4a4..46a12ea 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -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;
}
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 8413de6..dc92a1d 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -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] =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]