rpms/rhgb/F-8 rhgb-0.17.7-small.patch,NONE,1.1 rhgb.spec,1.88,1.89
Ray Strode (rstrode)
fedora-extras-commits at redhat.com
Sat May 17 14:56:18 UTC 2008
- Previous message: rpms/pidgin/F-8 pidgin-2.4.2-reread-resolvconf.patch, NONE, 1.1 .cvsignore, 1.15, 1.16 pidgin.spec, 1.45, 1.46 sources, 1.15, 1.16 pidgin-2.0.0-beta7-reread-resolvconf.patch, 1.1, NONE
- Next message: rpms/pidgin/devel pidgin-2.4.2-reread-resolvconf.patch, NONE, 1.1 .cvsignore, 1.15, 1.16 pidgin.spec, 1.52, 1.53 sources, 1.15, 1.16 pidgin-2.0.0-beta7-reread-resolvconf.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: rstrode
Update of /cvs/pkgs/rpms/rhgb/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2614
Modified Files:
rhgb.spec
Added Files:
rhgb-0.17.7-small.patch
Log Message:
- Add patch from John Boyd <jaboydjr at netwalk.com> to better
support the Eeepc.
rhgb-0.17.7-small.patch:
--- NEW FILE rhgb-0.17.7-small.patch ---
diff -up rhgb-9.0.0/src/splash.c.small rhgb-9.0.0/src/splash.c
--- rhgb-9.0.0/src/splash.c.small 2008-05-15 13:42:50.000000000 -0400
+++ rhgb-9.0.0/src/splash.c 2008-05-17 10:04:30.000000000 -0400
@@ -48,8 +48,21 @@ static GdkColor highlight = {0, 0x0e0e,
static GdkColor prelight = {0, 0x0e0e, 0x2424, 0x4545};
#define N_STEPS 20
+#ifdef SPLASH_MAIN
+#define MAIN_LOGO_FILE "main-logo.png"
+#define SYSTEM_LOGO_FILE "system-logo.png"
+#else
+#define MAIN_LOGO_FILE "/usr/share/rhgb/main-logo.png"
+#define SYSTEM_LOGO_FILE "/usr/share/rhgb/system-logo.png"
+#endif
+#define LOGO_SCL(i) ((i)-50)
+
+/* VTE font must be monospace 9 or smaller for EeePC (800x480) */
+#define VTE_FONT_LARGE "monospace 12"
+#define VTE_FONT_SMALL "monospace 9"
+
/*
- * We really want ot catch [<Alt>]<Ctrl>F1 to switch to vt1
+ * We really want to catch [<Alt>]<Ctrl>F1 to switch to vt1
*/
static int
@@ -268,30 +281,30 @@ event_box_realize (GtkWidget *widget)
{
GdkScreen *screen;
GdkRectangle rect;
- gint screen_height;
+ gint screen_height, screen_width, logo_width = 0, logo_height = 0;
GdkPixbuf *pixbuf;
GdkPixmap *pixmap;
gint width, height;
screen = gdk_screen_get_default ();
gdk_screen_get_monitor_geometry (screen, 0, &rect);
+ screen_width = rect.width;
screen_height = rect.height;
- if (screen_height < 768)
+ (void) gdk_pixbuf_get_file_info(MAIN_LOGO_FILE, &logo_width, &logo_height);
+
+ if (LOGO_SCL(screen_height) < logo_height ||
+ LOGO_SCL(screen_width) < logo_width)
{
-#ifdef SPLASH_MAIN
- pixbuf = gdk_pixbuf_new_from_file_at_scale ("main-logo.png", -1, (int) (.50 * screen_height), TRUE, NULL);
-#else
- pixbuf = gdk_pixbuf_new_from_file_at_scale ("/usr/share/rhgb/main-logo.png", -1, (int) (.50 * screen_height), TRUE, NULL);
-#endif
+ pixbuf = gdk_pixbuf_new_from_file_at_size (
+ MAIN_LOGO_FILE,
+ (LOGO_SCL(screen_width) < logo_width ? LOGO_SCL(screen_width) : -1),
+ (LOGO_SCL(screen_height) < logo_height ? LOGO_SCL(screen_height) : -1),
+ NULL);
}
else
{
-#ifdef SPLASH_MAIN
- pixbuf = gdk_pixbuf_new_from_file ("main-logo.png", NULL);
-#else
- pixbuf = gdk_pixbuf_new_from_file ("/usr/share/rhgb/main-logo.png", NULL);
-#endif
+ pixbuf = gdk_pixbuf_new_from_file (MAIN_LOGO_FILE, NULL);
}
width = gdk_pixbuf_get_width (pixbuf);
@@ -391,8 +404,7 @@ Splash *
splash_new (void)
{
Splash *splash;
- gint screen_width;
- gint screen_height;
+ gint screen_height, screen_width, logo_width = 0, logo_height = 0;
GtkWidget *vbox, *vbox2, *align, *align1;
GtkWidget *event_box;
GtkWidget *table, *hbox, *inner_event_box;
@@ -401,7 +413,8 @@ splash_new (void)
GdkPixbuf *pixbuf;
GdkRectangle rect;
gchar *text;
-
+ gchar *vte_font;
+
/* Set the busy cursor as quickly as we can */
set_bg_cursor (GDK_WATCH);
@@ -455,7 +468,6 @@ splash_new (void)
inner_event_box = gtk_event_box_new ();
gtk_event_box_set_visible_window (GTK_EVENT_BOX (inner_event_box), FALSE);
- gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, &background);
g_signal_connect (G_OBJECT (inner_event_box), "expose-event",
(GCallback) event_box_expose, NULL);
g_signal_connect (G_OBJECT (inner_event_box), "key-press-event",
@@ -491,10 +503,10 @@ splash_new (void)
event_box = gtk_event_box_new ();
gtk_notebook_append_page (GTK_NOTEBOOK (splash->notebook), event_box, NULL);
gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, &highlight);
- vbox2 = gtk_vbox_new (FALSE, 25);
- gtk_container_set_border_width (GTK_CONTAINER (vbox2), 25);
+ vbox2 = gtk_vbox_new (FALSE, 10);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox2), 10);
gtk_container_add (GTK_CONTAINER (event_box), vbox2);
- hbox = gtk_hbox_new (FALSE, 25);
+ hbox = gtk_hbox_new (FALSE, 10);
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
text = g_strdup_printf ("<span weight=\"light\" foreground=\"white\">%s</span>", _("Hide _Details"));
@@ -518,9 +530,16 @@ splash_new (void)
splash->details_throbber = gtk_image_new ();
gtk_box_pack_start (GTK_BOX (hbox), splash->details_throbber, FALSE, FALSE, 0);
+ (void) gdk_pixbuf_get_file_info(SYSTEM_LOGO_FILE, &logo_width, &logo_height);
splash->details_terminal = vte_terminal_new();
- vte_terminal_set_font_from_string (VTE_TERMINAL (splash->details_terminal), "monospace 12");
+ if (LOGO_SCL(screen_height) < logo_height ||
+ LOGO_SCL(screen_width) < logo_width)
+ vte_font = VTE_FONT_SMALL;
+ else
+ vte_font = VTE_FONT_LARGE;
+ vte_terminal_set_font_from_string (VTE_TERMINAL (splash->details_terminal),
+ vte_font);
vte_terminal_fork_command (VTE_TERMINAL (splash->details_terminal),
"/sbin/change_console",
(char **) init_redirect,
@@ -533,21 +552,18 @@ splash_new (void)
align = gtk_alignment_new (1.0, 0.5, 1.0, 1.0);
gtk_box_pack_end (GTK_BOX (vbox), align, FALSE, FALSE, 0);
- if (screen_height < 768)
+ if (LOGO_SCL(screen_height) < logo_height ||
+ LOGO_SCL(screen_width) < logo_width)
{
-#ifdef SPLASH_MAIN
- pixbuf = gdk_pixbuf_new_from_file_at_scale ("system-logo.png", -1, (int) (.075 * screen_height), TRUE, NULL);
-#else
- pixbuf = gdk_pixbuf_new_from_file_at_scale ("/usr/share/rhgb/system-logo.png", -1, (int) (.075 * screen_height), TRUE, NULL);
-#endif
+ pixbuf = gdk_pixbuf_new_from_file_at_size (
+ SYSTEM_LOGO_FILE,
+ (LOGO_SCL(screen_width) < logo_width ? LOGO_SCL(screen_width) : -1),
+ (LOGO_SCL(screen_height) < logo_height ? LOGO_SCL(screen_height) : -1),
+ NULL);
}
else
{
-#ifdef SPLASH_MAIN
- pixbuf = gdk_pixbuf_new_from_file ("system-logo.png", NULL);
-#else
- pixbuf = gdk_pixbuf_new_from_file ("/usr/share/rhgb/system-logo.png", NULL);
-#endif
+ pixbuf = gdk_pixbuf_new_from_file (SYSTEM_LOGO_FILE, NULL);
}
if (pixbuf != NULL)
Index: rhgb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhgb/F-8/rhgb.spec,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- rhgb.spec 9 Apr 2008 14:35:56 -0000 1.88
+++ rhgb.spec 17 May 2008 14:55:21 -0000 1.89
@@ -3,7 +3,7 @@
Summary: Red Hat Graphical Boot
Name: rhgb
Version: 0.17.7
-Release: 4%{?dist}
+Release: 5%{?dist}
Epoch: 1
URL: http://www.redhat.com/
Source0: %{name}-%{version}.tar.gz
@@ -18,6 +18,7 @@
Requires: initscripts >= 7.22-1
Requires: system-logos
Patch0: rhgb-0.17.7-strict-exit.patch
+Patch1: rhgb-0.17.7-small.patch
%description
Red Hat Graphical Boot provides a clean and simple interface to the boot process
@@ -25,6 +26,7 @@
%prep
%setup -q
%patch0 -p1 -b .strict-exit
+%patch1 -p1 -b .small
%build
%configure
@@ -54,6 +56,10 @@
%dir %{_sysconfdir}/rhgb/temp
%changelog
+* Sat May 17 2008 Ray Strode <rstrode at redhat.com> 0.17.7-5
+- Add patch from John Boyd <jaboydjr at netwalk.com> to better
+ support the Eeepc.
+
* Wed Apr 09 2008 Ray Strode <rstrode at redhat.com> 0.17.7-4
- Add strict-exit patch from Adam Jackson and Linus Torvalds
to prevent race condition between rhgb X shutdown and gdm
- Previous message: rpms/pidgin/F-8 pidgin-2.4.2-reread-resolvconf.patch, NONE, 1.1 .cvsignore, 1.15, 1.16 pidgin.spec, 1.45, 1.46 sources, 1.15, 1.16 pidgin-2.0.0-beta7-reread-resolvconf.patch, 1.1, NONE
- Next message: rpms/pidgin/devel pidgin-2.4.2-reread-resolvconf.patch, NONE, 1.1 .cvsignore, 1.15, 1.16 pidgin.spec, 1.52, 1.53 sources, 1.15, 1.16 pidgin-2.0.0-beta7-reread-resolvconf.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list