[nautilus/wip/antoniof/new-pathbar: 6/6] pathbar: Activate menu button when clicking background
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/new-pathbar: 6/6] pathbar: Activate menu button when clicking background
- Date: Sat, 27 Nov 2021 01:31:27 +0000 (UTC)
commit f4f92cc5188bf061c7650a36ebe89f5d90ad6011
Author: António Fernandes <antoniof gnome org>
Date: Sat Nov 27 00:59:50 2021 +0000
pathbar: Activate menu button when clicking background
Including the current folder name.
This should improve discoverability and ease the transition for users
who were used to click on the current folder name.
src/nautilus-pathbar.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 007b80455..12fddf1ac 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -584,7 +584,7 @@ button_clicked_cb (GtkButton *button,
{
if (g_file_equal (button_data->path, self->current_path))
{
- gtk_popover_popup (self->current_view_menu_popover);
+ g_signal_emit_by_name (self->current_view_menu_button, "activate");
}
else
{
@@ -711,7 +711,7 @@ on_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
{
if (g_file_equal (button_data->path, self->current_path))
{
- gtk_popover_popup (self->current_view_menu_popover);
+ g_signal_emit_by_name (self->current_view_menu_button, "activate");
}
else
{
@@ -1103,7 +1103,7 @@ make_button_data (NautilusPathBar *self,
button_data->label = gtk_label_new (NULL);
child = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
button_data->container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
- gtk_box_pack_start (GTK_BOX (button_data->container), button_data->button, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (button_data->container), button_data->button, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (child), button_data->image, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (child), button_data->label, FALSE, FALSE, 0);
@@ -1122,7 +1122,7 @@ make_button_data (NautilusPathBar *self,
child = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
button_data->container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (button_data->container), separator_label, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (button_data->container), button_data->button, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (button_data->container), button_data->button, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (child), button_data->label, FALSE, FALSE, 0);
}
@@ -1133,6 +1133,8 @@ make_button_data (NautilusPathBar *self,
{
gtk_style_context_add_class (gtk_widget_get_style_context (button_data->button),
"current-dir");
+ gtk_widget_set_hexpand (button_data->button, TRUE);
+ gtk_widget_set_halign (button_data->label, GTK_ALIGN_START);
}
if (button_data->label != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]