[gthumb] use gth_main_get_all_entry_points to simplify the code
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] use gth_main_get_all_entry_points to simplify the code
- Date: Wed, 28 Apr 2010 18:12:19 +0000 (UTC)
commit b5bc528cfa04c5af01273798bd74f8c57be60ddd
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Apr 28 20:10:02 2010 +0200
use gth_main_get_all_entry_points to simplify the code
...and maybe fix bug #614219
gthumb/gth-location-chooser.c | 33 ++++++++++++++-------------------
1 files changed, 14 insertions(+), 19 deletions(-)
---
diff --git a/gthumb/gth-location-chooser.c b/gthumb/gth-location-chooser.c
index 09c4281..cc7eeaf 100644
--- a/gthumb/gth-location-chooser.c
+++ b/gthumb/gth-location-chooser.c
@@ -261,6 +261,7 @@ update_entry_point_list (GthLocationChooser *chooser)
int first_position;
int i;
int position;
+ GList *entry_points;
GList *scan;
if (! get_nth_separator_pos (chooser, 1, &first_position))
@@ -280,26 +281,20 @@ update_entry_point_list (GthLocationChooser *chooser)
}
position = first_position + 1;
- for (scan = gth_main_get_all_file_sources (); scan; scan = scan->next) {
- GthFileSource *file_source = scan->data;
- GList *entry_points;
- GList *scan_entry;
-
- entry_points = gth_file_source_get_entry_points (file_source);
- for (scan_entry = entry_points; scan_entry; scan_entry = scan_entry->next) {
- GthFileData *file_data = scan_entry->data;
-
- add_file_source_entries (chooser,
- file_data->file,
- g_file_info_get_display_name (file_data->info),
- g_file_info_get_icon (file_data->info),
- position++,
- FALSE,
- ITEM_TYPE_ENTRY_POINT);
- }
-
- _g_object_list_unref (entry_points);
+ entry_points = gth_main_get_all_entry_points ();
+ for (scan = entry_points; scan; scan = scan->next) {
+ GthFileData *file_data = scan->data;
+
+ add_file_source_entries (chooser,
+ file_data->file,
+ g_file_info_get_display_name (file_data->info),
+ g_file_info_get_icon (file_data->info),
+ position++,
+ FALSE,
+ ITEM_TYPE_ENTRY_POINT);
}
+
+ _g_object_list_unref (entry_points);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]