Re: gdm ui review



Hi,

> On Fri, Jun 18, 2004 at 11:20:09AM -0700, Chookij Vanatham wrote:
> > Just curiosity. I assume that "Gnome Language and Culture capplet
> > (by Carlos)" is going in to Gnome 2.8. Would that be any change in gdm ui ?
> 
> Does it handle ~/.dmrc? (It should if it doesn't)
As I remembered last time (3-4 months ago when I was asking Carlos how to do
it), No, it doesn't use ~/.dmrc. It uses gconf.

Basically, after users select "language" from this capplet,
the capplet will save the value by using gconf and the idea is to
add little change into gnome-session. So, when users login again/later,
gnome-session will use gconf_client_get_list(,GCONF_LOCALIZATION_ROOT_KEY
"/languages") to get "language" which will be the new language users want.

gnome-session/main.c
--------------------
static char *
get_usr_saved_lang (void)
{
  client = gconf_client_get_default ();
  gconf_client_add_dir (client, GCONF_LOCALIZATION_ROOT_KEY,
		GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
  langs = gconf_client_get_list (client,
		GCONF_LOCALIZATION_ROOT_KEY "/languages",
                                         GCONF_VALUE_STRING, NULL);
  for (cur_lang = langs; cur_lang != NULL; cur_lang = cur_lang->next) {
       ...
       locale = g_strdup(cur_lang->data);
       ...
  }
  return locale;
}

/* Set language environment variables based on what GDM is setting
 */
static void
set_lang (void)
{

  if ((usr_saved_lang = get_usr_saved_lang()) != NULL) {
      env_string = g_strconcat ("LANG=", usr_saved_lang, NULL);
      putenv (env_string);

      g_free (usr_saved_lang);
  } else {
      gdm_lang = g_getenv("GDM_LANG");
  }
}


> If that's the case it does change it a bit but that's the applet's ui
> and not gdms :)
>
Well! What I understood is that, gdm's language selection menu is still
there but there is a little change for the case of gnome-session.

If users want to change their's session language setting, they need to
use "Gnome language capplet" to do it. So, when users login and select
"Last" from language selection, gnome-session will set that language
for users. In this sense, there is a bit of need (but not necessary)
to change gdm not to read ~/.dmrc for language for gnome-session.

If users select "Language" from gdm's menu, I think, gdm needs some
change to use gconf to get user session's language (by Capplet)
which will be used in the pop-up window telling users that they
are currently using different language but, additionally, telling
users that this current language won't be saved/recored as
user session's language previously used (or may be, gdm can just use
gconf to save the new value instead).

For non-gnome-session, ex: KDE, ..etc, thers is no change needed
in gdm's behavior.

If my understanding is correct, seems like there is no change in gdm UI
(the change is just transparent to users) but I'm not sure if
this is the definited decision/intention on what to do between gdm and
the capplet.

I also cced "Carlos" for this topic.

> 
> Also I think James Cape has an applet for session switching which he wanted
> to integrate for 2.8, or perhaps get into 2.8 separately.  I'm ccing him.
>
Would this be "on-the-fly" session switching ?

Thanks,

Chookij V.

> 
> George
> 
> -- 
> George <jirka 5z com>
>    An idealist is one who, on noticing that a rose smells better than a
>    cabbage, concludes that it will also make better soup.
>                        -- H. L. Mencken (1880 - 1956)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: gdm-unsubscribe sunsite dk
> For additional commands, e-mail: gdm-help sunsite dk
> 




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