diff console/libgnt/gntwindow.c @ 14616:f1f1dcb26d89

[gaim-migrate @ 17344] Add a barebone menu in the buddylist for account actions. (Press Ctrl+o) committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 24 Sep 2006 17:07:38 +0000
parents 62bb53609a36
children b7e145ea9076
line wrap: on
line diff
--- a/console/libgnt/gntwindow.c	Sun Sep 24 16:35:31 2006 +0000
+++ b/console/libgnt/gntwindow.c	Sun Sep 24 17:07:38 2006 +0000
@@ -10,8 +10,8 @@
 static GntBoxClass *parent_class = NULL;
 static guint signals[SIGS] = { 0 };
 
-gboolean (*org_keypress)(GntWidget *widget, const char *text);
-void (*org_destroy)(GntWidget *widget);
+static gboolean (*org_keypress)(GntWidget *widget, const char *text);
+static void (*org_destroy)(GntWidget *widget);
 
 static gboolean
 gnt_window_key_pressed(GntWidget *widget, const char *text)
@@ -108,6 +108,9 @@
 
 void gnt_window_set_menu(GntWindow *window, GntMenu *menu)
 {
+	/* If a menu already existed, then destroy that first. */
+	if (window->menu)
+		gnt_widget_destroy(GNT_WIDGET(window->menu));
 	window->menu = menu;
 }