[file-roller: 2/26] file selector: load and order the file list
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller: 2/26] file selector: load and order the file list
- Date: Thu, 9 Aug 2012 20:18:11 +0000 (UTC)
commit bea85d49e37b8051b3881806f196bd1d772ff743
Author: Paolo Bacchilega <paobac src gnome org>
Date: Tue Aug 7 20:02:15 2012 +0200
file selector: load and order the file list
src/fr-file-selector-dialog.c | 270 ++++++++++++++++++++++++++++++++++++++++-
src/fr-window.c | 2 +-
src/gio-utils.c | 46 ++++----
src/gio-utils.h | 21 +---
src/ui/file-selector.ui | 115 ++++++++++++++---
5 files changed, 390 insertions(+), 64 deletions(-)
---
diff --git a/src/fr-file-selector-dialog.c b/src/fr-file-selector-dialog.c
index c478497..d430b22 100644
--- a/src/fr-file-selector-dialog.c
+++ b/src/fr-file-selector-dialog.c
@@ -22,20 +22,90 @@
#include <config.h>
#include "fr-file-selector-dialog.h"
#include "gtk-utils.h"
+#include "gio-utils.h"
#include "glib-utils.h"
#define GET_WIDGET(x) (_gtk_builder_get_widget (self->priv->builder, (x)))
+G_DEFINE_TYPE (FrFileSelectorDialog, fr_file_selector_dialog, GTK_TYPE_DIALOG)
+
+
+enum {
+ FILE_LIST_COLUMN_ICON,
+ FILE_LIST_COLUMN_NAME,
+ FILE_LIST_COLUMN_SIZE,
+ FILE_LIST_COLUMN_MODIFIED,
+ FILE_LIST_COLUMN_FILE,
+ FILE_LIST_COLUMN_NAME_ORDER,
+ FILE_LIST_COLUMN_SIZE_ORDER,
+ FILE_LIST_COLUMN_MODIFIED_ORDER,
+ FILE_LIST_COLUMN_IS_FOLDER,
+ FILE_LIST_COLUMN_IS_SELECTED
+};
+
+
+enum {
+ PLACE_LIST_COLUMN_ICON,
+ PLACE_LIST_COLUMN_NAME,
+ PLACE_LIST_COLUMN_FILE,
+ PLACE_LIST_COLUMN_IS_SEPARATOR
+};
+
+
+typedef struct {
+ FrFileSelectorDialog *dialog;
+ GFile *folder;
+ GCancellable *cancellable;
+ GList *files;
+} LoadData;
+
+
struct _FrFileSelectorDialogPrivate {
GtkBuilder *builder;
GtkWidget *extra_widget;
GFile *current_folder;
+ LoadData *current_operation;
};
-G_DEFINE_TYPE (FrFileSelectorDialog, fr_file_selector_dialog, GTK_TYPE_DIALOG)
+/* -- load_data -- */
+
+
+static LoadData *
+load_data_new (FrFileSelectorDialog *dialog,
+ GFile *folder)
+{
+ LoadData *load_data;
+
+ load_data = g_new (LoadData, 1);
+ load_data->dialog = g_object_ref (dialog);
+ load_data->folder = g_object_ref (folder);
+ load_data->cancellable = g_cancellable_new ();
+ file_info_list_free (load_data->files);
+
+ return load_data;
+}
+
+
+static void
+load_data_free (LoadData *load_data)
+{
+ if (load_data == NULL)
+ return;
+
+ if (load_data->dialog->priv->current_operation == load_data)
+ load_data->dialog->priv->current_operation = NULL;
+
+ g_object_unref (load_data->dialog);
+ g_object_unref (load_data->folder);
+ g_object_unref (load_data->cancellable);
+ g_free (load_data);
+}
+
+
+/* -- fr_file_selector_dialog -- */
static void
@@ -63,6 +133,71 @@ fr_file_selector_dialog_class_init (FrFileSelectorDialogClass *klass)
}
+static gint
+compare_name_func (GtkTreeModel *model,
+ GtkTreeIter *a,
+ GtkTreeIter *b,
+ gpointer user_data)
+{
+ char *key_a;
+ char *key_b;
+ gboolean is_folder_a;
+ gboolean is_folder_b;
+ gint result;
+
+ gtk_tree_model_get (model, a,
+ FILE_LIST_COLUMN_NAME_ORDER, &key_a,
+ FILE_LIST_COLUMN_IS_FOLDER, &is_folder_a,
+ -1);
+ gtk_tree_model_get (model, b,
+ FILE_LIST_COLUMN_NAME_ORDER, &key_b,
+ FILE_LIST_COLUMN_IS_FOLDER, &is_folder_b,
+ -1);
+
+ if (is_folder_a == is_folder_b)
+ result = strcmp (key_a, key_b);
+ else if (is_folder_a)
+ return -1;
+ else
+ return 1;
+
+ g_free (key_a);
+ g_free (key_b);
+
+ return result;
+}
+
+
+static void
+is_selected_cellrenderertoggle_toggled_cb (GtkCellRendererToggle *cell_renderer,
+ gchar *path,
+ gpointer user_data)
+{
+ FrFileSelectorDialog *self = user_data;
+ GtkListStore *list_store;
+ GtkTreePath *tree_path;
+ GtkTreeIter iter;
+ gboolean is_selected;
+
+
+ list_store = GTK_LIST_STORE (GET_WIDGET ("files_liststore"));
+ tree_path = gtk_tree_path_new_from_string (path);
+ if (! gtk_tree_model_get_iter (GTK_TREE_MODEL (list_store), &iter, tree_path)) {
+ gtk_tree_path_free (tree_path);
+ return;
+ }
+
+ gtk_tree_model_get (GTK_TREE_MODEL (list_store), &iter,
+ FILE_LIST_COLUMN_IS_SELECTED, &is_selected,
+ -1);
+ gtk_list_store_set (list_store, &iter,
+ FILE_LIST_COLUMN_IS_SELECTED, ! is_selected,
+ -1);
+
+ gtk_tree_path_free (tree_path);
+}
+
+
static void
fr_file_selector_dialog_init (FrFileSelectorDialog *self)
{
@@ -73,6 +208,14 @@ fr_file_selector_dialog_init (FrFileSelectorDialog *self)
gtk_container_set_border_width (GTK_CONTAINER (self), 5);
gtk_window_set_default_size (GTK_WINDOW (self), 830, 510); /* FIXME: find a good size */
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (self))), GET_WIDGET ("content"));
+
+ gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (GET_WIDGET ("files_liststore")), FILE_LIST_COLUMN_NAME_ORDER, compare_name_func, self, NULL);
+ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (GET_WIDGET ("files_liststore")), FILE_LIST_COLUMN_NAME_ORDER, GTK_SORT_ASCENDING);
+
+ g_signal_connect (GET_WIDGET ("is_selected_cellrenderertoggle"),
+ "toggled",
+ G_CALLBACK (is_selected_cellrenderertoggle_toggled_cb),
+ self);
}
@@ -105,23 +248,140 @@ fr_file_selector_dialog_get_extra_widget (FrFileSelectorDialog *self)
}
+static void
+get_folder_content_done_cb (GError *error,
+ gpointer user_data)
+{
+ LoadData *load_data = user_data;
+ FrFileSelectorDialog *self = load_data->dialog;
+ int file_list_icon_size;
+ GtkListStore *list_store;
+ GList *scan;
+ GtkTreeIter iter;
+
+ if (error != NULL) {
+ g_warning ("%s", error->message);
+ load_data_free (load_data);
+ return;
+ }
+
+ file_list_icon_size = _gtk_widget_lookup_for_size (GTK_WIDGET (self), GTK_ICON_SIZE_MENU);
+ load_data->files = g_list_reverse (load_data->files);
+
+ list_store = GTK_LIST_STORE (GET_WIDGET ("files_liststore"));
+ gtk_list_store_clear (list_store);
+ for (scan = load_data->files; scan; scan = scan->next) {
+ FileInfo *file_info = scan->data;
+ GdkPixbuf *icon_pixbuf;
+ char *size;
+ GTimeVal timeval;
+ GDateTime *datetime;
+ char *modified;
+ char *collate_key;
+
+ gtk_list_store_append (list_store, &iter);
+
+ icon_pixbuf = _g_icon_get_pixbuf (g_file_info_get_icon (file_info->info), file_list_icon_size, gtk_icon_theme_get_default ());
+ size = g_format_size (g_file_info_get_size (file_info->info));
+ g_file_info_get_modification_time (file_info->info, &timeval);
+ datetime = g_date_time_new_from_timeval_local (&timeval);
+ modified = g_date_time_format (datetime, "%x %X");
+ collate_key = g_utf8_collate_key_for_filename (g_file_info_get_display_name (file_info->info), -1);
+
+ gtk_list_store_set (list_store, &iter,
+ FILE_LIST_COLUMN_ICON, icon_pixbuf,
+ FILE_LIST_COLUMN_NAME, g_file_info_get_display_name (file_info->info),
+ FILE_LIST_COLUMN_SIZE, size,
+ FILE_LIST_COLUMN_MODIFIED, modified,
+ FILE_LIST_COLUMN_FILE, file_info->file,
+ FILE_LIST_COLUMN_NAME_ORDER, collate_key,
+ FILE_LIST_COLUMN_SIZE_ORDER, g_file_info_get_size (file_info->info),
+ FILE_LIST_COLUMN_MODIFIED_ORDER, timeval.tv_sec,
+ FILE_LIST_COLUMN_IS_FOLDER, (g_file_info_get_file_type (file_info->info) == G_FILE_TYPE_DIRECTORY),
+ -1);
+
+ g_free (collate_key);
+ g_free (modified);
+ g_date_time_unref (datetime);
+ g_free (size);
+ g_object_unref (icon_pixbuf);
+ }
+
+ load_data_free (load_data);
+}
+
+
+static void
+get_folder_content_for_each_child_cb (GFile *file,
+ GFileInfo *info,
+ gpointer user_data)
+{
+ LoadData *load_data = user_data;
+ FileInfo *file_info;
+
+ file_info = file_info_new (file, info);
+ load_data->files = g_list_prepend (load_data->files, file_info);
+}
+
+
+static void
+get_folder_content (LoadData *load_data)
+{
+ FrFileSelectorDialog *self = load_data->dialog;
+ char *folder_name;
+
+ folder_name = g_file_get_parse_name (load_data->folder);
+ gtk_entry_set_text (GTK_ENTRY (GET_WIDGET ("location_entry")), folder_name);
+
+ load_data->files = NULL;
+ g_directory_foreach_child (load_data->folder,
+ FALSE,
+ TRUE,
+ (G_FILE_ATTRIBUTE_STANDARD_TYPE ","
+ G_FILE_ATTRIBUTE_STANDARD_NAME ","
+ G_FILE_ATTRIBUTE_STANDARD_SIZE ","
+ G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME ","
+ G_FILE_ATTRIBUTE_STANDARD_ICON ","
+ G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN ","
+ G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER ","
+ G_FILE_ATTRIBUTE_TIME_MODIFIED ","
+ G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC),
+ load_data->cancellable,
+ NULL,
+ get_folder_content_for_each_child_cb,
+ get_folder_content_done_cb,
+ load_data);
+
+ g_free (folder_name);
+}
+
+
void
-fr_file_selector_dialog_set_current_folder (FrFileSelectorDialog *dialog,
+fr_file_selector_dialog_set_current_folder (FrFileSelectorDialog *self,
GFile *folder)
{
+ g_return_if_fail (folder != NULL);
+
+ _g_clear_object (&self->priv->current_folder);
+ self->priv->current_folder = g_object_ref (folder);
+
+ if (self->priv->current_operation != NULL)
+ g_cancellable_cancel (self->priv->current_operation->cancellable);
+ self->priv->current_operation = load_data_new (self, folder);
+ get_folder_content (self->priv->current_operation);
}
GFile *
-fr_file_selector_dialog_get_current_folder (FrFileSelectorDialog *dialog)
+fr_file_selector_dialog_get_current_folder (FrFileSelectorDialog *self)
{
return NULL;
}
void
-fr_file_selector_dialog_set_selected_files (FrFileSelectorDialog *dialog,
+fr_file_selector_dialog_set_selected_files (FrFileSelectorDialog *self,
GList *files)
{
@@ -129,7 +389,7 @@ fr_file_selector_dialog_set_selected_files (FrFileSelectorDialog *dialog,
GList *
-fr_file_selector_dialog_get_selected_files (FrFileSelectorDialog *dialog)
+fr_file_selector_dialog_get_selected_files (FrFileSelectorDialog *self)
{
return NULL;
}
diff --git a/src/fr-window.c b/src/fr-window.c
index 4b3836b..ae1d654 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -4879,7 +4879,7 @@ add_file_list_columns (FrWindow *window,
{
static char *titles[] = {NC_("File", "Size"),
NC_("File", "Type"),
- NC_("File", "Date Modified"),
+ NC_("File", "Modified"),
NC_("File", "Location")};
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
diff --git a/src/gio-utils.c b/src/gio-utils.c
index ccdd84e..8986e97 100644
--- a/src/gio-utils.c
+++ b/src/gio-utils.c
@@ -32,9 +32,9 @@
/* FileInfo */
-static FileInfo*
-_g_info_data_new (GFile *file,
- GFileInfo *info)
+FileInfo *
+file_info_new (GFile *file,
+ GFileInfo *info)
{
FileInfo *data;
@@ -46,21 +46,21 @@ _g_info_data_new (GFile *file,
}
-static void
-_g_info_data_free (FileInfo *info_data)
+void
+file_info_free (FileInfo *file_info)
{
- if (info_data == NULL)
+ if (file_info == NULL)
return;
- _g_object_unref (info_data->file);
- _g_object_unref (info_data->info);
- g_free (info_data);
+ _g_object_unref (file_info->file);
+ _g_object_unref (file_info->info);
+ g_free (file_info);
}
-static void
-_g_info_data_list_unref (GList *list)
+void
+file_info_list_free (GList *list)
{
- g_list_foreach (list, (GFunc) _g_info_data_free, NULL);
+ g_list_foreach (list, (GFunc) file_info_free, NULL);
g_list_free (list);
}
@@ -143,7 +143,7 @@ static void
_g_info_data_freev (FileInfo **data)
{
if (*data != NULL)
- _g_info_data_free (*data);
+ file_info_free (*data);
*data = NULL;
}
@@ -184,7 +184,7 @@ for_each_child_data_free (ForEachChildData *fec)
_g_info_data_freev (&(fec->current));
g_free (fec->attributes);
if (fec->to_visit != NULL) {
- g_list_foreach (fec->to_visit, (GFunc) _g_info_data_free, NULL);
+ g_list_foreach (fec->to_visit, (GFunc) file_info_free, NULL);
g_list_free (fec->to_visit);
}
_g_object_unref (fec->cancellable);
@@ -330,7 +330,7 @@ for_each_child_compute_child (ForEachChildData *fec,
if (g_hash_table_lookup (fec->already_visited, id) == NULL) {
g_hash_table_insert (fec->already_visited, g_strdup (id), GINT_TO_POINTER (1));
- fec->to_visit = g_list_append (fec->to_visit, _g_info_data_new (file, info));
+ fec->to_visit = g_list_append (fec->to_visit, file_info_new (file, info));
}
g_free (id);
@@ -479,7 +479,7 @@ directory_info_ready_cb (GObject *source_object,
return;
}
- child = _g_info_data_new (fec->base_directory, info);
+ child = file_info_new (fec->base_directory, info);
g_object_unref (info);
for_each_child_set_current (fec, child);
@@ -576,7 +576,7 @@ static void
query_data_free (QueryData *query_data)
{
_g_object_list_unref (query_data->file_list);
- _g_info_data_list_unref (query_data->files);
+ file_info_list_free (query_data->files);
_g_object_unref (query_data->cancellable);
g_free (query_data->attributes);
g_free (query_data);
@@ -626,7 +626,7 @@ query_data__for_each_file_cb (GFile *file,
if ((query_data->file_filter_func != NULL) && query_data->file_filter_func (file, info, query_data->user_data))
return;
- query_data->files = g_list_prepend (query_data->files, _g_info_data_new (file, info));
+ query_data->files = g_list_prepend (query_data->files, file_info_new (file, info));
}
@@ -645,7 +645,7 @@ query_data__start_dir_cb (GFile *file,
if ((query_data->directory_filter_func != NULL) && query_data->directory_filter_func (file, info, query_data->user_data))
return DIR_OP_SKIP;
- query_data->files = g_list_prepend (query_data->files, _g_info_data_new (file, info));
+ query_data->files = g_list_prepend (query_data->files, file_info_new (file, info));
return DIR_OP_CONTINUE;
}
@@ -679,7 +679,7 @@ query_data_info_ready_cb (GObject *source_object,
query_data);
}
else {
- query_data->files = g_list_prepend (query_data->files, _g_info_data_new ((GFile *) query_data->current->data, info));
+ query_data->files = g_list_prepend (query_data->files, file_info_new ((GFile *) query_data->current->data, info));
query_info__query_next (query_data);
}
@@ -1059,7 +1059,7 @@ directory_copy_data_free (DirectoryCopyData *dcd)
g_object_unref (dcd->current_destination);
dcd->current_destination = NULL;
}
- g_list_foreach (dcd->to_copy, (GFunc) _g_info_data_free, NULL);
+ g_list_foreach (dcd->to_copy, (GFunc) file_info_free, NULL);
g_list_free (dcd->to_copy);
g_free (dcd);
}
@@ -1280,7 +1280,7 @@ g_directory_copy_for_each_file (GFile *file,
{
DirectoryCopyData *dcd = user_data;
- dcd->to_copy = g_list_prepend (dcd->to_copy, _g_info_data_new (file, info));
+ dcd->to_copy = g_list_prepend (dcd->to_copy, file_info_new (file, info));
dcd->tot_files++;
}
@@ -1293,7 +1293,7 @@ g_directory_copy_start_dir (GFile *file,
{
DirectoryCopyData *dcd = user_data;
- dcd->to_copy = g_list_prepend (dcd->to_copy, _g_info_data_new (file, info));
+ dcd->to_copy = g_list_prepend (dcd->to_copy, file_info_new (file, info));
dcd->tot_files++;
return DIR_OP_CONTINUE;
diff --git a/src/gio-utils.h b/src/gio-utils.h
index df366a4..ee363af 100644
--- a/src/gio-utils.h
+++ b/src/gio-utils.h
@@ -49,6 +49,12 @@ typedef struct {
GFileInfo *info;
} FileInfo;
+
+FileInfo * file_info_new (GFile *file,
+ GFileInfo *info);
+void file_info_free (FileInfo *file_info);
+void file_info_list_free (GList *list);
+
/* FileFilter */
typedef struct _FileFilter FileFilter;
@@ -162,19 +168,4 @@ gboolean g_load_file_in_buffer (GFile *file,
gsize size,
GError **error);
-/* convenience macros */
-
-/**
- * g_directory_list_all_async:
- * @directory:
- * @base_dir:
- * @recursive:
- * @cancellable:
- * @done_func:
- * @done_data:
- *
- */
-#define g_directory_list_all_async(directory, base_dir, recursive, cancellable, done_func, done_data) \
- g_directory_list_async ((directory), (base_dir), (recursive), TRUE, FALSE, FALSE, NULL, NULL, NULL, FALSE, (cancellable), (done_func), (done_data))
-
#endif /* _GIO_UTILS_H */
diff --git a/src/ui/file-selector.ui b/src/ui/file-selector.ui
index 764a522..b950151 100644
--- a/src/ui/file-selector.ui
+++ b/src/ui/file-selector.ui
@@ -3,22 +3,26 @@
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkListStore" id="files_liststore">
<columns>
- <!-- column-name icon_name -->
- <column type="gchararray"/>
+ <!-- column-name icon -->
+ <column type="GdkPixbuf"/>
<!-- column-name name -->
<column type="gchararray"/>
<!-- column-name size -->
<column type="gchararray"/>
<!-- column-name modified -->
<column type="gchararray"/>
- </columns>
- </object>
- <object class="GtkListStore" id="places_liststore">
- <columns>
- <!-- column-name icon_name -->
- <column type="gchararray"/>
- <!-- column-name name -->
+ <!-- column-name file -->
+ <column type="GObject"/>
+ <!-- column-name name_order -->
<column type="gchararray"/>
+ <!-- column-name size_order -->
+ <column type="gint64"/>
+ <!-- column-name modified_order -->
+ <column type="gint64"/>
+ <!-- column-name is_folder -->
+ <column type="gboolean"/>
+ <!-- column-name is_selected -->
+ <column type="gboolean"/>
</columns>
</object>
<object class="GtkBox" id="content">
@@ -39,6 +43,52 @@
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkButton" id="go_up_button">
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Go up one level</property>
+ <property name="use_action_appearance">False</property>
+ <property name="relief">none</property>
+ <child>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-go-up</property>
+ </object>
+ </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">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSeparator" id="separator1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -49,7 +99,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -62,7 +112,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
@@ -93,10 +143,11 @@
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
<property name="title" translatable="yes">Places</property>
+ <property name="sort_column_id">1</property>
<child>
<object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1"/>
<attributes>
- <attribute name="icon-name">0</attribute>
+ <attribute name="pixbuf">0</attribute>
</attributes>
</child>
<child>
@@ -133,18 +184,28 @@
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
<property name="resizable">True</property>
- <property name="title" translatable="yes">Name</property>
+ <property name="sizing">fixed</property>
+ <property name="fixed_width">200</property>
+ <property name="title" translatable="yes" context="File">Name</property>
<property name="expand">True</property>
<property name="reorderable">True</property>
- <property name="sort_indicator">True</property>
+ <property name="sort_column_id">5</property>
+ <child>
+ <object class="GtkCellRendererToggle" id="is_selected_cellrenderertoggle"/>
+ <attributes>
+ <attribute name="active">9</attribute>
+ </attributes>
+ </child>
<child>
<object class="GtkCellRendererPixbuf" id="cellrendererpixbuf2"/>
<attributes>
- <attribute name="icon-name">0</attribute>
+ <attribute name="pixbuf">0</attribute>
</attributes>
</child>
<child>
- <object class="GtkCellRendererText" id="cellrenderertext4"/>
+ <object class="GtkCellRendererText" id="cellrenderertext4">
+ <property name="ellipsize">end</property>
+ </object>
<attributes>
<attribute name="text">1</attribute>
</attributes>
@@ -155,9 +216,10 @@
<object class="GtkTreeViewColumn" id="treeviewcolumn3">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
- <property name="fixed_width">80</property>
- <property name="title" translatable="yes">Size</property>
+ <property name="fixed_width">100</property>
+ <property name="title" translatable="yes" context="File">Size</property>
<property name="reorderable">True</property>
+ <property name="sort_column_id">6</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext2"/>
<attributes>
@@ -170,9 +232,10 @@
<object class="GtkTreeViewColumn" id="treeviewcolumn4">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
- <property name="fixed_width">100</property>
- <property name="title" translatable="yes">Modified</property>
+ <property name="fixed_width">150</property>
+ <property name="title" translatable="yes" context="File">Modified</property>
<property name="reorderable">True</property>
+ <property name="sort_column_id">7</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext3"/>
<attributes>
@@ -219,4 +282,16 @@
</packing>
</child>
</object>
+ <object class="GtkListStore" id="places_liststore">
+ <columns>
+ <!-- column-name icon -->
+ <column type="GdkPixbuf"/>
+ <!-- column-name name -->
+ <column type="gchararray"/>
+ <!-- column-name file -->
+ <column type="GObject"/>
+ <!-- column-name is_separator -->
+ <column type="gboolean"/>
+ </columns>
+ </object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]