file-chooser: move location entry into same place as pathbar
https://bugzilla.gnome.org/show_bug.cgi?id=722211
This commit is contained in:
committed by
Matthias Clasen
parent
1e925a85ca
commit
5c42068bb3
@ -34,6 +34,7 @@
|
|||||||
#include "gtkclipboard.h"
|
#include "gtkclipboard.h"
|
||||||
#include "gtkcomboboxtext.h"
|
#include "gtkcomboboxtext.h"
|
||||||
#include "gtkentry.h"
|
#include "gtkentry.h"
|
||||||
|
#include "gtkstack.h"
|
||||||
#include "gtkexpander.h"
|
#include "gtkexpander.h"
|
||||||
#include "gtkfilechooserprivate.h"
|
#include "gtkfilechooserprivate.h"
|
||||||
#include "gtkfilechooserdialog.h"
|
#include "gtkfilechooserdialog.h"
|
||||||
@ -205,6 +206,7 @@ struct _GtkFileChooserWidgetPrivate {
|
|||||||
GtkWidget *browse_widgets_box;
|
GtkWidget *browse_widgets_box;
|
||||||
GtkWidget *browse_widgets_hpaned;
|
GtkWidget *browse_widgets_hpaned;
|
||||||
GtkWidget *browse_header_box;
|
GtkWidget *browse_header_box;
|
||||||
|
GtkWidget *browse_header_stack;
|
||||||
GtkWidget *browse_files_box;
|
GtkWidget *browse_files_box;
|
||||||
GtkWidget *browse_files_tree_view;
|
GtkWidget *browse_files_tree_view;
|
||||||
GtkWidget *browse_files_popup_menu;
|
GtkWidget *browse_files_popup_menu;
|
||||||
@ -249,7 +251,6 @@ struct _GtkFileChooserWidgetPrivate {
|
|||||||
GtkWidget *extra_align;
|
GtkWidget *extra_align;
|
||||||
GtkWidget *extra_widget;
|
GtkWidget *extra_widget;
|
||||||
|
|
||||||
GtkWidget *location_button;
|
|
||||||
GtkWidget *location_entry_box;
|
GtkWidget *location_entry_box;
|
||||||
GtkWidget *location_label;
|
GtkWidget *location_label;
|
||||||
GtkWidget *location_entry;
|
GtkWidget *location_entry;
|
||||||
@ -484,6 +485,7 @@ static void recent_shortcut_handler (GtkFileChooserWidget *impl);
|
|||||||
static void update_appearance (GtkFileChooserWidget *impl);
|
static void update_appearance (GtkFileChooserWidget *impl);
|
||||||
|
|
||||||
static void operation_mode_set (GtkFileChooserWidget *impl, OperationMode mode);
|
static void operation_mode_set (GtkFileChooserWidget *impl, OperationMode mode);
|
||||||
|
static void location_mode_set (GtkFileChooserWidget *impl, LocationMode new_mode);
|
||||||
|
|
||||||
static void set_current_filter (GtkFileChooserWidget *impl,
|
static void set_current_filter (GtkFileChooserWidget *impl,
|
||||||
GtkFileFilter *filter);
|
GtkFileFilter *filter);
|
||||||
@ -516,8 +518,6 @@ static void update_cell_renderer_attributes (GtkFileChooserWidget *impl);
|
|||||||
static void load_remove_timer (GtkFileChooserWidget *impl, LoadState new_load_state);
|
static void load_remove_timer (GtkFileChooserWidget *impl, LoadState new_load_state);
|
||||||
static void browse_files_center_selected_row (GtkFileChooserWidget *impl);
|
static void browse_files_center_selected_row (GtkFileChooserWidget *impl);
|
||||||
|
|
||||||
static void location_button_toggled_cb (GtkToggleButton *toggle,
|
|
||||||
GtkFileChooserWidget *impl);
|
|
||||||
static void location_switch_to_path_bar (GtkFileChooserWidget *impl);
|
static void location_switch_to_path_bar (GtkFileChooserWidget *impl);
|
||||||
|
|
||||||
static void stop_loading_and_clear_list_model (GtkFileChooserWidget *impl,
|
static void stop_loading_and_clear_list_model (GtkFileChooserWidget *impl,
|
||||||
@ -1143,6 +1143,8 @@ places_sidebar_open_location_cb (GtkPlacesSidebar *sidebar, GFile *location, Gtk
|
|||||||
* in Nautilus, and do operation_mode_set (impl, OPERATION_MODE_SEARCH);
|
* in Nautilus, and do operation_mode_set (impl, OPERATION_MODE_SEARCH);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
location_mode_set (impl, LOCATION_MODE_PATH_BAR);
|
||||||
|
|
||||||
if (file_is_recent_uri (location))
|
if (file_is_recent_uri (location))
|
||||||
operation_mode_set (impl, OPERATION_MODE_RECENT);
|
operation_mode_set (impl, OPERATION_MODE_RECENT);
|
||||||
else
|
else
|
||||||
@ -2027,7 +2029,7 @@ location_switch_to_path_bar (GtkFileChooserWidget *impl)
|
|||||||
priv->location_entry = NULL;
|
priv->location_entry = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_widget_hide (priv->browse_header_box);
|
gtk_stack_set_visible_child_name (GTK_STACK (priv->browse_header_stack), "pathbar");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Turns on the location entry. Can be called even if we are already in that
|
/* Turns on the location entry. Can be called even if we are already in that
|
||||||
@ -2066,16 +2068,17 @@ location_switch_to_filename_entry (GtkFileChooserWidget *impl)
|
|||||||
/* Done */
|
/* Done */
|
||||||
|
|
||||||
gtk_widget_show (priv->location_entry);
|
gtk_widget_show (priv->location_entry);
|
||||||
|
|
||||||
|
gtk_stack_set_visible_child_name (GTK_STACK (priv->browse_header_stack), "location");
|
||||||
|
|
||||||
gtk_widget_grab_focus (priv->location_entry);
|
gtk_widget_grab_focus (priv->location_entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sets a new location mode. set_buttons determines whether the toggle button
|
/* Sets a new location mode.
|
||||||
* for the mode will also be changed.
|
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
location_mode_set (GtkFileChooserWidget *impl,
|
location_mode_set (GtkFileChooserWidget *impl,
|
||||||
LocationMode new_mode,
|
LocationMode new_mode)
|
||||||
gboolean set_button)
|
|
||||||
{
|
{
|
||||||
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
||||||
|
|
||||||
@ -2084,13 +2087,11 @@ location_mode_set (GtkFileChooserWidget *impl,
|
|||||||
{
|
{
|
||||||
GtkWindow *toplevel;
|
GtkWindow *toplevel;
|
||||||
GtkWidget *current_focus;
|
GtkWidget *current_focus;
|
||||||
gboolean button_active;
|
|
||||||
gboolean switch_to_file_list;
|
gboolean switch_to_file_list;
|
||||||
|
|
||||||
switch (new_mode)
|
switch (new_mode)
|
||||||
{
|
{
|
||||||
case LOCATION_MODE_PATH_BAR:
|
case LOCATION_MODE_PATH_BAR:
|
||||||
button_active = FALSE;
|
|
||||||
|
|
||||||
/* The location_entry will disappear when we switch to path bar mode. So,
|
/* The location_entry will disappear when we switch to path bar mode. So,
|
||||||
* we'll focus the file list in that case, to avoid having a window with
|
* we'll focus the file list in that case, to avoid having a window with
|
||||||
@ -2113,7 +2114,6 @@ location_mode_set (GtkFileChooserWidget *impl,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LOCATION_MODE_FILENAME_ENTRY:
|
case LOCATION_MODE_FILENAME_ENTRY:
|
||||||
button_active = TRUE;
|
|
||||||
location_switch_to_filename_entry (impl);
|
location_switch_to_filename_entry (impl);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -2121,22 +2121,19 @@ location_mode_set (GtkFileChooserWidget *impl,
|
|||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (set_button)
|
|
||||||
{
|
|
||||||
g_signal_handlers_block_by_func (priv->location_button,
|
|
||||||
G_CALLBACK (location_button_toggled_cb), impl);
|
|
||||||
|
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->location_button), button_active);
|
|
||||||
|
|
||||||
g_signal_handlers_unblock_by_func (priv->location_button,
|
|
||||||
G_CALLBACK (location_button_toggled_cb), impl);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->location_mode = new_mode;
|
priv->location_mode = new_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Callback used when the places sidebar needs us to enter a location */
|
||||||
|
static void
|
||||||
|
places_sidebar_show_enter_location_cb (GtkPlacesSidebar *sidebar,
|
||||||
|
GtkFileChooserWidget *impl)
|
||||||
|
{
|
||||||
|
location_mode_set (impl, LOCATION_MODE_FILENAME_ENTRY);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
location_toggle_popup_handler (GtkFileChooserWidget *impl)
|
location_toggle_popup_handler (GtkFileChooserWidget *impl)
|
||||||
{
|
{
|
||||||
@ -2155,13 +2152,13 @@ location_toggle_popup_handler (GtkFileChooserWidget *impl)
|
|||||||
*/
|
*/
|
||||||
if (priv->location_mode == LOCATION_MODE_PATH_BAR)
|
if (priv->location_mode == LOCATION_MODE_PATH_BAR)
|
||||||
{
|
{
|
||||||
location_mode_set (impl, LOCATION_MODE_FILENAME_ENTRY, TRUE);
|
location_mode_set (impl, LOCATION_MODE_FILENAME_ENTRY);
|
||||||
}
|
}
|
||||||
else if (priv->location_mode == LOCATION_MODE_FILENAME_ENTRY)
|
else if (priv->location_mode == LOCATION_MODE_FILENAME_ENTRY)
|
||||||
{
|
{
|
||||||
if (gtk_widget_has_focus (priv->location_entry))
|
if (gtk_widget_has_focus (priv->location_entry))
|
||||||
{
|
{
|
||||||
location_mode_set (impl, LOCATION_MODE_PATH_BAR, TRUE);
|
location_mode_set (impl, LOCATION_MODE_PATH_BAR);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2170,31 +2167,6 @@ location_toggle_popup_handler (GtkFileChooserWidget *impl)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Callback used when one of the location mode buttons is toggled */
|
|
||||||
static void
|
|
||||||
location_button_toggled_cb (GtkToggleButton *toggle,
|
|
||||||
GtkFileChooserWidget *impl)
|
|
||||||
{
|
|
||||||
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
|
||||||
gboolean is_active;
|
|
||||||
LocationMode new_mode;
|
|
||||||
|
|
||||||
is_active = gtk_toggle_button_get_active (toggle);
|
|
||||||
|
|
||||||
if (is_active)
|
|
||||||
{
|
|
||||||
g_assert (priv->location_mode == LOCATION_MODE_PATH_BAR);
|
|
||||||
new_mode = LOCATION_MODE_FILENAME_ENTRY;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
g_assert (priv->location_mode == LOCATION_MODE_FILENAME_ENTRY);
|
|
||||||
new_mode = LOCATION_MODE_PATH_BAR;
|
|
||||||
}
|
|
||||||
|
|
||||||
location_mode_set (impl, new_mode, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PATH_BAR_FOLDER_PATH,
|
PATH_BAR_FOLDER_PATH,
|
||||||
PATH_BAR_SELECT_A_FOLDER,
|
PATH_BAR_SELECT_A_FOLDER,
|
||||||
@ -2583,10 +2555,8 @@ operation_mode_set_browse (GtkFileChooserWidget *impl)
|
|||||||
if (priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
if (priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
||||||
priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
||||||
{
|
{
|
||||||
gtk_widget_show (priv->location_button);
|
location_mode_set (impl, priv->location_mode);
|
||||||
location_mode_set (impl, priv->location_mode, TRUE);
|
|
||||||
|
|
||||||
if (priv->location_mode == LOCATION_MODE_FILENAME_ENTRY)
|
|
||||||
gtk_widget_show (priv->browse_header_box);
|
gtk_widget_show (priv->browse_header_box);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2614,7 +2584,6 @@ operation_mode_set_recent (GtkFileChooserWidget *impl)
|
|||||||
if (priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
if (priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
||||||
priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
||||||
{
|
{
|
||||||
gtk_widget_hide (priv->location_button);
|
|
||||||
gtk_widget_hide (priv->browse_header_box);
|
gtk_widget_hide (priv->browse_header_box);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2669,7 +2638,6 @@ update_appearance (GtkFileChooserWidget *impl)
|
|||||||
{
|
{
|
||||||
const char *text;
|
const char *text;
|
||||||
|
|
||||||
gtk_widget_hide (priv->location_button);
|
|
||||||
save_widgets_create (impl);
|
save_widgets_create (impl);
|
||||||
|
|
||||||
if (priv->action == GTK_FILE_CHOOSER_ACTION_SAVE)
|
if (priv->action == GTK_FILE_CHOOSER_ACTION_SAVE)
|
||||||
@ -2689,9 +2657,8 @@ update_appearance (GtkFileChooserWidget *impl)
|
|||||||
else if (priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
else if (priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
||||||
priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
||||||
{
|
{
|
||||||
gtk_widget_show (priv->location_button);
|
|
||||||
save_widgets_destroy (impl);
|
save_widgets_destroy (impl);
|
||||||
location_mode_set (impl, priv->location_mode, TRUE);
|
location_mode_set (impl, priv->location_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->location_entry)
|
if (priv->location_entry)
|
||||||
@ -3190,7 +3157,6 @@ static void
|
|||||||
settings_load (GtkFileChooserWidget *impl)
|
settings_load (GtkFileChooserWidget *impl)
|
||||||
{
|
{
|
||||||
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
GtkFileChooserWidgetPrivate *priv = impl->priv;
|
||||||
LocationMode location_mode;
|
|
||||||
gboolean show_hidden;
|
gboolean show_hidden;
|
||||||
gboolean show_size_column;
|
gboolean show_size_column;
|
||||||
gboolean sort_directories_first;
|
gboolean sort_directories_first;
|
||||||
@ -3202,7 +3168,6 @@ settings_load (GtkFileChooserWidget *impl)
|
|||||||
|
|
||||||
settings = _gtk_file_chooser_get_settings_for_widget (GTK_WIDGET (impl));
|
settings = _gtk_file_chooser_get_settings_for_widget (GTK_WIDGET (impl));
|
||||||
|
|
||||||
location_mode = g_settings_get_enum (settings, SETTINGS_KEY_LOCATION_MODE);
|
|
||||||
show_hidden = g_settings_get_boolean (settings, SETTINGS_KEY_SHOW_HIDDEN);
|
show_hidden = g_settings_get_boolean (settings, SETTINGS_KEY_SHOW_HIDDEN);
|
||||||
show_size_column = g_settings_get_boolean (settings, SETTINGS_KEY_SHOW_SIZE_COLUMN);
|
show_size_column = g_settings_get_boolean (settings, SETTINGS_KEY_SHOW_SIZE_COLUMN);
|
||||||
sort_column = g_settings_get_enum (settings, SETTINGS_KEY_SORT_COLUMN);
|
sort_column = g_settings_get_enum (settings, SETTINGS_KEY_SORT_COLUMN);
|
||||||
@ -3211,8 +3176,6 @@ settings_load (GtkFileChooserWidget *impl)
|
|||||||
startup_mode = g_settings_get_enum (settings, SETTINGS_KEY_STARTUP_MODE);
|
startup_mode = g_settings_get_enum (settings, SETTINGS_KEY_STARTUP_MODE);
|
||||||
sort_directories_first = g_settings_get_boolean (settings, SETTINGS_KEY_SORT_DIRECTORIES_FIRST);
|
sort_directories_first = g_settings_get_boolean (settings, SETTINGS_KEY_SORT_DIRECTORIES_FIRST);
|
||||||
|
|
||||||
location_mode_set (impl, location_mode, TRUE);
|
|
||||||
|
|
||||||
gtk_file_chooser_set_show_hidden (GTK_FILE_CHOOSER (impl), show_hidden);
|
gtk_file_chooser_set_show_hidden (GTK_FILE_CHOOSER (impl), show_hidden);
|
||||||
|
|
||||||
priv->show_size_column = show_size_column;
|
priv->show_size_column = show_size_column;
|
||||||
@ -6441,7 +6404,6 @@ search_setup_widgets (GtkFileChooserWidget *impl)
|
|||||||
if (priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
if (priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
|
||||||
priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
||||||
{
|
{
|
||||||
gtk_widget_hide (priv->location_button);
|
|
||||||
gtk_widget_hide (priv->browse_header_box);
|
gtk_widget_hide (priv->browse_header_box);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7037,7 +6999,7 @@ location_popup_handler (GtkFileChooserWidget *impl,
|
|||||||
if (!path)
|
if (!path)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
location_mode_set (impl, LOCATION_MODE_FILENAME_ENTRY, TRUE);
|
location_mode_set (impl, LOCATION_MODE_FILENAME_ENTRY);
|
||||||
location_set_user_text (impl, path);
|
location_set_user_text (impl, path);
|
||||||
}
|
}
|
||||||
else if (priv->action == GTK_FILE_CHOOSER_ACTION_SAVE ||
|
else if (priv->action == GTK_FILE_CHOOSER_ACTION_SAVE ||
|
||||||
@ -7530,11 +7492,12 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
|
|||||||
/* A *lot* of widgets that we need to handle .... */
|
/* A *lot* of widgets that we need to handle .... */
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_widgets_box);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_widgets_box);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_widgets_hpaned);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_widgets_hpaned);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_header_box);
|
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_files_box);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_files_box);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_widgets_box);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_widgets_box);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, places_sidebar);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, places_sidebar);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_files_tree_view);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_files_tree_view);
|
||||||
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_header_box);
|
||||||
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_header_stack);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_new_folder_button);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_new_folder_button);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_path_bar_hbox);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_path_bar_hbox);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_path_bar_size_group);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_path_bar_size_group);
|
||||||
@ -7548,7 +7511,6 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
|
|||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, filter_combo);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, filter_combo);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, preview_box);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, preview_box);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, extra_align);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, extra_align);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, location_button);
|
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, location_entry_box);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, location_entry_box);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, location_label);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, location_label);
|
||||||
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, list_name_column);
|
gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, list_name_column);
|
||||||
@ -7570,11 +7532,11 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
|
|||||||
gtk_widget_class_bind_template_callback (widget_class, renderer_editing_canceled_cb);
|
gtk_widget_class_bind_template_callback (widget_class, renderer_editing_canceled_cb);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, renderer_edited_cb);
|
gtk_widget_class_bind_template_callback (widget_class, renderer_edited_cb);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, filter_combo_changed);
|
gtk_widget_class_bind_template_callback (widget_class, filter_combo_changed);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, location_button_toggled_cb);
|
|
||||||
gtk_widget_class_bind_template_callback (widget_class, new_folder_button_clicked);
|
gtk_widget_class_bind_template_callback (widget_class, new_folder_button_clicked);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, path_bar_clicked);
|
gtk_widget_class_bind_template_callback (widget_class, path_bar_clicked);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, places_sidebar_open_location_cb);
|
gtk_widget_class_bind_template_callback (widget_class, places_sidebar_open_location_cb);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, places_sidebar_show_error_message_cb);
|
gtk_widget_class_bind_template_callback (widget_class, places_sidebar_show_error_message_cb);
|
||||||
|
gtk_widget_class_bind_template_callback (widget_class, places_sidebar_show_enter_location_cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@ -17,48 +17,6 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="spacing">0</property>
|
<property name="spacing">0</property>
|
||||||
<child>
|
|
||||||
<object class="GtkBox" id="browse_header_box">
|
|
||||||
<property name="visible">False</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="orientation">vertical</property>
|
|
||||||
<property name="border_width">10</property>
|
|
||||||
<property name="spacing">12</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox" id="location_entry_box">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="spacing">12</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="location_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">_Location:</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkPaned" id="browse_widgets_hpaned">
|
<object class="GtkPaned" id="browse_widgets_hpaned">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -71,8 +29,10 @@
|
|||||||
<property name="hscrollbar_policy">never</property>
|
<property name="hscrollbar_policy">never</property>
|
||||||
<property name="shadow_type">none</property>
|
<property name="shadow_type">none</property>
|
||||||
<property name="local_only">True</property>
|
<property name="local_only">True</property>
|
||||||
|
<property name="show_enter_location">True</property>
|
||||||
<signal name="open-location" handler="places_sidebar_open_location_cb" swapped="no"/>
|
<signal name="open-location" handler="places_sidebar_open_location_cb" swapped="no"/>
|
||||||
<signal name="show-error-message" handler="places_sidebar_show_error_message_cb" swapped="no"/>
|
<signal name="show-error-message" handler="places_sidebar_show_error_message_cb" swapped="no"/>
|
||||||
|
<signal name="show-enter-location" handler="places_sidebar_show_enter_location_cb" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="resize">False</property>
|
<property name="resize">False</property>
|
||||||
@ -85,32 +45,24 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="orientation">vertical</property>
|
<property name="orientation">vertical</property>
|
||||||
<property name="spacing">0</property>
|
<property name="spacing">0</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="browse_header_box">
|
||||||
|
<property name="visible">False</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="border_width">6</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkStack" id="browse_header_stack">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="transition-type">crossfade</property>
|
||||||
|
<property name="transition-duration">200</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="browse_path_bar_hbox">
|
<object class="GtkBox" id="browse_path_bar_hbox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="spacing">12</property>
|
<property name="spacing">12</property>
|
||||||
<property name="border_width">6</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkToggleButton" id="location_button">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="tooltip_text" translatable="yes">Type a file name</property>
|
|
||||||
<property name="image">location_button_image</property>
|
|
||||||
<child internal-child="accessible">
|
|
||||||
<object class="AtkObject" id="location_button-atkobject">
|
|
||||||
<property name="AtkObject::accessible-name" translatable="yes">Type a file name</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<signal name="toggled" handler="location_button_toggled_cb" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkPathBar" id="browse_path_bar">
|
<object class="GtkPathBar" id="browse_path_bar">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -213,10 +165,49 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">pathbar</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox" id="location_entry_box">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="no-show-all">True</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="location_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">_Location:</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">False</property>
|
<property name="fill">False</property>
|
||||||
<property name="position">1</property>
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="name">location</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
<property name="position">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@ -396,7 +387,6 @@
|
|||||||
<object class="GtkSizeGroup" id="browse_path_bar_size_group">
|
<object class="GtkSizeGroup" id="browse_path_bar_size_group">
|
||||||
<property name="mode">vertical</property>
|
<property name="mode">vertical</property>
|
||||||
<widgets>
|
<widgets>
|
||||||
<widget name="location_button"/>
|
|
||||||
<widget name="browse_path_bar"/>
|
<widget name="browse_path_bar"/>
|
||||||
<widget name="browse_select_a_folder_info_bar"/>
|
<widget name="browse_select_a_folder_info_bar"/>
|
||||||
<widget name="browse_special_mode_icon"/>
|
<widget name="browse_special_mode_icon"/>
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
N_("_Location:");
|
|
||||||
N_("Type a file name");
|
|
||||||
N_("Type a file name");
|
|
||||||
N_("Create Fo_lder");
|
N_("Create Fo_lder");
|
||||||
|
N_("_Location:");
|
||||||
N_("Files");
|
N_("Files");
|
||||||
N_("Name");
|
N_("Name");
|
||||||
N_("Size");
|
N_("Size");
|
||||||
|
|||||||
Reference in New Issue
Block a user