diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | daemon/gdm.c | 2 | ||||
-rw-r--r-- | docs/C/gdm.xml | 14 | ||||
-rw-r--r-- | gui/greeter/greeter_item.c | 5 | ||||
-rw-r--r-- | gui/greeter/greeter_item.h | 4 | ||||
-rw-r--r-- | gui/greeter/greeter_parser.c | 19 |
7 files changed, 61 insertions, 2 deletions
@@ -1,5 +1,14 @@ 2006-03-20 Brian Cameron <brian.cameron@sun.com> + * configure.ac, gui/greeter/greeter_item.[ch], + gui/greeter/greeter_parser.c, docs/C/gdm.xml: Add + min-screen-height tag to parser so that certain + elements in the theme will only display if the + screen is large enough. Patch by Ray Strode. + <rstrode@redhat.com>. Enhancement #420610. + +2006-03-20 Brian Cameron <brian.cameron@sun.com> + * gui/gdmphotosetup.desktop.in: Add NotShowIn=GNOME; to gdmphotosetup.desktop.in since the About-Me capplet is used for configuring the user's face image in GNOME. diff --git a/configure.ac b/configure.ac index 797b8468..28223d3c 100644 --- a/configure.ac +++ b/configure.ac @@ -321,6 +321,16 @@ fi dnl borrowed from gnu findutils dnl and relicensed as LGPL by the FSF +AC_ARG_WITH(prefetch, + [ --with-prefetch=[yes/no] Install GDM library prefetch utility [default=no]],, + with_prefetch=no) + +if test x$with_prefetch != xno ; then + GDMPREFETCH="gdmprefetch" + GDMPREFETCHLIST="gdmprefetchlist" + GDMPREFETCHCMD='${libdir}/gdmprefetch \@${gdmconfdir}/gdmprefetchlist' +fi + AC_ARG_WITH(afs, [ --with-afs support -fstype afs], [ AC_DEFINE(AFS, [], [Define if you have the Andrew File System]) diff --git a/daemon/gdm.c b/daemon/gdm.c index 38ac5260..c7f17cb8 100644 --- a/daemon/gdm.c +++ b/daemon/gdm.c @@ -52,7 +52,7 @@ #include <glib-object.h> /* Needed for signal handling */ -#include <gdm-common.h> +#include "gdm-common.h" #include "gdm.h" #include "misc.h" diff --git a/docs/C/gdm.xml b/docs/C/gdm.xml index 1c11e1b1..f779c7b0 100644 --- a/docs/C/gdm.xml +++ b/docs/C/gdm.xml @@ -6544,6 +6544,20 @@ homogeneous="bool"> </para> <para> + Alternatively, you can specify a "min-screen-width" or + "min-screen-height" value to indicate that certain + items should only be displayed if the screen resolution is the + at least the given required size. + </para> + + <para> + For example: +<screen> +<show min-screen-height="768"/> +</screen> + </para> + + <para> Note that if SystemMenu is off then the halt, restart, suspend, chooser and config choices will not be shown, so this is a global toggle for them all. See some of the standard themes for how the diff --git a/gui/greeter/greeter_item.c b/gui/greeter/greeter_item.c index 0021b674..7344957e 100644 --- a/gui/greeter/greeter_item.c +++ b/gui/greeter/greeter_item.c @@ -26,6 +26,7 @@ #include <unistd.h> #include "gdm.h" +#include "gdmwm.h" #include "gdmconfig.h" #include "gdmcommon.h" #include "misc.h" @@ -183,6 +184,10 @@ greeter_item_is_visible (GreeterItemInfo *info) ! (info->show_modes & GREETER_ITEM_SHOW_REMOTE)) return FALSE; + if ((gdm_wm_screen.width < info->minimum_required_screen_width) || + (gdm_wm_screen.height < info->minimum_required_screen_height)) + return FALSE; + sysmenu = gdm_config_get_bool (GDM_KEY_SYSTEM_MENU); if (( ! gdm_config_get_bool (GDM_KEY_CONFIG_AVAILABLE) || diff --git a/gui/greeter/greeter_item.h b/gui/greeter/greeter_item.h index 1f6c9e0b..7dedfc12 100644 --- a/gui/greeter/greeter_item.h +++ b/gui/greeter/greeter_item.h @@ -89,6 +89,10 @@ struct _GreeterItemInfo { float y; float width; float height; + + int minimum_required_screen_width; + int minimum_required_screen_height; + GreeterItemPosType x_type:2; GreeterItemPosType y_type:2; GreeterItemSizeType width_type:4; diff --git a/gui/greeter/greeter_parser.c b/gui/greeter/greeter_parser.c index c9065c9a..ad67781e 100644 --- a/gui/greeter/greeter_parser.c +++ b/gui/greeter/greeter_parser.c @@ -25,6 +25,7 @@ #include <librsvg/rsvg.h> #include <math.h> #include <locale.h> +#include <syslog.h> #include <glib/gi18n.h> #include <gdk/gdkx.h> @@ -601,7 +602,23 @@ parse_show (xmlNodePtr node, } xmlFree (prop); } - + + prop = xmlGetProp (node,(const xmlChar *) "min-screen-width"); + if (prop != NULL) + { + syslog (LOG_ERR, "minimum width is %d", info->minimum_required_screen_height); + info->minimum_required_screen_width = atoi ((char *) prop); + xmlFree (prop); + } + + prop = xmlGetProp (node,(const xmlChar *) "min-screen-height"); + if (prop != NULL) + { + info->minimum_required_screen_height = atoi ((char *) prop); + syslog (LOG_ERR, "minimum height is %d", info->minimum_required_screen_height); + xmlFree (prop); + } + prop = xmlGetProp (node,(const xmlChar *) "modes"); if (prop != NULL) { |