[easytag/wip/future-gtk: 25/26] Use default property with action-widget responses



commit 460947670c2c7da532c6d5cede28f18b09eac1c6
Author: David King <amigadave amigadave com>
Date:   Wed May 13 23:44:12 2015 +0700

    Use default property with action-widget responses

 README                          |    2 +-
 configure.ac                    |    4 ++--
 data/browser_dialogs.ui         |    7 ++++---
 data/image_properties_dialog.ui |    4 ++--
 data/load_files_dialog.ui       |    4 ++--
 data/playlist_dialog.ui         |    4 ++--
 data/preferences_dialog.ui      |    4 ++--
 data/scan_dialog.ui             |    4 ++--
 src/browser.c                   |    6 ------
 src/load_files_dialog.c         |    2 --
 src/playlist_dialog.c           |    2 --
 src/preferences_dialog.c        |    2 --
 src/scan_dialog.c               |    2 --
 src/tag_area.c                  |    3 ---
 14 files changed, 17 insertions(+), 33 deletions(-)
---
diff --git a/README b/README
index 4a2bcf0..d3645cb 100644
--- a/README
+++ b/README
@@ -58,7 +58,7 @@ Installation
 ### Requirements
 
 * GLib version greater than 2.38.0 (http://www.gtk.org)
-* GTK+ version greater than 3.10.0 (http://www.gtk.org)
+* GTK+ version greater than 3.12.0 (http://www.gtk.org)
 * libid3tag (http://www.underbit.com/products/mad) (if not deactivated by './configure --disable-mp3')
 * id3lib version greater than 3.7.12 (http://id3lib.sourceforge.net) (Recommended: id3lib-3.8.3) (if not 
deactivated by './configure --disable-id3v23')
 * flac (http://flac.sourceforge.net) (if not deactivated by './configure --disable-flac')
diff --git a/configure.ac b/configure.ac
index a47a238..ed5ef93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -337,9 +337,9 @@ dnl Check the pkg-config dependencies
 GIO_DEPS="gio-2.0 >= 2.38.0"
 AC_SUBST([GLIB_DEPRECATION_FLAGS],
          ["-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_38 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_38"])
-GTK_DEPS="gtk+-3.0 >= 3.10.0"
+GTK_DEPS="gtk+-3.0 >= 3.12.0"
 AC_SUBST([GTK_DEPRECATION_FLAGS],
-         ["-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_10 -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_10"])
+         ["-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_12 -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_12"])
 PKG_CHECK_MODULES([EASYTAG], [$GIO_DEPS $GTK_DEPS $OPUS_DEPS $OGG_DEPS $SPEEX_DEPS $FLAC_DEPS $ID3TAG_DEPS 
$TAGLIB_DEPS $WAVPACK_DEPS])
 
 dnl Check for winsock
diff --git a/data/browser_dialogs.ui b/data/browser_dialogs.ui
index 0c5adb8..d81d449 100644
--- a/data/browser_dialogs.ui
+++ b/data/browser_dialogs.ui
@@ -1,4 +1,5 @@
 <interface domain="easytag">
+    <requires lib="gtk+" version="3.12"/>
     <object class="GtkDialog" id="open_directory_dialog">
         <property name="border-width">12</property>
         <property name="destroy-with-parent">True</property>
@@ -73,7 +74,7 @@
             </object>
         </child>
         <action-widgets>
-            <action-widget response="-5">open_directory_execute_button</action-widget>
+            <action-widget response="-5" default="yes">open_directory_execute_button</action-widget>
             <action-widget response="-6">open_directory_cancel_button</action-widget>
         </action-widgets>
     </object>
@@ -151,7 +152,7 @@
             </object>
         </child>
         <action-widgets>
-            <action-widget response="-5">open_files_execute_button</action-widget>
+            <action-widget response="-5" default="yes">open_files_execute_button</action-widget>
             <action-widget response="-6">open_files_cancel_button</action-widget>
         </action-widgets>
     </object>
@@ -259,7 +260,7 @@
             </object>
         </child>
         <action-widgets>
-            <action-widget response="-10">rename_button</action-widget>
+            <action-widget response="-10" default="yes">rename_button</action-widget>
             <action-widget response="-6">cancel_button</action-widget>
         </action-widgets>
     </object>
diff --git a/data/image_properties_dialog.ui b/data/image_properties_dialog.ui
index e7af316..4e31550 100644
--- a/data/image_properties_dialog.ui
+++ b/data/image_properties_dialog.ui
@@ -1,5 +1,5 @@
 <interface domain="easytag">
-    <requires lib="gtk+" version="3.4"/>
+    <requires lib="gtk+" version="3.12"/>
     <object class="GtkDialog" id="image_properties_dialog">
         <property name="border-width">12</property>
         <property name="destroy-with-parent">True</property>
@@ -77,7 +77,7 @@
             </object>
         </child>
         <action-widgets>
-            <action-widget response="-3">accept_button</action-widget>
+            <action-widget response="-3" default="yes">accept_button</action-widget>
             <action-widget response="-2">cancel_button</action-widget>
         </action-widgets>
     </object>
diff --git a/data/load_files_dialog.ui b/data/load_files_dialog.ui
index 47a5f60..82726f0 100644
--- a/data/load_files_dialog.ui
+++ b/data/load_files_dialog.ui
@@ -1,5 +1,5 @@
 <interface domain="easytag">
-    <requires lib="gtk+" version="3.10"/>
+    <requires lib="gtk+" version="3.12"/>
     <object class="GtkListStore" id="file_content_model">
         <columns>
             <column type="gchararray"/>
@@ -332,7 +332,7 @@
         </child>
         <action-widgets>
             <action-widget response="-7">close_button</action-widget>
-            <action-widget response="-10">apply_button</action-widget>
+            <action-widget response="-10" default="yes">apply_button</action-widget>
         </action-widgets>
     </template>
 </interface>
diff --git a/data/playlist_dialog.ui b/data/playlist_dialog.ui
index 497fa71..ecefbf7 100644
--- a/data/playlist_dialog.ui
+++ b/data/playlist_dialog.ui
@@ -1,5 +1,5 @@
 <interface domain="easytag">
-    <requires lib="gtk+" version="3.10"/>
+    <requires lib="gtk+" version="3.12"/>
     <template class="EtPlaylistDialog" parent="GtkDialog">
         <property name="destroy-with-parent">True</property>
         <property name="title" translatable="yes">Generate Playlist</property>
@@ -171,7 +171,7 @@
         </child>
         <action-widgets>
             <action-widget response="-7">close_button</action-widget>
-            <action-widget response="-5">save_button</action-widget>
+            <action-widget response="-5" default="yes">save_button</action-widget>
         </action-widgets>
     </template>
 </interface>
diff --git a/data/preferences_dialog.ui b/data/preferences_dialog.ui
index 71f5789..1a23b24 100644
--- a/data/preferences_dialog.ui
+++ b/data/preferences_dialog.ui
@@ -1,5 +1,5 @@
 <interface domain="easytag">
-    <requires lib="gtk+" version="3.10"/>
+    <requires lib="gtk+" version="3.12"/>
     <object class="GtkAdjustment" id="cddb_automatic_host1_adjustment">
         <property name="lower">0.0</property>
         <property name="step-increment">1.0</property>
@@ -1543,7 +1543,7 @@
             </object>
         </child>
         <action-widgets>
-            <action-widget response="-7">close_button</action-widget>
+            <action-widget response="-7" default="yes">close_button</action-widget>
         </action-widgets>
     </template>
 </interface>
diff --git a/data/scan_dialog.ui b/data/scan_dialog.ui
index 425bf1a..2057628 100644
--- a/data/scan_dialog.ui
+++ b/data/scan_dialog.ui
@@ -1,5 +1,5 @@
 <interface domain="easytag">
-    <requires lib="gtk+" version="3.10"/>
+    <requires lib="gtk+" version="3.12"/>
     <object class="GtkListStore" id="fill_masks_model">
         <columns>
             <column type="gchararray"/>
@@ -923,7 +923,7 @@
         </child>
         <action-widgets>
             <action-widget response="-7">close_button</action-widget>
-            <action-widget response="-10">scan_button</action-widget>
+            <action-widget response="-10" default="yes">scan_button</action-widget>
         </action-widgets>
     </template>
 </interface>
diff --git a/src/browser.c b/src/browser.c
index 9c99a97..2b23458 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -4084,8 +4084,6 @@ et_browser_show_rename_directory_dialog (EtBrowser *self)
 
     gtk_window_set_transient_for (GTK_WINDOW (priv->rename_directory_dialog),
                                   GTK_WINDOW (MainWindow));
-    gtk_dialog_set_default_response (GTK_DIALOG (priv->rename_directory_dialog),
-                                     GTK_RESPONSE_APPLY);
 
     /* We attach useful data to the combobox */
     g_object_set_data (G_OBJECT (priv->rename_directory_dialog),
@@ -4494,8 +4492,6 @@ et_browser_show_open_directory_with_dialog (EtBrowser *self)
 
     gtk_window_set_transient_for (GTK_WINDOW (priv->open_directory_with_dialog),
                                   GTK_WINDOW (MainWindow));
-    gtk_dialog_set_default_response (GTK_DIALOG (priv->open_directory_with_dialog),
-                                     GTK_RESPONSE_OK);
     g_signal_connect (priv->open_directory_with_dialog, "response",
                       G_CALLBACK (et_run_program_tree_on_response), self);
 
@@ -4708,8 +4704,6 @@ et_browser_show_open_files_with_dialog (EtBrowser *self)
 
     priv->open_files_with_dialog = GTK_WIDGET (gtk_builder_get_object (builder,
                                                                        "open_files_dialog"));
-    gtk_dialog_set_default_response (GTK_DIALOG (priv->open_files_with_dialog),
-                                     GTK_RESPONSE_OK);
     gtk_window_set_transient_for (GTK_WINDOW (priv->open_files_with_dialog),
                                   GTK_WINDOW (MainWindow));
     g_signal_connect ((priv->open_files_with_dialog), "response",
diff --git a/src/load_files_dialog.c b/src/load_files_dialog.c
index 7434134..f72d6e9 100644
--- a/src/load_files_dialog.c
+++ b/src/load_files_dialog.c
@@ -994,8 +994,6 @@ create_load_files_dialog (EtLoadFilesDialog *self)
 
     priv = et_load_files_dialog_get_instance_private (self);
 
-    gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_APPLY);
-
     /* Initial value. */
     if ((path = et_application_window_get_current_path (ET_APPLICATION_WINDOW (MainWindow))) != NULL)
     {
diff --git a/src/playlist_dialog.c b/src/playlist_dialog.c
index d2f270c..a0bcb40 100644
--- a/src/playlist_dialog.c
+++ b/src/playlist_dialog.c
@@ -653,8 +653,6 @@ create_playlist_dialog (EtPlaylistDialog *self)
 
     priv = et_playlist_dialog_get_instance_private (self);
 
-    gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_OK);
-
     /* Playlist name */
     g_settings_bind (MainSettings, "playlist-filename-mask",
                      priv->name_mask_entry, "text", G_SETTINGS_BIND_DEFAULT);
diff --git a/src/preferences_dialog.c b/src/preferences_dialog.c
index df409d4..45610f2 100644
--- a/src/preferences_dialog.c
+++ b/src/preferences_dialog.c
@@ -275,8 +275,6 @@ create_preferences_dialog (EtPreferencesDialog *self)
 
     priv = et_preferences_dialog_get_instance_private (self);
 
-    gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_CLOSE);
-
     /* Browser. */
     on_default_path_changed (MainSettings, "default-path",
                              GTK_FILE_CHOOSER_BUTTON (priv->default_path_button));
diff --git a/src/scan_dialog.c b/src/scan_dialog.c
index 8bf8681..ccfb2ba 100644
--- a/src/scan_dialog.c
+++ b/src/scan_dialog.c
@@ -2310,8 +2310,6 @@ create_scan_dialog (EtScanDialog *self)
 
     priv = et_scan_dialog_get_instance_private (self);
 
-    gtk_dialog_set_default_response (GTK_DIALOG (self), GTK_RESPONSE_APPLY);
-
     g_settings_bind_with_mapping (MainSettings, "scan-mode", priv->notebook,
                                   "page", G_SETTINGS_BIND_DEFAULT,
                                   et_settings_enum_get, et_settings_enum_set,
diff --git a/src/tag_area.c b/src/tag_area.c
index cee3207..71cad1f 100644
--- a/src/tag_area.c
+++ b/src/tag_area.c
@@ -1680,9 +1680,6 @@ on_picture_properties_button_clicked (GObject *object,
         gtk_window_set_transient_for (GTK_WINDOW (PictureTypesWindow),
                                       parent_window);
 
-        gtk_dialog_set_default_response (GTK_DIALOG (PictureTypesWindow),
-                                         GTK_RESPONSE_ACCEPT);
-
         store = gtk_list_store_new (PICTURE_TYPE_COLUMN_COUNT, G_TYPE_STRING,
                                     G_TYPE_INT);
         type = GTK_WIDGET (gtk_builder_get_object (builder, "types_view"));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]