| 53 GtkWidget *chat_notebook = NULL; |
53 GtkWidget *chat_notebook = NULL; |
| 54 |
54 |
| 55 |
55 |
| 56 static void destroy_prev_jc() |
56 static void destroy_prev_jc() |
| 57 { |
57 { |
| 58 GList *children, *curr; |
|
| 59 GtkWidget *w; |
|
| 60 if (!jc_vbox) |
58 if (!jc_vbox) |
| 61 return; |
59 return; |
| 62 |
60 |
| 63 children = g_list_copy(gtk_container_children(GTK_CONTAINER(jc_vbox))); |
61 while (GTK_BOX(jc_vbox)->children) |
| 64 for (curr = children; curr != NULL; curr = g_list_next(curr)) { |
62 gtk_container_remove(GTK_CONTAINER(jc_vbox), |
| 65 w = (GtkWidget *)curr->data; |
63 ((GtkBoxChild *)GTK_BOX(jc_vbox)->children->data)->widget); |
| 66 gtk_container_remove(GTK_CONTAINER(jc_vbox), w); |
|
| 67 } |
|
| 68 g_list_free(children); |
|
| 69 } |
64 } |
| 70 |
65 |
| 71 static void destroy_join_chat() |
66 static void destroy_join_chat() |
| 72 { |
67 { |
| 73 if (joinchat) |
68 if (joinchat) |