[accounts-dialog] Remove unused code
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [accounts-dialog] Remove unused code
- Date: Tue, 2 Feb 2010 03:21:52 +0000 (UTC)
commit 6152c8b02b769fb79750561602231a5cdc1b45a1
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Feb 1 22:19:56 2010 -0500
Remove unused code
src/um-utils.c | 56 --------------------------------------------------------
src/um-utils.h | 2 --
2 files changed, 0 insertions(+), 58 deletions(-)
---
diff --git a/src/um-utils.c b/src/um-utils.c
index 26d7702..5e29228 100644
--- a/src/um-utils.c
+++ b/src/um-utils.c
@@ -25,60 +25,4 @@
#include <glib/gi18n.h>
#include "um-utils.h"
-#include "um-user-manager.h"
-gchar *
-um_compute_short_name (const gchar *name)
-{
- gchar **names;
- gint len;
- gchar *shortname;
- gchar *res;
- gchar *tmp;
- gint i;
- UmUserManager *manager;
- UmUser *user;
-
- /* TODO: pluggable algorithms for this */
- names = g_strsplit (name, " ", 0);
- len = g_strv_length (names);
-
- if (len == 0) {
- shortname = g_strdup ("");
- }
- else if (len == 1) {
- shortname = g_strndup (names[0], 8);
- }
- else {
- gchar *first;
- gchar *suffix;
- first = g_strndup (names[0], 1);
- suffix = g_strndup (names[1], 7);
- shortname = g_strconcat (first, suffix, NULL);
- g_free (first);
- g_free (suffix);
- }
-
- res = g_ascii_strdown (shortname, -1);
-
- g_strfreev (names);
- g_free (shortname);
-
- if (res && res[0]) {
- manager = um_user_manager_ref_default ();
- tmp = g_strdup (res);
- for (i = 2; i < 10; i++) {
- user = um_user_manager_get_user (manager, tmp);
- if (user == NULL) {
- g_free (res);
- res = tmp;
- break;
- }
- g_free (tmp);
- tmp = g_strdup_printf ("%s%d", res, i);
- }
- g_object_unref (manager);
- }
-
- return res;
-}
diff --git a/src/um-utils.h b/src/um-utils.h
index 6788107..8fc9a80 100644
--- a/src/um-utils.h
+++ b/src/um-utils.h
@@ -24,8 +24,6 @@
G_BEGIN_DECLS
-gchar *um_compute_short_name (const gchar *name);
-
G_END_DECLS
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]