Commit bc3d74f5 authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

impelmented restart all applets on the launcher side.

Wed Mar 18 17:56:16 1998  George Lebl  <jirka@5z.com>

        * gnome-panel.idl, launcher-lib.cc,launcher.c:
          impelmented restart all applets on the launcher side.
parent 248ed3a7
Wed Mar 18 17:56:16 1998 George Lebl <jirka@5z.com>
* gnome-panel.idl, launcher-lib.cc,launcher.c:
impelmented restart all applets on the launcher side.
Wed Mar 18 01:03:52 1998 George Lebl <jirka@5z.com>
* menu.c: applets directory added to the Add to panel dir, read from
......
Wed Mar 18 17:56:16 1998 George Lebl <jirka@5z.com>
* gnome-panel.idl, launcher-lib.cc,launcher.c:
impelmented restart all applets on the launcher side.
Wed Mar 18 01:03:52 1998 George Lebl <jirka@5z.com>
* menu.c: applets directory added to the Add to panel dir, read from
......
......@@ -32,6 +32,7 @@ module GNOME {
interface Launcher {
void start_new_launcher (in string path);
void restart_all_launchers (void);
};
};
......@@ -15,14 +15,17 @@ extern CORBA::BOA_ptr boa_ptr;
/*every launcher must implement these*/
BEGIN_GNOME_DECLS
void start_new_launcher(const char *path);
void restart_all_launchers(void);
END_GNOME_DECLS
class Launcher_impl : virtual public GNOME::Launcher_skel {
public:
void start_new_launcher (const char *path) {
puts("START_NEW_LAUNCHER");
::start_new_launcher(path);
}
void restart_all_launchers (void) {
::restart_all_launchers ();
}
};
void
......
......@@ -501,6 +501,34 @@ start_new_launcher(const char *path)
}
/*destructive call, should be done only on restart*/
void
restart_all_launchers(void)
{
char *globcfg;
char *query;
launcher_count=0;
while(launchers) {
Launcher *launcher=launchers->data;
/*FIXME: somehow unref or something this, so we don't leak,
unref gives me a bunch of warnings here*/
if(launcher->plug)
gtk_widget_destroy(launcher->plug);
launchers = g_list_remove(launchers,launcher);
}
gnome_panel_applet_request_glob_cfg(&globcfg);
query = g_copy_strings(globcfg,CONFIG_TAG,"/count=0",NULL);
count = gnome_config_get_int(query);
g_free(query);
g_free(globcfg);
for(i=0;i<count;i++)
start_new_launcher(NULL);
}
int
main(int argc, char **argv)
{
......
......@@ -32,6 +32,7 @@ module GNOME {
interface Launcher {
void start_new_launcher (in string path);
void restart_all_launchers (void);
};
};
......@@ -32,6 +32,7 @@ module GNOME {
interface Launcher {
void start_new_launcher (in string path);
void restart_all_launchers (void);
};
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment