gnome-session r5078 - in trunk: . gnome-session
- From: fcrozat svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-session r5078 - in trunk: . gnome-session
- Date: Wed, 10 Sep 2008 15:40:23 +0000 (UTC)
Author: fcrozat
Date: Wed Sep 10 15:40:23 2008
New Revision: 5078
URL: http://svn.gnome.org/viewvc/gnome-session?rev=5078&view=rev
Log:
2008-09-10 Frederic Crozat <fcrozat mandriva com>
* gnome-session/gsm-logout-dialog.c: backport
fix from gnome-panel: conversion from username
to UTF-8 if locale is not UTF-8.
Modified:
trunk/ChangeLog
trunk/gnome-session/gsm-logout-dialog.c
Modified: trunk/gnome-session/gsm-logout-dialog.c
==============================================================================
--- trunk/gnome-session/gsm-logout-dialog.c (original)
+++ trunk/gnome-session/gsm-logout-dialog.c Wed Sep 10 15:40:23 2008
@@ -257,7 +257,7 @@
{
GsmLogoutDialog *logout_dialog;
char *secondary_text;
- const char *name;
+ char *name;
int seconds_to_show;
logout_dialog = (GsmLogoutDialog *) data;
@@ -307,10 +307,14 @@
g_assert_not_reached ();
}
- name = g_get_real_name ();
+ name = g_locale_to_utf8 (g_get_real_name (), -1, NULL, NULL, NULL);
- if (!name || name[0] == '\0') {
- name = g_get_user_name ();
+ if (!name || name[0] == '\0' || strcmp (name, "Unknown") == 0) {
+ name = g_locale_to_utf8 (g_get_user_name (), -1 , NULL, NULL, NULL);
+ }
+
+ if (!name) {
+ name = g_strdup (g_get_user_name ());
}
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (logout_dialog),
@@ -321,6 +325,8 @@
logout_dialog->priv->timeout--;
+ g_free (name);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]