rpms/gdm/F-9 gdm-2.22.0-fedora-logo.patch, NONE, 1.1 gdm-2.22.0-fix-homedir-crash.patch, NONE, 1.1 gdm-2.22.0-fix-icon-scale.patch, NONE, 1.1 gdm.spec, 1.391, 1.392 gdm-2.21.8-fedora-logo.patch, 1.2, NONE

Ray Strode rstrode at fedoraproject.org
Mon Sep 29 14:44:17 UTC 2008


Author: rstrode

Update of /cvs/pkgs/rpms/gdm/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14596

Modified Files:
	gdm.spec 
Added Files:
	gdm-2.22.0-fedora-logo.patch 
	gdm-2.22.0-fix-homedir-crash.patch 
	gdm-2.22.0-fix-icon-scale.patch 
Removed Files:
	gdm-2.21.8-fedora-logo.patch 
Log Message:
- Add patch from Danny Baumann/Avi Kivity to fix crasher when
  homedir is on unknown filesystem (bug 449987)
- Make icon scale with font size (patch from upstream)
- update logo patch to use some new gconf paths


gdm-2.22.0-fedora-logo.patch:

--- NEW FILE gdm-2.22.0-fedora-logo.patch ---
diff -up gdm-2.22.0/gui/simple-greeter/gdm-simple-greeter.schemas.in.fedora-logo gdm-2.22.0/gui/simple-greeter/gdm-simple-greeter.schemas.in
--- gdm-2.22.0/gui/simple-greeter/gdm-simple-greeter.schemas.in.fedora-logo	2008-05-01 18:35:35.000000000 -0400
+++ gdm-2.22.0/gui/simple-greeter/gdm-simple-greeter.schemas.in	2008-09-29 10:41:47.000000000 -0400
@@ -39,7 +39,7 @@
       <applyto>/apps/gdm/simple-greeter/logo_icon_name</applyto>
       <owner>gdm-simple-greeter</owner>
       <type>string</type>
-      <default>computer</default>
+      <default>start-here</default>
       <locale name="C">
         <short>Icon name to use for greeter logo</short>
         <long>Set to the themed icon name to use for the greeter logo.</long>

gdm-2.22.0-fix-homedir-crash.patch:

--- NEW FILE gdm-2.22.0-fix-homedir-crash.patch ---
--- gdm/gui/simple-greeter/gdm-user.c.orig  2008-06-04 17:56:57.000000000 +0200
+++ gdm/gui/simple-greeter/gdm-user.c       2008-06-04 18:00:05.000000000 +0200
@@ -750,7 +750,8 @@
                 }
                 filesystem_type = g_file_info_get_attribute_string (file_info,
                                                                     G_FILE_ATTRIBUTE_FILESYSTEM_TYPE);
-                is_local = ((strcmp (filesystem_type, "nfs") != 0) &&
+                is_local = ((filesystem_type != NULL) &&
+                           (strcmp (filesystem_type, "nfs") != 0) &&
                             (strcmp (filesystem_type, "afs") != 0) &&
                             (strcmp (filesystem_type, "autofs") != 0) &&
                             (strcmp (filesystem_type, "unknown") != 0) &&


gdm-2.22.0-fix-icon-scale.patch:

--- NEW FILE gdm-2.22.0-fix-icon-scale.patch ---
diff -up gdm-2.22.0/gui/simple-greeter/gdm-user-chooser-widget.c.fix-icon-scale gdm-2.22.0/gui/simple-greeter/gdm-user-chooser-widget.c
--- gdm-2.22.0/gui/simple-greeter/gdm-user-chooser-widget.c.fix-icon-scale	2008-05-01 18:35:35.000000000 -0400
+++ gdm-2.22.0/gui/simple-greeter/gdm-user-chooser-widget.c	2008-09-29 10:36:44.000000000 -0400
@@ -46,7 +46,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 64
+#define MAX_ICON_SIZE 128
 
 struct GdmUserChooserWidgetPrivate
 {
@@ -71,6 +71,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)
 {
@@ -287,10 +326,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);
 
@@ -301,10 +343,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);
 
@@ -402,8 +447,11 @@ on_user_added (GdmUserManager       *man
         GdkPixbuf    *pixbuf;
         char         *tooltip;
         gboolean      is_logged_in;
+        int           size;
+
+        size = get_icon_height_for_widget (widget);
+        pixbuf = gdm_user_render_icon (user, size);
 
-        pixbuf = gdm_user_render_icon (user, ICON_SIZE);
         if (pixbuf == NULL && widget->priv->stock_person_pixbuf != NULL) {
                 pixbuf = g_object_ref (widget->priv->stock_person_pixbuf);
         }


Index: gdm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdm/F-9/gdm.spec,v
retrieving revision 1.391
retrieving revision 1.392
diff -u -r1.391 -r1.392
--- gdm.spec	23 Sep 2008 18:27:06 -0000	1.391
+++ gdm.spec	29 Sep 2008 14:43:46 -0000	1.392
@@ -16,7 +16,7 @@
 Summary: The GNOME Display Manager
 Name: gdm
 Version: 2.22.0
-Release: 9%{?dist}
+Release: 10%{?dist}
 Epoch: 1
 License: GPLv2+
 Group: User Interface/X
@@ -88,7 +88,14 @@
 Patch7: gdm-2.22.0-fix-auto-login.patch
 # https://bugzilla.redhat.com/show_bug.cgi?id=446224
 Patch8: gdm-2.22.0-fix-xdmcp.patch
-Patch99: gdm-2.21.8-fedora-logo.patch
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=449987
+Patch9: gdm-2.22.0-fix-homedir-crash.patch
+
+# Fix pulled from upstream, no bug number
+Patch10: gdm-2.22.0-fix-icon-scale.patch
+
+Patch99: gdm-2.22.0-fedora-logo.patch
 
 %package user-switch-applet
 Summary:   GDM User Switcher Panel Applet
@@ -115,6 +122,8 @@
 %patch6 -p1 -b .enable-tcp
 %patch7 -p1 -b .fix-auto-login
 %patch8 -p1 -b .fix-xdmcp
+%patch9 -p1 -b .fix-homedir-crash
+%patch10 -p1 -b .fix-icon-scale
 %patch99 -p1 -b .fedora-logo
 
 %build
@@ -280,7 +289,6 @@
 %{_libexecdir}/gdm-product-slave
 %{_libexecdir}/gdm-session-worker
 %{_libexecdir}/gdm-simple-chooser
-%{_libexecdir}/gdm-simple-greeter
 %{_libexecdir}/gdm-simple-slave
 %{_libexecdir}/gdm-xdmcp-chooser-slave
 %{_sbindir}/gdm
@@ -312,6 +320,12 @@
 %{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml
 
 %changelog
+* Mon Sep 29 2008 Ray Strode <rstrode at redhat.com> - 1:2.22.0-10
+- Add patch from Danny Baumann/Avi Kivity to fix crasher when
+  homedir is on unknown filesystem (bug 449987)
+- Make icon scale with font size (patch from upstream)
+- update logo patch to use some new gconf paths
+
 * Tue Sep 23 2008 Lubomir Rintel <lkundrak at v3.sk> - 1:2.22.0-9
 - Fix XDMCP, thanks to Michael Young (bug 446224)
 


--- gdm-2.21.8-fedora-logo.patch DELETED ---




More information about the fedora-extras-commits mailing list