[gnome-commander] Drop usage of GNOME authentication manager for password handling



commit de8b0c26cc829736c2b8f233a9458a9c01bd753e
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sun Sep 11 18:58:16 2011 +0200

    Drop usage of GNOME authentication manager for password handling
    
    That fixes frequent crashes when opening authentication dlg in GnomeVFS thread

 doc/C/gnome-commander.xml       |    7 ----
 po/POTFILES.in                  |    1 -
 src/Makefile.am                 |    1 -
 src/gnome-cmd-con-dialog.cc     |    2 +-
 src/gnome-cmd-data.cc           |    3 --
 src/gnome-cmd-data.h            |    1 -
 src/gnome-cmd-options-dialog.cc |   13 --------
 src/gnome-cmd-smb-auth.cc       |   66 ---------------------------------------
 src/gnome-cmd-smb-auth.h        |   26 ---------------
 src/main.cc                     |   11 ------
 10 files changed, 1 insertions(+), 130 deletions(-)
---
diff --git a/doc/C/gnome-commander.xml b/doc/C/gnome-commander.xml
index 0443d24..9bcfb94 100644
--- a/doc/C/gnome-commander.xml
+++ b/doc/C/gnome-commander.xml
@@ -7023,13 +7023,6 @@
                             <tbody>
                                 <row valign="top">
                                     <entry><para>[network]</para></entry>
-                                    <entry><para>use_gnome_auth_manager</para></entry>
-                                    <entry><para>boolean</para></entry>
-                                    <entry><para>Usage of GNOME authentication manager for password handling. Defaults to FALSE.</para></entry>
-                                    <entry><para></para></entry>
-                                </row>
-                                <row valign="top">
-                                    <entry><para></para></entry>
                                     <entry><para>ftp_anonymous_password</para></entry>
                                     <entry><para>string</para></entry>
                                     <entry><para></para></entry>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b93961e..549ff3b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -53,7 +53,6 @@ src/gnome-cmd-quicksearch-popup.cc
 src/gnome-cmd-remote-dialog.cc
 src/gnome-cmd-rename-dialog.cc
 src/gnome-cmd-selection-profile-component.cc
-src/gnome-cmd-smb-auth.cc
 src/gnome-cmd-smb-path.cc
 src/gnome-cmd-user-actions.cc
 src/gnome-cmd-xfer.cc
diff --git a/src/Makefile.am b/src/Makefile.am
index 72f062f..0fa5730 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -71,7 +71,6 @@ gnome_commander_SOURCES = \
 	gnome-cmd-quicksearch-popup.h gnome-cmd-quicksearch-popup.cc \
 	gnome-cmd-rename-dialog.h gnome-cmd-rename-dialog.cc \
 	gnome-cmd-selection-profile-component.h gnome-cmd-selection-profile-component.cc \
-	gnome-cmd-smb-auth.h gnome-cmd-smb-auth.cc \
 	gnome-cmd-smb-net.h gnome-cmd-smb-net.cc \
 	gnome-cmd-smb-path.h gnome-cmd-smb-path.cc \
 	gnome-cmd-style.h gnome-cmd-style.cc \
diff --git a/src/gnome-cmd-con-dialog.cc b/src/gnome-cmd-con-dialog.cc
index 62f64af..ec6f565 100644
--- a/src/gnome-cmd-con-dialog.cc
+++ b/src/gnome-cmd-con-dialog.cc
@@ -560,7 +560,7 @@ GnomeCmdConFtp *gnome_cmd_connect_dialog_new (gboolean has_alias)
 
     gtk_combo_box_set_active (GTK_COMBO_BOX (conndlg->priv->type_combo), CON_SSH);
 
-    conndlg->priv->use_auth = gnome_cmd_data.use_gnome_auth_manager;
+    conndlg->priv->use_auth = FALSE;
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (conndlg->priv->auth_check), conndlg->priv->use_auth);
 
     gint response = gtk_dialog_run (GTK_DIALOG (dialog));
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 7187427..39ddd9b 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -892,7 +892,6 @@ GnomeCmdData::GnomeCmdData(): search_defaults(selections)
     allow_multiple_instances = FALSE;
     use_internal_viewer = TRUE;
     use_gcmd_block = FALSE;
-    use_gnome_auth_manager = FALSE;
 
     honor_expect_uris = FALSE;
     skip_mounting = FALSE;
@@ -1194,7 +1193,6 @@ void GnomeCmdData::load()
 
     main_win_state = (GdkWindowState) gnome_cmd_data_get_int ("/options/main_win_state", (gint) GDK_WINDOW_STATE_MAXIMIZED);
 
-    use_gnome_auth_manager = gnome_cmd_data_get_bool ("/network/use_gnome_auth_manager", FALSE);
     priv->ftp_anonymous_password = gnome_cmd_data_get_string ("/network/ftp_anonymous_password", "you provider com");
 
     if (strcmp (priv->ftp_anonymous_password, "you provider com")==0)   // if '/network/ftp_anonymous_password' entry undefined, try to read '/ftp/anonymous_password'
@@ -1614,7 +1612,6 @@ void GnomeCmdData::save()
 
     gnome_cmd_data_set_int ("/options/main_win_state", (gint) main_win_state);
 
-    gnome_cmd_data_set_bool ("/network/use_gnome_auth_manager", use_gnome_auth_manager);
     gnome_cmd_data_set_string ("/network/ftp_anonymous_password", priv->ftp_anonymous_password);
     gnome_config_clean_section (G_DIR_SEPARATOR_S PACKAGE "/ftp");
 
diff --git a/src/gnome-cmd-data.h b/src/gnome-cmd-data.h
index 84b58ce..cf4bf58 100644
--- a/src/gnome-cmd-data.h
+++ b/src/gnome-cmd-data.h
@@ -255,7 +255,6 @@ struct GnomeCmdData
     gboolean                     allow_multiple_instances;
     gboolean                     use_internal_viewer;
     gboolean                     use_gcmd_block;
-    gboolean                     use_gnome_auth_manager;
 
     gboolean                     honor_expect_uris;
     gboolean                     skip_mounting;
diff --git a/src/gnome-cmd-options-dialog.cc b/src/gnome-cmd-options-dialog.cc
index ad4cbbf..ef1383e 100644
--- a/src/gnome-cmd-options-dialog.cc
+++ b/src/gnome-cmd-options-dialog.cc
@@ -1174,17 +1174,6 @@ static GtkWidget *create_network_tab (GtkWidget *parent)
     gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
 
 
-    // GNOME Keyring Manager
-
-    cat_box = create_vbox (parent, FALSE, 0);
-    cat = create_category (parent, cat_box, _("Authentication"));
-    gtk_box_pack_start (GTK_BOX (vbox), cat, FALSE, TRUE, 0);
-
-    check = create_check (parent, _("Use GNOME Keyring Manager for authentication"), "use_auth_manager");
-    gtk_box_pack_start (GTK_BOX (cat_box), check, FALSE, TRUE, 0);
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), gnome_cmd_data.use_gnome_auth_manager);
-
-
     // Anonymous FTP password options
 
     table = create_table (parent, 1, 2);
@@ -1203,10 +1192,8 @@ static GtkWidget *create_network_tab (GtkWidget *parent)
 
 inline void store_network_options (GtkWidget *dialog)
 {
-    GtkWidget *use_auth_manager_check = lookup_widget (dialog, "use_auth_manager");
     GtkWidget *entry = lookup_widget (dialog, "anonymous_ftp_password");
 
-    gnome_cmd_data.use_gnome_auth_manager = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (use_auth_manager_check));
     gnome_cmd_data_set_ftp_anonymous_password (gtk_entry_get_text (GTK_ENTRY (entry)));
 }
 
diff --git a/src/main.cc b/src/main.cc
index a7f2f9a..b69d690 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -18,11 +18,6 @@
     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 */
 
-extern "C"
-{
-    void gnome_authentication_manager_init ();
-}
-
 #include <config.h>
 #include <locale.h>
 #include <unique/unique.h>
@@ -35,7 +30,6 @@ extern "C"
 #include "owner.h"
 #include "gnome-cmd-style.h"
 #include "gnome-cmd-con.h"
-#include "gnome-cmd-smb-auth.h"
 #include "utils.h"
 #include "ls_colors.h"
 #include "imageloader.h"
@@ -156,11 +150,6 @@ int main (int argc, char *argv[])
         ls_colors_init ();
         gnome_cmd_data.load_more();
 
-        if (gnome_cmd_data.use_gnome_auth_manager)
-            gnome_authentication_manager_init ();
-        else
-            gnome_cmd_smb_auth_init ();
-
         gnome_cmd_style_create ();
 
         main_win = new GnomeCmdMainWin;



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