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:
parent
0bd8ccb935
commit
4af8d8fa92
3 changed files with 27 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -66,6 +66,7 @@ struct _CappletDir
|
|||
struct _Capplet
|
||||
{
|
||||
CappletDirEntry entry;
|
||||
gboolean launching;
|
||||
};
|
||||
|
||||
CappletDirEntry *capplet_new (CappletDir *dir,
|
||||
|
|
Loading…
Add table
Reference in a new issue