SHA256
1
0
forked from pool/gdm
OBS User unknown 2008-11-07 14:08:15 +00:00 committed by Git OBS Bridge
parent f6ce548f53
commit 05add83ce4
3 changed files with 137 additions and 20 deletions

105
gdm-fix-icon-scale.patch Normal file
View File

@ -0,0 +1,105 @@
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,3 +1,9 @@
-------------------------------------------------------------------
Thu Nov 6 20:34:54 CET 2008 - vuntz@novell.com
- Add gdm-fix-icon-scale.patch: make icons in the greeter use a
reasonable size. Part of bnc#436431.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Nov 4 04:12:03 EST 2008 - jpr@novell.com Tue Nov 4 04:12:03 EST 2008 - jpr@novell.com

View File

@ -57,7 +57,7 @@ PreReq: %insserv_prereq
License: GPL v2 or later License: GPL v2 or later
Group: System/GUI/GNOME Group: System/GUI/GNOME
Version: 2.24.0 Version: 2.24.0
Release: 5 Release: 6
Summary: The GNOME 2.x Display Manager Summary: The GNOME 2.x Display Manager
Source: %{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2
Source1: gdm.pamd Source1: gdm.pamd
@ -81,6 +81,8 @@ Patch9: gdm-2.23.92-another-locale-fixup.patch
Patch10: gdm-2.23.92-filter-dupes-from-lang-list.patch Patch10: gdm-2.23.92-filter-dupes-from-lang-list.patch
# PATCH-FIX-UPSTREAM gdm-2.23.92-fix-crash.patch jpr@novell.com -- From upstream/Fedora, don't crash in the option widgets # PATCH-FIX-UPSTREAM gdm-2.23.92-fix-crash.patch jpr@novell.com -- From upstream/Fedora, don't crash in the option widgets
Patch11: gdm-2.23.92-fix-crash.patch Patch11: gdm-2.23.92-fix-crash.patch
# PATCH-FIX-UPSTREAM gdm-fix-icon-scale.patch vuntz@novell.com -- From upstream/Fedora: don't have a huge size for icons in the greeter
Patch12: gdm-fix-icon-scale.patch
Patch28: gdm-X_SERVER.patch Patch28: gdm-X_SERVER.patch
# PATCH-SUSE: enable SELinux # PATCH-SUSE: enable SELinux
Patch60: gdm-selinux.patch Patch60: gdm-selinux.patch
@ -154,6 +156,7 @@ Authors:
%patch9 -p1 %patch9 -p1
%patch10 -p1 %patch10 -p1
%patch11 -p1 %patch11 -p1
%patch12 -p1
%patch28 %patch28
%patch60 %patch60
@ -261,6 +264,9 @@ fi
%files lang -f %{name}.lang %files lang -f %{name}.lang
%changelog %changelog
* Thu Nov 06 2008 vuntz@novell.com
- Add gdm-fix-icon-scale.patch: make icons in the greeter use a
reasonable size. Part of bnc#436431.
* Tue Nov 04 2008 jpr@novell.com * Tue Nov 04 2008 jpr@novell.com
- Add requires for ConsoleKit-x11, gnome-session - Add requires for ConsoleKit-x11, gnome-session
(bnc#441105, bnc#428294) (bnc#441105, bnc#428294)
@ -467,7 +473,7 @@ fi
displays. displays.
+ Build/configure fixes for Solaris. + Build/configure fixes for Solaris.
+ Translation updates. + Translation updates.
* Tue Nov 13 2007 hpj@suse.de * Wed Nov 14 2007 hpj@suse.de
- Removed second --with-atspi-dir from configure. - Removed second --with-atspi-dir from configure.
- Added gdm-tab-triggers-enter.patch, which fixes Novell bug - Added gdm-tab-triggers-enter.patch, which fixes Novell bug
[#334446]. [#334446].
@ -476,7 +482,7 @@ fi
(#337428) (#337428)
- Updated gdm-xdm-sessions.patch to run again the /etc/X11/xdm - Updated gdm-xdm-sessions.patch to run again the /etc/X11/xdm
scripts (#304399) scripts (#304399)
* Thu Nov 08 2007 hpj@suse.de * Fri Nov 09 2007 hpj@suse.de
- Pass the --with-atspi-dir= flag to configure so the - Pass the --with-atspi-dir= flag to configure so the
at-spi-registryd is started correctly. Fixes Novell bug #337428. at-spi-registryd is started correctly. Fixes Novell bug #337428.
* Thu Oct 18 2007 maw@suse.de * Thu Oct 18 2007 maw@suse.de
@ -484,7 +490,7 @@ fi
- Add abuild.patch. - Add abuild.patch.
* Thu Oct 11 2007 sbrabec@suse.cz * Thu Oct 11 2007 sbrabec@suse.cz
- Removed bogus dependency on mDNSResponder. - Removed bogus dependency on mDNSResponder.
* Sun Sep 23 2007 hpj@suse.de * Mon Sep 24 2007 hpj@suse.de
- Added gdm-2.20.0-wait-for-restart.patch, which fixes Novell bug - Added gdm-2.20.0-wait-for-restart.patch, which fixes Novell bug
[#326281]. [#326281].
* Thu Sep 20 2007 banderso@suse.de * Thu Sep 20 2007 banderso@suse.de
@ -594,7 +600,7 @@ fi
* Sat Aug 04 2007 maw@suse.de * Sat Aug 04 2007 maw@suse.de
- Use %%fdupes - Use %%fdupes
- Uncomment out the rm in %%clean. - Uncomment out the rm in %%clean.
* Fri Aug 03 2007 hpj@suse.de * Sat Aug 04 2007 hpj@suse.de
- Update to version 2.19.5. - Update to version 2.19.5.
- Fix up gdm-conf.patch. - Fix up gdm-conf.patch.
- Fix up gdm-2.19.3-reset-pam.patch. - Fix up gdm-2.19.3-reset-pam.patch.
@ -674,7 +680,7 @@ fi
* Wed Mar 21 2007 hpj@suse.de * Wed Mar 21 2007 hpj@suse.de
- Add gdm-2.17.7-vt-fallback.patch. This is a port of the fix for - Add gdm-2.17.7-vt-fallback.patch. This is a port of the fix for
https://bugzilla.novell.com/show_bug.cgi?id=206804 https://bugzilla.novell.com/show_bug.cgi?id=206804
* Tue Mar 13 2007 maw@suse.de * Wed Mar 14 2007 maw@suse.de
- Update to version 2.17.7 - Update to version 2.17.7
- Removeupstreamed gdm-autobuild-warning.patch, - Removeupstreamed gdm-autobuild-warning.patch,
gdm-bufferoverrun.patch gdm-bufferoverrun.patch
@ -682,10 +688,10 @@ fi
[#400698], #399486, #352263, #395790, #394421. [#400698], #399486, #352263, #395790, #394421.
* Fri Mar 02 2007 sbrabec@suse.cz * Fri Mar 02 2007 sbrabec@suse.cz
- Do not own /usr/share/xsessions (#229172). - Do not own /usr/share/xsessions (#229172).
* Mon Feb 26 2007 hpj@suse.de * Tue Feb 27 2007 hpj@suse.de
- Added gdm-2.13.0.4-audit-login.patch, which fixes Novell bug - Added gdm-2.13.0.4-audit-login.patch, which fixes Novell bug
[#234133] (GDM cannot log authentication attempts). [#234133] (GDM cannot log authentication attempts).
* Tue Feb 13 2007 hpj@suse.de * Wed Feb 14 2007 hpj@suse.de
- Add gdm-trunk-string-literal-cmp.patch. Fixes #233655. - Add gdm-trunk-string-literal-cmp.patch. Fixes #233655.
* Mon Feb 12 2007 sbrabec@suse.cz * Mon Feb 12 2007 sbrabec@suse.cz
- Fixed reversed interpretation of - Fixed reversed interpretation of
@ -852,7 +858,7 @@ fi
- Update domain entry patch to default to the currently joined - Update domain entry patch to default to the currently joined
Active Directory domain if there was no stored preference. Fixes Active Directory domain if there was no stored preference. Fixes
Novell bug #167344. Novell bug #167344.
* Wed May 31 2006 hpj@suse.de * Thu Jun 01 2006 hpj@suse.de
- Don't let any user configure GDM from the login screen if a - Don't let any user configure GDM from the login screen if a
theme with user list is in effect. Fixes Novell bug #180219. theme with user list is in effect. Fixes Novell bug #180219.
* Wed May 31 2006 dreveman@suse.de * Wed May 31 2006 dreveman@suse.de
@ -862,7 +868,7 @@ fi
- Do not display Japanese string in terminal, which doesn't support - Do not display Japanese string in terminal, which doesn't support
it (#168736). it (#168736).
- Disabled beep on start (#174786). - Disabled beep on start (#174786).
* Thu May 18 2006 hpj@suse.de * Fri May 19 2006 hpj@suse.de
- Made GDM use the more graphically intensive, but prettier, - Made GDM use the more graphically intensive, but prettier,
gdmgreeter for remote logins. Fixes Novell bug #176661. gdmgreeter for remote logins. Fixes Novell bug #176661.
* Tue May 16 2006 sbrabec@suse.cz * Tue May 16 2006 sbrabec@suse.cz
@ -872,7 +878,7 @@ fi
* Fri May 12 2006 sbrabec@suse.cz * Fri May 12 2006 sbrabec@suse.cz
- Store value of PERMISSION_SECURITY by SuSEconfig in - Store value of PERMISSION_SECURITY by SuSEconfig in
gdm_sysconfig.conf (169639#c20). gdm_sysconfig.conf (169639#c20).
* Mon May 08 2006 hpj@suse.de * Tue May 09 2006 hpj@suse.de
- Made GDM use the "gdm" group instead of shadow. Fixes Novell bug - Made GDM use the "gdm" group instead of shadow. Fixes Novell bug
[#119651]. [#119651].
- Made use of the tab key work like pressing enter if there is no - Made use of the tab key work like pressing enter if there is no
@ -900,7 +906,7 @@ fi
service, bug #158786. service, bug #158786.
* Sat Mar 11 2006 coolo@suse.de * Sat Mar 11 2006 coolo@suse.de
- fix the only-show-in-gnome patch to patch the .desktop.in - fix the only-show-in-gnome patch to patch the .desktop.in
* Mon Mar 06 2006 federico@novell.com * Tue Mar 07 2006 federico@novell.com
- Fix installation of the earlygdm service; we were not calling - Fix installation of the earlygdm service; we were not calling
fillup_and_insserv with "displaymanager" for the configuration fillup_and_insserv with "displaymanager" for the configuration
filename. filename.
@ -909,7 +915,7 @@ fi
in PLUS (148468#c17). in PLUS (148468#c17).
* Tue Feb 28 2006 sbrabec@suse.cz * Tue Feb 28 2006 sbrabec@suse.cz
- Use kdelibs3-doc in BuildRequires for meinproc (#153635#c14). - Use kdelibs3-doc in BuildRequires for meinproc (#153635#c14).
* Fri Feb 24 2006 hpj@suse.de * Sat Feb 25 2006 hpj@suse.de
- Add patch to fix tab keynav. - Add patch to fix tab keynav.
* Fri Feb 17 2006 sreeves@suse.de * Fri Feb 17 2006 sreeves@suse.de
- Update .desktop file (Name, GenericName, Comment, DocPath) - Update .desktop file (Name, GenericName, Comment, DocPath)
@ -937,10 +943,10 @@ fi
- Added patch to require root auth to halt or reboot. - Added patch to require root auth to halt or reboot.
* Wed Jan 25 2006 mls@suse.de * Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires - converted neededforbuild to BuildRequires
* Wed Jan 18 2006 hpj@suse.de * Thu Jan 19 2006 hpj@suse.de
- Updated the domain logon patch with numerous new features and - Updated the domain logon patch with numerous new features and
cosmetic fixes. cosmetic fixes.
* Mon Jan 16 2006 hpj@suse.de * Tue Jan 17 2006 hpj@suse.de
- Fixed a bug in logon code that prevented domain logons from - Fixed a bug in logon code that prevented domain logons from
working. Updated domain logon patch. working. Updated domain logon patch.
* Fri Jan 13 2006 schwab@suse.de * Fri Jan 13 2006 schwab@suse.de
@ -960,7 +966,7 @@ fi
- Patch from upstream b.g.o (#152906) - Patch from upstream b.g.o (#152906)
* Mon Oct 17 2005 gekker@suse.de * Mon Oct 17 2005 gekker@suse.de
- Make gdm.conf %%config(noreplace) - Make gdm.conf %%config(noreplace)
* Thu Oct 13 2005 hpj@suse.de * Fri Oct 14 2005 hpj@suse.de
- Updated xauthority-across-hostname-changes patch to use - Updated xauthority-across-hostname-changes patch to use
XAUTHLOCALHOSTNAME environment variable. XAUTHLOCALHOSTNAME environment variable.
* Thu Oct 13 2005 gekker@suse.de * Thu Oct 13 2005 gekker@suse.de
@ -979,7 +985,7 @@ fi
- Update to version 2.8.0.3 - Update to version 2.8.0.3
- Remove upstreamed autologin patch - Remove upstreamed autologin patch
- Now installs .desktop files in correct location no need to move - Now installs .desktop files in correct location no need to move
* Fri Aug 19 2005 hpj@suse.de * Sat Aug 20 2005 hpj@suse.de
- Make the default session option work on autologin; we now get GNOME. - Make the default session option work on autologin; we now get GNOME.
* Tue Aug 16 2005 sbrabec@suse.cz * Tue Aug 16 2005 sbrabec@suse.cz
- Use gnome-screensaver instead of xscreensaver. - Use gnome-screensaver instead of xscreensaver.
@ -990,7 +996,7 @@ fi
* Thu Aug 11 2005 gekker@suse.de * Thu Aug 11 2005 gekker@suse.de
- Update to version 2.8.0.2 - Update to version 2.8.0.2
- Make 64bit clean - Make 64bit clean
* Sat Jul 30 2005 jpr@suse.de * Sun Jul 31 2005 jpr@suse.de
- turn on compatibility symlink for all products - turn on compatibility symlink for all products
* Tue Jul 05 2005 gekker@suse.de * Tue Jul 05 2005 gekker@suse.de
- Update to version 2.8.0.1 - Update to version 2.8.0.1
@ -1115,7 +1121,7 @@ fi
- updated to version 2.4.1.6 - updated to version 2.4.1.6
* Mon Jul 28 2003 kukuk@suse.de * Mon Jul 28 2003 kukuk@suse.de
- Make sure /var/lib/gdm has correct permissions - Make sure /var/lib/gdm has correct permissions
* Thu Jul 24 2003 hhetter@suse.de * Fri Jul 25 2003 hhetter@suse.de
- move capplets to correct position - move capplets to correct position
- fix build - fix build
* Wed Jul 16 2003 sbrabec@suse.cz * Wed Jul 16 2003 sbrabec@suse.cz
@ -1152,7 +1158,7 @@ fi
- updated to 2.4.1.3 [GNOME 2.2.0] - updated to 2.4.1.3 [GNOME 2.2.0]
* Fri Feb 07 2003 kukuk@suse.de * Fri Feb 07 2003 kukuk@suse.de
- Use pam_unix2.so instead of pam_unix.so - Use pam_unix2.so instead of pam_unix.so
* Wed Jan 15 2003 ro@suse.de * Thu Jan 16 2003 ro@suse.de
- use gtk2-devel-packages and libjpeg in neededforbuild - use gtk2-devel-packages and libjpeg in neededforbuild
* Tue Jan 07 2003 sbrabec@suse.cz * Tue Jan 07 2003 sbrabec@suse.cz
- Update to version 2.4.1.0. - Update to version 2.4.1.0.