From 616b43ad0fc0192a06b80ca8de91d59c9ad3e918 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: May 02 2008 02:35:18 +0000 Subject: - Update to 2.22.0 - Fix restarting after system bus restart --- diff --git a/.cvsignore b/.cvsignore index f849c56..16c1bc7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -gdm-2.21.10.tar.gz +gdm-2.22.0.tar.gz diff --git a/ck-multi.patch b/ck-multi.patch deleted file mode 100644 index b00e057..0000000 --- a/ck-multi.patch +++ /dev/null @@ -1,130 +0,0 @@ -diff -up gdm-2.21.10/gui/simple-greeter/gdm-greeter-login-window.c.ck-multi gdm-2.21.10/gui/simple-greeter/gdm-greeter-login-window.c ---- gdm-2.21.10/gui/simple-greeter/gdm-greeter-login-window.c.ck-multi 2008-04-05 20:39:49.000000000 -0400 -+++ gdm-2.21.10/gui/simple-greeter/gdm-greeter-login-window.c 2008-04-05 20:42:23.000000000 -0400 -@@ -1036,20 +1036,41 @@ static PolKitAction * - get_action_from_error (GError *error) - { - PolKitAction *action; -- const char *paction; -+ char *paction; -+ char *p; - - action = polkit_action_new (); - - paction = NULL; - if (g_str_has_prefix (error->message, "Not privileged for action: ")) { -- paction = error->message + strlen ("Not privileged for action: "); -+ paction = g_strdup (error->message + strlen ("Not privileged for action: ")); -+ p = strchr (paction, ' '); -+ if (p) -+ *p = '\0'; - } - g_debug ("GdmGreeterLoginWindow: Requesting priv for '%s'", paction); - - polkit_action_set_action_id (action, paction); - -+ g_free (paction); -+ - return action; - } -+ -+static PolKitResult -+get_result_from_error (GError *error) -+{ -+ PolKitResult result = POLKIT_RESULT_UNKNOWN; -+ const char *p; -+ -+ p = strrchr (error->message, ' '); -+ if (p) { -+ p++; -+ polkit_result_from_string_representation (p, &result); -+ } -+ -+ return result; -+} - #endif - - static void -@@ -1076,11 +1097,40 @@ do_system_restart (GdmGreeterLoginWindow - - if (dbus_g_error_has_name (error, "org.freedesktop.ConsoleKit.Manager.NotPrivileged")) { - PolKitAction *action; -+ PolKitAction *action2; -+ PolKitResult result; -+ GtkWidget *dialog; - guint xid; - pid_t pid; - -+ result = get_result_from_error (error); - action = get_action_from_error (error); - -+ if (result == POLKIT_RESULT_NO) { -+ action2 = polkit_action_new (); -+ polkit_action_set_action_id (action2, -+ "org.freedesktop.consolekit.system.restart-multiple-users"); -+ dialog = gtk_message_dialog_new (GTK_WINDOW (login_window), -+ GTK_DIALOG_MODAL, -+ GTK_MESSAGE_ERROR, -+ GTK_BUTTONS_OK, -+ _("Failed to restart computer")); -+ if (polkit_action_equal (action, action2)) { -+ gtk_message_dialog_format_secondary_text (dialog, -+ _("You are not allowed to restart the computer " -+ "because multiple users are logged in")); -+ } -+ gtk_dialog_run (GTK_DIALOG (dialog)); -+ gtk_widget_destroy (dialog); -+ -+ polkit_action_unref (action); -+ polkit_action_unref (action2); -+ -+ g_error_free (error); -+ -+ return; -+ } -+ - xid = 0; - pid = getpid (); - -@@ -1128,14 +1178,41 @@ do_system_stop (GdmGreeterLoginWindow *l - - if (dbus_g_error_has_name (error, "org.freedesktop.ConsoleKit.Manager.NotPrivileged")) { - PolKitAction *action; -+ PolKitAction *action2; -+ PolKitResult result; -+ GtkWidget *dialog; - guint xid; - pid_t pid; - - xid = 0; - pid = getpid (); - -+ result = get_result_from_error (error); - action = get_action_from_error (error); - -+ if (result == POLKIT_RESULT_NO) { -+ action2 = polkit_action_new (); -+ polkit_action_set_action_id (action2, -+ "org.freedesktop.consolekit.system.stop-multiple-users"); -+ dialog = gtk_message_dialog_new (GTK_WINDOW (login_window), -+ GTK_DIALOG_MODAL, -+ GTK_MESSAGE_ERROR, -+ GTK_BUTTONS_OK, -+ _("Failed to stop computer")); -+ if (polkit_action_equal (action, action2)) { -+ gtk_message_dialog_format_secondary_text (dialog, -+ _("You are not allowed to stop the computer " -+ "because multiple users are logged in")); -+ } -+ gtk_dialog_run (GTK_DIALOG (dialog)); -+ gtk_widget_destroy (dialog); -+ -+ polkit_action_unref (action); -+ polkit_action_unref (action2); -+ -+ return; -+ } -+ - g_error_free (error); - error = NULL; - res = polkit_gnome_auth_obtain (action, diff --git a/gdm-2.21.10-disable-debug-messages.patch b/gdm-2.21.10-disable-debug-messages.patch deleted file mode 100644 index ad82713..0000000 --- a/gdm-2.21.10-disable-debug-messages.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up gdm-2.21.10/common/gdm-log.c.disable-debug-messages gdm-2.21.10/common/gdm-log.c ---- gdm-2.21.10/common/gdm-log.c.disable-debug-messages 2008-04-06 20:49:01.000000000 -0400 -+++ gdm-2.21.10/common/gdm-log.c 2008-04-06 20:50:39.000000000 -0400 -@@ -167,7 +167,7 @@ gdm_log_toggle_debug (void) - void - gdm_log_set_debug (gboolean debug) - { -- if (debug) { -+ if (debug && FALSE) { - syslog_levels |= G_LOG_LEVEL_DEBUG; - } else { - syslog_levels &= ~G_LOG_LEVEL_DEBUG; diff --git a/gdm-2.21.10-fix-autologin-crasher.patch b/gdm-2.21.10-fix-autologin-crasher.patch deleted file mode 100644 index 05a5164..0000000 --- a/gdm-2.21.10-fix-autologin-crasher.patch +++ /dev/null @@ -1,281 +0,0 @@ -diff --git a/gui/simple-greeter/gdm-chooser-widget.c b/gui/simple-greeter/gdm-chooser-widget.c -index 102b2c7..689cccc 100644 ---- a/gui/simple-greeter/gdm-chooser-widget.c -+++ b/gui/simple-greeter/gdm-chooser-widget.c -@@ -504,7 +504,7 @@ get_normalized_position_of_row_at_path (GdmChooserWidget *widget, - area_of_visible_rows.y, - &area_of_visible_rows.x, - &area_of_visible_rows.y); -- return ((double) area_of_row_at_path.y) / widget->priv->items_view->allocation.height; -+ return CLAMP (((double) area_of_row_at_path.y) / widget->priv->items_view->allocation.height, 0.0, 1.0); - } - - static void -@@ -603,6 +603,10 @@ skip_resize_animation (GdmChooserWidget *widget) - static void - gdm_chooser_widget_grow (GdmChooserWidget *widget) - { -+ if (widget->priv->state == GDM_CHOOSER_WIDGET_STATE_SHRINKING) { -+ gdm_scrollable_widget_stop_sliding (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget)); -+ } -+ - gtk_alignment_set (GTK_ALIGNMENT (widget->priv->frame_alignment), - 0.0, 0.0, 1.0, 1.0); - -@@ -651,6 +655,16 @@ gdm_chooser_widget_shrink (GdmChooserWidget *widget) - { - g_assert (widget->priv->should_hide_inactive_items == TRUE); - -+ if (widget->priv->state == GDM_CHOOSER_WIDGET_STATE_GROWING) { -+ -+ /* FIXME: since we don't distinguish between a canceled -+ * animation and a finished one, the next line is going -+ * to mean at the next size-allocate signal, -+ * height_when_grown is going to get set to the wrong value -+ */ -+ gdm_scrollable_widget_stop_sliding (GDM_SCROLLABLE_WIDGET (widget->priv->scrollable_widget)); -+ } -+ - set_frame_text (widget, widget->priv->active_text); - - gtk_alignment_set (GTK_ALIGNMENT (widget->priv->frame_alignment), -diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c -index d7bc7e3..aebeb68 100644 ---- a/gui/simple-greeter/gdm-greeter-login-window.c -+++ b/gui/simple-greeter/gdm-greeter-login-window.c -@@ -159,7 +159,10 @@ static void gdm_greeter_login_window_class_init (GdmGreeterLoginWindowClas - static void gdm_greeter_login_window_init (GdmGreeterLoginWindow *greeter_login_window); - static void gdm_greeter_login_window_finalize (GObject *object); - --static void restart_timed_login_timeout (GdmGreeterLoginWindow *login_window); -+static void restart_timed_login_timeout (GdmGreeterLoginWindow *login_window); -+static void on_user_unchosen (GdmUserChooserWidget *user_chooser, -+ GdmGreeterLoginWindow *login_window); -+ - G_DEFINE_TYPE (GdmGreeterLoginWindow, gdm_greeter_login_window, GTK_TYPE_WINDOW) - - static void -@@ -228,6 +231,8 @@ set_sensitive (GdmGreeterLoginWindow *login_window, - - box = glade_xml_get_widget (login_window->priv->xml, "buttonbox"); - gtk_widget_set_sensitive (box, sensitive); -+ -+ gtk_widget_set_sensitive (login_window->priv->user_chooser, sensitive); - } - - static void -@@ -618,7 +623,11 @@ reset_dialog (GdmGreeterLoginWindow *login_window) - } - _gdm_greeter_login_window_set_interactive (login_window, FALSE); - -+ g_signal_handlers_block_by_func (G_OBJECT (login_window->priv->user_chooser), -+ G_CALLBACK (on_user_unchosen), login_window); - gdm_user_chooser_widget_set_chosen_user_name (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser), NULL); -+ g_signal_handlers_unblock_by_func (G_OBJECT (login_window->priv->user_chooser), -+ G_CALLBACK (on_user_unchosen), login_window); - - if (login_window->priv->start_session_handler_id > 0) { - g_signal_handler_disconnect (login_window, login_window->priv->start_session_handler_id); -@@ -635,10 +644,6 @@ reset_dialog (GdmGreeterLoginWindow *login_window) - label = glade_xml_get_widget (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->xml, "auth-prompt-label"); - gtk_label_set_text (GTK_LABEL (label), ""); - -- set_message (login_window, ""); -- -- gdm_user_chooser_widget_set_chosen_user_name (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser), NULL); -- - switch_mode (login_window, MODE_SELECTION); - - set_sensitive (login_window, TRUE); -@@ -707,16 +712,30 @@ gdm_greeter_login_window_request_timed_login (GdmGreeterLoginWindow *login_windo - const char *username, - int delay) - { -+ static gboolean timed_login_already_enabled; -+ - g_return_if_fail (GDM_IS_GREETER_LOGIN_WINDOW (login_window)); - - g_debug ("GdmGreeterLoginWindow: requested automatic login for user '%s' in %d seconds", username, delay); - -+ if (login_window->priv->timed_login_username != NULL) { -+ timed_login_already_enabled = TRUE; -+ g_free (login_window->priv->timed_login_username); -+ } else { -+ timed_login_already_enabled = FALSE; -+ } - login_window->priv->timed_login_username = g_strdup (username); - login_window->priv->timed_login_delay = delay; - -- reset_dialog (login_window); -+ if (login_window->priv->dialog_mode != MODE_SELECTION) { -+ reset_dialog (login_window); -+ } - gdm_user_chooser_widget_set_show_auto_user (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser), TRUE); -- gdm_user_chooser_widget_set_chosen_user_name (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser), GDM_USER_CHOOSER_USER_AUTO); -+ -+ if (!timed_login_already_enabled) { -+ gdm_user_chooser_widget_set_chosen_user_name (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser), -+ GDM_USER_CHOOSER_USER_AUTO); -+ } - } - - static void -diff --git a/gui/simple-greeter/gdm-scrollable-widget.c b/gui/simple-greeter/gdm-scrollable-widget.c -index 7b716b2..03712fc 100644 ---- a/gui/simple-greeter/gdm-scrollable-widget.c -+++ b/gui/simple-greeter/gdm-scrollable-widget.c -@@ -106,6 +106,7 @@ static void - gdm_scrollable_widget_animation_free (GdmScrollableWidgetAnimation *animation) - { - g_object_unref (animation->timer); -+ animation->timer = NULL; - g_slice_free (GdmScrollableWidgetAnimation, animation); - } - -@@ -190,7 +191,13 @@ gdm_scrollable_widget_animation_start (GdmScrollableWidgetAnimation *animation) - g_signal_connect_swapped (G_OBJECT (animation->timer), "stop", - G_CALLBACK (on_animation_stop), - animation); -- gdm_timer_start (animation->timer, .50); -+ gdm_timer_start (animation->timer, .5); -+} -+ -+static void -+gdm_scrollable_widget_animation_stop (GdmScrollableWidgetAnimation *animation) -+{ -+ gdm_timer_stop (animation->timer); - } - - static gboolean -@@ -621,6 +628,18 @@ gdm_scrollable_widget_animations_are_disabled (GdmScrollableWidget *scrollable_w - } - - void -+gdm_scrollable_widget_stop_sliding (GdmScrollableWidget *scrollable_widget) -+{ -+ g_return_if_fail (GDM_IS_SCROLLABLE_WIDGET (scrollable_widget)); -+ -+ if (scrollable_widget->priv->animation != NULL) { -+ gdm_scrollable_widget_animation_stop (scrollable_widget->priv->animation); -+ } -+ -+ g_assert (scrollable_widget->priv->animation == NULL); -+} -+ -+void - gdm_scrollable_widget_slide_to_height (GdmScrollableWidget *scrollable_widget, - int height, - GdmScrollableWidgetSlideStepFunc step_func, -@@ -634,7 +653,7 @@ gdm_scrollable_widget_slide_to_height (GdmScrollableWidget *scrollable_widget, - g_return_if_fail (GDM_IS_SCROLLABLE_WIDGET (scrollable_widget)); - widget = GTK_WIDGET (scrollable_widget); - -- g_return_if_fail (scrollable_widget->priv->animation == NULL); -+ gdm_scrollable_widget_stop_sliding (scrollable_widget); - - input_redirected = gdm_scrollable_redirect_input_to_event_sink (scrollable_widget); - -@@ -647,6 +666,10 @@ gdm_scrollable_widget_slide_to_height (GdmScrollableWidget *scrollable_widget, - done_func (scrollable_widget, done_user_data); - } - -+ if (input_redirected) { -+ gdm_scrollable_unredirect_input (scrollable_widget); -+ } -+ - return; - } - -diff --git a/gui/simple-greeter/gdm-scrollable-widget.h b/gui/simple-greeter/gdm-scrollable-widget.h -index 7706466..b1a6878 100644 ---- a/gui/simple-greeter/gdm-scrollable-widget.h -+++ b/gui/simple-greeter/gdm-scrollable-widget.h -@@ -61,6 +61,7 @@ struct GdmScrollableWidgetClass - - GType gdm_scrollable_widget_get_type (void); - GtkWidget * gdm_scrollable_widget_new (void); -+void gdm_scrollable_widget_stop_sliding (GdmScrollableWidget *widget); - void gdm_scrollable_widget_slide_to_height (GdmScrollableWidget *widget, - int height, - GdmScrollableWidgetSlideStepFunc step_func, -diff --git a/gui/simple-greeter/gdm-timer.c b/gui/simple-greeter/gdm-timer.c -index d5ca361..4daf588 100644 ---- a/gui/simple-greeter/gdm-timer.c -+++ b/gui/simple-greeter/gdm-timer.c -@@ -212,7 +212,10 @@ do_tick (GdmTimer *timer, - double time_before_tick; - double tick_duration; - -+ g_assert (GDM_IS_TIMER (timer)); -+ - time_before_tick = current_time; -+ g_object_ref (G_OBJECT (timer)); - g_signal_emit (G_OBJECT (timer), signals[TICK], 0, progress); - - current_time = get_current_time (); -@@ -220,7 +223,11 @@ do_tick (GdmTimer *timer, - - next_tick = MAX (frequency - tick_duration, 0.0); - timer->priv->tick_timeout_id = 0; -- gdm_timer_queue_next_tick (timer, next_tick); -+ -+ if (timer->priv->is_started) { -+ gdm_timer_queue_next_tick (timer, next_tick); -+ } -+ g_object_unref (G_OBJECT (timer)); - } - - static gboolean -@@ -230,6 +237,8 @@ on_tick_timeout (GdmTimer *timer) - double current_time; - double elapsed_time; - -+ g_assert (GDM_IS_TIMER (timer)); -+ - current_time = get_current_time (); - elapsed_time = current_time - timer->priv->start_time; - progress = elapsed_time / timer->priv->duration; -@@ -244,15 +253,10 @@ on_tick_timeout (GdmTimer *timer) - } - - static void --gdm_timer_clear_timeout (GdmTimer *timer) --{ -- timer->priv->tick_timeout_id = 0; --} -- --static void - gdm_timer_queue_next_tick (GdmTimer *timer, - double when) - { -+ g_assert (GDM_IS_TIMER (timer)); - if (timer->priv->tick_timeout_id != 0) { - return; - } -@@ -266,14 +270,14 @@ gdm_timer_queue_next_tick (GdmTimer *timer, - (GSourceFunc) - on_tick_timeout, - timer, -- (GDestroyNotify) -- gdm_timer_clear_timeout); -+ NULL); - } - - static void - gdm_timer_set_is_started (GdmTimer *timer, - gboolean is_started) - { -+ g_assert (GDM_IS_TIMER (timer)); - timer->priv->is_started = is_started; - g_object_notify (G_OBJECT (timer), "is-started"); - } -@@ -310,7 +314,9 @@ gdm_timer_stop (GdmTimer *timer) - } - - gdm_timer_set_is_started (timer, FALSE); -+ g_object_ref (G_OBJECT (timer)); - g_signal_emit (G_OBJECT (timer), signals[STOP], 0); -+ g_object_unref (G_OBJECT (timer)); - } - - gboolean diff --git a/gdm.spec b/gdm.spec index 73ebf1a..f55acfa 100644 --- a/gdm.spec +++ b/gdm.spec @@ -15,13 +15,13 @@ Summary: The GNOME Display Manager Name: gdm -Version: 2.21.10 -Release: 0.2008.05.01.1%{?dist} +Version: 2.22.0 +Release: 1%{?dist} Epoch: 1 License: GPLv2+ Group: User Interface/X URL: http://download.gnome.org/sources/gdm -Source: http://ftp.gnome.org/pub/GNOME/sources/gdm/2.21/gdm-%{version}.tar.gz +Source: http://ftp.gnome.org/pub/GNOME/sources/gdm/2.22/gdm-%{version}.tar.gz Source1: gdm-pam Source2: gdm-autologin-pam Source3: gdmsetup-pam @@ -76,7 +76,6 @@ BuildRequires: gnome-panel-devel Requires: audit-libs >= %{libauditver} Patch1: xkb-groups.patch -Patch98: gdm-2.21.10-disable-debug-messages.patch Patch99: gdm-2.21.8-fedora-logo.patch %package user-switch-applet @@ -97,7 +96,6 @@ multiple simulanteous logged in users. %prep %setup -q %patch1 -p1 -b .xkb-groups -%patch98 -p1 -b .disable-debug-messages %patch99 -p1 -b .fedora-logo %build @@ -295,6 +293,10 @@ fi %{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml %changelog +* Thu May 1 2008 Jon McCann - 1:2.22.0-1 +- Update to 2.22.0 +- Fix restarting after system bus restart + * Thu May 1 2008 Ray Strode - 1:2.21.10-0.2008.05.01.1 - ConsoleKit fixes - Don't show session selector if only one session installed diff --git a/sources b/sources index f6c4f76..c8d4f5b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -eedfc8612ea2c24fda7db8770936ff2c gdm-2.21.10.tar.gz +a66ce7c64a33a1bc8a9e9c629b459d4f gdm-2.22.0.tar.gz