[easytag/wip/application-window] Move browser to EtBrowser object



commit 8dd40101ddd8ae335cd605257bcfbb7d9e03a113
Author: David King <amigadave amigadave com>
Date:   Wed Feb 12 23:06:30 2014 +0000

    Move browser to EtBrowser object

 configure.ac             |    2 +-
 src/application_window.c |  859 +++++++++++++++++++++++-
 src/application_window.h |   33 +
 src/bar.c                |   79 ++-
 src/browser.c            | 1638 ++++++++++++++++++++++++++++++----------------
 src/browser.h            |  186 ++----
 src/cddb_dialog.c        |   10 +-
 src/easytag.c            |  493 +-------------
 src/easytag.h            |    4 +-
 src/et_core.c            |    4 +-
 src/load_files_dialog.c  |    6 +-
 src/misc.c               |   90 ---
 src/misc.h               |    3 -
 src/playlist_dialog.c    |    3 +-
 src/scan_dialog.c        |   45 +--
 src/scan_dialog.h        |    1 -
 src/search_dialog.c      |   13 +-
 src/setting.c            |    2 +-
 18 files changed, 2094 insertions(+), 1377 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index da79182..1428900 100644
--- a/configure.ac
+++ b/configure.ac
@@ -289,7 +289,7 @@ AS_IF([test "x$have_wavpack" != "xno"],
              [AC_MSG_ERROR([Wavpack support requested but required dependencies ($WAVPACK_DEPS) not 
found])])])
 
 dnl Check the pkg-config dependencies
-GIO_DEPS="gio-2.0 >= 2.32.0" dnl For g_file_new_tmp()
+GIO_DEPS="glib-2.0 >= 2.34.0" dnl For g_clear_pointer()
 PKG_CHECK_MODULES([EASYTAG], [$GIO_DEPS $GTK_DEPS $OPUS_DEPS $OGG_DEPS $SPEEX_DEPS $FLAC_DEPS $ID3TAG_DEPS 
$TAGLIB_DEPS $WAVPACK_DEPS])
 
 dnl Check for winsock
diff --git a/src/application_window.c b/src/application_window.c
index f8bee71..8c4e110 100644
--- a/src/application_window.c
+++ b/src/application_window.c
@@ -46,6 +46,8 @@ G_DEFINE_TYPE (EtApplicationWindow, et_application_window, GTK_TYPE_APPLICATION_
 
 struct _EtApplicationWindowPrivate
 {
+    GtkWidget *browser;
+
     GtkWidget *file_area;
     GtkWidget *log_area;
     GtkWidget *tag_area;
@@ -89,6 +91,11 @@ struct _EtApplicationWindowPrivate
     GtkToolItem *apply_image_toolitem;
 };
 
+/* Used to force to hide the msgbox when deleting file */
+static gboolean SF_HideMsgbox_Delete_File;
+/* To remember which button was pressed when deleting file */
+static gint SF_ButtonPressed_Delete_File;
+
 static gboolean et_tag_field_on_key_press_event (GtkEntry *entry,
                                                  GdkEventKey *event,
                                                  gpointer user_data);
@@ -876,8 +883,8 @@ Mini_Button_Clicked (GObject *object)
 
     g_list_free(etfilelist);
 
-    // Refresh the whole list (faster than file by file) to show changes
-    Browser_List_Refresh_Whole_List();
+    /* Refresh the whole list (faster than file by file) to show changes. */
+    et_application_window_browser_refresh_list (ET_APPLICATION_WINDOW (toplevel));
 
     /* Display the current file (Needed when sequencing tracks) */
     ET_Display_File_Data_To_UI(ETCore->ETFileDisplayed);
@@ -895,6 +902,45 @@ Mini_Button_Clicked (GObject *object)
     Update_Command_Buttons_Sensivity();
 }
 
+/*
+ * Action when Redo button is pressed.
+ * Action_Redo_Selected_Files: Redo the last changes for the selected files.
+ * Action_Redo_From_History_List: Redo the changes of the last modified file of the list.
+ */
+void
+et_application_window_redo_selected_files (GtkAction *action,
+                                           gpointer user_data)
+{
+    GList *selfilelist = NULL;
+    GList *l;
+    gboolean state = FALSE;
+    ET_File *etfile;
+    GtkTreeSelection *selection;
+
+    g_return_val_if_fail (ETCore->ETFileDisplayedList != NULL ||
+                          BrowserList != NULL, FALSE);
+
+    /* Save the current displayed data */
+    ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
+
+    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList));
+    selfilelist = gtk_tree_selection_get_selected_rows(selection, NULL);
+
+    for (l = selfilelist; l != NULL; l = g_list_next (l))
+    {
+        etfile = Browser_List_Get_ETFile_From_Path (l->data);
+        state |= ET_Redo_File_Data(etfile);
+    }
+
+    g_list_free_full (selfilelist, (GDestroyNotify)gtk_tree_path_free);
+
+    /* Refresh the whole list (faster than file by file) to show changes. */
+    et_application_window_browser_refresh_list (ET_APPLICATION_WINDOW (user_data));
+
+    /* Display the current file */
+    ET_Display_File_Data_To_UI(ETCore->ETFileDisplayed);
+    Update_Command_Buttons_Sensivity();
+}
 
 /*
  * et_tag_field_connect_signals:
@@ -947,16 +993,18 @@ et_tag_field_on_key_press_event (GtkEntry *entry, GdkEventKey *event,
 }
 
 static GtkWidget *
-create_browser_area (void)
+create_browser_area (EtApplicationWindow *self)
 {
+    EtApplicationWindowPrivate *priv;
     GtkWidget *frame;
-    GtkWidget *tree;
+
+    priv = et_application_window_get_instance_private (self);
 
     frame = gtk_frame_new (_("Browser"));
     gtk_container_set_border_width (GTK_CONTAINER (frame), 2);
 
-    tree = Create_Browser_Items (MainWindow);
-    gtk_container_add (GTK_CONTAINER (frame), tree);
+    priv->browser = GTK_WIDGET (et_browser_new ());
+    gtk_container_add (GTK_CONTAINER (frame), priv->browser);
 
     /* Don't load init dir here because Tag area hasn't been yet created!.
      * It will be load at the end of the main function */
@@ -1711,7 +1759,7 @@ et_application_window_init (EtApplicationWindow *self)
     priv->hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
 
     /* Browser (Tree + File list + Entry) */
-    widget = create_browser_area ();
+    widget = create_browser_area (self);
     gtk_paned_pack1 (GTK_PANED (priv->hpaned), widget, TRUE, TRUE);
 
     /* Vertical box for FileArea + TagArea */
@@ -2001,6 +2049,272 @@ et_application_window_search_cddb_for_selection (G_GNUC_UNUSED GtkAction *action
     et_cddb_dialog_search_from_selection (ET_CDDB_DIALOG (priv->cddb_dialog));
 }
 
+void
+et_application_window_browser_collapse (G_GNUC_UNUSED GtkAction *action,
+                                        gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_collapse (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_browser_reload (G_GNUC_UNUSED GtkAction *action,
+                                      gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_reload (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_browser_toggle_display_mode (EtApplicationWindow *self)
+{
+    EtApplicationWindowPrivate *priv;
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_toggle_display_mode (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_browser_set_sensitive (EtApplicationWindow *self,
+                                             gboolean sensitive)
+{
+    EtApplicationWindowPrivate *priv;
+
+    g_return_if_fail (ET_APPLICATION_WINDOW (self));
+
+    priv = et_application_window_get_instance_private (self);
+
+    g_return_if_fail (priv->browser != NULL);
+
+    et_browser_set_sensitive (ET_BROWSER (priv->browser), sensitive);
+}
+
+void
+et_application_window_browser_clear (EtApplicationWindow *self)
+{
+    EtApplicationWindowPrivate *priv;
+
+    g_return_if_fail (ET_APPLICATION_WINDOW (self));
+
+    priv = et_application_window_get_instance_private (self);
+
+    g_return_if_fail (priv->browser != NULL);
+
+    et_browser_clear (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_go_home (G_GNUC_UNUSED GtkAction *action,
+                               gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_go_home (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_go_desktop (G_GNUC_UNUSED GtkAction *action,
+                                  gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_go_desktop (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_go_documents (G_GNUC_UNUSED GtkAction *action,
+                                    gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_go_documents (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_go_download (G_GNUC_UNUSED GtkAction *action,
+                                   gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_go_download (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_go_music (G_GNUC_UNUSED GtkAction *action,
+                                gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_go_music (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_go_parent (G_GNUC_UNUSED GtkAction *action,
+                                 gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_go_parent (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_run_player_for_album_list (G_GNUC_UNUSED GtkAction *action,
+                                                 gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_run_player_for_album_list (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_run_player_for_artist_list (G_GNUC_UNUSED GtkAction *action,
+                                                  gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_run_player_for_artist_list (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_run_player_for_selection (G_GNUC_UNUSED GtkAction *action,
+                                                gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_run_player_for_selection (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_reload_directory (G_GNUC_UNUSED GtkAction *action,
+                                        gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_reload_directory (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_select_dir (EtApplicationWindow *self, const gchar *path)
+{
+    EtApplicationWindowPrivate *priv;
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_select_dir (ET_BROWSER (priv->browser), path);
+}
+
+void
+et_application_window_load_default_dir (G_GNUC_UNUSED GtkAction *action,
+                                        gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_load_default_dir (ET_BROWSER (priv->browser));
+}
+
+
+void
+et_application_window_set_current_path_default (G_GNUC_UNUSED GtkAction *action,
+                                                gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_set_current_path_default (ET_BROWSER (priv->browser));
+}
+
+const gchar *
+et_application_window_get_current_path (EtApplicationWindow *self)
+{
+    EtApplicationWindowPrivate *priv;
+
+    g_return_val_if_fail (ET_APPLICATION_WINDOW (self), NULL);
+
+    priv = et_application_window_get_instance_private (self);
+
+    return et_browser_get_current_path (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_show_open_directory_with_dialog (G_GNUC_UNUSED GtkAction *action,
+                                                       gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_show_open_directory_with_dialog (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_show_open_files_with_dialog (G_GNUC_UNUSED GtkAction *action,
+                                                   gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_show_open_files_with_dialog (ET_BROWSER (priv->browser));
+}
+
+void
+et_application_window_show_rename_directory_dialog (G_GNUC_UNUSED GtkAction *action,
+                                                    gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_show_rename_directory_dialog (ET_BROWSER (priv->browser));
+}
+
 GtkWidget *
 et_application_window_get_scan_dialog (EtApplicationWindow *self)
 {
@@ -2090,6 +2404,21 @@ et_on_action_select_scan_mode (GtkRadioAction *action, GtkRadioAction *current,
     et_scan_dialog_open (ET_SCAN_DIALOG (priv->scan_dialog), SCANNER_TYPE);
 }
 
+void
+et_on_action_select_browser_mode (G_GNUC_UNUSED GtkRadioAction *action,
+                                  G_GNUC_UNUSED GtkRadioAction *current,
+                                  gpointer user_data)
+{
+    g_return_if_fail (ETCore->ETFileDisplayedList != NULL);
+
+    /* Save the current displayed data */
+    ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
+
+    et_application_window_browser_toggle_display_mode (ET_APPLICATION_WINDOW (user_data));
+
+    Update_Command_Buttons_Sensivity();
+}
+
 /*
  * Disable (FALSE) / Enable (TRUE) all user widgets in the tag area
  */
@@ -2373,14 +2702,84 @@ et_application_window_select_all (GtkAction *action, gpointer user_data)
     }
     else /* Assume that other widgets should select all in the file view. */
     {
+        EtApplicationWindowPrivate *priv;
+        EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+        priv = et_application_window_get_instance_private (self);
+
         /* Save the current displayed data */
         ET_Save_File_Data_From_UI (ETCore->ETFileDisplayed);
 
-        Browser_List_Select_All_Files ();
+        et_browser_select_all (ET_BROWSER (priv->browser));
         Update_Command_Buttons_Sensivity ();
     }
 }
 
+void
+et_application_window_browser_select_file_by_et_file (EtApplicationWindow *self,
+                                                      ET_File *file,
+                                                      gboolean select)
+{
+    EtApplicationWindowPrivate *priv;
+
+    priv = et_application_window_get_instance_private (self);
+
+    return et_browser_select_file_by_et_file (ET_BROWSER (priv->browser), file,
+                                              select);
+}
+
+GtkTreePath *
+et_application_window_browser_select_file_by_et_file2 (EtApplicationWindow *self,
+                                                       ET_File *file,
+                                                       gboolean select,
+                                                       GtkTreePath *start_path)
+{
+    EtApplicationWindowPrivate *priv;
+
+    priv = et_application_window_get_instance_private (self);
+
+    return et_browser_select_file_by_et_file2 (ET_BROWSER (priv->browser),
+                                               file, select, start_path);
+}
+
+ET_File *
+et_application_window_browser_select_file_by_dlm (EtApplicationWindow *self,
+                                                  const gchar *string,
+                                                  gboolean select)
+{
+    EtApplicationWindowPrivate *priv;
+
+    priv = et_application_window_get_instance_private (self);
+
+    return et_browser_select_file_by_dlm (ET_BROWSER (priv->browser), string,
+                                          select);
+}
+
+void
+et_application_window_browser_unselect_all (EtApplicationWindow *self)
+{
+    EtApplicationWindowPrivate *priv;
+
+    priv = et_application_window_get_instance_private (self);
+
+    /* Save the current displayed data */
+    ET_Save_File_Data_From_UI (ETCore->ETFileDisplayed);
+
+    et_browser_unselect_all (ET_BROWSER (priv->browser));
+    ETCore->ETFileDisplayed = NULL;
+}
+
+void
+et_application_window_browser_refresh_list (EtApplicationWindow *self)
+{
+    EtApplicationWindowPrivate *priv;
+
+    g_return_if_fail (ET_APPLICATION_WINDOW (self));
+
+    priv = et_application_window_get_instance_private (self);
+
+    et_browser_refresh_list (ET_BROWSER (priv->browser));
+}
 /*
  * Action when unselecting all
  */
@@ -2406,27 +2805,44 @@ et_application_window_unselect_all (GtkAction *action, gpointer user_data)
         GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (focused));
         gtk_tree_selection_unselect_all (selection);
     }
-    else /* Assume that other widgets should select all in the file view. */
+    else /* Assume that other widgets should unselect all in the file view. */
     {
-        /* Save the current displayed data */
-        ET_Save_File_Data_From_UI (ETCore->ETFileDisplayed);
-
-        Browser_List_Unselect_All_Files ();
-        ETCore->ETFileDisplayed = NULL;
+        et_application_window_browser_unselect_all (ET_APPLICATION_WINDOW (user_data));
     }
 }
 
 /*
+ * Action when inverting files selection
+ */
+void
+et_application_window_invert_selection (GtkAction *action, gpointer user_data)
+{
+    EtApplicationWindowPrivate *priv;
+    EtApplicationWindow *self = ET_APPLICATION_WINDOW (user_data);
+
+    priv = et_application_window_get_instance_private (self);
+
+    /* Save the current displayed data */
+    ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
+
+    et_browser_invert_selection (ET_BROWSER (priv->browser));
+    Update_Command_Buttons_Sensivity();
+}
+
+/*
  * Action when First button is selected
  */
 void
 et_application_window_select_first_file (GtkAction *action, gpointer user_data)
 {
+    EtApplicationWindow *self;
     GList *etfilelist;
 
     if (!ETCore->ETFileDisplayedList)
         return;
 
+    self = ET_APPLICATION_WINDOW (user_data);
+
     /* Save the current displayed data */
     ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
 
@@ -2434,13 +2850,20 @@ et_application_window_select_first_file (GtkAction *action, gpointer user_data)
     etfilelist = ET_Displayed_File_List_First();
     if (etfilelist)
     {
-        Browser_List_Unselect_All_Files(); // To avoid the last line still selected
-        Browser_List_Select_File_By_Etfile((ET_File *)etfilelist->data,TRUE);
+        EtApplicationWindowPrivate *priv;
+
+        priv = et_application_window_get_instance_private (self);
+
+        /* To avoid the last line still selected. */
+        et_browser_unselect_all (ET_BROWSER (priv->browser));
+        et_application_window_browser_select_file_by_et_file (self,
+                                                              (ET_File *)etfilelist->data,
+                                                              TRUE);
         ET_Display_File_Data_To_UI((ET_File *)etfilelist->data);
     }
 
     Update_Command_Buttons_Sensivity();
-    et_scan_dialog_update_previews (ET_SCAN_DIALOG (et_application_window_get_scan_dialog 
(ET_APPLICATION_WINDOW (user_data))));
+    et_scan_dialog_update_previews (ET_SCAN_DIALOG (et_application_window_get_scan_dialog (self)));
 
     if (SET_FOCUS_TO_FIRST_TAG_FIELD)
         gtk_widget_grab_focus(GTK_WIDGET(TitleEntry));
@@ -2453,11 +2876,14 @@ et_application_window_select_first_file (GtkAction *action, gpointer user_data)
 void
 et_application_window_select_prev_file (GtkAction *action, gpointer user_data)
 {
+    EtApplicationWindow *self;
     GList *etfilelist;
 
     if (!ETCore->ETFileDisplayedList || !ETCore->ETFileDisplayedList->prev)
         return;
 
+    self = ET_APPLICATION_WINDOW (user_data);
+
     /* Save the current displayed data */
     ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
 
@@ -2465,8 +2891,14 @@ et_application_window_select_prev_file (GtkAction *action, gpointer user_data)
     etfilelist = ET_Displayed_File_List_Previous();
     if (etfilelist)
     {
-        Browser_List_Unselect_All_Files();
-        Browser_List_Select_File_By_Etfile((ET_File *)etfilelist->data,TRUE);
+        EtApplicationWindowPrivate *priv;
+
+        priv = et_application_window_get_instance_private (self);
+
+        et_browser_unselect_all (ET_BROWSER (priv->browser));
+        et_application_window_browser_select_file_by_et_file (self,
+                                                              (ET_File *)etfilelist->data,
+                                                              TRUE);
         ET_Display_File_Data_To_UI((ET_File *)etfilelist->data);
     }
 
@@ -2474,7 +2906,7 @@ et_application_window_select_prev_file (GtkAction *action, gpointer user_data)
 //        gdk_beep(); // Warm the user
 
     Update_Command_Buttons_Sensivity();
-    et_scan_dialog_update_previews (ET_SCAN_DIALOG (et_application_window_get_scan_dialog 
(ET_APPLICATION_WINDOW (user_data))));
+    et_scan_dialog_update_previews (ET_SCAN_DIALOG (et_application_window_get_scan_dialog (self)));
 
     if (SET_FOCUS_TO_FIRST_TAG_FIELD)
         gtk_widget_grab_focus(GTK_WIDGET(TitleEntry));
@@ -2487,11 +2919,14 @@ et_application_window_select_prev_file (GtkAction *action, gpointer user_data)
 void
 et_application_window_select_next_file (GtkAction *acton, gpointer user_data)
 {
+    EtApplicationWindow *self;
     GList *etfilelist;
 
     if (!ETCore->ETFileDisplayedList || !ETCore->ETFileDisplayedList->next)
         return;
 
+    self = ET_APPLICATION_WINDOW (user_data);
+
     /* Save the current displayed data */
     ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
 
@@ -2499,8 +2934,14 @@ et_application_window_select_next_file (GtkAction *acton, gpointer user_data)
     etfilelist = ET_Displayed_File_List_Next();
     if (etfilelist)
     {
-        Browser_List_Unselect_All_Files();
-        Browser_List_Select_File_By_Etfile((ET_File *)etfilelist->data,TRUE);
+        EtApplicationWindowPrivate *priv;
+
+        priv = et_application_window_get_instance_private (self);
+
+        et_browser_unselect_all (ET_BROWSER (priv->browser));
+        et_application_window_browser_select_file_by_et_file (self,
+                                                              (ET_File *)etfilelist->data,
+                                                              TRUE);
         ET_Display_File_Data_To_UI((ET_File *)etfilelist->data);
     }
 
@@ -2508,7 +2949,7 @@ et_application_window_select_next_file (GtkAction *acton, gpointer user_data)
 //        gdk_beep(); // Warm the user
 
     Update_Command_Buttons_Sensivity();
-    et_scan_dialog_update_previews (ET_SCAN_DIALOG (et_application_window_get_scan_dialog 
(ET_APPLICATION_WINDOW (user_data))));
+    et_scan_dialog_update_previews (ET_SCAN_DIALOG (et_application_window_get_scan_dialog (self)));
 
     if (SET_FOCUS_TO_FIRST_TAG_FIELD)
         gtk_widget_grab_focus(GTK_WIDGET(TitleEntry));
@@ -2521,11 +2962,14 @@ et_application_window_select_next_file (GtkAction *acton, gpointer user_data)
 void
 et_application_window_select_last_file (GtkAction *action, gpointer user_data)
 {
+    EtApplicationWindow *self;
     GList *etfilelist;
 
     if (!ETCore->ETFileDisplayedList || !ETCore->ETFileDisplayedList->next)
         return;
 
+    self = ET_APPLICATION_WINDOW (user_data);
+
     /* Save the current displayed data */
     ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
 
@@ -2533,14 +2977,377 @@ et_application_window_select_last_file (GtkAction *action, gpointer user_data)
     etfilelist = ET_Displayed_File_List_Last();
     if (etfilelist)
     {
-        Browser_List_Unselect_All_Files();
-        Browser_List_Select_File_By_Etfile((ET_File *)etfilelist->data,TRUE);
+        EtApplicationWindowPrivate *priv;
+
+        priv = et_application_window_get_instance_private (self);
+
+        et_browser_unselect_all (ET_BROWSER (priv->browser));
+        et_application_window_browser_select_file_by_et_file (self,
+                                                              (ET_File *)etfilelist->data,
+                                                              TRUE);
         ET_Display_File_Data_To_UI((ET_File *)etfilelist->data);
     }
 
     Update_Command_Buttons_Sensivity();
-    et_scan_dialog_update_previews (ET_SCAN_DIALOG (et_application_window_get_scan_dialog 
(ET_APPLICATION_WINDOW (user_data))));
+    et_scan_dialog_update_previews (ET_SCAN_DIALOG (et_application_window_get_scan_dialog (self)));
 
     if (SET_FOCUS_TO_FIRST_TAG_FIELD)
         gtk_widget_grab_focus(GTK_WIDGET(TitleEntry));
 }
+
+/*
+ * Action when Remove button is pressed
+ */
+void
+et_application_window_remove_selected_tags (GtkAction *action,
+                                            gpointer user_data)
+{
+    GList *selfilelist = NULL;
+    GList *l;
+    ET_File *etfile;
+    File_Tag *FileTag;
+    gint progress_bar_index;
+    gint selectcount;
+    double fraction;
+    GtkTreeSelection *selection;
+
+    g_return_if_fail (ETCore->ETFileDisplayedList != NULL ||
+                      BrowserList != NULL);
+
+    /* Save the current displayed data */
+    ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
+
+    /* Initialize status bar */
+    gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), 0.0);
+    selectcount = 
gtk_tree_selection_count_selected_rows(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList)));
+    progress_bar_index = 0;
+
+    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList));
+    selfilelist = gtk_tree_selection_get_selected_rows(selection, NULL);
+
+    for (l = selfilelist; l != NULL; l = g_list_next (l))
+    {
+        etfile = Browser_List_Get_ETFile_From_Path (l->data);
+        FileTag = ET_File_Tag_Item_New();
+        ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
+
+        fraction = (++progress_bar_index) / (double) selectcount;
+        gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), fraction);
+        /* Needed to refresh status bar */
+        while (gtk_events_pending())
+            gtk_main_iteration();
+    }
+
+    g_list_free_full (selfilelist, (GDestroyNotify)gtk_tree_path_free);
+
+    /* Refresh the whole list (faster than file by file) to show changes. */
+    et_application_window_browser_refresh_list (ET_APPLICATION_WINDOW (user_data));
+
+    /* Display the current file */
+    ET_Display_File_Data_To_UI(ETCore->ETFileDisplayed);
+    Update_Command_Buttons_Sensivity();
+
+    gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), 0.0);
+    Statusbar_Message(_("All tags have been removed"),TRUE);
+}
+
+
+
+/*
+ * Action when Undo button is pressed.
+ * Action_Undo_Selected_Files: Undo the last changes for the selected files.
+ * Action_Undo_From_History_List: Undo the changes of the last modified file of the list.
+ */
+void
+et_application_window_undo_selected_files (GtkAction *action,
+                                           gpointer user_data)
+{
+    GList *selfilelist = NULL;
+    GList *l;
+    gboolean state = FALSE;
+    ET_File *etfile;
+    GtkTreeSelection *selection;
+
+    g_return_val_if_fail (ETCore->ETFileDisplayedList != NULL ||
+                          BrowserList != NULL, FALSE);
+
+    /* Save the current displayed data */
+    ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
+
+    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList));
+    selfilelist = gtk_tree_selection_get_selected_rows(selection, NULL);
+
+    for (l = selfilelist; l != NULL; l = g_list_next (l))
+    {
+        etfile = Browser_List_Get_ETFile_From_Path (l->data);
+        state |= ET_Undo_File_Data(etfile);
+    }
+
+    g_list_free_full (selfilelist, (GDestroyNotify)gtk_tree_path_free);
+
+    /* Refresh the whole list (faster than file by file) to show changes. */
+    et_application_window_browser_refresh_list (ET_APPLICATION_WINDOW (user_data));
+
+    /* Display the current file */
+    ET_Display_File_Data_To_UI(ETCore->ETFileDisplayed);
+    Update_Command_Buttons_Sensivity();
+
+    //ET_Debug_Print_File_List(ETCore->ETFileList,__FILE__,__LINE__,__FUNCTION__);
+}
+
+/*
+ * Delete the file ETFile
+ */
+static gint
+delete_file (ET_File *ETFile, gboolean multiple_files, GError **error)
+{
+    GtkWidget *msgdialog;
+    GtkWidget *msgdialog_check_button = NULL;
+    gchar *cur_filename;
+    gchar *cur_filename_utf8;
+    gchar *basename_utf8;
+    gint response;
+    gint stop_loop;
+
+    g_return_val_if_fail (ETFile != NULL, FALSE);
+    g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+    /* Filename of the file to delete. */
+    cur_filename      = ((File_Name *)(ETFile->FileNameCur)->data)->value;
+    cur_filename_utf8 = ((File_Name *)(ETFile->FileNameCur)->data)->value_utf8;
+    basename_utf8 = g_path_get_basename (cur_filename_utf8);
+
+    /*
+     * Remove the file
+     */
+    if (CONFIRM_DELETE_FILE && !SF_HideMsgbox_Delete_File)
+    {
+        if (multiple_files)
+        {
+            GtkWidget *message_area;
+            msgdialog = gtk_message_dialog_new(GTK_WINDOW(MainWindow),
+                                               GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+                                               GTK_MESSAGE_QUESTION,
+                                               GTK_BUTTONS_NONE,
+                                               _("Do you really want to delete the file '%s'?"),
+                                               basename_utf8);
+            message_area = gtk_message_dialog_get_message_area(GTK_MESSAGE_DIALOG(msgdialog));
+            msgdialog_check_button = gtk_check_button_new_with_label(_("Repeat action for the remaining 
files"));
+            gtk_container_add(GTK_CONTAINER(message_area),msgdialog_check_button);
+            
gtk_dialog_add_buttons(GTK_DIALOG(msgdialog),GTK_STOCK_NO,GTK_RESPONSE_NO,GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,GTK_STOCK_DELETE,GTK_RESPONSE_YES,NULL);
+            gtk_window_set_title(GTK_WINDOW(msgdialog),_("Delete File"));
+            //GTK_TOGGLE_BUTTON(msgbox_check_button)->active = TRUE; // Checked by default
+        }else
+        {
+            msgdialog = gtk_message_dialog_new(GTK_WINDOW(MainWindow),
+                                               GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+                                               GTK_MESSAGE_QUESTION,
+                                               GTK_BUTTONS_NONE,
+                                               _("Do you really want to delete the file '%s'?"),
+                                               basename_utf8);
+            gtk_window_set_title(GTK_WINDOW(msgdialog),_("Delete File"));
+            
gtk_dialog_add_buttons(GTK_DIALOG(msgdialog),GTK_STOCK_CANCEL,GTK_RESPONSE_NO,GTK_STOCK_DELETE,GTK_RESPONSE_YES,NULL);
+        }
+        gtk_dialog_set_default_response (GTK_DIALOG (msgdialog),
+                                         GTK_RESPONSE_YES);
+        SF_ButtonPressed_Delete_File = response = gtk_dialog_run(GTK_DIALOG(msgdialog));
+        if (msgdialog_check_button && 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(msgdialog_check_button)))
+            SF_HideMsgbox_Delete_File = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(msgdialog_check_button));
+        gtk_widget_destroy(msgdialog);
+    }else
+    {
+        if (SF_HideMsgbox_Delete_File)
+            response = SF_ButtonPressed_Delete_File;
+        else
+            response = GTK_RESPONSE_YES;
+    }
+
+    switch (response)
+    {
+        case GTK_RESPONSE_YES:
+        {
+            GFile *cur_file = g_file_new_for_path (cur_filename);
+
+            if (g_file_delete (cur_file, NULL, error))
+            {
+                gchar *msg = g_strdup_printf(_("File '%s' deleted"), basename_utf8);
+                Statusbar_Message(msg,FALSE);
+                g_free(msg);
+                g_free(basename_utf8);
+                g_object_unref (cur_file);
+                g_assert (error == NULL || *error == NULL);
+                return 1;
+            }
+
+            /* Error in deleting file. */
+            g_assert (error == NULL || *error != NULL);
+            break;
+        }
+        case GTK_RESPONSE_NO:
+            break;
+        case GTK_RESPONSE_CANCEL:
+        case GTK_RESPONSE_DELETE_EVENT:
+            stop_loop = -1;
+            g_free(basename_utf8);
+            return stop_loop;
+            break;
+        default:
+            g_assert_not_reached ();
+            break;
+    }
+
+    g_free(basename_utf8);
+    return 0;
+}
+
+/*
+ * Delete a file on the hard disk
+ */
+void
+et_application_window_delete_selected_files (GtkAction *action,
+                                             gpointer user_data)
+{
+    EtApplicationWindow *self;
+    EtApplicationWindowPrivate *priv;
+    GList *selfilelist;
+    GList *rowreflist = NULL;
+    GList *l;
+    gint   progress_bar_index;
+    gint   saving_answer;
+    gint   nb_files_to_delete;
+    gint   nb_files_deleted = 0;
+    gchar *msg;
+    gchar progress_bar_text[30];
+    double fraction;
+    GtkTreeModel *treemodel;
+    GtkTreeRowReference *rowref;
+    GtkTreeSelection *selection;
+    GError *error = NULL;
+
+    g_return_if_fail (ETCore->ETFileDisplayedList != NULL
+                      && BrowserList != NULL);
+
+    self = ET_APPLICATION_WINDOW (user_data);
+    priv = et_application_window_get_instance_private (self);
+
+    /* Save the current displayed data */
+    ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
+
+    /* Number of files to save */
+    nb_files_to_delete = 
gtk_tree_selection_count_selected_rows(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList)));
+
+    /* Initialize status bar */
+    gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar),0);
+    progress_bar_index = 0;
+    g_snprintf(progress_bar_text, 30, "%d/%d", progress_bar_index, nb_files_to_delete);
+    gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ProgressBar), progress_bar_text);
+
+    /* Set to unsensitive all command buttons (except Quit button) */
+    Disable_Command_Buttons();
+    et_application_window_browser_set_sensitive (self, FALSE);
+    et_application_window_tag_area_set_sensitive (self, FALSE);
+    et_application_window_file_area_set_sensitive (self, FALSE);
+
+    /* Show msgbox (if needed) to ask confirmation */
+    SF_HideMsgbox_Delete_File = 0;
+
+    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList));
+    selfilelist = gtk_tree_selection_get_selected_rows(selection, &treemodel);
+
+    for (l = selfilelist; l != NULL; l = g_list_next (l))
+    {
+        rowref = gtk_tree_row_reference_new (treemodel, l->data);
+        rowreflist = g_list_prepend (rowreflist, rowref);
+    }
+
+    g_list_free_full (selfilelist, (GDestroyNotify)gtk_tree_path_free);
+    rowreflist = g_list_reverse (rowreflist);
+
+    for (l = rowreflist; l != NULL; l = g_list_next (l))
+    {
+        GtkTreePath *path;
+        ET_File *ETFile;
+
+        path = gtk_tree_row_reference_get_path (l->data);
+        ETFile = Browser_List_Get_ETFile_From_Path(path);
+        gtk_tree_path_free(path);
+
+        ET_Display_File_Data_To_UI(ETFile);
+        et_application_window_browser_select_file_by_et_file (self, ETFile,
+                                                              FALSE);
+        fraction = (++progress_bar_index) / (double) nb_files_to_delete;
+        gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), fraction);
+        g_snprintf(progress_bar_text, 30, "%d/%d", progress_bar_index, nb_files_to_delete);
+        gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ProgressBar), progress_bar_text);
+         /* Needed to refresh status bar */
+        while (gtk_events_pending())
+            gtk_main_iteration();
+
+        saving_answer = delete_file (ETFile,
+                                     nb_files_to_delete > 1 ? TRUE : FALSE,
+                                     &error);
+
+        switch (saving_answer)
+        {
+            case 1:
+                nb_files_deleted += saving_answer;
+                // Remove file in the browser (corresponding line in the clist)
+                et_browser_remove_file (ET_BROWSER (priv->browser), ETFile);
+                // Remove file from file list
+                ET_Remove_File_From_File_List(ETFile);
+                break;
+            case 0:
+                /* Distinguish between the file being skipped, and there being
+                 * an error during deletion. */
+                if (error)
+                {
+                    Log_Print (LOG_ERROR, _("Cannot delete file (%s)"),
+                               error->message);
+                    g_clear_error (&error);
+                }
+                break;
+            case -1:
+                // Stop deleting files + reinit progress bar
+                gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar),0.0);
+                // To update state of command buttons
+                Update_Command_Buttons_Sensivity();
+                et_application_window_browser_set_sensitive (self, TRUE);
+                et_application_window_tag_area_set_sensitive (self, TRUE);
+                et_application_window_file_area_set_sensitive (self, TRUE);
+
+                return; /*We stop all actions. */
+        }
+    }
+
+    g_list_free_full (rowreflist, (GDestroyNotify)gtk_tree_row_reference_free);
+
+    if (nb_files_deleted < nb_files_to_delete)
+        msg = g_strdup (_("Files have been partially deleted"));
+    else
+        msg = g_strdup (_("All files have been deleted"));
+
+    /* It's important to displayed the new item, as it'll check the changes in 
et_browser_toggle_display_mode. */
+    if (ETCore->ETFileDisplayed)
+        ET_Display_File_Data_To_UI(ETCore->ETFileDisplayed);
+    /*else if (ET_Displayed_File_List_Current())
+        ET_Display_File_Data_To_UI((ET_File *)ET_Displayed_File_List_Current()->data);*/
+
+    /* Load list... */
+    et_browser_load_file_list (ET_BROWSER (priv->browser),
+                               ETCore->ETFileDisplayedList, NULL);
+    /* Rebuild the list... */
+    et_browser_toggle_display_mode (ET_BROWSER (priv->browser));
+
+    /* To update state of command buttons */
+    Update_Command_Buttons_Sensivity();
+    et_application_window_browser_set_sensitive (self, TRUE);
+    et_application_window_tag_area_set_sensitive (self, TRUE);
+    et_application_window_file_area_set_sensitive (self, TRUE);
+
+    gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ProgressBar), "");
+    gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), 0);
+    Statusbar_Message(msg,TRUE);
+    g_free(msg);
+
+    return;
+}
diff --git a/src/application_window.h b/src/application_window.h
index b3a6c7a..dd0dd63 100644
--- a/src/application_window.h
+++ b/src/application_window.h
@@ -63,16 +63,49 @@ void et_application_window_show_preferences_dialog_scanner (GtkAction *action, g
 GtkWidget * et_application_window_get_cddb_dialog (EtApplicationWindow *self);
 void et_application_window_show_cddb_dialog (GtkAction *action, gpointer user_data);
 void et_application_window_search_cddb_for_selection (GtkAction *action, gpointer user_data);
+void et_application_window_browser_collapse (GtkAction *action, gpointer user_data);
+void et_application_window_browser_reload (GtkAction *action, gpointer user_data);
+void et_application_window_browser_toggle_display_mode (EtApplicationWindow *self);
+void et_application_window_browser_set_sensitive (EtApplicationWindow *self, gboolean sensitive);
+void et_application_window_browser_clear (EtApplicationWindow *self);
+void et_application_window_go_home (GtkAction *action, gpointer user_data);
+void et_application_window_go_desktop (GtkAction *action, gpointer user_data);
+void et_application_window_go_documents (GtkAction *action, gpointer user_data);
+void et_application_window_go_download (GtkAction *action, gpointer user_data);
+void et_application_window_go_music (GtkAction *action, gpointer user_data);
+void et_application_window_go_parent (GtkAction *action, gpointer user_data);
+void et_application_window_run_player_for_album_list (GtkAction *action, gpointer user_data);
+void et_application_window_run_player_for_artist_list (GtkAction *action, gpointer user_data);
+void et_application_window_run_player_for_selection (GtkAction *action, gpointer user_data);
+void et_application_window_reload_directory (GtkAction *action, gpointer user_data);
+void et_application_window_select_dir (EtApplicationWindow *self, const gchar *path);
+void et_application_window_load_default_dir (GtkAction *action, gpointer user_data);
+void et_application_window_set_current_path_default (GtkAction *action, gpointer user_data);
+const gchar * et_application_window_get_current_path (EtApplicationWindow *self);
+void et_application_window_show_open_directory_with_dialog (GtkAction *action, gpointer user_data);
+void et_application_window_show_open_files_with_dialog (GtkAction *action, gpointer user_data);
+void et_application_window_show_rename_directory_dialog (GtkAction *action, gpointer user_data);
 GtkWidget * et_application_window_get_scan_dialog (EtApplicationWindow *self);
 void et_application_window_show_scan_dialog (GtkAction *action, gpointer user_data);
 void et_application_window_scan_selected_files (GtkAction *action, gpointer user_data);
 void et_on_action_select_scan_mode (GtkRadioAction *action, GtkRadioAction *current, gpointer user_data);
+void et_on_action_select_browser_mode (GtkRadioAction *action, GtkRadioAction *current, gpointer user_data);
 void et_application_window_select_all (GtkAction *action, gpointer user_data);
+void et_application_window_browser_select_file_by_et_file (EtApplicationWindow *self, ET_File *file, 
gboolean select);
+GtkTreePath * et_application_window_browser_select_file_by_et_file2 (EtApplicationWindow *self, ET_File 
*file, gboolean select, GtkTreePath *start_path);
+ET_File * et_application_window_browser_select_file_by_dlm (EtApplicationWindow *self, const gchar *string, 
gboolean select);
+void et_application_window_browser_unselect_all (EtApplicationWindow *self);
+void et_application_window_browser_refresh_list (EtApplicationWindow *self);
 void et_application_window_unselect_all (GtkAction *action, gpointer user_data);
+void et_application_window_invert_selection (GtkAction *action, gpointer user_data);
 void et_application_window_select_prev_file (GtkAction *action, gpointer user_data);
 void et_application_window_select_next_file (GtkAction *action, gpointer user_data);
 void et_application_window_select_first_file (GtkAction *action, gpointer user_data);
 void et_application_window_select_last_file (GtkAction *action, gpointer user_data);
+void et_application_window_delete_selected_files (GtkAction *action, gpointer user_data);
+void et_application_window_remove_selected_tags (GtkAction *action, gpointer user_data);
+void et_application_window_undo_selected_files (GtkAction *action, gpointer user_data);
+void et_application_window_redo_selected_files (GtkAction *action, gpointer user_data);
 void et_application_window_hide_log_area (EtApplicationWindow *self);
 void et_application_window_show_log_area (EtApplicationWindow *self);
 
diff --git a/src/bar.c b/src/bar.c
index 9ee416b..0aa32ff 100644
--- a/src/bar.c
+++ b/src/bar.c
@@ -80,6 +80,16 @@ static void on_menu_item_deselect (GtkMenuItem *item, gpointer user_data);
 #define QCASE(string,callback) if (quark == g_quark_from_string((string))) { (callback)(); }
 #define QCASE_DATA(string,callback,data) if (quark == g_quark_from_string((string))) { (callback)((data)); }
 
+static void
+reload_browser (gpointer data)
+{
+    EtApplicationWindow *window;
+
+    window = ET_APPLICATION_WINDOW (data);
+
+    et_application_window_browser_reload (NULL, window);
+}
+
 /*
  * Menu bar
  */
@@ -129,7 +139,7 @@ Menu_Sort_Action (GtkAction *item, gpointer data)
     QCASE_DATA(AM_SORT_DESCENDING_FILE_BITRATE,    ET_Sort_Displayed_File_List_And_Update_UI, 
SORTING_BY_DESCENDING_FILE_BITRATE);
     QCASE_DATA(AM_SORT_ASCENDING_FILE_SAMPLERATE,  ET_Sort_Displayed_File_List_And_Update_UI, 
SORTING_BY_ASCENDING_FILE_SAMPLERATE);
     QCASE_DATA(AM_SORT_DESCENDING_FILE_SAMPLERATE, ET_Sort_Displayed_File_List_And_Update_UI, 
SORTING_BY_DESCENDING_FILE_SAMPLERATE);
-    QCASE_DATA(AM_INITIALIZE_TREE,                 Browser_Tree_Rebuild,                      NULL);
+    QCASE_DATA(AM_INITIALIZE_TREE, reload_browser, data);
     Browser_List_Refresh_Sort ();
 }
 
@@ -206,17 +216,18 @@ Create_UI (GtkWindow *window, GtkWidget **ppmenubar, GtkWidget **pptoolbar)
 
         { AM_OPEN_FILE_WITH, GTK_STOCK_OPEN, _("Open Files With…"),
           "<Primary><Shift>O", _("Run a command on the selected files"),
-          G_CALLBACK (Browser_Open_Run_Program_List_Window) },
+          G_CALLBACK (et_application_window_show_open_files_with_dialog) },
         { AM_SELECT_ALL, GTK_STOCK_SELECT_ALL, NULL, "<Primary>A",
           _("Select all"), G_CALLBACK (et_application_window_select_all) },
         { AM_UNSELECT_ALL, "easytag-unselect-all", _("Unselect All"),
           "<Primary><Shift>A", _("Clear the current selection"),
           G_CALLBACK (et_application_window_unselect_all) },
         { AM_INVERT_SELECTION, "easytag-invert-selection",
-          _("Invert File Selection"), "<Primary>I",
-          _("Invert file selection"),
-          G_CALLBACK (Action_Invert_Files_Selection) },
-        { AM_DELETE_FILE,        GTK_STOCK_DELETE,           _("Delete Files"),             NULL,            
    _("Delete files"),            G_CALLBACK(Action_Delete_Selected_Files) },
+          _("Invert File Selection"), "<Primary>I", _("Invert file selection"),
+          G_CALLBACK (et_application_window_invert_selection) },
+        { AM_DELETE_FILE, GTK_STOCK_DELETE, _("Delete Files"), NULL,
+          _("Delete files"),
+          G_CALLBACK (et_application_window_delete_selected_files) },
         { AM_FIRST, GTK_STOCK_GOTO_FIRST, _("_First File"), "<Primary>Home",
           _("First file"),
           G_CALLBACK (et_application_window_select_first_file) },
@@ -233,13 +244,14 @@ Create_UI (GtkWindow *window, GtkWidget **ppmenubar, GtkWidget **pptoolbar)
           _("Scan selected files"),
           G_CALLBACK (et_application_window_scan_selected_files) },
         { AM_REMOVE, GTK_STOCK_CLEAR, _("_Remove Tags"), "<Primary>E",
-          _("Remove tags"), G_CALLBACK (Action_Remove_Selected_Tags) },
+          _("Remove tags"),
+          G_CALLBACK (et_application_window_remove_selected_tags) },
         { AM_UNDO, GTK_STOCK_UNDO, _("_Undo Last Files Changes"), "<Primary>Z",
           _("Undo last files changes"),
-          G_CALLBACK(Action_Undo_Selected_Files) },
+          G_CALLBACK (et_application_window_undo_selected_files) },
         { AM_REDO, GTK_STOCK_REDO, _("R_edo Last Files Changes"),
           "<Primary><Shift>Z", _("Redo last files changes"),
-          G_CALLBACK (Action_Redo_Selected_File) },
+          G_CALLBACK (et_application_window_redo_selected_files) },
         { AM_SAVE, GTK_STOCK_SAVE, _("_Save Files"), "<Primary>S",
           _("Save changes to selected files"),
           G_CALLBACK(Action_Save_Selected_Files) },
@@ -254,39 +266,45 @@ Create_UI (GtkWindow *window, GtkWidget **ppmenubar, GtkWidget **pptoolbar)
         { MENU_BROWSER,                NULL,                   _("_Browser"),                      NULL,     
           NULL,                               NULL },
         { AM_LOAD_HOME_DIR, GTK_STOCK_HOME, _("_Home Directory"), "<Alt>Home",
           _("Go to home directory"),
-          G_CALLBACK (Browser_Load_Home_Directory) },
+          G_CALLBACK (et_application_window_go_home) },
         { AM_LOAD_DESKTOP_DIR, "user-desktop", _("Desktop Directory"), NULL,
           _("Go to desktop directory"),
-          G_CALLBACK (Browser_Load_Desktop_Directory) },
+          G_CALLBACK (et_application_window_go_desktop) },
         { AM_LOAD_DOCUMENTS_DIR, "folder-documents", _("Documents Directory"),
           NULL, _("Go to documents directory"),
-          G_CALLBACK (Browser_Load_Documents_Directory) },
+          G_CALLBACK (et_application_window_go_documents) },
         { AM_LOAD_DOWNLOADS_DIR, "folder-download", _("Downloads Directory"),
           NULL, _("Go to downloads directory"),
-          G_CALLBACK (Browser_Load_Downloads_Directory) },
+          G_CALLBACK (et_application_window_go_download) },
         { AM_LOAD_MUSIC_DIR, "folder-music", _("Music Directory"), NULL,
           _("Go to music directory"),
-          G_CALLBACK (Browser_Load_Music_Directory) },
+          G_CALLBACK (et_application_window_go_music) },
         { AM_LOAD_PARENT_DIR, GTK_STOCK_GO_UP, _("_Parent Directory"),
           "<Alt>Up", _("Go to parent directory"),
-          G_CALLBACK (et_browser_on_action_parent_directory) },
+          G_CALLBACK (et_application_window_go_parent) },
         { AM_LOAD_DEFAULT_DIR, GTK_STOCK_JUMP_TO, _("_Default Directory"),
           "<Primary>D", _("Go to default directory"),
-          G_CALLBACK (Browser_Load_Default_Directory) },
-        { AM_SET_PATH_AS_DEFAULT,      GTK_STOCK_DIRECTORY,    _("Set _Current Path as Default"),  NULL,     
           _("Set current path as default"),   G_CALLBACK(Set_Current_Path_As_Default) },
-        { AM_RENAME_DIR,               GTK_STOCK_INDEX,        _("Rename Directory…"),          "F2",        
        _("Rename directory"),          G_CALLBACK(Browser_Open_Rename_Directory_Window) },
+          G_CALLBACK (et_application_window_load_default_dir) },
+        { AM_SET_PATH_AS_DEFAULT, GTK_STOCK_DIRECTORY,
+          _("Set _Current Path as Default"), NULL,
+          _("Set current path as default"),
+          G_CALLBACK (et_application_window_set_current_path_default) },
+        { AM_RENAME_DIR, GTK_STOCK_INDEX, _("Rename Directory…"), "F2",
+          _("Rename directory"),
+          G_CALLBACK (et_application_window_show_rename_directory_dialog) },
         { AM_RELOAD_DIRECTORY, GTK_STOCK_REFRESH, _("Reload Directory"),
           "<Primary>R", _("Reload directory"),
-          G_CALLBACK (Browser_Reload_Directory) },
+          G_CALLBACK (et_application_window_reload_directory) },
         { AM_BROWSE_DIRECTORY_WITH, GTK_STOCK_EXECUTE,
           _("Browse Directory With…"), NULL,
           _("Run a command on the directory"),
-          G_CALLBACK (Browser_Open_Run_Program_Tree_Window) },
+          G_CALLBACK (et_application_window_show_open_directory_with_dialog) },
         { AM_COLLAPSE_TREE, NULL, _("_Collapse Tree"), "<Primary><Shift>C",
-          _("Collapse directory tree"), G_CALLBACK (Browser_Tree_Collapse) },
+          _("Collapse directory tree"),
+          G_CALLBACK (et_application_window_browser_collapse) },
         { AM_INITIALIZE_TREE, GTK_STOCK_REFRESH, _("_Reload Tree"),
           "<Primary><Shift>R", _("Reload directory tree"),
-          G_CALLBACK (Browser_Tree_Rebuild) },
+          G_CALLBACK (et_application_window_browser_reload) },
 
         { MENU_SCANNER, NULL, _("S_canner Mode"), NULL, NULL, NULL },
 
@@ -306,7 +324,7 @@ Create_UI (GtkWindow *window, GtkWidget **ppmenubar, GtkWidget **pptoolbar)
           G_CALLBACK (et_application_window_show_playlist_dialog) },
         { AM_RUN_AUDIO_PLAYER, GTK_STOCK_MEDIA_PLAY, _("Run Audio Player"),
           "<Primary>M", _("Run audio player"),
-          G_CALLBACK (Run_Audio_Player_Using_Selection) },
+          G_CALLBACK (et_browser_run_player_for_selection) },
 
         { MENU_EDIT, NULL, _("_Edit"), NULL, NULL, NULL },
         { AM_OPEN_OPTIONS_WINDOW, GTK_STOCK_PREFERENCES, _("_Preferences"),
@@ -337,8 +355,12 @@ Create_UI (GtkWindow *window, GtkWidget **ppmenubar, GtkWidget **pptoolbar)
         { POPUP_FILE,                   NULL,              _("_File Operations"),          NULL, NULL,       
                  NULL },
         { POPUP_SUBMENU_SCANNER,        "document-properties",    _("S_canner"),                  NULL, 
NULL,                         NULL },
         { POPUP_DIR_RUN_AUDIO,          GTK_STOCK_MEDIA_PLAY,   _("Run Audio Player"),          NULL, _("Run 
audio player"),        G_CALLBACK(Run_Audio_Player_Using_Directory) },
-        { AM_ARTIST_RUN_AUDIO_PLAYER,   GTK_STOCK_MEDIA_PLAY,   _("Run Audio Player"),          NULL, _("Run 
audio player"),        G_CALLBACK(Run_Audio_Player_Using_Browser_Artist_List) },
-        { AM_ALBUM_RUN_AUDIO_PLAYER,    GTK_STOCK_MEDIA_PLAY,   _("Run Audio Player"),          NULL, _("Run 
audio player"),        G_CALLBACK(Run_Audio_Player_Using_Browser_Album_List)  },
+        { AM_ARTIST_RUN_AUDIO_PLAYER, GTK_STOCK_MEDIA_PLAY,
+          _("Run Audio Player"), NULL, _("Run audio player"),
+          G_CALLBACK (et_application_window_run_player_for_artist_list) },
+        { AM_ALBUM_RUN_AUDIO_PLAYER, GTK_STOCK_MEDIA_PLAY,
+          _("Run Audio Player"), NULL, _("Run audio player"),
+          G_CALLBACK (et_application_window_run_player_for_album_list) },
         { AM_CDDB_SEARCH_FILE, GTK_STOCK_CDROM, _("CDDB Search Files…"), NULL,
           _("CDDB search files…"),
           G_CALLBACK (et_application_window_search_cddb_for_selection) },
@@ -357,7 +379,7 @@ Create_UI (GtkWindow *window, GtkWidget **ppmenubar, GtkWidget **pptoolbar)
 #ifndef G_OS_WIN32 /* No sense here for Win32, "hidden" means : starts with a
                     * '.'
                     */
-        { AM_BROWSER_HIDDEN_DIR, NULL,                   _("Show Hidden Directories"),                       
  NULL, _("Show hidden directories"),                         G_CALLBACK(Browser_Tree_Rebuild),     
BROWSE_HIDDEN_DIR },
+        { AM_BROWSER_HIDDEN_DIR, NULL,                   _("Show Hidden Directories"),                       
  NULL, _("Show hidden directories"),                         
G_CALLBACK(et_application_window_browser_reload),     BROWSE_HIDDEN_DIR },
 #endif /* !G_OS_WIN32 */
         { AM_SCANNER_SHOW, "document-properties", _("_Show Scanner"), NULL,
           _("Show scanner"),
@@ -425,7 +447,8 @@ Create_UI (GtkWindow *window, GtkWidget **ppmenubar, GtkWidget **pptoolbar)
     gtk_action_group_add_toggle_actions(ActionGroup, ToggleActionEntries, num_toggle_entries, window);
     gtk_action_group_add_radio_actions (ActionGroup, view_mode_entries,
                                         n_view_mode_entries, 0,
-                                        Action_Select_Browser_Style, window);
+                                        G_CALLBACK (et_on_action_select_browser_mode),
+                                        window);
     gtk_action_group_add_radio_actions (ActionGroup, scanner_mode_entries,
                                         n_scanner_mode_entries, 0,
                                         G_CALLBACK (et_on_action_select_scan_mode),
@@ -514,7 +537,7 @@ Check_Menu_Item_Toggled_Browse_Hidden_Dir (GtkWidget *checkmenuitem)
     Check_Menu_Item_Update_Browse_Hidden_Dir();
 
     // Reload directory, in case we have changed BROWSE_HIDDEN_DIR
-    //Browser_Tree_Rebuild(NULL); // Commented, as already done in GtkToggleActionEntry for 
AM_BROWSER_HIDDEN_DIR
+    //et_application_window_browser_reload(NULL); // Commented, as already done in GtkToggleActionEntry for 
AM_BROWSER_HIDDEN_DIR
 }
 
 void
diff --git a/src/browser.c b/src/browser.c
index ae66670..d1db369 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -24,24 +24,23 @@
  * Thomas Nilsson and 4Front Technologies
  */
 
-#include <config.h>
+#include "config.h"
+
+#include "browser.h"
 
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 #include <gdk/gdk.h>
 #include <glib/gi18n.h>
-#include <sys/stat.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <dirent.h>
 #include <string.h>
-#include <stdio.h>
 #include <errno.h>
 
 #include "application_window.h"
 #include "gtk2_compat.h"
 #include "easytag.h"
-#include "browser.h"
 #include "et_core.h"
 #include "scan_dialog.h"
 #include "bar.h"
@@ -51,40 +50,56 @@
 #include "charset.h"
 #include "dlm.h"
 
-#include <assert.h>
-
 #include "win32/win32dep.h"
 
+/* TODO: Use G_DEFINE_TYPE_WITH_PRIVATE. */
+G_DEFINE_TYPE (EtBrowser, et_browser, GTK_TYPE_BOX)
+
+#define et_browser_get_instance_private(browser) (browser->priv)
+
+struct _EtBrowserPrivate
+{
+    GtkListStore *entry_model;
+
+    GtkWidget *notebook;
+
+    GtkWidget *album_list;
+    GtkWidget *artist_list;
+
+    GtkWidget *tree; /* Tree of directories. */
+    GtkTreeStore *directory_model;
+
+    GtkListStore *run_program_model;
+
+    GtkWidget *open_directory_with_dialog;
+    GtkWidget *open_directory_with_combobox;
+
+    GtkWidget *open_files_with_dialog;
+    GtkWidget *open_files_with_combobox;
+
+    /* The Rename Directory window. */
+    GtkWidget *rename_directory_dialog;
+    GtkWidget *rename_directory_combo;
+    GtkWidget *rename_directory_mask_toggle;
+    GtkWidget *rename_directory_mask_combo;
+    GtkListStore *rename_directory_mask_model;
+    GtkWidget *rename_directory_preview_label;
+
+    gchar *current_path;
+    /* The last ETFile selected in the BrowserList. */
+    ET_File *last_selected_file;
+};
 
 /****************
  * Declarations *
  ****************/
 
-static GtkWidget    *BrowserTree; /* Tree of directories. */
-static GtkTreeStore *directoryTreeModel;
+static GtkWidget *BrowserEntryCombo;
 static GtkListStore *fileListModel;
 static GtkWidget    *BrowserLabel;
 static GtkWidget    *BrowserButton;
-static GtkWidget    *BrowserNoteBook;
 static GtkListStore *artistListModel;
 static GtkListStore *albumListModel;
-/* Path selected in the browser area (BrowserEntry or BrowserTree). */
-static gchar        *BrowserCurrentPath = NULL;
-
-static GtkListStore *RunProgramModel;
-
-static GtkWidget *RunProgramTreeWindow = NULL;
-static GtkWidget *RunProgramListWindow = NULL;
-
-/* The Rename Directory window. */
-GtkWidget *RenameDirectoryWindow = NULL;
-static GtkWidget *RenameDirectoryCombo;
-static GtkWidget *RenameDirectoryWithMask;
-static GtkListStore *RenameDirectoryMaskModel = NULL;
-GtkWidget *RenameDirectoryPreviewLabel = NULL;
-
-/* The last ETFile selected in the BrowserList. */
-static ET_File *LastBrowserListETFileSelected;
 
 static const guint BOX_SPACING = 6;
 
@@ -113,83 +128,111 @@ typedef enum
     ET_PATH_STATE_CLOSED
 } EtPathState;
 
+enum
+{
+    LIST_FILE_NAME,
+    /* Tag fields. */
+    LIST_FILE_TITLE,
+    LIST_FILE_ARTIST,
+    LIST_FILE_ALBUM_ARTIST,
+    LIST_FILE_ALBUM,
+    LIST_FILE_YEAR,
+    LIST_FILE_DISCNO,
+    LIST_FILE_TRACK,
+    LIST_FILE_GENRE,
+    LIST_FILE_COMMENT,
+    LIST_FILE_COMPOSER,
+    LIST_FILE_ORIG_ARTIST,
+    LIST_FILE_COPYRIGHT,
+    LIST_FILE_URL,
+    LIST_FILE_ENCODED_BY,
+    /* End of columns with associated UI columns. */
+    LIST_FILE_POINTER,
+    LIST_FILE_KEY,
+    LIST_FILE_OTHERDIR, /* To change color for alternate directories. */
+    LIST_FONT_WEIGHT,
+    LIST_ROW_BACKGROUND,
+    LIST_ROW_FOREGROUND,
+    LIST_COLUMN_COUNT
+};
+
+enum
+{
+    ALBUM_GICON,
+    ALBUM_NAME,
+    ALBUM_NUM_FILES,
+    ALBUM_ETFILE_LIST_POINTER,
+    ALBUM_FONT_STYLE,
+    ALBUM_FONT_WEIGHT,
+    ALBUM_ROW_FOREGROUND,
+    ALBUM_COLUMN_COUNT
+};
+
+enum
+{
+    ARTIST_PIXBUF,
+    ARTIST_NAME,
+    ARTIST_NUM_ALBUMS,
+    ARTIST_NUM_FILES,
+    ARTIST_ALBUM_LIST_POINTER,
+    ARTIST_FONT_STYLE,
+    ARTIST_FONT_WEIGHT,
+    ARTIST_ROW_FOREGROUND,
+    ARTIST_COLUMN_COUNT
+};
+
+enum
+{
+    TREE_COLUMN_DIR_NAME,
+    TREE_COLUMN_FULL_PATH,
+    TREE_COLUMN_SCANNED,
+    TREE_COLUMN_HAS_SUBDIR,
+    TREE_COLUMN_ICON,
+    TREE_COLUMN_COUNT
+};
+
 /**************
  * Prototypes *
  **************/
 
-static gboolean Browser_Tree_Key_Press (GtkWidget *tree, GdkEvent *event,
-                                        gpointer data);
-static void Browser_Tree_Set_Node_Visible (GtkWidget *directoryView,
-                                           GtkTreePath *path);
-static void Browser_List_Set_Row_Visible (GtkTreeModel *treeModel,
-                                          GtkTreeIter *rowIter);
-static void Browser_Tree_Initialize (void);
-static gboolean Browser_Tree_Node_Selected (GtkTreeSelection *selection,
-                                            gpointer user_data);
-static void Browser_Tree_Rename_Directory (const gchar *last_path,
-                                           const gchar *new_path);
-static void Browser_Tree_Handle_Rename (GtkTreeIter *parentnode,
+static void Browser_Tree_Handle_Rename (EtBrowser *self,
+                                        GtkTreeIter *parentnode,
                                         const gchar *old_path,
                                         const gchar *new_path);
 
-static gint Browser_List_Key_Press        (GtkWidget *list, GdkEvent *event, gpointer data);
-static gboolean Browser_List_Button_Press (GtkTreeView *treeView,
-                                           GdkEventButton *event);
-static void Browser_List_Row_Selected (GtkTreeSelection * selection,
-                                       gpointer data);
 static void Browser_List_Set_Row_Appearance (GtkTreeIter *iter);
 static gint Browser_List_Sort_Func (GtkTreeModel *model, GtkTreeIter *a,
                                     GtkTreeIter *b, gpointer data);
-static void Browser_List_Select_File_By_Iter (GtkTreeIter *iter,
+static void Browser_List_Select_File_By_Iter (EtBrowser *self,
+                                              GtkTreeIter *iter,
                                               gboolean select_it);
 
-static void Browser_Entry_Activated (void);
-
-static void Browser_Artist_List_Load_Files (ET_File *etfile_to_select);
-static void Browser_Artist_List_Row_Selected (GtkTreeSelection *selection,
-                                              gpointer data);
+static void Browser_Artist_List_Row_Selected (EtBrowser *self,
+                                              GtkTreeSelection *selection);
 static void Browser_Artist_List_Set_Row_Appearance (GtkTreeIter *row);
 
-static void Browser_Album_List_Load_Files (GList *albumlist,
+static void Browser_Album_List_Load_Files (EtBrowser *self, GList *albumlist,
                                            ET_File *etfile_to_select);
-static void Browser_Album_List_Row_Selected (GtkTreeSelection *selection,
-                                             gpointer data);
+static void Browser_Album_List_Row_Selected (EtBrowser *self,
+                                             GtkTreeSelection *selection);
 static void Browser_Album_List_Set_Row_Appearance (GtkTreeIter *row);
 
-static void Browser_Update_Current_Path (const gchar *path);
-
-#ifdef G_OS_WIN32
-static gboolean Browser_Win32_Get_Drive_Root (gchar *drive,
-                                              GtkTreeIter *rootNode,
-                                              GtkTreePath **rootPath);
-#endif /* G_OS_WIN32 */
-
 static gboolean check_for_subdir (const gchar *path);
 
-static GtkTreePath *Find_Child_Node(GtkTreeIter *parent, gchar *searchtext);
+static GtkTreePath *Find_Child_Node (EtBrowser *self, GtkTreeIter *parent, gchar *searchtext);
 
 static GIcon *get_gicon_for_path (const gchar *path, EtPathState path_state);
 
-static void expand_cb   (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *path, gpointer data);
-static void collapse_cb (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *treePath, gpointer data);
-
-/* Pop up menus */
-static gboolean Browser_Popup_Menu_Handler (GtkWidget *widget,
-                                            GdkEventButton *event,
-                                            GtkMenu *menu);
-
 /* For window to rename a directory */
-static void Destroy_Rename_Directory_Window (void);
-static void Rename_Directory (void);
-static void Rename_Directory_With_Mask_Toggled (void);
+static void Destroy_Rename_Directory_Window (EtBrowser *self);
+static void Rename_Directory_With_Mask_Toggled (EtBrowser *self);
 
 /* For window to run a program with the directory */
-static void Destroy_Run_Program_Tree_Window (void);
-static void Run_Program_With_Directory (GtkWidget *combobox);
+static void Destroy_Run_Program_Tree_Window (EtBrowser *self);
+static void Run_Program_With_Directory (EtBrowser *self);
 
 /* For window to run a program with the file */
-static void Destroy_Run_Program_List_Window (void);
-static void Run_Program_With_Selected_Files (GtkWidget *combobox);
+static void Destroy_Run_Program_List_Window (EtBrowser *self);
 
 static void empty_entry_disable_widget (GtkWidget *widget, GtkEntry *entry);
 
@@ -213,48 +256,58 @@ static void et_browser_set_sorting_file_mode (GtkTreeViewColumn *column,
 /*
  * Load home directory
  */
-void Browser_Load_Home_Directory (void)
+void
+et_browser_go_home (EtBrowser *self)
 {
-    Browser_Tree_Select_Dir (g_get_home_dir ());
+    et_browser_select_dir (self, g_get_home_dir ());
 }
 
 /*
  * Load desktop directory
  */
-void Browser_Load_Desktop_Directory (void)
+void
+et_browser_go_desktop (EtBrowser *self)
 {
-    Browser_Tree_Select_Dir(g_get_user_special_dir(G_USER_DIRECTORY_DESKTOP));
+    et_browser_select_dir (self,
+                           g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP));
 }
 
 /*
  * Load documents directory
  */
-void Browser_Load_Documents_Directory (void)
+void
+et_browser_go_documents (EtBrowser *self)
 {
-    Browser_Tree_Select_Dir(g_get_user_special_dir(G_USER_DIRECTORY_DOCUMENTS));
+    et_browser_select_dir (self,
+                           g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS));
 }
 
 /*
  * Load downloads directory
  */
-void Browser_Load_Downloads_Directory (void)
+void
+et_browser_go_download (EtBrowser *self)
 {
-    Browser_Tree_Select_Dir(g_get_user_special_dir(G_USER_DIRECTORY_DOWNLOAD));
+    et_browser_select_dir (self,
+                           g_get_user_special_dir (G_USER_DIRECTORY_DOWNLOAD));
 }
 
 /*
  * Load music directory
  */
-void Browser_Load_Music_Directory (void)
+void
+et_browser_go_music (EtBrowser *self)
 {
-    Browser_Tree_Select_Dir(g_get_user_special_dir(G_USER_DIRECTORY_MUSIC));
+    et_browser_select_dir (self,
+                           g_get_user_special_dir (G_USER_DIRECTORY_MUSIC));
 }
 
 
 /*
  * Load default directory
  */
-void Browser_Load_Default_Directory (void)
+void
+et_browser_load_default_dir (EtBrowser *self)
 {
     GFile **files;
     gchar *path_utf8;
@@ -283,6 +336,104 @@ void Browser_Load_Default_Directory (void)
     g_free (files);
 }
 
+void
+et_browser_run_player_for_album_list (EtBrowser *self)
+{
+    EtBrowserPrivate *priv;
+    GtkTreeIter iter;
+    GtkTreeSelection *selection;
+    GtkTreeModel *albumListModel;
+    GList *l;
+    GList *path_list = NULL;
+
+    priv = et_browser_get_instance_private (self);
+
+    g_return_if_fail (priv->album_list != NULL);
+
+    selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->album_list));
+
+    if (!gtk_tree_selection_get_selected (selection, &albumListModel, &iter))
+        return;
+
+    gtk_tree_model_get (albumListModel, &iter, ALBUM_ETFILE_LIST_POINTER, &l,
+                        -1);
+
+    for (; l != NULL; l = g_list_next (l))
+    {
+        ET_File *etfile = (ET_File *)l->data;
+        gchar *path = ((File_Name *)etfile->FileNameCur->data)->value;
+        path_list = g_list_prepend (path_list, path);
+    }
+
+    path_list = g_list_reverse (path_list);
+
+    et_run_program (AUDIO_FILE_PLAYER, path_list);
+    g_list_free (path_list);
+}
+
+void
+et_browser_run_player_for_artist_list (EtBrowser *self)
+{
+    EtBrowserPrivate *priv;
+    GtkTreeIter iter;
+    GtkTreeSelection *selection;
+    GtkTreeModel *artistListModel;
+    GList *l, *m;
+    GList *path_list = NULL;
+
+    priv = et_browser_get_instance_private (self);
+
+    g_return_if_fail (priv->artist_list != NULL);
+
+    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->artist_list));
+    if (!gtk_tree_selection_get_selected(selection, &artistListModel, &iter))
+        return;
+
+    gtk_tree_model_get (artistListModel, &iter, ARTIST_ALBUM_LIST_POINTER, &l,
+                        -1);
+
+    for (; l != NULL; l = g_list_next (l))
+    {
+        for (m = l->data; m != NULL; m = g_list_next (m))
+        {
+            ET_File *etfile = (ET_File *)m->data;
+            gchar *path = ((File_Name *)etfile->FileNameCur->data)->value;
+            path_list = g_list_prepend (path_list, path);
+        }
+    }
+
+    path_list = g_list_reverse (path_list);
+
+    et_run_program (AUDIO_FILE_PLAYER, path_list);
+    g_list_free (path_list);
+}
+
+void
+et_browser_run_player_for_selection (EtBrowser *self)
+{
+    GList *selfilelist = NULL;
+    GList *l;
+    GList *path_list = NULL;
+    GtkTreeSelection *selection;
+
+    g_return_if_fail (BrowserList != NULL);
+
+    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList));
+    selfilelist = gtk_tree_selection_get_selected_rows(selection, NULL);
+
+    for (l = selfilelist; l != NULL; l = g_list_next (l))
+    {
+        ET_File *etfile = Browser_List_Get_ETFile_From_Path (l->data);
+        gchar *path = ((File_Name *)etfile->FileNameCur->data)->value;
+        path_list = g_list_prepend (path_list, path);
+    }
+
+    path_list = g_list_reverse (path_list);
+
+    et_run_program (AUDIO_FILE_PLAYER, path_list);
+    g_list_free (path_list);
+    g_list_free_full (selfilelist, (GDestroyNotify)gtk_tree_path_free);
+}
 
 /*
  * Get the path from the selected node (row) in the browser
@@ -290,19 +441,22 @@ void Browser_Load_Default_Directory (void)
  * Remember to free the value returned from this function!
  */
 static gchar *
-Browser_Tree_Get_Path_Of_Selected_Node (void)
+Browser_Tree_Get_Path_Of_Selected_Node (EtBrowser *self)
 {
+    EtBrowserPrivate *priv;
     GtkTreeSelection *selection;
     GtkTreeIter selectedIter;
     gchar *path;
 
-    g_return_val_if_fail (BrowserTree != NULL, NULL);
+    priv = et_browser_get_instance_private (self);
+
+    g_return_val_if_fail (priv->tree != NULL, NULL);
 
-    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserTree));
+    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->tree));
     if (selection
     && gtk_tree_selection_get_selected(selection, NULL, &selectedIter))
     {
-        gtk_tree_model_get(GTK_TREE_MODEL(directoryTreeModel), &selectedIter,
+        gtk_tree_model_get(GTK_TREE_MODEL(priv->directory_model), &selectedIter,
                            TREE_COLUMN_FULL_PATH, &path, -1);
         return path;
     }else
@@ -313,27 +467,31 @@ Browser_Tree_Get_Path_Of_Selected_Node (void)
 
 
 /*
- * Set the 'path' within the variable BrowserCurrentPath.
+ * Set the 'path' within the variable priv->current_path.
  */
 static void
-Browser_Update_Current_Path (const gchar *path)
+et_browser_set_current_path (EtBrowser *self, const gchar *path)
 {
+    EtBrowserPrivate *priv;
+
     g_return_if_fail (path != NULL);
 
-    /* Be sure that we aren't passing 'BrowserCurrentPath' as parameter of the
+    priv = et_browser_get_instance_private (self);
+
+    /* Be sure that we aren't passing 'priv->current_path' as parameter of the
      * function to avoid an invalid read. */
-    if (path == BrowserCurrentPath) return;
+    if (path == priv->current_path) return;
 
-    if (BrowserCurrentPath != NULL)
-        g_free(BrowserCurrentPath);
-    BrowserCurrentPath = g_strdup(path);
+    if (priv->current_path != NULL)
+        g_free(priv->current_path);
+    priv->current_path = g_strdup (path);
 
 #ifdef G_OS_WIN32
     /* On win32 : "c:\path\to\dir" succeed with stat() for example, while "c:\path\to\dir\" fails */
-    ET_Win32_Path_Remove_Trailing_Backslash(BrowserCurrentPath);
+    ET_Win32_Path_Remove_Trailing_Backslash(priv->current_path);
 #endif /* G_OS_WIN32 */
 
-    if (strcmp(G_DIR_SEPARATOR_S,BrowserCurrentPath) == 0)
+    if (strcmp(G_DIR_SEPARATOR_S,priv->current_path) == 0)
         gtk_widget_set_sensitive(BrowserButton,FALSE);
     else
         gtk_widget_set_sensitive(BrowserButton,TRUE);
@@ -343,54 +501,79 @@ Browser_Update_Current_Path (const gchar *path)
 /*
  * Return the current path
  */
-gchar *Browser_Get_Current_Path (void)
+const gchar *
+et_browser_get_current_path (EtBrowser *self)
 {
-    return BrowserCurrentPath;
+    EtBrowserPrivate *priv;
+
+    g_return_val_if_fail (ET_BROWSER (self), NULL);
+
+    priv = et_browser_get_instance_private (self);
+
+    return priv->current_path;
 }
 
 /*
  * Reload the current directory.
  */
-void Browser_Reload_Directory (void)
+void
+et_browser_reload_directory (EtBrowser *self)
 {
-    if (BrowserTree && BrowserCurrentPath != NULL)
+    EtBrowserPrivate *priv;
+
+    priv = et_browser_get_instance_private (self);
+
+    if (priv->tree && priv->current_path != NULL)
     {
         // Unselect files, to automatically reload the file of the directory
-        GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserTree));
+        GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->tree));
         if (selection)
         {
             gtk_tree_selection_unselect_all(selection);
         }
-        Browser_Tree_Select_Dir(BrowserCurrentPath);
+        et_browser_select_dir (self, priv->current_path);
     }
 }
 
 /*
  * Set the current path (selected node) in browser as default path (within config variable).
  */
-void Set_Current_Path_As_Default (void)
+void
+et_browser_set_current_path_default (EtBrowser *self)
 {
+    EtBrowserPrivate *priv;
+
+    g_return_if_fail (ET_BROWSER (self));
+
+    priv = et_browser_get_instance_private (self);
+
     if (DEFAULT_PATH_TO_MP3 != NULL)
-        g_free(DEFAULT_PATH_TO_MP3);
-    DEFAULT_PATH_TO_MP3 = g_strdup(BrowserCurrentPath);
-    Statusbar_Message(_("New default path for files selected"),TRUE);
+    {
+        g_free (DEFAULT_PATH_TO_MP3);
+    }
+
+    DEFAULT_PATH_TO_MP3 = g_strdup (priv->current_path);
+    Statusbar_Message (_("New default path for files selected"),TRUE);
 }
 
 /*
  * When you press the key 'enter' in the BrowserEntry to validate the text (browse the directory)
  */
 static void
-Browser_Entry_Activated (void)
+Browser_Entry_Activated (EtBrowser *self, GtkEntry *entry)
 {
+    EtBrowserPrivate *priv;
     const gchar *path_utf8;
     gchar *path;
 
-    path_utf8 = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(BrowserEntryCombo))));
-    Add_String_To_Combo_List(GTK_LIST_STORE(BrowserEntryModel), (gchar *)path_utf8);
+    priv = et_browser_get_instance_private (self);
+
+    path_utf8 = gtk_entry_get_text (entry);
+    Add_String_To_Combo_List (GTK_LIST_STORE (priv->entry_model), path_utf8);
 
     path = filename_from_display(path_utf8);
 
-    Browser_Tree_Select_Dir(path);
+    et_browser_select_dir (self, path);
     g_free(path);
 }
 
@@ -409,20 +592,24 @@ void Browser_Entry_Set_Text (gchar *text)
  * Button to go to parent directory
  */
 void
-et_browser_on_action_parent_directory (void)
+et_browser_go_parent (EtBrowser *self)
 {
     gchar *parent_dir, *path;
 
-    parent_dir = Browser_Get_Current_Path();
+    /* TODO: Replace this with g_file_get_parent(). */
+    parent_dir = g_strdup (et_browser_get_current_path (self));
+
     if (strlen(parent_dir)>1)
     {
         if ( parent_dir[strlen(parent_dir)-1]==G_DIR_SEPARATOR )
             parent_dir[strlen(parent_dir)-1] = '\0';
         path = g_path_get_dirname(parent_dir);
 
-        Browser_Tree_Select_Dir(path);
+        et_browser_select_dir (self, path);
         g_free(path);
     }
+
+    g_free (parent_dir);
 }
 
 /*
@@ -497,7 +684,8 @@ Browser_Tree_Key_Press (GtkWidget *tree, GdkEvent *event, gpointer data)
  *   - Delete = delete file
  * Also tries to capture text input and relate it to files
  */
-gboolean Browser_List_Key_Press (GtkWidget *list, GdkEvent *event, gpointer data)
+static gboolean
+Browser_List_Key_Press (GtkWidget *list, GdkEvent *event, gpointer data)
 {
     GdkEventKey *kevent;
     GtkTreeSelection *fileSelection;
@@ -514,7 +702,8 @@ gboolean Browser_List_Key_Press (GtkWidget *list, GdkEvent *event, gpointer data
             switch(kevent->keyval)
             {
                 case GDK_KEY_Delete:
-                    Action_Delete_Selected_Files();
+                    et_application_window_delete_selected_files (NULL,
+                                                                 MainWindow);
                     return TRUE;
             }
         }
@@ -527,7 +716,9 @@ gboolean Browser_List_Key_Press (GtkWidget *list, GdkEvent *event, gpointer data
  * Action for double/triple click
  */
 static gboolean
-Browser_List_Button_Press (GtkTreeView *treeView, GdkEventButton *event)
+Browser_List_Button_Press (EtBrowser *self,
+                           GdkEventButton *event,
+                           GtkTreeView *treeview)
 {
     g_return_val_if_fail (event != NULL, FALSE);
 
@@ -557,9 +748,10 @@ Browser_List_Button_Press (GtkTreeView *treeView, GdkEventButton *event)
             {
                 // Use of 'currentPath' to try to increase speed. Indeed, in many
                 // cases, the next file to select, is the next in the list
-                currentPath = Browser_List_Select_File_By_Etfile2 ((ET_File *)l->data,
-                                                                   TRUE,
-                                                                   currentPath);
+                currentPath = et_browser_select_file_by_et_file2 (self,
+                                                                  (ET_File *)l->data,
+                                                                  TRUE,
+                                                                  currentPath);
             }
             g_free(patch_check);
         }
@@ -577,20 +769,24 @@ Browser_List_Button_Press (GtkTreeView *treeView, GdkEventButton *event)
 /*
  * Collapse (close) tree recursively up to the root node.
  */
-void Browser_Tree_Collapse (void)
+void
+et_browser_collapse (EtBrowser *self)
 {
+    EtBrowserPrivate *priv;
 #ifndef G_OS_WIN32
     GtkTreePath *rootPath;
 #endif /* !G_OS_WIN32 */
 
-    g_return_if_fail (BrowserTree != NULL);
+    priv = et_browser_get_instance_private (self);
+
+    g_return_if_fail (priv->tree != NULL);
 
-    gtk_tree_view_collapse_all(GTK_TREE_VIEW(BrowserTree));
+    gtk_tree_view_collapse_all(GTK_TREE_VIEW(priv->tree));
 
 #ifndef G_OS_WIN32
     /* But keep the main directory opened */
     rootPath = gtk_tree_path_new_first();
-    gtk_tree_view_expand_to_path(GTK_TREE_VIEW(BrowserTree), rootPath);
+    gtk_tree_view_expand_to_path(GTK_TREE_VIEW(priv->tree), rootPath);
     gtk_tree_path_free(rootPath);
 #endif /* !G_OS_WIN32 */
 }
@@ -611,7 +807,8 @@ Browser_Tree_Set_Node_Visible (GtkWidget *directoryView, GtkTreePath *path)
 /*
  * Set a row visible in the file list (by scrolling the list)
  */
-void Browser_List_Set_Row_Visible (GtkTreeModel *treeModel, GtkTreeIter *rowIter)
+static void
+Browser_List_Set_Row_Visible (GtkTreeModel *treeModel, GtkTreeIter *rowIter)
 {
     /*
      * TODO: Make this only scroll to the row if it is not visible
@@ -632,21 +829,24 @@ void Browser_List_Set_Row_Visible (GtkTreeModel *treeModel, GtkTreeIter *rowIter
  * Do file-save confirmation, and then prompt the new dir to be loaded
  */
 static gboolean
-Browser_Tree_Node_Selected (GtkTreeSelection *selection, gpointer user_data)
+Browser_Tree_Node_Selected (EtBrowser *self, GtkTreeSelection *selection)
 {
+    EtBrowserPrivate *priv;
     gchar *pathName, *pathName_utf8;
     static int counter = 0;
     GtkTreeIter selectedIter;
     GtkTreePath *selectedPath;
 
+    priv = et_browser_get_instance_private (self);
+
     if (!gtk_tree_selection_get_selected(selection, NULL, &selectedIter))
         return TRUE;
-    selectedPath = gtk_tree_model_get_path(GTK_TREE_MODEL(directoryTreeModel), &selectedIter);
+    selectedPath = gtk_tree_model_get_path(GTK_TREE_MODEL(priv->directory_model), &selectedIter);
 
     /* Open the node */
     if (OPEN_SELECTED_BROWSER_NODE)
     {
-        gtk_tree_view_expand_row(GTK_TREE_VIEW(BrowserTree), selectedPath, FALSE);
+        gtk_tree_view_expand_row(GTK_TREE_VIEW(priv->tree), selectedPath, FALSE);
     }
     gtk_tree_path_free(selectedPath);
 
@@ -654,8 +854,8 @@ Browser_Tree_Node_Selected (GtkTreeSelection *selection, gpointer user_data)
     if (ReadingDirectory == TRUE)
         return TRUE;
 
-    //Browser_Tree_Set_Node_Visible(BrowserTree, selectedPath);
-    gtk_tree_model_get(GTK_TREE_MODEL(directoryTreeModel), &selectedIter,
+    //Browser_Tree_Set_Node_Visible(priv->tree, selectedPath);
+    gtk_tree_model_get(GTK_TREE_MODEL(priv->directory_model), &selectedIter,
                        TREE_COLUMN_FULL_PATH, &pathName, -1);
     if (!pathName)
         return FALSE;
@@ -703,7 +903,7 @@ Browser_Tree_Node_Selected (GtkTreeSelection *selection, gpointer user_data)
     }
 
     /* Memorize the current path */
-    Browser_Update_Current_Path(pathName);
+    et_browser_set_current_path (self, pathName);
 
     /* Display the selected path into the BrowserEntry */
     pathName_utf8 = filename_to_display(pathName);
@@ -730,19 +930,19 @@ Browser_Tree_Node_Selected (GtkTreeSelection *selection, gpointer user_data)
                 /* If the path could not be read, then it is possible that it
                  * has a subdirectory with readable permissions. In that case
                  * do not refresh the children. */
-                if (gtk_tree_model_iter_parent(GTK_TREE_MODEL(directoryTreeModel),&parentIter,&selectedIter) 
)
+                if 
(gtk_tree_model_iter_parent(GTK_TREE_MODEL(priv->directory_model),&parentIter,&selectedIter) )
                 {
-                    selectedPath = gtk_tree_model_get_path(GTK_TREE_MODEL(directoryTreeModel), &parentIter);
+                    selectedPath = gtk_tree_model_get_path(GTK_TREE_MODEL(priv->directory_model), 
&parentIter);
                     gtk_tree_selection_select_iter (selection, &parentIter);
-                    if (gtk_tree_model_iter_has_child (GTK_TREE_MODEL (directoryTreeModel),
+                    if (gtk_tree_model_iter_has_child (GTK_TREE_MODEL (priv->directory_model),
                                                        &selectedIter) == FALSE
                                                        && !g_file_query_exists (file, NULL))
                     {
-                        gtk_tree_view_collapse_row (GTK_TREE_VIEW (BrowserTree),
+                        gtk_tree_view_collapse_row (GTK_TREE_VIEW (priv->tree),
                                                     selectedPath);
                         if (OPEN_SELECTED_BROWSER_NODE)
                         {
-                            gtk_tree_view_expand_row (GTK_TREE_VIEW (BrowserTree),
+                            gtk_tree_view_expand_row (GTK_TREE_VIEW (priv->tree),
                                                       selectedPath, FALSE);
                         }
                         gtk_tree_path_free (selectedPath);
@@ -774,14 +974,14 @@ Browser_Win32_Get_Drive_Root (gchar *drive, GtkTreeIter *rootNode, GtkTreePath *
     GtkTreeIter parentNode;
     gchar *nodeName;
 
-    gtk_tree_model_get_iter_first(GTK_TREE_MODEL(directoryTreeModel), &parentNode);
+    gtk_tree_model_get_iter_first(GTK_TREE_MODEL(priv->directory_model), &parentNode);
 
     // Find root of path, ie: the drive letter
     root_index = 0;
 
     do
     {
-        gtk_tree_model_get(GTK_TREE_MODEL(directoryTreeModel), &parentNode,
+        gtk_tree_model_get(GTK_TREE_MODEL(priv->directory_model), &parentNode,
                            TREE_COLUMN_FULL_PATH, &nodeName, -1);
         if (strncasecmp(drive,nodeName, strlen(drive)) == 0)
         {
@@ -790,7 +990,7 @@ Browser_Win32_Get_Drive_Root (gchar *drive, GtkTreeIter *rootNode, GtkTreePath *
             break;
         }
         root_index++;
-    } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(directoryTreeModel), &parentNode));
+    } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(priv->directory_model), &parentNode));
 
     if (!found) return FALSE;
 
@@ -803,15 +1003,16 @@ Browser_Win32_Get_Drive_Root (gchar *drive, GtkTreeIter *rootNode, GtkTreePath *
 
 
 /*
- * Browser_Tree_Select_Dir: Select the directory corresponding to the 'path' in
+ * et_browser_select_dir: Select the directory corresponding to the 'path' in
  * the tree browser, but it doesn't read it!
- * Check if path is correct before selecting it. And returns TRUE on success,
- * else FALSE.
+ * Check if path is correct before selecting it.
  *
  * - "current_path" is in file system encoding (not UTF-8)
  */
-gboolean Browser_Tree_Select_Dir (const gchar *current_path)
+void
+et_browser_select_dir (EtBrowser *self, const gchar *current_path)
 {
+    EtBrowserPrivate *priv;
     GtkTreePath *rootPath = NULL;
     GtkTreeIter parentNode, currentNode;
     gint index = 1; // Skip the first token as it is NULL due to leading /
@@ -819,12 +1020,14 @@ gboolean Browser_Tree_Select_Dir (const gchar *current_path)
     gchar *nodeName;
     gchar *temp;
 
-    g_return_val_if_fail (BrowserTree != NULL, FALSE);
+    priv = et_browser_get_instance_private (self);
+
+    g_return_if_fail (priv->tree != NULL);
 
     /* Load current_path */
     if(!current_path || !*current_path)
     {
-        return TRUE;
+        return;
     }
 
 #ifdef G_OS_WIN32
@@ -836,27 +1039,27 @@ gboolean Browser_Tree_Select_Dir (const gchar *current_path)
     /* Don't check here if the path is valid. It will be done later when
      * selecting a node in the tree */
 
-    Browser_Update_Current_Path(current_path);
+    et_browser_set_current_path (self, current_path);
 
     parts = g_strsplit(current_path, G_DIR_SEPARATOR_S, 0);
 
     // Expand root node (fill parentNode and rootPath)
 #ifdef G_OS_WIN32
     if (!Browser_Win32_Get_Drive_Root(parts[0], &parentNode, &rootPath))
-        return FALSE;
+        return;
 #else /* !G_OS_WIN32 */
-    if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (directoryTreeModel),
+    if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (priv->directory_model),
                                         &parentNode))
     {
-        g_message ("%s", "directoryTreeModel is empty");
-        return FALSE;
+        g_message ("%s", "priv->directory_model is empty");
+        return;
     }
 
     rootPath = gtk_tree_path_new_first();
 #endif /* !G_OS_WIN32 */
     if (rootPath)
     {
-        gtk_tree_view_expand_to_path(GTK_TREE_VIEW(BrowserTree), rootPath);
+        gtk_tree_view_expand_to_path(GTK_TREE_VIEW(priv->tree), rootPath);
         gtk_tree_path_free(rootPath);
     }
 
@@ -868,12 +1071,12 @@ gboolean Browser_Tree_Select_Dir (const gchar *current_path)
             continue;
         }
 
-        if (!gtk_tree_model_iter_children(GTK_TREE_MODEL(directoryTreeModel), &currentNode, &parentNode))
+        if (!gtk_tree_model_iter_children(GTK_TREE_MODEL(priv->directory_model), &currentNode, &parentNode))
         {
             gchar *path, *parent_path;
             GFile *file;
 
-            gtk_tree_model_get (GTK_TREE_MODEL (directoryTreeModel),
+            gtk_tree_model_get (GTK_TREE_MODEL (priv->directory_model),
                                 &parentNode, TREE_COLUMN_FULL_PATH,
                                 &parent_path, -1);
             path = g_build_path (G_DIR_SEPARATOR_S, parent_path, parts[index],
@@ -894,7 +1097,7 @@ gboolean Browser_Tree_Select_Dir (const gchar *current_path)
                 /* Create a new node for this directory name. */
                 icon = get_gicon_for_path (path, ET_PATH_STATE_CLOSED);
 
-                gtk_tree_store_insert_with_values (GTK_TREE_STORE (directoryTreeModel),
+                gtk_tree_store_insert_with_values (GTK_TREE_STORE (priv->directory_model),
                                                    &iter, &parentNode, 0,
                                                    TREE_COLUMN_DIR_NAME, parts[index],
                                                    TREE_COLUMN_FULL_PATH, path,
@@ -917,7 +1120,7 @@ gboolean Browser_Tree_Select_Dir (const gchar *current_path)
         }
         do
         {
-            gtk_tree_model_get(GTK_TREE_MODEL(directoryTreeModel), &currentNode,
+            gtk_tree_model_get(GTK_TREE_MODEL(priv->directory_model), &currentNode,
                                TREE_COLUMN_FULL_PATH, &temp, -1);
             nodeName = g_path_get_basename(temp);
             g_free(temp);
@@ -931,30 +1134,30 @@ gboolean Browser_Tree_Select_Dir (const gchar *current_path)
                 break;
             }
             g_free(nodeName);
-        } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(directoryTreeModel), &currentNode));
+        } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(priv->directory_model), &currentNode));
 
         parentNode = currentNode;
-        rootPath = gtk_tree_model_get_path(GTK_TREE_MODEL(directoryTreeModel), &parentNode);
+        rootPath = gtk_tree_model_get_path(GTK_TREE_MODEL(priv->directory_model), &parentNode);
         if (rootPath)
         {
-            gtk_tree_view_expand_to_path(GTK_TREE_VIEW(BrowserTree), rootPath);
+            gtk_tree_view_expand_to_path(GTK_TREE_VIEW(priv->tree), rootPath);
             gtk_tree_path_free(rootPath);
         }
         index++;
     }
 
-    rootPath = gtk_tree_model_get_path(GTK_TREE_MODEL(directoryTreeModel), &parentNode);
+    rootPath = gtk_tree_model_get_path(GTK_TREE_MODEL(priv->directory_model), &parentNode);
     if (rootPath)
     {
-        gtk_tree_view_expand_to_path(GTK_TREE_VIEW(BrowserTree), rootPath);
+        gtk_tree_view_expand_to_path(GTK_TREE_VIEW(priv->tree), rootPath);
         // Select the node to load the corresponding directory
-        gtk_tree_selection_select_path(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserTree)), rootPath);
-        Browser_Tree_Set_Node_Visible(BrowserTree, rootPath);
+        gtk_tree_selection_select_path(gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->tree)), rootPath);
+        Browser_Tree_Set_Node_Visible(priv->tree, rootPath);
         gtk_tree_path_free(rootPath);
     }
 
     g_strfreev(parts);
-    return TRUE;
+    return;
 }
 
 /*
@@ -962,13 +1165,16 @@ gboolean Browser_Tree_Select_Dir (const gchar *current_path)
  * Displays the file info of the lowest selected file in the right-hand pane
  */
 static void
-Browser_List_Row_Selected (GtkTreeSelection *selection, gpointer data)
+Browser_List_Row_Selected (EtBrowser *self, GtkTreeSelection *selection)
 {
+    EtBrowserPrivate *priv;
     GList *selectedRows;
     GtkTreePath *lastSelected;
     GtkTreeIter lastFile;
     ET_File *fileETFile;
 
+    priv = et_browser_get_instance_private (self);
+
     selectedRows = gtk_tree_selection_get_selected_rows(selection, NULL);
 
     /*
@@ -980,7 +1186,7 @@ Browser_List_Row_Selected (GtkTreeSelection *selection, gpointer data)
         return;
     }
 
-    if (!LastBrowserListETFileSelected)
+    if (!priv->last_selected_file)
     {
         // Returns the last line selected (in ascending line order) to display the item
         lastSelected = (GtkTreePath *)g_list_last(selectedRows)->data;
@@ -997,7 +1203,7 @@ Browser_List_Row_Selected (GtkTreeSelection *selection, gpointer data)
     }else
     {
         // The real last selected line
-        Action_Select_Nth_File_By_Etfile(LastBrowserListETFileSelected);
+        Action_Select_Nth_File_By_Etfile(priv->last_selected_file);
     }
 
     g_list_free_full (selectedRows, (GDestroyNotify)gtk_tree_path_free);
@@ -1008,12 +1214,16 @@ Browser_List_Row_Selected (GtkTreeSelection *selection, gpointer data)
  * Also supports optionally selecting a specific etfile
  * but be careful, this does not call Browser_List_Row_Selected !
  */
-void Browser_List_Load_File_List (GList *etfilelist, ET_File *etfile_to_select)
+void
+et_browser_load_file_list (EtBrowser *self,
+                           GList *etfilelist,
+                           ET_File *etfile_to_select)
 {
     GList *l;
     gboolean activate_bg_color = 0;
     GtkTreeIter rowIter;
 
+    g_return_if_fail (ET_BROWSER (self));
     g_return_if_fail (BrowserList != NULL);
 
     gtk_list_store_clear(fileListModel);
@@ -1083,7 +1293,7 @@ void Browser_List_Load_File_List (GList *etfilelist, ET_File *etfile_to_select)
 
         if (etfile_to_select == l->data)
         {
-            Browser_List_Select_File_By_Iter(&rowIter, TRUE);
+            Browser_List_Select_File_By_Iter (self, &rowIter, TRUE);
             //ET_Display_File_Data_To_UI (l->data);
         }
 
@@ -1098,7 +1308,8 @@ void Browser_List_Load_File_List (GList *etfilelist, ET_File *etfile_to_select)
  *  - Refresh 'filename' is file saved,
  *  - Change color is something changed on the file
  */
-void Browser_List_Refresh_Whole_List (void)
+void
+et_browser_refresh_list (EtBrowser *self)
 {
     ET_File   *ETFile;
     File_Tag  *FileTag;
@@ -1113,6 +1324,8 @@ void Browser_List_Refresh_Whole_List (void)
     gboolean valid;
     GtkWidget *artist_radio;
 
+    g_return_if_fail (ET_BROWSER (self));
+
     if (!ETCore->ETFileDisplayedList || !BrowserList
     ||  gtk_tree_model_iter_n_children(GTK_TREE_MODEL(fileListModel), NULL) == 0)
     {
@@ -1481,8 +1694,10 @@ Browser_List_Set_Row_Appearance (GtkTreeIter *iter)
 /*
  * Remove a file from the list, by ETFile
  */
-void Browser_List_Remove_File (ET_File *searchETFile)
+void
+et_browser_remove_file (EtBrowser *self, ET_File *searchETFile)
 {
+    EtBrowserPrivate *priv;
     gint row;
     GtkTreePath *currentPath = NULL;
     GtkTreeIter currentIter;
@@ -1492,6 +1707,8 @@ void Browser_List_Remove_File (ET_File *searchETFile)
     if (searchETFile == NULL)
         return;
 
+    priv = et_browser_get_instance_private (self);
+
     // Go through the file list until it is found
     for (row=0; row < gtk_tree_model_iter_n_children(GTK_TREE_MODEL(fileListModel), NULL); row++)
     {
@@ -1509,8 +1726,8 @@ void Browser_List_Remove_File (ET_File *searchETFile)
             if (currentETFile == searchETFile)
             {
                 // Reinit this value to avoid a crash after deleting files...
-                if (LastBrowserListETFileSelected == searchETFile)
-                    LastBrowserListETFileSelected = NULL;
+                if (priv->last_selected_file == searchETFile)
+                    priv->last_selected_file = NULL;
 
                 gtk_list_store_remove(fileListModel, &currentIter);
                 break;
@@ -1549,20 +1766,31 @@ ET_File *Browser_List_Get_ETFile_From_Iter (GtkTreeIter *iter)
 /*
  * Select the specified file in the list, by its ETFile
  */
-void Browser_List_Select_File_By_Etfile (ET_File *searchETFile, gboolean select_it)
+void
+et_browser_select_file_by_et_file (EtBrowser *self,
+                                   ET_File *file,
+                                   gboolean select_it)
 {
     GtkTreePath *currentPath = NULL;
 
-    currentPath = Browser_List_Select_File_By_Etfile2(searchETFile, select_it, NULL);
+    currentPath = et_browser_select_file_by_et_file2 (self, file, select_it,
+                                                      NULL);
+
     if (currentPath)
-        gtk_tree_path_free(currentPath);
+    {
+        gtk_tree_path_free (currentPath);
+    }
 }
 /*
  * Select the specified file in the list, by its ETFile
  *  - startPath : if set : starting path to try increase speed
  *  - returns allocated "currentPath" to free
  */
-GtkTreePath *Browser_List_Select_File_By_Etfile2 (ET_File *searchETFile, gboolean select_it, GtkTreePath 
*startPath)
+GtkTreePath *
+et_browser_select_file_by_et_file2 (EtBrowser *self,
+                                    ET_File *searchETFile,
+                                    gboolean select_it,
+                                    GtkTreePath *startPath)
 {
     gint row;
     GtkTreePath *currentPath = NULL;
@@ -1570,7 +1798,7 @@ GtkTreePath *Browser_List_Select_File_By_Etfile2 (ET_File *searchETFile, gboolea
     ET_File *currentETFile;
     gboolean valid;
 
-     g_return_val_if_fail (searchETFile != NULL, NULL);
+    g_return_val_if_fail (searchETFile != NULL, NULL);
 
     // If the path is used, we try the next item (to increase speed), as it is correct in many cases...
     if (startPath)
@@ -1585,7 +1813,8 @@ GtkTreePath *Browser_List_Select_File_By_Etfile2 (ET_File *searchETFile, gboolea
             // It is the good file?
             if (currentETFile == searchETFile)
             {
-                Browser_List_Select_File_By_Iter(&currentIter, select_it);
+                Browser_List_Select_File_By_Iter (self, &currentIter,
+                                                  select_it);
                 return startPath;
             }
         }
@@ -1604,7 +1833,8 @@ GtkTreePath *Browser_List_Select_File_By_Etfile2 (ET_File *searchETFile, gboolea
 
             if (currentETFile == searchETFile)
             {
-                Browser_List_Select_File_By_Iter(&currentIter, select_it);
+                Browser_List_Select_File_By_Iter (self, &currentIter,
+                                                  select_it);
                 return currentPath;
                 //break;
             }
@@ -1621,7 +1851,9 @@ GtkTreePath *Browser_List_Select_File_By_Etfile2 (ET_File *searchETFile, gboolea
  * Select the specified file in the list, by an iter
  */
 static void
-Browser_List_Select_File_By_Iter (GtkTreeIter *rowIter, gboolean select_it)
+Browser_List_Select_File_By_Iter (EtBrowser *self,
+                                  GtkTreeIter *rowIter,
+                                  gboolean select_it)
 {
     g_return_if_fail (BrowserList != NULL);
 
@@ -1630,9 +1862,13 @@ Browser_List_Select_File_By_Iter (GtkTreeIter *rowIter, gboolean select_it)
         GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList));
         if (selection)
         {
-            g_signal_handlers_block_by_func(G_OBJECT(selection),G_CALLBACK(Browser_List_Row_Selected),NULL);
+            g_signal_handlers_block_by_func (selection,
+                                             G_CALLBACK (Browser_List_Row_Selected),
+                                             self);
             gtk_tree_selection_select_iter(selection, rowIter);
-            
g_signal_handlers_unblock_by_func(G_OBJECT(selection),G_CALLBACK(Browser_List_Row_Selected),NULL);
+            g_signal_handlers_unblock_by_func (selection,
+                                               G_CALLBACK (Browser_List_Row_Selected),
+                                               self);
         }
     }
     Browser_List_Set_Row_Visible(GTK_TREE_MODEL(fileListModel), rowIter);
@@ -1676,7 +1912,10 @@ ET_File *Browser_List_Select_File_By_Iter_String (const gchar* stringIter, gbool
  * Select the specified file in the list, by fuzzy string matching based on
  * the Damerau-Levenshtein Metric (patch from Santtu Lakkala - 23/08/2004)
  */
-ET_File *Browser_List_Select_File_By_DLM (const gchar* string, gboolean select_it)
+ET_File *
+et_browser_select_file_by_dlm (EtBrowser *self,
+                               const gchar* string,
+                               gboolean select_it)
 {
     GtkTreeIter iter;
     GtkTreeIter iter2;
@@ -1709,9 +1948,13 @@ ET_File *Browser_List_Select_File_By_DLM (const gchar* string, gboolean select_i
             selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList));
             if (selection)
             {
-                
g_signal_handlers_block_by_func(G_OBJECT(selection),G_CALLBACK(Browser_List_Row_Selected),NULL);
+                g_signal_handlers_block_by_func (selection,
+                                                 G_CALLBACK (Browser_List_Row_Selected),
+                                                 self);
                 gtk_tree_selection_select_iter(selection, &iter2);
-                
g_signal_handlers_unblock_by_func(G_OBJECT(selection),G_CALLBACK(Browser_List_Row_Selected),NULL);
+                g_signal_handlers_unblock_by_func (selection,
+                                                   G_CALLBACK (Browser_List_Row_Selected),
+                                                   self);
             }
         }
         Browser_List_Set_Row_Visible(GTK_TREE_MODEL(fileListModel), &iter2);
@@ -1723,12 +1966,12 @@ ET_File *Browser_List_Select_File_By_DLM (const gchar* string, gboolean select_i
 /*
  * Clear all entries on the file list
  */
-void Browser_List_Clear()
+void
+et_browser_clear (EtBrowser *self)
 {
-    gtk_list_store_clear(fileListModel);
-    gtk_list_store_clear(artistListModel);
-    gtk_list_store_clear(albumListModel);
-
+    gtk_list_store_clear (fileListModel);
+    gtk_list_store_clear (artistListModel);
+    gtk_list_store_clear (albumListModel);
 }
 
 /*
@@ -1894,7 +2137,8 @@ Browser_List_Sort_Func (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b,
 /*
  * Select all files on the file list
  */
-void Browser_List_Select_All_Files (void)
+void
+et_browser_select_all (EtBrowser *self)
 {
     GtkTreeSelection *selection;
 
@@ -1904,16 +2148,21 @@ void Browser_List_Select_All_Files (void)
     if (selection)
     {
         // Must block the select signal to avoid the selecting, one by one, of all files in the main files 
list
-        g_signal_handlers_block_by_func(G_OBJECT(selection),G_CALLBACK(Browser_List_Row_Selected),NULL);
+        g_signal_handlers_block_by_func (selection,
+                                         G_CALLBACK (Browser_List_Row_Selected),
+                                         self);
         gtk_tree_selection_select_all(selection);
-        g_signal_handlers_unblock_by_func(G_OBJECT(selection),G_CALLBACK(Browser_List_Row_Selected),NULL);
+        g_signal_handlers_unblock_by_func (selection,
+                                           G_CALLBACK (Browser_List_Row_Selected),
+                                           self);
     }
 }
 
 /*
  * Unselect all files on the file list
  */
-void Browser_List_Unselect_All_Files (void)
+void
+et_browser_unselect_all (EtBrowser *self)
 {
     GtkTreeSelection *selection;
 
@@ -1929,7 +2178,8 @@ void Browser_List_Unselect_All_Files (void)
 /*
  * Invert the selection of the file list
  */
-void Browser_List_Invert_File_Selection (void)
+void
+et_browser_invert_selection (EtBrowser *self)
 {
     GtkTreeIter iter;
     GtkTreeSelection *selection;
@@ -1941,7 +2191,9 @@ void Browser_List_Invert_File_Selection (void)
     if (selection)
     {
         /* Must block the select signal to avoid selecting all files (one by one) in the main files list */
-        g_signal_handlers_block_by_func(G_OBJECT(selection), G_CALLBACK(Browser_List_Row_Selected), NULL);
+        g_signal_handlers_block_by_func (selection,
+                                         G_CALLBACK (Browser_List_Row_Selected),
+                                         self);
         valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(fileListModel), &iter);
         while (valid)
         {
@@ -1954,13 +2206,17 @@ void Browser_List_Invert_File_Selection (void)
             }
             valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(fileListModel), &iter);
         }
-        g_signal_handlers_unblock_by_func(G_OBJECT(selection), G_CALLBACK(Browser_List_Row_Selected), NULL);
+        g_signal_handlers_unblock_by_func (selection,
+                                           G_CALLBACK (Browser_List_Row_Selected),
+                                           self);
     }
 }
 
 
-void Browser_Artist_List_Load_Files (ET_File *etfile_to_select)
+static void
+Browser_Artist_List_Load_Files (EtBrowser *self, ET_File *etfile_to_select)
 {
+    EtBrowserPrivate *priv;
     GList *AlbumList;
     GList *etfilelist;
     ET_File *etfile;
@@ -1970,13 +2226,15 @@ void Browser_Artist_List_Load_Files (ET_File *etfile_to_select)
     GtkTreeSelection *selection;
     gchar *artistname, *artist_to_select = NULL;
 
-    g_return_if_fail (BrowserArtistList != NULL);
+    priv = et_browser_get_instance_private (self);
+
+    g_return_if_fail (priv->artist_list != NULL);
 
     if (etfile_to_select)
         artist_to_select = ((File_Tag *)etfile_to_select->FileTag->data)->artist;
 
     gtk_list_store_clear(artistListModel);
-    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserArtistList));
+    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->artist_list));
 
     for (l = ETCore->ETArtistAlbumFileList; l != NULL; l = g_list_next (l))
     {
@@ -2014,10 +2272,10 @@ void Browser_Artist_List_Load_Files (ET_File *etfile_to_select)
             gtk_tree_selection_select_iter(selection, &iter);
             
g_signal_handlers_unblock_by_func(G_OBJECT(selection),G_CALLBACK(Browser_Artist_List_Row_Selected),NULL);
 
-            gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(BrowserArtistList), path, NULL, FALSE, 0, 0);
+            gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(priv->artist_list), path, NULL, FALSE, 0, 0);
             gtk_tree_path_free(path);
 
-            Browser_Album_List_Load_Files(AlbumList, etfile_to_select);
+            Browser_Album_List_Load_Files (self, AlbumList, etfile_to_select);
 
             // Now that we've found the artist, no need to continue searching
             artist_to_select = NULL;
@@ -2034,7 +2292,7 @@ void Browser_Artist_List_Load_Files (ET_File *etfile_to_select)
                            ARTIST_ALBUM_LIST_POINTER, &AlbumList,
                            -1);
         ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
-        Browser_Album_List_Load_Files(AlbumList,NULL);
+        Browser_Album_List_Load_Files (self, AlbumList,NULL);
     }
 }
 
@@ -2043,7 +2301,7 @@ void Browser_Artist_List_Load_Files (ET_File *etfile_to_select)
  * Callback to select-row event
  */
 static void
-Browser_Artist_List_Row_Selected (GtkTreeSelection* selection, gpointer data)
+Browser_Artist_List_Row_Selected (EtBrowser *self, GtkTreeSelection* selection)
 {
     GList *AlbumList;
     GtkTreeIter iter;
@@ -2057,11 +2315,11 @@ Browser_Artist_List_Row_Selected (GtkTreeSelection* selection, gpointer data)
 
     gtk_tree_model_get(GTK_TREE_MODEL(artistListModel), &iter,
                        ARTIST_ALBUM_LIST_POINTER, &AlbumList, -1);
-    Browser_Album_List_Load_Files(AlbumList, NULL);
+    Browser_Album_List_Load_Files (self, AlbumList, NULL);
 }
 
 /*
- * Set the color of the row of BrowserArtistList
+ * Set the color of the row of priv->artist_list
  */
 static void
 Browser_Artist_List_Set_Row_Appearance (GtkTreeIter *iter)
@@ -2113,8 +2371,11 @@ Browser_Artist_List_Set_Row_Appearance (GtkTreeIter *iter)
  * Load the list of Albums for each Artist
  */
 static void
-Browser_Album_List_Load_Files (GList *albumlist, ET_File *etfile_to_select)
+Browser_Album_List_Load_Files (EtBrowser *self,
+                               GList *albumlist,
+                               ET_File *etfile_to_select)
 {
+    EtBrowserPrivate *priv;
     GList *l;
     GList *etfilelist = NULL;
     ET_File *etfile;
@@ -2122,13 +2383,15 @@ Browser_Album_List_Load_Files (GList *albumlist, ET_File *etfile_to_select)
     GtkTreeSelection *selection;
     gchar *albumname, *album_to_select = NULL;
 
-    g_return_if_fail (BrowserAlbumList != NULL);
+    priv = et_browser_get_instance_private (self);
+
+    g_return_if_fail (priv->album_list != NULL);
 
     if (etfile_to_select)
         album_to_select = ((File_Tag *)etfile_to_select->FileTag->data)->album;
 
     gtk_list_store_clear(albumListModel);
-    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserAlbumList));
+    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->album_list));
 
     // Create a first row to select all albums of the artist
     // FIX ME : the attached list must be freed!
@@ -2182,11 +2445,11 @@ Browser_Album_List_Load_Files (GList *albumlist, ET_File *etfile_to_select)
             gtk_tree_selection_select_iter(selection, &iter);
             
g_signal_handlers_unblock_by_func(G_OBJECT(selection),G_CALLBACK(Browser_Album_List_Row_Selected),NULL);
 
-            gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(BrowserAlbumList), path, NULL, FALSE, 0, 0);
+            gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(priv->album_list), path, NULL, FALSE, 0, 0);
             gtk_tree_path_free(path);
 
             ET_Set_Displayed_File_List(etfilelist);
-            Browser_List_Load_File_List(etfilelist,etfile_to_select);
+            et_browser_load_file_list (self, etfilelist, etfile_to_select);
 
             // Now that we've found the album, no need to continue searching
             album_to_select = NULL;
@@ -2206,7 +2469,7 @@ Browser_Album_List_Load_Files (GList *albumlist, ET_File *etfile_to_select)
 
         // Set the attached list as "Displayed List"
         ET_Set_Displayed_File_List(etfilelist);
-        Browser_List_Load_File_List(etfilelist, NULL);
+        et_browser_load_file_list (self, etfilelist, NULL);
 
         // Displays the first item
         Action_Select_Nth_File_By_Etfile((ET_File *)etfilelist->data);
@@ -2217,7 +2480,7 @@ Browser_Album_List_Load_Files (GList *albumlist, ET_File *etfile_to_select)
  * Callback to select-row event
  */
 static void
-Browser_Album_List_Row_Selected (GtkTreeSelection *selection, gpointer data)
+Browser_Album_List_Row_Selected (EtBrowser *self, GtkTreeSelection *selection)
 {
     GList *etfilelist;
     GtkTreeIter iter;
@@ -2236,7 +2499,7 @@ Browser_Album_List_Row_Selected (GtkTreeSelection *selection, gpointer data)
     // Set the attached list as "Displayed List"
     ET_Set_Displayed_File_List(etfilelist);
 
-    Browser_List_Load_File_List(etfilelist, NULL);
+    et_browser_load_file_list (self, etfilelist, NULL);
 
     // Displays the first item
     Action_Select_Nth_File_By_Etfile((ET_File *)etfilelist->data);
@@ -2244,7 +2507,7 @@ Browser_Album_List_Row_Selected (GtkTreeSelection *selection, gpointer data)
 
 
 /*
- * Set the color of the row of BrowserAlbumList
+ * Set the color of the row of priv->album_list
  */
 static void
 Browser_Album_List_Set_Row_Appearance (GtkTreeIter *iter)
@@ -2286,11 +2549,17 @@ Browser_Album_List_Set_Row_Appearance (GtkTreeIter *iter)
     }
 }
 
-void Browser_Display_Tree_Or_Artist_Album_List (void)
+void
+et_browser_toggle_display_mode (EtBrowser *self)
 {
+    EtBrowserPrivate *priv;
     ET_File *etfile = ETCore->ETFileDisplayed; // ETFile to display again after changing browser view
     GtkWidget *artist_radio;
 
+    g_return_if_fail (ET_BROWSER (self));
+
+    priv = et_browser_get_instance_private (self);
+
     // Save the current displayed data
     ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
 
@@ -2305,10 +2574,10 @@ void Browser_Display_Tree_Or_Artist_Album_List (void)
          * Artist + Album view
          */
 
-        // Display Artist + Album lists
-        gtk_notebook_set_current_page(GTK_NOTEBOOK(BrowserNoteBook),1);
+        /* Display Artist + Album lists. */
+        gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), 1);
         ET_Create_Artist_Album_File_List();
-        Browser_Artist_List_Load_Files(etfile);
+        Browser_Artist_List_Load_Files (self, etfile);
 
     }else
     {
@@ -2319,9 +2588,9 @@ void Browser_Display_Tree_Or_Artist_Album_List (void)
         // Set the whole list as "Displayed list"
         ET_Set_Displayed_File_List(ETCore->ETFileList);
 
-        // Display Tree Browser
-        gtk_notebook_set_current_page(GTK_NOTEBOOK(BrowserNoteBook),0);
-        Browser_List_Load_File_List(ETCore->ETFileDisplayedList, etfile);
+        /* Display Tree Browser. */
+        gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), 0);
+        et_browser_load_file_list (self, ETCore->ETFileDisplayedList, etfile);
 
         // Displays the first file if nothing specified
         if (!etfile)
@@ -2339,15 +2608,20 @@ void Browser_Display_Tree_Or_Artist_Album_List (void)
 /*
  * Disable (FALSE) / Enable (TRUE) all user widgets in the browser area (Tree + List + Entry)
  */
-void Browser_Area_Set_Sensitive (gboolean activate)
+void
+et_browser_set_sensitive (EtBrowser *self, gboolean sensitive)
 {
-    gtk_widget_set_sensitive(GTK_WIDGET(BrowserEntryCombo),activate);
-    gtk_widget_set_sensitive(GTK_WIDGET(BrowserTree),      activate);
-    gtk_widget_set_sensitive(GTK_WIDGET(BrowserList),      activate);
-    gtk_widget_set_sensitive(GTK_WIDGET(BrowserArtistList),activate);
-    gtk_widget_set_sensitive(GTK_WIDGET(BrowserAlbumList), activate);
-    gtk_widget_set_sensitive(GTK_WIDGET(BrowserButton),    activate);
-    gtk_widget_set_sensitive(GTK_WIDGET(BrowserLabel),     activate);
+    EtBrowserPrivate *priv;
+
+    priv = et_browser_get_instance_private (self);
+
+    gtk_widget_set_sensitive (GTK_WIDGET (BrowserEntryCombo), sensitive);
+    gtk_widget_set_sensitive (GTK_WIDGET (priv->tree), sensitive);
+    gtk_widget_set_sensitive (GTK_WIDGET (BrowserList), sensitive);
+    gtk_widget_set_sensitive (GTK_WIDGET (priv->artist_list), sensitive);
+    gtk_widget_set_sensitive (GTK_WIDGET (priv->album_list), sensitive);
+    gtk_widget_set_sensitive (GTK_WIDGET (BrowserButton), sensitive);
+    gtk_widget_set_sensitive (GTK_WIDGET (BrowserLabel), sensitive);
 }
 
 
@@ -2394,8 +2668,9 @@ Browser_Popup_Menu_Handler (GtkWidget *widget, GdkEventButton *event,
  * Destroy the whole tree up to the root node
  */
 static void
-Browser_Tree_Initialize (void)
+Browser_Tree_Initialize (EtBrowser *self)
 {
+    EtBrowserPrivate *priv;
 #ifdef G_OS_WIN32
     DWORD drives;
     UINT drive_type;
@@ -2408,9 +2683,11 @@ Browser_Tree_Initialize (void)
     GtkTreeIter dummy_iter;
     GIcon *drive_icon;
 
-    g_return_if_fail (directoryTreeModel != NULL);
+    priv = et_browser_get_instance_private (self);
 
-    gtk_tree_store_clear(directoryTreeModel);
+    g_return_if_fail (priv->directory_model != NULL);
+
+    gtk_tree_store_clear (priv->directory_model);
 
 #ifdef G_OS_WIN32
     /* Code strangely familiar with gtkfilesystemwin32.c */
@@ -2466,7 +2743,7 @@ Browser_Tree_Initialize (void)
             /* Drive letter first so alphabetical drive list order works */
             drive_dir_name = g_strconcat("(", drive_slashless, ") ", drive_label, NULL);
 
-            gtk_tree_store_insert_with_values (directoryTreeModel,
+            gtk_tree_store_insert_with_values (priv->directory_model,
                                                &parent_iter, NULL, G_MAXINT,
                                                TREE_COLUMN_DIR_NAME,
                                                drive_dir_name,
@@ -2477,7 +2754,7 @@ Browser_Tree_Initialize (void)
                                                TREE_COLUMN_ICON, drive_icon,
                                                -1);
             /* Insert dummy node. */
-            gtk_tree_store_append (directoryTreeModel, &dummy_iter,
+            gtk_tree_store_append (priv->directory_model, &dummy_iter,
                                    &parent_iter);
 
             g_free(drive_dir_name);
@@ -2490,7 +2767,7 @@ Browser_Tree_Initialize (void)
 
 #else /* !G_OS_WIN32 */
     drive_icon = get_gicon_for_path (G_DIR_SEPARATOR_S, ET_PATH_STATE_CLOSED);
-    gtk_tree_store_insert_with_values (directoryTreeModel, &parent_iter, NULL,
+    gtk_tree_store_insert_with_values (priv->directory_model, &parent_iter, NULL,
                                        G_MAXINT, TREE_COLUMN_DIR_NAME,
                                        G_DIR_SEPARATOR_S,
                                        TREE_COLUMN_FULL_PATH,
@@ -2499,54 +2776,51 @@ Browser_Tree_Initialize (void)
                                        TREE_COLUMN_SCANNED, FALSE,
                                        TREE_COLUMN_ICON, drive_icon, -1);
     /* Insert dummy node. */
-    gtk_tree_store_append (directoryTreeModel, &dummy_iter, &parent_iter);
+    gtk_tree_store_append (priv->directory_model, &dummy_iter, &parent_iter);
 #endif /* !G_OS_WIN32 */
 
     g_object_unref (drive_icon);
 }
 
 /*
- * Browser_Tree_Rebuild: Refresh the tree browser by destroying it and rebuilding it.
- * Opens tree nodes corresponding to 'path_to_load' if this parameter isn't NULL.
- * If NULL, selects the current path.
+ * et_browser_reload: Refresh the tree browser by destroying it and rebuilding it.
+ * Opens tree nodes corresponding to the current path.
  */
-void Browser_Tree_Rebuild (gchar *path_to_load)
+void
+et_browser_reload (EtBrowser *self)
 {
+    EtBrowserPrivate *priv;
     gchar *current_path = NULL;
     GtkTreeSelection *selection;
 
-    /* May be called from GtkUIManager callback */
-    if (GTK_IS_ACTION(path_to_load))
-        path_to_load = NULL;
-
-    if (path_to_load != NULL)
-    {
-        Browser_Tree_Initialize();
-        Browser_Tree_Select_Dir(path_to_load);
-        return;
-    }
+    priv = et_browser_get_instance_private (self);
 
     /* Memorize the current path to load it again at the end */
-    current_path = Browser_Tree_Get_Path_Of_Selected_Node();
+    current_path = Browser_Tree_Get_Path_Of_Selected_Node (self);
+
     if (current_path==NULL && BrowserEntryCombo)
     {
         /* If no node selected, get path from BrowserEntry or default path */
-        if (BrowserCurrentPath != NULL)
-            current_path = g_strdup(BrowserCurrentPath);
+        if (priv->current_path != NULL)
+            current_path = g_strdup(priv->current_path);
         else if (g_utf8_strlen(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(BrowserEntryCombo)))), 
-1) > 0)
             current_path = 
filename_from_display(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(BrowserEntryCombo)))));
         else
             current_path = g_strdup(DEFAULT_PATH_TO_MP3);
     }
 
-    Browser_Tree_Initialize();
+    Browser_Tree_Initialize (self);
     /* Select again the memorized path without loading files */
-    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserTree));
+    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->tree));
     if (selection)
     {
-        g_signal_handlers_block_by_func(G_OBJECT(selection),G_CALLBACK(Browser_Tree_Node_Selected),NULL);
-        Browser_Tree_Select_Dir(current_path);
-        g_signal_handlers_unblock_by_func(G_OBJECT(selection),G_CALLBACK(Browser_Tree_Node_Selected),NULL);
+        g_signal_handlers_block_by_func (selection,
+                                         G_CALLBACK (Browser_Tree_Node_Selected),
+                                         self);
+        et_browser_select_dir (self, current_path);
+        g_signal_handlers_unblock_by_func (selection,
+                                           G_CALLBACK (Browser_Tree_Node_Selected),
+                                           self);
     }
     g_free(current_path);
 
@@ -2560,9 +2834,11 @@ void Browser_Tree_Rebuild (gchar *path_to_load)
  * Parameters are non-utf8!
  */
 static void
-Browser_Tree_Rename_Directory (const gchar *last_path, const gchar *new_path)
+Browser_Tree_Rename_Directory (EtBrowser *self,
+                               const gchar *last_path,
+                               const gchar *new_path)
 {
-
+    EtBrowserPrivate *priv;
     gchar **textsplit;
     gint i;
     GtkTreeIter  iter;
@@ -2575,6 +2851,8 @@ Browser_Tree_Rename_Directory (const gchar *last_path, const gchar *new_path)
     if (!last_path || !new_path)
         return;
 
+    priv = et_browser_get_instance_private (self);
+
     /*
      * Find the existing tree entry
      */
@@ -2589,11 +2867,11 @@ Browser_Tree_Rename_Directory (const gchar *last_path, const gchar *new_path)
 
     for (i = 1; textsplit[i] != NULL; i++)
     {
-        gboolean valid = gtk_tree_model_get_iter (GTK_TREE_MODEL (directoryTreeModel),
+        gboolean valid = gtk_tree_model_get_iter (GTK_TREE_MODEL (priv->directory_model),
                                                   &iter, parentpath);
         if (valid)
         {
-            childpath = Find_Child_Node (&iter, textsplit[i]);
+            childpath = Find_Child_Node (self, &iter, textsplit[i]);
         }
         else
         {
@@ -2613,23 +2891,23 @@ Browser_Tree_Rename_Directory (const gchar *last_path, const gchar *new_path)
         parentpath = childpath;
     }
 
-    gtk_tree_model_get_iter(GTK_TREE_MODEL(directoryTreeModel), &iter, parentpath);
+    gtk_tree_model_get_iter(GTK_TREE_MODEL(priv->directory_model), &iter, parentpath);
     gtk_tree_path_free(parentpath);
 
     /* Rename the on-screen node */
     new_basename = g_path_get_basename(new_path);
     new_basename_utf8 = filename_to_display(new_basename);
-    gtk_tree_store_set(directoryTreeModel, &iter,
+    gtk_tree_store_set(priv->directory_model, &iter,
                        TREE_COLUMN_DIR_NAME,  new_basename_utf8,
                        TREE_COLUMN_FULL_PATH, new_path,
                        -1);
 
     /* Update fullpath of child nodes */
-    Browser_Tree_Handle_Rename(&iter, last_path, new_path);
+    Browser_Tree_Handle_Rename (self, &iter, last_path, new_path);
 
     /* Update the variable of the current path */
-    path = Browser_Tree_Get_Path_Of_Selected_Node();
-    Browser_Update_Current_Path(path);
+    path = Browser_Tree_Get_Path_Of_Selected_Node (self);
+    et_browser_set_current_path (self, path);
     g_free(path);
 
     g_strfreev(textsplit);
@@ -2641,21 +2919,29 @@ Browser_Tree_Rename_Directory (const gchar *last_path, const gchar *new_path)
  * Recursive function to update paths of all child nodes
  */
 static void
-Browser_Tree_Handle_Rename (GtkTreeIter *parentnode, const gchar *old_path,
+Browser_Tree_Handle_Rename (EtBrowser *self,
+                            GtkTreeIter *parentnode,
+                            const gchar *old_path,
                             const gchar *new_path)
 {
+    EtBrowserPrivate *priv;
     GtkTreeIter iter;
     gchar *path;
     gchar *path_shift;
     gchar *path_new;
 
-    // If there are no children then nothing needs to be done!
-    if (!gtk_tree_model_iter_children(GTK_TREE_MODEL(directoryTreeModel), &iter, parentnode))
+    priv = et_browser_get_instance_private (self);
+
+    /* If there are no children then nothing needs to be done! */
+    if (!gtk_tree_model_iter_children (GTK_TREE_MODEL (priv->directory_model),
+                                       &iter, parentnode))
+    {
         return;
+    }
 
     do
     {
-        gtk_tree_model_get(GTK_TREE_MODEL(directoryTreeModel), &iter,
+        gtk_tree_model_get(GTK_TREE_MODEL(priv->directory_model), &iter,
                            TREE_COLUMN_FULL_PATH, &path, -1);
         if(path == NULL)
             continue;
@@ -2663,17 +2949,20 @@ Browser_Tree_Handle_Rename (GtkTreeIter *parentnode, const gchar *old_path,
         path_shift = g_utf8_offset_to_pointer(path, g_utf8_strlen(old_path, -1));
         path_new = g_strconcat(new_path, path_shift, NULL);
 
-        gtk_tree_store_set(directoryTreeModel, &iter,
+        gtk_tree_store_set(priv->directory_model, &iter,
                            TREE_COLUMN_FULL_PATH, path_new, -1);
 
         g_free(path_new);
         g_free(path);
 
-        // Recurse if necessary
-        if(gtk_tree_model_iter_has_child(GTK_TREE_MODEL(directoryTreeModel), &iter))
-            Browser_Tree_Handle_Rename(&iter, old_path, new_path);
+        /* Recurse if necessary. */
+        if (gtk_tree_model_iter_has_child (GTK_TREE_MODEL (priv->directory_model),
+                                           &iter))
+        {
+            Browser_Tree_Handle_Rename (self, &iter, old_path, new_path);
+        }
 
-    } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(directoryTreeModel), &iter));
+    } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(priv->directory_model), &iter));
 
 }
 
@@ -2681,32 +2970,35 @@ Browser_Tree_Handle_Rename (GtkTreeIter *parentnode, const gchar *old_path,
  * Find the child node of "parentnode" that has text of "childtext
  * Returns NULL on failure
  */
-static
-GtkTreePath *Find_Child_Node (GtkTreeIter *parentnode, gchar *childtext)
+static GtkTreePath *
+Find_Child_Node (EtBrowser *self, GtkTreeIter *parentnode, gchar *childtext)
 {
+    EtBrowserPrivate *priv;
     gint row;
     GtkTreeIter iter;
     gchar *text;
     gchar *temp;
 
-    for (row=0; row < gtk_tree_model_iter_n_children(GTK_TREE_MODEL(directoryTreeModel), parentnode); row++)
+    priv = et_browser_get_instance_private (self);
+
+    for (row=0; row < gtk_tree_model_iter_n_children(GTK_TREE_MODEL(priv->directory_model), parentnode); 
row++)
     {
         if (row == 0)
         {
-            if (gtk_tree_model_iter_children(GTK_TREE_MODEL(directoryTreeModel), &iter, parentnode) == 
FALSE) return NULL;
+            if (gtk_tree_model_iter_children(GTK_TREE_MODEL(priv->directory_model), &iter, parentnode) == 
FALSE) return NULL;
         } else
         {
-            if (gtk_tree_model_iter_next(GTK_TREE_MODEL(directoryTreeModel), &iter) == FALSE)
+            if (gtk_tree_model_iter_next(GTK_TREE_MODEL(priv->directory_model), &iter) == FALSE)
                 return NULL;
         }
-        gtk_tree_model_get(GTK_TREE_MODEL(directoryTreeModel), &iter,
+        gtk_tree_model_get(GTK_TREE_MODEL(priv->directory_model), &iter,
                            TREE_COLUMN_FULL_PATH, &temp, -1);
         text = g_path_get_basename(temp);
         g_free(temp);
         if(strcmp(childtext,text) == 0)
         {
             g_free(text);
-            return gtk_tree_model_get_path(GTK_TREE_MODEL(directoryTreeModel), &iter);
+            return gtk_tree_model_get_path(GTK_TREE_MODEL(priv->directory_model), &iter);
         }
         g_free(text);
 
@@ -2855,6 +3147,10 @@ get_gicon_for_path (const gchar *path, EtPathState path_state)
 static gboolean
 Browser_List_Select_Func (GtkTreeSelection *selection, GtkTreeModel *model, GtkTreePath *path, gboolean 
path_currently_selected, gpointer data)
 {
+    EtBrowserPrivate *priv;
+
+    priv = et_browser_get_instance_private (ET_BROWSER (data));
+
     /* This line will be selected at the end of the event.
      * We store the last ETFile selected, as gtk_tree_selection_get_selected_rows
      * returns the selection, in the ascending line order, instead of the real
@@ -2865,12 +3161,11 @@ Browser_List_Select_Func (GtkTreeSelection *selection, GtkTreeModel *model, GtkT
         GtkTreeIter iter;
         if (gtk_tree_model_get_iter(GTK_TREE_MODEL(fileListModel), &iter, path))
             gtk_tree_model_get(GTK_TREE_MODEL(fileListModel), &iter,
-                               LIST_FILE_POINTER, &LastBrowserListETFileSelected, -1);
+                               LIST_FILE_POINTER, &priv->last_selected_file, -1);
     }else
     {
-        LastBrowserListETFileSelected = NULL;
+        priv->last_selected_file = NULL;
     }
-    //g_print(">>>%s -> %d -> 
%x\n",gtk_tree_path_to_string(path),path_currently_selected,LastBrowserListETFileSelected);
 
     return TRUE;
 }
@@ -2880,8 +3175,10 @@ Browser_List_Select_Func (GtkTreeSelection *selection, GtkTreeModel *model, GtkT
  * Open up a node on the browser tree
  * Scanning and showing all subdirectories
  */
-static void expand_cb (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *gtreePath, gpointer data)
+static void
+expand_cb (EtBrowser *self, GtkTreeIter *iter, GtkTreePath *gtreePath, GtkTreeView *tree)
 {
+    EtBrowserPrivate *priv;
     GFile *dir;
     GFileEnumerator *enumerator;
     gchar *fullpath_file;
@@ -2892,9 +3189,11 @@ static void expand_cb (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *gtreePat
     GtkTreeIter subNodeIter;
     GIcon *icon;
 
-    g_return_if_fail (directoryTreeModel != NULL);
+    priv = et_browser_get_instance_private (self);
 
-    gtk_tree_model_get(GTK_TREE_MODEL(directoryTreeModel), iter,
+    g_return_if_fail (priv->directory_model != NULL);
+
+    gtk_tree_model_get(GTK_TREE_MODEL(priv->directory_model), iter,
                        TREE_COLUMN_FULL_PATH, &parentPath,
                        TREE_COLUMN_SCANNED,   &treeScanned, -1);
 
@@ -2939,7 +3238,7 @@ static void expand_cb (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *gtreePat
                 icon = get_gicon_for_path (fullpath_file,
                                            ET_PATH_STATE_CLOSED);
 
-                gtk_tree_store_insert_with_values (directoryTreeModel,
+                gtk_tree_store_insert_with_values (priv->directory_model,
                                                    &currentIter, iter,
                                                    G_MAXINT,
                                                    TREE_COLUMN_DIR_NAME,
@@ -2954,7 +3253,7 @@ static void expand_cb (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *gtreePat
                 if (has_subdir)
                 {
                     /* Insert a dummy node. */
-                    gtk_tree_store_append(directoryTreeModel, &subNodeIter, &currentIter);
+                    gtk_tree_store_append(priv->directory_model, &subNodeIter, &currentIter);
                 }
 
                 g_object_unref (icon);
@@ -2969,9 +3268,9 @@ static void expand_cb (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *gtreePat
         g_object_unref (enumerator);
 
         /* Remove dummy node. */
-        gtk_tree_model_iter_children (GTK_TREE_MODEL (directoryTreeModel),
+        gtk_tree_model_iter_children (GTK_TREE_MODEL (priv->directory_model),
                                       &subNodeIter, iter);
-        gtk_tree_store_remove (directoryTreeModel, &subNodeIter);
+        gtk_tree_store_remove (priv->directory_model, &subNodeIter);
     }
 
     g_object_unref (dir);
@@ -2982,28 +3281,30 @@ static void expand_cb (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *gtreePat
     if (gtk_tree_path_get_depth(gtreePath) > 1)
     {
         // update the icon of the node to opened folder :-)
-        gtk_tree_store_set(directoryTreeModel, iter,
+        gtk_tree_store_set(priv->directory_model, iter,
                            TREE_COLUMN_SCANNED, TRUE,
                            TREE_COLUMN_ICON, icon,
                            -1);
     }
 #else /* !G_OS_WIN32 */
     // update the icon of the node to opened folder :-)
-    gtk_tree_store_set(directoryTreeModel, iter,
+    gtk_tree_store_set(priv->directory_model, iter,
                        TREE_COLUMN_SCANNED, TRUE,
                        TREE_COLUMN_ICON, icon,
                        -1);
 #endif /* !G_OS_WIN32 */
 
-    gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(directoryTreeModel),
+    gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(priv->directory_model),
                                          TREE_COLUMN_DIR_NAME, GTK_SORT_ASCENDING);
 
     g_object_unref (icon);
     g_free(parentPath);
 }
 
-static void collapse_cb (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *treePath, gpointer data)
+static void
+collapse_cb (EtBrowser *self, GtkTreeIter *iter, GtkTreePath *treePath, GtkTreeView *tree)
 {
+    EtBrowserPrivate *priv;
     GtkTreeIter subNodeIter;
     gchar *path;
     GIcon *icon;
@@ -3011,9 +3312,11 @@ static void collapse_cb (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *treePa
     GFileInfo *fileinfo;
     GError *error = NULL;
 
-    g_return_if_fail (directoryTreeModel != NULL);
+    priv = et_browser_get_instance_private (self);
+
+    g_return_if_fail (priv->directory_model != NULL);
 
-    gtk_tree_model_get (GTK_TREE_MODEL (directoryTreeModel), iter,
+    gtk_tree_model_get (GTK_TREE_MODEL (priv->directory_model), iter,
                         TREE_COLUMN_FULL_PATH, &path, -1);
 
     /* If the directory is not readable, do not delete its children. */
@@ -3035,15 +3338,15 @@ static void collapse_cb (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *treePa
         g_object_unref (fileinfo);
     }
 
-    gtk_tree_model_iter_children(GTK_TREE_MODEL(directoryTreeModel),
+    gtk_tree_model_iter_children(GTK_TREE_MODEL(priv->directory_model),
                                  &subNodeIter, iter);
-    while (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(directoryTreeModel), iter))
+    while (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(priv->directory_model), iter))
     {
-        gtk_tree_model_iter_children(GTK_TREE_MODEL(directoryTreeModel), &subNodeIter, iter);
-        gtk_tree_store_remove(directoryTreeModel, &subNodeIter);
+        gtk_tree_model_iter_children(GTK_TREE_MODEL(priv->directory_model), &subNodeIter, iter);
+        gtk_tree_store_remove(priv->directory_model, &subNodeIter);
     }
 
-    gtk_tree_model_get (GTK_TREE_MODEL (directoryTreeModel), iter,
+    gtk_tree_model_get (GTK_TREE_MODEL (priv->directory_model), iter,
                         TREE_COLUMN_FULL_PATH, &path, -1);
     icon = get_gicon_for_path (path, ET_PATH_STATE_OPEN);
     g_free (path);
@@ -3052,13 +3355,13 @@ static void collapse_cb (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *treePa
     if(gtk_tree_path_get_depth(treePath) > 1)
     {
         // update the icon of the node to closed folder :-)
-        gtk_tree_store_set(directoryTreeModel, iter,
+        gtk_tree_store_set(priv->directory_model, iter,
                            TREE_COLUMN_SCANNED, FALSE,
                            TREE_COLUMN_ICON, icon, -1);
     }
 #else /* !G_OS_WIN32 */
     // update the icon of the node to closed folder :-)
-    gtk_tree_store_set(directoryTreeModel, iter,
+    gtk_tree_store_set(priv->directory_model, iter,
                        TREE_COLUMN_SCANNED, FALSE,
                        TREE_COLUMN_ICON, icon, -1);
 #endif /* !G_OS_WIN32 */
@@ -3069,14 +3372,14 @@ static void collapse_cb (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *treePa
         /* Remove the parent (missing) directory from the tree. */
         if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
         {
-            gtk_tree_store_remove (directoryTreeModel, iter);
+            gtk_tree_store_remove (priv->directory_model, iter);
         }
 
         g_error_free (error);
     }
     else
     {
-        gtk_tree_store_append (directoryTreeModel, &subNodeIter, iter);
+        gtk_tree_store_append (priv->directory_model, &subNodeIter, iter);
     }
 
     g_object_unref (icon);
@@ -3085,15 +3388,19 @@ static void collapse_cb (GtkWidget *tree, GtkTreeIter *iter, GtkTreePath *treePa
 /*
  * Create item of the browser (Entry + Tree + List).
  */
-GtkWidget *Create_Browser_Items (GtkWidget *parent)
+static void
+create_browser (EtBrowser *self)
 {
-       GtkWidget *VerticalBox;
+    EtBrowserPrivate *priv;
+    GtkWidget *VerticalBox;
     GtkWidget *HBox;
     GtkWidget *ScrollWindowDirectoryTree;
     GtkWidget *ScrollWindowFileList;
     GtkWidget *ScrollWindowArtistList;
     GtkWidget *ScrollWindowAlbumList;
     GtkWidget *Label;
+    GtkWidget *ArtistAlbumVPaned;
+    GtkWidget *BrowserHPaned;
     gsize i;
     GtkCellRenderer *renderer;
     GtkTreeViewColumn *column;
@@ -3111,9 +3418,10 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
                                          N_("# Files") };
     const gchar *AlbumList_Titles[] = { N_("Album"), N_("# Files") };
 
-    VerticalBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,2);
-    gtk_container_set_border_width(GTK_CONTAINER(VerticalBox),2);
+    priv = et_browser_get_instance_private (self);
 
+    VerticalBox = GTK_WIDGET (self);
+    gtk_container_set_border_width(GTK_CONTAINER(VerticalBox),2);
 
     // HBox for BrowserEntry + BrowserLabel
     HBox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0);
@@ -3122,17 +3430,19 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
     /*
      * The entry box for displaying path
      */
-    g_assert (BrowserEntryModel == NULL);
-    BrowserEntryModel = gtk_list_store_new (MISC_COMBO_COUNT, G_TYPE_STRING);
+    g_assert (priv->entry_model == NULL);
+    priv->entry_model = gtk_list_store_new (MISC_COMBO_COUNT, G_TYPE_STRING);
 
-    BrowserEntryCombo = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(BrowserEntryModel));
-    g_object_unref (BrowserEntryModel);
+    BrowserEntryCombo = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(priv->entry_model));
+    g_object_unref (priv->entry_model);
     gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(BrowserEntryCombo), MISC_COMBO_TEXT);
     /* History list */
-    Load_Path_Entry_List(BrowserEntryModel, MISC_COMBO_TEXT);
+    Load_Path_Entry_List(priv->entry_model, MISC_COMBO_TEXT);
     //gtk_combo_box_set_wrap_width(GTK_COMBO_BOX(BrowserEntryCombo),2); // Two columns to display paths
 
-    
g_signal_connect(G_OBJECT(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(BrowserEntryCombo)))),"activate",G_CALLBACK(Browser_Entry_Activated),NULL);
+    g_signal_connect_swapped (gtk_bin_get_child (GTK_BIN (BrowserEntryCombo)),
+                              "activate", G_CALLBACK (Browser_Entry_Activated),
+                             self);
     gtk_box_pack_start(GTK_BOX(HBox),BrowserEntryCombo,TRUE,TRUE,1);
     
gtk_widget_set_tooltip_text(GTK_WIDGET(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(BrowserEntryCombo)))),_("Enter a 
directory to browse."));
 
@@ -3154,13 +3464,12 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
     gtk_box_pack_start(GTK_BOX(HBox),BrowserLabel,FALSE,FALSE,2);
 
     /* Browser NoteBook :
-     *  - one tab for the BrowserTree
-     *  - one tab for the BrowserArtistList and the BrowserAlbumList
+     *  - one tab for the priv->tree
+     *  - one tab for the priv->artist_list and the priv->album_list
      */
-    BrowserNoteBook = gtk_notebook_new();
-    //gtk_notebook_popup_enable(GTK_NOTEBOOK(BrowserNoteBook));
-    gtk_notebook_set_show_tabs(GTK_NOTEBOOK(BrowserNoteBook),FALSE);
-    gtk_notebook_set_show_border(GTK_NOTEBOOK(BrowserNoteBook),FALSE);
+    priv->notebook = gtk_notebook_new ();
+    gtk_notebook_set_show_tabs (GTK_NOTEBOOK (priv->notebook), FALSE);
+    gtk_notebook_set_show_border (GTK_NOTEBOOK (priv->notebook), FALSE);
 
 
     /*
@@ -3169,7 +3478,7 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
     ScrollWindowDirectoryTree = gtk_scrolled_window_new(NULL,NULL);
     gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(ScrollWindowDirectoryTree),
                                    GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC);
-    directoryTreeModel = gtk_tree_store_new(TREE_COLUMN_COUNT,
+    priv->directory_model = gtk_tree_store_new(TREE_COLUMN_COUNT,
                                             G_TYPE_STRING,
                                             G_TYPE_STRING,
                                             G_TYPE_BOOLEAN,
@@ -3177,13 +3486,13 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
                                             G_TYPE_ICON);
 
     Label = gtk_label_new(_("Tree"));
-    gtk_notebook_append_page(GTK_NOTEBOOK(BrowserNoteBook),ScrollWindowDirectoryTree,Label);
+    gtk_notebook_append_page(GTK_NOTEBOOK(priv->notebook),ScrollWindowDirectoryTree,Label);
 
     /* The tree view */
-    BrowserTree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(directoryTreeModel));
-    g_object_unref (directoryTreeModel);
-    gtk_container_add(GTK_CONTAINER(ScrollWindowDirectoryTree),BrowserTree);
-    gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(BrowserTree), TRUE);
+    priv->tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(priv->directory_model));
+    g_object_unref (priv->directory_model);
+    gtk_container_add(GTK_CONTAINER(ScrollWindowDirectoryTree),priv->tree);
+    gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(priv->tree), TRUE);
 
     // Column for the pixbuf + text
     column = gtk_tree_view_column_new();
@@ -3201,24 +3510,27 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
     gtk_tree_view_column_set_attributes(column, renderer,
                                        "text", TREE_COLUMN_DIR_NAME,
                                         NULL);
-    gtk_tree_view_append_column(GTK_TREE_VIEW(BrowserTree), column);
+    gtk_tree_view_append_column(GTK_TREE_VIEW(priv->tree), column);
     gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
 
-    Browser_Tree_Initialize();
+    Browser_Tree_Initialize (self);
 
 
     /* Signals */
-    g_signal_connect(G_OBJECT(BrowserTree), "row-expanded",  G_CALLBACK(expand_cb),NULL);
-    g_signal_connect(G_OBJECT(BrowserTree), "row-collapsed", G_CALLBACK(collapse_cb),NULL);
-    g_signal_connect(G_OBJECT(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserTree))),
-            "changed", G_CALLBACK(Browser_Tree_Node_Selected), NULL);
+    g_signal_connect_swapped (priv->tree, "row-expanded",
+                              G_CALLBACK (expand_cb), self);
+    g_signal_connect_swapped (priv->tree, "row-collapsed",
+                              G_CALLBACK (collapse_cb), self);
+    g_signal_connect_swapped (gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree)),
+                              "changed",
+                              G_CALLBACK (Browser_Tree_Node_Selected), self);
 
-    g_signal_connect(G_OBJECT(BrowserTree),"key_press_event", G_CALLBACK(Browser_Tree_Key_Press),NULL);
+    g_signal_connect(G_OBJECT(priv->tree),"key_press_event", G_CALLBACK(Browser_Tree_Key_Press),NULL);
 
     /* Create Popup Menu on browser tree view */
     PopupMenu = gtk_ui_manager_get_widget(UIManager, "/DirPopup");
-    gtk_menu_attach_to_widget (GTK_MENU (PopupMenu), BrowserTree, NULL);
-    g_signal_connect (G_OBJECT (BrowserTree), "button-press-event",
+    gtk_menu_attach_to_widget (GTK_MENU (PopupMenu), priv->tree, NULL);
+    g_signal_connect (priv->tree, "button-press-event",
                       G_CALLBACK (Browser_Popup_Menu_Handler), PopupMenu);
 
 
@@ -3229,7 +3541,7 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
     ArtistAlbumVPaned = gtk_paned_new(GTK_ORIENTATION_VERTICAL);
 
     Label = gtk_label_new(_("Artist & Album"));
-    gtk_notebook_append_page(GTK_NOTEBOOK(BrowserNoteBook),ArtistAlbumVPaned,Label);
+    gtk_notebook_append_page(GTK_NOTEBOOK(priv->notebook),ArtistAlbumVPaned,Label);
 
     ScrollWindowArtistList = gtk_scrolled_window_new(NULL,NULL);
     gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(ScrollWindowArtistList),
@@ -3245,10 +3557,10 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
                                          G_TYPE_INT,
                                          GDK_TYPE_COLOR);
 
-    BrowserArtistList = gtk_tree_view_new_with_model(GTK_TREE_MODEL(artistListModel));
+    priv->artist_list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(artistListModel));
     g_object_unref (artistListModel);
-    gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(BrowserArtistList), TRUE);
-    
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserArtistList)),GTK_SELECTION_SINGLE);
+    gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(priv->artist_list), TRUE);
+    
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->artist_list)),GTK_SELECTION_SINGLE);
 
 
     // Artist column
@@ -3268,7 +3580,7 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
                                         "style",          ARTIST_FONT_STYLE,
                                         "foreground-gdk", ARTIST_ROW_FOREGROUND,
                                         NULL);
-    gtk_tree_view_append_column(GTK_TREE_VIEW(BrowserArtistList), column);
+    gtk_tree_view_append_column(GTK_TREE_VIEW(priv->artist_list), column);
     gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
 
     // # Albums of Artist column
@@ -3283,7 +3595,7 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
                                         "style",          ARTIST_FONT_STYLE,
                                         "foreground-gdk", ARTIST_ROW_FOREGROUND,
                                         NULL);
-    gtk_tree_view_append_column(GTK_TREE_VIEW(BrowserArtistList), column);
+    gtk_tree_view_append_column(GTK_TREE_VIEW(priv->artist_list), column);
     gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
 
     // # Files of Artist column
@@ -3298,17 +3610,20 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
                                         "style",          ARTIST_FONT_STYLE,
                                         "foreground-gdk", ARTIST_ROW_FOREGROUND,
                                         NULL);
-    gtk_tree_view_append_column(GTK_TREE_VIEW(BrowserArtistList), column);
+    gtk_tree_view_append_column(GTK_TREE_VIEW(priv->artist_list), column);
     gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
 
-    
g_signal_connect(G_OBJECT(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserArtistList))),"changed",G_CALLBACK(Browser_Artist_List_Row_Selected),NULL);
+    g_signal_connect_swapped (gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->artist_list)),
+                              "changed",
+                              G_CALLBACK (Browser_Artist_List_Row_Selected),
+                              self);
 
-    gtk_container_add(GTK_CONTAINER(ScrollWindowArtistList),BrowserArtistList);
+    gtk_container_add(GTK_CONTAINER(ScrollWindowArtistList),priv->artist_list);
 
     // Create Popup Menu on browser artist list
     PopupMenu = gtk_ui_manager_get_widget(UIManager, "/DirArtistPopup");
-    gtk_menu_attach_to_widget (GTK_MENU (PopupMenu), BrowserArtistList, NULL);
-    g_signal_connect (G_OBJECT (BrowserArtistList), "button-press-event",
+    gtk_menu_attach_to_widget (GTK_MENU (PopupMenu), priv->artist_list, NULL);
+    g_signal_connect (priv->artist_list, "button-press-event",
                       G_CALLBACK (Browser_Popup_Menu_Handler), PopupMenu);
     // Not available yet!
     //ui_widget_set_sensitive(MENU_FILE, AM_ARTIST_OPEN_FILE_WITH, FALSE);
@@ -3326,11 +3641,11 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
                                          G_TYPE_INT,
                                          GDK_TYPE_COLOR);
 
-    BrowserAlbumList = gtk_tree_view_new_with_model(GTK_TREE_MODEL(albumListModel));
+    priv->album_list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(albumListModel));
     g_object_unref (albumListModel);
-    gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(BrowserAlbumList), TRUE);
-    gtk_tree_view_set_reorderable(GTK_TREE_VIEW(BrowserAlbumList), FALSE);
-    gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserAlbumList)), 
GTK_SELECTION_SINGLE);
+    gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(priv->album_list), TRUE);
+    gtk_tree_view_set_reorderable(GTK_TREE_VIEW(priv->album_list), FALSE);
+    gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(priv->album_list)), 
GTK_SELECTION_SINGLE);
 
     // Album column
     column = gtk_tree_view_column_new();
@@ -3348,7 +3663,7 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
                                         "style",          ALBUM_FONT_STYLE,
                                         "foreground-gdk", ALBUM_ROW_FOREGROUND,
                                         NULL);
-    gtk_tree_view_append_column(GTK_TREE_VIEW(BrowserAlbumList), column);
+    gtk_tree_view_append_column(GTK_TREE_VIEW(priv->album_list), column);
     gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
 
     // # files column
@@ -3363,16 +3678,19 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
                                         "style",          ALBUM_FONT_STYLE,
                                         "foreground-gdk", ALBUM_ROW_FOREGROUND,
                                         NULL);
-    gtk_tree_view_append_column(GTK_TREE_VIEW(BrowserAlbumList), column);
+    gtk_tree_view_append_column(GTK_TREE_VIEW(priv->album_list), column);
     gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
 
-    
g_signal_connect(G_OBJECT(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserAlbumList))),"changed",G_CALLBACK(Browser_Album_List_Row_Selected),NULL);
-    gtk_container_add(GTK_CONTAINER(ScrollWindowAlbumList),BrowserAlbumList);
+    g_signal_connect_swapped (gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->album_list)),
+                              "changed",
+                              G_CALLBACK (Browser_Album_List_Row_Selected),
+                              self);
+    gtk_container_add(GTK_CONTAINER(ScrollWindowAlbumList),priv->album_list);
 
     // Create Popup Menu on browser album list
     PopupMenu = gtk_ui_manager_get_widget(UIManager, "/DirAlbumPopup");
-    gtk_menu_attach_to_widget (GTK_MENU (PopupMenu), BrowserAlbumList, NULL);
-    g_signal_connect (G_OBJECT (BrowserAlbumList), "button-press-event",
+    gtk_menu_attach_to_widget (GTK_MENU (PopupMenu), priv->album_list, NULL);
+    g_signal_connect (priv->album_list, "button-press-event",
                       G_CALLBACK (Browser_Popup_Menu_Handler), PopupMenu);
     // Not available yet!
     //ui_widget_set_sensitive(MENU_FILE, AM_ALBUM_OPEN_FILE_WITH, FALSE);
@@ -3445,18 +3763,22 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
 
     gtk_tree_view_set_reorderable(GTK_TREE_VIEW(BrowserList), FALSE);
     
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList)),GTK_SELECTION_MULTIPLE);
-    // When selecting a line
-    gtk_tree_selection_set_select_function(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList)), 
Browser_List_Select_Func, NULL, NULL);
+    /* When selecting a line. */
+    gtk_tree_selection_set_select_function (gtk_tree_view_get_selection (GTK_TREE_VIEW (BrowserList)),
+                                            Browser_List_Select_Func, self,
+                                            NULL);
     // To sort list
     gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (fileListModel), 0,
                                       Browser_List_Sort_Func, NULL, NULL);
     Browser_List_Refresh_Sort();
     gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(fileListModel), 0, GTK_SORT_ASCENDING);
 
-    g_signal_connect(G_OBJECT(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList))),
-            "changed", G_CALLBACK(Browser_List_Row_Selected), NULL);
+    g_signal_connect_swapped (gtk_tree_view_get_selection (GTK_TREE_VIEW (BrowserList)),
+                              "changed",
+                              G_CALLBACK (Browser_List_Row_Selected), self);
     g_signal_connect(G_OBJECT(BrowserList),"key_press_event", G_CALLBACK(Browser_List_Key_Press),NULL);
-    g_signal_connect(G_OBJECT(BrowserList),"button_press_event", G_CALLBACK(Browser_List_Button_Press),NULL);
+    g_signal_connect_swapped (BrowserList, "button-press-event",
+                              G_CALLBACK (Browser_List_Button_Press), self);
 
 
     /*
@@ -3470,24 +3792,25 @@ GtkWidget *Create_Browser_Items (GtkWidget *parent)
     /*
      * The list store for run program combos
      */
-    RunProgramModel = gtk_list_store_new(MISC_COMBO_COUNT, G_TYPE_STRING);
+    priv->run_program_model = gtk_list_store_new(MISC_COMBO_COUNT, G_TYPE_STRING);
 
     /*
      * The pane for the tree and list
      */
     BrowserHPaned = gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);
     gtk_box_pack_start(GTK_BOX(VerticalBox),BrowserHPaned,TRUE,TRUE,0);
-    gtk_paned_pack1(GTK_PANED(BrowserHPaned),BrowserNoteBook,TRUE,TRUE);   // Left side
-    gtk_paned_pack2(GTK_PANED(BrowserHPaned),ScrollWindowFileList,TRUE,TRUE); // Right side
+    /* Left side. */
+    gtk_paned_pack1 (GTK_PANED (BrowserHPaned), priv->notebook, TRUE, TRUE);
+    /* Right side. */
+    gtk_paned_pack2 (GTK_PANED (BrowserHPaned), ScrollWindowFileList, TRUE,
+                     TRUE);
 
     /* TODO: Give the browser area a sensible default size. */
     gtk_paned_set_position (GTK_PANED (BrowserHPaned), 250);
-    gtk_widget_show_all(VerticalBox);
+    gtk_widget_show_all (GTK_WIDGET (self));
 
     /* Set home variable as current path */
-    Browser_Update_Current_Path (g_get_home_dir ());
-
-    return VerticalBox;
+    et_browser_set_current_path (self, g_get_home_dir ());
 }
 
 /*
@@ -3544,12 +3867,58 @@ et_browser_set_sorting_file_mode (GtkTreeViewColumn *column, gpointer data)
     Browser_List_Refresh_Sort ();
 }
 
+/*******************************
+ * Scanner To Rename Directory *
+ *******************************/
+static void
+rename_directory_generate_preview (EtBrowser *self)
+{
+    EtBrowserPrivate *priv;
+    gchar *preview_text = NULL;
+    gchar *mask = NULL;
+
+    priv = et_browser_get_instance_private (self);
+
+    if (!ETCore->ETFileDisplayed
+    ||  !priv->rename_directory_dialog || !priv->rename_directory_mask_combo || 
!priv->rename_directory_preview_label)
+        return;
+
+    mask = 
g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(priv->rename_directory_mask_combo)))));
+    if (!mask)
+        return;
+
+    preview_text = Scan_Generate_New_Filename_From_Mask(ETCore->ETFileDisplayed,mask,FALSE);
+
+    if (GTK_IS_LABEL(priv->rename_directory_preview_label))
+    {
+        if (preview_text)
+        {
+            //gtk_label_set_text(GTK_LABEL(priv->rename_file_preview_label),preview_text);
+            gchar *tmp_string = g_markup_printf_escaped("%s",preview_text); // To avoid problem with strings 
containing characters like '&'
+            gchar *str = g_strdup_printf("<i>%s</i>",tmp_string);
+            gtk_label_set_markup(GTK_LABEL(priv->rename_directory_preview_label),str);
+            g_free(tmp_string);
+            g_free(str);
+        } else
+        {
+            gtk_label_set_text(GTK_LABEL(priv->rename_directory_preview_label),"");
+        }
+
+        // Force the window to be redrawed else the preview label may be not placed correctly
+        gtk_widget_queue_resize(priv->rename_directory_dialog);
+    }
+
+    g_free(mask);
+    g_free(preview_text);
+}
 
 /*
  * The window to Rename a directory into the browser.
  */
-void Browser_Open_Rename_Directory_Window (void)
+void
+et_browser_show_rename_directory_dialog (EtBrowser *self)
 {
+    EtBrowserPrivate *priv;
     GtkWidget *VBox;
     GtkWidget *HBox;
     GtkWidget *Label;
@@ -3560,14 +3929,16 @@ void Browser_Open_Rename_Directory_Window (void)
     gchar *address = NULL;
     gchar *string;
 
-    if (RenameDirectoryWindow != NULL)
+    priv = et_browser_get_instance_private (self);
+
+    if (priv->rename_directory_dialog != NULL)
     {
-        gtk_window_present(GTK_WINDOW(RenameDirectoryWindow));
+        gtk_window_present(GTK_WINDOW(priv->rename_directory_dialog));
         return;
     }
 
     /* We get the full path but we musn't display the parent directories */
-    directory_parent = g_strdup(BrowserCurrentPath);
+    directory_parent = g_strdup(priv->current_path);
     if (!directory_parent || strlen(directory_parent) == 0)
     {
         g_free(directory_parent);
@@ -3592,7 +3963,7 @@ void Browser_Open_Rename_Directory_Window (void)
 
     directory_name_utf8 = filename_to_display(directory_name);
 
-    RenameDirectoryWindow = gtk_dialog_new_with_buttons (_("Rename Directory"),
+    priv->rename_directory_dialog = gtk_dialog_new_with_buttons (_("Rename Directory"),
                                                          GTK_WINDOW (MainWindow),
                                                          GTK_DIALOG_DESTROY_WITH_PARENT,
                                                          GTK_STOCK_CANCEL,
@@ -3601,17 +3972,17 @@ void Browser_Open_Rename_Directory_Window (void)
                                                          GTK_RESPONSE_APPLY,
                                                          NULL);
 
-    gtk_dialog_set_default_response (GTK_DIALOG (RenameDirectoryWindow),
+    gtk_dialog_set_default_response (GTK_DIALOG (priv->rename_directory_dialog),
                                      GTK_RESPONSE_APPLY);
 
     /* We attach useful data to the combobox */
-    g_object_set_data(G_OBJECT(RenameDirectoryWindow), "Parent_Directory", directory_parent);
-    g_object_set_data(G_OBJECT(RenameDirectoryWindow), "Current_Directory", directory_name);
-    g_signal_connect (RenameDirectoryWindow, "response",
-                      G_CALLBACK (et_rename_directory_on_response), NULL);
+    g_object_set_data(G_OBJECT(priv->rename_directory_dialog), "Parent_Directory", directory_parent);
+    g_object_set_data(G_OBJECT(priv->rename_directory_dialog), "Current_Directory", directory_name);
+    g_signal_connect (priv->rename_directory_dialog, "response",
+                      G_CALLBACK (et_rename_directory_on_response), self);
 
-    VBox = gtk_dialog_get_content_area (GTK_DIALOG (RenameDirectoryWindow));
-    gtk_container_set_border_width (GTK_CONTAINER (RenameDirectoryWindow),
+    VBox = gtk_dialog_get_content_area (GTK_DIALOG (priv->rename_directory_dialog));
+    gtk_container_set_border_width (GTK_CONTAINER (priv->rename_directory_dialog),
                                     BOX_SPACING);
 
     string = g_strdup_printf(_("Rename the directory '%s' to:"),directory_name_utf8);
@@ -3621,112 +3992,121 @@ void Browser_Open_Rename_Directory_Window (void)
     gtk_label_set_line_wrap(GTK_LABEL(Label),TRUE);
 
     /* The combobox to rename the directory */
-    RenameDirectoryCombo = gtk_combo_box_text_new_with_entry();
-    gtk_box_pack_start(GTK_BOX(VBox),RenameDirectoryCombo,FALSE,FALSE,0);
+    priv->rename_directory_combo = gtk_combo_box_text_new_with_entry();
+    gtk_box_pack_start(GTK_BOX(VBox),priv->rename_directory_combo,FALSE,FALSE,0);
     /* Set the directory into the combobox */
-    gtk_combo_box_text_prepend_text(GTK_COMBO_BOX_TEXT(RenameDirectoryCombo), directory_name_utf8);
-    gtk_combo_box_text_prepend_text(GTK_COMBO_BOX_TEXT(RenameDirectoryCombo), "");
-    gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(RenameDirectoryCombo))),directory_name_utf8);
+    gtk_combo_box_text_prepend_text(GTK_COMBO_BOX_TEXT(priv->rename_directory_combo), directory_name_utf8);
+    gtk_combo_box_text_prepend_text(GTK_COMBO_BOX_TEXT(priv->rename_directory_combo), "");
+    
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(priv->rename_directory_combo))),directory_name_utf8);
 
     /* Rename directory : check box + combo box + Status icon */
     HBox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, BOX_SPACING);
     gtk_box_pack_start(GTK_BOX(VBox),HBox,TRUE,TRUE,0);
 
-    RenameDirectoryWithMask = gtk_check_button_new_with_label(_("Use mask:"));
-    gtk_box_pack_start(GTK_BOX(HBox),RenameDirectoryWithMask,FALSE,FALSE,0);
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(RenameDirectoryWithMask),RENAME_DIRECTORY_WITH_MASK);
-    gtk_widget_set_tooltip_text(RenameDirectoryWithMask,_("If activated, it will use masks to rename 
directory."));
-    
g_signal_connect(G_OBJECT(RenameDirectoryWithMask),"toggled",G_CALLBACK(Rename_Directory_With_Mask_Toggled),NULL);
+    priv->rename_directory_mask_toggle = gtk_check_button_new_with_label(_("Use mask:"));
+    gtk_box_pack_start(GTK_BOX(HBox),priv->rename_directory_mask_toggle,FALSE,FALSE,0);
+    
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->rename_directory_mask_toggle),RENAME_DIRECTORY_WITH_MASK);
+    gtk_widget_set_tooltip_text(priv->rename_directory_mask_toggle,_("If activated, it will use masks to 
rename directory."));
+    g_signal_connect_swapped (priv->rename_directory_mask_toggle, "toggled",
+                              G_CALLBACK (Rename_Directory_With_Mask_Toggled),
+                              self);
 
     // Set up list model which is used by the combobox
     /* Rename directory from mask */
-    if (!RenameDirectoryMaskModel)
-        RenameDirectoryMaskModel = gtk_list_store_new(MASK_EDITOR_COUNT, G_TYPE_STRING);
+    if (!priv->rename_directory_mask_model)
+        priv->rename_directory_mask_model = gtk_list_store_new(MASK_EDITOR_COUNT, G_TYPE_STRING);
     else
-        gtk_list_store_clear(RenameDirectoryMaskModel);
+        gtk_list_store_clear(priv->rename_directory_mask_model);
 
     // The combo box to select the mask to apply
-    RenameDirectoryMaskCombo = gtk_combo_box_new_with_entry();
-    gtk_combo_box_set_model(GTK_COMBO_BOX(RenameDirectoryMaskCombo), 
GTK_TREE_MODEL(RenameDirectoryMaskModel));
-    gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(RenameDirectoryMaskCombo), MASK_EDITOR_TEXT);
-    gtk_widget_set_size_request(RenameDirectoryMaskCombo, 80, -1);
+    priv->rename_directory_mask_combo = gtk_combo_box_new_with_entry();
+    gtk_combo_box_set_model(GTK_COMBO_BOX(priv->rename_directory_mask_combo), 
GTK_TREE_MODEL(priv->rename_directory_mask_model));
+    gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(priv->rename_directory_mask_combo), MASK_EDITOR_TEXT);
+    gtk_widget_set_size_request(priv->rename_directory_mask_combo, 80, -1);
 
-    gtk_box_pack_start(GTK_BOX(HBox),RenameDirectoryMaskCombo,TRUE,TRUE,0);
-    gtk_widget_set_tooltip_text(GTK_WIDGET(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(RenameDirectoryMaskCombo)))),
+    gtk_box_pack_start(GTK_BOX(HBox),priv->rename_directory_mask_combo,TRUE,TRUE,0);
+    
gtk_widget_set_tooltip_text(GTK_WIDGET(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(priv->rename_directory_mask_combo)))),
         _("Select or type in a mask using codes (see Legend in Scanner Window) to rename "
         "the directory from tag fields."));
     // Signal to generate preview (preview of the new directory)
-    
g_signal_connect_swapped(G_OBJECT(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(RenameDirectoryMaskCombo)))),"changed",
-        G_CALLBACK(Scan_Rename_Directory_Generate_Preview),NULL);
+    g_signal_connect_swapped (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->rename_directory_mask_combo))),
+                              "changed",
+                              G_CALLBACK (rename_directory_generate_preview),
+                              self);
 
     // Load masks into the combobox from a file
-    Load_Rename_Directory_Masks_List(RenameDirectoryMaskModel, MASK_EDITOR_TEXT, Rename_Directory_Masks);
+    Load_Rename_Directory_Masks_List(priv->rename_directory_mask_model, MASK_EDITOR_TEXT, 
Rename_Directory_Masks);
     if (RENAME_DIRECTORY_DEFAULT_MASK)
     {
-        Add_String_To_Combo_List(RenameDirectoryMaskModel, RENAME_DIRECTORY_DEFAULT_MASK);
-        gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(RenameDirectoryMaskCombo))), 
RENAME_DIRECTORY_DEFAULT_MASK);
+        Add_String_To_Combo_List(priv->rename_directory_mask_model, RENAME_DIRECTORY_DEFAULT_MASK);
+        gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(priv->rename_directory_mask_combo))), 
RENAME_DIRECTORY_DEFAULT_MASK);
     }else
     {
-        gtk_combo_box_set_active(GTK_COMBO_BOX(RenameDirectoryMaskCombo), 0);
+        gtk_combo_box_set_active(GTK_COMBO_BOX(priv->rename_directory_mask_combo), 0);
     }
 
     // Mask status icon
     // Signal connection to check if mask is correct into the mask entry
-    g_signal_connect (gtk_bin_get_child (GTK_BIN (RenameDirectoryMaskCombo)),
+    g_signal_connect (gtk_bin_get_child (GTK_BIN (priv->rename_directory_mask_combo)),
                       "changed", G_CALLBACK (entry_check_rename_file_mask),
                       NULL);
 
     // Preview label
-    RenameDirectoryPreviewLabel = gtk_label_new (_("Rename directory preview"));
-    gtk_label_set_line_wrap(GTK_LABEL(RenameDirectoryPreviewLabel),TRUE);
+    priv->rename_directory_preview_label = gtk_label_new (_("Rename directory preview"));
+    gtk_label_set_line_wrap(GTK_LABEL(priv->rename_directory_preview_label),TRUE);
     ////gtk_widget_show(FillTagPreviewLabel);
-    gtk_box_pack_start(GTK_BOX(VBox),RenameDirectoryPreviewLabel,TRUE,TRUE,0);
+    gtk_box_pack_start(GTK_BOX(VBox),priv->rename_directory_preview_label,TRUE,TRUE,0);
 
     /* Button to save: to rename directory */
-    Button = gtk_dialog_get_widget_for_response (GTK_DIALOG (RenameDirectoryWindow),
+    Button = gtk_dialog_get_widget_for_response (GTK_DIALOG (priv->rename_directory_dialog),
                                                  GTK_RESPONSE_APPLY);
-    g_signal_connect_swapped (gtk_bin_get_child (GTK_BIN (RenameDirectoryCombo)),
+    g_signal_connect_swapped (gtk_bin_get_child (GTK_BIN (priv->rename_directory_combo)),
                               "changed",
                               G_CALLBACK (empty_entry_disable_widget),
                               G_OBJECT (Button));
 
-    gtk_widget_show_all(RenameDirectoryWindow);
+    gtk_widget_show_all(priv->rename_directory_dialog);
 
     // To initialize the 'Use mask' check button state
-    g_signal_emit_by_name(G_OBJECT(RenameDirectoryWithMask),"toggled");
+    g_signal_emit_by_name(G_OBJECT(priv->rename_directory_mask_toggle),"toggled");
 
     // To initialize PreviewLabel + MaskStatusIconBox
-    g_signal_emit_by_name(G_OBJECT(gtk_bin_get_child(GTK_BIN(RenameDirectoryMaskCombo))),"changed");
+    g_signal_emit_by_name(G_OBJECT(gtk_bin_get_child(GTK_BIN(priv->rename_directory_mask_combo))),"changed");
 
     g_free(directory_name_utf8);
 }
 
 static void
-Destroy_Rename_Directory_Window (void)
+Destroy_Rename_Directory_Window (EtBrowser *self)
 {
-    if (RenameDirectoryWindow)
+    EtBrowserPrivate *priv;
+
+    priv = et_browser_get_instance_private (self);
+
+    if (priv->rename_directory_dialog)
     {
-        g_free(g_object_get_data(G_OBJECT(RenameDirectoryWindow),"Parent_Directory"));
-        g_free(g_object_get_data(G_OBJECT(RenameDirectoryWindow),"Current_Directory"));
+        g_free(g_object_get_data(G_OBJECT(priv->rename_directory_dialog),"Parent_Directory"));
+        g_free(g_object_get_data(G_OBJECT(priv->rename_directory_dialog),"Current_Directory"));
 
         if (RENAME_DIRECTORY_DEFAULT_MASK) g_free(RENAME_DIRECTORY_DEFAULT_MASK);
-        RENAME_DIRECTORY_DEFAULT_MASK = 
g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(RenameDirectoryMaskCombo)))));
-        Add_String_To_Combo_List(RenameDirectoryMaskModel, RENAME_DIRECTORY_DEFAULT_MASK);
-        Save_Rename_Directory_Masks_List(RenameDirectoryMaskModel, MASK_EDITOR_TEXT);
+        RENAME_DIRECTORY_DEFAULT_MASK = 
g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(priv->rename_directory_mask_combo)))));
+        Add_String_To_Combo_List(priv->rename_directory_mask_model, RENAME_DIRECTORY_DEFAULT_MASK);
+        Save_Rename_Directory_Masks_List(priv->rename_directory_mask_model, MASK_EDITOR_TEXT);
 
-        RENAME_DIRECTORY_WITH_MASK = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(RenameDirectoryWithMask));
+        RENAME_DIRECTORY_WITH_MASK = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(priv->rename_directory_mask_toggle));
 
-        gtk_list_store_clear(RenameDirectoryMaskModel);
+        gtk_list_store_clear(priv->rename_directory_mask_model);
 
-        gtk_widget_destroy(RenameDirectoryWindow);
-        RenameDirectoryPreviewLabel = NULL;
-        RenameDirectoryWindow = NULL;
+        gtk_widget_destroy(priv->rename_directory_dialog);
+        priv->rename_directory_preview_label = NULL;
+        priv->rename_directory_dialog = NULL;
     }
 }
 
 static void
-Rename_Directory (void)
+Rename_Directory (EtBrowser *self)
 {
+    EtBrowserPrivate *priv;
     DIR   *dir;
     gchar *directory_parent;
     gchar *directory_last_name;
@@ -3740,23 +4120,24 @@ Rename_Directory (void)
     gchar *tmp_path_utf8;
     gint   fd_tmp;
 
+    priv = et_browser_get_instance_private (self);
 
-    g_return_if_fail (RenameDirectoryWindow != NULL);
+    g_return_if_fail (priv->rename_directory_dialog != NULL);
 
-    directory_parent    = g_object_get_data(G_OBJECT(RenameDirectoryWindow),"Parent_Directory");
-    directory_last_name = g_object_get_data(G_OBJECT(RenameDirectoryWindow),"Current_Directory");
+    directory_parent    = g_object_get_data(G_OBJECT(priv->rename_directory_dialog),"Parent_Directory");
+    directory_last_name = g_object_get_data(G_OBJECT(priv->rename_directory_dialog),"Current_Directory");
 
-    if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(RenameDirectoryWithMask)))
+    if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(priv->rename_directory_mask_toggle)))
     {
         // Renamed from mask
-        gchar *mask = 
g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(RenameDirectoryMaskCombo)))));
+        gchar *mask = 
g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(priv->rename_directory_mask_combo)))));
         directory_new_name = Scan_Generate_New_Directory_Name_From_Mask(ETCore->ETFileDisplayed,mask,FALSE);
         g_free(mask);
 
     }else
     {
         // Renamed 'manually'
-        directory_new_name  = 
g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(RenameDirectoryCombo)))));
+        directory_new_name  = 
g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(priv->rename_directory_combo)))));
     }
 
     /* Check if a name for the directory have been supplied */
@@ -3804,7 +4185,7 @@ Rename_Directory (void)
     if (directory_last_name && directory_new_name_file
     && strcmp(directory_last_name,directory_new_name_file)==0)
     {
-        Destroy_Rename_Directory_Window();
+        Destroy_Rename_Directory_Window (self);
         g_free(directory_new_name_file);
         return;
     }
@@ -3945,7 +4326,7 @@ Rename_Directory (void)
     }
 
     ET_Update_Directory_Name_Into_File_List(last_path,new_path);
-    Browser_Tree_Rename_Directory(last_path,new_path);
+    Browser_Tree_Rename_Directory (self, last_path, new_path);
 
     // To update file path in the browser entry
     if (ETCore->ETFileDisplayedList)
@@ -3953,12 +4334,12 @@ Rename_Directory (void)
         ET_Display_File_Data_To_UI(ETCore->ETFileDisplayed);
     }else
     {
-        gchar *tmp = filename_to_display(Browser_Get_Current_Path());
+        gchar *tmp = filename_to_display (et_browser_get_current_path (self));
         Browser_Entry_Set_Text(tmp);
         g_free(tmp);
     }
 
-    Destroy_Rename_Directory_Window();
+    Destroy_Rename_Directory_Window (self);
     g_free(last_path);
     g_free(last_path_utf8);
     g_free(new_path);
@@ -3970,11 +4351,15 @@ Rename_Directory (void)
 }
 
 static void
-Rename_Directory_With_Mask_Toggled (void)
+Rename_Directory_With_Mask_Toggled (EtBrowser *self)
 {
-    gtk_widget_set_sensitive(GTK_WIDGET(RenameDirectoryCombo),            
!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(RenameDirectoryWithMask)));
-    gtk_widget_set_sensitive(GTK_WIDGET(RenameDirectoryMaskCombo),         
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(RenameDirectoryWithMask)));
-    gtk_widget_set_sensitive(GTK_WIDGET(RenameDirectoryPreviewLabel),      
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(RenameDirectoryWithMask)));
+    EtBrowserPrivate *priv;
+
+    priv = et_browser_get_instance_private (self);
+
+    gtk_widget_set_sensitive(GTK_WIDGET(priv->rename_directory_combo),            
!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(priv->rename_directory_mask_toggle)));
+    gtk_widget_set_sensitive(GTK_WIDGET(priv->rename_directory_mask_combo),         
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(priv->rename_directory_mask_toggle)));
+    gtk_widget_set_sensitive(GTK_WIDGET(priv->rename_directory_preview_label),      
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(priv->rename_directory_mask_toggle)));
 }
 
 
@@ -3982,27 +4367,33 @@ Rename_Directory_With_Mask_Toggled (void)
  * Window where is typed the name of the program to run, which
  * receives the current directory as parameter.
  */
-void Browser_Open_Run_Program_Tree_Window (void)
+void
+et_browser_show_open_directory_with_dialog (EtBrowser *self)
 {
+    EtBrowserPrivate *priv;
     GtkWidget *VBox;
     GtkWidget *HBox;
     GtkWidget *Label;
-    GtkWidget *RunProgramComboBox;
     GtkWidget *Button;
     gchar *current_directory = NULL;
 
-    if (RunProgramTreeWindow != NULL)
+    g_return_if_fail (ET_BROWSER (self));
+
+    priv = et_browser_get_instance_private (self);
+
+    if (priv->open_directory_with_dialog != NULL)
     {
-        gtk_window_present(GTK_WINDOW(RunProgramTreeWindow));
+        gtk_window_present(GTK_WINDOW(priv->open_directory_with_dialog));
         return;
     }
 
-    // Current directory
-    current_directory = g_strdup(BrowserCurrentPath);
+    /* Current directory. */
+    current_directory = g_strdup (priv->current_path);
+
     if (!current_directory || strlen(current_directory)==0)
         return;
 
-    RunProgramTreeWindow = gtk_dialog_new_with_buttons (_("Browse Directory With"),
+    priv->open_directory_with_dialog = gtk_dialog_new_with_buttons (_("Browse Directory With"),
                                                         GTK_WINDOW (MainWindow),
                                                         GTK_DIALOG_DESTROY_WITH_PARENT,
                                                         GTK_STOCK_CANCEL,
@@ -4010,12 +4401,12 @@ void Browser_Open_Run_Program_Tree_Window (void)
                                                         GTK_STOCK_EXECUTE,
                                                         GTK_RESPONSE_OK, NULL);
 
-    gtk_dialog_set_default_response (GTK_DIALOG (RunProgramTreeWindow),
+    gtk_dialog_set_default_response (GTK_DIALOG (priv->open_directory_with_dialog),
                                      GTK_RESPONSE_OK);
-    g_signal_connect (RunProgramTreeWindow, "response",
-                      G_CALLBACK (et_run_program_tree_on_response), NULL);
-    VBox = gtk_dialog_get_content_area (GTK_DIALOG (RunProgramTreeWindow));
-    gtk_container_set_border_width (GTK_CONTAINER (RunProgramTreeWindow),
+    g_signal_connect (priv->open_directory_with_dialog, "response",
+                      G_CALLBACK (et_run_program_tree_on_response), self);
+    VBox = gtk_dialog_get_content_area (GTK_DIALOG (priv->open_directory_with_dialog));
+    gtk_container_set_border_width (GTK_CONTAINER (priv->open_directory_with_dialog),
                                     BOX_SPACING);
 
     Label = gtk_label_new(_("Program to run:"));
@@ -4026,62 +4417,72 @@ void Browser_Open_Run_Program_Tree_Window (void)
     gtk_box_pack_start(GTK_BOX(VBox),HBox,FALSE,FALSE,2);
 
     /* The combobox to enter the program to run */
-    RunProgramComboBox = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(RunProgramModel));
-    gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(RunProgramComboBox), MISC_COMBO_TEXT);
-    gtk_box_pack_start(GTK_BOX(HBox),RunProgramComboBox,TRUE,TRUE,0);
-    gtk_widget_set_size_request(GTK_WIDGET(RunProgramComboBox),250,-1);
-    
gtk_widget_set_tooltip_text(GTK_WIDGET(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(RunProgramComboBox)))),_("Enter 
the program to run. "
+    priv->open_directory_with_combobox = 
gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(priv->run_program_model));
+    gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(priv->open_directory_with_combobox), MISC_COMBO_TEXT);
+    gtk_box_pack_start(GTK_BOX(HBox),priv->open_directory_with_combobox,TRUE,TRUE,0);
+    gtk_widget_set_size_request(GTK_WIDGET(priv->open_directory_with_combobox),250,-1);
+    
gtk_widget_set_tooltip_text(GTK_WIDGET(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(priv->open_directory_with_combobox)))),_("Enter
 the program to run. "
         "It will receive the current directory as parameter."));
 
     /* History list */
-    gtk_list_store_clear(RunProgramModel);
-    Load_Run_Program_With_Directory_List(RunProgramModel, MISC_COMBO_TEXT);
-    g_signal_connect_swapped(G_OBJECT(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(RunProgramComboBox)))),"activate",
-        G_CALLBACK(Run_Program_With_Directory),G_OBJECT(RunProgramComboBox));
+    gtk_list_store_clear(priv->run_program_model);
+    Load_Run_Program_With_Directory_List(priv->run_program_model, MISC_COMBO_TEXT);
+    g_signal_connect_swapped (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (priv->open_directory_with_combobox))),
+                              "activate",
+                              G_CALLBACK (Run_Program_With_Directory),
+                              self);
 
     /* The button to Browse */
     Button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
     gtk_box_pack_start(GTK_BOX(HBox),Button,FALSE,FALSE,0);
     g_signal_connect_swapped(G_OBJECT(Button),"clicked",
-                             
G_CALLBACK(File_Selection_Window_For_File),G_OBJECT(gtk_bin_get_child(GTK_BIN(RunProgramComboBox))));
+                             
G_CALLBACK(File_Selection_Window_For_File),G_OBJECT(gtk_bin_get_child(GTK_BIN(priv->open_directory_with_combobox))));
 
     /* We attach useful data to the combobox (into Run_Program_With_Directory) */
-    g_object_set_data(G_OBJECT(RunProgramComboBox), "Current_Directory", current_directory);
+    g_object_set_data(G_OBJECT(priv->open_directory_with_combobox), "Current_Directory", current_directory);
 
     /* Button to execute */
-    Button = gtk_dialog_get_widget_for_response (GTK_DIALOG (RunProgramTreeWindow),
+    Button = gtk_dialog_get_widget_for_response (GTK_DIALOG (priv->open_directory_with_dialog),
                                                  GTK_RESPONSE_OK);
-    g_signal_connect_swapped(G_OBJECT(Button),"clicked", 
G_CALLBACK(Run_Program_With_Directory),G_OBJECT(RunProgramComboBox));
-    g_signal_connect_swapped (gtk_bin_get_child (GTK_BIN (RunProgramComboBox)),
+    g_signal_connect_swapped (Button, "clicked",
+                              G_CALLBACK (Run_Program_With_Directory),
+                              self);
+    g_signal_connect_swapped (gtk_bin_get_child (GTK_BIN (priv->open_directory_with_combobox)),
                               "changed",
                               G_CALLBACK (empty_entry_disable_widget),
                               G_OBJECT (Button));
-    
g_signal_emit_by_name(G_OBJECT(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(RunProgramComboBox)))),"changed",NULL);
+    
g_signal_emit_by_name(G_OBJECT(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(priv->open_directory_with_combobox)))),"changed",NULL);
 
-    gtk_widget_show_all(RunProgramTreeWindow);
+    gtk_widget_show_all(priv->open_directory_with_dialog);
 }
 
 static void
-Destroy_Run_Program_Tree_Window (void)
+Destroy_Run_Program_Tree_Window (EtBrowser *self)
 {
-    if (RunProgramTreeWindow)
+    EtBrowserPrivate *priv;
+
+    priv = et_browser_get_instance_private (self);
+
+    if (priv->open_directory_with_dialog)
     {
-        gtk_widget_destroy(RunProgramTreeWindow);
-        RunProgramTreeWindow = NULL;
+        gtk_widget_hide (priv->open_directory_with_dialog);
     }
 }
 
-void Run_Program_With_Directory (GtkWidget *combobox)
+void
+Run_Program_With_Directory (EtBrowser *self)
 {
+    EtBrowserPrivate *priv;
     gchar *program_name;
     gchar *current_directory;
     GList *args_list = NULL;
     gboolean program_ran;
 
-    g_return_if_fail (GTK_IS_COMBO_BOX (combobox));
+    priv = et_browser_get_instance_private (self);
 
-    program_name      = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(combobox)))));
-    current_directory = g_object_get_data(G_OBJECT(combobox), "Current_Directory");
+    program_name = g_strdup (gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN 
(priv->open_directory_with_combobox)))));
+    current_directory = g_object_get_data (G_OBJECT (priv->open_directory_with_combobox),
+                                           "Current_Directory");
 #ifdef G_OS_WIN32
     /* On win32 : 'winamp.exe "c:\path\to\dir"' succeed, while 'winamp.exe "c:\path\to\dir\"' fails */
     ET_Win32_Path_Remove_Trailing_Backslash(current_directory);
@@ -4096,12 +4497,71 @@ void Run_Program_With_Directory (GtkWidget *combobox)
     if (program_ran)
     {
         // Append newest choice to the drop down list
-        Add_String_To_Combo_List(RunProgramModel, program_name);
+        Add_String_To_Combo_List(priv->run_program_model, program_name);
+
+        // Save list attached to the combobox
+        Save_Run_Program_With_Directory_List(priv->run_program_model, MISC_COMBO_TEXT);
+
+        Destroy_Run_Program_Tree_Window (self);
+    }
+    g_free(program_name);
+}
+
+static void
+Run_Program_With_Selected_Files (EtBrowser *self)
+{
+    EtBrowserPrivate *priv;
+    gchar   *program_name;
+    ET_File *ETFile;
+    GList   *selected_paths;
+    GList *l;
+    GList   *args_list = NULL;
+    GtkTreeIter iter;
+    gboolean program_ran;
+
+    priv = et_browser_get_instance_private (self);
+
+    if (!GTK_IS_COMBO_BOX (priv->open_files_with_combobox) || !ETCore->ETFileDisplayedList)
+        return;
+
+    // Programe name to run
+    program_name = g_strdup (gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN 
(priv->open_files_with_combobox)))));
+
+    // List of files to pass as parameters
+    selected_paths = 
gtk_tree_selection_get_selected_rows(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList)), NULL);
+
+    for (l = selected_paths; l != NULL; l = g_list_next (l))
+    {
+        if (gtk_tree_model_get_iter (GTK_TREE_MODEL (fileListModel), &iter,
+                                     (GtkTreePath *)l->data))
+        {
+            gtk_tree_model_get(GTK_TREE_MODEL(fileListModel), &iter,
+                               LIST_FILE_POINTER, &ETFile,
+                               -1);
+
+            args_list = g_list_prepend (args_list,
+                                        ((File_Name *)ETFile->FileNameCur->data)->value);
+            //args_list = g_list_append(args_list,((File_Name *)ETFile->FileNameCur->data)->value_utf8);
+        }
+    }
+
+    args_list = g_list_reverse (args_list);
+    program_ran = et_run_program (program_name, args_list);
+
+    g_list_free_full (selected_paths, (GDestroyNotify)gtk_tree_path_free);
+    g_list_free(args_list);
+
+    if (program_ran)
+    {
+        // Append newest choice to the drop down list
+        //gtk_list_store_prepend(GTK_LIST_STORE(priv->run_program_model), &iter);
+        //gtk_list_store_set(priv->run_program_model, &iter, MISC_COMBO_TEXT, program_name, -1);
+        Add_String_To_Combo_List(GTK_LIST_STORE(priv->run_program_model), program_name);
 
         // Save list attached to the combobox
-        Save_Run_Program_With_Directory_List(RunProgramModel, MISC_COMBO_TEXT);
+        Save_Run_Program_With_File_List(priv->run_program_model, MISC_COMBO_TEXT);
 
-        Destroy_Run_Program_Tree_Window();
+        Destroy_Run_Program_List_Window (self);
     }
     g_free(program_name);
 }
@@ -4110,21 +4570,26 @@ void Run_Program_With_Directory (GtkWidget *combobox)
  * Window where is typed the name of the program to run, which
  * receives the current file as parameter.
  */
-void Browser_Open_Run_Program_List_Window (void)
+void
+et_browser_show_open_files_with_dialog (EtBrowser *self)
 {
+    EtBrowserPrivate *priv;
     GtkWidget *VBox;
     GtkWidget *HBox;
     GtkWidget *Label;
-    GtkWidget *RunProgramComboBox;
     GtkWidget *Button;
 
-    if (RunProgramListWindow != NULL)
+    g_return_if_fail (ET_BROWSER (self));
+
+    priv = et_browser_get_instance_private (self);
+
+    if (priv->open_files_with_dialog != NULL)
     {
-        gtk_window_present(GTK_WINDOW(RunProgramListWindow));
+        gtk_window_present(GTK_WINDOW(priv->open_files_with_dialog));
         return;
     }
 
-    RunProgramListWindow = gtk_dialog_new_with_buttons (_("Open Files With"),
+    priv->open_files_with_dialog = gtk_dialog_new_with_buttons (_("Open Files With"),
                                                         GTK_WINDOW (MainWindow),
                                                         GTK_DIALOG_DESTROY_WITH_PARENT,
                                                         GTK_STOCK_CANCEL,
@@ -4133,15 +4598,15 @@ void Browser_Open_Run_Program_List_Window (void)
                                                         GTK_RESPONSE_OK,
                                                         NULL);
 
-    gtk_dialog_set_default_response (GTK_DIALOG (RunProgramListWindow),
+    gtk_dialog_set_default_response (GTK_DIALOG (priv->open_files_with_dialog),
                                      GTK_RESPONSE_OK);
-    g_signal_connect ((RunProgramListWindow), "response",
-                      G_CALLBACK (et_run_program_list_on_response), NULL);
+    g_signal_connect ((priv->open_files_with_dialog), "response",
+                      G_CALLBACK (et_run_program_list_on_response), self);
 
-    gtk_container_set_border_width (GTK_CONTAINER (RunProgramListWindow),
+    gtk_container_set_border_width (GTK_CONTAINER (priv->open_files_with_dialog),
                                     BOX_SPACING);
 
-    VBox = gtk_dialog_get_content_area (GTK_DIALOG (RunProgramListWindow));
+    VBox = gtk_dialog_get_content_area (GTK_DIALOG (priv->open_files_with_dialog));
     gtk_container_set_border_width (GTK_CONTAINER(VBox), BOX_SPACING);
 
     Label = gtk_label_new(_("Program to run:"));
@@ -4152,102 +4617,57 @@ void Browser_Open_Run_Program_List_Window (void)
     gtk_box_pack_start(GTK_BOX(VBox),HBox,FALSE,FALSE,0);
 
     /* The combobox to enter the program to run */
-    RunProgramComboBox = gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(RunProgramModel));
-    gtk_combo_box_set_entry_text_column(GTK_COMBO_BOX(RunProgramComboBox),MISC_COMBO_TEXT);
-    gtk_box_pack_start(GTK_BOX(HBox),RunProgramComboBox,TRUE,TRUE,0);
-    gtk_widget_set_size_request(GTK_WIDGET(RunProgramComboBox),250,-1);
-    
gtk_widget_set_tooltip_text(GTK_WIDGET(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(RunProgramComboBox)))),_("Enter 
the program to run. "
-        "It will receive the current file as parameter."));
+    priv->open_files_with_combobox = 
gtk_combo_box_new_with_model_and_entry(GTK_TREE_MODEL(priv->run_program_model));
+    gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX (priv->open_files_with_combobox),
+                                         MISC_COMBO_TEXT);
+    gtk_box_pack_start (GTK_BOX (HBox), priv->open_files_with_combobox, TRUE,
+                        TRUE, 0);
+    gtk_widget_set_size_request (GTK_WIDGET (priv->open_files_with_combobox),
+                                 250, -1);
+    gtk_widget_set_tooltip_text (GTK_WIDGET (gtk_bin_get_child (GTK_BIN (priv->open_files_with_combobox))),
+                                 _("Enter the program to run. It will receive the current file as 
parameter."));
 
     /* History list */
-    gtk_list_store_clear(RunProgramModel);
-    Load_Run_Program_With_File_List(RunProgramModel, MISC_COMBO_TEXT);
-    g_signal_connect_swapped(G_OBJECT(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(RunProgramComboBox)))),"activate",
-        G_CALLBACK(Run_Program_With_Selected_Files),G_OBJECT(RunProgramComboBox));
+    gtk_list_store_clear(priv->run_program_model);
+    Load_Run_Program_With_File_List(priv->run_program_model, MISC_COMBO_TEXT);
+    g_signal_connect_swapped (gtk_bin_get_child (GTK_BIN (priv->open_files_with_combobox)),
+                              "activate",
+                              G_CALLBACK (Run_Program_With_Selected_Files),
+                             self);
 
     /* The button to Browse */
     Button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
     gtk_box_pack_start(GTK_BOX(HBox),Button,FALSE,FALSE,0);
     g_signal_connect_swapped(G_OBJECT(Button),"clicked",
-                             
G_CALLBACK(File_Selection_Window_For_File),G_OBJECT(gtk_bin_get_child(GTK_BIN(RunProgramComboBox))));
+                             
G_CALLBACK(File_Selection_Window_For_File),G_OBJECT(gtk_bin_get_child(GTK_BIN(priv->open_files_with_combobox))));
 
     /* Button to execute */
-    Button = gtk_dialog_get_widget_for_response (GTK_DIALOG (RunProgramListWindow),
+    Button = gtk_dialog_get_widget_for_response (GTK_DIALOG (priv->open_files_with_dialog),
                                                  GTK_RESPONSE_OK);
-    g_signal_connect_swapped(G_OBJECT(Button),"clicked", 
G_CALLBACK(Run_Program_With_Selected_Files),G_OBJECT(RunProgramComboBox));
-    g_signal_connect_swapped (gtk_bin_get_child (GTK_BIN (RunProgramComboBox)),
+    g_signal_connect_swapped (Button, "clicked",
+                              G_CALLBACK (Run_Program_With_Selected_Files),
+                             self);
+    g_signal_connect_swapped (gtk_bin_get_child (GTK_BIN (priv->open_files_with_combobox)),
                               "changed",
                               G_CALLBACK (empty_entry_disable_widget),
                               G_OBJECT (Button));
-    
g_signal_emit_by_name(G_OBJECT(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(RunProgramComboBox)))),"changed",NULL);
+    g_signal_emit_by_name (gtk_bin_get_child (GTK_BIN (priv->open_files_with_combobox)),
+                           "changed", NULL);
 
-    gtk_widget_show_all(RunProgramListWindow);
-}
-
-static void
-Destroy_Run_Program_List_Window (void)
-{
-    if (RunProgramListWindow)
-    {
-        gtk_widget_destroy(RunProgramListWindow);
-        RunProgramListWindow = NULL;
-    }
+    gtk_widget_show_all(priv->open_files_with_dialog);
 }
 
 static void
-Run_Program_With_Selected_Files (GtkWidget *combobox)
+Destroy_Run_Program_List_Window (EtBrowser *self)
 {
-    gchar   *program_name;
-    ET_File *ETFile;
-    GList   *selected_paths;
-    GList *l;
-    GList   *args_list = NULL;
-    GtkTreeIter iter;
-    gboolean program_ran;
-
-    if (!GTK_IS_COMBO_BOX(combobox) || !ETCore->ETFileDisplayedList)
-        return;
-
-    // Programe name to run
-    program_name = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(combobox)))));
+    EtBrowserPrivate *priv;
 
-    // List of files to pass as parameters
-    selected_paths = 
gtk_tree_selection_get_selected_rows(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList)), NULL);
+    priv = et_browser_get_instance_private (self);
 
-    for (l = selected_paths; l != NULL; l = g_list_next (l))
+    if (priv->open_files_with_dialog)
     {
-        if (gtk_tree_model_get_iter (GTK_TREE_MODEL (fileListModel), &iter,
-                                     (GtkTreePath *)l->data))
-        {
-            gtk_tree_model_get(GTK_TREE_MODEL(fileListModel), &iter,
-                               LIST_FILE_POINTER, &ETFile,
-                               -1);
-
-            args_list = g_list_prepend (args_list,
-                                        ((File_Name *)ETFile->FileNameCur->data)->value);
-            //args_list = g_list_append(args_list,((File_Name *)ETFile->FileNameCur->data)->value_utf8);
-        }
+        gtk_widget_hide (priv->open_files_with_dialog);
     }
-
-    args_list = g_list_reverse (args_list);
-    program_ran = et_run_program (program_name, args_list);
-
-    g_list_free_full (selected_paths, (GDestroyNotify)gtk_tree_path_free);
-    g_list_free(args_list);
-
-    if (program_ran)
-    {
-        // Append newest choice to the drop down list
-        //gtk_list_store_prepend(GTK_LIST_STORE(RunProgramModel), &iter);
-        //gtk_list_store_set(RunProgramModel, &iter, MISC_COMBO_TEXT, program_name, -1);
-        Add_String_To_Combo_List(GTK_LIST_STORE(RunProgramModel), program_name);
-
-        // Save list attached to the combobox
-        Save_Run_Program_With_File_List(RunProgramModel, MISC_COMBO_TEXT);
-
-        Destroy_Run_Program_List_Window();
-    }
-    g_free(program_name);
 }
 
 /*
@@ -4281,14 +4701,18 @@ static void
 et_rename_directory_on_response (GtkDialog *dialog, gint response_id,
                                  gpointer user_data)
 {
+    EtBrowser *self;
+
+    self = ET_BROWSER (user_data);
+
     switch (response_id)
     {
         case GTK_RESPONSE_APPLY:
-            Rename_Directory ();
+            Rename_Directory (self);
             break;
         case GTK_RESPONSE_CANCEL:
         case GTK_RESPONSE_DELETE_EVENT:
-            Destroy_Rename_Directory_Window ();
+            Destroy_Rename_Directory_Window (self);
             break;
         default:
             g_assert_not_reached ();
@@ -4307,6 +4731,10 @@ static void
 et_run_program_tree_on_response (GtkDialog *dialog, gint response_id,
                                  gpointer user_data)
 {
+    EtBrowser *self;
+
+    self = ET_BROWSER (user_data);
+
     switch (response_id)
     {
         case GTK_RESPONSE_OK:
@@ -4314,7 +4742,7 @@ et_run_program_tree_on_response (GtkDialog *dialog, gint response_id,
             break;
         case GTK_RESPONSE_CANCEL:
         case GTK_RESPONSE_DELETE_EVENT:
-            Destroy_Run_Program_Tree_Window ();
+            Destroy_Run_Program_Tree_Window (self);
             break;
         default:
             g_assert_not_reached ();
@@ -4332,6 +4760,10 @@ static void
 et_run_program_list_on_response (GtkDialog *dialog, gint response_id,
                                  gpointer user_data)
 {
+    EtBrowser *self;
+
+    self = ET_BROWSER (user_data);
+
     switch (response_id)
     {
         case GTK_RESPONSE_OK:
@@ -4339,7 +4771,7 @@ et_run_program_list_on_response (GtkDialog *dialog, gint response_id,
             break;
         case GTK_RESPONSE_CANCEL:
         case GTK_RESPONSE_DELETE_EVENT:
-            Destroy_Run_Program_List_Window ();
+            Destroy_Run_Program_List_Window (self);
             break;
         default:
             g_assert_not_reached ();
@@ -4374,3 +4806,57 @@ get_column_for_column_id (gint column_id)
 {
     return gtk_tree_view_get_column (GTK_TREE_VIEW (BrowserList), column_id);
 }
+
+static void
+et_browser_finalize (GObject *object)
+{
+    EtBrowserPrivate *priv;
+
+    priv = et_browser_get_instance_private (ET_BROWSER (object));
+
+    /* Save combobox history list before exit. */
+    Save_Path_Entry_List (priv->entry_model, MISC_COMBO_TEXT);
+
+    g_clear_pointer (&priv->current_path, g_free);
+
+    G_OBJECT_CLASS (et_browser_parent_class)->finalize (object);
+}
+
+static void
+et_browser_init (EtBrowser *self)
+{
+    EtBrowserPrivate *priv;
+
+    priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, ET_TYPE_BROWSER,
+                                                     EtBrowserPrivate);
+
+    priv->open_directory_with_dialog = NULL;
+    priv->open_directory_with_combobox = NULL;
+    priv->open_files_with_dialog = NULL;
+    priv->open_files_with_combobox = NULL;
+    priv->current_path = NULL;
+
+    create_browser (self);
+}
+
+static void
+et_browser_class_init (EtBrowserClass *klass)
+{
+    G_OBJECT_CLASS (klass)->finalize = et_browser_finalize;
+
+    g_type_class_add_private (klass, sizeof (EtBrowserPrivate));
+}
+
+/*
+ * et_browser_new:
+ *
+ * Create a new EtBrowser instance.
+ *
+ * Returns: a new #EtBrowser
+ */
+EtBrowser *
+et_browser_new (void)
+{
+    return g_object_new (ET_TYPE_BROWSER, "orientation",
+                         GTK_ORIENTATION_VERTICAL, NULL);
+}
diff --git a/src/browser.h b/src/browser.h
index 5965379..58a5101 100644
--- a/src/browser.h
+++ b/src/browser.h
@@ -1,4 +1,3 @@
-/* browser.h - 2000/04/28 */
 /*
  *  EasyTAG - Tag editor for MP3 and Ogg Vorbis files
  *  Copyright (C) 2000-2003  Jerome Couderc <easytag gmail com>
@@ -19,37 +18,40 @@
  */
 
 
-#ifndef __BROWSER_H__
-#define __BROWSER_H__
+#ifndef ET_BROWSER_H_
+#define ET_BROWSER_H_
 
 #include "et_core.h"
 
+#include <gtk/gtk.h>
 
-/****************
- * Declarations *
- ****************/
+G_BEGIN_DECLS
 
-/*
- * Data attached to each row of the artist list
- */
-#if 0
-typedef struct _ArtistRow ArtistRow;
-struct _ArtistRow
+#define ET_TYPE_BROWSER (et_browser_get_type ())
+#define ET_BROWSER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), ET_TYPE_BROWSER, EtBrowser))
+
+typedef struct _EtBrowser EtBrowser;
+typedef struct _EtBrowserClass EtBrowserClass;
+typedef struct _EtBrowserPrivate EtBrowserPrivate;
+
+struct _EtBrowser
 {
-    GList *AlbumList; // It's a list of AlbumList items...
+    /*< private >*/
+    GtkBox parent_instance;
+    EtBrowserPrivate *priv;
 };
-#endif
 
-/*
- * Data attached to each row of the artist list
- */
-#if 0
-typedef struct _AlbumRow AlbumRow;
-struct _AlbumRow
+struct _EtBrowserClass
 {
-    GList *ETFileList; // It's a list of ETFile items...
+    /*< private >*/
+    GtkBoxClass parent_class;
 };
-#endif
+
+GType et_browser_get_type (void);
+EtBrowser *et_browser_new (void);
+void et_browser_show_open_directory_with_dialog (EtBrowser *self);
+void et_browser_show_open_files_with_dialog (EtBrowser *self);
+void et_browser_show_rename_directory_dialog (EtBrowser *self);
 
 /*
  * To number columns of ComboBox
@@ -61,132 +63,54 @@ enum
 };
 
 
-enum
-{
-    TREE_COLUMN_DIR_NAME,
-    TREE_COLUMN_FULL_PATH,
-    TREE_COLUMN_SCANNED,
-    TREE_COLUMN_HAS_SUBDIR,
-    TREE_COLUMN_ICON,
-    TREE_COLUMN_COUNT
-};
-
-enum
-{
-    LIST_FILE_NAME,
-    /* Tag fields. */
-    LIST_FILE_TITLE,
-    LIST_FILE_ARTIST,
-    LIST_FILE_ALBUM_ARTIST,
-    LIST_FILE_ALBUM,
-    LIST_FILE_YEAR,
-    LIST_FILE_DISCNO,
-    LIST_FILE_TRACK,
-    LIST_FILE_GENRE,
-    LIST_FILE_COMMENT,
-    LIST_FILE_COMPOSER,
-    LIST_FILE_ORIG_ARTIST,
-    LIST_FILE_COPYRIGHT,
-    LIST_FILE_URL,
-    LIST_FILE_ENCODED_BY,
-    /* End of columns with associated UI columns. */
-    LIST_FILE_POINTER,
-    LIST_FILE_KEY,
-    LIST_FILE_OTHERDIR, /* To change color for alternate directories. */
-    LIST_FONT_WEIGHT,
-    LIST_ROW_BACKGROUND,
-    LIST_ROW_FOREGROUND,
-    LIST_COLUMN_COUNT
-};
-
-enum
-{
-    ARTIST_PIXBUF,
-    ARTIST_NAME,
-    ARTIST_NUM_ALBUMS,
-    ARTIST_NUM_FILES,
-    ARTIST_ALBUM_LIST_POINTER,
-    ARTIST_FONT_STYLE,
-    ARTIST_FONT_WEIGHT,
-    ARTIST_ROW_FOREGROUND,
-    ARTIST_COLUMN_COUNT
-};
-
-enum
-{
-    ALBUM_GICON,
-    ALBUM_NAME,
-    ALBUM_NUM_FILES,
-    ALBUM_ETFILE_LIST_POINTER,
-    ALBUM_FONT_STYLE,
-    ALBUM_FONT_WEIGHT,
-    ALBUM_ROW_FOREGROUND,
-    ALBUM_COLUMN_COUNT
-};
-
-
 GtkWidget *BrowserList;
-GtkWidget *BrowserAlbumList;
-GtkWidget *BrowserArtistList;
-GtkWidget *BrowserEntryCombo;
-GtkListStore *BrowserEntryModel;
-GtkWidget *BrowserHPaned;
-GtkWidget *ArtistAlbumVPaned;
-
-GtkWidget *RenameDirectoryWindow;
-GtkWidget *RenameDirectoryMaskCombo;
-GtkWidget *RenameDirectoryPreviewLabel;
 
 
-/**************
- * Prototypes *
- **************/
+void et_browser_select_dir (EtBrowser *self, const gchar *current_path);
+void et_browser_reload (EtBrowser *self);
+void et_browser_collapse (EtBrowser *self);
+void et_browser_set_sensitive (EtBrowser *self, gboolean sensitive);
 
-GtkWidget   *Create_Browser_Items    (GtkWidget *parent);
-gboolean     Browser_Tree_Select_Dir (const gchar *current_path);
-void         Browser_Tree_Rebuild    (gchar *path_to_load);
-void         Browser_Tree_Collapse   (void);
-
-void         Browser_List_Load_File_List            (GList *etfilelist, ET_File *etfile_to_select);
-void         Browser_List_Refresh_Whole_List        (void);
+void et_browser_load_file_list (EtBrowser *self, GList *etfilelist, ET_File *etfile_to_select);
+void et_browser_refresh_list (EtBrowser *self);
 void         Browser_List_Refresh_File_In_List      (ET_File *ETFile);
-void         Browser_List_Clear                     (void);
-void         Browser_List_Select_File_By_Etfile     (ET_File *ETFile, gboolean select_it);
-GtkTreePath *Browser_List_Select_File_By_Etfile2    (ET_File *searchETFile, gboolean select_it, GtkTreePath 
*startPath);
+void et_browser_clear (EtBrowser *self);
+void et_browser_select_file_by_et_file (EtBrowser *self, ET_File *ETFile, gboolean select_it);
+GtkTreePath * et_browser_select_file_by_et_file2 (EtBrowser *self, ET_File *searchETFile, gboolean 
select_it, GtkTreePath *startPath);
 ET_File     *Browser_List_Select_File_By_Iter_String(const gchar* stringiter, gboolean select_it);
-ET_File     *Browser_List_Select_File_By_DLM        (const gchar* string, gboolean select_it);
+ET_File *et_browser_select_file_by_dlm (EtBrowser *self, const gchar* string, gboolean select_it);
 void         Browser_List_Refresh_Sort            (void);
-void         Browser_List_Select_All_Files        (void);
-void         Browser_List_Unselect_All_Files      (void);
-void         Browser_List_Invert_File_Selection   (void);
-void         Browser_List_Remove_File             (ET_File *ETFile);
+void et_browser_select_all (EtBrowser *self);
+void et_browser_unselect_all (EtBrowser *self);
+void et_browser_invert_selection (EtBrowser *self);
+void et_browser_remove_file (EtBrowser *self, ET_File *ETFile);
 ET_File     *Browser_List_Get_ETFile_From_Path    (GtkTreePath *path);
 ET_File     *Browser_List_Get_ETFile_From_Iter    (GtkTreeIter *iter);
 
 void         Browser_Entry_Set_Text      (gchar *text);
 void         Browser_Label_Set_Text      (gchar *text);
 
-void         Browser_Display_Tree_Or_Artist_Album_List (void);
-
-void         Browser_Area_Set_Sensitive  (gboolean activate);
+void et_browser_toggle_display_mode (EtBrowser *self);
 
-void         Browser_Load_Home_Directory            (void);
-void            Browser_Load_Desktop_Directory                 (void);
-void            Browser_Load_Documents_Directory               (void);
-void            Browser_Load_Downloads_Directory               (void);
-void            Browser_Load_Music_Directory                   (void);
-void et_browser_on_action_parent_directory (void);
+void et_browser_go_home (EtBrowser *self);
+void et_browser_go_desktop (EtBrowser *self);
+void et_browser_go_documents (EtBrowser *self);
+void et_browser_go_download (EtBrowser *self);
+void et_browser_go_music (EtBrowser *self);
+void et_browser_go_parent (EtBrowser *self);
 
-void         Browser_Load_Default_Directory         (void);
-void         Browser_Reload_Directory               (void);
-void         Set_Current_Path_As_Default            (void);
-gchar       *Browser_Get_Current_Path               (void);
+void et_browser_run_player_for_album_list (EtBrowser *self);
+void et_browser_run_player_for_artist_list (EtBrowser *self);
+void et_browser_run_player_for_selection (EtBrowser *self);
 
-void         Browser_Open_Rename_Directory_Window (void);
-void         Browser_Open_Run_Program_Tree_Window (void);
-void         Browser_Open_Run_Program_List_Window (void);
+void et_browser_load_default_dir (EtBrowser *self);
+void et_browser_reload_directory (EtBrowser *self);
+void et_browser_set_current_path_default (EtBrowser *self);
+const gchar * et_browser_get_current_path (EtBrowser *self);
 
 GtkTreeViewColumn *get_column_for_column_id (gint column_id);
 GtkSortType get_sort_order_for_column_id (gint column_id);
 
-#endif /* __BROWSER_H__ */
+G_END_DECLS
+
+#endif /* ET_BROWSER_H_ */
diff --git a/src/cddb_dialog.c b/src/cddb_dialog.c
index 2044fac..bd6bd54 100644
--- a/src/cddb_dialog.c
+++ b/src/cddb_dialog.c
@@ -612,8 +612,8 @@ Cddb_Track_List_Row_Selected (EtCDDBDialog *self, GtkTreeSelection *selection)
         return;
     }
 
-    // Unselect files in the main list before re-selecting them...
-    Browser_List_Unselect_All_Files();
+    /* Unselect files in the main list before re-selecting them... */
+    et_application_window_browser_unselect_all (ET_APPLICATION_WINDOW (MainWindow));
 
     for (l = selectedRows; l != NULL; l = g_list_next (l))
     {
@@ -629,7 +629,9 @@ Cddb_Track_List_Row_Selected (EtCDDBDialog *self, GtkTreeSelection *selection)
                 gtk_tree_model_get(GTK_TREE_MODEL(priv->track_list_model), &currentFile,
                                    CDDB_TRACK_LIST_NAME, &text_path,
                                    CDDB_TRACK_LIST_ETFILE, &etfile, -1);
-                *etfile = Browser_List_Select_File_By_DLM(text_path, TRUE);
+                *etfile = et_application_window_browser_select_file_by_dlm (ET_APPLICATION_WINDOW 
(MainWindow),
+                                                                            text_path,
+                                                                            TRUE);
             } else
             {
                 text_path = gtk_tree_model_get_string_from_iter(GTK_TREE_MODEL(priv->track_list_model), 
&currentFile);
@@ -2717,7 +2719,7 @@ Cddb_Set_Track_Infos_To_File_List (EtCDDBDialog *self)
 
     g_list_free_full (file_iterlist, (GDestroyNotify)g_free);
 
-    Browser_List_Refresh_Whole_List();
+    et_application_window_browser_refresh_list (ET_APPLICATION_WINDOW (MainWindow));
     ET_Display_File_Data_To_UI(ETCore->ETFileDisplayed);
 
     return TRUE;
diff --git a/src/easytag.c b/src/easytag.c
index dc9b578..eb50c88 100644
--- a/src/easytag.c
+++ b/src/easytag.c
@@ -73,10 +73,6 @@ static gint SF_ButtonPressed_Write_Tag;
 static gboolean SF_HideMsgbox_Rename_File;
 /* To remember which button was pressed when renaming file */
 static gint SF_ButtonPressed_Rename_File;
-/* Used to force to hide the msgbox when deleting file */
-static gboolean SF_HideMsgbox_Delete_File;
-/* To remember which button was pressed when deleting file */
-static gint SF_ButtonPressed_Delete_File;
 
 #ifdef ENABLE_FLAC
     #include <FLAC/metadata.h>
@@ -89,12 +85,9 @@ static gint SF_ButtonPressed_Delete_File;
 static gboolean Write_File_Tag (ET_File *ETFile, gboolean hide_msgbox);
 static gint Save_File (ET_File *ETFile, gboolean multiple_files,
                        gboolean force_saving_files);
-static gint delete_file (ET_File *ETFile, gboolean multiple_files,
-                         GError **error);
 static gint Save_Selected_Files_With_Answer (gboolean force_saving_files);
 static gint Save_List_Of_Files (GList *etfilelist,
                                 gboolean force_saving_files);
-static gint Delete_Selected_Files_With_Answer (void);
 
 static void Init_Load_Default_Dir (void);
 static void EasyTAG_Exit (void);
@@ -134,7 +127,6 @@ common_init (GApplication *application)
     Main_Stop_Button_Pressed = FALSE;
     Init_Custom_Icons();
     Init_Mouse_Cursor();
-    BrowserEntryModel    = NULL;
     TrackEntryComboModel = NULL;
     GenreComboModel      = NULL;
 
@@ -307,7 +299,7 @@ on_application_open (GApplication *application, GFile **files, gint n_files,
         case G_FILE_TYPE_DIRECTORY:
             if (activated)
             {
-                Browser_Tree_Select_Dir (path);
+                et_application_window_select_dir (windows->data, path);
                 g_free (path);
             }
             else
@@ -332,7 +324,8 @@ on_application_open (GApplication *application, GFile **files, gint n_files,
                     gchar *parent_path;
 
                     parent_path = g_file_get_path (arg);
-                    Browser_Tree_Select_Dir (parent_path);
+                    et_application_window_select_dir (windows->data,
+                                                      parent_path);
 
                     g_free (parent_path);
                 }
@@ -434,18 +427,6 @@ int main (int argc, char *argv[])
 }
 
 /*
- * Action when inverting files selection
- */
-void Action_Invert_Files_Selection (void)
-{
-    /* Save the current displayed data */
-    ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
-
-    Browser_List_Invert_File_Selection();
-    Update_Command_Buttons_Sensivity();
-}
-
-/*
  * Select a file in the "main list" using the ETFile adress of each item.
  */
 void Action_Select_Nth_File_By_Etfile (ET_File *ETFile)
@@ -457,7 +438,8 @@ void Action_Select_Nth_File_By_Etfile (ET_File *ETFile)
     ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
 
     /* Display the item */
-    Browser_List_Select_File_By_Etfile(ETFile,TRUE);
+    et_application_window_browser_select_file_by_et_file (ET_APPLICATION_WINDOW (MainWindow),
+                                                          ETFile, TRUE);
     ET_Displayed_File_List_By_Etfile(ETFile); // Just to update 'ETFileDisplayedList'
     ET_Display_File_Data_To_UI(ETFile);
 
@@ -465,105 +447,6 @@ void Action_Select_Nth_File_By_Etfile (ET_File *ETFile)
     et_scan_dialog_update_previews (ET_SCAN_DIALOG (et_application_window_get_scan_dialog 
(ET_APPLICATION_WINDOW (MainWindow))));
 }
 
-/*
- * Action when Remove button is pressed
- */
-void Action_Remove_Selected_Tags (void)
-{
-    GList *selfilelist = NULL;
-    GList *l;
-    ET_File *etfile;
-    File_Tag *FileTag;
-    gint progress_bar_index;
-    gint selectcount;
-    double fraction;
-    GtkTreeSelection *selection;
-
-    g_return_if_fail (ETCore->ETFileDisplayedList != NULL ||
-                      BrowserList != NULL);
-
-    /* Save the current displayed data */
-    ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
-
-    /* Initialize status bar */
-    gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), 0.0);
-    selectcount = 
gtk_tree_selection_count_selected_rows(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList)));
-    progress_bar_index = 0;
-
-    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList));
-    selfilelist = gtk_tree_selection_get_selected_rows(selection, NULL);
-
-    for (l = selfilelist; l != NULL; l = g_list_next (l))
-    {
-        etfile = Browser_List_Get_ETFile_From_Path (l->data);
-        FileTag = ET_File_Tag_Item_New();
-        ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
-
-        fraction = (++progress_bar_index) / (double) selectcount;
-        gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), fraction);
-        /* Needed to refresh status bar */
-        while (gtk_events_pending())
-            gtk_main_iteration();
-    }
-
-    g_list_free_full (selfilelist, (GDestroyNotify)gtk_tree_path_free);
-
-    // Refresh the whole list (faster than file by file) to show changes
-    Browser_List_Refresh_Whole_List();
-
-    /* Display the current file */
-    ET_Display_File_Data_To_UI(ETCore->ETFileDisplayed);
-    Update_Command_Buttons_Sensivity();
-
-    gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), 0.0);
-    Statusbar_Message(_("All tags have been removed"),TRUE);
-}
-
-
-
-/*
- * Action when Undo button is pressed.
- * Action_Undo_Selected_Files: Undo the last changes for the selected files.
- * Action_Undo_From_History_List: Undo the changes of the last modified file of the list.
- */
-gint Action_Undo_Selected_Files (void)
-{
-    GList *selfilelist = NULL;
-    GList *l;
-    gboolean state = FALSE;
-    ET_File *etfile;
-    GtkTreeSelection *selection;
-
-    g_return_val_if_fail (ETCore->ETFileDisplayedList != NULL ||
-                          BrowserList != NULL, FALSE);
-
-    /* Save the current displayed data */
-    ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
-
-    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList));
-    selfilelist = gtk_tree_selection_get_selected_rows(selection, NULL);
-
-    for (l = selfilelist; l != NULL; l = g_list_next (l))
-    {
-        etfile = Browser_List_Get_ETFile_From_Path (l->data);
-        state |= ET_Undo_File_Data(etfile);
-    }
-
-    g_list_free_full (selfilelist, (GDestroyNotify)gtk_tree_path_free);
-
-    // Refresh the whole list (faster than file by file) to show changes
-    Browser_List_Refresh_Whole_List();
-
-    /* Display the current file */
-    ET_Display_File_Data_To_UI(ETCore->ETFileDisplayed);
-    Update_Command_Buttons_Sensivity();
-
-    //ET_Debug_Print_File_List(ETCore->ETFileList,__FILE__,__LINE__,__FUNCTION__);
-
-    return state;
-}
-
-
 void Action_Undo_From_History_List (void)
 {
     ET_File *ETFile;
@@ -577,7 +460,8 @@ void Action_Undo_From_History_List (void)
     if (ETFile)
     {
         ET_Display_File_Data_To_UI(ETFile);
-        Browser_List_Select_File_By_Etfile(ETFile,TRUE);
+        et_application_window_browser_select_file_by_et_file (ET_APPLICATION_WINDOW (MainWindow),
+                                                              ETFile, TRUE);
         Browser_List_Refresh_File_In_List(ETFile);
     }
 
@@ -586,47 +470,6 @@ void Action_Undo_From_History_List (void)
 
 
 
-/*
- * Action when Redo button is pressed.
- * Action_Redo_Selected_Files: Redo the last changes for the selected files.
- * Action_Redo_From_History_List: Redo the changes of the last modified file of the list.
- */
-gint Action_Redo_Selected_File (void)
-{
-    GList *selfilelist = NULL;
-    GList *l;
-    gboolean state = FALSE;
-    ET_File *etfile;
-    GtkTreeSelection *selection;
-
-    g_return_val_if_fail (ETCore->ETFileDisplayedList != NULL ||
-                          BrowserList != NULL, FALSE);
-
-    /* Save the current displayed data */
-    ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
-
-    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList));
-    selfilelist = gtk_tree_selection_get_selected_rows(selection, NULL);
-
-    for (l = selfilelist; l != NULL; l = g_list_next (l))
-    {
-        etfile = Browser_List_Get_ETFile_From_Path (l->data);
-        state |= ET_Redo_File_Data(etfile);
-    }
-
-    g_list_free_full (selfilelist, (GDestroyNotify)gtk_tree_path_free);
-
-    // Refresh the whole list (faster than file by file) to show changes
-    Browser_List_Refresh_Whole_List();
-
-    /* Display the current file */
-    ET_Display_File_Data_To_UI(ETCore->ETFileDisplayed);
-    Update_Command_Buttons_Sensivity();
-
-    return state;
-}
-
-
 void Action_Redo_From_History_List (void)
 {
     ET_File *ETFile;
@@ -640,7 +483,8 @@ void Action_Redo_From_History_List (void)
     if (ETFile)
     {
         ET_Display_File_Data_To_UI(ETFile);
-        Browser_List_Select_File_By_Etfile(ETFile,TRUE);
+        et_application_window_browser_select_file_by_et_file (ET_APPLICATION_WINDOW (MainWindow),
+                                                              ETFile, TRUE);
         Browser_List_Refresh_File_In_List(ETFile);
     }
 
@@ -648,8 +492,6 @@ void Action_Redo_From_History_List (void)
 }
 
 
-
-
 /*
  * Action when Save button is pressed
  */
@@ -799,7 +641,7 @@ Save_List_Of_Files (GList *etfilelist, gboolean force_saving_files)
 
     /* Set to unsensitive all command buttons (except Quit button) */
     Disable_Command_Buttons();
-    Browser_Area_Set_Sensitive(FALSE);
+    et_application_window_browser_set_sensitive (window, FALSE);
     et_application_window_tag_area_set_sensitive (window, FALSE);
     et_application_window_file_area_set_sensitive (window, FALSE);
 
@@ -864,9 +706,10 @@ Save_List_Of_Files (GList *etfilelist, gboolean force_saving_files)
             /* ET_Display_File_Data_To_UI ((ET_File *)l->data);
              * Use of 'currentPath' to try to increase speed. Indeed, in many
              * cases, the next file to select, is the next in the list. */
-            currentPath = Browser_List_Select_File_By_Etfile2 ((ET_File *)l->data,
-                                                               FALSE,
-                                                               currentPath);
+            et_application_window_browser_select_file_by_et_file2 (ET_APPLICATION_WINDOW (MainWindow),
+                                                                   (ET_File *)l->data,
+                                                                   FALSE,
+                                                                   currentPath);
 
             fraction = (++progress_bar_index) / (double) nb_files_to_save;
             gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), fraction);
@@ -890,7 +733,7 @@ Save_List_Of_Files (GList *etfilelist, gboolean force_saving_files)
                 Statusbar_Message (_("Saving files was stopped"), TRUE);
                 /* To update state of command buttons */
                 Update_Command_Buttons_Sensivity();
-                Browser_Area_Set_Sensitive(TRUE);
+                et_application_window_browser_set_sensitive (window, TRUE);
                 et_application_window_tag_area_set_sensitive (window, TRUE);
                 et_application_window_file_area_set_sensitive (window, TRUE);
 
@@ -917,17 +760,19 @@ Save_List_Of_Files (GList *etfilelist, gboolean force_saving_files)
 
     /* Return to the saved position in the list */
     ET_Display_File_Data_To_UI(etfile_save_position);
-    Browser_List_Select_File_By_Etfile(etfile_save_position,TRUE);
+    et_application_window_browser_select_file_by_et_file (ET_APPLICATION_WINDOW (MainWindow),
+                                                          etfile_save_position,
+                                                          TRUE);
 
     /* Browser is on mode : Artist + Album list */
     toggle_radio = gtk_ui_manager_get_widget (UIManager,
                                               "/ToolBar/ArtistViewMode");
     if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (toggle_radio)))
-        Browser_Display_Tree_Or_Artist_Album_List();
+        et_application_window_browser_toggle_display_mode (window);
 
     /* To update state of command buttons */
     Update_Command_Buttons_Sensivity();
-    Browser_Area_Set_Sensitive(TRUE);
+    et_application_window_browser_set_sensitive (window, TRUE);
     et_application_window_tag_area_set_sensitive (window, TRUE);
     et_application_window_file_area_set_sensitive (window, TRUE);
 
@@ -938,162 +783,7 @@ Save_List_Of_Files (GList *etfilelist, gboolean force_saving_files)
     gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), 0);
     Statusbar_Message(msg,TRUE);
     g_free(msg);
-    Browser_List_Refresh_Whole_List();
-    return TRUE;
-}
-
-
-
-/*
- * Delete a file on the hard disk
- */
-void Action_Delete_Selected_Files (void)
-{
-    Delete_Selected_Files_With_Answer();
-}
-
-
-static gint
-Delete_Selected_Files_With_Answer (void)
-{
-    EtApplicationWindow *window;
-    GList *selfilelist;
-    GList *rowreflist = NULL;
-    GList *l;
-    gint   progress_bar_index;
-    gint   saving_answer;
-    gint   nb_files_to_delete;
-    gint   nb_files_deleted = 0;
-    gchar *msg;
-    gchar progress_bar_text[30];
-    double fraction;
-    GtkTreeModel *treemodel;
-    GtkTreeRowReference *rowref;
-    GtkTreeSelection *selection;
-    GError *error = NULL;
-
-    g_return_val_if_fail (ETCore->ETFileDisplayedList != NULL
-                          && BrowserList != NULL, FALSE);
-
-    window = ET_APPLICATION_WINDOW (MainWindow);
-
-    /* Save the current displayed data */
-    ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
-
-    /* Number of files to save */
-    nb_files_to_delete = 
gtk_tree_selection_count_selected_rows(gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList)));
-
-    /* Initialize status bar */
-    gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar),0);
-    progress_bar_index = 0;
-    g_snprintf(progress_bar_text, 30, "%d/%d", progress_bar_index, nb_files_to_delete);
-    gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ProgressBar), progress_bar_text);
-
-    /* Set to unsensitive all command buttons (except Quit button) */
-    Disable_Command_Buttons();
-    Browser_Area_Set_Sensitive(FALSE);
-    et_application_window_tag_area_set_sensitive (window, FALSE);
-    et_application_window_file_area_set_sensitive (window, FALSE);
-
-    /* Show msgbox (if needed) to ask confirmation */
-    SF_HideMsgbox_Delete_File = 0;
-
-    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList));
-    selfilelist = gtk_tree_selection_get_selected_rows(selection, &treemodel);
-
-    for (l = selfilelist; l != NULL; l = g_list_next (l))
-    {
-        rowref = gtk_tree_row_reference_new (treemodel, l->data);
-        rowreflist = g_list_prepend (rowreflist, rowref);
-    }
-
-    g_list_free_full (selfilelist, (GDestroyNotify)gtk_tree_path_free);
-    rowreflist = g_list_reverse (rowreflist);
-
-    for (l = rowreflist; l != NULL; l = g_list_next (l))
-    {
-        GtkTreePath *path;
-        ET_File *ETFile;
-
-        path = gtk_tree_row_reference_get_path (l->data);
-        ETFile = Browser_List_Get_ETFile_From_Path(path);
-        gtk_tree_path_free(path);
-
-        ET_Display_File_Data_To_UI(ETFile);
-        Browser_List_Select_File_By_Etfile(ETFile,FALSE);
-        fraction = (++progress_bar_index) / (double) nb_files_to_delete;
-        gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), fraction);
-        g_snprintf(progress_bar_text, 30, "%d/%d", progress_bar_index, nb_files_to_delete);
-        gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ProgressBar), progress_bar_text);
-         /* Needed to refresh status bar */
-        while (gtk_events_pending())
-            gtk_main_iteration();
-
-        saving_answer = delete_file (ETFile,
-                                     nb_files_to_delete > 1 ? TRUE : FALSE,
-                                     &error);
-
-        switch (saving_answer)
-        {
-            case 1:
-                nb_files_deleted += saving_answer;
-                // Remove file in the browser (corresponding line in the clist)
-                Browser_List_Remove_File(ETFile);
-                // Remove file from file list
-                ET_Remove_File_From_File_List(ETFile);
-                break;
-            case 0:
-                /* Distinguish between the file being skipped, and there being
-                 * an error during deletion. */
-                if (error)
-                {
-                    Log_Print (LOG_ERROR, _("Cannot delete file (%s)"),
-                               error->message);
-                    g_clear_error (&error);
-                }
-                break;
-            case -1:
-                // Stop deleting files + reinit progress bar
-                gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar),0.0);
-                // To update state of command buttons
-                Update_Command_Buttons_Sensivity();
-                Browser_Area_Set_Sensitive(TRUE);
-                et_application_window_tag_area_set_sensitive (window, TRUE);
-                et_application_window_file_area_set_sensitive (window, TRUE);
-
-                return -1; // We stop all actions
-        }
-    }
-
-    g_list_free_full (rowreflist, (GDestroyNotify)gtk_tree_row_reference_free);
-
-    if (nb_files_deleted < nb_files_to_delete)
-        msg = g_strdup (_("Files have been partially deleted"));
-    else
-        msg = g_strdup (_("All files have been deleted"));
-
-    // It's important to displayed the new item, as it'll check the changes in 
Browser_Display_Tree_Or_Artist_Album_List
-    if (ETCore->ETFileDisplayed)
-        ET_Display_File_Data_To_UI(ETCore->ETFileDisplayed);
-    /*else if (ET_Displayed_File_List_Current())
-        ET_Display_File_Data_To_UI((ET_File *)ET_Displayed_File_List_Current()->data);*/
-
-    // Load list...
-    Browser_List_Load_File_List(ETCore->ETFileDisplayedList, NULL);
-    // Rebuild the list...
-    Browser_Display_Tree_Or_Artist_Album_List();
-
-    /* To update state of command buttons */
-    Update_Command_Buttons_Sensivity();
-    Browser_Area_Set_Sensitive(TRUE);
-    et_application_window_tag_area_set_sensitive (window, TRUE);
-    et_application_window_file_area_set_sensitive (window, TRUE);
-
-    gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ProgressBar), "");
-    gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), 0);
-    Statusbar_Message(msg,TRUE);
-    g_free(msg);
-
+    et_application_window_browser_refresh_list (ET_APPLICATION_WINDOW (MainWindow));
     return TRUE;
 }
 
@@ -1540,124 +1230,6 @@ Write_File_Tag (ET_File *ETFile, gboolean hide_msgbox)
 }
 
 /*
- * Delete the file ETFile
- */
-static gint
-delete_file (ET_File *ETFile, gboolean multiple_files, GError **error)
-{
-    GtkWidget *msgdialog;
-    GtkWidget *msgdialog_check_button = NULL;
-    gchar *cur_filename;
-    gchar *cur_filename_utf8;
-    gchar *basename_utf8;
-    gint response;
-    gint stop_loop;
-
-    g_return_val_if_fail (ETFile != NULL, FALSE);
-    g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
-
-    /* Filename of the file to delete. */
-    cur_filename      = ((File_Name *)(ETFile->FileNameCur)->data)->value;
-    cur_filename_utf8 = ((File_Name *)(ETFile->FileNameCur)->data)->value_utf8;
-    basename_utf8 = g_path_get_basename (cur_filename_utf8);
-
-    /*
-     * Remove the file
-     */
-    if (CONFIRM_DELETE_FILE && !SF_HideMsgbox_Delete_File)
-    {
-        if (multiple_files)
-        {
-            GtkWidget *message_area;
-            msgdialog = gtk_message_dialog_new(GTK_WINDOW(MainWindow),
-                                               GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-                                               GTK_MESSAGE_QUESTION,
-                                               GTK_BUTTONS_NONE,
-                                               _("Do you really want to delete the file '%s'?"),
-                                               basename_utf8);
-            message_area = gtk_message_dialog_get_message_area(GTK_MESSAGE_DIALOG(msgdialog));
-            msgdialog_check_button = gtk_check_button_new_with_label(_("Repeat action for the remaining 
files"));
-            gtk_container_add(GTK_CONTAINER(message_area),msgdialog_check_button);
-            
gtk_dialog_add_buttons(GTK_DIALOG(msgdialog),GTK_STOCK_NO,GTK_RESPONSE_NO,GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,GTK_STOCK_DELETE,GTK_RESPONSE_YES,NULL);
-            gtk_window_set_title(GTK_WINDOW(msgdialog),_("Delete File"));
-            //GTK_TOGGLE_BUTTON(msgbox_check_button)->active = TRUE; // Checked by default
-        }else
-        {
-            msgdialog = gtk_message_dialog_new(GTK_WINDOW(MainWindow),
-                                               GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-                                               GTK_MESSAGE_QUESTION,
-                                               GTK_BUTTONS_NONE,
-                                               _("Do you really want to delete the file '%s'?"),
-                                               basename_utf8);
-            gtk_window_set_title(GTK_WINDOW(msgdialog),_("Delete File"));
-            
gtk_dialog_add_buttons(GTK_DIALOG(msgdialog),GTK_STOCK_CANCEL,GTK_RESPONSE_NO,GTK_STOCK_DELETE,GTK_RESPONSE_YES,NULL);
-        }
-        gtk_dialog_set_default_response (GTK_DIALOG (msgdialog),
-                                         GTK_RESPONSE_YES);
-        SF_ButtonPressed_Delete_File = response = gtk_dialog_run(GTK_DIALOG(msgdialog));
-        if (msgdialog_check_button && 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(msgdialog_check_button)))
-            SF_HideMsgbox_Delete_File = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(msgdialog_check_button));
-        gtk_widget_destroy(msgdialog);
-    }else
-    {
-        if (SF_HideMsgbox_Delete_File)
-            response = SF_ButtonPressed_Delete_File;
-        else
-            response = GTK_RESPONSE_YES;
-    }
-
-    switch (response)
-    {
-        case GTK_RESPONSE_YES:
-        {
-            GFile *cur_file = g_file_new_for_path (cur_filename);
-
-            if (g_file_delete (cur_file, NULL, error))
-            {
-                gchar *msg = g_strdup_printf(_("File '%s' deleted"), basename_utf8);
-                Statusbar_Message(msg,FALSE);
-                g_free(msg);
-                g_free(basename_utf8);
-                g_object_unref (cur_file);
-                g_assert (error == NULL || *error == NULL);
-                return 1;
-            }
-
-            /* Error in deleting file. */
-            g_assert (error == NULL || *error != NULL);
-            break;
-        }
-        case GTK_RESPONSE_NO:
-            break;
-        case GTK_RESPONSE_CANCEL:
-        case GTK_RESPONSE_DELETE_EVENT:
-            stop_loop = -1;
-            g_free(basename_utf8);
-            return stop_loop;
-            break;
-        default:
-            g_assert_not_reached ();
-            break;
-    }
-
-    g_free(basename_utf8);
-    return 0;
-}
-
-void
-Action_Select_Browser_Style (void)
-{
-    g_return_if_fail (ETCore->ETFileDisplayedList != NULL);
-
-    /* Save the current displayed data */
-    ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed);
-
-    Browser_Display_Tree_Or_Artist_Album_List();
-
-    Update_Command_Buttons_Sensivity();
-}
-
-/*
  * Scans the specified directory: and load files into a list.
  * If the path doesn't exist, we free the previous loaded list of files.
  */
@@ -1679,6 +1251,7 @@ gboolean Read_Directory (gchar *path_real)
     gint   progress_bar_index = 0;
     GtkAction *uiaction;
     GtkWidget *artist_radio;
+    EtApplicationWindow *window;
 
     g_return_val_if_fail (path_real != NULL, FALSE);
 
@@ -1689,8 +1262,10 @@ gboolean Read_Directory (gchar *path_real)
     ET_Core_Initialize();
     Update_Command_Buttons_Sensivity();
 
+    window = ET_APPLICATION_WINDOW (MainWindow);
+
     /* Initialize browser list */
-    Browser_List_Clear();
+    et_application_window_browser_clear (window);
 
     /* Clear entry boxes  */
     Clear_File_Entry_Field();
@@ -1701,10 +1276,9 @@ gboolean Read_Directory (gchar *path_real)
     artist_radio = gtk_ui_manager_get_widget (UIManager, "/ToolBar/ArtistViewMode");
     gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (artist_radio),
                                        FALSE);
-    //Browser_Display_Tree_Or_Artist_Album_List(); // To show the corresponding lists...
 
     // Set to unsensitive the Browser Area, to avoid to select another file while loading the first one
-    Browser_Area_Set_Sensitive(FALSE);
+    et_application_window_browser_set_sensitive (window, FALSE);
 
     /* Placed only here, to empty the previous list of files */
     dir = g_file_new_for_path (path_real);
@@ -1735,7 +1309,7 @@ gboolean Read_Directory (gchar *path_real)
         g_free(path_utf8);
 
         ReadingDirectory = FALSE; //Allow a new reading
-        Browser_Area_Set_Sensitive(TRUE);
+        et_application_window_browser_set_sensitive (window, TRUE);
         g_object_unref (dir);
         g_error_free (error);
         return FALSE;
@@ -1805,7 +1379,7 @@ gboolean Read_Directory (gchar *path_real)
     {
         //GList *etfilelist;
         /* Load the list of file into the browser list widget */
-        Browser_Display_Tree_Or_Artist_Album_List();
+        et_application_window_browser_toggle_display_mode (window);
 
         /* Load the list attached to the TrackEntry */
         Load_Track_List_To_UI();
@@ -1859,7 +1433,7 @@ gboolean Read_Directory (gchar *path_real)
     /* Update sensitivity of buttons and menus */
     Update_Command_Buttons_Sensivity();
 
-    Browser_Area_Set_Sensitive(TRUE);
+    et_application_window_browser_set_sensitive (window, TRUE);
 
     gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ProgressBar), 0.0);
     Statusbar_Message(msg,FALSE);
@@ -2361,12 +1935,14 @@ Init_Load_Default_Dir (void)
 
     if (INIT_DIRECTORY)
     {
-        Browser_Tree_Select_Dir(INIT_DIRECTORY);
+        et_application_window_select_dir (ET_APPLICATION_WINDOW (MainWindow),
+                                          INIT_DIRECTORY);
     }
     else
     {
         Statusbar_Message(_("Select a directory to browse"),FALSE);
-        Browser_Load_Default_Directory();
+        et_application_window_load_default_dir (NULL,
+                                               ET_APPLICATION_WINDOW (MainWindow));
     }
 
     // To set sensivity of buttons in the case if the default directory is invalid
@@ -2418,9 +1994,6 @@ void Quit_MainWindow (void)
     if (ETCore->ETFileList)
         ET_Save_File_Data_From_UI(ETCore->ETFileDisplayed); // To detect change before exiting
 
-    /* Save combobox history list before exit */
-    Save_Path_Entry_List(BrowserEntryModel, MISC_COMBO_TEXT);
-
     /* Check if all files have been saved before exit */
     if (CONFIRM_WHEN_UNSAVED_FILES && ET_Check_If_All_Files_Are_Saved() != TRUE)
     {
diff --git a/src/easytag.h b/src/easytag.h
index f13befb..0eabd80 100644
--- a/src/easytag.h
+++ b/src/easytag.h
@@ -106,8 +106,6 @@ void Action_Invert_Files_Selection      (void);
 void Action_Select_Nth_File_By_Position (gulong num_item);
 void Action_Select_Nth_File_By_Etfile   (ET_File *ETFile);
 
-void Action_Remove_Selected_Tags        (void);
-gint Action_Undo_Selected_Files         (void);
 gint Action_Redo_Selected_File          (void);
 void Action_Undo_All_Files              (void);
 void Action_Redo_All_Files              (void);
@@ -115,7 +113,7 @@ void Action_Save_Selected_Files         (void);
 void Action_Force_Saving_Selected_Files (void);
 void Action_Undo_From_History_List      (void);
 void Action_Redo_From_History_List      (void);
-void Action_Delete_Selected_Files       (void);
+gint et_delete_file (ET_File *ETFile, gboolean multiple_files, GError **error);
 gint Save_All_Files_With_Answer         (gboolean force_saving_files);
 
 void Action_Main_Stop_Button_Pressed    (void);
diff --git a/src/et_core.c b/src/et_core.c
index 57cbb9d..20fe587 100644
--- a/src/et_core.c
+++ b/src/et_core.c
@@ -1173,7 +1173,9 @@ void ET_Sort_Displayed_File_List_And_Update_UI (ET_Sorting_Type Sorting_Type)
 
     /* Reload files in browser list */
     ET_Displayed_File_List_By_Etfile(ETCore->ETFileDisplayed);  // Just to update 'ETFileDisplayedList'
-    Browser_List_Select_File_By_Etfile(ETCore->ETFileDisplayed,TRUE);
+    et_application_window_browser_select_file_by_et_file (ET_APPLICATION_WINDOW (MainWindow),
+                                                          ETCore->ETFileDisplayed,
+                                                          TRUE);
     ET_Display_File_Data_To_UI(ETCore->ETFileDisplayed);
 
     Browser_List_Refresh_Sort();
diff --git a/src/load_files_dialog.c b/src/load_files_dialog.c
index 4e70cd6..906088d 100644
--- a/src/load_files_dialog.c
+++ b/src/load_files_dialog.c
@@ -155,7 +155,7 @@ Load_Filename_Set_Filenames (EtLoadFilesDialog *self)
 
     gtk_tree_path_free(currentPath);
 
-    Browser_List_Refresh_Whole_List();
+    et_application_window_browser_refresh_list (ET_APPLICATION_WINDOW (MainWindow));
     ET_Display_File_Data_To_UI(ETCore->ETFileDisplayed);
 }
 
@@ -830,7 +830,7 @@ create_load_files_dialog (EtLoadFilesDialog *self)
     GtkWidget *loadedvbox;
     GtkWidget *filelistvbox;
     GtkWidget *vboxpaned;
-    gchar *path;
+    const gchar *path;
     GtkCellRenderer* renderer;
     GtkTreeViewColumn* column;
 
@@ -871,7 +871,7 @@ create_load_files_dialog (EtLoadFilesDialog *self)
     // History List
     Load_File_To_Load_List(priv->file_to_load_model, MISC_COMBO_TEXT);
     // Initial value
-    if ((path=Browser_Get_Current_Path())!=NULL)
+    if ((path = et_application_window_get_current_path (ET_APPLICATION_WINDOW (MainWindow))) != NULL)
         gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(priv->file_to_load_combo))),path);
     // the 'changed' signal is attached below to enable/disable the button to load
     // Button 'browse'
diff --git a/src/misc.c b/src/misc.c
index 5c7ab71..ac0f7e2 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -752,96 +752,6 @@ void Run_Audio_Player_Using_Directory (void)
     g_list_free (path_list);
 }
 
-void Run_Audio_Player_Using_Selection (void)
-{
-    GList *selfilelist = NULL;
-    GList *l;
-    GList *path_list = NULL;
-    GtkTreeSelection *selection;
-
-    g_return_if_fail (BrowserList != NULL);
-
-    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserList));
-    selfilelist = gtk_tree_selection_get_selected_rows(selection, NULL);
-
-    for (l = selfilelist; l != NULL; l = g_list_next (l))
-    {
-        ET_File *etfile = Browser_List_Get_ETFile_From_Path (l->data);
-        gchar *path = ((File_Name *)etfile->FileNameCur->data)->value;
-        path_list = g_list_prepend (path_list, path);
-    }
-
-    path_list = g_list_reverse (path_list);
-
-    et_run_program (AUDIO_FILE_PLAYER, path_list);
-    g_list_free (path_list);
-    g_list_free_full (selfilelist, (GDestroyNotify)gtk_tree_path_free);
-}
-
-void Run_Audio_Player_Using_Browser_Artist_List (void)
-{
-    GtkTreeIter iter;
-    GtkTreeSelection *selection;
-    GtkTreeModel *artistListModel;
-    GList *l, *m;
-    GList *path_list = NULL;
-
-    g_return_if_fail (BrowserArtistList != NULL);
-
-    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserArtistList));
-    if (!gtk_tree_selection_get_selected(selection, &artistListModel, &iter))
-        return;
-
-    gtk_tree_model_get (artistListModel, &iter, ARTIST_ALBUM_LIST_POINTER, &l,
-                        -1);
-
-    for (; l != NULL; l = g_list_next (l))
-    {
-        for (m = l->data; m != NULL; m = g_list_next (m))
-        {
-            ET_File *etfile = (ET_File *)m->data;
-            gchar *path = ((File_Name *)etfile->FileNameCur->data)->value;
-            path_list = g_list_prepend (path_list, path);
-        }
-    }
-
-    path_list = g_list_reverse (path_list);
-
-    et_run_program (AUDIO_FILE_PLAYER, path_list);
-    g_list_free (path_list);
-}
-
-void Run_Audio_Player_Using_Browser_Album_List (void)
-{
-    GtkTreeIter iter;
-    GtkTreeSelection *selection;
-    GtkTreeModel *albumListModel;
-    GList *l;
-    GList *path_list = NULL;
-
-    g_return_if_fail (BrowserAlbumList != NULL);
-
-    selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(BrowserAlbumList));
-    if (!gtk_tree_selection_get_selected(selection, &albumListModel, &iter))
-        return;
-
-    gtk_tree_model_get (albumListModel, &iter, ALBUM_ETFILE_LIST_POINTER, &l,
-                        -1);
-
-    for (; l != NULL; l = g_list_next (l))
-    {
-        ET_File *etfile = (ET_File *)l->data;
-        gchar *path = ((File_Name *)etfile->FileNameCur->data)->value;
-        path_list = g_list_prepend (path_list, path);
-    }
-
-    path_list = g_list_reverse (path_list);
-
-    et_run_program (AUDIO_FILE_PLAYER, path_list);
-    g_list_free (path_list);
-}
-
-
 /*
  * Check if the executable passed in parameter can be launched
  * Returns the full path of the file (must be freed if not used)
diff --git a/src/misc.h b/src/misc.h
index 6526a9f..ec4496f 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -62,9 +62,6 @@ void Set_Unbusy_Cursor    (void);
 
 // Run Audio Player
 void Run_Audio_Player_Using_Directory (void);
-void Run_Audio_Player_Using_Selection (void);
-void Run_Audio_Player_Using_Browser_Artist_List (void);
-void Run_Audio_Player_Using_Browser_Album_List  (void);
 
 gchar *Convert_Duration (gulong duration);
 
diff --git a/src/playlist_dialog.c b/src/playlist_dialog.c
index 31c2eb5..036b44b 100644
--- a/src/playlist_dialog.c
+++ b/src/playlist_dialog.c
@@ -22,6 +22,7 @@
 
 #include <glib/gi18n.h>
 
+#include "application_window.h"
 #include "bar.h"
 #include "browser.h"
 #include "charset.h"
@@ -422,7 +423,7 @@ write_button_clicked (EtPlaylistDialog *self)
     et_playlist_dialog_apply_changes (self);
 
     // Path of the playlist file (may be truncated later if PLAYLIST_CREATE_IN_PARENT_DIR is TRUE)
-    playlist_path_utf8 = filename_to_display (Browser_Get_Current_Path ());
+    playlist_path_utf8 = filename_to_display (et_application_window_get_current_path (ET_APPLICATION_WINDOW 
(MainWindow)));
 
     /* Build the playlist filename. */
     if (PLAYLIST_USE_MASK_NAME)
diff --git a/src/scan_dialog.c b/src/scan_dialog.c
index 242dc8d..99bf7db 100644
--- a/src/scan_dialog.c
+++ b/src/scan_dialog.c
@@ -1024,47 +1024,6 @@ Scan_Rename_File_Prefix_Path (EtScanDialog *self)
 }
 
 
-/*******************************
- * Scanner To Rename Directory *
- *******************************/
-void Scan_Rename_Directory_Generate_Preview (void)
-{
-    gchar *preview_text = NULL;
-    gchar *mask = NULL;
-
-    if (!ETCore->ETFileDisplayed
-    ||  !RenameDirectoryWindow || !RenameDirectoryMaskCombo || !RenameDirectoryPreviewLabel)
-        return;
-
-    mask = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN(RenameDirectoryMaskCombo)))));
-    if (!mask)
-        return;
-
-    preview_text = Scan_Generate_New_Filename_From_Mask(ETCore->ETFileDisplayed,mask,FALSE);
-
-    if (GTK_IS_LABEL(RenameDirectoryPreviewLabel))
-    {
-        if (preview_text)
-        {
-            //gtk_label_set_text(GTK_LABEL(priv->rename_file_preview_label),preview_text);
-            gchar *tmp_string = g_markup_printf_escaped("%s",preview_text); // To avoid problem with strings 
containing characters like '&'
-            gchar *str = g_strdup_printf("<i>%s</i>",tmp_string);
-            gtk_label_set_markup(GTK_LABEL(RenameDirectoryPreviewLabel),str);
-            g_free(tmp_string);
-            g_free(str);
-        } else
-        {
-            gtk_label_set_text(GTK_LABEL(RenameDirectoryPreviewLabel),"");
-        }
-
-        // Force the window to be redrawed else the preview label may be not placed correctly
-        gtk_widget_queue_resize(RenameDirectoryWindow);
-    }
-
-    g_free(mask);
-    g_free(preview_text);
-}
-
 gchar *Scan_Generate_New_Directory_Name_From_Mask (ET_File *ETFile, gchar *mask, gboolean 
no_dir_check_or_conversion)
 {
     return Scan_Generate_New_Filename_From_Mask(ETFile,mask,no_dir_check_or_conversion);
@@ -3519,8 +3478,8 @@ et_scan_dialog_scan_selected_files (EtScanDialog *self)
 
     g_list_free_full (selfilelist, (GDestroyNotify)gtk_tree_path_free);
 
-    // Refresh the whole list (faster than file by file) to show changes
-    Browser_List_Refresh_Whole_List();
+    /* Refresh the whole list (faster than file by file) to show changes. */
+    et_application_window_browser_refresh_list (ET_APPLICATION_WINDOW (MainWindow));
 
     /* Display the current file */
     ET_Display_File_Data_To_UI(ETCore->ETFileDisplayed);
diff --git a/src/scan_dialog.h b/src/scan_dialog.h
index 626b91c..4998047 100644
--- a/src/scan_dialog.h
+++ b/src/scan_dialog.h
@@ -75,7 +75,6 @@ enum {
 void Scan_Select_Mode_And_Run_Scanner (EtScanDialog *self, ET_File *ETFile);
 gchar *Scan_Generate_New_Filename_From_Mask       (ET_File *ETFile, gchar *mask, gboolean 
no_dir_check_or_conversion);
 gchar *Scan_Generate_New_Directory_Name_From_Mask (ET_File *ETFile, gchar *mask, gboolean 
no_dir_check_or_conversion);
-void   Scan_Rename_Directory_Generate_Preview (void);
 
 void entry_check_rename_file_mask (GtkEntry *entry, gpointer user_data);
 
diff --git a/src/search_dialog.c b/src/search_dialog.c
index ab99c7a..c881d51 100644
--- a/src/search_dialog.c
+++ b/src/search_dialog.c
@@ -22,6 +22,7 @@
 
 #include <glib/gi18n.h>
 
+#include "application_window.h"
 #include "bar.h"
 #include "browser.h"
 #include "charset.h"
@@ -134,8 +135,8 @@ Search_Result_List_Row_Selected (GtkTreeSelection *selection,
         return;
     }
 
-    // Unselect files in the main list before re-selecting them...
-    Browser_List_Unselect_All_Files();
+    /* Unselect files in the main list before re-selecting them... */
+    et_application_window_browser_unselect_all (ET_APPLICATION_WINDOW (MainWindow));
 
     for (l = selectedRows; l != NULL; l = g_list_next (l))
     {
@@ -144,9 +145,11 @@ Search_Result_List_Row_Selected (GtkTreeSelection *selection,
         {
             gtk_tree_model_get(GTK_TREE_MODEL(priv->search_results_model), &currentFile, 
                                SEARCH_RESULT_POINTER, &ETFile, -1);
-            // Select the files (but don't display them to increase speed)
-            Browser_List_Select_File_By_Etfile(ETFile, TRUE);
-            // Display only the last file (to increase speed)
+            /* Select the files (but don't display them to increase speed). */
+            et_application_window_browser_select_file_by_et_file (ET_APPLICATION_WINDOW (MainWindow),
+                                                                  ETFile,
+                                                                  TRUE);
+            /* Display only the last file (to increase speed). */
             if (!selectedRows->next)
                 Action_Select_Nth_File_By_Etfile(ETFile);
         }
diff --git a/src/setting.c b/src/setting.c
index a004491..d417e4f 100644
--- a/src/setting.c
+++ b/src/setting.c
@@ -610,7 +610,7 @@ Apply_Changes_Of_Preferences_Window (void)
         {
             CHANGED_FILES_DISPLAYED_TO_RED  = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ChangedFilesDisplayedToRed));
             CHANGED_FILES_DISPLAYED_TO_BOLD = 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ChangedFilesDisplayedToBold));
-            Browser_List_Refresh_Whole_List();
+            et_application_window_browser_refresh_list (ET_APPLICATION_WINDOW (MainWindow));
         }
 
         /* Misc */



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