aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2008-04-19 18:39:58 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2008-04-19 18:39:58 +0000
commit8d3fdd545638332ced8e1d2acf4ff464e0b383f4 (patch)
tree115e2909199357dd8208e26424ee5f5e6ca03fd2
parentc66c1a0ae57606e59257efdd8e9dfa28000d9341 (diff)
I'v fixed the bug reported by Stig that no items appear and also ..
from Jim Young: The attached patch simply tests for a non-NULL welcome_file_panel_vb before attempting to get the child_list. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25120 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--gtk/main_welcome.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/gtk/main_welcome.c b/gtk/main_welcome.c
index 292263a800..a8fefd6afb 100644
--- a/gtk/main_welcome.c
+++ b/gtk/main_welcome.c
@@ -135,6 +135,7 @@ scroll_box_dynamic_add(GtkWidget *parent_box)
gtk_container_remove(GTK_CONTAINER(parent_box), child_box);
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw),
child_box);
+ gtk_widget_show_all(scrollw);
}
return child_box;
@@ -418,16 +419,18 @@ main_welcome_reset_recent_capture_files()
GList* child_list_item;
- child_box = scroll_box_dynamic_reset(welcome_file_panel_vb);
- child_list = gtk_container_get_children(GTK_CONTAINER(child_box));
- child_list_item = child_list;
+ if(welcome_file_panel_vb) {
+ child_box = scroll_box_dynamic_reset(welcome_file_panel_vb);
+ child_list = gtk_container_get_children(GTK_CONTAINER(child_box));
+ child_list_item = child_list;
- while(child_list_item) {
- gtk_container_remove(GTK_CONTAINER(child_box), child_list_item->data);
- child_list_item = g_list_next(child_list_item);
- }
+ while(child_list_item) {
+ gtk_container_remove(GTK_CONTAINER(child_box), child_list_item->data);
+ child_list_item = g_list_next(child_list_item);
+ }
- g_list_free(child_list);
+ g_list_free(child_list);
+ }
}