Compare commits
15 Commits
compile-ui
...
pathbar
Author | SHA1 | Date | |
---|---|---|---|
|
5cf75fc899 | ||
|
2c59c98b39 | ||
|
9f8013ef95 | ||
|
ddf41dc993 | ||
|
f5801794dd | ||
|
dfb71eadd5 | ||
|
1711baad58 | ||
|
b8c3395baa | ||
|
82612ba291 | ||
|
28a1759230 | ||
|
5a386accc0 | ||
|
2fca8c83b4 | ||
|
a7c410c0c2 | ||
|
3596f5b6c8 | ||
|
b06fa99e99 |
@@ -295,6 +295,7 @@ gtk_public_h_sources = \
|
|||||||
gtkpagesetup.h \
|
gtkpagesetup.h \
|
||||||
gtkpaned.h \
|
gtkpaned.h \
|
||||||
gtkpapersize.h \
|
gtkpapersize.h \
|
||||||
|
gtkpathbar.h \
|
||||||
gtkplacessidebar.h \
|
gtkplacessidebar.h \
|
||||||
gtkplug.h \
|
gtkplug.h \
|
||||||
gtkprintcontext.h \
|
gtkprintcontext.h \
|
||||||
@@ -514,7 +515,6 @@ gtk_private_h_sources = \
|
|||||||
gtknumerableiconprivate.h \
|
gtknumerableiconprivate.h \
|
||||||
gtkorientableprivate.h \
|
gtkorientableprivate.h \
|
||||||
gtkpango.h \
|
gtkpango.h \
|
||||||
gtkpathbar.h \
|
|
||||||
gtkpressandholdprivate.h \
|
gtkpressandholdprivate.h \
|
||||||
gtkprintoperation-private.h \
|
gtkprintoperation-private.h \
|
||||||
gtkprintutils.h \
|
gtkprintutils.h \
|
||||||
|
@@ -145,6 +145,7 @@
|
|||||||
#include <gtk/gtkpagesetup.h>
|
#include <gtk/gtkpagesetup.h>
|
||||||
#include <gtk/gtkpapersize.h>
|
#include <gtk/gtkpapersize.h>
|
||||||
#include <gtk/gtkpaned.h>
|
#include <gtk/gtkpaned.h>
|
||||||
|
#include <gtk/gtkpathbar.h>
|
||||||
#include <gtk/gtkplacessidebar.h>
|
#include <gtk/gtkplacessidebar.h>
|
||||||
#include <gtk/gtkprintcontext.h>
|
#include <gtk/gtkprintcontext.h>
|
||||||
#include <gtk/gtkprintoperation.h>
|
#include <gtk/gtkprintoperation.h>
|
||||||
|
@@ -504,11 +504,11 @@ static void list_row_activated (GtkTreeView *tree_view,
|
|||||||
GtkTreeViewColumn *column,
|
GtkTreeViewColumn *column,
|
||||||
GtkFileChooserDefault *impl);
|
GtkFileChooserDefault *impl);
|
||||||
|
|
||||||
static void path_bar_clicked (GtkPathBar *path_bar,
|
static void path_bar_open_location_cb (GtkPathBar *path_bar,
|
||||||
GFile *file,
|
GFile *file,
|
||||||
GFile *child,
|
GFile *child,
|
||||||
gboolean child_is_hidden,
|
gboolean child_is_hidden,
|
||||||
GtkFileChooserDefault *impl);
|
GtkFileChooserDefault *impl);
|
||||||
|
|
||||||
static void update_cell_renderer_attributes (GtkFileChooserDefault *impl);
|
static void update_cell_renderer_attributes (GtkFileChooserDefault *impl);
|
||||||
|
|
||||||
@@ -2522,7 +2522,7 @@ put_recent_folder_in_pathbar (GtkFileChooserDefault *impl, GtkTreeIter *iter)
|
|||||||
gtk_tree_model_get (GTK_TREE_MODEL (priv->recent_model), iter,
|
gtk_tree_model_get (GTK_TREE_MODEL (priv->recent_model), iter,
|
||||||
MODEL_COL_FILE, &file,
|
MODEL_COL_FILE, &file,
|
||||||
-1);
|
-1);
|
||||||
_gtk_path_bar_set_file (GTK_PATH_BAR (priv->browse_path_bar), file, FALSE);
|
gtk_path_bar_set_location (GTK_PATH_BAR (priv->browse_path_bar), file, FALSE);
|
||||||
g_object_unref (file);
|
g_object_unref (file);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4615,7 +4615,7 @@ update_current_folder_get_info_cb (GCancellable *cancellable,
|
|||||||
if (! _gtk_file_info_consider_as_directory (info))
|
if (! _gtk_file_info_consider_as_directory (info))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
_gtk_path_bar_set_file (GTK_PATH_BAR (priv->browse_path_bar), data->file, data->keep_trail);
|
gtk_path_bar_set_location (GTK_PATH_BAR (priv->browse_path_bar), data->file, data->keep_trail);
|
||||||
|
|
||||||
if (priv->current_folder != data->file)
|
if (priv->current_folder != data->file)
|
||||||
{
|
{
|
||||||
@@ -7014,11 +7014,11 @@ list_row_activated (GtkTreeView *tree_view,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
path_bar_clicked (GtkPathBar *path_bar,
|
path_bar_open_location_cb (GtkPathBar *path_bar,
|
||||||
GFile *file,
|
GFile *file,
|
||||||
GFile *child_file,
|
GFile *child_file,
|
||||||
gboolean child_is_hidden,
|
gboolean child_is_hidden,
|
||||||
GtkFileChooserDefault *impl)
|
GtkFileChooserDefault *impl)
|
||||||
{
|
{
|
||||||
if (child_file)
|
if (child_file)
|
||||||
pending_select_files_add (impl, child_file);
|
pending_select_files_add (impl, child_file);
|
||||||
@@ -7507,7 +7507,7 @@ _gtk_file_chooser_default_class_init (GtkFileChooserDefaultClass *class)
|
|||||||
gtk_widget_class_bind_callback (widget_class, filter_combo_changed);
|
gtk_widget_class_bind_callback (widget_class, filter_combo_changed);
|
||||||
gtk_widget_class_bind_callback (widget_class, location_button_toggled_cb);
|
gtk_widget_class_bind_callback (widget_class, location_button_toggled_cb);
|
||||||
gtk_widget_class_bind_callback (widget_class, new_folder_button_clicked);
|
gtk_widget_class_bind_callback (widget_class, new_folder_button_clicked);
|
||||||
gtk_widget_class_bind_callback (widget_class, path_bar_clicked);
|
gtk_widget_class_bind_callback (widget_class, path_bar_open_location_cb);
|
||||||
gtk_widget_class_bind_callback (widget_class, places_sidebar_open_location_cb);
|
gtk_widget_class_bind_callback (widget_class, places_sidebar_open_location_cb);
|
||||||
gtk_widget_class_bind_callback (widget_class, places_sidebar_show_error_message_cb);
|
gtk_widget_class_bind_callback (widget_class, places_sidebar_show_error_message_cb);
|
||||||
}
|
}
|
||||||
|
@@ -79,7 +79,7 @@
|
|||||||
<object class="GtkPathBar" id="browse_path_bar">
|
<object class="GtkPathBar" id="browse_path_bar">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<signal name="path-clicked" handler="path_bar_clicked" after="yes" swapped="no"/>
|
<signal name="open-location" handler="path_bar_open_location_cb" after="yes" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">True</property>
|
<property name="expand">True</property>
|
||||||
|
1065
gtk/gtkpathbar.c
1065
gtk/gtkpathbar.c
File diff suppressed because it is too large
Load Diff
@@ -18,8 +18,13 @@
|
|||||||
#ifndef __GTK_PATH_BAR_H__
|
#ifndef __GTK_PATH_BAR_H__
|
||||||
#define __GTK_PATH_BAR_H__
|
#define __GTK_PATH_BAR_H__
|
||||||
|
|
||||||
#include "gtkcontainer.h"
|
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||||
#include "gtkfilesystem.h"
|
#error "Only <gtk/gtk.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gtk/gtkcontainer.h>
|
||||||
|
#include <gtk/gtkfilesystem.h>
|
||||||
|
#include <gtk/gtkplacessidebar.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@@ -46,18 +51,26 @@ struct _GtkPathBarClass
|
|||||||
{
|
{
|
||||||
GtkContainerClass parent_class;
|
GtkContainerClass parent_class;
|
||||||
|
|
||||||
void (* path_clicked) (GtkPathBar *path_bar,
|
void (* open_location) (GtkPathBar *path_bar,
|
||||||
GFile *file,
|
GFile *file,
|
||||||
GFile *child_file,
|
GFile *child_file,
|
||||||
gboolean child_is_hidden);
|
gboolean child_is_hidden);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gtk_path_bar_get_type (void) G_GNUC_CONST;
|
GType gtk_path_bar_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
GtkWidget *gtk_path_bar_new (void);
|
||||||
|
|
||||||
|
GtkPlacesOpenFlags gtk_path_bar_get_open_flags (GtkPathBar *path_bar);
|
||||||
|
void gtk_path_bar_set_open_flags (GtkPathBar *path_bar, GtkPlacesOpenFlags flags);
|
||||||
|
|
||||||
|
void gtk_path_bar_set_location (GtkPathBar *path_bar,
|
||||||
|
GFile *location,
|
||||||
|
gboolean keep_trail);
|
||||||
|
GFile *gtk_path_bar_get_location (GtkPathBar *path_bar);
|
||||||
|
|
||||||
void _gtk_path_bar_set_file_system (GtkPathBar *path_bar,
|
void _gtk_path_bar_set_file_system (GtkPathBar *path_bar,
|
||||||
GtkFileSystem *file_system);
|
GtkFileSystem *file_system);
|
||||||
void _gtk_path_bar_set_file (GtkPathBar *path_bar,
|
|
||||||
GFile *file,
|
|
||||||
gboolean keep_trail);
|
|
||||||
void _gtk_path_bar_up (GtkPathBar *path_bar);
|
void _gtk_path_bar_up (GtkPathBar *path_bar);
|
||||||
void _gtk_path_bar_down (GtkPathBar *path_bar);
|
void _gtk_path_bar_down (GtkPathBar *path_bar);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user