gnome-control-center/capplets/theme-switcher/main.c
Owen Taylor af81c4017f Wait for our child to exit before quitting. The prevents us from pulling
Fri Mar 12 10:53:10 1999  Owen Taylor  <otaylor@redhat.com>

	* capplets/theme-switcher/main.c (main): Wait for
	our child to exit before quitting. The prevents
	us from pulling the socket window out from under
	our child.

	* capplets/theme-switcher/demo.c (demo_main): Clean
	up some warnings about types in formats.

	* capplets/theme-switcher/demo.c (demo_main): Exit
	cleanly if read from parent fails - don't drop
	a core.
1999-03-12 15:46:11 +00:00

37 lines
702 B
C

#include <config.h>
#include "capplet-widget.h"
#include "da.h"
#define THEME_SWITCHER_VERSION "0.1"
int
main(int argc, char **argv)
{
GtkWidget *w;
gint child_pid;
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
textdomain (PACKAGE);
set_tmp_rc();
child_pid = do_demo(argc, argv);
switch (gnome_capplet_init ("theme-switcher-capplet",
THEME_SWITCHER_VERSION, argc, argv, NULL, 0, NULL)) {
case -1:
exit (1);
case 1:
return 0;
}
w = make_main();
gtk_widget_show_all(w);
send_socket();
gtk_main();
/* Pause here until our child exits and the socket can be safely
* destroyed
*/
if (child_pid > 0)
waitpid(child_pid, NULL, 0);
return 0;
}