~ubuntu-branches/ubuntu/trusty/gdm/trusty-proposed

« back to all changes in this revision

Viewing changes to utils/gdmflexiserver.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha, Tim Lunn, Jeremy Bicha, Robert Ancell
  • Date: 2013-05-31 22:36:08 UTC
  • mfrom: (1.4.55)
  • Revision ID: package-import@ubuntu.com-20130531223608-33uo85niksee5460
Tags: 3.8.1.1-0ubuntu1
[ Tim Lunn ]
* New upstream release
* debian/patches/ubuntu_dont_catch_sigsegv.patch:
  - Dropped, obsolete
* debian/rules:
  - Don't rename gdm binary since that's already been
    done in the new version

[ Jeremy Bicha ]
* debian/control.in: Bump minimum glib
* debian/watch: Watch for unstable releases
* debian/patches/00git_logind_check.patch:
  - Dropped, applied in new release
* debian/patches/08_frequent-users_greeter.patch: Refreshed

[ Robert Ancell ]
* New upstream release
* debian/patches/ubuntu_daemon_autologin_tracking.patch:
* debian/patches/ubuntu_ensure_dirs.patch:
* debian/patches/ubuntu_slave-only-set-up-autologin.patch:
  - Applied upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
 
63
63
/* Keep all config options for compatibility even if they are noops */
64
64
GOptionEntry options [] = {
65
 
        { "command", 'c', 0, G_OPTION_ARG_STRING, &send_command, "Only the VERSION command is supported", "COMMAND" },
66
 
        { "xnest", 'n', 0, G_OPTION_ARG_NONE, &use_xnest, "Ignored — retained for compatibility", NULL },
67
 
        { "no-lock", 'l', 0, G_OPTION_ARG_NONE, &no_lock, "Ignored — retained for compatibility", NULL },
68
 
        { "debug", 'd', 0, G_OPTION_ARG_NONE, &debug_in, "Debugging output", NULL },
69
 
        { "authenticate", 'a', 0, G_OPTION_ARG_NONE, &authenticate, "Ignored — retained for compatibility", NULL },
70
 
        { "startnew", 's', 0, G_OPTION_ARG_NONE, &startnew, "Ignored — retained for compatibility", NULL },
 
65
        { "command", 'c', 0, G_OPTION_ARG_STRING, &send_command, N_("Only the VERSION command is supported"), N_("COMMAND") },
 
66
        { "xnest", 'n', 0, G_OPTION_ARG_NONE, &use_xnest, N_("Ignored — retained for compatibility"), NULL },
 
67
        { "no-lock", 'l', 0, G_OPTION_ARG_NONE, &no_lock, N_("Ignored — retained for compatibility"), NULL },
 
68
        { "debug", 'd', 0, G_OPTION_ARG_NONE, &debug_in, N_("Debugging output"), NULL },
 
69
        { "authenticate", 'a', 0, G_OPTION_ARG_NONE, &authenticate, N_("Ignored — retained for compatibility"), NULL },
 
70
        { "startnew", 's', 0, G_OPTION_ARG_NONE, &startnew, N_("Ignored — retained for compatibility"), NULL },
71
71
        { "monte-carlo-pi", 0, 0, G_OPTION_ARG_NONE, &monte_carlo_pi, NULL, NULL },
72
 
        { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, "Version of this application", NULL },
 
72
        { "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL },
73
73
        { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &args_remaining, NULL, NULL },
74
74
        { NULL }
75
75
};
444
444
        seat_id = get_current_seat_id (connection);
445
445
        if (seat_id == NULL || seat_id[0] == '\0') {
446
446
                g_debug ("seat id is not set; can't switch sessions");
447
 
                g_set_error (error, GDM_FLEXISERVER_ERROR, 0, "Could not identify the current session.");
 
447
                g_set_error (error, GDM_FLEXISERVER_ERROR, 0, _("Could not identify the current session."));
448
448
 
449
449
                return FALSE;
450
450
        }
451
451
 
452
452
        res = get_login_window_session_id_for_ck (connection, seat_id, &session_id);
453
453
        if (! res) {
454
 
                g_set_error (error, GDM_FLEXISERVER_ERROR, 1, "User unable to switch sessions.");
 
454
                g_set_error (error, GDM_FLEXISERVER_ERROR, 1, _("User unable to switch sessions."));
455
455
                return FALSE;
456
456
        }
457
457
 
611
611
        res = sd_pid_get_session (0, &our_session);
612
612
        if (res < 0) {
613
613
                g_debug ("failed to determine own session: %s", strerror (-res));
614
 
                g_set_error (error, GDM_FLEXISERVER_ERROR, 0, "Could not identify the current session.");
 
614
                g_set_error (error, GDM_FLEXISERVER_ERROR, 0, _("Could not identify the current session."));
615
615
 
616
616
                return FALSE;
617
617
        }
620
620
        free (our_session);
621
621
        if (res < 0) {
622
622
                g_debug ("failed to determine own seat: %s", strerror (-res));
623
 
                g_set_error (error, GDM_FLEXISERVER_ERROR, 0, "Could not identify the current seat.");
 
623
                g_set_error (error, GDM_FLEXISERVER_ERROR, 0, _("Could not identify the current seat."));
624
624
 
625
625
                return FALSE;
626
626
        }
630
630
                free (seat_id);
631
631
 
632
632
                g_debug ("failed to determine whether seat can do multi session: %s", strerror (-res));
633
 
                g_set_error (error, GDM_FLEXISERVER_ERROR, 0, "The system is unable to determine whether to switch to an existing login screen or start up a new login screen.");
 
633
                g_set_error (error, GDM_FLEXISERVER_ERROR, 0, _("The system is unable to determine whether to switch to an existing login screen or start up a new login screen."));
634
634
 
635
635
                return FALSE;
636
636
        }
638
638
        if (res == 0) {
639
639
                free (seat_id);
640
640
 
641
 
                g_set_error (error, GDM_FLEXISERVER_ERROR, 0, "The system is unable to start up a new login screen.");
 
641
                g_set_error (error, GDM_FLEXISERVER_ERROR, 0, _("The system is unable to start up a new login screen."));
642
642
 
643
643
                return FALSE;
644
644
        }
704
704
        setlocale (LC_ALL, "");
705
705
 
706
706
        /* Option parsing */
707
 
        ctx = g_option_context_new ("- New GDM login");
 
707
        ctx = g_option_context_new (_("- New GDM login"));
708
708
        g_option_context_set_translation_domain (ctx, GETTEXT_PACKAGE);
709
709
        g_option_context_add_main_entries (ctx, options, NULL);
710
710
        g_option_context_parse (ctx, &argc, &argv, NULL);
760
760
                                                 GTK_DIALOG_DESTROY_WITH_PARENT,
761
761
                                                 GTK_MESSAGE_ERROR,
762
762
                                                 GTK_BUTTONS_CLOSE,
763
 
                                                 "%s", "Unable to start new display");
 
763
                                                 "%s", _("Unable to start new display"));
764
764
 
765
765
                gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
766
766
                                                          "%s", message);