Author: benny
Date: 2006-07-10 19:19:16 +0000 (Mon, 10 Jul 2006)
New Revision: 22398
Modified:
thunar/trunk/ChangeLog
thunar/trunk/thunar-vfs/thunar-vfs-thumb-pixbuf.c
thunar/trunk/thunar/thunar-list-model.c
thunar/trunk/thunar/thunar-progress-dialog.c
Log:
2006-07-10 Benedikt Meurer <[EMAIL PROTECTED]>
* thunar-vfs/thunar-vfs-thumb-pixbuf.c: sys/types.h must be included
before sys/mman.h to compile properly on OpenBSD.
* thunar/thunar-progress-dialog.c(thunar_progress_dialog_percent): Do
not truncate the text in the progress bar. Bug #2003.
* thunar/thunar-list-model.c: Fix improper behaviour of ThunarListModel
with GtkEntryCompletion and GtkTreeView. Bug #1891.
Modified: thunar/trunk/ChangeLog
===================================================================
--- thunar/trunk/ChangeLog 2006-07-10 17:22:16 UTC (rev 22397)
+++ thunar/trunk/ChangeLog 2006-07-10 19:19:16 UTC (rev 22398)
@@ -1,3 +1,12 @@
+2006-07-10 Benedikt Meurer <[EMAIL PROTECTED]>
+
+ * thunar-vfs/thunar-vfs-thumb-pixbuf.c: sys/types.h must be included
+ before sys/mman.h to compile properly on OpenBSD.
+ * thunar/thunar-progress-dialog.c(thunar_progress_dialog_percent): Do
+ not truncate the text in the progress bar. Bug #2003.
+ * thunar/thunar-list-model.c: Fix improper behaviour of ThunarListModel
+ with GtkEntryCompletion and GtkTreeView. Bug #1891.
+
2006-07-09 Benedikt Meurer <[EMAIL PROTECTED]>
* configure.in.in: Post-release version bump.
Modified: thunar/trunk/thunar/thunar-list-model.c
===================================================================
--- thunar/trunk/thunar/thunar-list-model.c 2006-07-10 17:22:16 UTC (rev
22397)
+++ thunar/trunk/thunar/thunar-list-model.c 2006-07-10 19:19:16 UTC (rev
22398)
@@ -1358,14 +1358,14 @@
prev->next = row;
}
+ store->nrows += 1;
+
iter.stamp = store->stamp;
iter.user_data = row;
path = gtk_tree_path_new_from_indices (index, -1);
gtk_tree_model_row_inserted (GTK_TREE_MODEL (store), path, &iter);
gtk_tree_path_free (path);
-
- store->nrows += 1;
}
}
@@ -1787,8 +1787,16 @@
files = g_list_copy (thunar_folder_get_files (folder));
if (G_LIKELY (files != NULL))
{
+ /* check if we have any handlers connected for "row-inserted" */
+ has_handler = g_signal_has_handler_pending (G_OBJECT (store),
store->row_inserted_id, 0, FALSE);
+
+ /* sort the files before inserting them into the model */
files = g_list_sort_with_data (files, thunar_list_model_cmp_list,
store);
+ /* setup path/iter for "row-inserted" */
+ path = gtk_tree_path_new_from_indices (0, -1);
+ iter.stamp = store->stamp;
+
/* insert the files */
for (lp = files; lp != NULL; lp = lp->next)
{
@@ -1809,40 +1817,29 @@
store->rows = row;
store->nrows += 1;
- }
- }
- /* check if we have any handlers connected for "row-inserted" */
- if (g_signal_has_handler_pending (G_OBJECT (store),
store->row_inserted_id, 0, FALSE))
- {
- /* notify other parties only if anyone is actually
- * interested in the "row-inserted" signal.
- */
- path = gtk_tree_path_new ();
- gtk_tree_path_append_index (path, 0);
- for (row = store->rows; row != NULL; row = row->next)
- {
- iter.stamp = store->stamp;
- iter.user_data = row;
- gtk_tree_model_row_inserted (GTK_TREE_MODEL (store), path,
&iter);
- gtk_tree_path_next (path);
+ /* check if we need to notify a view */
+ if (G_UNLIKELY (has_handler))
+ {
+ /* update the iter for the new row */
+ iter.user_data = row;
+
+ /* tell the view about the new row */
+ gtk_tree_model_row_inserted (GTK_TREE_MODEL (store),
path, &iter);
+ }
}
- gtk_tree_path_free (path);
}
/* cleanup */
+ gtk_tree_path_free (path);
g_list_free (files);
}
/* connect signals to the new folder */
- g_signal_connect (G_OBJECT (store->folder), "destroy",
- G_CALLBACK (thunar_list_model_folder_destroy), store);
- g_signal_connect (G_OBJECT (store->folder), "error",
- G_CALLBACK (thunar_list_model_folder_error), store);
- g_signal_connect (G_OBJECT (store->folder), "files-added",
- G_CALLBACK (thunar_list_model_files_added), store);
- g_signal_connect (G_OBJECT (store->folder), "files-removed",
- G_CALLBACK (thunar_list_model_files_removed), store);
+ g_signal_connect (G_OBJECT (store->folder), "destroy", G_CALLBACK
(thunar_list_model_folder_destroy), store);
+ g_signal_connect (G_OBJECT (store->folder), "error", G_CALLBACK
(thunar_list_model_folder_error), store);
+ g_signal_connect (G_OBJECT (store->folder), "files-added", G_CALLBACK
(thunar_list_model_files_added), store);
+ g_signal_connect (G_OBJECT (store->folder), "files-removed", G_CALLBACK
(thunar_list_model_files_removed), store);
}
/* notify listeners that we have a new folder */
@@ -1961,14 +1958,14 @@
prev->next = row;
}
+ store->nrows += 1;
+
iter.stamp = store->stamp;
iter.user_data = row;
path = thunar_list_model_get_path (GTK_TREE_MODEL (store), &iter);
gtk_tree_model_row_inserted (GTK_TREE_MODEL (store), path, &iter);
gtk_tree_path_free (path);
-
- store->nrows += 1;
}
g_list_free (store->hidden);
store->hidden = NULL;
Modified: thunar/trunk/thunar/thunar-progress-dialog.c
===================================================================
--- thunar/trunk/thunar/thunar-progress-dialog.c 2006-07-10 17:22:16 UTC
(rev 22397)
+++ thunar/trunk/thunar/thunar-progress-dialog.c 2006-07-10 19:19:16 UTC
(rev 22398)
@@ -496,7 +496,7 @@
GTimeVal current_time;
gulong remaining_time;
gulong elapsed_time;
- gchar text[32];
+ gchar text[512];
g_return_if_fail (THUNAR_IS_PROGRESS_DIALOG (dialog));
g_return_if_fail (percent >= 0.0 && percent <= 100.0);
Modified: thunar/trunk/thunar-vfs/thunar-vfs-thumb-pixbuf.c
===================================================================
--- thunar/trunk/thunar-vfs/thunar-vfs-thumb-pixbuf.c 2006-07-10 17:22:16 UTC
(rev 22397)
+++ thunar/trunk/thunar-vfs/thunar-vfs-thumb-pixbuf.c 2006-07-10 19:19:16 UTC
(rev 22398)
@@ -22,12 +22,12 @@
#include <config.h>
#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits