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

always look for an empty spot first unless insert_at_pos is given. But

Fri Jan 21 22:38:07 2000  George Lebl <jirka@5z.com>

	* panel-widget.c: always look for an empty spot first unless
	  insert_at_pos is given.  But then if that fails insert at
	  pos.

	* applet.[ch],menu.[ch],extern.[ch],drawer.[ch],logout.[ch],
	  swallow.[ch],status.[ch],session.c,panel.c: take an extra
	  argument to register_toy (exactpos) which specifies if to
	  look for an open spot or to insert exactly.  All the
	  load_*_applet have to take this parameter

	* panel.c: cleanup the drop stuff.  use extract_uris and copy
	  the extract_file func from HEAD gnome-libs and use that to get
	  local filenames.
parent dac58a13
Fri Jan 21 22:38:07 2000 George Lebl <jirka@5z.com>
* panel-widget.c: always look for an empty spot first unless
insert_at_pos is given. But then if that fails insert at
pos.
* applet.[ch],menu.[ch],extern.[ch],drawer.[ch],logout.[ch],
swallow.[ch],status.[ch],session.c,panel.c: take an extra
argument to register_toy (exactpos) which specifies if to
look for an open spot or to insert exactly. All the
load_*_applet have to take this parameter
* panel.c: cleanup the drop stuff. use extract_uris and copy
the extract_file func from HEAD gnome-libs and use that to get
local filenames.
Wed Jan 19 21:30:34 2000 George Lebl <jirka@5z.com> Wed Jan 19 21:30:34 2000 George Lebl <jirka@5z.com>
* extern.c,applet.c: cosmetic code changes, and add _() around * extern.c,applet.c: cosmetic code changes, and add _() around
......
Fri Jan 21 22:38:07 2000 George Lebl <jirka@5z.com>
* panel-widget.c: always look for an empty spot first unless
insert_at_pos is given. But then if that fails insert at
pos.
* applet.[ch],menu.[ch],extern.[ch],drawer.[ch],logout.[ch],
swallow.[ch],status.[ch],session.c,panel.c: take an extra
argument to register_toy (exactpos) which specifies if to
look for an open spot or to insert exactly. All the
load_*_applet have to take this parameter
* panel.c: cleanup the drop stuff. use extract_uris and copy
the extract_file func from HEAD gnome-libs and use that to get
local filenames.
Wed Jan 19 21:30:34 2000 George Lebl <jirka@5z.com> Wed Jan 19 21:30:34 2000 George Lebl <jirka@5z.com>
* extern.c,applet.c: cosmetic code changes, and add _() around * extern.c,applet.c: cosmetic code changes, and add _() around
......
...@@ -515,14 +515,17 @@ applet_destroy(GtkWidget *w, AppletInfo *info) ...@@ -515,14 +515,17 @@ applet_destroy(GtkWidget *w, AppletInfo *info)
g_list_free(info->user_menu); g_list_free(info->user_menu);
} }
int gboolean
register_toy(GtkWidget *applet, register_toy(GtkWidget *applet,
gpointer data, gpointer data,
PanelWidget *panel, PanelWidget *panel,
int pos, int pos,
gboolean exactpos,
AppletType type) AppletType type)
{ {
AppletInfo *info; AppletInfo *info;
int newpos;
gboolean insert_at_pos;
g_return_val_if_fail(applet != NULL, FALSE); g_return_val_if_fail(applet != NULL, FALSE);
g_return_val_if_fail(panel != NULL, FALSE); g_return_val_if_fail(panel != NULL, FALSE);
...@@ -574,11 +577,23 @@ register_toy(GtkWidget *applet, ...@@ -574,11 +577,23 @@ register_toy(GtkWidget *applet,
applets_to_sync = TRUE; applets_to_sync = TRUE;
/*add at the beginning if pos == -1*/ /*add at the beginning if pos == -1*/
if(panel_widget_add_full(panel, applet, pos>=0?pos:0, TRUE, if(pos>=0) {
pos>=0?FALSE:TRUE)==-1) { newpos = pos;
insert_at_pos = FALSE;
} else {
newpos = 0;
insert_at_pos = TRUE;
}
/* if exact pos is on then insert at that precise location */
if(exactpos)
insert_at_pos = TRUE;
if(panel_widget_add_full(panel, applet, newpos, TRUE,
insert_at_pos)==-1) {
GSList *list; GSList *list;
for(list = panels; list != NULL; list = g_slist_next(list)) for(list = panels; list != NULL; list = g_slist_next(list))
if(panel_widget_add_full(panel, applet, 0,TRUE,FALSE)!=-1) if(panel_widget_add_full(panel, applet, 0,
TRUE, TRUE)!=-1)
break; break;
if(!list) { if(!list) {
/*can't put it anywhere, clean up*/ /*can't put it anywhere, clean up*/
......
...@@ -53,11 +53,12 @@ struct _AppletInfo { ...@@ -53,11 +53,12 @@ struct _AppletInfo {
gpointer data; /*the per applet structure, if it exists*/ gpointer data; /*the per applet structure, if it exists*/
}; };
int register_toy(GtkWidget *applet, gboolean register_toy(GtkWidget *applet,
gpointer data, gpointer data,
PanelWidget *panel, PanelWidget *panel,
int pos, int pos,
AppletType type); gboolean exactpos,
AppletType type);
void panel_clean_applet(AppletInfo *info); void panel_clean_applet(AppletInfo *info);
......
...@@ -365,7 +365,7 @@ drawer_size_alloc(BasePWidget *basep, GtkAllocation *alloc, gpointer data) ...@@ -365,7 +365,7 @@ drawer_size_alloc(BasePWidget *basep, GtkAllocation *alloc, gpointer data)
void void
load_drawer_applet(int mypanel, char *pixmap, char *tooltip, load_drawer_applet(int mypanel, char *pixmap, char *tooltip,
PanelWidget *panel, int pos) PanelWidget *panel, int pos, gboolean exactpos)
{ {
Drawer *drawer; Drawer *drawer;
PanelOrientType orient = get_applet_orient(panel); PanelOrientType orient = get_applet_orient(panel);
...@@ -381,8 +381,8 @@ load_drawer_applet(int mypanel, char *pixmap, char *tooltip, ...@@ -381,8 +381,8 @@ load_drawer_applet(int mypanel, char *pixmap, char *tooltip,
g_return_if_fail(li != NULL); g_return_if_fail(li != NULL);
dr_pd = li->data; dr_pd = li->data;
drawer=create_drawer_applet(dr_pd->panel, tooltip, drawer = create_drawer_applet(dr_pd->panel, tooltip,
pixmap, orient); pixmap, orient);
drawer_widget_change_orient(DRAWER_WIDGET(dr_pd->panel), drawer_widget_change_orient(DRAWER_WIDGET(dr_pd->panel),
orient); orient);
...@@ -391,7 +391,17 @@ load_drawer_applet(int mypanel, char *pixmap, char *tooltip, ...@@ -391,7 +391,17 @@ load_drawer_applet(int mypanel, char *pixmap, char *tooltip,
if(!drawer) if(!drawer)
return; return;
register_toy(drawer->button,drawer, panel, pos, APPLET_DRAWER); {
GtkWidget *dw = drawer->drawer;
if(!register_toy(drawer->button,drawer,
panel, pos, exactpos, APPLET_DRAWER)) {
/* by this time drawer has been freed as register_toy
has destroyed drawer->button */
gtk_widget_destroy(dw);
return;
}
}
gtk_signal_connect_after(GTK_OBJECT(drawer->drawer), gtk_signal_connect_after(GTK_OBJECT(drawer->drawer),
"size_allocate", "size_allocate",
......
...@@ -17,7 +17,7 @@ typedef struct { ...@@ -17,7 +17,7 @@ typedef struct {
} Drawer; } Drawer;
void load_drawer_applet(int mypanel, char *pixmap, char *tooltip, void load_drawer_applet(int mypanel, char *pixmap, char *tooltip,
PanelWidget *panel, int pos); PanelWidget *panel, int pos, gboolean exactpos);
void set_drawer_applet_orient(Drawer *drawer, PanelOrientType orient); void set_drawer_applet_orient(Drawer *drawer, PanelOrientType orient);
......
...@@ -445,14 +445,14 @@ reserve_applet_spot (Extern *ext, PanelWidget *panel, int pos, ...@@ -445,14 +445,14 @@ reserve_applet_spot (Extern *ext, PanelWidget *panel, int pos,
g_return_val_if_fail(socket!=NULL,0); g_return_val_if_fail(socket!=NULL,0);
gtk_container_add(GTK_CONTAINER(ext->ebox),socket); gtk_container_add(GTK_CONTAINER(ext->ebox), socket);
gtk_widget_show_all (ext->ebox); gtk_widget_show_all(ext->ebox);
/*we save the obj in the id field of the appletinfo and the /*we save the obj in the id field of the appletinfo and the
path in the path field */ path in the path field */
ext->info = NULL; ext->info = NULL;
if(!register_toy(ext->ebox,ext,panel,pos,type)) { if(!register_toy(ext->ebox, ext, panel, pos, ext->exactpos, type)) {
/* the ebox is destroyed in register_toy */ /* the ebox is destroyed in register_toy */
ext->ebox = NULL; ext->ebox = NULL;
g_warning(_("Couldn't add applet")); g_warning(_("Couldn't add applet"));
...@@ -471,7 +471,8 @@ reserve_applet_spot (Extern *ext, PanelWidget *panel, int pos, ...@@ -471,7 +471,8 @@ reserve_applet_spot (Extern *ext, PanelWidget *panel, int pos,
} }
void void
load_extern_applet(char *goad_id, char *cfgpath, PanelWidget *panel, int pos, int queue) load_extern_applet(char *goad_id, char *cfgpath, PanelWidget *panel,
int pos, gboolean exactpos, gboolean queue)
{ {
Extern *ext; Extern *ext;
POA_GNOME_PanelSpot *panelspot_servant; POA_GNOME_PanelSpot *panelspot_servant;
...@@ -485,6 +486,7 @@ load_extern_applet(char *goad_id, char *cfgpath, PanelWidget *panel, int pos, in ...@@ -485,6 +486,7 @@ load_extern_applet(char *goad_id, char *cfgpath, PanelWidget *panel, int pos, in
ext = g_new0(Extern,1); ext = g_new0(Extern,1);
ext->started = FALSE; ext->started = FALSE;
ext->exactpos = exactpos;
ext->send_position = FALSE; ext->send_position = FALSE;
ext->send_draw = FALSE; ext->send_draw = FALSE;
ext->orient = -1; ext->orient = -1;
...@@ -610,6 +612,7 @@ s_panel_add_applet_full(POA_GNOME_Panel *servant, ...@@ -610,6 +612,7 @@ s_panel_add_applet_full(POA_GNOME_Panel *servant,
have already reserved a spot for it*/ have already reserved a spot for it*/
ext = g_new0(Extern,1); ext = g_new0(Extern,1);
ext->started = FALSE; ext->started = FALSE;
ext->exactpos = FALSE;
ext->send_position = FALSE; ext->send_position = FALSE;
ext->send_draw = FALSE; ext->send_draw = FALSE;
ext->orient = -1; ext->orient = -1;
......
...@@ -19,7 +19,8 @@ struct _Extern { ...@@ -19,7 +19,8 @@ struct _Extern {
char *goad_id; char *goad_id;
char *cfg; char *cfg;
GtkWidget *ebox; GtkWidget *ebox;
int started; gboolean started;
gboolean exactpos;
gboolean send_position; gboolean send_position;
gboolean send_draw; gboolean send_draw;
PanelOrientation orient; /* current orient, if it doesn't change, PanelOrientation orient; /* current orient, if it doesn't change,
...@@ -32,7 +33,8 @@ struct _Extern { ...@@ -32,7 +33,8 @@ struct _Extern {
}; };
void extern_clean(Extern *ext); void extern_clean(Extern *ext);
void load_extern_applet(char *goad_id, char *cfgpath, PanelWidget *panel, int pos, int queue); void load_extern_applet(char *goad_id, char *cfgpath, PanelWidget *panel,
int pos, gboolean exactpos, gboolean queue);
void load_queued_externs(void); void load_queued_externs(void);
void panel_corba_clean_up(void); void panel_corba_clean_up(void);
......
...@@ -67,9 +67,9 @@ launch (Launcher *launcher, int argc, char *argv[]) ...@@ -67,9 +67,9 @@ launch (Launcher *launcher, int argc, char *argv[])
goad_id = get_applet_goad_id_from_dentry(item); goad_id = get_applet_goad_id_from_dentry(item);
if(goad_id) { if(goad_id) {
load_extern_applet(goad_id,NULL, load_extern_applet(goad_id, NULL,
panels->data, panels->data,
0,FALSE); 0, FALSE, FALSE);
} else { } else {
g_warning(_("Can't get goad_id from desktop entry!")); g_warning(_("Can't get goad_id from desktop entry!"));
} }
...@@ -437,31 +437,34 @@ launcher_properties(Launcher *launcher) ...@@ -437,31 +437,34 @@ launcher_properties(Launcher *launcher)
void void
load_launcher_applet_full (char *params, GnomeDesktopEntry *dentry, load_launcher_applet_full (char *params, GnomeDesktopEntry *dentry,
PanelWidget *panel, int pos) PanelWidget *panel, int pos, gboolean exactpos)
{ {
Launcher *launcher; Launcher *launcher;
launcher = create_launcher(params,dentry); launcher = create_launcher(params,dentry);
if(launcher) { if(!launcher)
register_toy(launcher->button,launcher, panel, pos, return;
APPLET_LAUNCHER);
gtk_tooltips_set_tip (panel_tooltips, if(!register_toy(launcher->button, launcher, panel, pos, exactpos,
launcher->button, APPLET_LAUNCHER))
launcher->dentry->comment,NULL); return;
applet_add_callback(applets_last->data,"properties", gtk_tooltips_set_tip (panel_tooltips,
GNOME_STOCK_MENU_PROP, launcher->button,
_("Properties...")); launcher->dentry->comment,NULL);
}
applet_add_callback(applets_last->data,"properties",
GNOME_STOCK_MENU_PROP,
_("Properties..."));
} }
static void static void
really_add_launcher(GtkWidget *d,int button, gpointer data) really_add_launcher(GtkWidget *d, int button, gpointer data)
{ {
GnomeDEntryEdit *dedit = GNOME_DENTRY_EDIT(data); GnomeDEntryEdit *dedit = GNOME_DENTRY_EDIT(data);
int pos = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(d),"pos")); int pos = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(d),"pos"));
gboolean exactpos = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(d),"exactpos"));
PanelWidget *panel = gtk_object_get_data(GTK_OBJECT(d),"panel"); PanelWidget *panel = gtk_object_get_data(GTK_OBJECT(d),"panel");
GnomeDesktopEntry *dentry; GnomeDesktopEntry *dentry;
...@@ -472,14 +475,14 @@ really_add_launcher(GtkWidget *d,int button, gpointer data) ...@@ -472,14 +475,14 @@ really_add_launcher(GtkWidget *d,int button, gpointer data)
g_free(dentry->name); g_free(dentry->name);
dentry->name=g_strdup("???"); dentry->name=g_strdup("???");
} }
load_launcher_applet_full (NULL, dentry, panel, pos); load_launcher_applet_full (NULL, dentry, panel, pos, exactpos);
panel_config_sync(); panel_config_sync();
} }
gtk_widget_destroy(d); gtk_widget_destroy(d);
} }
void void
ask_about_launcher(char *file, PanelWidget *panel, int pos) ask_about_launcher(char *file, PanelWidget *panel, int pos, gboolean exactpos)
{ {
GtkWidget *d; GtkWidget *d;
GtkWidget *notebook; GtkWidget *notebook;
...@@ -512,6 +515,8 @@ ask_about_launcher(char *file, PanelWidget *panel, int pos) ...@@ -512,6 +515,8 @@ ask_about_launcher(char *file, PanelWidget *panel, int pos)
gtk_object_set_data(GTK_OBJECT(d),"pos", GINT_TO_POINTER(pos)); gtk_object_set_data(GTK_OBJECT(d),"pos", GINT_TO_POINTER(pos));
gtk_object_set_data(GTK_OBJECT(d),"exactpos",
GINT_TO_POINTER(exactpos));
gtk_object_set_data(GTK_OBJECT(d),"panel",panel); gtk_object_set_data(GTK_OBJECT(d),"panel",panel);
gtk_signal_connect(GTK_OBJECT(d),"clicked", gtk_signal_connect(GTK_OBJECT(d),"clicked",
...@@ -528,7 +533,8 @@ ask_about_launcher(char *file, PanelWidget *panel, int pos) ...@@ -528,7 +533,8 @@ ask_about_launcher(char *file, PanelWidget *panel, int pos)
void void
load_launcher_applet_from_info(char *name, char *comment, load_launcher_applet_from_info(char *name, char *comment,
char **exec, int execn, char *icon, char **exec, int execn, char *icon,
PanelWidget *panel, int pos) PanelWidget *panel, int pos,
gboolean exactpos)
{ {
GnomeDesktopEntry *dentry = g_new0(GnomeDesktopEntry,1); GnomeDesktopEntry *dentry = g_new0(GnomeDesktopEntry,1);
dentry->name = g_strdup(name); dentry->name = g_strdup(name);
...@@ -542,14 +548,15 @@ load_launcher_applet_from_info(char *name, char *comment, ...@@ -542,14 +548,15 @@ load_launcher_applet_from_info(char *name, char *comment,
dentry->type = g_strdup("Application"); dentry->type = g_strdup("Application");
load_launcher_applet_full (NULL,dentry,panel, pos); load_launcher_applet_full (NULL, dentry, panel, pos, exactpos);
panel_config_sync(); panel_config_sync();
} }
void void
load_launcher_applet_from_info_url(char *name, char *comment, load_launcher_applet_from_info_url(char *name, char *comment,
char *url, char *icon, char *url, char *icon,
PanelWidget *panel, int pos) PanelWidget *panel, int pos,
gboolean exactpos)
{ {
char *exec[] = { NULL, NULL }; char *exec[] = { NULL, NULL };
GnomeDesktopEntry *dentry = g_new0(GnomeDesktopEntry,1); GnomeDesktopEntry *dentry = g_new0(GnomeDesktopEntry,1);
...@@ -564,12 +571,13 @@ load_launcher_applet_from_info_url(char *name, char *comment, ...@@ -564,12 +571,13 @@ load_launcher_applet_from_info_url(char *name, char *comment,
dentry->icon = g_strdup(icon); dentry->icon = g_strdup(icon);
dentry->type = g_strdup("URL"); dentry->type = g_strdup("URL");
load_launcher_applet_full (NULL,dentry,panel, pos); load_launcher_applet_full(NULL, dentry, panel, pos, exactpos);
panel_config_sync(); panel_config_sync();
} }
void void
load_launcher_applet(char *params, PanelWidget *panel, int pos) load_launcher_applet(char *params, PanelWidget *panel, int pos,
gboolean exactpos)
{ {
load_launcher_applet_full (params,NULL,panel, pos); load_launcher_applet_full(params, NULL, panel, pos, exactpos);
} }
...@@ -22,17 +22,21 @@ typedef struct { ...@@ -22,17 +22,21 @@ typedef struct {
} Launcher; } Launcher;
void load_launcher_applet_full(char *params, GnomeDesktopEntry *dentry, void load_launcher_applet_full(char *params, GnomeDesktopEntry *dentry,
PanelWidget *panel, int pos); PanelWidget *panel, int pos, gboolean exactpos);
void load_launcher_applet(char *params, PanelWidget *panel, int pos); void load_launcher_applet(char *params, PanelWidget *panel, int pos,
gboolean exactpos);
void load_launcher_applet_from_info(char *name, char *comment, void load_launcher_applet_from_info(char *name, char *comment,
char **exec, int execn, char *icon, char **exec, int execn, char *icon,
PanelWidget *panel, int pos); PanelWidget *panel, int pos,
gboolean exactpos);
void load_launcher_applet_from_info_url(char *name, char *comment, void load_launcher_applet_from_info_url(char *name, char *comment,
char *url, char *icon, char *url, char *icon,
PanelWidget *panel, int pos); PanelWidget *panel, int pos,
gboolean exactpos);
void launcher_properties(Launcher *launcher); void launcher_properties(Launcher *launcher);
void ask_about_launcher(char *file, PanelWidget *panel, int pos); void ask_about_launcher(char *file, PanelWidget *panel, int pos,
gboolean exactpos);
END_GNOME_DECLS END_GNOME_DECLS
......
...@@ -53,14 +53,15 @@ create_logout_widget(void) ...@@ -53,14 +53,15 @@ create_logout_widget(void)
} }
void void
load_logout_applet(PanelWidget *panel, int pos) load_logout_applet(PanelWidget *panel, int pos, gboolean exactpos)
{ {
GtkWidget *logout; GtkWidget *logout;
logout = create_logout_widget(); logout = create_logout_widget();
if(!logout)
return;
if(logout) register_toy(logout, NULL, panel, pos, exactpos, APPLET_LOGOUT);
register_toy(logout, NULL, panel, pos, APPLET_LOGOUT);
} }
static GtkWidget * static GtkWidget *
...@@ -86,13 +87,14 @@ create_lock_widget(void) ...@@ -86,13 +87,14 @@ create_lock_widget(void)
} }
void void
load_lock_applet(PanelWidget *panel, int pos) load_lock_applet(PanelWidget *panel, int pos, gboolean exactpos)
{ {
GtkWidget *lock; GtkWidget *lock;
lock = create_lock_widget(); lock = create_lock_widget();
if(lock) if(!lock)
register_toy(lock, NULL, panel, pos, APPLET_LOCK); return;
register_toy(lock, NULL, panel, pos, exactpos, APPLET_LOCK);
} }
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
BEGIN_GNOME_DECLS BEGIN_GNOME_DECLS
void load_logout_applet(PanelWidget *panel, int pos); void load_logout_applet(PanelWidget *panel, int pos, gboolean exactpos);
void load_lock_applet(PanelWidget *panel, int pos); void load_lock_applet(PanelWidget *panel, int pos, gboolean exactpos);
END_GNOME_DECLS END_GNOME_DECLS
......
...@@ -354,7 +354,7 @@ remove_menuitem (GtkWidget *widget, char *item_loc) ...@@ -354,7 +354,7 @@ remove_menuitem (GtkWidget *widget, char *item_loc)
static void static void
add_app_to_panel (GtkWidget *widget, char *item_loc) add_app_to_panel (GtkWidget *widget, char *item_loc)
{ {
load_launcher_applet(item_loc, current_panel,0); load_launcher_applet(item_loc, current_panel, 0, FALSE);
} }
...@@ -386,8 +386,7 @@ add_drawers_from_dir(char *dirname, char *name, int pos, PanelWidget *panel) ...@@ -386,8 +386,7 @@ add_drawers_from_dir(char *dirname, char *name, int pos, PanelWidget *panel)
subdir_name = name; subdir_name = name;
pixmap_name = item_info?item_info->icon:NULL; pixmap_name = item_info?item_info->icon:NULL;
load_drawer_applet(-1,pixmap_name,subdir_name, load_drawer_applet(-1, pixmap_name, subdir_name, panel, pos, FALSE);
panel,pos);
g_return_if_fail(applets_last!=NULL); g_return_if_fail(applets_last!=NULL);
info = applets_last->data; info = applets_last->data;
...@@ -425,7 +424,8 @@ add_drawers_from_dir(char *dirname, char *name, int pos, PanelWidget *panel) ...@@ -425,7 +424,8 @@ add_drawers_from_dir(char *dirname, char *name, int pos, PanelWidget *panel)
load_launcher_applet_full (filename, load_launcher_applet_full (filename,
dentry, dentry,
newpanel, newpanel,
INT_MAX/2); INT_MAX/2,
FALSE);
} }
} }
g_free(filename); g_free(filename);
...@@ -464,9 +464,9 @@ add_menu_to_panel (GtkWidget *widget, gpointer data) ...@@ -464,9 +464,9 @@ add_menu_to_panel (GtkWidget *widget, gpointer data)
flags |= MAIN_MENU_DEBIAN_SUB; flags |= MAIN_MENU_DEBIAN_SUB;
if(mf) if(mf)
load_menu_applet(mf->menudir,flags, current_panel, 0); load_menu_applet(mf->menudir, flags, current_panel, 0, FALSE);
else else
load_menu_applet(NULL,flags, current_panel, 0); load_menu_applet(NULL, flags, current_panel, 0, FALSE);
} }
static PanelWidget * static PanelWidget *
...@@ -1167,24 +1167,26 @@ setup_applet_drag (GtkWidget *menuitem, char *goad_id) ...@@ -1167,24 +1167,26 @@ setup_applet_drag (GtkWidget *menuitem, char *goad_id)
static void static void
add_drawer_to_panel (GtkWidget *widget, gpointer data) add_drawer_to_panel (GtkWidget *widget, gpointer data)
{ {
load_drawer_applet(-1,NULL,NULL, get_panel_from_menu_data(widget->parent), 0); load_drawer_applet(-1, NULL, NULL,
get_panel_from_menu_data(widget->parent), 0, FALSE);
} }
static void static void
add_logout_to_panel (GtkWidget *widget, gpointer data) add_logout_to_panel (GtkWidget *widget, gpointer data)
{ {
load_logout_applet(get_panel_from_menu_data(widget->parent), 0); load_logout_applet(get_panel_from_menu_data(widget->parent), 0, FALSE);
} }
static void static void
add_lock_to_panel (GtkWidget *widget, gpointer data) add_lock_to_panel (GtkWidget *widget, gpointer data)
{ {
load_lock_applet(get_panel_from_menu_data(widget->parent), 0); load_lock_applet(get_panel_from_menu_data(widget->parent), 0, FALSE);
} }
static void static void
try_add_status_to_panel (GtkWidget *widget, gpointer data) try_add_status_to_panel (GtkWidget *widget, gpointer data)
{ {
if(!load_status_applet(get_panel_from_menu_data(widget->parent), 0)) { if(!load_status_applet(get_panel_from_menu_data(widget->parent),
0, FALSE)) {
GtkWidget *mbox; GtkWidget *mbox;
mbox = gnome_message_box_new(_("You already have a status " mbox = gnome_message_box_new(_("You already have a status "
"dock on the panel. You can " "dock on the panel. You can "
...@@ -1217,9 +1219,9 @@ add_applet (GtkWidget *w, char *item_loc) ...@@ -1217,9 +1219,9 @@ add_applet (GtkWidget *w, char *item_loc)
gnome_error_dialog(_("Can't get goad_id from desktop entry!")); gnome_error_dialog(_("Can't get goad_id from desktop entry!"));
return; return;
} }
load_extern_applet(goad_id,NULL, load_extern_applet(goad_id, NULL,
get_panel_from_menu_data(w->parent), get_panel_from_menu_data(w->parent),
0,FALSE); 0, FALSE, FALSE);
g_free(goad_id); g_free(goad_id);
} }
...@@ -2371,13 +2373,13 @@ current_panel_config(GtkWidget *w, gpointer data) ...@@ -2371,13 +2373,13 @@ current_panel_config(GtkWidget *w, gpointer data)
static void static void
ask_about_launcher_cb(GtkWidget *w, gpointer data) ask_about_launcher_cb(GtkWidget *w, gpointer data)
{ {
ask_about_launcher(NULL,get_panel_from_menu_data(w->parent),0); ask_about_launcher(NULL, get_panel_from_menu_data(w->parent), 0, FALSE);
} }
static void static void
ask_about_swallowing_cb(GtkWidget *w, gpointer data) ask_about_swallowing_cb(GtkWidget *w, gpointer data)
{ {
ask_about_swallowing(get_panel_from_menu_data(w->parent),0); ask_about_swallowing(get_panel_from_menu_data(w->parent), 0, FALSE);
} }
static void static void
...@@ -3701,26 +3703,27 @@ set_menu_applet_orient(Menu *menu, PanelOrientType orient) ...@@ -3701,26 +3703,27 @@ set_menu_applet_orient(Menu *menu, PanelOrientType orient)
void void
load_menu_applet(char *params, int main_menu_flags, load_menu_applet(char *params, int main_menu_flags,
PanelWidget *panel, int pos) PanelWidget *panel, int pos, gboolean exactpos)
{ {
Menu *menu; Menu *menu;
menu = create_menu_applet(params, ORIENT_UP,main_menu_flags); menu = create_menu_applet(params, ORIENT_UP, main_menu_flags);