summaryrefslogtreecommitdiff
path: root/gui/gdmchooser.c
diff options
context:
space:
mode:
authorBrian Cameron <Brian.Cameron@sun.com>2005-10-14 18:18:14 +0000
committerBrian Cameron <bcameron@src.gnome.org>2005-10-14 18:18:14 +0000
commit00f9738b902eae9b8ed37db88608aadaf92421c1 (patch)
tree613be7d989a33c9af7d1443639547a2c52621437 /gui/gdmchooser.c
parentccf1d0b7d753b9ba2242fbff77b8cd28446075bb (diff)
downloadgdm-00f9738b902eae9b8ed37db88608aadaf92421c1.tar.gz
No longer set tooltips for menu items in gdmlogin. These are distracting,
2005-10-14 Brian Cameron <Brian.Cameron@sun.com> * gui/gdmlogin.c: No longer set tooltips for menu items in gdmlogin. These are distracting, and do not work with accessibility. After talking with Owen Taylor at the GNOME Boston Summit, he said no GNOME programs do this, and it is not recommended. Fix for bug #144869. * gui/gdmchooser.c: Now use gdm_common_setup_cursor instead of its own copy of the same function. * gui/gdmcommon.[ch]: gdmlogin, gdmgreeter and gdmchooser were all using their own functions to set the background color. Now they use a common function in gdmcommon. * gui/gdmlogin.c, gui/gdmchooser.c, gui/greeter/greeter.c: Now sets background color and sets cursor to a watch as soon as GTK is initialized and the configure file read. This shortens the amount of time the background is Xserver default gray.
Diffstat (limited to 'gui/gdmchooser.c')
-rw-r--r--gui/gdmchooser.c69
1 files changed, 17 insertions, 52 deletions
diff --git a/gui/gdmchooser.c b/gui/gdmchooser.c
index a910d5ac..0951959e 100644
--- a/gui/gdmchooser.c
+++ b/gui/gdmchooser.c
@@ -90,7 +90,6 @@ static gint connection_type = 0;
static void gdm_chooser_abort (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
static void gdm_chooser_warn (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
-static void set_background (void);
/* Exported for glade */
void gdm_chooser_cancel (void);
@@ -218,14 +217,6 @@ find_host_in_list (GdmChooserHost *host, GtkTreeIter *iter)
}
static void
-setup_cursor (GdkCursorType type)
-{
- GdkCursor *cursor = gdk_cursor_new (type);
- gdk_window_set_cursor (gdk_get_default_root_window (), cursor);
- gdk_cursor_unref (cursor);
-}
-
-static void
gdm_chooser_host_dispose (GdmChooserHost *host)
{
if (!host)
@@ -1920,8 +1911,7 @@ gdm_reread_config (int sig, gpointer data)
! bool_same (config, GdmDebug, GDM_KEY_DEBUG)) {
if (RUNNING_UNDER_GDM) {
/* Set busy cursor */
- setup_cursor (GDK_WATCH);
-
+ gdm_common_setup_cursor (GDK_WATCH);
gdm_wm_save_wm_order ();
}
@@ -1934,7 +1924,10 @@ gdm_reread_config (int sig, gpointer data)
/* we only use the color and do it for all types except NONE */
if ( ! string_same (config, GdmBackgroundColor, GDM_KEY_BACKGROUNDCOLOR) ||
! int_same (config, GdmBackgroundType, GDM_KEY_BACKGROUNDTYPE)) {
- set_background ();
+
+ if (GdmBackgroundType != GDM_BACKGROUND_NONE) {
+ setup_background_color (GdmBackgroundColor);
+ }
}
return TRUE;
@@ -1991,37 +1984,6 @@ struct poptOption xdm_options [] = {
{ NULL, 0, 0, NULL, 0}
};
-static void
-set_background (void)
-{
- if (GdmBackgroundType != GDM_BACKGROUND_NONE) {
- GdkColor color;
- GdkColormap *colormap;
-
- if (ve_string_empty (GdmBackgroundColor) ||
- ! gdk_color_parse (GdmBackgroundColor, &color)) {
- gdk_color_parse ("#007777", &color);
- }
-
- colormap = gdk_drawable_get_colormap
- (gdk_get_default_root_window ());
- /* paranoia */
- if (colormap != NULL) {
- gboolean success;
- gdk_error_trap_push ();
-
- gdk_colormap_alloc_colors (colormap, &color, 1,
- FALSE, TRUE, &success);
-
- gdk_window_set_background (gdk_get_default_root_window (), &color);
- gdk_window_clear (gdk_get_default_root_window ());
-
- gdk_flush ();
- gdk_error_trap_pop ();
- }
- }
-}
-
static gboolean
gdm_event (GSignalInvocationHint *ihint,
guint n_param_values,
@@ -2088,10 +2050,6 @@ main (int argc, char *argv[])
exit (1);
}
- /* Should be a watch already, but just in case */
- if (RUNNING_UNDER_GDM)
- setup_cursor (GDK_WATCH);
-
glade_init();
config_file = gdm_common_get_config_file ();
@@ -2107,6 +2065,16 @@ main (int argc, char *argv[])
gdm_version = g_getenv ("GDM_VERSION");
+ /* Load the background as early as possible so GDM does not leave */
+ /* the background unfilled. The cursor should be a watch already */
+ /* but just in case */
+ if (RUNNING_UNDER_GDM) {
+ if (GdmBackgroundType != GDM_BACKGROUND_NONE)
+ setup_background_color (GdmBackgroundColor);
+
+ gdm_common_setup_cursor (GDK_WATCH);
+ }
+
if (RUNNING_UNDER_GDM &&
gdm_version != NULL &&
strcmp (gdm_version, VERSION) != 0) {
@@ -2134,7 +2102,7 @@ main (int argc, char *argv[])
gtk_widget_show_all (dialog);
gdm_wm_center_window (GTK_WINDOW (dialog));
- setup_cursor (GDK_LEFT_PTR);
+ gdm_common_setup_cursor (GDK_LEFT_PTR);
gtk_dialog_run (GTK_DIALOG (dialog));
@@ -2144,9 +2112,6 @@ main (int argc, char *argv[])
gdm_chooser_gui_init();
gdm_chooser_signals_init();
- if (RUNNING_UNDER_GDM)
- set_background ();
-
hosts = (char **)poptGetArgs (ctx);
/* when no hosts on the command line, take them from the config */
if (hosts == NULL ||
@@ -2192,7 +2157,7 @@ main (int argc, char *argv[])
if (RUNNING_UNDER_GDM) {
gdm_wm_restore_wm_order ();
- setup_cursor (GDK_LEFT_PTR);
+ gdm_common_setup_cursor (GDK_LEFT_PTR);
}
gtk_main();