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

use unref for the menu instead of destroy

Thu May 18 22:26:22 2000  George Lebl <jirka@5z.com>

	* applet.c, menu.c, panel.c, session.c: use unref for the menu
	  instead of destroy
parent 6a769a3f
Thu May 18 22:26:22 2000 George Lebl <jirka@5z.com>
* applet.c, menu.c, panel.c, session.c: use unref for the menu
instead of destroy
2000-05-19 Dan Mueth <d-mueth@uchicago.edu>
* panel/help/C/panel.sgml: Edited Creating, Moving, and Removing
......
Thu May 18 22:26:22 2000 George Lebl <jirka@5z.com>
* applet.c, menu.c, panel.c, session.c: use unref for the menu
instead of destroy
2000-05-19 Dan Mueth <d-mueth@uchicago.edu>
* panel/help/C/panel.sgml: Edited Creating, Moving, and Removing
......
......@@ -60,6 +60,7 @@ panel_clean_applet(AppletInfo *info)
if(info->type == APPLET_STATUS) {
status_applet_put_offscreen(info->data);
}
/* destroy will remove it from the panel */
gtk_widget_destroy(info->widget);
info->widget = NULL;
}
......@@ -241,8 +242,8 @@ applet_add_callback(AppletInfo *info,
menu->menuitem=NULL;
menu->submenu=NULL;
}
gtk_widget_destroy(info->menu);
info->menu=NULL;
gtk_widget_unref(info->menu);
info->menu = NULL;
info->menu_age = 0;
}
}
......@@ -274,8 +275,8 @@ applet_remove_callback(AppletInfo *info, const char *callback_name)
menu->menuitem=NULL;
menu->submenu=NULL;
}
gtk_widget_destroy(info->menu);
info->menu=NULL;
gtk_widget_unref(info->menu);
info->menu = NULL;
info->menu_age = 0;
}
}
......@@ -300,8 +301,8 @@ applet_callback_set_sensitive(AppletInfo *info, const char *callback_name, int s
menu->menuitem=NULL;
menu->submenu=NULL;
}
gtk_widget_destroy(info->menu);
info->menu=NULL;
gtk_widget_unref(info->menu);
info->menu = NULL;
info->menu_age = 0;
}
}
......@@ -566,7 +567,7 @@ applet_destroy(GtkWidget *w, AppletInfo *info)
}
}
if(info->menu) {
gtk_widget_destroy(info->menu);
gtk_widget_unref(info->menu);
info->menu = NULL;
info->menu_age = 0;
}
......
......@@ -56,7 +56,7 @@ menu_age_timeout(gpointer data)
AppletInfo *info = li->data;
if(info->menu && info->menu_age++>=6 &&
!GTK_WIDGET_VISIBLE(info->menu)) {
gtk_widget_destroy(info->menu);
gtk_widget_unref(info->menu);
info->menu = NULL;
info->menu_age = 0;
}
......@@ -66,7 +66,7 @@ menu_age_timeout(gpointer data)
Menu *menu = info->data;
if(menu->menu && menu->age++>=6 &&
!GTK_WIDGET_VISIBLE(menu->menu)) {
gtk_widget_destroy(menu->menu);
gtk_widget_unref(menu->menu);
menu->menu = NULL;
menu->age = 0;
}
......@@ -81,7 +81,7 @@ menu_age_timeout(gpointer data)
PanelData *pd = li->data;
if(pd->menu && pd->menu_age++>=6 &&
!GTK_WIDGET_VISIBLE(pd->menu)) {
gtk_widget_destroy(pd->menu);
gtk_widget_unref(pd->menu);
pd->menu = NULL;
pd->menu_age = 0;
}
......
......@@ -585,7 +585,8 @@ panel_destroy(GtkWidget *widget, gpointer data)
}
if(pd->menu)
gtk_widget_destroy(pd->menu);
gtk_widget_unref(pd->menu);
pd->menu = NULL;
panel_list = g_slist_remove(panel_list,pd);
g_free(pd);
......
......@@ -112,14 +112,14 @@ apply_global_config(void)
for(li=applets;li!=NULL;li=g_slist_next(li)) {
AppletInfo *info = li->data;
if(info->menu) {
gtk_widget_destroy(info->menu);
gtk_widget_unref(info->menu);
info->menu = NULL;
info->menu_age = 0;
}
if(info->type == APPLET_MENU) {
Menu *menu = info->data;
if(menu->menu) {
gtk_widget_destroy(menu->menu);
gtk_widget_unref(menu->menu);
menu->menu = NULL;
menu->age = 0;
}
......@@ -128,7 +128,7 @@ apply_global_config(void)
for(li = panel_list; li != NULL; li = g_slist_next(li)) {
PanelData *pd = li->data;
if(pd->menu) {
gtk_widget_destroy(pd->menu);
gtk_widget_unref(pd->menu);
pd->menu = NULL;
pd->menu_age = 0;
}
......@@ -173,7 +173,7 @@ apply_global_config(void)
if ((menu_flags_old != global_config.menu_flags) &&
pd->menu) {
gtk_widget_destroy (pd->menu);
gtk_widget_unref (pd->menu);
pd->menu = NULL;
pd->menu_age = 0;
}
......
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