Add flag launching

2001-07-26  Bradford Hovinen  <hovinen@ximian.com>

	* capplet-dir.h (struct _Capplet): Add flag launching

	* capplet-dir.c (capplet_new): Initialize capplet->launching
	(capplet_reset_cb): Implement. Just reset capplet->launching
	(capplet_activate): Just return if capplet->launching is set;
	otherwise set that flag and add an idle handler to unset it
This commit is contained in:
Bradford Hovinen 2001-07-27 01:23:26 +00:00 committed by Bradford Hovinen (Gdict maintainer)
parent 0bd8ccb935
commit 4af8d8fa92
3 changed files with 27 additions and 0 deletions

View file

@ -1,5 +1,12 @@
2001-07-26 Bradford Hovinen <hovinen@ximian.com>
* capplet-dir.h (struct _Capplet): Add flag launching
* capplet-dir.c (capplet_new): Initialize capplet->launching
(capplet_reset_cb): Implement. Just reset capplet->launching
(capplet_activate): Just return if capplet->launching is set;
otherwise set that flag and add an idle handler to unset it
* kill-gnomecc.sh: Don't kill oafd for fear that someone may be
running Evolution. Kill bonobo-moniker-archiver after everything
else is dead. Redirect errors to /dev/null. Kill the mouse

View file

@ -79,6 +79,8 @@ capplet_new (CappletDir *dir, gchar *desktop_path)
g_free (path);
capplet = g_new0 (Capplet, 1);
capplet->launching = FALSE;
entry = CAPPLET_DIR_ENTRY (capplet);
entry->type = TYPE_CAPPLET;
@ -194,11 +196,28 @@ capplet_dir_entry_shutdown (CappletDirEntry *entry)
g_assert_not_reached ();
}
static gint
capplet_reset_cb (Capplet *capplet)
{
g_message ("%s: Enter", __FUNCTION__);
capplet->launching = FALSE;
return FALSE;
}
static void
capplet_activate (Capplet *capplet)
{
GnomeDesktopEntry *entry;
if (capplet->launching) {
g_message ("Capplet already running");
return;
} else {
g_message ("Capplet not already running; launching");
capplet->launching = TRUE;
gtk_idle_add ((GtkFunction) capplet_reset_cb, capplet);
}
entry = CAPPLET_DIR_ENTRY (capplet)->entry;
#warning FIXME: this should probably be root-manager-helper

View file

@ -66,6 +66,7 @@ struct _CappletDir
struct _Capplet
{
CappletDirEntry entry;
gboolean launching;
};
CappletDirEntry *capplet_new (CappletDir *dir,