Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 304134 Details for
Bug 444620
Enhancement: Allow rhgb to call external progress command
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch of suggested implementation of enhancement
rhgb-9.0.0-extcmd.patch (text/plain), 3.08 KB, created by
Hans Erickson
on 2008-04-29 15:54:09 UTC
(
hide
)
Description:
Patch of suggested implementation of enhancement
Filename:
MIME Type:
Creator:
Hans Erickson
Created:
2008-04-29 15:54:09 UTC
Size:
3.08 KB
patch
obsolete
>diff -Naur rhgb-9.0.0.old/src/splash.c rhgb-9.0.0.new/src/splash.c >--- rhgb-9.0.0.old/src/splash.c 2008-04-28 16:48:43.000000000 -0500 >+++ rhgb-9.0.0.new/src/splash.c 2008-04-28 16:56:25.000000000 -0500 >@@ -401,12 +401,44 @@ > GdkPixbuf *pixbuf; > GdkRectangle rect; > gchar *text; >+ const gchar *external_cmd; > > /* Set the busy cursor as quickly as we can */ > set_bg_cursor (GDK_WATCH); > > splash = g_new0 (Splash, 1); > >+ /* Check for the presence of an external command */ >+ splash->external_stdin = NULL; >+ external_cmd = "/etc/rhgb/rhgb-external"; >+ if (external_cmd != NULL) >+ { >+ gchar* external_argv[3] = { g_strdup(external_cmd), g_strdup(external_cmd), NULL }; >+ >+ if (external_argv[0] != NULL) >+ { >+ gint external_stdin_fd; >+ >+ if (g_spawn_async_with_pipes(NULL, >+ external_argv, >+ NULL, >+ G_SPAWN_SEARCH_PATH, >+ NULL, >+ NULL, >+ NULL, >+ &external_stdin_fd, >+ NULL, >+ NULL, >+ NULL) == TRUE) >+ { >+ splash->external_stdin = g_io_channel_unix_new(external_stdin_fd); >+ } >+ g_free(external_argv[0]); >+ g_free(external_argv[1]); >+ } >+ } >+ >+ > screen = gdk_screen_get_default (); > gdk_screen_get_monitor_geometry (screen, 0, &rect); > screen_width = rect.width; >@@ -571,6 +603,19 @@ > { > gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (splash->simple_progress), fraction); > gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (splash->details_progress), fraction); >+ >+ if (splash->external_stdin != NULL) >+ { >+ gchar *text; >+ text = g_strdup_printf ("%f\n", fraction); >+ g_io_channel_write_chars(splash->external_stdin, >+ text, >+ -1, >+ NULL, >+ NULL); >+ g_io_channel_flush(splash->external_stdin, NULL); >+ g_free(text); >+ } > } > > void >@@ -578,6 +623,16 @@ > { > gtk_progress_bar_pulse (GTK_PROGRESS_BAR (splash->simple_progress)); > gtk_progress_bar_pulse (GTK_PROGRESS_BAR (splash->details_progress)); >+ >+ if (splash->external_stdin != NULL) >+ { >+ g_io_channel_write_chars(splash->external_stdin, >+ ".\n", >+ -1, >+ NULL, >+ NULL); >+ g_io_channel_flush(splash->external_stdin, NULL); >+ } > } > > void >diff -Naur rhgb-9.0.0.old/src/splash.h rhgb-9.0.0.new/src/splash.h >--- rhgb-9.0.0.old/src/splash.h 2008-04-01 09:46:51.000000000 -0500 >+++ rhgb-9.0.0.new/src/splash.h 2008-04-28 16:57:21.000000000 -0500 >@@ -46,6 +46,7 @@ > gint fade_step; > gint x; > gint y; >+ GIOChannel* external_stdin; > > guint32 user_wants_details : 1; > };
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 444620
: 304134