rpms/rhgb/devel rhgb-0.16.2-scale-logos.patch, NONE, 1.1 rhgb.spec, 1.45, 1.46

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Jan 25 20:03:17 UTC 2006


Author: rstrode

Update of /cvs/dist/rpms/rhgb/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv17839

Modified Files:
	rhgb.spec 
Added Files:
	rhgb-0.16.2-scale-logos.patch 
Log Message:
Ray Strode <rstrode at redhat.com> 0.16.2-21
- add lame hack to scale logos down if in low resolutions (bug 178737)


rhgb-0.16.2-scale-logos.patch:
 splash.c |   53 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 45 insertions(+), 8 deletions(-)

--- NEW FILE rhgb-0.16.2-scale-logos.patch ---
--- rhgb-0.16.2/src/splash.c.scale-logos	2006-01-25 14:06:59.000000000 -0500
+++ rhgb-0.16.2/src/splash.c	2006-01-25 14:45:20.000000000 -0500
@@ -273,6 +273,7 @@
   GtkWidget *table, *hbox;
   GtkWidget *expander;
   GdkScreen *screen;
+  GdkPixbuf *pixbuf;
   GdkRectangle rect;
   gchar *text;
   
@@ -326,12 +327,31 @@
   /* Simple page */
   vbox2 = gtk_vbox_new (FALSE, 25);
   gtk_container_add (GTK_CONTAINER (align), vbox2);
+
+  if (screen_height < 768)
+    {
+#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
+    }
+  else
+    {
 #ifdef SPLASH_MAIN
-  image = gtk_image_new_from_file ("main-logo.png");
+      pixbuf = gdk_pixbuf_new_from_file ("main-logo.png", NULL);
 #else
-  image = gtk_image_new_from_file ("/usr/share/rhgb/main-logo.png");
+      pixbuf = gdk_pixbuf_new_from_file ("/usr/share/rhgb/main-logo.png", NULL);
 #endif
-  gtk_box_pack_start (GTK_BOX (vbox2), image, FALSE, FALSE, 0);
+    }
+
+  if (pixbuf != NULL)
+    {
+      image = gtk_image_new_from_pixbuf (pixbuf);
+      g_object_unref (pixbuf);
+
+      gtk_box_pack_start (GTK_BOX (vbox2), image, FALSE, FALSE, 0);
+    }
 
   event_box = gtk_event_box_new ();
   gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, &highlight);
@@ -424,13 +444,31 @@
   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)
+    {
+#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
+    }
+  else
+    {
 #ifdef SPLASH_MAIN
-  splash->system_logo = gtk_image_new_from_file ("system-logo.png");
+      pixbuf = gdk_pixbuf_new_from_file ("system-logo.png", NULL);
 #else
-  splash->system_logo = gtk_image_new_from_file ("/usr/share/rhgb/system-logo.png");
+      pixbuf = gdk_pixbuf_new_from_file ("/usr/share/rhgb/system-logo.png", NULL);
 #endif
-  gtk_misc_set_alignment (GTK_MISC (splash->system_logo), 1.0, 0.5);
-  gtk_container_add (GTK_CONTAINER (align), splash->system_logo);
+    }
+
+  if (pixbuf != NULL)
+    {
+      splash->system_logo = gtk_image_new_from_pixbuf (pixbuf);
+      g_object_unref (pixbuf);
+
+      gtk_misc_set_alignment (GTK_MISC (splash->system_logo), 1.0, 0.5);
+      gtk_container_add (GTK_CONTAINER (align), splash->system_logo);
+    }
   
   initialize_throbber (splash);
   gtk_widget_show_all (splash->window);
@@ -438,7 +476,6 @@
   return splash;
 }
 
-
 static void
 get_fade_level (gint  count,
 		gint *r,


Index: rhgb.spec
===================================================================
RCS file: /cvs/dist/rpms/rhgb/devel/rhgb.spec,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- rhgb.spec	20 Jan 2006 18:47:21 -0000	1.45
+++ rhgb.spec	25 Jan 2006 20:03:05 -0000	1.46
@@ -3,7 +3,7 @@
 Summary: Red Hat Graphical Boot
 Name: rhgb
 Version: 0.16.2
-Release: 20
+Release: 21
 URL: http://www.redhat.com/
 Source0: %{name}-%{version}.tar.gz
 License: GPL
@@ -25,6 +25,7 @@
 Patch6: rhgb-0.16.2-kill-more-zombies.patch
 Patch7: rhgb-0.16.2-dont-call-chvt.patch
 Patch8: rhgb-0.16.2-change-colors.patch
+Patch9: rhgb-0.16.2-scale-logos.patch
 
 %description
 Red Hat Graphical Boot provides a clean and simple interface to the boot process
@@ -40,6 +41,7 @@
 %patch6 -p1 -b .kill-more-zombies
 %patch7 -p1 -b .dont-call-chvt
 %patch8 -p1 -b .change-colors
+%patch9 -p1 -b .scale-logos
 
 %build
 %configure
@@ -68,6 +70,9 @@
 %doc doc/HOW_IT_WORKS
 
 %changelog
+* Wed Jan 25 2006 Ray Strode <rstrode at redhat.com> 0.16.2-21
+- add lame hack to scale logos down if in low resolutions (bug 178737)
+
 * Fri Jan 20 2006 Ray Strode <rstrode at redhat.com> 0.16.2-20
 - update the logo in the corner
 




More information about the fedora-cvs-commits mailing list