[gthumb] allow to find duplicates in catalogs
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] allow to find duplicates in catalogs
- Date: Mon, 28 Apr 2014 14:18:30 +0000 (UTC)
commit 87cf1d05bdf365640a87a888e95baeb886c14c7f
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Apr 28 15:57:41 2014 +0200
allow to find duplicates in catalogs
.../find_duplicates/data/ui/find-duplicates.ui | 16 +++++++---------
extensions/find_duplicates/dlg-find-duplicates.c | 18 ++++++++++--------
2 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/extensions/find_duplicates/data/ui/find-duplicates.ui
b/extensions/find_duplicates/data/ui/find-duplicates.ui
index cfcb4f8..39e3fa9 100644
--- a/extensions/find_duplicates/data/ui/find-duplicates.ui
+++ b/extensions/find_duplicates/data/ui/find-duplicates.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Tue Nov 19 11:15:07 2013 -->
+<!-- Generated with glade 3.18.2 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkListStore" id="file_type_liststore">
<columns>
<!-- column-name name -->
@@ -13,7 +13,7 @@
<property name="border_width">5</property>
<property name="title" translatable="yes">Find Duplicates</property>
<property name="resizable">False</property>
- <property name="type_hint">normal</property>
+ <property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="visible">True</property>
@@ -86,7 +86,6 @@
<property name="xalign">0</property>
<property name="label" translatable="yes">Start _at:</property>
<property name="use_underline">True</property>
- <property name="mnemonic_widget">location_filechooserbutton</property>
</object>
<packing>
<property name="expand">False</property>
@@ -95,13 +94,12 @@
</packing>
</child>
<child>
- <object class="GtkFileChooserButton" id="location_filechooserbutton">
+ <object class="GtkBox" id="location_chooser_container">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action">select-folder</property>
- <property name="local_only">False</property>
- <property name="preview_widget_active">False</property>
- <property name="title" translatable="yes"/>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="expand">True</property>
diff --git a/extensions/find_duplicates/dlg-find-duplicates.c
b/extensions/find_duplicates/dlg-find-duplicates.c
index 0fa135d..d653563 100644
--- a/extensions/find_duplicates/dlg-find-duplicates.c
+++ b/extensions/find_duplicates/dlg-find-duplicates.c
@@ -33,6 +33,7 @@ typedef struct {
GthBrowser *browser;
GtkBuilder *builder;
GtkWidget *dialog;
+ GtkWidget *location_chooser;
GList *general_tests;
} DialogData;
@@ -55,7 +56,7 @@ ok_clicked_cb (GtkWidget *widget,
{
GFile *folder;
- folder = gtk_file_chooser_get_file (GTK_FILE_CHOOSER ( _gtk_builder_get_widget (data->builder,
"location_filechooserbutton")));
+ folder = gth_location_chooser_get_current (GTH_LOCATION_CHOOSER (data->location_chooser));
if (folder == NULL)
return;
@@ -64,7 +65,6 @@ ok_clicked_cb (GtkWidget *widget,
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (GET_WIDGET
("include_subfolder_checkbutton"))),
g_list_nth_data (data->general_tests, gtk_combo_box_get_active
(GTK_COMBO_BOX (GET_WIDGET ("file_type_combobox")))));
- g_object_unref (folder);
gtk_widget_destroy (data->dialog);
}
@@ -74,7 +74,6 @@ dlg_find_duplicates (GthBrowser *browser)
{
DialogData *data;
GSettings *settings;
- GtkWidget *file_chooser;
GList *tests;
char *general_filter;
int active_filter;
@@ -99,13 +98,16 @@ dlg_find_duplicates (GthBrowser *browser)
gth_browser_set_dialog (browser, "find_duplicates", data->dialog);
g_object_set_data (G_OBJECT (data->dialog), "dialog_data", data);
+ data->location_chooser = g_object_new (GTH_TYPE_LOCATION_CHOOSER,
+ "show-entry-points", TRUE,
+ "relief", GTK_RELIEF_NORMAL,
+ NULL);
+ gtk_widget_show (data->location_chooser);
+ gtk_container_add (GTK_CONTAINER (GET_WIDGET ("location_chooser_container")), data->location_chooser);
+
/* Set widgets data. */
- file_chooser = _gtk_builder_get_widget (data->builder, "location_filechooserbutton");
- if (GTH_IS_FILE_SOURCE_VFS (gth_browser_get_location_source (browser)))
- gtk_file_chooser_set_file (GTK_FILE_CHOOSER (file_chooser), gth_browser_get_location
(browser), NULL);
- else
- gtk_file_chooser_set_uri (GTK_FILE_CHOOSER (file_chooser), get_home_uri ());
+ gth_location_chooser_set_current (GTH_LOCATION_CHOOSER (data->location_chooser),
gth_browser_get_location (browser));
tests = gth_main_get_registered_objects_id (GTH_TYPE_TEST);
general_filter = g_settings_get_string (settings, PREF_BROWSER_GENERAL_FILTER);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]