[gnac/devel] Code refactoring



commit 78f55bbf6a93ea37f81b7f53f73cea6273af2f7b
Author: BenoÃt Dupasquier <bdupasqu src gnome org>
Date:   Wed Dec 7 17:33:18 2011 +0000

    Code refactoring

 data/profiles/ui/gnac-profiles-manager.xml    |  118 ++++++++++--
 data/profiles/ui/gnac-profiles-properties.xml |  173 ++++++++++++------
 data/ui/gnac-pref-window.xml                  |  178 ++++++++++++------
 data/ui/gnac-properties-window.xml            |  140 ++++++++++++--
 data/ui/gnac.xml                              |   80 ++++++--
 src/gnac-file-list.c                          |  165 ++++++-----------
 src/gnac-ui.c                                 |  250 +++++++++----------------
 src/gnac-ui.h                                 |    4 +
 src/profiles/gnac-profiles-manager.c          |   39 ++---
 src/profiles/gnac-profiles-manager.h          |    3 -
 src/profiles/gnac-profiles-properties.c       |   27 +--
 src/profiles/gnac-profiles.c                  |   67 ++-----
 src/profiles/gnac-profiles.h                  |    9 +-
 13 files changed, 712 insertions(+), 541 deletions(-)
---
diff --git a/data/profiles/ui/gnac-profiles-manager.xml b/data/profiles/ui/gnac-profiles-manager.xml
index 9d7019c..c49668f 100644
--- a/data/profiles/ui/gnac-profiles-manager.xml
+++ b/data/profiles/ui/gnac-profiles-manager.xml
@@ -1,6 +1,6 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <requires lib="gtk+" version="2.14"/>
+  <requires lib="gtk+" version="2.16"/>
   <!-- interface-naming-policy project-wide -->
   <object class="GtkListStore" id="liststore">
     <columns>
@@ -15,32 +15,37 @@
     </columns>
   </object>
   <object class="GtkWindow" id="profile_manager_window">
+    <property name="can_focus">False</property>
     <property name="title" translatable="yes">Profile Manager</property>
+    <property name="modal">True</property>
+    <property name="window_position">center-on-parent</property>
     <property name="default_width">400</property>
     <property name="default_height">400</property>
-    <property name="modal">True</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <signal name="key_press_event" handler="gnac_profiles_mgr_on_key_pressed"/>
-    <signal name="delete_event" handler="gnac_profiles_mgr_on_delete_event"/>
+    <property name="type_hint">dialog</property>
+    <signal name="key-press-event" handler="gnac_profiles_mgr_on_key_pressed" swapped="no"/>
+    <signal name="delete-event" handler="gnac_profiles_mgr_on_delete_event" swapped="no"/>
     <child>
       <object class="GtkVBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="border_width">12</property>
         <property name="spacing">6</property>
         <child>
           <object class="GtkFrame" id="frame-profiles-list">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="label_xalign">0</property>
             <property name="shadow_type">none</property>
             <child>
               <object class="GtkAlignment" id="alignment3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="top_padding">6</property>
                 <property name="left_padding">12</property>
                 <child>
                   <object class="GtkHBox" id="hbox4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkScrolledWindow" id="scrolledwindow">
@@ -55,20 +60,62 @@
                             <property name="can_focus">True</property>
                             <property name="model">liststore</property>
                             <property name="search_column">0</property>
-                            <signal name="drag_data_get" handler="gnac_profiles_mgr_on_drag_data_get"/>
-                            <signal name="key_press_event" handler="gnac_profiles_mgr_list_on_key_pressed"/>
-                            <signal name="row_activated" handler="gnac_profiles_mgr_on_edit"/>
-                            <signal name="drag_data_received" handler="gnac_profiles_mgr_on_drag_data_received"/>
+                            <signal name="drag-data-received" handler="gnac_profiles_mgr_on_drag_data_received" swapped="no"/>
+                            <signal name="key-press-event" handler="gnac_profiles_mgr_list_on_key_pressed" swapped="no"/>
+                            <signal name="drag-data-get" handler="gnac_profiles_mgr_on_drag_data_get" swapped="no"/>
+                            <signal name="row-activated" handler="gnac_profiles_mgr_on_edit" swapped="no"/>
+                            <child>
+                              <object class="GtkTreeViewColumn" id="treeviewcolumn1">
+                                <property name="title" translatable="yes">Name</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="cellrenderertext1">
+                                    <property name="ypad">6</property>
+                                  </object>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkTreeViewColumn" id="treeviewcolumn2">
+                                <property name="title" translatable="yes">Format</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="cellrenderertext2">
+                                    <property name="ypad">6</property>
+                                  </object>
+                                  <attributes>
+                                    <attribute name="text">1</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkTreeViewColumn" id="treeviewcolumn3">
+                                <property name="title" translatable="yes">Extension</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="cellrenderertext3">
+                                    <property name="ypad">6</property>
+                                  </object>
+                                  <attributes>
+                                    <attribute name="text">2</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                            </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="GtkVButtonBox" id="vbuttonbox4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">6</property>
                         <property name="layout_style">start</property>
                         <child>
@@ -77,11 +124,13 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_stock">True</property>
-                            <signal name="clicked" handler="gnac_profiles_mgr_on_add"/>
+                            <signal name="clicked" handler="gnac_profiles_mgr_on_add" swapped="no"/>
                           </object>
                           <packing>
                             <property name="expand">False</property>
+                            <property name="fill">False</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
@@ -92,11 +141,13 @@
                             <property name="sensitive">False</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_stock">True</property>
-                            <signal name="clicked" handler="gnac_profiles_mgr_on_copy"/>
+                            <signal name="clicked" handler="gnac_profiles_mgr_on_copy" swapped="no"/>
                           </object>
                           <packing>
                             <property name="expand">False</property>
+                            <property name="fill">False</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
@@ -107,11 +158,13 @@
                             <property name="sensitive">False</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_stock">True</property>
-                            <signal name="clicked" handler="gnac_profiles_mgr_on_edit"/>
+                            <signal name="clicked" handler="gnac_profiles_mgr_on_edit" swapped="no"/>
                           </object>
                           <packing>
                             <property name="expand">False</property>
+                            <property name="fill">False</property>
                             <property name="position">2</property>
                           </packing>
                         </child>
@@ -122,17 +175,20 @@
                             <property name="sensitive">False</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">True</property>
+                            <property name="use_action_appearance">False</property>
                             <property name="use_stock">True</property>
-                            <signal name="clicked" handler="gnac_profiles_mgr_on_remove"/>
+                            <signal name="clicked" handler="gnac_profiles_mgr_on_remove" swapped="no"/>
                           </object>
                           <packing>
                             <property name="expand">False</property>
+                            <property name="fill">False</property>
                             <property name="position">3</property>
                           </packing>
                         </child>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
@@ -143,6 +199,7 @@
             <child type="label">
               <object class="GtkLabel" id="label3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Profiles list</property>
                 <attributes>
                   <attribute name="weight" value="bold"/>
@@ -151,22 +208,27 @@
             </child>
           </object>
           <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
           <object class="GtkFrame" id="frame-description">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="label_xalign">0</property>
             <property name="shadow_type">none</property>
             <child>
               <object class="GtkAlignment" id="alignment1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="left_padding">12</property>
                 <property name="right_padding">12</property>
                 <child>
                   <object class="GtkLabel" id="label-description-content">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="ypad">5</property>
                     <property name="justify">fill</property>
@@ -181,6 +243,7 @@
             <child type="label">
               <object class="GtkLabel" id="label-description">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Profile description</property>
                 <attributes>
                   <attribute name="weight" value="bold"/>
@@ -196,11 +259,13 @@
         </child>
         <child>
           <object class="GtkFrame" id="frame-import">
+            <property name="can_focus">False</property>
             <property name="label_xalign">0</property>
             <property name="shadow_type">none</property>
             <child>
               <object class="GtkAlignment" id="alignment2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="top_padding">5</property>
                 <property name="bottom_padding">5</property>
                 <property name="left_padding">12</property>
@@ -208,6 +273,7 @@
                 <child>
                   <object class="GtkProgressBar" id="progressbar-import">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="show_text">True</property>
                   </object>
                 </child>
@@ -216,6 +282,7 @@
             <child type="label">
               <object class="GtkLabel" id="label-import">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Importing file...</property>
                 <attributes>
                   <attribute name="weight" value="bold"/>
@@ -232,24 +299,29 @@
         <child>
           <object class="GtkFrame" id="frame-status">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="label_xalign">0</property>
             <property name="shadow_type">none</property>
             <child>
               <object class="GtkAlignment" id="alignment4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="top_padding">5</property>
                 <property name="left_padding">12</property>
                 <property name="right_padding">12</property>
                 <child>
                   <object class="GtkVBox" id="vbox-status">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">3</property>
                     <child>
                       <object class="GtkHBox" id="hbox-status-ok">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkImage" id="image-status-ok">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="stock">gtk-apply</property>
                             <property name="icon-size">1</property>
                           </object>
@@ -262,6 +334,7 @@
                         <child>
                           <object class="GtkLabel" id="label-status-ok">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label">label</property>
                             <property name="wrap">True</property>
                           </object>
@@ -274,15 +347,19 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkHBox" id="hbox-status-error">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkImage" id="image-status-error">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="stock">gtk-dialog-error</property>
                             <property name="icon-size">1</property>
                           </object>
@@ -295,6 +372,7 @@
                         <child>
                           <object class="GtkLabel" id="label-status-error">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label">label</property>
                             <property name="wrap">True</property>
                           </object>
@@ -307,6 +385,8 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
@@ -317,6 +397,7 @@
             <child type="label">
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Status</property>
                 <attributes>
                   <attribute name="weight" value="bold"/>
@@ -333,6 +414,7 @@
         <child>
           <object class="GtkHButtonBox" id="hbuttonbox2">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
               <object class="GtkButton" id="close_button">
@@ -340,16 +422,20 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
-                <signal name="clicked" handler="gnac_profiles_mgr_on_close"/>
+                <signal name="clicked" handler="gnac_profiles_mgr_on_close" swapped="no"/>
               </object>
               <packing>
+                <property name="expand">False</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">4</property>
           </packing>
         </child>
diff --git a/data/profiles/ui/gnac-profiles-properties.xml b/data/profiles/ui/gnac-profiles-properties.xml
index d5185b7..0f9916c 100755
--- a/data/profiles/ui/gnac-profiles-properties.xml
+++ b/data/profiles/ui/gnac-profiles-properties.xml
@@ -1,47 +1,65 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <requires lib="gtk+" version="2.14"/>
+  <requires lib="gtk+" version="2.16"/>
   <!-- interface-naming-policy project-wide -->
+  <object class="GtkListStore" id="liststore1">
+    <columns>
+      <!-- column-name name -->
+      <column type="gchararray"/>
+      <!-- column-name format -->
+      <column type="gpointer"/>
+      <!-- column-name sort -->
+      <column type="gchararray"/>
+    </columns>
+  </object>
   <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
     <property name="resizable">False</property>
     <property name="modal">True</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <signal name="key_press_event" handler="gnac_profiles_properties_on_window_key_pressed"/>
-    <signal name="delete-event" handler="gtk_widget_hide"/>
+    <property name="window_position">center-on-parent</property>
+    <property name="type_hint">dialog</property>
+    <signal name="key-press-event" handler="gnac_profiles_properties_on_window_key_pressed" swapped="no"/>
+    <signal name="delete-event" handler="gtk_widget_hide" swapped="no"/>
     <child>
       <object class="GtkVBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="border_width">12</property>
         <property name="spacing">6</property>
         <child>
           <object class="GtkFrame" id="frame1">
             <property name="width_request">400</property>
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="label_xalign">0</property>
             <property name="shadow_type">none</property>
             <child>
               <object class="GtkAlignment" id="alignment1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="top_padding">6</property>
                 <property name="left_padding">12</property>
                 <child>
                   <object class="GtkVBox" id="vbox2">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</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>
                         <property name="homogeneous">True</property>
                         <child>
                           <object class="GtkLabel" id="label3">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Name</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
+                            <property name="fill">True</property>
                             <property name="position">0</property>
                           </packing>
                         </child>
@@ -49,27 +67,36 @@
                           <object class="GtkEntry" id="name_entry">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
-                            <signal name="key_press_event" handler="gnac_profiles_properties_on_name_entry_key_pressed"/>
+                            <property name="primary_icon_activatable">False</property>
+                            <property name="secondary_icon_activatable">False</property>
+                            <property name="primary_icon_sensitive">True</property>
+                            <property name="secondary_icon_sensitive">True</property>
+                            <signal name="key-press-event" handler="gnac_profiles_properties_on_name_entry_key_pressed" swapped="no"/>
                           </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="GtkLabel" id="label7">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="xalign">0</property>
                         <property name="yalign">0</property>
                         <property name="label" translatable="yes">Description</property>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
@@ -90,6 +117,8 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
@@ -100,6 +129,7 @@
             <child type="label">
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Profile informations</property>
                 <attributes>
                   <attribute name="weight" value="bold"/>
@@ -109,64 +139,82 @@
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">0</property>
           </packing>
         </child>
         <child>
           <object class="GtkFrame" id="frame2">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="label_xalign">0</property>
             <property name="shadow_type">none</property>
             <child>
               <object class="GtkAlignment" id="alignment2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="top_padding">6</property>
                 <property name="left_padding">12</property>
                 <child>
                   <object class="GtkVBox" id="vbox3">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">12</property>
                     <child>
                       <object class="GtkHBox" id="hbox3">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="spacing">6</property>
                         <property name="homogeneous">True</property>
                         <child>
                           <object class="GtkLabel" id="label6">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Format</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="format_combo_box">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="model">liststore1</property>
-                            <signal name="changed" handler="gnac_profiles_properties_combo_format_on_changed"/>
+                            <signal name="changed" handler="gnac_profiles_properties_combo_format_on_changed" swapped="no"/>
+                            <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">False</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkAlignment" id="alignment4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="left_padding">7</property>
                         <property name="right_padding">6</property>
                         <child>
                           <object class="GtkLabel" id="format_decription_label">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="label">Description</property>
                             <property name="justify">fill</property>
                             <property name="wrap">True</property>
@@ -178,18 +226,22 @@
                         </child>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkHBox" id="hbox_properties">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <placeholder/>
                         </child>
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">2</property>
                       </packing>
                     </child>
@@ -200,6 +252,7 @@
             <child type="label">
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Profile configuration</property>
                 <attributes>
                   <attribute name="weight" value="bold"/>
@@ -209,25 +262,75 @@
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
         <child>
+          <object class="GtkHButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="spacing">6</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="cancel-button">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="gnac_profiles_properties_on_cancel" swapped="no"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="save-button">
+                <property name="label">gtk-save</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_action_appearance">False</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>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+        <child>
           <object class="GtkAlignment" id="alignment-pipeline">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="left_padding">12</property>
             <child>
               <object class="GtkVBox" id="gstreamer_pipeline_box">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkLabel" id="label5">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">GStreamer pipeline</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
@@ -258,16 +361,20 @@
             </child>
           </object>
           <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
             <property name="position">3</property>
           </packing>
         </child>
         <child>
           <object class="GtkHBox" id="hbox-properties-status">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="spacing">10</property>
             <child>
               <object class="GtkImage" id="image-properties-status-error">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="stock">gtk-dialog-error</property>
                 <property name="icon-size">1</property>
               </object>
@@ -280,12 +387,15 @@
             <child>
               <object class="GtkLabel" id="label-properties-status-error">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="xalign">0</property>
                 <property name="label">label</property>
                 <property name="justify">fill</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>
@@ -298,54 +408,7 @@
             <property name="position">4</property>
           </packing>
         </child>
-        <child>
-          <object class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="spacing">6</property>
-            <property name="layout_style">end</property>
-            <child>
-              <object class="GtkButton" id="cancel-button">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="gnac_profiles_properties_on_cancel"/>
-              </object>
-              <packing>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkButton" id="save-button">
-                <property name="label">gtk-save</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="position">1</property>
-              </packing>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
       </object>
     </child>
   </object>
-  <object class="GtkListStore" id="liststore1">
-    <columns>
-      <!-- column-name name -->
-      <column type="gchararray"/>
-      <!-- column-name format -->
-      <column type="gpointer"/>
-      <!-- column-name sort -->
-      <column type="gchararray"/>
-    </columns>
-  </object>
 </interface>
diff --git a/data/ui/gnac-pref-window.xml b/data/ui/gnac-pref-window.xml
index 0f8f8c3..11bc9d0 100644
--- a/data/ui/gnac-pref-window.xml
+++ b/data/ui/gnac-pref-window.xml
@@ -2,41 +2,6 @@
 <interface>
   <requires lib="gtk+" version="2.16"/>
   <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkListStore" id="output_filename_model">
-    <columns>
-      <!-- column-name gchararray -->
-      <column type="gchararray"/>
-    </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">Source Filename</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Title</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Artist - Title</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Artist - Album - Title</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Number - Title</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Number - Artist - Title</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Number - Artist - Album - Title</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">Artist - Number - Title</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes" comments="Translators: this translation is problematic as gtkbuilder's translation contexts are not yet supported by intltool. The problem should be fixed in intltool 0.41.1. See https://bugs.launchpad.net/intltool/+bug/409781 for more details. In-between the contexts for this translation are 'Folder hierarchy: Custom' and 'Output filename: Custom'">Custom</col>
-      </row>
-    </data>
-  </object>
   <object class="GtkListStore" id="folder_hierarchy_model">
     <columns>
       <!-- column-name gchararray -->
@@ -67,6 +32,7 @@
     </data>
   </object>
   <object class="GtkWindow" id="gnac_preference_window">
+    <property name="can_focus">False</property>
     <property name="border_width">10</property>
     <property name="title" translatable="yes">Gnac Preferences</property>
     <property name="resizable">False</property>
@@ -76,11 +42,12 @@
     <property name="destroy_with_parent">True</property>
     <property name="icon_name">gnac</property>
     <property name="skip_taskbar_hint">True</property>
-    <signal name="destroy" handler="gtk_widget_hide_on_delete"/>
-    <signal name="delete_event" handler="gtk_widget_hide_on_delete"/>
+    <signal name="destroy" handler="gtk_widget_hide_on_delete" swapped="no"/>
+    <signal name="delete-event" handler="gtk_widget_hide_on_delete" swapped="no"/>
     <child>
       <object class="GtkVBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="spacing">6</property>
         <child>
           <object class="GtkNotebook" id="notebook">
@@ -89,27 +56,32 @@
             <child>
               <object class="GtkVBox" id="general">
                 <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="GtkFrame" id="display_frame">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
                     <child>
                       <object class="GtkAlignment" id="alignment2">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="top_padding">6</property>
                         <property name="left_padding">12</property>
                         <child>
                           <object class="GtkTable" id="table2">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <child>
                               <object class="GtkCheckButton" id="check_notification_icon">
                                 <property name="label" translatable="yes">Display a notification icon during the conversion</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
@@ -123,6 +95,7 @@
                     <child type="label">
                       <object class="GtkLabel" id="label4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Display</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
@@ -132,36 +105,43 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkFrame" id="conversion_frame">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
                     <child>
                       <object class="GtkAlignment" id="alignment1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="left_padding">12</property>
                         <child>
                           <object class="GtkVBox" id="vbox2">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">10</property>
                             <child>
                               <object class="GtkFrame" id="folder_frame">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="border_width">2</property>
                                 <property name="label_xalign">0</property>
                                 <property name="shadow_type">none</property>
                                 <child>
                                   <object class="GtkAlignment" id="alignment3">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="xalign">0.51999998092651367</property>
                                     <property name="left_padding">12</property>
                                     <child>
                                       <object class="GtkTable" id="table1">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
                                         <property name="n_rows">5</property>
                                         <property name="row_spacing">4</property>
                                         <child>
@@ -170,9 +150,10 @@
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">False</property>
+                                            <property name="use_action_appearance">False</property>
                                             <property name="draw_indicator">True</property>
                                             <property name="group">same_radiobutton</property>
-                                            <signal name="toggled" handler="gnac_prefs_subfolder_radio_toggled"/>
+                                            <signal name="toggled" handler="gnac_prefs_subfolder_radio_toggled" swapped="no"/>
                                           </object>
                                           <packing>
                                             <property name="top_attach">1</property>
@@ -183,11 +164,13 @@
                                         <child>
                                           <object class="GtkTable" id="table4">
                                             <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
                                             <property name="n_columns">2</property>
                                             <property name="homogeneous">True</property>
                                             <child>
                                               <object class="GtkLabel" id="selected_label">
                                                 <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
                                                 <property name="xalign">0</property>
                                                 <property name="xpad">22</property>
                                                 <property name="label" translatable="yes">Folder location:</property>
@@ -199,12 +182,14 @@
                                             <child>
                                               <object class="GtkEventBox" id="selected_eventbox">
                                                 <property name="visible">True</property>
-                                                <signal name="button_press_event" handler="gnac_prefs_button_press_event_cb" object="selected_radiobutton"/>
+                                                <property name="can_focus">False</property>
+                                                <signal name="button-press-event" handler="gnac_prefs_button_press_event_cb" object="selected_radiobutton" swapped="yes"/>
                                                 <child>
                                                   <object class="GtkFileChooserButton" id="filechooserbutton">
                                                     <property name="visible">True</property>
+                                                    <property name="can_focus">False</property>
                                                     <property name="action">select-folder</property>
-                                                    <signal name="selection_changed" handler="gnac_prefs_selected_uri_changed"/>
+                                                    <signal name="selection-changed" handler="gnac_prefs_selected_uri_changed" swapped="no"/>
                                                   </object>
                                                 </child>
                                               </object>
@@ -223,11 +208,13 @@
                                         <child>
                                           <object class="GtkTable" id="table3">
                                             <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
                                             <property name="n_columns">2</property>
                                             <property name="homogeneous">True</property>
                                             <child>
                                               <object class="GtkLabel" id="subfolder_label">
                                                 <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
                                                 <property name="xalign">0</property>
                                                 <property name="xpad">22</property>
                                                 <property name="label" translatable="yes">Subfolder name:</property>
@@ -240,14 +227,19 @@
                                             <child>
                                               <object class="GtkEventBox" id="subfolder_eventbox">
                                                 <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
                                                 <property name="above_child">True</property>
-                                                <signal name="button_press_event" handler="gnac_prefs_button_press_event_cb" object="subfolder_radiobutton"/>
+                                                <signal name="button-press-event" handler="gnac_prefs_button_press_event_cb" object="subfolder_radiobutton" swapped="yes"/>
                                                 <child>
                                                   <object class="GtkEntry" id="subfolder_entry">
                                                     <property name="visible">True</property>
                                                     <property name="can_focus">True</property>
                                                     <property name="caps_lock_warning">False</property>
-                                                    <signal name="changed" handler="gnac_prefs_subfolder_editing_done"/>
+                                                    <property name="primary_icon_activatable">False</property>
+                                                    <property name="secondary_icon_activatable">False</property>
+                                                    <property name="primary_icon_sensitive">True</property>
+                                                    <property name="secondary_icon_sensitive">True</property>
+                                                    <signal name="changed" handler="gnac_prefs_subfolder_editing_done" swapped="no"/>
                                                   </object>
                                                 </child>
                                               </object>
@@ -270,9 +262,10 @@
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">False</property>
+                                            <property name="use_action_appearance">False</property>
                                             <property name="draw_indicator">True</property>
                                             <property name="group">same_radiobutton</property>
-                                            <signal name="toggled" handler="gnac_prefs_selected_radio_toggled"/>
+                                            <signal name="toggled" handler="gnac_prefs_selected_radio_toggled" swapped="no"/>
                                           </object>
                                           <packing>
                                             <property name="top_attach">3</property>
@@ -286,9 +279,10 @@
                                             <property name="visible">True</property>
                                             <property name="can_focus">True</property>
                                             <property name="receives_default">False</property>
+                                            <property name="use_action_appearance">False</property>
                                             <property name="active">True</property>
                                             <property name="draw_indicator">True</property>
-                                            <signal name="toggled" handler="gnac_prefs_same_radio_toggled"/>
+                                            <signal name="toggled" handler="gnac_prefs_same_radio_toggled" swapped="no"/>
                                           </object>
                                           <packing>
                                             <property name="y_options">GTK_FILL</property>
@@ -301,11 +295,14 @@
                                 <child type="label">
                                   <object class="GtkLabel" id="label5">
                                     <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
                                     <property name="label" translatable="yes">Output folder:</property>
                                   </object>
                                 </child>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="padding">3</property>
                                 <property name="position">0</property>
                               </packing>
@@ -316,10 +313,13 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="gnac_prefs_strip_special_toggled"/>
+                                <signal name="toggled" handler="gnac_prefs_strip_special_toggled" swapped="no"/>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
@@ -329,9 +329,12 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
+                                <property name="use_action_appearance">False</property>
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">2</property>
                               </packing>
                             </child>
@@ -342,6 +345,7 @@
                     <child type="label">
                       <object class="GtkLabel" id="conversion_frame_label">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">Conversion</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
@@ -351,6 +355,7 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="padding">6</property>
                     <property name="position">1</property>
                   </packing>
@@ -360,6 +365,7 @@
             <child type="tab">
               <object class="GtkLabel" id="plabel1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">General</property>
               </object>
               <packing>
@@ -369,22 +375,26 @@
             <child>
               <object class="GtkVBox" id="audio">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="extension_events">all</property>
                 <property name="border_width">6</property>
                 <property name="spacing">6</property>
                 <child>
                   <object class="GtkFrame" id="frame1">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="label_xalign">0</property>
                     <property name="shadow_type">none</property>
                     <child>
                       <object class="GtkAlignment" id="alignment4">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="top_padding">6</property>
                         <property name="left_padding">12</property>
                         <child>
                           <object class="GtkTable" id="table5">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="n_rows">5</property>
                             <property name="n_columns">2</property>
                             <property name="row_spacing">2</property>
@@ -392,6 +402,7 @@
                             <child>
                               <object class="GtkLabel" id="label6">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
                                 <property name="xpad">8</property>
                                 <property name="label" translatable="yes">Output filename:</property>
@@ -406,8 +417,9 @@
                             <child>
                               <object class="GtkComboBox" id="output_filename_combo">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="model">output_filename_model</property>
-                                <signal name="changed" handler="gnac_prefs_pattern_changed_cb"/>
+                                <signal name="changed" handler="gnac_prefs_pattern_changed_cb" swapped="no"/>
                                 <child>
                                   <object class="GtkCellRendererText" id="renderer1"/>
                                   <attributes>
@@ -426,6 +438,7 @@
                             <child>
                               <object class="GtkLabel" id="label2">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="xalign">0</property>
                                 <property name="xpad">8</property>
                                 <property name="label" translatable="yes">Folder hierarchy:</property>
@@ -438,8 +451,9 @@
                             <child>
                               <object class="GtkComboBox" id="folder_hierarchy_combo">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="model">folder_hierarchy_model</property>
-                                <signal name="changed" handler="gnac_prefs_folder_hierarchy_changed_cb"/>
+                                <signal name="changed" handler="gnac_prefs_folder_hierarchy_changed_cb" swapped="no"/>
                                 <child>
                                   <object class="GtkCellRendererText" id="renderer2"/>
                                   <attributes>
@@ -456,11 +470,12 @@
                             <child>
                               <object class="GtkLabel" id="example_label">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="xalign">0.94999998807907104</property>
                                 <property name="ellipsize">start</property>
                                 <attributes>
                                   <attribute name="style" value="italic"/>
-                                  <attribute name="scale" value="0.800000"/>
+                                  <attribute name="scale" value="0.80000000000000004"/>
                                 </attributes>
                               </object>
                               <packing>
@@ -473,16 +488,21 @@
                             <child>
                               <object class="GtkEventBox" id="output_filename_eventbox">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="has_tooltip">True</property>
                                 <property name="above_child">True</property>
-                                <signal name="button_press_event" handler="gnac_prefs_button_press_event_cb" object="output_filename_combo"/>
-                                <signal name="query_tooltip" handler="gnac_prefs_query_tooltip_cb"/>
+                                <signal name="button-press-event" handler="gnac_prefs_button_press_event_cb" object="output_filename_combo" swapped="yes"/>
+                                <signal name="query-tooltip" handler="gnac_prefs_query_tooltip_cb" swapped="no"/>
                                 <child>
                                   <object class="GtkEntry" id="output_filename_entry">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="caps_lock_warning">False</property>
-                                    <signal name="changed" handler="gnac_prefs_update_example_label"/>
+                                    <property name="primary_icon_activatable">False</property>
+                                    <property name="secondary_icon_activatable">False</property>
+                                    <property name="primary_icon_sensitive">True</property>
+                                    <property name="secondary_icon_sensitive">True</property>
+                                    <signal name="changed" handler="gnac_prefs_update_example_label" swapped="no"/>
                                   </object>
                                 </child>
                               </object>
@@ -496,16 +516,21 @@
                             <child>
                               <object class="GtkEventBox" id="folder_hierarchy_eventbox">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="has_tooltip">True</property>
                                 <property name="above_child">True</property>
-                                <signal name="button_press_event" handler="gnac_prefs_button_press_event_cb" object="folder_hierarchy_combo"/>
-                                <signal name="query_tooltip" handler="gnac_prefs_query_tooltip_cb"/>
+                                <signal name="button-press-event" handler="gnac_prefs_button_press_event_cb" object="folder_hierarchy_combo" swapped="yes"/>
+                                <signal name="query-tooltip" handler="gnac_prefs_query_tooltip_cb" swapped="no"/>
                                 <child>
                                   <object class="GtkEntry" id="folder_hierarchy_entry">
                                     <property name="visible">True</property>
                                     <property name="can_focus">True</property>
                                     <property name="caps_lock_warning">False</property>
-                                    <signal name="changed" handler="gnac_prefs_update_example_label"/>
+                                    <property name="primary_icon_activatable">False</property>
+                                    <property name="secondary_icon_activatable">False</property>
+                                    <property name="primary_icon_sensitive">True</property>
+                                    <property name="secondary_icon_sensitive">True</property>
+                                    <signal name="changed" handler="gnac_prefs_update_example_label" swapped="no"/>
                                   </object>
                                 </child>
                               </object>
@@ -529,6 +554,7 @@
                     <child type="label">
                       <object class="GtkLabel" id="label1">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <property name="label" translatable="yes">File and folder naming</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
@@ -550,6 +576,7 @@
             <child type="tab">
               <object class="GtkLabel" id="plabel2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Audio</property>
               </object>
               <packing>
@@ -559,16 +586,20 @@
             </child>
           </object>
           <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
             <property name="position">0</property>
           </packing>
         </child>
         <child>
           <object class="GtkAlignment" id="alignment5">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="top_padding">6</property>
             <child>
               <object class="GtkHButtonBox" id="hbuttonbox1">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="layout_style">end</property>
                 <child>
                   <object class="GtkButton" id="apply_button">
@@ -576,8 +607,9 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_stock">True</property>
-                    <signal name="clicked" handler="gnac_prefs_on_close"/>
+                    <signal name="clicked" handler="gnac_prefs_on_close" swapped="no"/>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -590,10 +622,46 @@
           </object>
           <packing>
             <property name="expand">False</property>
+            <property name="fill">True</property>
             <property name="position">1</property>
           </packing>
         </child>
       </object>
     </child>
   </object>
+  <object class="GtkListStore" id="output_filename_model">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Source Filename</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Title</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Artist - Title</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Artist - Album - Title</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Number - Title</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Number - Artist - Title</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Number - Artist - Album - Title</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Artist - Number - Title</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes" comments="Translators: this translation is problematic as gtkbuilder's translation contexts are not yet supported by intltool. The problem should be fixed in intltool 0.41.1. See https://bugs.launchpad.net/intltool/+bug/409781 for more details. In-between the contexts for this translation are 'Folder hierarchy: Custom' and 'Output filename: Custom'">Custom</col>
+      </row>
+    </data>
+  </object>
 </interface>
diff --git a/data/ui/gnac-properties-window.xml b/data/ui/gnac-properties-window.xml
index 45e2343..48eccf0 100644
--- a/data/ui/gnac-properties-window.xml
+++ b/data/ui/gnac-properties-window.xml
@@ -2,6 +2,21 @@
 <interface>
   <requires lib="gtk+" version="2.16"/>
   <!-- interface-naming-policy project-wide -->
+  <object class="GtkAdjustment" id="adjustment_date">
+    <property name="step_increment">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment_dc">
+    <property name="step_increment">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment_dn">
+    <property name="step_increment">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment_tc">
+    <property name="step_increment">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment_tn">
+    <property name="step_increment">1</property>
+  </object>
   <object class="GtkListStore" id="properties_store">
     <columns>
       <!-- column-name property_name -->
@@ -15,14 +30,16 @@
     </columns>
   </object>
   <object class="GtkWindow" id="properties_window">
+    <property name="can_focus">False</property>
     <property name="resizable">False</property>
     <property name="destroy_with_parent">True</property>
+    <property name="type_hint">dialog</property>
     <property name="skip_taskbar_hint">True</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <signal name="delete_event" handler="gnac_properties_on_delete_event"/>
+    <signal name="delete-event" handler="gnac_properties_on_delete_event" swapped="no"/>
     <child>
       <object class="GtkVBox" id="vbox1">
         <property name="visible">True</property>
+        <property name="can_focus">False</property>
         <property name="border_width">12</property>
         <property name="spacing">6</property>
         <child>
@@ -32,18 +49,22 @@
             <child>
               <object class="GtkHBox" id="hbox2">
                 <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="GtkVBox" id="vbox4">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkVBox" id="vbox27">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkLabel" id="label40">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Title:</property>
                           </object>
@@ -58,8 +79,13 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="editable">False</property>
+                            <property name="primary_icon_activatable">False</property>
+                            <property name="secondary_icon_activatable">False</property>
+                            <property name="primary_icon_sensitive">True</property>
+                            <property name="secondary_icon_sensitive">True</property>
                           </object>
                           <packing>
+                            <property name="expand">True</property>
                             <property name="fill">False</property>
                             <property name="position">1</property>
                           </packing>
@@ -74,9 +100,11 @@
                     <child>
                       <object class="GtkVBox" id="vbox26">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkLabel" id="label39">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Artist:</property>
                           </object>
@@ -91,6 +119,10 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="editable">False</property>
+                            <property name="primary_icon_activatable">False</property>
+                            <property name="secondary_icon_activatable">False</property>
+                            <property name="primary_icon_sensitive">True</property>
+                            <property name="secondary_icon_sensitive">True</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -108,9 +140,11 @@
                     <child>
                       <object class="GtkVBox" id="vbox25">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkLabel" id="label38">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Album:</property>
                           </object>
@@ -125,9 +159,14 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="editable">False</property>
+                            <property name="primary_icon_activatable">False</property>
+                            <property name="secondary_icon_activatable">False</property>
+                            <property name="primary_icon_sensitive">True</property>
+                            <property name="secondary_icon_sensitive">True</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
+                            <property name="fill">True</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
@@ -141,9 +180,11 @@
                     <child>
                       <object class="GtkVBox" id="vbox24">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkLabel" id="label37">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Genre:</property>
                           </object>
@@ -158,6 +199,10 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="editable">False</property>
+                            <property name="primary_icon_activatable">False</property>
+                            <property name="secondary_icon_activatable">False</property>
+                            <property name="primary_icon_sensitive">True</property>
+                            <property name="secondary_icon_sensitive">True</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -175,9 +220,11 @@
                     <child>
                       <object class="GtkVBox" id="vbox23">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkLabel" id="label36">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Comment:</property>
                           </object>
@@ -192,6 +239,10 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="editable">False</property>
+                            <property name="primary_icon_activatable">False</property>
+                            <property name="secondary_icon_activatable">False</property>
+                            <property name="primary_icon_sensitive">True</property>
+                            <property name="secondary_icon_sensitive">True</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -209,28 +260,34 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
+                    <property name="fill">True</property>
                     <property name="position">0</property>
                   </packing>
                 </child>
                 <child>
                   <object class="GtkVSeparator" id="vseparator1">
                     <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>
                 <child>
                   <object class="GtkVBox" id="vbox5">
                     <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <property name="spacing">6</property>
                     <child>
                       <object class="GtkVBox" id="vbox11">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkLabel" id="label23">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Track number:</property>
                           </object>
@@ -243,6 +300,7 @@
                         <child>
                           <object class="GtkHBox" id="hbox8">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkSpinButton" id="track-number">
@@ -250,19 +308,28 @@
                                 <property name="can_focus">True</property>
                                 <property name="editable">False</property>
                                 <property name="max_length">2</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
                                 <property name="adjustment">adjustment_tn</property>
                                 <property name="update_policy">if-valid</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="label26">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="label" translatable="yes" comments="Translators: track 1 of 6">of</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
@@ -272,10 +339,16 @@
                                 <property name="can_focus">True</property>
                                 <property name="editable">False</property>
                                 <property name="max_length">2</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
                                 <property name="adjustment">adjustment_tc</property>
                                 <property name="update_policy">if-valid</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">2</property>
                               </packing>
                             </child>
@@ -289,15 +362,18 @@
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkVBox" id="vbox12">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkLabel" id="label24">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Disc number:</property>
                           </object>
@@ -310,6 +386,7 @@
                         <child>
                           <object class="GtkHBox" id="hbox9">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkSpinButton" id="album-disc-number">
@@ -317,19 +394,28 @@
                                 <property name="can_focus">True</property>
                                 <property name="editable">False</property>
                                 <property name="max_length">2</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
                                 <property name="adjustment">adjustment_dn</property>
                                 <property name="update_policy">if-valid</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="label27">
                                 <property name="visible">True</property>
+                                <property name="can_focus">False</property>
                                 <property name="label" translatable="yes">of</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
@@ -339,10 +425,16 @@
                                 <property name="can_focus">True</property>
                                 <property name="editable">False</property>
                                 <property name="max_length">2</property>
+                                <property name="primary_icon_activatable">False</property>
+                                <property name="secondary_icon_activatable">False</property>
+                                <property name="primary_icon_sensitive">True</property>
+                                <property name="secondary_icon_sensitive">True</property>
                                 <property name="adjustment">adjustment_dc</property>
                                 <property name="update_policy">if-valid</property>
                               </object>
                               <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
                                 <property name="position">2</property>
                               </packing>
                             </child>
@@ -356,15 +448,18 @@
                       </object>
                       <packing>
                         <property name="expand">False</property>
+                        <property name="fill">True</property>
                         <property name="position">1</property>
                       </packing>
                     </child>
                     <child>
                       <object class="GtkVBox" id="vbox13">
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                         <child>
                           <object class="GtkLabel" id="label25">
                             <property name="visible">True</property>
+                            <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Year:</property>
                           </object>
@@ -381,6 +476,10 @@
                             <property name="editable">False</property>
                             <property name="max_length">4</property>
                             <property name="width_chars">4</property>
+                            <property name="primary_icon_activatable">False</property>
+                            <property name="secondary_icon_activatable">False</property>
+                            <property name="primary_icon_sensitive">True</property>
+                            <property name="secondary_icon_sensitive">True</property>
                             <property name="adjustment">adjustment_date</property>
                             <property name="update_policy">if-valid</property>
                           </object>
@@ -402,8 +501,11 @@
                         <property name="width_request">98</property>
                         <property name="height_request">98</property>
                         <property name="visible">True</property>
+                        <property name="can_focus">False</property>
                       </object>
                       <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
                         <property name="position">3</property>
                       </packing>
                     </child>
@@ -419,6 +521,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label2">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes" comments="Translators: Basic properties">Basic</property>
               </object>
               <packing>
@@ -451,6 +554,7 @@
             <child type="tab">
               <object class="GtkLabel" id="label3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Properties</property>
               </object>
               <packing>
@@ -471,10 +575,12 @@
         <child>
           <object class="GtkHBox" id="hbox16">
             <property name="visible">True</property>
+            <property name="can_focus">False</property>
             <property name="spacing">6</property>
             <child>
               <object class="GtkHButtonBox" id="hbuttonbox3">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="spacing">6</property>
                 <property name="layout_style">start</property>
                 <child>
@@ -483,8 +589,9 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_stock">True</property>
-                    <signal name="clicked" handler="gnac_properties_on_back"/>
+                    <signal name="clicked" handler="gnac_properties_on_back" swapped="no"/>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -498,8 +605,9 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_stock">True</property>
-                    <signal name="clicked" handler="gnac_properties_on_forward"/>
+                    <signal name="clicked" handler="gnac_properties_on_forward" swapped="no"/>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -509,12 +617,15 @@
                 </child>
               </object>
               <packing>
+                <property name="expand">True</property>
+                <property name="fill">True</property>
                 <property name="position">0</property>
               </packing>
             </child>
             <child>
               <object class="GtkHButtonBox" id="hbuttonbox4">
                 <property name="visible">True</property>
+                <property name="can_focus">False</property>
                 <property name="spacing">6</property>
                 <property name="layout_style">end</property>
                 <child>
@@ -523,8 +634,9 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
                     <property name="use_stock">True</property>
-                    <signal name="clicked" handler="gnac_properties_on_close"/>
+                    <signal name="clicked" handler="gnac_properties_on_close" swapped="no"/>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -534,12 +646,15 @@
                 </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">False</property>
+            <property name="fill">True</property>
             <property name="pack_type">end</property>
             <property name="position">1</property>
           </packing>
@@ -547,19 +662,4 @@
       </object>
     </child>
   </object>
-  <object class="GtkAdjustment" id="adjustment_tn">
-    <property name="step_increment">1</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment_date">
-    <property name="step_increment">1</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment_tc">
-    <property name="step_increment">1</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment_dn">
-    <property name="step_increment">1</property>
-  </object>
-  <object class="GtkAdjustment" id="adjustment_dc">
-    <property name="step_increment">1</property>
-  </object>
 </interface>
diff --git a/data/ui/gnac.xml b/data/ui/gnac.xml
index 39f2275..4ccfaa0 100644
--- a/data/ui/gnac.xml
+++ b/data/ui/gnac.xml
@@ -197,12 +197,20 @@
       </popup>
     </ui>
   </object>
+  <object class="GtkListStore" id="profiles_liststore">
+    <columns>
+      <!-- column-name Name -->
+      <column type="gchararray"/>
+      <!-- column-name Profile -->
+      <column type="gpointer"/>
+    </columns>
+  </object>
   <object class="GtkMenu" constructor="uimanager1" id="main_popup">
   </object>
   <object class="GtkMenu" constructor="uimanager1" id="tray_popup">
   </object>
   <object class="GtkWindow" id="main_window">
-    <property name="window_position">GTK_WIN_POS_CENTER</property>
+    <property name="window_position">center</property>
     <property name="default_width">500</property>
     <property name="default_height">500</property>
     <property name="icon_name">gnac</property>
@@ -234,20 +242,22 @@
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="border_width">5</property>
-            <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <property name="shadow_type">GTK_SHADOW_IN</property>
+            <property name="hscrollbar_policy">automatic</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <property name="shadow_type">in</property>
             <child>
               <object class="GtkTreeView" id="file_list">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="rules_hint">True</property>
+                <property name="tooltip_column">3</property>
                 <property name="headers_visible">False</property>
                 <property name="headers_clickable">False</property>
                 <property name="enable_search">False</property>
-                <signal handler="gnac_file_list_popup_menu" name="popup_menu"/>
-                <signal handler="gnac_file_list_on_button_pressed" name="button_press_event"/>
-                <signal handler="gnac_file_list_on_row_activated_cb" name="row_activated"/>
-                <signal handler="gnac_ui_on_drag_data_received_cb" name="drag_data_received"/>
+                <signal name="button-press-event" handler="gnac_file_list_on_button_pressed" swapped="no"/>
+                <signal name="drag-data-received" handler="gnac_ui_on_drag_data_received_cb" swapped="no"/>
+                <signal name="row-activated" handler="gnac_file_list_on_row_activated_cb" swapped="no"/>
+                <signal name="popup-menu" handler="gnac_file_list_popup_menu" swapped="no"/>
               </object>
             </child>
           </object>
@@ -263,21 +273,53 @@
               <object class="GtkHBox" id="audio_profile_hbox">
                 <property name="visible">True</property>
                 <child>
-                  <placeholder/>
+                  <object class="GtkComboBox" id="combo_profile">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="model">profiles_liststore</property>
+                    <signal name="changed" handler="gnac_profiles_on_combo_profile_changed" swapped="no"/>
+                    <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">0</property>
+                  </packing>
                 </child>
                 <child>
-                  <placeholder/>
+                  <object class="GtkButton" id="edit_profiles_btn">
+                    <property name="label">gtk-edit</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_stock">True</property>
+                    <signal name="clicked" handler="gnac_profiles_mgr_show" swapped="no"/>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="padding">6</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="GtkHButtonBox" id="hbuttonbox2">
                 <property name="visible">True</property>
                 <property name="spacing">6</property>
-                <property name="layout_style">GTK_BUTTONBOX_END</property>
+                <property name="layout_style">end</property>
                 <child>
                   <object class="GtkButton" id="pause_button">
                     <property name="sensitive">False</property>
@@ -286,12 +328,12 @@
                     <property name="receives_default">True</property>
                     <property name="label">gtk-media-pause</property>
                     <property name="use_stock">True</property>
-                    <signal handler="gnac_on_ui_pause_cb" name="clicked"/>
+                    <signal name="clicked" handler="gnac_on_ui_pause_cb" swapped="no"/>
                   </object>
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">False</property>
-                    <property name="pack_type">GTK_PACK_END</property>
+                    <property name="pack_type">end</property>
                   </packing>
                 </child>
                 <child>
@@ -306,12 +348,12 @@
                   </object>
                   <packing>
                     <property name="expand">False</property>
-                    <property name="pack_type">GTK_PACK_END</property>
+                    <property name="pack_type">end</property>
                   </packing>
                 </child>
               </object>
               <packing>
-                <property name="pack_type">GTK_PACK_END</property>
+                <property name="pack_type">end</property>
                 <property name="position">1</property>
               </packing>
             </child>
@@ -340,7 +382,7 @@
                 <property name="has_resize_grip">True</property>
               </object>
               <packing>
-                <property name="pack_type">GTK_PACK_END</property>
+                <property name="pack_type">end</property>
                 <property name="expand">True</property>
                 <property name="position">1</property>
               </packing>
@@ -359,8 +401,8 @@
     <property name="border_width">5</property>
     <property name="title" translatable="yes">About Gnac</property>
     <property name="resizable">False</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="type_hint">dialog</property>
     <property name="transient_for">main_window</property>
     <property name="has_separator">False</property>
     <property name="program_name">Gnac</property>
@@ -399,7 +441,7 @@ Alexandre Roux &lt;alexroux src gnome org&gt;</property>
           </object>
           <packing>
             <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
+            <property name="pack_type">end</property>
           </packing>
         </child>
       </object>
diff --git a/src/gnac-file-list.c b/src/gnac-file-list.c
index c62ec57..cf3c4ae 100644
--- a/src/gnac-file-list.c
+++ b/src/gnac-file-list.c
@@ -119,17 +119,13 @@ gnac_file_list_selection_changed_cb(GtkTreeSelection *selection,
 GtkWidget *
 gnac_file_list_new(void)
 {
-  GtkCellRenderer   *renderer;
-  GtkTreeViewColumn *column;
-
-  reference_table = g_hash_table_new_full(g_str_hash, g_str_equal,
-      g_free, (GDestroyNotify) gtk_tree_row_reference_free);
-
   view = GTK_TREE_VIEW(gnac_ui_get_widget("file_list"));
-  gtk_tree_view_set_tooltip_column(view, COL_TOOLTIP);
-
   model = GTK_TREE_MODEL(gtk_list_store_new(NUM_COLS, 
       G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING));
+  reference_table = g_hash_table_new_full(g_str_hash, g_str_equal,
+      g_free, (GDestroyNotify) gtk_tree_row_reference_free);
+
+  GtkCellRenderer *renderer;
 
   renderer = gtk_cell_renderer_pixbuf_new();
   gtk_tree_view_insert_column_with_data_func(view, -1,
@@ -141,10 +137,11 @@ gnac_file_list_new(void)
       "Filelist", renderer, "text", COL_DISPLAY, NULL);
 
   gtk_tree_view_set_model(view, model);
-  gtk_tree_view_set_rules_hint(view, TRUE);
   
+  GtkTreeViewColumn *column;
+
   column = gtk_tree_view_get_column(view, COL_URI);
-  gtk_tree_view_column_set_sort_column_id(column,COL_URI);
+  gtk_tree_view_column_set_sort_column_id(column, COL_URI);
   gtk_tree_view_column_clicked(column);
 
   column = gtk_tree_view_get_column(view, COL_STOCK);
@@ -182,28 +179,22 @@ gnac_file_list_add_row(const gchar *uri)
 {
   g_return_if_fail(uri);
 
-  gchar *display;
-  GtkTreeIter iter;
-  GtkTreePath *path = NULL;
-  GtkTreeRowReference *ref = NULL;
-
-  display = gnac_utils_get_display_name(uri, NULL); 
+  gchar *name = gnac_utils_get_display_name(uri, NULL);
 
+  GtkTreeIter iter;
   gtk_list_store_append(GTK_LIST_STORE(model), &iter);
   gtk_list_store_set(GTK_LIST_STORE(model), &iter,
-      COL_URI, uri,
-      COL_DISPLAY, display,
-      -1);
+      COL_URI, uri, COL_DISPLAY, name, -1);
 
-  g_free(display);
+  g_free(name);
 
-  path = gtk_tree_model_get_path(model, &iter);
+  GtkTreePath *path = gtk_tree_model_get_path(model, &iter);
   if (!path) {
     libgnac_debug("Unable to create path");
     return;
   }
 
-  ref = gtk_tree_row_reference_new(model, path);
+  GtkTreeRowReference *ref = gtk_tree_row_reference_new(model, path);
   g_hash_table_insert(reference_table, g_strdup(uri), ref);
 
   gtk_tree_path_free(path);
@@ -216,10 +207,8 @@ gnac_file_list_get(GtkTreeRowReference  *reference,
 {
   g_return_val_if_fail(reference, FALSE);
 
-  GtkTreeIter  iter;
-  GtkTreePath *path = NULL;
-
-  path = gtk_tree_row_reference_get_path(reference);
+  GtkTreeIter iter;
+  GtkTreePath *path = gtk_tree_row_reference_get_path(reference);
   
   if (path) {
     gboolean path_exists = gtk_tree_model_get_iter(model, &iter, path);
@@ -240,20 +229,17 @@ gnac_file_list_get(GtkTreeRowReference  *reference,
 void 
 gnac_file_list_remove_row(const gchar *uri)
 {
-  GtkTreeIter          iter;
-  GtkTreePath         *path;
-  GtkTreeRowReference *ref = NULL;
-  GtkTreeRowReference *new_ref = NULL;
-
-  ref = g_hash_table_lookup(reference_table, uri);
+  GtkTreeRowReference *ref = g_hash_table_lookup(reference_table, uri);
   g_return_if_fail(ref);
 
-  path = gtk_tree_row_reference_get_path(ref);
+  GtkTreePath *path = gtk_tree_row_reference_get_path(ref);
   if (!path) {
     g_hash_table_remove(reference_table, uri);
     return;
   }
 
+  GtkTreeRowReference *new_ref;
+
   if (gnac_file_list_has_next_row(ref)) {
     new_ref = gtk_tree_row_reference_copy(ref);
     gnac_file_list_get_next_row(&new_ref);
@@ -262,6 +248,7 @@ gnac_file_list_remove_row(const gchar *uri)
     gnac_file_list_get_prev_row(&new_ref);
   }
 
+  GtkTreeIter iter;
   if (gtk_tree_model_get_iter(model, &iter, path)) {
     gtk_list_store_remove(GTK_LIST_STORE(model), &iter);
   }
@@ -291,13 +278,11 @@ gnac_file_list_remove_all(void)
 GList *
 gnac_file_list_get_selected_rows(void)
 {
+
+  GList *row_path = gtk_tree_selection_get_selected_rows(selection, &model);
+  GList *next = row_path;
   GList *row_references = NULL;
-  GList *row_path;
-  GList *next;
 
-  row_path = gtk_tree_selection_get_selected_rows(selection, &model);
-  
-  next = row_path;
   while (next) {
     row_references = g_list_prepend(row_references, 
         gtk_tree_row_reference_new(model, next->data));
@@ -315,11 +300,9 @@ gnac_file_list_get_selected_rows(void)
 gboolean
 gnac_file_list_get_current_row(GtkTreeRowReference **reference)
 {
-  GList *rows_path;
-
   gtk_tree_row_reference_free(*reference);
 
-  rows_path = gtk_tree_selection_get_selected_rows(selection, &model);
+  GList *rows_path = gtk_tree_selection_get_selected_rows(selection, &model);
 
   /* select the first selected row*/
   *reference = gtk_tree_row_reference_new(model, (GtkTreePath*)(rows_path->data));
@@ -335,16 +318,12 @@ gnac_file_list_has_next_row(GtkTreeRowReference *reference)
 {
   g_return_val_if_fail(reference, FALSE);
 
-  GtkTreePath         *path;
-  GtkTreeRowReference *temp;
-  gboolean             has_next_row;
-
-  path = gtk_tree_row_reference_get_path(reference);
+  GtkTreePath *path = gtk_tree_row_reference_get_path(reference);
   if (!path) return FALSE;
 
   gtk_tree_path_next(path);
-  temp = gtk_tree_row_reference_new(model, path);
-  has_next_row = gtk_tree_row_reference_valid(temp);
+  GtkTreeRowReference *temp = gtk_tree_row_reference_new(model, path);
+  gboolean has_next_row = gtk_tree_row_reference_valid(temp);
 
   gtk_tree_row_reference_free(temp);
   gtk_tree_path_free(path);
@@ -358,14 +337,10 @@ gnac_file_list_has_prev_row(GtkTreeRowReference *reference)
 {
   g_return_val_if_fail(reference, FALSE);
 
-  GtkTreePath *path;
-  GtkTreePath *first;
-  gboolean     has_prev_row;
-
-  first = gtk_tree_path_new_first();
-  path = gtk_tree_row_reference_get_path(reference);
+  GtkTreePath *first = gtk_tree_path_new_first();
+  GtkTreePath *path = gtk_tree_row_reference_get_path(reference);
 
-  has_prev_row = path && gtk_tree_path_compare(path, first) != 0;
+  gboolean has_prev_row = path && gtk_tree_path_compare(path, first) != 0;
 
   gtk_tree_path_free(path);
   gtk_tree_path_free(first);
@@ -379,13 +354,10 @@ gnac_file_list_get_next_row(GtkTreeRowReference **reference)
 {
   g_return_val_if_fail(*reference, FALSE);
 
-  GtkTreePath *path;
-
-  path = gtk_tree_row_reference_get_path(*reference);
+  GtkTreePath *path = gtk_tree_row_reference_get_path(*reference);
   gtk_tree_path_next(path);
   gtk_tree_row_reference_free(*reference);
   *reference = gtk_tree_row_reference_new(model, path);
-
   gtk_tree_path_free(path);
 
   return gtk_tree_row_reference_valid(*reference);
@@ -397,12 +369,8 @@ gnac_file_list_get_prev_row(GtkTreeRowReference **reference)
 {
   g_return_val_if_fail(*reference, FALSE);
 
-  GtkTreePath *path;
-  gboolean     has_prev_row;
-
-  path = gtk_tree_row_reference_get_path(*reference);
-
-  has_prev_row = gnac_file_list_has_prev_row(*reference);
+  GtkTreePath *path = gtk_tree_row_reference_get_path(*reference);
+  gboolean has_prev_row = gnac_file_list_has_prev_row(*reference);
 
   gtk_tree_row_reference_free(*reference);
 
@@ -422,9 +390,7 @@ gnac_file_list_select_row_and_follow(GtkTreeRowReference *reference)
 {
   g_return_if_fail(reference);
 
-  GtkTreePath *path;
-  
-  path = gtk_tree_row_reference_get_path(reference);
+  GtkTreePath *path = gtk_tree_row_reference_get_path(reference);
   if (!path) return;
   
   gtk_tree_selection_unselect_all(selection);
@@ -437,9 +403,7 @@ gnac_file_list_select_row_and_follow(GtkTreeRowReference *reference)
 void
 gnac_file_list_select_uri_and_follow(const gchar *uri)
 {
-  GtkTreeRowReference *ref = NULL;
-
-  ref = g_hash_table_lookup(reference_table, uri);
+  GtkTreeRowReference *ref = g_hash_table_lookup(reference_table, uri);
   g_return_if_fail(ref);
 
   gnac_file_list_select_row_and_follow(ref);
@@ -451,25 +415,19 @@ gnac_file_list_visual_error(const gchar *uri,
                             const gchar *msg,
                             const gchar *stock_item)
 {
-  GtkTreeIter          iter;
-  GtkTreePath         *path = NULL;
-  GtkTreeRowReference *ref = NULL;
-  GtkTreeViewColumn   *column;
-
-  column = gtk_tree_view_get_column(view,COL_STOCK);
-
-  ref = g_hash_table_lookup(reference_table, uri);
+  GtkTreeRowReference *ref = g_hash_table_lookup(reference_table, uri);
   g_return_if_fail(ref);
 
-  path = gtk_tree_row_reference_get_path(ref);
-  if (gtk_tree_model_get_iter(model, &iter, path))
-  {
+  GtkTreePath *path = gtk_tree_row_reference_get_path(ref);
+
+  GtkTreeIter iter;
+  if (gtk_tree_model_get_iter(model, &iter, path)) {
     gtk_list_store_set(GTK_LIST_STORE(model), &iter, 
         COL_STOCK, stock_item ? stock_item : GTK_STOCK_DIALOG_ERROR,
-        COL_TOOLTIP, g_strdup(msg),
-        -1);
+        COL_TOOLTIP, g_strdup(msg), -1);
     gtk_tree_path_free(path);
 
+    GtkTreeViewColumn *column = gtk_tree_view_get_column(view, COL_STOCK);
     if (!gtk_tree_view_column_get_visible(column)) {
       gtk_tree_view_column_set_visible(column, TRUE);
     }
@@ -480,8 +438,7 @@ gnac_file_list_visual_error(const gchar *uri,
 void
 gnac_file_list_hide_visual_bar(void)
 {
-  GtkTreeViewColumn *column; 
-  column = gtk_tree_view_get_column(view,COL_STOCK);
+  GtkTreeViewColumn *column = gtk_tree_view_get_column(view,COL_STOCK);
   gtk_tree_view_column_set_visible(column, FALSE);
 }
 
@@ -489,16 +446,13 @@ gnac_file_list_hide_visual_bar(void)
 void
 gnac_file_list_remove_visual_error(const gchar *uri)
 {
-  GtkTreeRowReference *ref = NULL;
-  GtkTreePath *path = NULL;
-  GtkTreeIter iter;
-
-  ref =  g_hash_table_lookup(reference_table, uri);
+  GtkTreeRowReference *ref =  g_hash_table_lookup(reference_table, uri);
   g_return_if_fail(ref);
 
-  path = gtk_tree_row_reference_get_path(ref);
-  if (gtk_tree_model_get_iter(model, &iter, path))
-  {
+  GtkTreePath *path = gtk_tree_row_reference_get_path(ref);
+
+  GtkTreeIter iter;
+  if (gtk_tree_model_get_iter(model, &iter, path)) {
     gtk_list_store_set(GTK_LIST_STORE(model), &iter, 
         COL_STOCK, NULL, COL_TOOLTIP, NULL, -1);
   }
@@ -512,24 +466,21 @@ gnac_file_list_on_button_pressed(GtkWidget      *treeview,
                                  GdkEventButton *event, 
                                  gpointer        user_data)
 {  
-  gboolean row_exists;
-  gboolean ret = FALSE;
   GtkTreePath *path;
-
-  row_exists = gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview),
+  gboolean row_exists = gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview),
       (gint) event->x, (gint) event->y, &path, NULL, NULL, NULL);
 
-  if (gnac_ui_utils_event_is_double_left_click(event) && !row_exists)
-  {
+  if (gnac_ui_utils_event_is_double_left_click(event) && !row_exists) {
     gnac_ui_on_add_cb(NULL, NULL);
-    ret = TRUE;
+    gtk_tree_path_free(path);
+    return TRUE;
   }
-  else if (gnac_ui_utils_event_is_single_right_click(event))
-  {
-    if (row_exists && gnac_file_list_count_selected_rows() <= 1)
-    {
-      GtkTreeRowReference *reference;
-      reference = gtk_tree_row_reference_new(model, path);
+
+  gboolean ret = FALSE;
+
+  if (gnac_ui_utils_event_is_single_right_click(event)) {
+    if (row_exists && gnac_file_list_count_selected_rows() <= 1) {
+      GtkTreeRowReference *reference = gtk_tree_row_reference_new(model, path);
       gnac_file_list_select_row(reference);
       gtk_tree_row_reference_free(reference);
     }
diff --git a/src/gnac-ui.c b/src/gnac-ui.c
index 900d78b..aed8db7 100644
--- a/src/gnac-ui.c
+++ b/src/gnac-ui.c
@@ -50,6 +50,7 @@
 #include "gnac-utils.h"
 #include "libgnac-debug.h"
 #include "profiles/gnac-profiles.h"
+#include "profiles/gnac-profiles-manager.h"
 
 GSettings *settings_ui;
 
@@ -65,9 +66,6 @@ static guint          timeout_id;
 static gint root_x;
 static gint root_y;
 
-static GtkWidget *audio_profile_chooser_combo = NULL;
-static GtkWidget *audio_profile_edit_button = NULL;
-
 static GtkTargetEntry target_list[] =  {
   { "text/uri-list", 0, TARGET_STRING }
 };
@@ -345,13 +343,9 @@ static void
 gnac_ui_file_chooser_foreach(gpointer data,
                              gpointer user_data)
 {
-  GFile   *file;
-  GSList **list;
-
-  list = (GSList **) user_data;
-  file = g_file_new_for_uri((gchar *) data);
+  GSList **list = (GSList **) user_data;
+  GFile *file = g_file_new_for_uri((gchar *) data);
   *list = g_slist_append(*list, file);
-
   g_free(data);
 }
 
@@ -359,16 +353,12 @@ gnac_ui_file_chooser_foreach(gpointer data,
 static GtkWidget *
 gnac_ui_file_chooser_new(void)
 {
-  GtkCellRenderer *renderer;
-  GtkTreeModel    *model;
-  GtkWidget       *combo;
-
   gnac_file_chooser = gnac_ui_get_widget("gnac_file_chooser");
-  model = gnac_ui_file_chooser_get_filters_model();
-  combo = gnac_ui_get_widget("filters_combo");
+  GtkTreeModel *model = gnac_ui_file_chooser_get_filters_model();
+  GtkWidget *combo = gnac_ui_get_widget("filters_combo");
   gtk_combo_box_set_model(GTK_COMBO_BOX(combo), model);
 
-  renderer = gtk_cell_renderer_text_new();
+  GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
   gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), renderer, TRUE);
   gtk_cell_layout_set_cell_data_func(GTK_CELL_LAYOUT(combo), renderer,
       (GtkCellLayoutDataFunc) gnac_ui_file_chooser_cell_data_func,
@@ -380,7 +370,7 @@ gnac_ui_file_chooser_new(void)
 }
 
 
-static void
+void
 gnac_ui_on_profile_changed_cb(GtkComboBox *box,
                               gpointer     data)
 {
@@ -394,14 +384,12 @@ gnac_remove_track(gpointer data,
                   gpointer user_data)
 {
   GError *error = NULL;
-  GFile *file;
-  GtkTreeRowReference *ref;
   gchar *uri = NULL;
 
-  ref = (GtkTreeRowReference *) data;
+  GtkTreeRowReference *ref = (GtkTreeRowReference *) data;
 
   gnac_file_list_get(ref, &uri);
-  file = g_file_new_for_uri(uri);
+  GFile *file = g_file_new_for_uri(uri);
 
   libgnac_converter_remove(converter, file, &error);
   if (error) {
@@ -418,11 +406,10 @@ gnac_remove_track(gpointer data,
 static void
 gnac_ui_show_toolbar(void)
 {
-  gboolean         visible;
-  GtkToggleAction *view_toolbar;
-
-  view_toolbar = GTK_TOGGLE_ACTION(gnac_ui_get_action("view_toolbar_item"));
-  visible = g_settings_get_boolean(settings_ui, GNAC_KEY_TOOLBAR_VISIBLE);
+  GtkToggleAction *view_toolbar = GTK_TOGGLE_ACTION(
+      gnac_ui_get_action("view_toolbar_item"));
+  gboolean visible = g_settings_get_boolean(settings_ui,
+      GNAC_KEY_TOOLBAR_VISIBLE);
   gtk_toggle_action_set_active(view_toolbar, visible);
   gnac_ui_set_widget_visible("main_toolbar", visible);
 }
@@ -452,23 +439,20 @@ gnac_ui_get_file_chooser(void)
 GtkFileFilter *
 gnac_ui_get_current_filter(void)
 {
-  gpointer      filter;
-  GtkTreeIter   iter;
-  GtkTreeModel *model;
-  GtkComboBox  *combo;
-
   /* make sure the filters have been created */
   gnac_ui_get_file_chooser();
 
-  combo = GTK_COMBO_BOX(gnac_ui_get_widget("filters_combo"));
+  GtkComboBox *combo = GTK_COMBO_BOX(gnac_ui_get_widget("filters_combo"));
 
+  GtkTreeIter iter;
   if (!gtk_combo_box_get_active_iter(combo, &iter)) {
     return default_file_filter;
   }
 
-  model = gtk_combo_box_get_model(combo);
+  GtkTreeModel *model = gtk_combo_box_get_model(combo);
   g_return_val_if_fail(model, default_file_filter);
 
+  gpointer filter;
   gtk_tree_model_get(model, &iter, 0, &filter, -1);
   if (GTK_IS_FILE_FILTER(filter)) {
     return GTK_FILE_FILTER(filter);
@@ -492,14 +476,13 @@ void
 gnac_ui_on_filter_changed(GtkWidget   *file_chooser,
                           GtkComboBox *combo)
 {
-  gpointer      filter;
-  GtkTreeIter   iter;
-  GtkTreeModel *model;
-
+  GtkTreeIter iter;
   if (!gtk_combo_box_get_active_iter(combo, &iter)) return;
 
-  model = gtk_combo_box_get_model(combo);
+  GtkTreeModel *model = gtk_combo_box_get_model(combo);
   g_return_if_fail(model);
+
+  gpointer filter;
   gtk_tree_model_get(model, &iter, 0, &filter, -1);
   if (GTK_IS_FILE_FILTER(filter)) {
     gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(file_chooser),
@@ -511,9 +494,8 @@ gnac_ui_on_filter_changed(GtkWidget   *file_chooser,
 static gboolean
 gnac_ui_file_chooser_close_on_add_button_is_active(void)
 {
-  GtkToggleButton *button;
-  button = GTK_TOGGLE_BUTTON(gnac_ui_get_widget("close_on_add_button"));
-  return gtk_toggle_button_get_active(button);
+  GtkWidget *button = gnac_ui_get_widget("close_on_add_button");
+  return gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button));
 }
 
 
@@ -522,13 +504,11 @@ gnac_ui_file_chooser_response_cb(GtkDialog *dialog,
                                  gint       response,
                                  gpointer   user_data)
 {
-  GSList *list_path;
-  GSList *list_files = NULL;
-
   switch (response) {
     /* Add button */
-    case GTK_RESPONSE_NONE:
-      list_path = gtk_file_chooser_get_uris(GTK_FILE_CHOOSER(dialog));
+    case GTK_RESPONSE_NONE: {
+      GSList *list_files = NULL;
+      GSList *list_path = gtk_file_chooser_get_uris(GTK_FILE_CHOOSER(dialog));
 
       /* Add the differents files */
       g_slist_foreach(list_path,(GFunc) gnac_ui_file_chooser_foreach,
@@ -542,6 +522,7 @@ gnac_ui_file_chooser_response_cb(GtkDialog *dialog,
       if (!gnac_ui_file_chooser_close_on_add_button_is_active()) return;
 
       break;
+    }
 
     case GTK_RESPONSE_CLOSE:
     default:
@@ -575,51 +556,19 @@ gnac_ui_file_chooser_key_press_event_cb(GtkWidget   *widget,
 }
 
 
-static void
-gnac_ui_add_audio_profile_combo_box(void)
-{
-  gchar     *current_profile;
-  GtkWidget *audio_profile_hbox;
-
-  audio_profile_hbox = gnac_ui_get_widget("audio_profile_hbox");
-  audio_profile_chooser_combo = gnac_profiles_get_widget(
-      gnac_ui_get_widget("main_window"));
-
-  g_signal_connect(G_OBJECT(audio_profile_chooser_combo), "changed",
-      G_CALLBACK(gnac_ui_on_profile_changed_cb), NULL);
-
-  current_profile = g_settings_get_string(settings, GNAC_KEY_LAST_USED_PROFILE);
-  gnac_profiles_set_current_profile(current_profile);
-  g_free(current_profile);
-
-  audio_profile_edit_button = gtk_button_new_from_stock(GTK_STOCK_EDIT);
-  
-  g_signal_connect(G_OBJECT(audio_profile_edit_button), "clicked",
-      G_CALLBACK(gnac_profiles_on_edit), NULL);
-  
-  gtk_box_pack_start(GTK_BOX(audio_profile_hbox), audio_profile_chooser_combo,
-      FALSE, TRUE, 0);
-  gtk_box_pack_start(GTK_BOX(audio_profile_hbox), audio_profile_edit_button,
-      FALSE, TRUE, 6);
-}
-
-
 void
 gnac_ui_new(void)
 {
-  GtkWidget *file_list;
-
   gnac_stock_items_init();
 
   gnac_main_builder = gnac_ui_utils_create_gtk_builder(PKGDATADIR "/gnac.xml");
 
   gtk_window_set_default_icon_name(PACKAGE);
 
-  file_list = gnac_file_list_new();
-
-  gnac_ui_add_audio_profile_combo_box();
+  gnac_profiles_init();
 
   /* DnD portion code */
+  GtkWidget *file_list = gnac_file_list_new();
   gtk_drag_dest_set(file_list, GTK_DEST_DEFAULT_ALL,
       target_list, n_targets, GDK_ACTION_COPY);
 }
@@ -628,26 +577,24 @@ gnac_ui_new(void)
 void
 gnac_ui_activate_profiles(gboolean activate)
 {
-  gtk_widget_set_sensitive(audio_profile_chooser_combo, activate);
-  gtk_widget_set_sensitive(audio_profile_edit_button, activate);
+  gtk_widget_set_sensitive(gnac_ui_get_widget("combo_profile"), activate);
+  gtk_widget_set_sensitive(gnac_ui_get_widget("edit_profiles_btn"), activate);
 }
 
 
 void
 gnac_ui_set_progress_fraction(gdouble fraction)
 {
-  GtkProgressBar *progress_bar;
-  progress_bar = GTK_PROGRESS_BAR(gnac_ui_get_widget("progressbar"));
-  gtk_progress_bar_set_fraction(progress_bar, fraction);
+  GtkWidget *progress_bar = gnac_ui_get_widget("progressbar");
+  gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress_bar), fraction);
 }
 
 
 void
 gnac_ui_set_progress_text(const gchar *text)
 {
-  GtkProgressBar *progress_bar;
-  progress_bar = GTK_PROGRESS_BAR(gnac_ui_get_widget("progressbar"));
-  gtk_progress_bar_set_text(progress_bar, text);
+  GtkWidget *progress_bar = gnac_ui_get_widget("progressbar");
+  gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress_bar), text);
 }
 
 
@@ -681,15 +628,13 @@ gnac_ui_show_progress(gboolean show)
 gboolean 
 gnac_ui_pulse_progress(void)
 {
-  GtkProgressBar *progress_bar;
-  gchar          *progress_text;
-
   if (state != GNAC_AUDIO_FILE_ACTION_STATE) return FALSE;
 
-  progress_bar = GTK_PROGRESS_BAR(gnac_ui_get_widget("progressbar"));
-    
+  GtkProgressBar *progress_bar = GTK_PROGRESS_BAR(
+      gnac_ui_get_widget("progressbar"));
   gtk_progress_bar_pulse(progress_bar);
-  progress_text = g_strdup_printf(
+
+  gchar *progress_text = g_strdup_printf(
       ngettext("%u file added", "%u files added", nb_files_added),
       nb_files_added);
   gnac_ui_set_progress_text(progress_text);
@@ -702,9 +647,7 @@ gnac_ui_pulse_progress(void)
 void
 gnac_ui_push_status(const gchar *message)
 {
-  GtkStatusbar *status_bar;
-
-  status_bar = GTK_STATUSBAR(gnac_ui_get_widget("statusbar"));
+  GtkStatusbar *status_bar = GTK_STATUSBAR(gnac_ui_get_widget("statusbar"));
   g_free(status_msg);
   status_msg = g_strdup(message);
   gtk_statusbar_pop(status_bar, 0);
@@ -715,11 +658,8 @@ gnac_ui_push_status(const gchar *message)
 void
 gnac_ui_append_status(const gchar *message)
 {
-  gchar        *old_msg;
-  GtkStatusbar *status_bar;
-
-  status_bar = GTK_STATUSBAR(gnac_ui_get_widget("statusbar"));
-  old_msg = g_strdup(status_msg);
+  GtkStatusbar *status_bar = GTK_STATUSBAR(gnac_ui_get_widget("statusbar"));
+  gchar *old_msg = g_strdup(status_msg);
   g_free(status_msg);
   status_msg = g_strdup_printf("%s (%s)", old_msg, message);
   g_free(old_msg);
@@ -733,9 +673,8 @@ gnac_ui_notify(const gchar *msg)
 {
 #ifdef HAVE_LIBNOTIFY
 
-  NotifyNotification *notification;
-
-  notification = notify_notification_new(PACKAGE_NAME, msg, PACKAGE);
+  NotifyNotification *notification = notify_notification_new(
+      PACKAGE_NAME, msg, PACKAGE);
 
   notify_notification_set_timeout(notification, NOTIFY_EXPIRES_DEFAULT);
   notify_notification_set_urgency(notification, NOTIFY_URGENCY_NORMAL);
@@ -751,7 +690,7 @@ gnac_ui_notify(const gchar *msg)
 
 
 void 
-gnac_ui_show_popup_menu(GtkWidget      *treeview, 
+gnac_ui_show_popup_menu(GtkWidget      *treeview,
                         GdkEventButton *event, 
                         gpointer        user_data)
 {
@@ -992,10 +931,9 @@ gnac_ui_on_drag_data_received_cb(GtkWidget        *widget,
   }
 
   guint   index = 0;
-  gchar  *uri;
   GSList *list_uris = NULL;
 
-  uri = uris[index];
+  gchar *uri = uris[index];
   while (uri) {
     GFile *file = g_file_new_for_uri(uri);
     list_uris = g_slist_append(list_uris, file);
@@ -1030,8 +968,7 @@ gnac_ui_message_received_cb(UniqueApp         *app,
     break;
 
     case UNIQUE_CMD_ADD: {
-      gchar **filenames;
-      filenames = unique_message_data_get_uris(message);
+      gchar **filenames = unique_message_data_get_uris(message);
       gnac_options_process_filenames(filenames);
       g_strfreev(filenames);
       gnac_ui_notify(_("Adding files..."));
@@ -1106,11 +1043,8 @@ gnac_ui_init_unique(void)
 
     /* Transmit filenames */
     if (options.filenames) {
-      gchar **uris;
-      UniqueMessageData *message;
-
-      message = unique_message_data_new();
-      uris = gnac_utils_get_filenames_from_cmd_line(options.filenames);
+      UniqueMessageData *message = unique_message_data_new();
+      gchar **uris = gnac_utils_get_filenames_from_cmd_line(options.filenames);
       g_strfreev(options.filenames);
       if (!unique_message_data_set_uris(message, uris)) {
         libgnac_warning(_("Failed to convert some uris"));
@@ -1169,7 +1103,7 @@ gnac_ui_destroy(void)
 {
   gnac_properties_destroy();
   gnac_prefs_destroy();
-  gnac_profiles_destroy();
+  gnac_profiles_mgr_destroy();
 
   gnac_file_list_destroy();
 
@@ -1201,21 +1135,17 @@ gnac_ui_destroy(void)
 gboolean
 gnac_ui_confirm_exit(void)
 {
-  gint       response;
-  GtkWidget *dialog;
-
   /* disable stop/resume and quit from trayicon's menu */
   gnac_ui_trayicon_menu_activate(FALSE);
 
-  dialog = gtk_message_dialog_new(
+  GtkWidget *dialog = gtk_message_dialog_new(
       GTK_WINDOW(gnac_ui_get_widget("main_window")), GTK_DIALOG_MODAL,
       GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO, "%s\n%s",
       _("A conversion is currently running..."),
       _("Are you sure you want to quit?"));
-
   gtk_window_set_title(GTK_WINDOW(dialog), PACKAGE_NAME);
 
-  response = gtk_dialog_run(GTK_DIALOG(dialog));
+  gint response = gtk_dialog_run(GTK_DIALOG(dialog));
 
   gtk_widget_destroy(dialog);
 
@@ -1236,23 +1166,19 @@ gnac_ui_query_tooltip_cb(GtkStatusIcon *status_icon,
                          GtkTooltip    *tooltip,
                          gpointer       user_data)
 {
-  LibgnacTags *tags;
-  GFile *tooltip_file;
-  gchar *text;
-  const gchar *album;
-  const gchar *artist;
-  const gchar *title;
-
-  tooltip_file = g_file_new_for_uri(tooltip_path);
-  tags = libgnac_metadata_extract(metadata, tooltip_file, NULL); 
+  GFile *tooltip_file = g_file_new_for_uri(tooltip_path);
+  LibgnacTags *tags = libgnac_metadata_extract(metadata, tooltip_file, NULL);
+  g_object_unref(tooltip_file);
 
-  album = libgnac_metadata_tag_exists(tags, GST_TAG_ALBUM) ?
+  const gchar *album = libgnac_metadata_tag_exists(tags, GST_TAG_ALBUM) ?
       g_value_get_string(LIBGNAC_METADATA_TAG_ALBUM(tags)) : NULL;
-  artist = libgnac_metadata_tag_exists(tags, GST_TAG_ARTIST) ?
+  const gchar *artist = libgnac_metadata_tag_exists(tags, GST_TAG_ARTIST) ?
       g_value_get_string(LIBGNAC_METADATA_TAG_ARTIST(tags)) : NULL;
-  title = libgnac_metadata_tag_exists(tags, GST_TAG_TITLE) ?
+  const gchar *title = libgnac_metadata_tag_exists(tags, GST_TAG_TITLE) ?
       g_value_get_string(LIBGNAC_METADATA_TAG_TITLE(tags)) : NULL;
 
+  gchar *text;
+
   if (title)
   {
     text = g_markup_printf_escaped("  <b>%s</b>  \n"
@@ -1276,19 +1202,16 @@ gnac_ui_query_tooltip_cb(GtkStatusIcon *status_icon,
   }
 
   gtk_tooltip_set_markup(tooltip, text);
+  g_free(text);
 
   /* check wether we have a cover to display */
   if (libgnac_metadata_tag_exists(tags, GST_TAG_IMAGE)) {
-    GdkPixbuf *pixbuf;
-    pixbuf = g_value_get_object(LIBGNAC_METADATA_TAG_IMAGE(tags));
+    GdkPixbuf *pixbuf = g_value_get_object(LIBGNAC_METADATA_TAG_IMAGE(tags));
     pixbuf = gnac_ui_utils_scale_pixbuf(pixbuf, 80, 80);
     pixbuf = gnac_ui_utils_add_border_to_pixbuf(pixbuf);
     gtk_tooltip_set_icon(tooltip, pixbuf);
   }
 
-  g_object_unref(tooltip_file);
-  g_free(text);
-
   return TRUE;
 }
 
@@ -1317,6 +1240,16 @@ gnac_ui_show_trayicon(void)
 }
 
 
+static gboolean
+gnac_ui_main_window_is_visible(void)
+{
+  gboolean visible;
+  GtkWidget *main_window = gnac_ui_get_widget("main_window");
+  g_object_get(main_window, "visible", &visible, NULL);
+  return visible;
+}
+
+
 void
 gnac_ui_hide_trayicon(void)
 {  
@@ -1326,15 +1259,11 @@ gnac_ui_hide_trayicon(void)
     return;
   }
 
-  gboolean window_displayed;
   GtkWidget *main_window = gnac_ui_get_widget("main_window");
 
-  g_object_get(main_window, "visible", &window_displayed, NULL);
-  
-  gtk_widget_show_all(main_window);
-
-  if (!window_displayed) {
+  if (!gnac_ui_main_window_is_visible()) {
     gtk_window_move(GTK_WINDOW(main_window), root_x, root_y);
+    gtk_widget_show_all(main_window);
   }
 
   gtk_status_icon_set_visible(trayicon, FALSE);
@@ -1345,17 +1274,14 @@ void
 gnac_ui_on_trayicon(GtkStatusIcon *trayicon,
                     gpointer       data)
 {
-  gboolean window_displayed;
-
   GtkWidget *main_window = gnac_ui_get_widget("main_window");
-  g_object_get(main_window, "visible", &window_displayed, NULL);
 
-  if (window_displayed) {
+  if (gnac_ui_main_window_is_visible()) {
     gtk_window_get_position(GTK_WINDOW(main_window), &root_x, &root_y);
     gtk_widget_hide(main_window);
   } else {
-    gtk_widget_show_all(main_window);
     gtk_window_move(GTK_WINDOW(main_window), root_x, root_y);
+    gtk_widget_show_all(main_window);
   }
 
   if (state == GNAC_AUDIO_READY_STATE) {
@@ -1370,14 +1296,9 @@ gnac_ui_on_trayicon_popup(GtkStatusIcon *trayicon,
                           guint          activate_time,
                           gpointer       data)
 {
-  gboolean window_displayed;
-  
-  GtkWidget *main_window = gnac_ui_get_widget("main_window");
-
-  g_object_get(main_window, "visible", &window_displayed, NULL);
-
   /* Translators: Show/Hide main window */
-  gchar *label_text = g_strdup(window_displayed ? _("Hide") : _("Show"));
+  gchar *label_text = g_strdup(gnac_ui_main_window_is_visible() ?
+      _("Hide") : _("Show"));
 
   GtkAction *show_action = gnac_ui_get_action("tray_show_hide_item");
   GtkMenu *trayicon_menu = GTK_MENU(gnac_ui_get_widget("tray_popup"));
@@ -1417,17 +1338,14 @@ gnac_ui_trayicon_menu_activate(gboolean activate)
 
 
 void
-gnac_ui_trayicon_menu_stop(gpointer data, 
+gnac_ui_trayicon_menu_stop(gpointer data,
                            gpointer user_data)
 {
-  gboolean window_displayed;
-
   GtkWidget *main_window = gnac_ui_get_widget("main_window");
-  g_object_get(main_window, "visible", &window_displayed, NULL);
 
-  if (!window_displayed) {
-    gtk_widget_show_all(main_window);
+  if (!gnac_ui_main_window_is_visible()) {
     gtk_window_move(GTK_WINDOW(main_window), root_x, root_y);
+    gtk_widget_show_all(main_window);
   }
 
   gnac_ui_hide_trayicon();
@@ -1446,14 +1364,14 @@ gnac_ui_trayicon_menu_pause(gpointer data,
 gint
 gnac_ui_show_error_trash(const gchar *filename)
 {
-  GtkWidget *main_window = gnac_ui_get_widget("main_window");
-  GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(main_window),
+  GtkWindow *main_window = GTK_WINDOW(gnac_ui_get_widget("main_window"));
+  GtkWidget *dialog = gtk_message_dialog_new(main_window,
       GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_CANCEL,
       _("Failed to move the file to the Trash. Delete it permanently?"));
   gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_DELETE, 1);
-
   gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog),
       _("Cannot move file %s to the Trash"), filename);
+
   gint response = gtk_dialog_run(GTK_DIALOG(dialog));
   gtk_widget_destroy(dialog);
 
diff --git a/src/gnac-ui.h b/src/gnac-ui.h
index c4027ef..8a2b55e 100644
--- a/src/gnac-ui.h
+++ b/src/gnac-ui.h
@@ -44,6 +44,10 @@ enum {
 extern GSettings *settings_ui;
 
 void
+gnac_ui_on_profile_changed_cb(GtkComboBox *box,
+                              gpointer     data);
+
+void
 gnac_ui_set_progress_fraction(gdouble fraction);
 
 void
diff --git a/src/profiles/gnac-profiles-manager.c b/src/profiles/gnac-profiles-manager.c
index 696b2d5..a40390f 100644
--- a/src/profiles/gnac-profiles-manager.c
+++ b/src/profiles/gnac-profiles-manager.c
@@ -34,6 +34,7 @@
 #include "gnac-profiles.h"
 #include "gnac-profiles-default.h"
 #include "gnac-profiles-manager.h"
+#include "gnac-ui.h"
 #include "gnac-ui-utils.h"
 #include "gnac-utils.h"
 #include "libgnac-debug.h"
@@ -189,6 +190,17 @@ gnac_profiles_mgr_show_import_progressbar(gboolean show)
 }
 
 
+static void
+gnac_profiles_mgr_set_parent(void)
+{
+  GtkWindow *parent = GTK_WINDOW(gnac_ui_get_widget("main_window"));
+  GtkWindow *window = GTK_WINDOW(
+      gnac_profiles_mgr_get_widget("profile_manager_window"));
+  gtk_window_set_transient_for(window, parent);
+  gnac_profiles_properties_set_parent(window);
+}
+
+
 void
 gnac_profiles_mgr_init(void)
 {
@@ -197,27 +209,11 @@ gnac_profiles_mgr_init(void)
 
   GtkTreeView *view = GTK_TREE_VIEW(
       gnac_profiles_mgr_get_widget("profile_treeview"));
-  GtkTreeModel *model = gtk_tree_view_get_model(view);
   GtkTreeSelection *selection = gtk_tree_view_get_selection(view);
 
   g_signal_connect(G_OBJECT(selection), "changed", 
       G_CALLBACK(gnac_profiles_mgr_on_treeselection_changed), NULL);
 
-  GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
-  g_object_set(G_OBJECT(renderer), "ypad", 5, NULL);
-
-  gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(view), -1,
-      _("Name"), renderer, "text", COL_NAME, NULL);
-
-  gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(view), -1,
-      _("Format"), renderer, "text", COL_FORMAT, NULL);
-
-  gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(view), -1,
-      _("Extension"), renderer, "text", COL_EXTENSION, NULL);
-  
-  gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model), COL_NAME,
-      GTK_SORT_ASCENDING);
-
   gtk_drag_dest_set(GTK_WIDGET(view), GTK_DEST_DEFAULT_ALL, target_list,
       n_targets, GDK_ACTION_COPY);
 
@@ -225,6 +221,7 @@ gnac_profiles_mgr_init(void)
       n_targets, GDK_ACTION_COPY);
 
   gnac_profiles_properties_init();
+  gnac_profiles_mgr_set_parent();
 
   gnac_profiles_mgr_show_import_progressbar(FALSE);
   gnac_profiles_mgr_display_status_message(NULL, NULL);
@@ -233,16 +230,6 @@ gnac_profiles_mgr_init(void)
 }
 
 
-void
-gnac_profiles_mgr_set_parent(GtkWindow *parent)
-{
-  GtkWindow *window = GTK_WINDOW(
-      gnac_profiles_mgr_get_widget("profile_manager_window"));
-  gtk_window_set_transient_for(window, parent);
-  gnac_profiles_properties_set_parent(window);
-}
-
-
 static GFile *
 gnac_profiles_mgr_get_profiles_dir(void)
 {
diff --git a/src/profiles/gnac-profiles-manager.h b/src/profiles/gnac-profiles-manager.h
index 610c1ec..fe30f20 100644
--- a/src/profiles/gnac-profiles-manager.h
+++ b/src/profiles/gnac-profiles-manager.h
@@ -35,9 +35,6 @@ void
 gnac_profiles_mgr_init(void);
 
 void
-gnac_profiles_mgr_set_parent(GtkWindow *parent);
-
-void
 gnac_profiles_mgr_list_profiles(void);
 
 GList *
diff --git a/src/profiles/gnac-profiles-properties.c b/src/profiles/gnac-profiles-properties.c
index 9f86ebe..948bdfd 100644
--- a/src/profiles/gnac-profiles-properties.c
+++ b/src/profiles/gnac-profiles-properties.c
@@ -118,6 +118,13 @@ static void
 gnac_profiles_properties_reinit(void);
 
 
+static GObject *
+gnac_profiles_properties_get_object(const gchar *object_name)
+{
+  return gnac_ui_utils_get_object(profiles_properties_builder, object_name);
+}
+
+
 static GtkWidget *
 gnac_profiles_properties_get_widget(const gchar *widget_name)
 {
@@ -128,21 +135,12 @@ gnac_profiles_properties_get_widget(const gchar *widget_name)
 void
 gnac_profiles_properties_init(void)
 {
-  profiles_properties_builder = gnac_ui_utils_create_gtk_builder(
-      PKGDATADIR "/profiles/gnac-profiles-properties.xml");
   formats = g_hash_table_new(g_str_hash, g_str_equal);
-  
   saved_profiles_dir = g_build_filename(g_get_user_data_dir(),
       "gnac", "profiles", NULL);
 
-  GtkWidget *combo_format = gnac_profiles_properties_get_widget(
-      "format_combo_box");
-
-  GtkCellRenderer *renderer_format = gtk_cell_renderer_text_new();
-  gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo_format),
-      renderer_format, FALSE);
-  gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo_format), 
-      renderer_format, "text", 0, NULL);
+  profiles_properties_builder = gnac_ui_utils_create_gtk_builder(
+      PKGDATADIR "/profiles/gnac-profiles-properties.xml");
 
   gnac_profiles_properties_init_format();
   gnac_profiles_properties_display_status_message(NULL);
@@ -160,11 +158,8 @@ gnac_profiles_properties_set_parent(GtkWindow *parent)
 static void
 gnac_profiles_properties_init_format(void)
 {
-  GtkWidget *format_combo_box =
-      gnac_profiles_properties_get_widget("format_combo_box");
-  GtkListStore *model = GTK_LIST_STORE(gtk_combo_box_get_model(
-      GTK_COMBO_BOX(format_combo_box)));
-
+  GtkListStore *model = GTK_LIST_STORE(
+      gnac_profiles_properties_get_object("liststore1"));
   gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model), COL_SORT,
       GTK_SORT_ASCENDING);
 
diff --git a/src/profiles/gnac-profiles.c b/src/profiles/gnac-profiles.c
index d6a7848..ecfb79b 100755
--- a/src/profiles/gnac-profiles.c
+++ b/src/profiles/gnac-profiles.c
@@ -29,8 +29,10 @@
 
 #include <glib/gi18n.h>
 
+#include "gnac-main.h"
 #include "gnac-profiles.h"
 #include "gnac-profiles-manager.h"
+#include "gnac-ui.h"
 #include "gnac-utils.h"
 
 
@@ -40,51 +42,17 @@ enum {
   NUM_COLS
 };
 
-static void
-gnac_profiles_on_combo_profile_changed(GtkWidget *widget,
-                                       gpointer   data);
-
-static GtkWidget *combo_profile = NULL;
-
 
 void
 gnac_profiles_init(void)
 {
-  GtkListStore *model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER);
-  combo_profile = gtk_combo_box_new_with_model(GTK_TREE_MODEL(model));
-  GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
-  gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo_profile), renderer, FALSE);
-  gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo_profile),
-      renderer, "text", 0, NULL);
-  gtk_combo_box_set_model(GTK_COMBO_BOX(combo_profile), GTK_TREE_MODEL(model));
-
-  g_signal_connect(G_OBJECT(combo_profile), "changed",
-      G_CALLBACK(gnac_profiles_on_combo_profile_changed), NULL);
-
   gnac_profiles_mgr_init();
   gnac_profiles_populate_combo();
-}
-
-
-void
-gnac_profiles_destroy(void)
-{
-  if (combo_profile) {
-    gnac_profiles_mgr_destroy();
-  }
-}
-
-
-GtkWidget *
-gnac_profiles_get_widget(GtkWidget *parent)
-{
-  if (!combo_profile) {
-    gnac_profiles_init();
-  }
-
-  gnac_profiles_mgr_set_parent(GTK_WINDOW(parent));
 
-  return combo_profile;
+  gchar *current_profile = g_settings_get_string(settings,
+      GNAC_KEY_LAST_USED_PROFILE);
+  gnac_profiles_set_current_profile(current_profile);
+  g_free(current_profile);
 }
 
 
@@ -92,9 +60,10 @@ static gchar *
 gnac_profiles_get_display_name(void)
 {
   GtkTreeIter iter;
-  GtkTreeModel *model = gtk_combo_box_get_model(GTK_COMBO_BOX(combo_profile));
+  GtkComboBox *combo_profile = GTK_COMBO_BOX(gnac_ui_get_widget("combo_profile"));
+  GtkTreeModel *model = gtk_combo_box_get_model(combo_profile);
 
-  if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(combo_profile), &iter)) {
+  if (gtk_combo_box_get_active_iter(combo_profile, &iter)) {
     gchar *name;
     gtk_tree_model_get(model, &iter, COL_NAME, &name, -1);
     return name;
@@ -108,9 +77,10 @@ static AudioProfileGeneric *
 gnac_profiles_get_active_profile(void)
 {
   GtkTreeIter iter;
-  GtkTreeModel *model = gtk_combo_box_get_model(GTK_COMBO_BOX(combo_profile));
+  GtkComboBox *combo_profile = GTK_COMBO_BOX(gnac_ui_get_widget("combo_profile"));
+  GtkTreeModel *model = gtk_combo_box_get_model(combo_profile);
 
-  if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(combo_profile), &iter)) {
+  if (gtk_combo_box_get_active_iter(combo_profile, &iter)) {
     AudioProfileGeneric *profile;
     gtk_tree_model_get(model, &iter, COL_PROFILE, &profile, -1);
     return profile->generic;
@@ -154,7 +124,8 @@ void
 gnac_profiles_set_current_profile(const gchar *name)
 {
   GtkTreeIter iter;
-  GtkTreeModel *model = gtk_combo_box_get_model(GTK_COMBO_BOX(combo_profile));
+  GtkComboBox *combo_profile = GTK_COMBO_BOX(gnac_ui_get_widget("combo_profile"));
+  GtkTreeModel *model = gtk_combo_box_get_model(combo_profile);
   gboolean has_next = gtk_tree_model_get_iter_first(model, &iter);
 
   gboolean found = FALSE;
@@ -163,7 +134,7 @@ gnac_profiles_set_current_profile(const gchar *name)
     AudioProfileGeneric *profile;
     gtk_tree_model_get(model, &iter, COL_PROFILE, &profile, -1);
     if (gnac_utils_str_equal(profile->name, name)) {
-      gtk_combo_box_set_active_iter(GTK_COMBO_BOX(combo_profile), &iter);
+      gtk_combo_box_set_active_iter(combo_profile, &iter);
       found = TRUE;
     }
     has_next = gtk_tree_model_iter_next(model, &iter);
@@ -174,6 +145,7 @@ gnac_profiles_set_current_profile(const gchar *name)
 void
 gnac_profiles_populate_combo(void)
 {
+  GtkWidget *combo_profile = gnac_ui_get_widget("combo_profile");
   GtkListStore *model = GTK_LIST_STORE(
       gtk_combo_box_get_model(GTK_COMBO_BOX(combo_profile)));
  
@@ -225,13 +197,6 @@ gnac_profiles_populate_combo(void)
 
 
 void
-gnac_profiles_on_edit(void)
-{
-  gnac_profiles_mgr_show();
-}
-
-
-static void
 gnac_profiles_on_combo_profile_changed(GtkWidget *widget,
                                        gpointer   data)
 {
diff --git a/src/profiles/gnac-profiles.h b/src/profiles/gnac-profiles.h
index 0880a31..f73bfca 100755
--- a/src/profiles/gnac-profiles.h
+++ b/src/profiles/gnac-profiles.h
@@ -34,14 +34,8 @@ void
 gnac_profiles_init(void);
 
 void
-gnac_profiles_destroy(void);
-
-void
 gnac_profiles_populate_combo(void);
 
-GtkWidget *
-gnac_profiles_get_widget(GtkWidget *parent);
-
 const gchar *
 gnac_profiles_get_pipeline(void);
 
@@ -55,7 +49,8 @@ void
 gnac_profiles_set_current_profile(const gchar *name);
 
 void
-gnac_profiles_on_edit(void);
+gnac_profiles_on_combo_profile_changed(GtkWidget *widget,
+                                       gpointer   data);
 
 G_END_DECLS
 



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