[gnome-commander] Removed unused function: create_keyring_attributes
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Removed unused function: create_keyring_attributes
- Date: Mon, 11 May 2015 18:59:23 +0000 (UTC)
commit 12d64165a3216b834c1a965e177795a0e007fa40
Author: Uwe Scholz <uwescholz src gnome org>
Date: Mon May 11 20:58:46 2015 +0200
Removed unused function: create_keyring_attributes
src/gnome-cmd-con.cc | 70 --------------------------------------------------
src/gnome-cmd-con.h | 11 --------
2 files changed, 0 insertions(+), 81 deletions(-)
---
diff --git a/src/gnome-cmd-con.cc b/src/gnome-cmd-con.cc
index d462323..6e3e8f8 100644
--- a/src/gnome-cmd-con.cc
+++ b/src/gnome-cmd-con.cc
@@ -548,76 +548,6 @@ XML::xstream &operator << (XML::xstream &xml, GnomeCmdCon &con)
}
-GnomeKeyringAttributeList *gnome_cmd_con_create_keyring_attributes (const gchar *uri_str, const gchar
*alias, ConnectionMethodID method)
-{
- GnomeVFSURI *uri = gnome_vfs_uri_new (uri_str);
-
- const gchar *user = gnome_vfs_uri_get_user_name (uri);
- const gchar *domain = NULL;
- const gchar *server = gnome_vfs_uri_get_host_name (uri);
- const gchar *path = gnome_vfs_uri_get_path (uri);
- const gchar *protocol = gnome_vfs_uri_get_scheme (uri);
- guint port = gnome_vfs_uri_get_host_port (uri);
-
- gchar **a = NULL;
-
-#ifdef HAVE_SAMBA
- if (method==CON_SMB)
- {
- a = g_strsplit (user, ";", 2);
-
- if (g_strv_length (a) > 1)
- {
- domain = a[0];
- user = a[1];
- }
- }
-#endif
-
- GnomeKeyringAttributeList *attributes = gnome_keyring_attribute_list_new ();
-
- gnome_keyring_attribute_list_append_string (attributes, "alias", alias);
-
- if (protocol)
- gnome_keyring_attribute_list_append_string (attributes, "protocol", protocol);
-
- if (user)
- gnome_keyring_attribute_list_append_string (attributes, "user", user);
-
- if (server)
- gnome_keyring_attribute_list_append_string (attributes, "server", server);
-
- if (port)
- gnome_keyring_attribute_list_append_uint32 (attributes, "port", port);
-
- if (domain)
- gnome_keyring_attribute_list_append_string (attributes, "domain", domain);
-
- if (path)
- gnome_keyring_attribute_list_append_string (attributes, "object", path);
-
- gnome_keyring_attribute_list_append_string (attributes, "authtype", "password");
-
- gnome_keyring_attribute_list_append_string (attributes, "application", "GNOME Commander");
-
- {
- gchar date[11];
- GDate *now = g_date_new ();
-
- g_date_set_time_t (now, time (NULL));
- g_date_strftime (date, sizeof(date), "%Y-%m-%d", now);
-
- gnome_keyring_attribute_list_append_string (attributes, "date-modified", date);
-
- g_date_free (now);
- }
-
- gnome_vfs_uri_unref (uri);
- g_strfreev (a);
-
- return attributes;
-}
-
/**
* This callback function takes a const char* pointer and points it to a
* newly created char array of the password the user has typed in the
diff --git a/src/gnome-cmd-con.h b/src/gnome-cmd-con.h
index 67745a9..dfdc70b 100644
--- a/src/gnome-cmd-con.h
+++ b/src/gnome-cmd-con.h
@@ -31,8 +31,6 @@
struct GnomeCmdConPrivate;
-#include <gnome-keyring.h>
-
#include <string>
#include "gnome-cmd-path.h"
@@ -118,8 +116,6 @@ struct GnomeCmdCon
GnomeCmdConPrivate *priv;
- GnomeKeyringAttributeList *create_keyring_attributes();
-
friend XML::xstream &operator << (XML::xstream &xml, GnomeCmdCon &con);
const char *password;
const char *gnome_cmd_con_set_password();
@@ -502,11 +498,4 @@ inline std::string &gnome_cmd_con_make_uri (std::string &s, ConnectionMethodID m
}
}
-GnomeKeyringAttributeList *gnome_cmd_con_create_keyring_attributes (const gchar *uri_str, const gchar
*alias, ConnectionMethodID method);
-
-inline GnomeKeyringAttributeList *GnomeCmdCon::create_keyring_attributes()
-{
- return gnome_cmd_con_create_keyring_attributes (uri, alias, method);
-}
-
#endif // __GNOME_CMD_CON_H__
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]