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

start up launcher_applet in main and kill it on exit

Tue Apr 14 20:04:07 1998  George Lebl  <jirka@5z.com>

        * panel.c,menu.c: start up launcher_applet in main
          and kill it on exit

        * panel.sh: removed starting of launcher
parent 5ba06fd9
Tue Apr 14 20:04:07 1998 George Lebl <jirka@5z.com>
* panel.c,menu.c: start up launcher_applet in main
and kill it on exit
* panel.sh: removed starting of launcher
Tue Apr 14 19:17:33 1998 George Lebl <jirka@5z.com>
* menu.c: made swallows and drawers compile time
selectable
Tue Apr 14 18:33:21 1998 George Lebl <jirka@5z.com>
* panel-widget.c: I must be dumb ... 1 is not the
......
Tue Apr 14 20:04:07 1998 George Lebl <jirka@5z.com>
* panel.c,menu.c: start up launcher_applet in main
and kill it on exit
* panel.sh: removed starting of launcher
Tue Apr 14 19:17:33 1998 George Lebl <jirka@5z.com>
* menu.c: made swallows and drawers compile time
selectable
Tue Apr 14 18:33:21 1998 George Lebl <jirka@5z.com>
* panel-widget.c: I must be dumb ... 1 is not the
......
......@@ -3,6 +3,8 @@
## We require new-style dependency handling.
AUTOMAKE_OPTIONS = 1.2f
CFLAGS += -DUSE_INTERNAL_LAUNCHER -DDRAWER_AND_SWALLOW
CXX = mico-c++
## We set this to force the values in mico-c++ to be used. Otherwise,
## on Linux boxes, the compilation will fail with the default
......
......@@ -85,7 +85,7 @@ main(int argc, char *argv[])
gnome_init("logout_applet", NULL, argc, argv, 0, NULL);
if (!gnome_panel_applet_init_corba())
g_error(stderr, "Could not communicate with the panel\n");
g_error("Could not communicate with the panel\n");
result = gnome_panel_applet_request_id(myinvoc, &applet_id,
&cfgpath, &globcfgpath,
......
......@@ -3,6 +3,7 @@
*
* Authors: Federico Mena
* Miguel de Icaza
* George Lebl
*/
#include <config.h>
......@@ -18,6 +19,10 @@
#include "mico-parse.h"
#include "panel-util.h"
#ifdef USE_INTERNAL_LAUNCHER
int launcher_pid=0;
#endif
/*GList *panels = NULL;*/
GList *applets = NULL;
......@@ -160,7 +165,7 @@ load_applet(char *id, char *params, int pos, int panel, char *cfgpath)
swallow = create_swallow_applet(params, SWALLOW_HORIZONTAL);
register_toy(swallow->table,NULL,swallow,MENU_ID,params,pos,
register_toy(swallow->table,NULL,swallow,SWALLOW_ID,params,pos,
panel,NULL,APPLET_SWALLOW);
}
}
......@@ -685,6 +690,18 @@ main(int argc, char **argv)
bindtextdomain(PACKAGE, GNOMELOCALEDIR);
textdomain(PACKAGE);
#ifdef USE_INTERNAL_LAUNCHER
launcher_pid=fork();
if(launcher_pid==-1)
g_error("Can't fork!");
if(launcher_pid==0) {
execlp("launcher_applet","launcher_applet",NULL);
g_error("Can't execlp!");
_exit(1);
}
#endif
client = gnome_client_new_default ();
gtk_signal_connect (GTK_OBJECT (client), "save_yourself",
GTK_SIGNAL_FUNC (panel_session_save), NULL);
......
......@@ -19,7 +19,6 @@
#include "menu.h"
#include "mico-glue.h"
#define SMALL_ICON_SIZE 20
#define BIG_ICON_SIZE 48
......@@ -393,6 +392,7 @@ create_panel_submenu (GtkWidget *app_menu)
(GtkSignalFunc) add_applet_to_panel_data,
MENU_ID);
#ifdef DRAWER_AND_SWALLOW
menuitem = gtk_menu_item_new ();
setup_menuitem (menuitem, 0, _("Add drawer"));
gtk_menu_append (GTK_MENU (menu), menuitem);
......@@ -406,6 +406,7 @@ create_panel_submenu (GtkWidget *app_menu)
gtk_signal_connect(GTK_OBJECT(menuitem), "activate",
(GtkSignalFunc) add_applet_to_panel_data,
SWALLOW_ID);
#endif
add_menu_separator(menu);
......
......@@ -131,8 +131,6 @@ panel_corba_clean_up(void)
name = g_copy_strings ("/CORBA-servers/Panel-", hostname, NULL);
puts("cleaning...");
puts(name);
if(gnome_config_has_section(name))
gnome_config_clean_section(name);
......
#include <string.h>
#include <glib.h>
#include <fcntl.h>
......
......@@ -1648,7 +1648,7 @@ panel_widget_applet_move_to_cursor(PanelWidget *panel)
PANEL_WIDGET(list->data);
if(panel != new_panel &&
panel_widget_is_cursor(new_panel,0) &&
panel_widget_is_cursor(new_panel,20) &&
new_panel != assoc) {
pos = panel_widget_get_moveby(panel,0);
panel_widget_reparent(panel,
......@@ -1664,7 +1664,10 @@ panel_widget_applet_move_to_cursor(PanelWidget *panel)
return FALSE;
}
}
return TRUE;
/*FIXME: without this it's sometimes hard to get
applets onto drawers, but it's an annoying
behaviour*/
/*return TRUE;*/
}
gtk_widget_get_pointer(panel->fixed, &x, &y);
......
......@@ -3,10 +3,12 @@
*
* Authors: Federico Mena
* Miguel de Icaza
* George Lebl
*/
#include <config.h>
#include <string.h>
#include <signal.h>
#include <gnome.h>
#include "panel-widget.h"
......@@ -39,6 +41,10 @@ extern GlobalConfig global_config;
extern char *panel_cfg_path;
#ifdef USE_INTERNAL_LAUNCHER
extern int launcher_pid;
#endif
void
apply_global_config(void)
{
......@@ -311,6 +317,10 @@ panel_quit(void)
if (! GNOME_CLIENT_CONNECTED (client)) {
panel_session_save (client, 1, GNOME_SAVE_BOTH, 1,
GNOME_INTERACT_NONE, 0, NULL);
#ifdef USE_INTERNAL_LAUNCHER
puts("killing launcher");
kill(launcher_pid,SIGTERM);
#endif
gtk_exit (0);
} else {
/* We request a completely interactive, full, slow shutdown. */
......
......@@ -6,7 +6,9 @@
#launcher_applet and that should be persistent though more then
#one panel sessions. that works but I've had it not work a few
#times so this works 100% even though it's not very "clean"
kill `ps x|awk '/[l]auncher_applet/ {print $1}'`
launcher_applet &
#now started in panel binary
#kill `ps x|awk '/[l]auncher_applet/ {print $1}'`
#launcher_applet &
panel
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