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

added the id parameter to panel->applet calls so one program could

Thu Feb 26 00:29:52 1998  George Lebl  <jirka@5z.com>

        * gnome-panel.idl, mico-glue.cc, applet-lib.cc: added the id
          parameter to panel->applet calls so one program could
          maintain more applet easily.
parent 444e8938
Thu Feb 26 00:29:52 1998 George Lebl <jirka@5z.com>
* gnome-panel.idl, mico-glue.cc, applet-lib.cc: added the id
parameter to panel->applet calls so one program could
maintain more applet easily.
Tue Feb 24 23:32:20 1998 George Lebl <jirka@5z.com>
* panel-widget.[ch]: added signals. it compiles, but
......
Thu Feb 26 00:29:52 1998 George Lebl <jirka@5z.com>
* gnome-panel.idl, mico-glue.cc, applet-lib.cc: added the id
parameter to panel->applet calls so one program could
maintain more applet easily.
Tue Feb 24 23:32:20 1998 George Lebl <jirka@5z.com>
* panel-widget.[ch]: added signals. it compiles, but
......
......@@ -170,14 +170,14 @@ create_clock_widget (GtkWidget *window)
/*these are commands sent over corba:*/
void
change_orient(int orient)
change_orient(int id, int orient)
{
PanelOrientType o = (PanelOrientType)orient;
puts("CHANGE_ORIENT");
}
void
session_save(int panel, int pos)
session_save(int id, int panel, int pos)
{
/*FIXME: save the position*/
puts("SESSION_SAVE");
......@@ -190,7 +190,7 @@ applet_die(gpointer data)
}
void
shutdown_applet()
shutdown_applet(int id)
{
puts("SHUTDOWN_APPLET");
/*kill our window*/
......
......@@ -271,9 +271,6 @@ main(int argc, char **argv)
gnome_init("panel", &argc, &argv);
gtk_widget_push_visual (gdk_imlib_get_visual ());
gtk_widget_push_colormap (gdk_imlib_get_colormap ());
bindtextdomain(PACKAGE, GNOMELOCALEDIR);
textdomain(PACKAGE);
......
......@@ -84,25 +84,25 @@ panel_corba_gtk_main (int *argc, char ***argv, char *service_name)
}
void
send_applet_session_save (const char *ior, int panel, int pos)
send_applet_session_save (const char *ior, int id, int panel, int pos)
{
/* Use the ior that was sent to us to get an Applet CORBA object */
CORBA::Object_var obj = orb_ptr->string_to_object (ior);
GNOME::Applet_var applet = GNOME::Applet::_narrow (obj);
/* Now, use corba to invoke the routine in the panel */
applet->session_save(panel,pos);
applet->session_save(id,panel,pos);
}
void
send_applet_shutdown_applet (const char *ior)
send_applet_shutdown_applet (const char *ior, int id)
{
/* Use the ior that was sent to us to get an Applet CORBA object */
CORBA::Object_var obj = orb_ptr->string_to_object (ior);
GNOME::Applet_var applet = GNOME::Applet::_narrow (obj);
/* Now, use corba to invoke the routine in the panel */
applet->shutdown_applet();
applet->shutdown_applet(id);
}
void
......@@ -113,5 +113,5 @@ send_applet_change_orient (const char *ior, int id, int orient)
GNOME::Applet_var applet = GNOME::Applet::_narrow (obj);
/* Now, use corba to invoke the routine in the panel */
applet->change_orient(orient);
applet->change_orient(id,orient);
}
......@@ -3,7 +3,7 @@ BEGIN_GNOME_DECLS
void corba_gtk_main (int *argc, char ***argv, char *service_name, void *corba_object);
void panel_corba_gtk_main (int *argc, char ***argv, char *service_name);
void send_applet_session_save (const char *ior, int panel, int pos);
void send_applet_shutdown_applet (const char *ior);
void send_applet_change_orient (const char *ior, int orient);
void send_applet_session_save (const char *ior, int id, int panel, int pos);
void send_applet_shutdown_applet (const char *ior, int id);
void send_applet_change_orient (const char *ior, int id, int orient);
END_GNOME_DECLS
......@@ -135,7 +135,7 @@ save_applet_configuration(gpointer data, gpointer user_data)
if(info->type==APPLET_EXTERN) {
/*have the applet do it's own session saving*/
send_applet_session_save(info->id,panel,pos);
send_applet_session_save(info->id,(*num)-2,panel,pos);
fullpath = g_copy_strings(path,"path",NULL);
gnome_config_set_string(fullpath, info->params);
g_free(fullpath);
......@@ -292,9 +292,13 @@ panel_session_save (GnomeClient *client,
for(i=0,list=applets;list!=NULL;list = g_list_next(list),i++) {
info = list->data;
if(info->type == APPLET_EXTERN) {
send_applet_shutdown_applet(info->id);
puts("EXTERN");
send_applet_shutdown_applet(info->id,i);
puts("DONE");
} else {
puts("INTERNAL");
gtk_widget_unref(info->widget);
puts("DONE");
}
}
......@@ -307,10 +311,14 @@ panel_session_save (GnomeClient *client,
/*prevent searches through the g_list to speed
up this thing*/
puts("unreffing root menu");
gtk_widget_unref(root_menu);
puts("done");
/*FIXME: unref all menus here */
}
puts("AFTER_SESSION_SAVE");
/* Always successful. */
......@@ -323,7 +331,9 @@ panel_quit(void)
if (! GNOME_CLIENT_CONNECTED (client)) {
panel_session_save (client, 1, GNOME_SAVE_BOTH, 1,
GNOME_INTERACT_NONE, 0, NULL);
puts("BEFORE_GTK_MAIN_QUIT");
gtk_main_quit ();
puts("AFTER_GTK_MAIN_QUIT");
/* We don't want to return, because we've probably been
called from an applet which has since been dlclose()'d,
and we'd end up with a SEGV when we tried to return to
......
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