summaryrefslogtreecommitdiff
path: root/gui/gdmcomm.c
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2007-03-21 05:45:58 +0000
committerBrian Cameron <bcameron@src.gnome.org>2007-03-21 05:45:58 +0000
commit10db3464789ad1d3b0b8306e9b75d34fa1a57bbc (patch)
tree08bc460539511fe0fbda3c800e649e477ef1468a /gui/gdmcomm.c
parent81953a7ae3393a60bb916bb20bd2469a8b2544bf (diff)
downloadgdm-10db3464789ad1d3b0b8306e9b75d34fa1a57bbc.tar.gz
Phase 1 of removing vicious-extensions and replacing with a rewrite.
2006-03-20 Brian Cameron <brian.cameron@sun.com> * configure.ac, autogen.sh, gui/gdmlanguages.c, gui/gdmconfig.h gui/gdmuser.c, gui/gdmwm.c, gui/gdmdynamic.c, gui/gdmlogin.c, gui/gdmphotosetup.c, gui/gdmsession.c, gui/gdmXnestchooser.c, gui/greeter/greeter.c, gui/gdmcommon.c, gui/gdmcomm.c, gui/gdmflexiserver.c, gui/gdmsetup.c, gui/gdmchooser.c, gui/misc.c, gui/gdmmconfig.c, gui/Makefile.am gui/greeter/greeter_item_customlist.c, gui/greeter/greeter_canvas_item.c gui/greeter/greeter_parser.c, gui/greeter/greeter_item.c, gui/greeter/greeter_item_ulist.c, gui/greeter/greeter_item_timed.c, gui/greeter/greeter_session.c, gui/greeter/greeter_system.c, gui/greeter/greeter_item_pam.c, gui/greeter/Makefile.am, gui/greeter/themes/Makefile.am, common/gdm-common.[ch], common/gdm-common-config.[ch], common/ve-signal.[ch], common/Makefile.am, daemon/errorgui.c, daemon/gdmconfig.h, daemon/display.c, daemon/gdm.c, daemon/xdmcp.c, daemon/filecheck.c, daemon/verify-pam.c, daemon/getvt.c, daemon/auth.c, daemon/server.c, daemon/cookie.c, daemon/slave.c, daemon/server.h, daemon/misc.c, daemon/gdm-net.c, daemon/gdmconfig.c, daemon/Makefile.am: Phase 1 of removing vicious-extensions and replacing with a rewrite. Changes include: - Create a common directory to build libgdmcommon, used by the daemon and the GUI's. - Add a convenience layer over GKeyFile for dealing with compound keys. - Replace selected ve functions like ve_split - Remove glade_helper - Code improvements and leaks. Fix by William Jon McCann <mccann@jhu.edu>. Refer to bug #355425. svn path=/trunk/; revision=4689
Diffstat (limited to 'gui/gdmcomm.c')
-rw-r--r--gui/gdmcomm.c72
1 files changed, 48 insertions, 24 deletions
diff --git a/gui/gdmcomm.c b/gui/gdmcomm.c
index a5d5080e..a19dbedc 100644
--- a/gui/gdmcomm.c
+++ b/gui/gdmcomm.c
@@ -35,13 +35,13 @@
#include <sys/un.h>
#include <errno.h>
-#include "vicious.h"
-
#include "gdm.h"
#include "gdmcommon.h"
#include "gdmcomm.h"
#include "gdmconfig.h"
+#include "gdm-common.h"
+
static gboolean bulk_acs = FALSE;
static gboolean debug = FALSE;
static gboolean quiet = FALSE;
@@ -583,6 +583,32 @@ gdmcomm_get_auth_cookie (void)
return cookie;
}
+static GtkWidget *
+hig_dialog_new (GtkWindow *parent,
+ GtkDialogFlags flags,
+ GtkMessageType type,
+ GtkButtonsType buttons,
+ const gchar *primary_message,
+ const gchar *secondary_message)
+{
+ GtkWidget *dialog;
+
+ dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ type,
+ buttons,
+ "%s", primary_message);
+
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
+ "%s", secondary_message);
+
+ gtk_window_set_title (GTK_WINDOW (dialog), "");
+ gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
+ gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14);
+
+ return dialog;
+}
+
gboolean
gdmcomm_check (gboolean show_dialog)
{
@@ -611,19 +637,18 @@ gdmcomm_check (gboolean show_dialog)
(kill (pid, 0) < 0 &&
errno != EPERM)) {
if (show_dialog) {
- dialog = ve_hig_dialog_new
- (NULL /* parent */,
- GTK_DIALOG_MODAL /* flags */,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK,
- _("GDM (The GNOME Display Manager) "
- "is not running."),
- _("You might in fact be using a different "
- "display manager, such as KDM "
- "(KDE Display Manager) or xdm. "
- "If you still wish to use this feature, "
- "either start GDM yourself or ask your "
- "system administrator to start GDM."));
+ dialog = hig_dialog_new (NULL /* parent */,
+ GTK_DIALOG_MODAL /* flags */,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_OK,
+ _("GDM (The GNOME Display Manager) "
+ "is not running."),
+ _("You might in fact be using a different "
+ "display manager, such as KDM "
+ "(KDE Display Manager) or xdm. "
+ "If you still wish to use this feature, "
+ "either start GDM yourself or ask your "
+ "system administrator to start GDM."));
gtk_widget_show_all (dialog);
gtk_dialog_run (GTK_DIALOG (dialog));
@@ -637,15 +662,14 @@ gdmcomm_check (gboolean show_dialog)
s.st_uid != 0 ||
g_access (GDM_SUP_SOCKET, R_OK|W_OK) != 0) {
if (show_dialog) {
- dialog = ve_hig_dialog_new
- (NULL /* parent */,
- GTK_DIALOG_MODAL /* flags */,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK,
- _("Cannot communicate with GDM "
- "(The GNOME Display Manager)"),
- _("Perhaps you have an old version "
- "of GDM running."));
+ dialog = hig_dialog_new (NULL /* parent */,
+ GTK_DIALOG_MODAL /* flags */,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_OK,
+ _("Cannot communicate with GDM "
+ "(The GNOME Display Manager)"),
+ _("Perhaps you have an old version "
+ "of GDM running."));
gtk_widget_show_all (dialog);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);