rpms/rhgb/F-9 rhgb-eeepc.patch,1.2,1.3 rhgb.spec,1.101,1.102

Ray Strode (rstrode) fedora-extras-commits at redhat.com
Sat May 17 14:52:40 UTC 2008


Author: rstrode

Update of /cvs/pkgs/rpms/rhgb/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2383

Modified Files:
	rhgb-eeepc.patch rhgb.spec 
Log Message:
- Add patch from John Boyd <jaboydr at netwalk.com> to better support
  the EeePC.


rhgb-eeepc.patch:

Index: rhgb-eeepc.patch
===================================================================
RCS file: /cvs/pkgs/rpms/rhgb/F-9/rhgb-eeepc.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rhgb-eeepc.patch	2 May 2008 17:46:00 -0000	1.2
+++ rhgb-eeepc.patch	17 May 2008 14:51:55 -0000	1.3
@@ -1,68 +1,159 @@
-diff -up rhgb-9.0.0/src/splash.c.eeepc rhgb-9.0.0/src/splash.c
---- rhgb-9.0.0/src/splash.c.eeepc	2008-05-02 13:39:25.000000000 -0400
-+++ rhgb-9.0.0/src/splash.c	2008-05-02 13:43:30.000000000 -0400
-@@ -171,7 +171,8 @@ window_realize (GtkWindow *window,
-   GdkAtom atom;
- 
-   gtk_window_move (window, splash->x, splash->y);
--  gtk_window_fullscreen (window);
-+  if (!g_getenv ("RHGB_WIDTH") || !g_getenv ("RHGB_HEIGHT"))
-+    gtk_window_fullscreen (window);
- 
-   /*
-    * Jonathan's hack ask the WM to move on the 2nd desktop to get it
-@@ -275,14 +276,17 @@ event_box_realize (GtkWidget *widget)
+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_height = rect.height;
-+  if (g_getenv ("RHGB_WIDTH") && g_getenv ("RHGB_HEIGHT")) 
-+    screen_height = atoi (g_getenv ("RHGB_HEIGHT"));
-+  else
-+    screen_height = rect.height;
++  screen_width  = rect.width;
+   screen_height = rect.height;
  
-   if (screen_height < 768)
+-  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
+-#ifdef SPLASH_MAIN
 -      pixbuf = gdk_pixbuf_new_from_file_at_scale ("main-logo.png", -1, (int) (.50 * screen_height), TRUE, NULL);
-+      pixbuf = gdk_pixbuf_new_from_file_at_scale ("main-logo.png", -1, 400, TRUE, NULL);
- #else
+-#else
 -      pixbuf = gdk_pixbuf_new_from_file_at_scale ("/usr/share/rhgb/main-logo.png", -1, (int) (.50 * screen_height), TRUE, NULL);
-+      pixbuf = gdk_pixbuf_new_from_file_at_scale ("/usr/share/rhgb/main-logo.png", -1, 400, TRUE, NULL);
- #endif
+-#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
-@@ -408,17 +412,28 @@ splash_new (void)
-   splash = g_new0 (Splash, 1);
+     {
+-#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);
+     }
  
-   screen = gdk_screen_get_default ();
--  gdk_screen_get_monitor_geometry (screen, 0, &rect);
--  screen_width = rect.width;
--  screen_height = rect.height;
--  splash->x = rect.x;
--  splash->y = rect.y;
-+  if (g_getenv ("RHGB_WIDTH") && g_getenv ("RHGB_HEIGHT"))
-+    {
-+      screen_width = atoi (g_getenv ("RHGB_WIDTH"));
-+      screen_height = atoi (g_getenv ("RHGB_HEIGHT"));
-+      splash->x = 0;
-+      splash->y = 0;
-+    }
+   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
-+    {
-+      gdk_screen_get_monitor_geometry (screen, 0, &rect);
-+      screen_width = rect.width;
-+      screen_height = rect.height;
-+      splash->x = rect.x;
-+      splash->y = rect.y;
-+    }
-   splash->user_wants_details = FALSE;
- 
-   /* Make the window */
-   splash->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-   gtk_widget_set_app_paintable (splash->window, TRUE);
-   gtk_window_set_default_size (GTK_WINDOW (splash->window), screen_width, screen_height);
-+  gtk_widget_set_size_request (GTK_WIDGET (splash->window), screen_width, screen_height);
-   gtk_widget_modify_bg (splash->window, GTK_STATE_NORMAL, &background);
-   g_signal_connect (G_OBJECT (splash->window),
- 		    "realize",
++      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-9/rhgb.spec,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -r1.101 -r1.102
--- rhgb.spec	2 May 2008 18:56:53 -0000	1.101
+++ rhgb.spec	17 May 2008 14:51:55 -0000	1.102
@@ -3,7 +3,7 @@
 Summary: Red Hat Graphical Boot
 Name: rhgb
 Version: 9.0.0
-Release: 6%{?dist}
+Release: 7%{?dist}
 Epoch: 1
 URL: http://www.redhat.com/
 Source0: %{name}-%{version}.tar.gz
@@ -62,6 +62,10 @@
 %dir %{_sysconfdir}/rhgb/temp
 
 %changelog
+* Sat May 17 2008 Ray Strode <rstrode at redhat.com> - 1:9.0.0-7
+- Add patch from John Boyd <jaboydr at netwalk.com> to better support
+  the EeePC.
+
 * Fri May  2 2008 Ray Strode <rstrode at redhat.com> - 1:9.0.0-6
 - Use abstract sockets by default
 




More information about the fedora-extras-commits mailing list