|
diff -u gbuffy-0.2.5/gbconfig.c newgbuffy/gbconfig.c
--- gbuffy-0.2.5/gbconfig.c Wed Mar 21 22:25:06 2001
+++ newgbuffy/gbconfig.c Fri Jun 6 13:57:42 2003
@@ -267,24 +267,68 @@
gtk_clist_select_row (GTK_CLIST (MailboxCList), x, 0);
}
+void box_free(BOX_INFO * box){
+ if (box->title)
+ FREE (&box->title);
+ if (box->path)
+ FREE (&box->path);
+ if (box->command)
+ FREE (&box->command);
+ if (box->server)
+ FREE (&box->server);
+ if (box->login)
+ FREE (&box->login);
+ if (box->pass)
+ FREE (&box->pass);
+ if (box->newsrc)
+ FREE (&box->newsrc);
+ if (box->w)
+ {
+ gtk_widget_destroy(GTK_WIDGET (box->w));
+ box->w = NULL;
+ }
+ if (box->button)
+ {
+ /* Should destroy the button, but for now forget it because it disrupts
+ the interface. */
+ /* Might be able to forget about it, in point of fact, because the call
+ to gtk_widget_destroy(MainWindow) should free up that memory. */
+ /* gtk_widget_destroy (GTK_WIDGET (box->button)); */
+ box->button = NULL;
+ }
+ if (box->headers)
+ {
+ g_list_free (box->headers);
+ }
+ if (box->pixmap)
+ gdk_pixmap_unref (box->pixmap);
+}
+
static void configure_delete (GtkWidget *button, gpointer data)
{
BOX_INFO *box, *last;
int row = 0;
last = box = MailboxInfo;
+ while(box != NULL && box->selected)
+ {
+ gtk_clist_remove(GTK_CLIST (MailboxCList), row);
+ box_free (box);
+ MailboxInfo = box->next;
+ last = box;
+ box = box->next;
+ free (last);
+ }
+
+ last = box;
while (box != NULL)
{
if (box->selected)
{
gtk_clist_remove (GTK_CLIST (MailboxCList), row);
- if (box->title)
- free (box->title);
- if (box->path)
- free (box->path);
- if (box->command)
- free (box->command);
+ box_free (box);
last->next = box->next;
+ free (box);
box = last->next;
}
else
Only in newgbuffy/: gbuffy
diff -u gbuffy-0.2.5/gbuffy.c newgbuffy/gbuffy.c
--- gbuffy-0.2.5/gbuffy.c Sun Oct 21 16:57:00 2001
+++ newgbuffy/gbuffy.c Thu Jun 5 22:50:48 2003
@@ -650,7 +650,7 @@
if (MainWindow != NULL)
{
DontExit = TRUE;
- gtk_widget_destroy (MainWindow);
+ gtk_widget_destroy (GTK_WIDGET (MainWindow));
}
MainWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
#endif
Common subdirectories: gbuffy-0.2.5/libcompface and newgbuffy/libcompface
|