[gthumb] find duplicates: optionally use a headerbar
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] find duplicates: optionally use a headerbar
- Date: Sat, 13 Aug 2016 14:40:59 +0000 (UTC)
commit 6722f858dac2e0fcf20e216a26ce5816120e4243
Author: Paolo Bacchilega <paobac src gnome org>
Date: Fri Aug 12 16:23:55 2016 +0200
find duplicates: optionally use a headerbar
.../data/ui/find-duplicates-choose-folders.ui | 37 +-
.../data/ui/find-duplicates-dialog.ui | 732 ++++++++++----------
.../find_duplicates/data/ui/find-duplicates.ui | 237 +++----
extensions/find_duplicates/dlg-find-duplicates.c | 19 +-
extensions/find_duplicates/gth-find-duplicates.c | 41 +-
.../find_duplicates/gth-folder-chooser-dialog.c | 9 +-
6 files changed, 513 insertions(+), 562 deletions(-)
---
diff --git a/extensions/find_duplicates/data/ui/find-duplicates-choose-folders.ui
b/extensions/find_duplicates/data/ui/find-duplicates-choose-folders.ui
index 553fd0f..4fda6f5 100644
--- a/extensions/find_duplicates/data/ui/find-duplicates-choose-folders.ui
+++ b/extensions/find_duplicates/data/ui/find-duplicates-choose-folders.ui
@@ -1,15 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.0 -->
<interface>
- <requires lib="gtk+" version="2.24"/>
- <object class="GtkVBox" id="folder_chooser">
+ <requires lib="gtk+" version="3.14"/>
+ <object class="GtkListStore" id="folders_liststore">
+ <columns>
+ <!-- column-name file -->
+ <column type="GObject"/>
+ <!-- column-name name -->
+ <column type="gchararray"/>
+ <!-- column-name selected -->
+ <column type="gboolean"/>
+ </columns>
+ </object>
+ <object class="GtkBox" id="folder_chooser">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="border_width">15</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
+ <property name="halign">start</property>
<property name="label" translatable="yes">_Folders:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">folders_treeview</property>
@@ -27,8 +40,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
<child>
<object class="GtkTreeView" id="folders_treeview">
<property name="visible">True</property>
@@ -52,11 +63,7 @@
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
- <child>
- <object class="GtkCellRendererPixbuf" id="cellrendererpixbuf1">
- <property name="icon_name">folder</property>
- </object>
- </child>
+ <property name="spacing">3</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext1"/>
<attributes>
@@ -75,14 +82,4 @@
</packing>
</child>
</object>
- <object class="GtkListStore" id="folders_liststore">
- <columns>
- <!-- column-name file -->
- <column type="GObject"/>
- <!-- column-name name -->
- <column type="gchararray"/>
- <!-- column-name selected -->
- <column type="gboolean"/>
- </columns>
- </object>
</interface>
diff --git a/extensions/find_duplicates/data/ui/find-duplicates-dialog.ui
b/extensions/find_duplicates/data/ui/find-duplicates-dialog.ui
index 3e986cb..7b043ee 100644
--- a/extensions/find_duplicates/data/ui/find-duplicates-dialog.ui
+++ b/extensions/find_duplicates/data/ui/find-duplicates-dialog.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.0 on Tue Nov 19 11:15:46 2013 -->
+<!-- Generated with glade 3.20.0 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.14"/>
<object class="GtkListStore" id="files_liststore">
<columns>
<!-- column-name file -->
@@ -23,111 +23,85 @@
<object class="GtkTreeModelFilter" id="files_treemodelfilter">
<property name="child_model">files_liststore</property>
</object>
- <object class="GtkDialog" id="find_duplicates_dialog">
+ <object class="GtkBox" id="dialog_content">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="title" translatable="yes">Search for Duplicates</property>
- <property name="destroy_with_parent">True</property>
- <property name="type_hint">dialog</property>
- <child internal-child="vbox">
- <object class="GtkBox" id="dialog-vbox12">
+ <property name="border_width">15</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkBox" id="vbox13">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area12">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="stop_button">
- <property name="label">gtk-stop</property>
- <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="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="close_button">
- <property name="label">gtk-close</property>
- <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="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
<child>
- <object class="GtkVBox" id="vbox13">
+ <object class="GtkBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="spacing">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">20</property>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">20</property>
+ <property name="spacing">24</property>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">24</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkVBox" id="vbox4">
+ <object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <child>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="icon_name">edit-find-symbolic</property>
- <property name="icon_size">6</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="icon_name">edit-find-symbolic</property>
+ <property name="icon_size">6</property>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</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="GtkBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkVBox" id="vbox2">
+ <object class="GtkLabel" id="progress_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
+ <property name="ellipsize">end</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">3</property>
<child>
- <object class="GtkLabel" id="progress_label">
+ <object class="GtkProgressBar" id="search_progressbar">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="ellipsize">end</property>
+ <property name="pulse_step">0.02</property>
</object>
<packing>
<property name="expand">True</property>
@@ -136,35 +110,11 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox3">
+ <object class="GtkLabel" id="search_details_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">3</property>
- <child>
- <object class="GtkProgressBar" id="search_progressbar">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="pulse_step">0.02</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="search_details_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="ellipsize">end</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="ellipsize">end</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
@@ -181,9 +131,41 @@
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkButton" id="stop_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">none</property>
+ <child>
+ <object class="GtkImage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">edit-delete-symbolic</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</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>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -193,279 +175,254 @@
<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="hseparator7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="padding">6</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkNotebook" id="pages_notebook">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
<child>
- <object class="GtkHSeparator" id="hseparator7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="padding">6</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkNotebook" id="pages_notebook">
+ <object class="GtkPaned" id="paned1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
+ <property name="can_focus">True</property>
+ <property name="orientation">vertical</property>
+ <property name="position">315</property>
+ <property name="wide_handle">True</property>
<child>
- <object class="GtkPaned" id="paned1">
+ <object class="GtkBox" id="vbox18">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
<property name="orientation">vertical</property>
- <property name="position">315</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkVBox" id="vbox18">
+ <object class="GtkBox" id="hbox46">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
+ <property name="spacing">5</property>
<child>
- <object class="GtkHBox" id="hbox46">
+ <object class="GtkLabel" id="label73">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkLabel" id="label73">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Duplicates:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="total_duplicates_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="label" translatable="yes">Duplicates:</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="duplicates_list_box">
+ <object class="GtkLabel" id="total_duplicates_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
+ <property name="xalign">0</property>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
- <property name="resize">True</property>
- <property name="shrink">False</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="duplicates_list_box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="resize">True</property>
+ <property name="shrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="vbox16">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">12</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkVBox" id="vbox16">
+ <object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="box1">
+ <object class="GtkLabel" id="label78">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label78">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Files:</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="total_files_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="label" translatable="yes">Files:</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox50">
+ <object class="GtkLabel" id="total_files_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</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="GtkBox" id="hbox50">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="vexpand">True</property>
+ <child>
+ <object class="GtkBox" id="vbox14">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
<child>
- <object class="GtkVBox" id="vbox14">
+ <object class="GtkBox" id="hbox51">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">5</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkHBox" id="hbox51">
+ <object class="GtkScrolledWindow" id="files_scrolledwindow">
+ <property name="width_request">570</property>
+ <property name="height_request">200</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
+ <property name="can_focus">True</property>
+ <property name="shadow_type">in</property>
<child>
- <object class="GtkScrolledWindow" id="files_scrolledwindow">
- <property name="width_request">570</property>
- <property name="height_request">200</property>
+ <object class="GtkTreeView" id="files_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="shadow_type">in</property>
+ <property name="model">files_treemodelfilter</property>
+ <property name="headers_clickable">False</property>
+ <property name="rules_hint">True</property>
+ <property name="enable_search">False</property>
+ <property name="search_column">1</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection"/>
+ </child>
<child>
- <object class="GtkTreeView" id="files_treeview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="model">files_treemodelfilter</property>
- <property name="headers_clickable">False</property>
- <property name="rules_hint">True</property>
- <property name="enable_search">False</property>
- <property name="search_column">1</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection"/>
- </child>
+ <object class="GtkTreeViewColumn" id="checked_treeviewcolumn">
+ <property name="sizing">autosize</property>
<child>
- <object class="GtkTreeViewColumn" id="checked_treeviewcolumn">
- <property name="sizing">autosize</property>
- <child>
- <object class="GtkCellRendererToggle"
id="file_cellrenderertoggle"/>
- <attributes>
- <attribute name="active">1</attribute>
- </attributes>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkTreeViewColumn" id="file_treeviewcolumn">
- <property name="title">File</property>
- <property name="clickable">True</property>
- <property name="reorderable">True</property>
- <property name="sort_indicator">True</property>
- <child>
- <object class="GtkCellRendererText"
id="cellrenderertext1"/>
- <attributes>
- <attribute name="text">2</attribute>
- </attributes>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkTreeViewColumn" id="modified_treeviewcolumn">
- <property name="sizing">autosize</property>
- <property name="title">Last modified</property>
- <property name="clickable">True</property>
- <property name="reorderable">True</property>
- <child>
- <object class="GtkCellRendererText"
id="cellrenderertext2"/>
- <attributes>
- <attribute name="text">4</attribute>
- </attributes>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkTreeViewColumn" id="position_treeviewcolumn">
- <property name="resizable">True</property>
- <property name="title">Position</property>
- <property name="clickable">True</property>
- <property name="reorderable">True</property>
- <child>
- <object class="GtkCellRendererText"
id="cellrenderertext3"/>
- <attributes>
- <attribute name="text">3</attribute>
- </attributes>
- </child>
- </object>
+ <object class="GtkCellRendererToggle"
id="file_cellrenderertoggle"/>
+ <attributes>
+ <attribute name="active">1</attribute>
+ </attributes>
</child>
</object>
</child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="files_commands_hbox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">5</property>
<child>
- <object class="GtkVBox" id="select_button_box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
+ <object class="GtkTreeViewColumn" id="file_treeviewcolumn">
+ <property name="title">File</property>
+ <property name="clickable">True</property>
+ <property name="reorderable">True</property>
+ <property name="sort_indicator">True</property>
<child>
- <placeholder/>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">2</attribute>
+ </attributes>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
</child>
<child>
- <object class="GtkButton" id="view_button">
- <property name="label" translatable="yes">_View</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
+ <object class="GtkTreeViewColumn" id="modified_treeviewcolumn">
+ <property name="sizing">autosize</property>
+ <property name="title">Last modified</property>
+ <property name="clickable">True</property>
+ <property name="reorderable">True</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext2"/>
+ <attributes>
+ <attribute name="text">4</attribute>
+ </attributes>
+ </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
</child>
<child>
- <object class="GtkButton" id="delete_button">
- <property name="label" translatable="yes">_Delete</property>
- <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="use_underline">True</property>
- <property name="image_position">right</property>
+ <object class="GtkTreeViewColumn" id="position_treeviewcolumn">
+ <property name="resizable">True</property>
+ <property name="title">Position</property>
+ <property name="clickable">True</property>
+ <property name="reorderable">True</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext3"/>
+ <attributes>
+ <attribute name="text">3</attribute>
+ </attributes>
+ </child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
</child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="files_commands_hbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkBox" id="select_button_box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
@@ -473,15 +430,50 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="view_button">
+ <property name="label" translatable="yes">_View</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkButton" id="delete_button">
+ <property name="label" translatable="yes">_Delete</property>
+ <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="use_underline">True</property>
+ <property name="image_position">right</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
@@ -493,97 +485,101 @@
</child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
</object>
<packing>
- <property name="resize">False</property>
- <property name="shrink">False</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label80">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">label80</property>
- </object>
<packing>
- <property name="tab_fill">False</property>
+ <property name="resize">False</property>
+ <property name="shrink">False</property>
</packing>
</child>
+ </object>
+ <packing>
+ <property name="tab_expand">True</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label80">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">label80</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="hbox53">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">10</property>
<child>
- <object class="GtkHBox" id="hbox53">
+ <object class="GtkImage" id="image43">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">10</property>
- <child>
- <object class="GtkImage" id="image43">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="icon_name">dialog-warning-symbolic</property>
- <property name="icon_size">6</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label82">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">No duplicates found.</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="xalign">1</property>
+ <property name="icon_name">dialog-warning-symbolic</property>
+ <property name="icon_size">6</property>
</object>
<packing>
- <property name="position">1</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
- <child type="tab">
- <object class="GtkLabel" id="label81">
+ <child>
+ <object class="GtkLabel" id="label82">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">label81</property>
+ <property name="label" translatable="yes">No duplicates found.</property>
+ <property name="wrap">True</property>
+ <property name="xalign">0</property>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
- <property name="tab_fill">False</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label81">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">label81</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
- <action-widgets>
- <action-widget response="0">stop_button</action-widget>
- <action-widget response="0">close_button</action-widget>
- </action-widgets>
</object>
</interface>
diff --git a/extensions/find_duplicates/data/ui/find-duplicates.ui
b/extensions/find_duplicates/data/ui/find-duplicates.ui
index 39e3fa9..9b9e9f3 100644
--- a/extensions/find_duplicates/data/ui/find-duplicates.ui
+++ b/extensions/find_duplicates/data/ui/find-duplicates.ui
@@ -1,188 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.2 -->
+<!-- Generated with glade 3.20.0 -->
<interface>
- <requires lib="gtk+" version="3.0"/>
+ <requires lib="gtk+" version="3.20"/>
<object class="GtkListStore" id="file_type_liststore">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
</columns>
</object>
- <object class="GtkDialog" id="find_duplicates_dialog">
+ <object class="GtkBox" id="dialog_content">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Find Duplicates</property>
- <property name="resizable">False</property>
- <property name="type_hint">dialog</property>
- <child internal-child="vbox">
- <object class="GtkBox" id="dialog-vbox1">
+ <property name="border_width">15</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">2</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkBox" id="location_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkButton" id="cancel_button">
- <property name="label">gtk-cancel</property>
- <property name="use_action_appearance">False</property>
+ <object class="GtkLabel" id="start_at_label">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="label" translatable="yes">Start _at:</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="ok_button">
- <property name="label">gtk-find</property>
- <property name="use_action_appearance">False</property>
+ <object class="GtkBox" id="location_chooser_container">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="include_subfolder_checkbutton">
+ <property name="label" translatable="yes">_Include sub-folders</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Filter:</property>
+ <property name="use_underline">True</property>
+ <property name="justify">right</property>
+ <property name="mnemonic_widget">file_type_combobox</property>
+ <property name="xalign">1</property>
+ </object>
+ <packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkComboBox" id="file_type_combobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="location_box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="start_at_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Start _at:</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="location_chooser_container">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="include_subfolder_checkbutton">
- <property name="label" translatable="yes">_Include sub-folders</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0.5</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="model">file_type_liststore</property>
<child>
- <object class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Filter:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">file_type_combobox</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="file_type_combobox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">file_type_liststore</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext1"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
</child>
</object>
<packing>
@@ -192,16 +122,17 @@
</packing>
</child>
</object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
- <action-widgets>
- <action-widget response="0">cancel_button</action-widget>
- <action-widget response="0">ok_button</action-widget>
- </action-widgets>
</object>
<object class="GtkSizeGroup" id="sizegroup1">
<widgets>
- <widget name="label1"/>
<widget name="start_at_label"/>
+ <widget name="label1"/>
</widgets>
</object>
</interface>
diff --git a/extensions/find_duplicates/dlg-find-duplicates.c
b/extensions/find_duplicates/dlg-find-duplicates.c
index d653563..f90dd9a 100644
--- a/extensions/find_duplicates/dlg-find-duplicates.c
+++ b/extensions/find_duplicates/dlg-find-duplicates.c
@@ -94,7 +94,20 @@ dlg_find_duplicates (GthBrowser *browser)
/* Get the widgets. */
- data->dialog = _gtk_builder_get_widget (data->builder, "find_duplicates_dialog");
+ data->dialog = g_object_new (GTK_TYPE_DIALOG,
+ "title", _("Find Duplicates"),
+ "use-header-bar", _gtk_settings_get_dialogs_use_header (),
+ "resizable", FALSE,
+ NULL);
+
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (data->dialog))),
+ _gtk_builder_get_widget (data->builder, "dialog_content"));
+ gtk_dialog_add_buttons (GTK_DIALOG (data->dialog),
+ _("_Find"), GTK_RESPONSE_OK,
+ _GTK_LABEL_CANCEL, GTK_RESPONSE_CANCEL,
+ NULL);
+ _gtk_dialog_add_class_to_response (GTK_DIALOG (data->dialog), GTK_RESPONSE_OK,
GTK_STYLE_CLASS_SUGGESTED_ACTION);
+
gth_browser_set_dialog (browser, "find_duplicates", data->dialog);
g_object_set_data (G_OBJECT (data->dialog), "dialog_data", data);
@@ -149,11 +162,11 @@ dlg_find_duplicates (GthBrowser *browser)
"destroy",
G_CALLBACK (destroy_cb),
data);
- g_signal_connect (GET_WIDGET ("ok_button"),
+ g_signal_connect (gtk_dialog_get_widget_for_response (GTK_DIALOG (data->dialog), GTK_RESPONSE_OK),
"clicked",
G_CALLBACK (ok_clicked_cb),
data);
- g_signal_connect_swapped (GET_WIDGET ("cancel_button"),
+ g_signal_connect_swapped (gtk_dialog_get_widget_for_response (GTK_DIALOG (data->dialog),
GTK_RESPONSE_CANCEL),
"clicked",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (data->dialog));
diff --git a/extensions/find_duplicates/gth-find-duplicates.c
b/extensions/find_duplicates/gth-find-duplicates.c
index 64fb30a..1584410 100644
--- a/extensions/find_duplicates/gth-find-duplicates.c
+++ b/extensions/find_duplicates/gth-find-duplicates.c
@@ -73,6 +73,7 @@ SelectCommand select_commands[] = {
struct _GthFindDuplicatesPrivate
{
GthBrowser *browser;
+ GtkWidget *dialog;
GFile *location;
gboolean recursive;
GthTest *test;
@@ -528,7 +529,7 @@ file_input_stream_read_ready_cb (GObject *source,
self->priv->io_operation = FALSE;
if (self->priv->closing) {
- gtk_widget_destroy (GET_WIDGET ("find_duplicates_dialog"));
+ gtk_widget_destroy (self->priv->dialog);
return;
}
@@ -617,7 +618,7 @@ read_current_file_ready_cb (GObject *source,
self->priv->io_operation = FALSE;
if (self->priv->closing) {
- gtk_widget_destroy (GET_WIDGET ("find_duplicates_dialog"));
+ gtk_widget_destroy (self->priv->dialog);
return;
}
@@ -767,13 +768,13 @@ done_func (GObject *object,
self->priv->io_operation = FALSE;
if (self->priv->closing) {
- gtk_widget_destroy (GET_WIDGET ("find_duplicates_dialog"));
+ gtk_widget_destroy (self->priv->dialog);
return;
}
if ((error != NULL) && ! g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
_gtk_error_dialog_from_gerror_show (GTK_WINDOW (self->priv->browser), _("Could not perform
the operation"), error);
- gtk_widget_destroy (GET_WIDGET ("find_duplicates_dialog"));
+ gtk_widget_destroy (self->priv->dialog);
return;
}
@@ -867,7 +868,7 @@ close_button_clicked_cb (GtkButton *button,
GthFindDuplicates *self = user_data;
if (! self->priv->io_operation) {
- gtk_widget_destroy (GET_WIDGET ("find_duplicates_dialog"));
+ gtk_widget_destroy (self->priv->dialog);
}
else {
self->priv->closing = TRUE;
@@ -1034,7 +1035,7 @@ delete_button_clicked_cb (GtkWidget *button,
file_data_list = get_selected_files (self);
if (file_data_list != NULL) {
- gth_file_mananger_delete_files (GTK_WINDOW (GET_WIDGET ("find_duplicates_dialog")),
file_data_list);
+ gth_file_mananger_delete_files (GTK_WINDOW (self->priv->dialog), file_data_list);
_g_object_list_unref (file_data_list);
}
}
@@ -1200,7 +1201,7 @@ select_menu_item_activate_cb (GtkMenuItem *menu_item,
}
dialog = gth_folder_chooser_dialog_new (folders);
- gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (GET_WIDGET
("find_duplicates_dialog")));
+ gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (self->priv->dialog));
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gtk_widget_show (dialog);
@@ -1293,15 +1294,29 @@ gth_find_duplicates_exec (GthBrowser *browser,
}
self->priv->builder = _gtk_builder_new_from_file ("find-duplicates-dialog.ui", "find_duplicates");
+
+ self->priv->dialog = g_object_new (GTK_TYPE_DIALOG,
+ "title", _("Find Duplicates"),
+ "transient-for", GTK_WINDOW (self->priv->browser),
+ "modal", FALSE,
+ "destroy-with-parent", FALSE,
+ "use-header-bar", _gtk_settings_get_dialogs_use_header (),
+ NULL);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (self->priv->dialog))),
+ _gtk_builder_get_widget (self->priv->builder, "dialog_content"));
+ gtk_dialog_add_buttons (GTK_DIALOG (self->priv->dialog),
+ _GTK_LABEL_CLOSE, GTK_RESPONSE_CLOSE,
+ NULL);
+
self->priv->duplicates_list = gth_file_list_new (gth_grid_view_new (), GTH_FILE_LIST_MODE_NORMAL,
FALSE);
gtk_tree_model_filter_set_visible_column (GTK_TREE_MODEL_FILTER (GET_WIDGET
("files_treemodelfilter")), FILE_LIST_COLUMN_VISIBLE);
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (GET_WIDGET ("files_liststore")),
FILE_LIST_COLUMN_FILENAME, GTK_SORT_ASCENDING);
gth_file_selection_set_selection_mode (GTH_FILE_SELECTION (gth_file_list_get_view (GTH_FILE_LIST
(self->priv->duplicates_list))), GTK_SELECTION_MULTIPLE);
gth_file_list_set_caption (GTH_FILE_LIST (self->priv->duplicates_list),
"find-duplicates::n-duplicates,gth::file::display-size");
gth_file_list_set_thumb_size (GTH_FILE_LIST (self->priv->duplicates_list), 112);
- gtk_widget_set_size_request (self->priv->duplicates_list, -1, 300);
+ gtk_widget_set_size_request (self->priv->duplicates_list, 750, 300);
gtk_widget_show (self->priv->duplicates_list);
- gtk_container_add (GTK_CONTAINER (GET_WIDGET ("duplicates_list_box")), self->priv->duplicates_list);
+ gtk_box_pack_start (GTK_CONTAINER (GET_WIDGET ("duplicates_list_box")), self->priv->duplicates_list,
TRUE, TRUE, 0);
self->priv->select_button = gtk_menu_button_new ();
gtk_container_add (GTK_CONTAINER (self->priv->select_button), gtk_label_new (_("Select")));
@@ -1327,11 +1342,11 @@ gth_find_duplicates_exec (GthBrowser *browser,
g_object_unref (settings);
- g_signal_connect (GET_WIDGET ("find_duplicates_dialog"),
+ g_signal_connect (self->priv->dialog,
"destroy",
G_CALLBACK (find_duplicates_dialog_destroy_cb),
self);
- g_signal_connect (GET_WIDGET ("close_button"),
+ g_signal_connect (gtk_dialog_get_widget_for_response (GTK_DIALOG (self->priv->dialog),
GTK_RESPONSE_CLOSE),
"clicked",
G_CALLBACK (close_button_clicked_cb),
self);
@@ -1372,8 +1387,6 @@ gth_find_duplicates_exec (GthBrowser *browser,
G_CALLBACK (delete_button_clicked_cb),
self);
- gtk_widget_show (GET_WIDGET ("find_duplicates_dialog"));
- gtk_window_set_transient_for (GTK_WINDOW (GET_WIDGET ("find_duplicates_dialog")), GTK_WINDOW
(self->priv->browser));
-
+ gtk_widget_show (self->priv->dialog);
search_directory (self, self->priv->location);
}
diff --git a/extensions/find_duplicates/gth-folder-chooser-dialog.c
b/extensions/find_duplicates/gth-folder-chooser-dialog.c
index 67ab101..c1fb407 100644
--- a/extensions/find_duplicates/gth-folder-chooser-dialog.c
+++ b/extensions/find_duplicates/gth-folder-chooser-dialog.c
@@ -100,11 +100,8 @@ gth_folder_chooser_dialog_init (GthFolderChooserDialog *self)
self->priv->builder = _gtk_builder_new_from_file ("find-duplicates-choose-folders.ui",
"find_duplicates");
gtk_window_set_resizable (GTK_WINDOW (self), TRUE);
- gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (self))), 5);
- gtk_container_set_border_width (GTK_CONTAINER (self), 5);
content = _gtk_builder_get_widget (self->priv->builder, "folder_chooser");
- gtk_container_set_border_width (GTK_CONTAINER (content), 5);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (self))), content, TRUE, TRUE,
0);
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (GET_WIDGET ("folders_liststore")),
FOLDER_NAME_COLUMN, GTK_SORT_ASCENDING);
@@ -121,6 +118,7 @@ gth_folder_chooser_dialog_init (GthFolderChooserDialog *self)
_GTK_LABEL_OK,
GTK_RESPONSE_OK);
gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_OK);
+ _gtk_dialog_add_class_to_response (GTK_DIALOG (self), GTK_RESPONSE_CLOSE,
GTK_STYLE_CLASS_SUGGESTED_ACTION);
}
@@ -156,7 +154,10 @@ gth_folder_chooser_dialog_new (GList *folders)
{
GthFolderChooserDialog *self;
- self = g_object_new (GTH_TYPE_FOLDER_CHOOSER_DIALOG, NULL);
+ self = g_object_new (GTH_TYPE_FOLDER_CHOOSER_DIALOG,
+ /*"title", _("Folders"),*/
+ "use-header-bar", _gtk_settings_get_dialogs_use_header (),
+ NULL);
gth_folder_chooser_dialog_construct (self, folders);
return (GtkWidget *) self;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]