Commit f5ae8967 authored by Brian Cameron's avatar Brian Cameron

2010-06-03 Brian Cameron <brian.cameron@sun.com>

        * gui/gdmlanguages.c, gui/gdmsession.c, gui/gdmlogin.c,
          gui/greeter/greeter.c:  Switch buttons "Make Default" and
          "Just For This Session" for better usability.  Fixes bug #597661.
parent b0904423
2010-06-03 Brian Cameron <brian.cameron@sun.com>
* gui/gdmlanguages.c, gui/gdmsession.c, gui/gdmlogin.c,
gui/greeter/greeter.c: Switch buttons "Make Default" and
"Just For This Session" for better usability. Fixes bug #597661.
2010-06-02 Brian Cameron <brian.cameron@sun.com>
* vicious-extensions/ve-misc.c: Fix bug #571846. No longer print
invalid encoded strings since this can causemaster the user's
password to be logged in the syslog if it contains invalid characters
and if GDM debug is enabled.
2009-06-08 Brian Cameron <brian.cameron@sun.com>
* gui/gdmsetup.c: Fix call to g_markup_printf_escaped so that NULL
......
......@@ -51,7 +51,7 @@ static GtkListStore *lang_model = NULL;
static GtkWidget *dialog = NULL;
static gchar *current_language = NULL;
static gchar *dialog_selected_language = NULL;
static gint savelang = GTK_RESPONSE_NO;
static gint dont_savelang = GTK_RESPONSE_YES;
static gboolean always_restart = FALSE;
#include "gdm-common.h"
......@@ -727,7 +727,7 @@ gdm_lang_initialize_model (gchar * locale_file)
gint
gdm_lang_get_savelang_setting (void)
{
return savelang;
return dont_savelang;
}
gchar *
......@@ -736,7 +736,7 @@ gdm_lang_check_language (const char *old_language)
gchar *retval = NULL;
/* Don't save language unless told otherwise */
savelang = GTK_RESPONSE_NO;
dont_savelang = GTK_RESPONSE_YES;
if (old_language == NULL)
old_language = "";
......@@ -780,8 +780,8 @@ gdm_lang_check_language (const char *old_language)
g_free (current_name);
g_free (saved_name);
savelang = gdm_wm_query_dialog (primary_message, secondary_message,
_("Make _Default"), _("Just For _This Session"), TRUE);
dont_savelang = gdm_wm_query_dialog (primary_message, secondary_message,
_("Just For _This Session"), _("Make _Default"), TRUE);
g_free (primary_message);
g_free (secondary_message);
}
......@@ -1092,7 +1092,7 @@ gdm_lang_op_lang (const gchar *args)
void
gdm_lang_op_slang (const gchar *args)
{
if (gdm_lang_get_savelang_setting () == GTK_RESPONSE_YES)
if (gdm_lang_get_savelang_setting () == GTK_RESPONSE_NO)
printf ("%cY\n", STX);
else
printf ("%c\n", STX);
......
......@@ -132,7 +132,7 @@ static gint size_of_users = 0;
static gchar *curuser = NULL;
static gchar *session = NULL;
static gint savelang = GTK_RESPONSE_NO;
static gint dont_savelang = GTK_RESPONSE_YES;
/* back_prog_timeout_event_id: event of the timer.
* back_prog_watcher_event_id: event of the background program watcher.
......@@ -1329,7 +1329,7 @@ process_operation (guchar op_code,
gint lookup_status = SESSION_LOOKUP_SUCCESS;
gchar *firstmsg = NULL;
gchar *secondmsg = NULL;
gint save_session = GTK_RESPONSE_NO;
gint dont_save_session = GTK_RESPONSE_YES;
/* Parse opcode */
switch (op_code) {
......@@ -1504,11 +1504,11 @@ process_operation (guchar op_code,
secondmsg = g_strdup_printf (_("Your preferred session type %s is not "
"installed on this computer."),
gdm_session_name (tmp));
save_session = gdm_wm_query_dialog (firstmsg, secondmsg,
_("Make _Default"), _("Just _Log In"), TRUE);
dont_save_session = gdm_wm_query_dialog (firstmsg, secondmsg,
_("Just _Log In"), _("Make _Default"), TRUE);
g_free (firstmsg);
g_free (secondmsg);
gdm_set_save_session (save_session);
gdm_set_save_session (dont_save_session);
break;
case SESSION_LOOKUP_DEFAULT_MISMATCH:
......@@ -1520,12 +1520,12 @@ process_operation (guchar op_code,
"setting is %s."),
gdm_session_name (session),
gdm_session_name (tmp));
save_session = gdm_wm_query_dialog (firstmsg, secondmsg,
_("Make _Default"), _("Just For _This Session"), TRUE);
dont_save_session = gdm_wm_query_dialog (firstmsg, secondmsg,
_("Just For _This Session"), _("Make _Default"), TRUE);
g_free (firstmsg);
g_free (secondmsg);
gdm_set_save_session (save_session);
gdm_set_save_session (dont_save_session);
break;
case SESSION_LOOKUP_USE_SWITCHDESK:
firstmsg = g_strdup_printf (_("You have chosen %s for this "
......@@ -1562,7 +1562,7 @@ process_operation (guchar op_code,
break;
case GDM_SSESS:
if (gdm_get_save_session () == GTK_RESPONSE_YES)
if (gdm_get_save_session () == GTK_RESPONSE_NO)
printf ("%cY\n", STX);
else
printf ("%c\n", STX);
......
......@@ -46,7 +46,7 @@ GHashTable *sessnames = NULL;
gchar *default_session = NULL;
const gchar *current_session = NULL;
GList *sessions = NULL;
static gint save_session = GTK_RESPONSE_NO;
static gint dont_save_session = GTK_RESPONSE_YES;
/* This is true if session dir doesn't exist or is whacked out
......@@ -414,7 +414,7 @@ gdm_session_lookup (const char *saved_session, gint *lookup_status)
*lookup_status = SESSION_LOOKUP_SUCCESS;
/* Don't save session unless told otherwise */
save_session = GTK_RESPONSE_NO;
dont_save_session = GTK_RESPONSE_YES;
/* Previously saved session not found in ~/.dmrc */
if ( ! (saved_session != NULL &&
......@@ -427,7 +427,7 @@ gdm_session_lookup (const char *saved_session, gint *lookup_status)
else
session = g_strdup (current_session);
save_session = GTK_RESPONSE_YES;
dont_save_session = GTK_RESPONSE_NO;
return session;
}
......@@ -461,7 +461,7 @@ gdm_session_lookup (const char *saved_session, gint *lookup_status)
* These are intended to be used for debugging or temporary
* purposes.
*/
save_session = GTK_RESPONSE_NO;
dont_save_session = GTK_RESPONSE_YES;
}
else if (strcmp (saved_session, session) != 0)
{
......@@ -482,7 +482,7 @@ gdm_session_lookup (const char *saved_session, gint *lookup_status)
{
*lookup_status = SESSION_LOOKUP_USE_SWITCHDESK;
}
save_session = GTK_RESPONSE_NO;
dont_save_session = GTK_RESPONSE_YES;
}
}
}
......@@ -493,13 +493,13 @@ gdm_session_lookup (const char *saved_session, gint *lookup_status)
gint
gdm_get_save_session (void)
{
return save_session;
return dont_save_session;
}
void
gdm_set_save_session (const gint session)
{
save_session = session;
dont_save_session = session;
}
const char*
......
......@@ -229,7 +229,7 @@ process_operation (guchar op_code,
gint lookup_status = SESSION_LOOKUP_SUCCESS;
gchar *firstmsg = NULL;
gchar *secondmsg = NULL;
gint save_session = GTK_RESPONSE_NO;
gint dont_save_session = GTK_RESPONSE_YES;
/* Parse opcode */
switch (op_code) {
......@@ -336,9 +336,9 @@ process_operation (guchar op_code,
secondmsg = g_strdup_printf (_("Your preferred session type %s is not "
"installed on this computer."),
gdm_session_name (tmp));
save_session = gdm_wm_query_dialog (firstmsg, secondmsg,
_("Make _Default"), _("Just _Log In"), TRUE);
dont_save_session = gdm_wm_query_dialog (firstmsg, secondmsg,
_("Just _Log In"), _("Make _Default"), TRUE);
g_free (firstmsg);
g_free (secondmsg);
gdm_set_save_session (save_session);
......@@ -353,12 +353,12 @@ process_operation (guchar op_code,
"setting is %s."),
gdm_session_name (session),
gdm_session_name (tmp));
save_session = gdm_wm_query_dialog (firstmsg, secondmsg,
_("Make _Default"), _("Just For _This Session"), TRUE);
dont_save_session = gdm_wm_query_dialog (firstmsg, secondmsg,
_("Just For _This Session"), _("Make _Default"), TRUE);
g_free (firstmsg);
g_free (secondmsg);
gdm_set_save_session (save_session);
gdm_set_save_session (dont_save_session);
break;
case SESSION_LOOKUP_USE_SWITCHDESK:
firstmsg = g_strdup_printf (_("You have chosen %s for this "
......@@ -396,7 +396,7 @@ process_operation (guchar op_code,
break;
case GDM_SSESS:
if (gdm_get_save_session () == GTK_RESPONSE_YES)
if (gdm_get_save_session () == GTK_RESPONSE_NO)
printf ("%cY\n", STX);
else
printf ("%c\n", STX);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment