rpms/rhgb/devel rhgb-0.17.6-dont-show-details-after-timeout.patch, NONE, 1.1 rhgb-0.17.6-support-manual-switch.patch, NONE, 1.1 rhgb.spec, 1.76, 1.77
Ray Strode (rstrode)
fedora-extras-commits at redhat.com
Wed Aug 8 15:42:12 UTC 2007
Author: rstrode
Update of /cvs/pkgs/rpms/rhgb/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28218
Modified Files:
rhgb.spec
Added Files:
rhgb-0.17.6-dont-show-details-after-timeout.patch
rhgb-0.17.6-support-manual-switch.patch
Log Message:
- don't go to details view after timeout (bug 251321)
- don't revert from details view if user explicitly picked it
(bug 151239)
rhgb-0.17.6-dont-show-details-after-timeout.patch:
--- NEW FILE rhgb-0.17.6-dont-show-details-after-timeout.patch ---
diff -up rhgb-0.17.6/src/main.c.dont-show-details-after-timeout rhgb-0.17.6/src/main.c
--- rhgb-0.17.6/src/main.c.dont-show-details-after-timeout 2007-08-08 10:43:49.000000000 -0400
+++ rhgb-0.17.6/src/main.c 2007-08-08 11:02:31.000000000 -0400
@@ -115,9 +115,6 @@ static char *use_existing_server = NULL;
static gint child_pid = 0;
static GList *services = NULL;
static Splash *splash = NULL;
-/* Timeouts */
-static guint motion_timeout = 0;
-static guint motion_notify_event_id = 0;
static gint socket_fd = -1;
static gint pipe_fd = -1;
@@ -222,78 +219,6 @@ got_signal(int no ATTRIBUTE_UNUSED) {
_exit(1);
}
-/*
- * Timeout handling. If we don't get pings or progress informations
- * for a while we switch back automatically to text mode console
- * connections_timeout is reset to 0 each time we get some client command
- * If the boot process is stuck into some long command (fsck, network
- * or DNS start error) then it will automatically switch to the console mode
- * to show what is happening.
- */
-static guint pipe_timeout = 0;
-/*
- * If this is set to a negative number, we are supposed to
- * not timeout (e.g. for firstboot)
- */
-static int connection_timeout = 0;
-static int switched_vt1 = 0;
-static int switched_details = 0;
-/*
- * Set if the user manually switched to details view, so we don't automatically
- * switch back in that case.
- */
-static gboolean manual_switch = 0;
-
-static void
-connections_reset (gboolean from_pipe)
-{
- pipe_timeout = 0;
- if (switched_vt1) {
- switch_to_vt (8);
- switched_vt1 = 0;
- }
- if (!from_pipe && connection_timeout >= 0)
- connection_timeout = 0;
- if ((!from_pipe) && (switched_details) && (!manual_switch)) {
- /* switch back to no details */
- splash_hide_details(splash);
- switched_details = 0;
- }
-}
-
-static gboolean
-connections_check (void)
-{
- if(connection_timeout >= 0) connection_timeout++;
- pipe_timeout++;
- /*
- * Those checks are intended to detect stops in progresses of the
- * boot and switch back/forth to/from the detailed or text views.
- */
- if ((connection_timeout >= 10) && (switched_vt1 == 0) &&
- (switched_details == 0)) {
- /*
- * Something is blocking could be filesystem check or kudzu
- * switch to detailed mode
- */
- splash_show_details(splash);
- switched_details = 1;
- }
-
- return (TRUE);
-}
-
-static gboolean
-init_timeout (void) {
- static int initialized = 0;
-
- if (initialized)
- return(FALSE);
- g_timeout_add(1000, (GSourceFunc) connections_check, NULL);
- initialized = 1;
- return(TRUE);
-}
-
/* Check for x
*/
static gboolean
@@ -673,7 +598,6 @@ update_progress_bar (const char *step)
gchar *lang;
GdkCursor *cursor;
- connection_timeout = -1;
lang = check_for_language();
if (lang != NULL) {
gchar *argv[5] = {
@@ -695,16 +619,6 @@ update_progress_bar (const char *step)
set_xkb_keymap();
g_timeout_add (6001, hide_main_window_timeout_cb, NULL);
- if (motion_notify_event_id)
- {
- motion_notify_event_id = 0;
- }
- if (motion_timeout)
- {
- g_source_remove (motion_timeout);
- motion_timeout = 0;
- }
-
cursor = gdk_cursor_new (GDK_LEFT_PTR);
gdk_window_set_cursor (gdk_get_default_root_window (), cursor);
gdk_cursor_unref (cursor);
@@ -754,12 +668,10 @@ handle_command (char *command, gint retu
}
else if (!strncmp (command, "details", strlen ("details")))
{
- manual_switch = TRUE;
splash_show_details (splash);
}
else if (!strncmp (command, "nodetails", strlen ("nodetails")))
{
- manual_switch = FALSE;
splash_hide_details (splash);
}
else if (!strncmp (command, "sysinit", strlen ("sysinit")))
@@ -791,7 +703,6 @@ client_message_func (GIOChannel *sourc
switch (status)
{
case G_IO_STATUS_NORMAL:
- connections_reset (FALSE);
if (bytes_read >= 200)
{
DEBUG_MESSAGE ("More than 200 bytes: %d\n", bytes_read);
@@ -904,7 +815,6 @@ pipe_func(GIOChannel * source,
switch (status) {
case G_IO_STATUS_NORMAL:
- connections_reset (TRUE);
if (bytes_read > 4096) {
DEBUG_MESSAGE("More than 4096 bytes: %d\n", bytes_read);
goto done;
@@ -1183,8 +1093,6 @@ main (int argc, char *argv[])
setup_failed ();
}
- init_timeout();
-
DEBUG_MESSAGE("Running GTK main loop\n");
g_atexit (rhgb_shutdown);
rhgb-0.17.6-support-manual-switch.patch:
--- NEW FILE rhgb-0.17.6-support-manual-switch.patch ---
diff -up rhgb-0.17.6/src/splash.h.support-manual-switch rhgb-0.17.6/src/splash.h
--- rhgb-0.17.6/src/splash.h.support-manual-switch 2007-08-08 11:24:40.000000000 -0400
+++ rhgb-0.17.6/src/splash.h 2007-08-08 11:26:28.000000000 -0400
@@ -51,6 +51,8 @@ struct _Splash
gchar *label_text;
gint x;
gint y;
+
+ guint32 user_wants_details : 1;
};
/**
diff -up rhgb-0.17.6/src/splash.c.support-manual-switch rhgb-0.17.6/src/splash.c
--- rhgb-0.17.6/src/splash.c.support-manual-switch 2007-08-08 11:24:23.000000000 -0400
+++ rhgb-0.17.6/src/splash.c 2007-08-08 11:27:43.000000000 -0400
@@ -381,9 +381,15 @@ switch_page (GtkWidget *widget,
page = gtk_notebook_get_current_page (GTK_NOTEBOOK (splash->notebook));
if (page == 0)
- splash_show_details (splash);
+ {
+ splash_show_details (splash);
+ splash->user_wants_details = TRUE;
+ }
else
- splash_hide_details (splash);
+ {
+ splash_hide_details (splash);
+ splash->user_wants_details = FALSE;
+ }
gtk_expander_set_expanded (expander, ! gtk_expander_get_expanded (expander));
}
@@ -413,6 +419,7 @@ splash_new (void)
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);
@@ -731,6 +738,9 @@ splash_show_details (Splash *splash)
void
splash_hide_details (Splash *splash)
{
+ if (splash->user_wants_details)
+ return;
+
gtk_notebook_set_current_page (GTK_NOTEBOOK (splash->notebook), 0);
}
Index: rhgb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhgb/devel/rhgb.spec,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- rhgb.spec 7 Aug 2007 20:03:41 -0000 1.76
+++ rhgb.spec 8 Aug 2007 15:41:39 -0000 1.77
@@ -3,7 +3,7 @@
Summary: Red Hat Graphical Boot
Name: rhgb
Version: 0.17.6
-Release: 3%{?dist}
+Release: 4%{?dist}
URL: http://www.redhat.com/
Source0: %{name}-%{version}.tar.gz
License: GPLv2
@@ -17,6 +17,8 @@
Requires: system-logos
Patch0: rhgb-0.17.6-fix-font-patch.patch
+Patch1: rhgb-0.17.6-dont-show-details-after-timeout.patch
+Patch2: rhgb-0.17.6-support-manual-switch.patch
%description
Red Hat Graphical Boot provides a clean and simple interface to the boot process
@@ -24,6 +26,7 @@
%prep
%setup -q
%patch0 -p1 -b .fix-font-path
+%patch1 -p1 -b .dont-show-details-after-timeout
%build
%configure
@@ -53,6 +56,11 @@
%dir %{_sysconfdir}/rhgb/temp
%changelog
+* Wed Aug 8 2007 Ray Strode <rstrode at redhat.com> - 0.17.6-4
+- don't go to details view after timeout (bug 251321)
+- don't revert from details view if user explicitly picked it
+ (bug 151239)
+
* Tue Aug 7 2007 Matthias Clasen <mclasen at redhat.com> - 0.17.6-3
- Update license field
More information about the scm-commits
mailing list