summaryrefslogtreecommitdiff
path: root/gui/gdmcomm.c
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>2002-07-30 00:37:34 +0000
committerGeorge Lebl <jirka@src.gnome.org>2002-07-30 00:37:34 +0000
commit7a7978e4760f19a36ad38f720dfbaaa17e2916f0 (patch)
tree895a4ec77ac4151f5cb45a8e75704e04bac323cc /gui/gdmcomm.c
parent4aeaa954623897884e1a81dbcf140f97b407b88b (diff)
downloadgdm-7a7978e4760f19a36ad38f720dfbaaa17e2916f0.tar.gz
use the ve_signal routines, remove gdm_signal routines
Mon Jul 29 17:45:59 2002 George Lebl <jirka@5z.com> * daemon/gdm.[ch]: use the ve_signal routines, remove gdm_signal routines * gui/gdmlogin.c, gui/greeter/greeter.c, gui/greeter/greeter_item_clock.[ch]: use the ve_signal routines for the HUP signal to avoid possible crashes/races/hangs if the signal handler comes in a bad time. Also don't reset the graphical on every damn change, just the ones we care about, and update clock on the fly instead of restarting. * gui/gdmchooser.c: make glade_helper not use the gnome_program thingie, since we never init it here. * gui/Makefile.am, gui/gdmlogin.c, gui/gdmchooser.c, gui/gdmflexiserver.c, gui/gdmXnestchooser.c, gui/gdmcomm.c gui/greeter/Makefile.am, gui/greeter/greeter.c, gui/greeter/greeter_item_pam.c, gui/greeter/greeter_item_clock.c, gui/greeter/greeter_item_capslock.c, gui/greeter/greeter_item.c, gui/greeter/greeter_canvas_item.c: Compile without deprecated stuff. fix minor bugs found during the process. Also compile everything with warnings and fix those. * gui/gdmlogin.c, gui/gdmcomm.c, gui/gdmsetup.c, gui/greeter/greeter.c: Use the new ve-config routines rather then gnome_config. Fixed config bugs found in the process. This also makes gdmsetup not delete comments and empty lines from the config which makes debugging and hand editting SO MUCH SIMPLER! * gui/gdmsetup.c: recheck for gdm running before every update * gui/gdmlogin.c, gui/greeter/greeter.c: remove the g_io_channel_init call which was reseting the whole setup. So our channels were still buffered and encoded, which manifested itself when the read calls were replaced the read_chars. This could actually solve the FreeBSD issues too.
Diffstat (limited to 'gui/gdmcomm.c')
-rw-r--r--gui/gdmcomm.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/gui/gdmcomm.c b/gui/gdmcomm.c
index c3b402ca..8e199e32 100644
--- a/gui/gdmcomm.c
+++ b/gui/gdmcomm.c
@@ -20,7 +20,7 @@
#include "config.h"
#include <libgnome/libgnome.h>
-#include <libgnomeui/libgnomeui.h>
+#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include <X11/Xauth.h>
@@ -269,8 +269,9 @@ gdmcomm_get_a_cookie (gboolean binary)
str = g_string_new (NULL);
for (i = 0; i < xau->data_length; i++) {
- g_string_sprintfa (str, "%02x",
- (guint)(guchar)xau->data[i]);
+ g_string_append_printf
+ (str, "%02x",
+ (guint)(guchar)xau->data[i]);
}
cookie = g_string_free (str, FALSE);
}
@@ -365,9 +366,8 @@ gdmcomm_check (gboolean gui_bitching)
long pid;
char *pidfile;
- gnome_config_push_prefix ("=" GDM_CONFIG_FILE "=/");
- pidfile = gnome_config_get_string (GDM_KEY_PIDFILE);
- gnome_config_pop_prefix ();
+ pidfile = ve_config_get_string (ve_config_get (GDM_CONFIG_FILE),
+ GDM_KEY_PIDFILE);
pid = 0;
if (pidfile != NULL)
@@ -382,21 +382,33 @@ gdmcomm_check (gboolean gui_bitching)
(kill (pid, 0) < 0 &&
errno != EPERM)) {
if (gui_bitching) {
- dialog = gnome_warning_dialog
- (_("GDM is not running.\n"
+ dialog = gtk_message_dialog_new
+ (NULL /* parent */,
+ GTK_DIALOG_MODAL /* flags */,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_OK,
+ _("GDM is not running.\n"
"Please ask your "
"system administrator to start it."));
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
+ gtk_widget_show_all (dialog);
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
}
return FALSE;
}
if (access (GDM_SUP_SOCKET, R_OK|W_OK)) {
if (gui_bitching) {
- dialog = gnome_warning_dialog
- (_("Cannot communicate with gdm, perhaps "
+ dialog = gtk_message_dialog_new
+ (NULL /* parent */,
+ GTK_DIALOG_MODAL /* flags */,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_OK,
+ _("Cannot communicate with gdm, perhaps "
"you have an old version running."));
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
+ gtk_widget_show_all (dialog);
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
}
return FALSE;
}