[nautilus/wip/gbsneto/actionbar-final: 24/24] actionbar: remove the folder name when no selection
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/gbsneto/actionbar-final: 24/24] actionbar: remove the folder name when no selection
- Date: Mon, 20 Jun 2016 15:34:41 +0000 (UTC)
commit fdcf16ae216cba0805f351d6d8cd226196f89916
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Jun 20 12:17:42 2016 -0300
actionbar: remove the folder name when no selection
After receiving some input from the design team, we
decided that this label was unecessary and distracting.
Thus, removing it would fix this issue.
src/nautilus-action-bar.c | 23 +----------------------
src/resources/ui/nautilus-action-bar.ui | 15 ---------------
2 files changed, 1 insertions(+), 37 deletions(-)
---
diff --git a/src/nautilus-action-bar.c b/src/nautilus-action-bar.c
index 8f70e41..3935f2c 100644
--- a/src/nautilus-action-bar.c
+++ b/src/nautilus-action-bar.c
@@ -49,7 +49,6 @@ struct _NautilusActionBar
GtkWidget *paste_button;
GtkWidget *select_all_button;
GtkWidget *no_selection_overflow_button;
- GtkWidget *no_selection_folder_label;
/* Folders buttons */
GtkWidget *open_file_box;
@@ -436,25 +435,6 @@ update_status (NautilusActionBar *actionbar)
}
static void
-location_changed_cb (NautilusActionBar *self)
-{
- NautilusFile *file;
- gchar *display_name;
-
- file = nautilus_file_get (nautilus_view_get_location (self->view));
-
- if (nautilus_file_is_home (file))
- display_name = g_strdup (_("Home"));
- else
- display_name = nautilus_file_get_display_name (file);
-
- gtk_label_set_label (GTK_LABEL (self->no_selection_folder_label), display_name);
-
- g_clear_pointer (&file, nautilus_file_unref);
- g_free (display_name);
-}
-
-static void
clear_selection_cb (NautilusActionBar *self)
{
nautilus_view_set_selection (self->view, NULL);
@@ -511,7 +491,6 @@ nautilus_action_bar_set_property (GObject *object,
case PROP_VIEW:
if (g_set_object (&self->view, g_value_get_object (value)))
{
- g_signal_connect_swapped (self->view, "notify::location", G_CALLBACK (location_changed_cb), self);
g_signal_connect_swapped (self->view, "notify::selection", G_CALLBACK (update_status), self);
g_signal_connect_swapped (self->view, "notify::is-loading", G_CALLBACK (update_status), self);
g_signal_connect_swapped (self->view, "notify::is-searching", G_CALLBACK (update_status), self);
@@ -554,6 +533,7 @@ nautilus_action_bar_size_allocate (GtkWidget *widget,
reference_button = overflow_button = NULL;
static_button_width = 0;
max_items = 5;
+ widgets = NULL;
switch (self->mode)
{
@@ -697,7 +677,6 @@ nautilus_action_bar_class_init (NautilusActionBarClass *klass)
gtk_widget_class_bind_template_child (widget_class, NautilusActionBar, move_folders_button);
gtk_widget_class_bind_template_child (widget_class, NautilusActionBar, move_trash_folders_button);
gtk_widget_class_bind_template_child (widget_class, NautilusActionBar, new_folder_0_button);
- gtk_widget_class_bind_template_child (widget_class, NautilusActionBar, no_selection_folder_label);
gtk_widget_class_bind_template_child (widget_class, NautilusActionBar, no_selection_overflow_button);
gtk_widget_class_bind_template_child (widget_class, NautilusActionBar, open_file_box);
gtk_widget_class_bind_template_child (widget_class, NautilusActionBar, open_folders_button);
diff --git a/src/resources/ui/nautilus-action-bar.ui b/src/resources/ui/nautilus-action-bar.ui
index 032d00f..7919773 100644
--- a/src/resources/ui/nautilus-action-bar.ui
+++ b/src/resources/ui/nautilus-action-bar.ui
@@ -88,21 +88,6 @@
<property name="position">6</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="no_selection_folder_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_end">12</property>
- <property name="margin_start">12</property>
- <property name="ellipsize">middle</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">7</property>
- </packing>
- </child>
</object>
<packing>
<property name="name">no-selection</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]