This commit is contained in:
Matthias Clasen 2008-12-04 15:00:05 +00:00
parent 82bbd34eeb
commit e52247b19d
12 changed files with 8 additions and 506 deletions

View File

@ -1 +1 @@
gdm-2.24.0.tar.bz2
gdm-2.25.1.tar.bz2

View File

@ -1,11 +0,0 @@
diff -up gdm-2.23.92/gui/simple-greeter/gdm-user.c.data-leak gdm-2.23.92/gui/simple-greeter/gdm-user.c
--- gdm-2.23.92/gui/simple-greeter/gdm-user.c.data-leak 2008-09-16 22:07:39.000000000 -0400
+++ gdm-2.23.92/gui/simple-greeter/gdm-user.c 2008-09-16 22:07:07.000000000 -0400
@@ -1093,6 +1093,7 @@ frame_pixbuf (GdkPixbuf *source)
cairo_to_pixbuf (data, dest);
cairo_destroy (cr);
+ g_free (data);
return dest;
}

View File

@ -1,39 +0,0 @@
--- gdm/gui/simple-greeter/gdm-languages.c (revision 6468)
+++ gdm/gui/simple-greeter/gdm-languages.c (working copy)
@@ -216,6 +216,25 @@ construct_language_name (const char *lan
return name;
}
+static void
+make_codeset_canonical_for_locale (const *name,
+ const char **codeset)
+{
+ char *old_locale;
+ char *canonical_codeset;
+
+ old_locale = setlocale (LC_CTYPE, name);
+
+ if (old_locale == NULL) {
+ return;
+ }
+
+ g_free (*codeset);
+ *codeset = g_strdup (nl_langinfo (CODESET));
+
+ setlocale (LC_CTYPE, old_locale);
+}
+
char *
gdm_normalize_language_name (const char *name)
{
@@ -234,6 +253,10 @@ gdm_normalize_language_name (const char
&territory_code,
&codeset, &modifier);
+ if (codeset != NULL) {
+ make_codeset_canonical_for_locale (name, &codeset);
+ }
+
normalized_name = construct_language_name (language_code,
territory_code,
codeset, modifier);

View File

@ -1,138 +0,0 @@
diff -up gdm-2.23.92/gui/simple-greeter/gdm-language-option-widget.c.filter-dupes-from-lang-list gdm-2.23.92/gui/simple-greeter/gdm-language-option-widget.c
--- gdm-2.23.92/gui/simple-greeter/gdm-language-option-widget.c.filter-dupes-from-lang-list 2008-08-26 15:04:00.000000000 -0400
+++ gdm-2.23.92/gui/simple-greeter/gdm-language-option-widget.c 2008-09-17 11:07:51.000000000 -0400
@@ -173,7 +173,7 @@ gdm_language_option_widget_class_init (G
g_type_class_add_private (klass, sizeof (GdmLanguageOptionWidgetPrivate));
}
-static gboolean
+static char *
gdm_language_option_widget_lookup_item (GdmRecentOptionWidget *widget,
const char *locale,
char **name,
@@ -182,11 +182,15 @@ gdm_language_option_widget_lookup_item (
char *language;
char *readable_language;
char *lang_tag;
+ char *normalized_locale;
- language = gdm_get_language_from_name (locale, locale);
+ normalized_locale = gdm_normalize_language_name (locale);
+
+ language = gdm_get_language_from_name (locale, normalized_locale);
if (language == NULL) {
- return FALSE;
+ g_free (normalized_locale);
+ return NULL;
}
readable_language = gdm_get_language_from_name (locale, NULL);
@@ -197,7 +201,7 @@ gdm_language_option_widget_lookup_item (
g_free (language);
g_free (lang_tag);
- return TRUE;
+ return normalized_locale;
}
static void
@@ -294,7 +298,7 @@ gdm_language_option_widget_set_current_l
if (normalized_language_name != NULL &&
!gdm_option_widget_lookup_item (GDM_OPTION_WIDGET (widget),
- normalized_language_name, NULL, NULL, NULL)) {
+ &normalized_language_name, NULL, NULL, NULL)) {
gdm_recent_option_widget_add_item (GDM_RECENT_OPTION_WIDGET (widget),
normalized_language_name);
}
diff -up gdm-2.23.92/gui/simple-greeter/gdm-layout-option-widget.c.filter-dupes-from-lang-list gdm-2.23.92/gui/simple-greeter/gdm-layout-option-widget.c
--- gdm-2.23.92/gui/simple-greeter/gdm-layout-option-widget.c.filter-dupes-from-lang-list 2008-09-17 10:55:20.000000000 -0400
+++ gdm-2.23.92/gui/simple-greeter/gdm-layout-option-widget.c 2008-09-17 11:08:07.000000000 -0400
@@ -176,24 +176,24 @@ gdm_layout_option_widget_class_init (Gdm
g_type_class_add_private (klass, sizeof (GdmLayoutOptionWidgetPrivate));
}
-static gboolean
+static char *
gdm_layout_option_widget_lookup_item (GdmRecentOptionWidget *widget,
- const char *id,
+ const char *key,
char **name,
char **comment)
{
char *layout;
- layout = gdm_get_layout_from_name (id);
+ layout = gdm_get_layout_from_name (key);
if (layout == NULL) {
- return FALSE;
+ return NULL;
}
*name = layout;
*comment = NULL;
- return TRUE;
+ return g_strdup (key);
}
static void
diff -up gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.c.filter-dupes-from-lang-list gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.c
--- gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.c.filter-dupes-from-lang-list 2008-08-26 15:04:00.000000000 -0400
+++ gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.c 2008-09-17 11:06:34.000000000 -0400
@@ -159,13 +159,24 @@ gdm_recent_option_widget_sync_items_from
default_is_set = FALSE;
for (tmp = list; tmp != NULL; tmp = tmp->next) {
- const char *id;
+ const char *key;
+ char *id;
char *name;
char *comment;
- id = (char *) tmp->data;
+ key = (char *) tmp->data;
+
+ id = widget->priv->lookup_item_func (widget, key, &name, &comment);
+
+ if (id != NULL) {
+ gboolean item_exists;
+
+ item_exists = gdm_option_widget_lookup_item (GDM_OPTION_WIDGET (widget), id, NULL, NULL, NULL);
+
+ if (item_exists) {
+ continue;
+ }
- if (widget->priv->lookup_item_func (widget, id, &name, &comment)) {
gdm_option_widget_add_item (GDM_OPTION_WIDGET (widget),
id, name, comment,
GDM_OPTION_WIDGET_POSITION_MIDDLE);
@@ -177,6 +188,7 @@ gdm_recent_option_widget_sync_items_from
g_free (name);
g_free (comment);
+ g_free (id);
}
}
diff -up gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.h.filter-dupes-from-lang-list gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.h
--- gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.h.filter-dupes-from-lang-list 2008-08-26 15:04:00.000000000 -0400
+++ gdm-2.23.92/gui/simple-greeter/gdm-recent-option-widget.h 2008-09-17 11:07:40.000000000 -0400
@@ -48,10 +48,10 @@ typedef struct
GdmOptionWidgetClass parent_class;
} GdmRecentOptionWidgetClass;
-typedef gboolean (* GdmRecentOptionLookupItemFunc) (GdmRecentOptionWidget *widget,
- const char *id,
- char **name,
- char **comment);
+typedef char * (* GdmRecentOptionLookupItemFunc) (GdmRecentOptionWidget *widget,
+ const char *key,
+ char **name,
+ char **comment);
GType gdm_recent_option_widget_get_type (void);

View File

@ -1,12 +0,0 @@
--- gdm-2.23.92/gui/simple-greeter/gdm-option-widget.c 2008-08-26 15:03:59.000000000 -0400
+++ foo/gui/simple-greeter/gdm-option-widget.c 2008-09-19 09:57:30.000000000 -0400
@@ -148,7 +148,8 @@
model = GTK_TREE_MODEL (widget->priv->list_store);
item_id = NULL;
- if (widget->priv->active_row == NULL) {
+ if (widget->priv->active_row == NULL ||
+ !gtk_tree_row_reference_valid (widget->priv->active_row)) {
return NULL;
}

View File

@ -1,127 +0,0 @@
diff -up gdm-2.24.0/gui/simple-greeter/gdm-greeter-panel.c.add-panel-slide gdm-2.24.0/gui/simple-greeter/gdm-greeter-panel.c
--- gdm-2.24.0/gui/simple-greeter/gdm-greeter-panel.c.add-panel-slide 2008-08-21 00:31:47.000000000 -0400
+++ gdm-2.24.0/gui/simple-greeter/gdm-greeter-panel.c 2008-09-30 23:02:34.000000000 -0400
@@ -20,6 +20,7 @@
#include "config.h"
+#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
@@ -40,6 +41,7 @@
#include "gdm-language-option-widget.h"
#include "gdm-layout-option-widget.h"
#include "gdm-session-option-widget.h"
+#include "gdm-timer.h"
#include "gdm-profile.h"
#include "na-tray.h"
@@ -59,6 +61,9 @@ struct GdmGreeterPanelPrivate
GtkWidget *layout_option_widget;
GtkWidget *session_option_widget;
+ GdmTimer *animation_timer;
+ double progress;
+
char *default_session_name;
char *default_language_name;
};
@@ -349,7 +354,7 @@ update_geometry (GdmGreeterPanel *panel,
panel->priv->geometry.height = requisition->height + 2 * GTK_CONTAINER (panel)->border_width;
panel->priv->geometry.x = geometry.x;
- panel->priv->geometry.y = geometry.y + geometry.height - panel->priv->geometry.height;
+ panel->priv->geometry.y = geometry.y + geometry.height - panel->priv->geometry.height + (1.0 - panel->priv->progress) * panel->priv->geometry.height;
#if 0
g_debug ("Setting geometry x:%d y:%d w:%d h:%d",
@@ -402,6 +407,39 @@ gdm_greeter_panel_real_size_request (Gtk
gdm_greeter_panel_move_resize_window (panel, position_changed, size_changed);
}
+static void
+gdm_greeter_panel_real_show (GtkWidget *widget)
+{
+ GdmGreeterPanel *panel;
+ GtkSettings *settings;
+ gboolean animations_are_enabled;
+
+ settings = gtk_settings_get_for_screen (gtk_widget_get_screen (widget));
+ g_object_get (settings, "gtk-enable-animations", &animations_are_enabled, NULL);
+
+ panel = GDM_GREETER_PANEL (widget);
+
+ if (animations_are_enabled) {
+ gdm_timer_start (panel->priv->animation_timer, 1.0);
+ } else {
+ panel->priv->progress = 1.0;
+ }
+
+ GTK_WIDGET_CLASS (gdm_greeter_panel_parent_class)->show (widget);
+}
+
+static void
+gdm_greeter_panel_real_hide (GtkWidget *widget)
+{
+ GdmGreeterPanel *panel;
+
+ panel = GDM_GREETER_PANEL (widget);
+
+ gdm_timer_stop (panel->priv->animation_timer);
+ panel->priv->progress = 0.0;
+
+ GTK_WIDGET_CLASS (gdm_greeter_panel_parent_class)->hide (widget);
+}
static void
gdm_greeter_panel_class_init (GdmGreeterPanelClass *klass)
@@ -418,6 +456,9 @@ gdm_greeter_panel_class_init (GdmGreeter
widget_class->realize = gdm_greeter_panel_real_realize;
widget_class->unrealize = gdm_greeter_panel_real_unrealize;
widget_class->size_request = gdm_greeter_panel_real_size_request;
+ widget_class->show = gdm_greeter_panel_real_show;
+ widget_class->hide = gdm_greeter_panel_real_hide;
+
signals[LANGUAGE_SELECTED] =
g_signal_new ("language-selected",
G_TYPE_FROM_CLASS (object_class),
@@ -521,6 +562,15 @@ on_session_activated (GdmSessionOptionWi
}
static void
+on_animation_tick (GdmGreeterPanel *panel,
+ double progress)
+{
+ panel->priv->progress = progress * log ((G_E - 1.0) * progress + 1.0);
+
+ gtk_widget_queue_resize (GTK_WIDGET (panel));
+}
+
+static void
gdm_greeter_panel_init (GdmGreeterPanel *panel)
{
NaTray *tray;
@@ -605,6 +655,13 @@ gdm_greeter_panel_init (GdmGreeterPanel
gdm_greeter_panel_hide_user_options (panel);
+ panel->priv->progress = 0.0;
+ panel->priv->animation_timer = gdm_timer_new ();
+ g_signal_connect_swapped (panel->priv->animation_timer,
+ "tick",
+ G_CALLBACK (on_animation_tick),
+ panel);
+
gdm_profile_end (NULL);
}
@@ -620,6 +677,8 @@ gdm_greeter_panel_finalize (GObject *obj
g_return_if_fail (greeter_panel->priv != NULL);
+ g_signal_handlers_disconnect_by_func (object, on_animation_tick, greeter_panel);
+
G_OBJECT_CLASS (gdm_greeter_panel_parent_class)->finalize (object);
}

View File

@ -1,104 +0,0 @@
diff -up gdm-2.24.0/gui/simple-greeter/gdm-user-chooser-widget.c.fix-icon-scale gdm-2.24.0/gui/simple-greeter/gdm-user-chooser-widget.c
--- gdm-2.24.0/gui/simple-greeter/gdm-user-chooser-widget.c.fix-icon-scale 2008-09-22 13:01:21.000000000 -0400
+++ gdm-2.24.0/gui/simple-greeter/gdm-user-chooser-widget.c 2008-09-30 17:31:00.000000000 -0400
@@ -51,7 +51,7 @@ enum {
#define GDM_USER_CHOOSER_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_USER_CHOOSER_WIDGET, GdmUserChooserWidgetPrivate))
-#define ICON_SIZE 96
+#define MAX_ICON_SIZE 128
struct GdmUserChooserWidgetPrivate
{
@@ -83,6 +83,45 @@ static void gdm_user_chooser_widget_
G_DEFINE_TYPE (GdmUserChooserWidget, gdm_user_chooser_widget, GDM_TYPE_CHOOSER_WIDGET)
+static int
+get_font_height_for_widget (GtkWidget *widget)
+{
+ PangoFontMetrics *metrics;
+ PangoContext *context;
+ int ascent;
+ int descent;
+ int height;
+
+ gtk_widget_ensure_style (widget);
+ context = gtk_widget_get_pango_context (widget);
+ metrics = pango_context_get_metrics (context,
+ widget->style->font_desc,
+ pango_context_get_language (context));
+
+ ascent = pango_font_metrics_get_ascent (metrics);
+ descent = pango_font_metrics_get_descent (metrics);
+ height = PANGO_PIXELS (ascent + descent);
+ pango_font_metrics_unref (metrics);
+ return height;
+}
+
+static int
+get_icon_height_for_widget (GtkWidget *widget)
+{
+ int font_height;
+ int height;
+
+ font_height = get_font_height_for_widget (widget);
+ height = 3 * font_height;
+ if (height > MAX_ICON_SIZE) {
+ height = MAX_ICON_SIZE;
+ }
+
+ g_debug ("GdmUserChooserWidget: font height %d; using icon size %d", font_height, height);
+
+ return height;
+}
+
static void
add_user_other (GdmUserChooserWidget *widget)
{
@@ -295,12 +334,14 @@ add_user (GdmUserChooserWidget *widget,
GdkPixbuf *pixbuf;
char *tooltip;
gboolean is_logged_in;
+ int size;
if (!widget->priv->show_normal_users) {
return;
}
- pixbuf = gdm_user_render_icon (user, ICON_SIZE);
+ size = get_icon_height_for_widget (widget);
+ pixbuf = gdm_user_render_icon (user, size);
if (pixbuf == NULL && widget->priv->stock_person_pixbuf != NULL) {
pixbuf = g_object_ref (widget->priv->stock_person_pixbuf);
}
@@ -537,10 +578,13 @@ static GdkPixbuf *
get_stock_person_pixbuf (GdmUserChooserWidget *widget)
{
GdkPixbuf *pixbuf;
+ int size;
+
+ size = get_icon_height_for_widget (widget);
pixbuf = gtk_icon_theme_load_icon (widget->priv->icon_theme,
DEFAULT_USER_ICON,
- ICON_SIZE,
+ size,
0,
NULL);
@@ -551,10 +595,13 @@ static GdkPixbuf *
get_logged_in_pixbuf (GdmUserChooserWidget *widget)
{
GdkPixbuf *pixbuf;
+ int size;
+
+ size = get_icon_height_for_widget (widget);
pixbuf = gtk_icon_theme_load_icon (widget->priv->icon_theme,
"emblem-default",
- ICON_SIZE / 3,
+ size / 3,
0,
NULL);

View File

@ -1,16 +0,0 @@
diff -up gdm-2.24.0/gui/user-switch-applet/GNOME_FastUserSwitchApplet.xml.no-help gdm-2.24.0/gui/user-switch-applet/GNOME_FastUserSwitchApplet.xml
--- gdm-2.24.0/gui/user-switch-applet/GNOME_FastUserSwitchApplet.xml.no-help 2008-10-03 00:33:07.000000000 -0400
+++ gdm-2.24.0/gui/user-switch-applet/GNOME_FastUserSwitchApplet.xml 2008-10-03 00:33:37.000000000 -0400
@@ -12,12 +12,6 @@
<separator
name="GdmSeparator"/>
<menuitem
- name="Help Item"
- verb="GdmHelp"
- _label="_Help"
- pixtype="stock"
- pixname="gtk-help"/>
- <menuitem
name="About Item"
verb="GdmAbout"
_label="_About"

View File

@ -15,13 +15,13 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 2.24.0
Release: 11%{?dist}
Version: 2.25.1
Release: 1%{?dist}
Epoch: 1
License: GPLv2+
Group: User Interface/X
URL: http://download.gnome.org/sources/gdm
Source: http://download.gnome.org/sources/gdm/2.24/gdm-%{version}.tar.bz2
Source: http://download.gnome.org/sources/gdm/2.25/gdm-%{version}.tar.bz2
Source1: gdm-pam
Source2: gdm-autologin-pam
Source3: gdmsetup-pam
@ -82,23 +82,6 @@ Requires: audit-libs >= %{libauditver}
Patch1: xkb-groups.patch
Patch2: gdm-2.24.0-force-active-vt.patch
Patch3: gdm-2.23.92-save-root-window.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=552578
Patch4: username-leak.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=552578
Patch5: data-leak.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=552578
Patch6: ssid-leak.patch
Patch7: gdm-2.23.92-filter-dupes-from-lang-list.patch
Patch8: gdm-2.23.92-another-locale-fixup.patch
Patch9: gdm-2.23.92-fix-crash.patch
# Fix pulled from upstream
Patch10: gdm-2.24.0-fix-icon-scale.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=554523
Patch11: gdm-2.24.0-add-panel-slide.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=465121
Patch12: gdm-user-switcher-no-help.patch
# uses /etc/sysconfig/keyboard and is thus not directly upstreamable
# should probably be changed to get the system layout from the X server
@ -127,15 +110,6 @@ multiple simulanteous logged in users.
%patch1 -p1 -b .xkb-groups
%patch2 -p1 -b .force-active-vt
%patch3 -p1 -b .save-root-window
%patch4 -p1 -b .username-leak
%patch5 -p1 -b .data-leak
%patch6 -p1 -b .ssid-leak
%patch7 -p1 -b .filter-dupes-from-lang-list
%patch8 -p1 -b .another-locale-fixup
%patch9 -p1 -b .fix-crash
%patch10 -p1 -b .fix-icon-scale
%patch11 -p1 -b .add-panel-slide
%patch12 -p1 -b .no-help
%patch13 -p1 -b .system-keyboard
%patch99 -p1 -b .fedora-logo
@ -352,6 +326,9 @@ fi
%{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml
%changelog
* Thu Dec 4 2008 Matthias Clasen <mclasen@redhat.com> - 1:2.25.1-1
- Update to 2.25.1
* Mon Oct 20 2008 Matthias Clasen <mclasen@redhat.com> - 1:2.24.0-11
- Respect system keyboard setting

View File

@ -1 +1 @@
c38e3debe8a02ad385f1c7077d21de9e gdm-2.24.0.tar.bz2
d3d2420510f238fd38815efecb80ed72 gdm-2.25.1.tar.bz2

View File

@ -1,11 +0,0 @@
diff -up gdm-2.23.92/gui/simple-greeter/gdm-user-manager.c.ssid-leak gdm-2.23.92/gui/simple-greeter/gdm-user-manager.c
--- gdm-2.23.92/gui/simple-greeter/gdm-user-manager.c.ssid-leak 2008-09-16 22:15:20.000000000 -0400
+++ gdm-2.23.92/gui/simple-greeter/gdm-user-manager.c 2008-09-16 22:16:02.000000000 -0400
@@ -667,6 +667,7 @@ add_sessions_for_user (GdmUserManager *m
maybe_add_session_for_user (manager, user, ssid);
}
+ g_ptr_array_foreach (sessions, (GFunc)g_free, NULL);
g_ptr_array_free (sessions, TRUE);
out:

View File

@ -1,17 +0,0 @@
diff -up gdm-2.23.92/gui/simple-greeter/gdm-user-manager.c.username-leak gdm-2.23.92/gui/simple-greeter/gdm-user-manager.c
--- gdm-2.23.92/gui/simple-greeter/gdm-user-manager.c.username-leak 2008-09-16 22:00:14.000000000 -0400
+++ gdm-2.23.92/gui/simple-greeter/gdm-user-manager.c 2008-09-16 22:00:36.000000000 -0400
@@ -1147,11 +1147,13 @@ process_ck_history_line (GdmUserManager
user = gdm_user_manager_get_user (manager, username);
if (user == NULL) {
g_debug ("GdmUserManager: unable to lookup user '%s'", username);
+ g_free (username);
return;
}
g_object_set (user, "login-frequency", frequency, NULL);
g_signal_emit (manager, signals [USER_LOGIN_FREQUENCY_CHANGED], 0, user);
+ g_free (username);
}
static gboolean