From 773285dc1b29d1e9352db9610f4fe369c530904c Mon Sep 17 00:00:00 2001 From: Peter Hatina Date: Mon, 18 Mar 2013 11:46:55 +0100 Subject: [PATCH] return to gtk2 --- wireshark-1.8.x-gtk3-layouts.patch | 1648 ---------------------------- wireshark.spec | 9 +- 2 files changed, 5 insertions(+), 1652 deletions(-) delete mode 100644 wireshark-1.8.x-gtk3-layouts.patch diff --git a/wireshark-1.8.x-gtk3-layouts.patch b/wireshark-1.8.x-gtk3-layouts.patch deleted file mode 100644 index 7673cd6..0000000 --- a/wireshark-1.8.x-gtk3-layouts.patch +++ /dev/null @@ -1,1648 +0,0 @@ -diff --git a/ui/gtk/bootp_stat.c b/ui/gtk/bootp_stat.c -index 246e305..3b4895e 100644 ---- a/ui/gtk/bootp_stat.c -+++ b/ui/gtk/bootp_stat.c -@@ -228,7 +228,7 @@ dhcpstat_init(const char *optarg, void *userdata _U_) - - /* Status Codes frame */ - message_type_fr = gtk_frame_new("DHCP Message Type"); -- gtk_container_add(GTK_CONTAINER(vbox), message_type_fr); -+ gtk_box_pack_start(GTK_BOX (vbox), message_type_fr, FALSE, TRUE, 0); - gtk_widget_show(message_type_fr); - - sp->table_message_type = gtk_table_new( 0, 4, FALSE); -diff --git a/ui/gtk/capture_dlg.c b/ui/gtk/capture_dlg.c -index f0d1115..eeaca87 100644 ---- a/ui/gtk/capture_dlg.c -+++ b/ui/gtk/capture_dlg.c -@@ -1227,7 +1227,7 @@ capture_remote_cb(GtkWidget *w, gboolean focus_username) - - /* Authentication options frame */ - auth_fr = gtk_frame_new("Authentication"); -- gtk_container_add(GTK_CONTAINER(main_vb), auth_fr); -+ gtk_box_pack_start(GTK_BOX (main_vb), auth_fr, TRUE, TRUE, 0); - - auth_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 3, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(auth_vb), 5); -@@ -1428,7 +1428,7 @@ options_remote_cb(GtkWidget *w _U_, gpointer d _U_) - - /* Remote capture options */ - capture_fr = gtk_frame_new("Capture Options"); -- gtk_container_add(GTK_CONTAINER(main_vb), capture_fr); -+ gtk_box_pack_start(GTK_BOX (main_vb), capture_fr, TRUE, TRUE, 0); - - capture_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(capture_vb), 5); -@@ -1437,17 +1437,18 @@ options_remote_cb(GtkWidget *w _U_, gpointer d _U_) - nocap_rpcap_cb = gtk_check_button_new_with_mnemonic("Do not capture own RPCAP traffic"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(nocap_rpcap_cb), - device.remote_opts.remote_host_opts.nocap_rpcap); -- gtk_container_add(GTK_CONTAINER(capture_vb), nocap_rpcap_cb); -+ gtk_box_pack_start(GTK_BOX (capture_vb), nocap_rpcap_cb, TRUE, TRUE, 0); - - datatx_udp_cb = gtk_check_button_new_with_mnemonic("Use UDP for data transfer"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(datatx_udp_cb), - device.remote_opts.remote_host_opts.datatx_udp); -- gtk_container_add(GTK_CONTAINER(capture_vb), datatx_udp_cb); -+ gtk_box_pack_start(GTK_BOX (capture_vb), datatx_udp_cb, TRUE, TRUE, 0); -+ - - #ifdef HAVE_PCAP_SETSAMPLING - /* Sampling options */ - sampling_fr = gtk_frame_new("Sampling Options"); -- gtk_container_add(GTK_CONTAINER(main_vb), sampling_fr); -+ gtk_box_pack_start(GTK_BOX (main_vb), sampling_fr, TRUE, TRUE, 0); - - sampling_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(sampling_vb), 5); -@@ -1960,7 +1961,7 @@ void options_interface_cb(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColum - - /* Capture-related options frame */ - capture_fr = gtk_frame_new("Capture"); -- gtk_container_add(GTK_CONTAINER(main_vb), capture_fr); -+ gtk_box_pack_start(GTK_BOX (main_vb), capture_fr, TRUE, TRUE, 0); - - capture_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 3, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(capture_vb), 5); -@@ -3213,24 +3214,24 @@ show_add_interfaces_dialog(void) - tmp = gtk_label_new("Pipes"); - gtk_widget_show(tmp); - hbox = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(hbox), tmp); -+ gtk_box_pack_start(GTK_BOX (hbox), tmp, TRUE, TRUE, 0); - - gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, hbox); - - /* Pipe row */ - pipe_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 20, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(pipe_hb), 5); -- gtk_box_pack_start(GTK_BOX(temp_page), pipe_hb, FALSE, FALSE, 0); -+ gtk_box_pack_start(GTK_BOX(temp_page), pipe_hb, TRUE, TRUE, 0); - - /* Container for each row of widgets */ - pipe_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(pipe_vb), 0); -- gtk_container_add(GTK_CONTAINER(pipe_hb), pipe_vb); -+ gtk_box_pack_start(GTK_BOX (pipe_hb), pipe_vb, TRUE, TRUE, 0); - gtk_widget_show(pipe_vb); - - /* Top row: Buttons and pipe list */ - top_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0, FALSE); -- gtk_container_add(GTK_CONTAINER(pipe_vb), top_hb); -+ gtk_box_pack_start(GTK_BOX (pipe_vb), top_hb, TRUE, TRUE, 0); - gtk_widget_show(top_hb); - - edit_fr = gtk_frame_new(""); -@@ -3300,7 +3301,7 @@ show_add_interfaces_dialog(void) - gtk_widget_show(props_vb); - - middle_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(props_vb), middle_hb); -+ gtk_box_pack_start(GTK_BOX (props_vb), middle_hb, TRUE, TRUE, 0); - gtk_widget_show(middle_hb); - - pipe_lb = gtk_label_new("Pipe:"); -@@ -3321,7 +3322,7 @@ show_add_interfaces_dialog(void) - g_signal_connect(pipe_bt, "clicked", G_CALLBACK(capture_prep_pipe_cb), pipe_te); - - bbox = dlg_button_row_new(GTK_STOCK_SAVE, GTK_STOCK_CLOSE, NULL); -- gtk_box_pack_start(GTK_BOX(temp_page), bbox, TRUE, FALSE, 5); -+ gtk_box_pack_start(GTK_BOX(temp_page), bbox, FALSE, FALSE, 5); - - add_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_SAVE); - g_signal_connect(add_bt, "clicked", G_CALLBACK(add_pipe_cb), new_interfaces_w); -@@ -3341,12 +3342,13 @@ show_add_interfaces_dialog(void) - tmp = gtk_label_new("Local Interfaces"); - gtk_widget_show(tmp); - hbox = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(hbox), tmp); -+ gtk_box_pack_start(GTK_BOX (hbox), tmp, TRUE, TRUE, 0); - gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, hbox); - - local_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(local_vb), 0); -- gtk_container_add(GTK_CONTAINER(temp_page), local_vb); -+ //gtk_container_add(GTK_CONTAINER(temp_page), local_vb); -+ gtk_box_pack_start(GTK_BOX(temp_page), local_vb, TRUE, TRUE, 0); - gtk_widget_show(local_vb); - - local_fr = gtk_frame_new("Local Interfaces"); -@@ -3384,7 +3386,7 @@ show_add_interfaces_dialog(void) - - bbox = dlg_button_row_new(GTK_STOCK_REFRESH, GTK_STOCK_APPLY, GTK_STOCK_CLOSE, NULL); - -- gtk_box_pack_start(GTK_BOX(temp_page), bbox, TRUE, FALSE, 5); -+ gtk_box_pack_start(GTK_BOX(temp_page), bbox, FALSE, FALSE, 5); - refresh_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_REFRESH); - g_signal_connect(refresh_bt, "clicked", G_CALLBACK(rescan_local_cb), NULL); - gtk_widget_set_tooltip_text(GTK_WIDGET(refresh_bt), "Rescan the local interfaces and refresh the list"); -@@ -3407,7 +3409,7 @@ show_add_interfaces_dialog(void) - tmp = gtk_label_new("Remote Interfaces"); - gtk_widget_show(tmp); - hbox = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(hbox), tmp); -+ gtk_box_pack_start(GTK_BOX (hbox), tmp, TRUE, TRUE, 0); - gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, hbox); - - remote_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE); -@@ -3631,7 +3633,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_) - - /* Capture-related options frame */ - capture_fr = gtk_frame_new("Capture"); -- gtk_container_add(GTK_CONTAINER(main_vb), capture_fr); -+ gtk_box_pack_start(GTK_BOX (main_vb), capture_fr, TRUE, TRUE, 0); - - capture_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 3, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(capture_vb), 5); -@@ -3779,7 +3781,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_) - - /* Capture file-related options frame */ - file_fr = gtk_frame_new("Capture File(s)"); -- gtk_container_add(GTK_CONTAINER(left_vb), file_fr); -+ gtk_box_pack_start(GTK_BOX (left_vb), file_fr, TRUE, TRUE, 0); - - file_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 3, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(file_vb), 5); -@@ -3930,7 +3932,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_) - - /* Capture limits frame */ - limit_fr = gtk_frame_new("Stop Capture ..."); -- gtk_container_add(GTK_CONTAINER(left_vb), limit_fr); -+ gtk_box_pack_start(GTK_BOX (left_vb), limit_fr, TRUE, TRUE, 0); - - limit_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 3, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(limit_vb), 5); -@@ -4010,7 +4012,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_) - - /* Display-related options frame */ - display_fr = gtk_frame_new("Display Options"); -- gtk_container_add(GTK_CONTAINER(right_vb), display_fr); -+ gtk_box_pack_start(GTK_BOX (right_vb), display_fr, TRUE, TRUE, 0); - - display_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(display_vb), 5); -@@ -4025,7 +4027,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_) - gtk_widget_set_tooltip_text(sync_cb, - "Using this option will show the captured packets immediately on the main screen. " - "Please note: this will slow down capturing, so increased packet drops might appear."); -- gtk_container_add(GTK_CONTAINER(display_vb), sync_cb); -+ gtk_box_pack_start(GTK_BOX (display_vb), sync_cb, TRUE, TRUE, 0); - - /* "Auto-scroll live update" row */ - auto_scroll_cb = gtk_check_button_new_with_mnemonic("_Automatic scrolling in live capture"); -@@ -4033,17 +4035,17 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_) - gtk_widget_set_tooltip_text(auto_scroll_cb, - "This will scroll the \"Packet List\" automatically to the latest captured packet, " - "when the \"Update List of packets in real time\" option is used."); -- gtk_container_add(GTK_CONTAINER(display_vb), auto_scroll_cb); -+ gtk_box_pack_start(GTK_BOX (display_vb), auto_scroll_cb, TRUE, TRUE, 0); - - /* "Hide capture info" row */ - hide_info_cb = gtk_check_button_new_with_mnemonic("_Hide capture info dialog"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(hide_info_cb), !global_capture_opts.show_info); - gtk_widget_set_tooltip_text(hide_info_cb, "Hide the capture info dialog while capturing."); -- gtk_container_add(GTK_CONTAINER(display_vb), hide_info_cb); -+ gtk_box_pack_start(GTK_BOX (display_vb), hide_info_cb, TRUE, TRUE, 0); - - /* Name Resolution frame */ - resolv_fr = gtk_frame_new("Name Resolution"); -- gtk_container_add(GTK_CONTAINER(right_vb), resolv_fr); -+ gtk_box_pack_start(GTK_BOX (right_vb), resolv_fr, TRUE, TRUE, 0); - - resolv_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(resolv_vb), 5); -@@ -4054,14 +4056,14 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_resolv_cb), - gbl_resolv_flags & RESOLV_MAC); - gtk_widget_set_tooltip_text(m_resolv_cb, "Perform MAC layer name resolution while capturing."); -- gtk_container_add(GTK_CONTAINER(resolv_vb), m_resolv_cb); -+ gtk_box_pack_start(GTK_BOX (resolv_vb), m_resolv_cb, TRUE, TRUE, 0); - - n_resolv_cb = gtk_check_button_new_with_mnemonic( - "Enable _network name resolution"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(n_resolv_cb), - gbl_resolv_flags & RESOLV_NETWORK); - gtk_widget_set_tooltip_text(n_resolv_cb, "Perform network layer name resolution while capturing."); -- gtk_container_add(GTK_CONTAINER(resolv_vb), n_resolv_cb); -+ gtk_box_pack_start(GTK_BOX (resolv_vb), n_resolv_cb, FALSE, TRUE, 0); - - t_resolv_cb = gtk_check_button_new_with_mnemonic( - "Enable _transport name resolution"); -@@ -4069,7 +4071,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_) - gbl_resolv_flags & RESOLV_TRANSPORT); - gtk_widget_set_tooltip_text(t_resolv_cb, - "Perform transport layer name resolution while capturing."); -- gtk_container_add(GTK_CONTAINER(resolv_vb), t_resolv_cb); -+ gtk_box_pack_start(GTK_BOX (resolv_vb), t_resolv_cb, TRUE, TRUE, 0); - - /* Button row: "Start", "Cancel" and "Help" buttons */ - bbox = dlg_button_row_new(WIRESHARK_STOCK_CAPTURE_START, GTK_STOCK_CLOSE, GTK_STOCK_HELP, NULL); -diff --git a/ui/gtk/capture_file_dlg.c b/ui/gtk/capture_file_dlg.c -index 0f0b1b5..90ff4e8 100644 ---- a/ui/gtk/capture_file_dlg.c -+++ b/ui/gtk/capture_file_dlg.c -@@ -721,7 +721,7 @@ file_merge_cmd(GtkWidget *w) - - /* File type row */ - ft_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(main_vb), ft_hb); -+ gtk_box_pack_start(GTK_BOX (main_vb), ft_hb, FALSE, TRUE, 0); - gtk_widget_show(ft_hb); - - ft_lb = gtk_label_new("Merged output file type:"); -@@ -1646,7 +1646,7 @@ do_file_save_as(capture_file *cf, gboolean must_support_comments, - - /* File type row */ - ft_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(main_vb), ft_hb); -+ gtk_box_pack_start(GTK_BOX (main_vb), ft_hb, FALSE, TRUE, 0); - gtk_widget_show(ft_hb); - - ft_lb = gtk_label_new("File type:"); -@@ -1664,7 +1664,7 @@ do_file_save_as(capture_file *cf, gboolean must_support_comments, - /* compressed - if the file is currently compressed, and the default - file type supports compression, turn the checkbox on */ - compressed_cb = gtk_check_button_new_with_label("Compress with gzip"); -- gtk_container_add(GTK_CONTAINER(ft_hb), compressed_cb); -+ gtk_box_pack_start(GTK_BOX (ft_hb), compressed_cb, FALSE, TRUE, 0); - if (cf->iscompressed && wtap_dump_can_compress(default_ft)) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(compressed_cb), TRUE); - gtk_widget_show(compressed_cb); -@@ -1879,7 +1879,8 @@ file_export_specified_packets_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) - - /* File type row */ - ft_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(main_vb), ft_hb); -+ gtk_box_pack_start(GTK_BOX (main_vb), ft_hb, FALSE, TRUE, 0); -+ - gtk_widget_show(ft_hb); - - ft_lb = gtk_label_new("File type:"); -@@ -1899,7 +1900,7 @@ file_export_specified_packets_cmd_cb(GtkWidget *widget _U_, gpointer data _U_) - - /* compressed */ - compressed_cb = gtk_check_button_new_with_label("Compress with gzip"); -- gtk_container_add(GTK_CONTAINER(ft_hb), compressed_cb); -+ gtk_box_pack_start(GTK_BOX (ft_hb), compressed_cb, FALSE, TRUE, 0); - gtk_widget_show(compressed_cb); - g_object_set_data(G_OBJECT(file_export_specified_packets_w), E_COMPRESSED_CB_KEY, compressed_cb); - -@@ -2111,7 +2112,7 @@ file_color_import_cmd_cb(GtkWidget *color_filters, gpointer filter_list _U_) - gtk_widget_show(main_vb); - - cfglobal_but = gtk_button_new_with_label("Global Color Filter File"); -- gtk_container_add(GTK_CONTAINER(main_vb), cfglobal_but); -+ gtk_box_pack_start(GTK_BOX (main_vb), cfglobal_but, FALSE, TRUE, 0); - g_signal_connect(cfglobal_but, "clicked", - G_CALLBACK(color_global_cb), file_color_import_w); - gtk_widget_show(cfglobal_but); -@@ -2220,7 +2221,7 @@ file_color_export_cmd_cb(GtkWidget *w _U_, gpointer filter_list) - gtk_widget_show(main_vb); - - cfselect_cb = gtk_check_button_new_with_label("Export only selected filters"); -- gtk_container_add(GTK_CONTAINER(main_vb), cfselect_cb); -+ gtk_box_pack_start(GTK_BOX (main_vb), cfselect_cb, FALSE, TRUE, 0); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cfselect_cb), FALSE); - g_signal_connect(cfselect_cb, "toggled", - G_CALLBACK(color_toggle_selected_cb), NULL); -@@ -2228,7 +2229,7 @@ file_color_export_cmd_cb(GtkWidget *w _U_, gpointer filter_list) - color_set_export_selected_sensitive(cfselect_cb); - - cfglobal_but = gtk_button_new_with_label("Global Color Filter File"); -- gtk_container_add(GTK_CONTAINER(main_vb), cfglobal_but); -+ gtk_box_pack_start(GTK_BOX (main_vb), cfglobal_but, FALSE, TRUE, 0); - g_signal_connect(cfglobal_but, "clicked", - G_CALLBACK(color_global_cb), file_color_export_w); - gtk_widget_show(cfglobal_but); -diff --git a/ui/gtk/capture_if_details_dlg_win32.c b/ui/gtk/capture_if_details_dlg_win32.c -index 2ab50ff..e2de682 100644 ---- a/ui/gtk/capture_if_details_dlg_win32.c -+++ b/ui/gtk/capture_if_details_dlg_win32.c -@@ -2316,8 +2316,7 @@ capture_if_details_page_new(GtkWidget **table) - *table = gtk_table_new(1, 2, FALSE); - gtk_table_set_col_spacings(GTK_TABLE(*table), 6); - gtk_table_set_row_spacings(GTK_TABLE(*table), 3); -- gtk_container_add(GTK_CONTAINER(main_vb), *table); -- -+ gtk_box_pack_start(GTK_BOX (main_vb), *table, TRUE, TRUE, 0); - return main_vb; - } - -diff --git a/ui/gtk/capture_if_dlg.c b/ui/gtk/capture_if_dlg.c -index 018d095..b7b9759 100644 ---- a/ui/gtk/capture_if_dlg.c -+++ b/ui/gtk/capture_if_dlg.c -@@ -699,21 +699,21 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_) - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(if_sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); - gtk_box_pack_start(GTK_BOX(top_vb), if_sw, TRUE, TRUE, 0); - -- if_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE); -+ if_vb = gtk_alignment_new(0.0, 0.0, 1.0, 0.0); - gtk_container_set_border_width(GTK_CONTAINER(if_vb), 5); - gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(if_sw), if_vb); - -- if_tb = gtk_table_new(1,9, FALSE); -- gtk_table_set_row_spacings(GTK_TABLE(if_tb), 3); -- gtk_table_set_col_spacings(GTK_TABLE(if_tb), 3); -- gtk_box_pack_start(GTK_BOX(if_vb), if_tb, FALSE, FALSE, 0); -+ if_tb = ws_gtk_grid_new(); -+ ws_gtk_grid_set_row_spacing(GTK_GRID(if_tb), 3); -+ ws_gtk_grid_set_column_spacing(GTK_GRID(if_tb), 3); -+ gtk_container_add(GTK_CONTAINER(if_vb), if_tb); - -- row = 0; -+ row = 1; - height = 0; - - /* This is the icon column, used to display which kind of interface we have */ - if_lb = gtk_label_new(""); -- gtk_table_attach_defaults(GTK_TABLE(if_tb), if_lb, 0, 1, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(if_tb), if_lb, 0, 1, 1, 1); - - #ifndef _WIN32 - /* -@@ -722,19 +722,19 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_) - * bother showing them. - */ - if_lb = gtk_label_new("Device"); -- gtk_table_attach_defaults(GTK_TABLE(if_tb), if_lb, 1, 4, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(if_tb), if_lb, 1, 1, 2, 1); - #endif - if_lb = gtk_label_new("Description"); -- gtk_table_attach_defaults(GTK_TABLE(if_tb), if_lb, 4, 5, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(if_tb), if_lb, 4, 1, 1, 1); - - if_lb = gtk_label_new(" IP "); -- gtk_table_attach_defaults(GTK_TABLE(if_tb), if_lb, 5, 6, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(if_tb), if_lb, 5, 1, 1, 1); - - if_lb = gtk_label_new("Packets"); -- gtk_table_attach_defaults(GTK_TABLE(if_tb), if_lb, 6, 7, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(if_tb), if_lb, 6, 1, 1, 1); - - if_lb = gtk_label_new(" Packets/s "); -- gtk_table_attach_defaults(GTK_TABLE(if_tb), if_lb, 7, 8, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(if_tb), if_lb, 7, 1, 1, 1); - row++; - - height += 30; -@@ -754,7 +754,7 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_) - continue; - } - data.choose_bt = gtk_check_button_new(); -- gtk_table_attach_defaults(GTK_TABLE(if_tb), data.choose_bt, 0, 1, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(if_tb), data.choose_bt, 0, row, 1, 1); - if (gbl_capture_in_progress) { - gtk_widget_set_sensitive(data.choose_bt, FALSE); - } else { -@@ -764,13 +764,13 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_) - g_signal_connect(data.choose_bt, "toggled", G_CALLBACK(store_selected), device.name); - /* Kind of adaptor (icon) */ - icon = capture_get_if_icon(&(device)); -- gtk_table_attach_defaults(GTK_TABLE(if_tb), icon, 1, 2, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(if_tb), icon, 1, row, 1, 1); - - /* device name */ - data.device_lb = gtk_label_new(device.name); - #ifndef _WIN32 - gtk_misc_set_alignment(GTK_MISC(data.device_lb), 0.0f, 0.5f); -- gtk_table_attach_defaults(GTK_TABLE(if_tb), data.device_lb, 2, 4, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(if_tb), data.device_lb, 2, row, 1, 1); - #endif - g_string_append(if_tool_str, "Device: "); - g_string_append(if_tool_str, device.name); -@@ -788,7 +788,7 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_) - data.descr_lb = gtk_label_new(""); - } - gtk_misc_set_alignment(GTK_MISC(data.descr_lb), 0.0f, 0.5f); -- gtk_table_attach_defaults(GTK_TABLE(if_tb), data.descr_lb, 4, 5, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(if_tb), data.descr_lb, 4, row, 1, 1); - if (device.if_info.description) { - g_string_append(if_tool_str, "Description: "); - g_string_append(if_tool_str, device.if_info.description); -@@ -809,7 +809,7 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_) - } - eb = gtk_event_box_new (); - gtk_container_add(GTK_CONTAINER(eb), data.ip_lb); -- gtk_table_attach_defaults(GTK_TABLE(if_tb), eb, 5, 6, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(if_tb), eb, 5, row, 1, 1); - if (get_ip_addr_count(device.if_info.addrs) > 1) { - /* More than one IP address, make it possible to toggle */ - g_object_set_data(G_OBJECT(eb), CAPTURE_IF_IP_ADDR_LABEL, data.ip_lb); -@@ -821,17 +821,17 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_) - - /* packets */ - data.curr_lb = gtk_label_new("-"); -- gtk_table_attach_defaults(GTK_TABLE(if_tb), data.curr_lb, 6, 7, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(if_tb), data.curr_lb, 6, row, 1, 1); - - /* packets/s */ - data.last_lb = gtk_label_new("-"); -- gtk_table_attach_defaults(GTK_TABLE(if_tb), data.last_lb, 7, 8, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(if_tb), data.last_lb, 7, row, 1, 1); - - /* details button */ - #ifdef _WIN32 - data.details_bt = gtk_button_new_from_stock(WIRESHARK_STOCK_CAPTURE_DETAILS); - gtk_widget_set_tooltip_text(data.details_bt, "Open the capture details dialog of this interface."); -- gtk_table_attach_defaults(GTK_TABLE(if_tb), data.details_bt, 8, 9, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(if_tb), data.details_bt, 8, row, 1, 1); - if (capture_if_has_details(device.name)) { - g_signal_connect(data.details_bt, "clicked", G_CALLBACK(capture_details_cb), device.name); - } else { -@@ -844,7 +844,9 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_) - row++; - if (row <= 20) { - /* Lets add up 20 rows of interfaces, otherwise the window may become too high */ -+ gtk_widget_show(GTK_WIDGET(data.choose_bt)); - gtk_widget_get_preferred_size(GTK_WIDGET(data.choose_bt), &requisition, NULL); -+ gtk_widget_hide(GTK_WIDGET(data.choose_bt)); - height += requisition.height; - } - } -diff --git a/ui/gtk/conversations_table.c b/ui/gtk/conversations_table.c -index 6442b9a..77b0f9f 100644 ---- a/ui/gtk/conversations_table.c -+++ b/ui/gtk/conversations_table.c -@@ -2785,7 +2785,7 @@ init_conversation_notebook_cb(GtkWidget *w _U_, gpointer d _U_) - gtk_container_set_border_width(GTK_CONTAINER(vbox), 12); - - nb = gtk_notebook_new(); -- gtk_container_add(GTK_CONTAINER(vbox), nb); -+ gtk_box_pack_start(GTK_BOX (vbox), nb, TRUE, TRUE, 0); - g_object_set_data(G_OBJECT(nb), NB_PAGES_KEY, pages); - - page = 0; -@@ -2812,14 +2812,14 @@ init_conversation_notebook_cb(GtkWidget *w _U_, gpointer d _U_) - gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); - - resolv_cb = gtk_check_button_new_with_mnemonic("Name resolution"); -- gtk_container_add(GTK_CONTAINER(hbox), resolv_cb); -+ gtk_box_pack_start(GTK_BOX (hbox), resolv_cb, TRUE, TRUE, 0); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resolv_cb), TRUE); - gtk_widget_set_tooltip_text(resolv_cb, "Show results of name resolutions rather than the \"raw\" values. " - "Please note: The corresponding name resolution must be enabled."); - g_signal_connect(resolv_cb, "toggled", G_CALLBACK(ct_resolve_toggle_dest), pages); - - filter_cb = gtk_check_button_new_with_mnemonic("Limit to display filter"); -- gtk_container_add(GTK_CONTAINER(hbox), filter_cb); -+ gtk_box_pack_start(GTK_BOX (hbox), filter_cb, TRUE, TRUE, 0); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filter_cb), FALSE); - gtk_widget_set_tooltip_text(filter_cb, "Limit the list to conversations matching the current display filter."); - g_signal_connect(filter_cb, "toggled", G_CALLBACK(ct_filter_toggle_dest), pages); -diff --git a/ui/gtk/decode_as_dlg.c b/ui/gtk/decode_as_dlg.c -index dbdc4cf..fbbfc1d 100644 ---- a/ui/gtk/decode_as_dlg.c -+++ b/ui/gtk/decode_as_dlg.c -@@ -1847,7 +1847,7 @@ decode_add_notebook (GtkWidget *format_hb) - - /* Start a nootbook for flipping between sets of changes */ - notebook = gtk_notebook_new(); -- gtk_container_add(GTK_CONTAINER(format_hb), notebook); -+ gtk_box_pack_start(GTK_BOX(format_hb), notebook, TRUE, TRUE, 0); - g_object_set_data(G_OBJECT(decode_w), E_NOTEBOOK, notebook); - - /* Add link level selection page */ -diff --git a/ui/gtk/dfilter_expr_dlg.c b/ui/gtk/dfilter_expr_dlg.c -index 10627c4..afe2517 100644 ---- a/ui/gtk/dfilter_expr_dlg.c -+++ b/ui/gtk/dfilter_expr_dlg.c -@@ -929,11 +929,11 @@ dfilter_expr_dlg_new(GtkWidget *filter_te) - - main_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(main_hb), 5); -- gtk_container_add(GTK_CONTAINER(main_vb), main_hb); -+ gtk_box_pack_start(GTK_BOX (main_vb), main_hb, TRUE, TRUE, 0); - - field_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 5, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(field_vb), 5); -- gtk_container_add(GTK_CONTAINER(main_hb), field_vb); -+ gtk_box_pack_start(GTK_BOX (main_hb), field_vb, TRUE, TRUE, 0); - - field_tree_lb = gtk_label_new("Field name"); - gtk_misc_set_alignment(GTK_MISC(field_tree_lb), 0.0f, 0.0f); -@@ -961,7 +961,7 @@ dfilter_expr_dlg_new(GtkWidget *filter_te) - - relation_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 5, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(relation_vb), 5); -- gtk_container_add(GTK_CONTAINER(main_hb), relation_vb); -+ gtk_box_pack_start(GTK_BOX (main_hb), relation_vb, TRUE, TRUE, 0); - - relation_label = gtk_label_new("Relation"); - gtk_misc_set_alignment(GTK_MISC(relation_label), 0.0f, 0.0f); -@@ -1036,7 +1036,7 @@ dfilter_expr_dlg_new(GtkWidget *filter_te) - /* value column */ - value_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 5, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(value_vb), 5); -- gtk_container_add(GTK_CONTAINER(main_hb), value_vb); -+ gtk_box_pack_start(GTK_BOX (main_hb), value_vb, FALSE, TRUE, 0); - - value_label = gtk_label_new("Value"); - gtk_misc_set_alignment(GTK_MISC(value_label), 0.0f, 0.0f); -diff --git a/ui/gtk/edit_packet_comment_dlg.c b/ui/gtk/edit_packet_comment_dlg.c -index 9674c75..841a3ed 100644 ---- a/ui/gtk/edit_packet_comment_dlg.c -+++ b/ui/gtk/edit_packet_comment_dlg.c -@@ -103,6 +103,7 @@ edit_packet_comment_dlg (GtkAction *action _U_, gpointer data _U_) - - GtkWidget *vbox; - GtkWidget *view; -+ GtkWidget *scroll; - GtkWidget *bbox; - GtkWidget *ok_bt, *cancel_bt, *help_bt; - GtkTextBuffer *buffer = NULL; -@@ -121,6 +122,14 @@ edit_packet_comment_dlg (GtkAction *action _U_, gpointer data _U_) - view = gtk_text_view_new (); - gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(view), GTK_WRAP_WORD); - buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); -+ gtk_widget_show (view); -+ -+ scroll = gtk_scrolled_window_new(NULL, NULL); -+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), -+ GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); -+ gtk_container_add(GTK_CONTAINER(scroll), view); -+ gtk_widget_show(scroll); -+ gtk_box_pack_start(GTK_BOX (vbox), scroll, TRUE, TRUE, 0); - - /* Get the comment */ - opt_comment = new_packet_list_get_packet_comment(); -@@ -131,8 +140,6 @@ edit_packet_comment_dlg (GtkAction *action _U_, gpointer data _U_) - gtk_text_buffer_set_text (buffer, buf_str, -1); - g_free(buf_str); - } -- gtk_container_add(GTK_CONTAINER(vbox), view); -- gtk_widget_show (view); - - /* Button row. */ - bbox = dlg_button_row_new (GTK_STOCK_OK, GTK_STOCK_CANCEL, GTK_STOCK_HELP, NULL); -@@ -208,7 +215,7 @@ edit_capture_dlg_launch (void) - gtk_text_buffer_set_text (buffer, buf_str, -1); - g_free(buf_str); - } -- gtk_container_add(GTK_CONTAINER(vbox), view); -+ gtk_box_pack_start(GTK_BOX (vbox), view, FALSE, TRUE, 0); - gtk_widget_show (view); - - /* Button row. */ -diff --git a/ui/gtk/export_object.c b/ui/gtk/export_object.c -index 4d61ffc..3d23d81 100644 ---- a/ui/gtk/export_object.c -+++ b/ui/gtk/export_object.c -@@ -464,7 +464,7 @@ export_object_window(const gchar *tapname, const gchar *name, tap_packet_cb tap_ - gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), - GTK_SHADOW_IN); - -- gtk_container_add(GTK_CONTAINER(vbox), sw); -+ gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0); - - object_list->store = gtk_tree_store_new(EO_NUM_COLUMNS, - G_TYPE_INT, G_TYPE_STRING, -diff --git a/ui/gtk/filter_dlg.c b/ui/gtk/filter_dlg.c -index 9f051f5..bde76ab 100644 ---- a/ui/gtk/filter_dlg.c -+++ b/ui/gtk/filter_dlg.c -@@ -425,12 +425,12 @@ filter_dialog_new(GtkWidget *button, GtkWidget *parent_filter_te, - /* Container for each row of widgets */ - filter_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(filter_vb), 0); -- gtk_container_add(GTK_CONTAINER(main_vb), filter_vb); -+ gtk_box_pack_start(GTK_BOX(main_vb), filter_vb, TRUE, TRUE, 0); - gtk_widget_show(filter_vb); - - /* Top row: Buttons and filter list */ - top_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0, FALSE); -- gtk_container_add(GTK_CONTAINER(filter_vb), top_hb); -+ gtk_box_pack_start(GTK_BOX(filter_vb), top_hb, TRUE, TRUE, 0); - gtk_widget_show(top_hb); - - edit_fr = gtk_frame_new("Edit"); -diff --git a/ui/gtk/find_dlg.c b/ui/gtk/find_dlg.c -index ec26b4d..e278924 100644 ---- a/ui/gtk/find_dlg.c -+++ b/ui/gtk/find_dlg.c -@@ -155,7 +155,7 @@ find_frame_cb(GtkWidget *w _U_, gpointer d _U_) - - /* */ - main_find_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(main_vb), main_find_hb); -+ gtk_box_pack_start(GTK_BOX (main_vb), main_find_hb, TRUE, TRUE, 0); - gtk_widget_show(main_find_hb); - - -@@ -171,7 +171,7 @@ find_frame_cb(GtkWidget *w _U_, gpointer d _U_) - - /* find type row */ - find_type_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(find_type_vb), find_type_hb); -+ gtk_box_pack_start(GTK_BOX (find_type_vb), find_type_hb, TRUE, TRUE, 0); - gtk_widget_show(find_type_hb); - - find_type_lb = gtk_label_new("By:"); -@@ -226,7 +226,7 @@ find_frame_cb(GtkWidget *w _U_, gpointer d _U_) - - /* */ - main_options_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(main_vb), main_options_hb); -+ gtk_box_pack_start(GTK_BOX (main_vb), main_options_hb, TRUE, TRUE, 0); - gtk_widget_show(main_options_hb); - - -@@ -274,12 +274,12 @@ find_frame_cb(GtkWidget *w _U_, gpointer d _U_) - - case_cb = gtk_check_button_new_with_mnemonic("Case sensitive"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(case_cb), !case_type); -- gtk_container_add(GTK_CONTAINER(string_opt_vb), case_cb); -+ gtk_box_pack_start(GTK_BOX (string_opt_vb), case_cb, TRUE, TRUE, 0); - gtk_widget_set_tooltip_text(case_cb, "Search by mixed upper/lower case?"); - gtk_widget_show(case_cb); - - combo_lb = gtk_label_new("Character set:"); -- gtk_container_add(GTK_CONTAINER(string_opt_vb), combo_lb); -+ gtk_box_pack_start(GTK_BOX (string_opt_vb), combo_lb, TRUE, TRUE, 0); - gtk_misc_set_alignment(GTK_MISC(combo_lb), 0.0f, 0.5f); - gtk_widget_show(combo_lb); - -@@ -294,7 +294,7 @@ find_frame_cb(GtkWidget *w _U_, gpointer d _U_) - gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT(combo_cb), "ASCII Unicode"); - - gtk_combo_box_set_active(GTK_COMBO_BOX(combo_cb),0); -- gtk_container_add(GTK_CONTAINER(string_opt_vb), combo_cb); -+ gtk_box_pack_start(GTK_BOX (string_opt_vb), combo_cb, TRUE, TRUE, 0); - - gtk_widget_show(combo_cb); - -diff --git a/ui/gtk/follow_stream.c b/ui/gtk/follow_stream.c -index c2f73b5..54c17ad 100644 ---- a/ui/gtk/follow_stream.c -+++ b/ui/gtk/follow_stream.c -@@ -744,7 +744,7 @@ follow_stream(gchar *title, follow_info_t *follow_info, - } else { - stream_fr = gtk_frame_new("Stream Content"); - } -- gtk_container_add(GTK_CONTAINER(vbox), stream_fr); -+ gtk_box_pack_start(GTK_BOX(vbox), stream_fr, TRUE, TRUE, 0); - gtk_widget_show(stream_fr); - - stream_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 6, FALSE); -diff --git a/ui/gtk/gui_utils.c b/ui/gtk/gui_utils.c -index 89f48e1..6dface2 100644 ---- a/ui/gtk/gui_utils.c -+++ b/ui/gtk/gui_utils.c -@@ -52,6 +52,7 @@ - #include "ui/gtk/gtkglobals.h" - #include "ui/gtk/gui_utils.h" - #include "ui/gtk/font_utils.h" -+#include "ui/gtk/color_utils.h" - - #include "ui/gtk/old-gtk-compat.h" - -@@ -379,7 +380,7 @@ window_get_geometry(GtkWidget *widget, - &geom->height); - #endif - state = gdk_window_get_state(widget_window); -- geom->maximized = (state == GDK_WINDOW_STATE_MAXIMIZED); -+ geom->maximized = (state & GDK_WINDOW_STATE_MAXIMIZED ? 1 : 0); - } - - -@@ -2032,3 +2033,82 @@ gtk_separator_new(GtkOrientation orientation) - } - } - #endif /* GTK_CHECK_VERSION(3,0,0) */ -+ -+ -+ -+/* --------------------------------- -+ * ws_gtk_grid...() wrappers -+ * See gui_utils.h -+ */ -+ -+#if !GTK_CHECK_VERSION(3,0,0) -+#else /* GTK3 */ -+ -+void -+ws_gtk_grid_attach_defaults(GtkGrid *grid, GtkWidget *child, gint left, gint top, gint width, gint height) -+{ -+ /* Use defaults for [x|y]options and [x|y]padding which match those for gtk_table_attach_defaults() */ -+ ws_gtk_grid_attach_extended(grid, child, left, top, width, height, GTK_EXPAND|GTK_FILL, GTK_EXPAND|GTK_FILL, 0, 0); -+} -+ -+void -+ws_gtk_grid_attach_extended(GtkGrid *grid, GtkWidget *child, -+ gint left, gint top, gint width, gint height, -+ GtkAttachOptions xoptions, GtkAttachOptions yoptions, -+ guint xpadding, guint ypadding) -+{ -+ gtk_grid_attach(grid, child, left, top, width, height); -+ -+ /* XXX: On Gtk3, there's Some trickyness about EXPAND which I probably don't -+ * really understand. -+ * It seems that: -+ * Default for EXPAND is "not set". -+ * In this case "computed expand" based on any child(ren) of this widget will -+ * affect this widget. -+ * If EXPAND is set (either TRUE or FALSE) then the value overrides any effect from children. -+ * -+ * This wrapper currently only sets EXPAND (to TRUE) if the GTK_FILL is specified; -+ */ -+ if (xoptions & GTK_EXPAND) -+ gtk_widget_set_hexpand(child, TRUE); -+ if (yoptions & GTK_EXPAND) -+ gtk_widget_set_vexpand(child, TRUE); -+ -+ /* Note: default is GTK_FILL */ -+ gtk_widget_set_halign(child, (xoptions & GTK_FILL) ? GTK_ALIGN_FILL : GTK_ALIGN_CENTER); -+ gtk_widget_set_valign(child, (yoptions & GTK_FILL) ? GTK_ALIGN_FILL : GTK_ALIGN_CENTER); -+ -+ if (xpadding != 0) { -+ gtk_widget_set_margin_left(child, xpadding); -+ gtk_widget_set_margin_right(child, xpadding); -+ } -+ if (ypadding != 0) { -+ gtk_widget_set_margin_top(child, ypadding); -+ gtk_widget_set_margin_bottom(child, ypadding); -+ } -+} -+ -+void -+ws_gtk_grid_set_homogeneous(GtkGrid *grid, gboolean homogeneous) -+{ -+ gtk_grid_set_row_homogeneous(grid, homogeneous); -+ gtk_grid_set_column_homogeneous(grid, homogeneous); -+} -+#endif /* !GTK_CHECK_VERSION(3,0,0) */ -+ -+/* -+ * Wrap gdk_cairo_set_source_color() with the GTK 3 equivalent -+ * to be used in GTK2 -+ */ -+#if !GTK_CHECK_VERSION(3,0,0) -+void -+gdk_cairo_set_source_rgba(cairo_t *cr, const GdkRGBA *rgba) -+{ -+ GdkColor color; -+ -+ gdkRGBAcolor_to_GdkColor(&color, rgba); -+ -+ gdk_cairo_set_source_color(cr, &color); -+ -+} -+#endif /* GTK_CHECK_VERSION(3,0,0) */ -diff --git a/ui/gtk/gui_utils.h b/ui/gtk/gui_utils.h -index 5ed4085..642a709 100644 ---- a/ui/gtk/gui_utils.h -+++ b/ui/gtk/gui_utils.h -@@ -530,10 +530,106 @@ GdkPixbuf *gdk_pixbuf_get_from_surface (cairo_surface_t *surface, - GtkWidget * ws_gtk_box_new(GtkOrientation orientation, gint spacing, gboolean homogeneous); - - #if !GTK_CHECK_VERSION(3,0,0) -+typedef struct { -+ gdouble red; -+ gdouble green; -+ gdouble blue; -+ gdouble alpha; -+} GdkRGBA; -+ - GtkWidget * gtk_button_box_new(GtkOrientation orientation); - GtkWidget * gtk_scrollbar_new(GtkOrientation orientation, GtkAdjustment *adjustment); - GtkWidget * gtk_paned_new(GtkOrientation orientation); - GtkWidget * gtk_separator_new (GtkOrientation orientation); -+void gdk_cairo_set_source_rgba(cairo_t *cr, const GdkRGBA *rgba); - #endif /* GTK_CHECK_VERSION(3,0,0) */ - -+ -+/* GtkTable is deprecated in Gtk3 ... -+ * -+ * ws_gtk_grid...() wrapper functions & macros matching basic GtkGrid functions -+ * have been created which can be used both on Gtk2 and Gtk3. -+ * -+ * The functionality provided matches the fairly simple Wireshatk -+ * Gtk2 GtkTable usage and is intended to replace same. -+ * -+ * The ws_gtk_grid...() functionality is implemented as follows: -+ * Gtk2: macros which effect calls to GtkTable functions -+ * (with GTK_GRID typedef'd as GTK_TABLE & etc). -+ * Gtk3: wrapper functions and macros which effect calls to gtk_grid...() -+ * and other Gtk3 functions as needed. -+ * -+ * The args to the ws_gtk_grid...() functions are identical to the Gtk3 gtk_grid...() functions -+ * (other than ws_gtk_attach_extended() which has no gtk_grid...() equivalent). -+ * -+ * ws_gtk_grid_new() ;; gtk_table_new() -+ * ws_gtk_grid_attach_defaults() ;; gtk_table_attach_defaults() -+ * ;; Gtk3: sets GTK_EXPAND/GTK_FILL as default; -+ * ;; That is, the defaults used by gtk_table_attach_defaults() -+ * ws_gtk_grid_attach_extended() ;; gtk_table_attach() -+ * ;; Essentially gtk_grid_attach() with eadditional args -+ * ;; to specify 'options' and 'padding' [as used in gtk_table_attach()]; -+ * ;; Gtk3: sets GTK_EXPAND/GTK_FILL & margins on child widgit -+ * ;; as specified. -+ * ;; (See below for declaration). -+ * ws_gtk_grid_set_homogeneous() ;; gtk_table_set_homogeneous() -+ * ;; Gtk3 grid: sets both 'row-homogeneous' and 'column-homogeneous' -+ * ws_gtk_set_row_spacing() ;; gtk_table_set_row_spacings() -+ * ws_gtk_set_column_spacing() ;; gtk_table_set_col_spacings() -+ * -+ * Example: Existing Wireshark Gtk2 code: -+ * gtk_table_attach_defaults(GTK_TABLE(foo_tb), child, col, col+1, row, row+1) -+ * -+ * should be converted to: -+ * ws_gtk_grid_attach_defaults(GTK_GRID(foo_grid), child, col, row, 1, 1); -+ */ -+ -+#if !GTK_CHECK_VERSION(3,0,0) -+ -+typedef GtkTable GtkGrid; -+#define GTK_GRID(x) GTK_TABLE(x) -+ -+#define ws_gtk_grid_new() \ -+ gtk_table_new(0, 0, FALSE) -+ -+#define ws_gtk_grid_attach_defaults(grid, child, left, top, width, height) \ -+ gtk_table_attach_defaults(grid, child, left, left+width, top, top+height) -+ -+#define ws_gtk_grid_attach_extended(grid, child, left, top, width, height, xoptions, yoptions, xpadding, ypadding) \ -+ gtk_table_attach(grid, child, left, left+width, top, top+height, xoptions, yoptions, xpadding, ypadding) -+ -+#define ws_gtk_grid_set_homogeneous(grid, homogeneous) \ -+ gtk_table_set_homogeneous(grid, homogeneous) -+ -+#define ws_gtk_grid_set_row_spacing(grid, spacing) \ -+ gtk_table_set_row_spacings(grid, spacing) -+ -+#define ws_gtk_grid_set_column_spacing(grid, spacing) \ -+ gtk_table_set_col_spacings(grid, spacing) -+ -+ -+#else -+#define ws_gtk_grid_new() \ -+ gtk_grid_new() -+ -+extern void ws_gtk_grid_attach_defaults(GtkGrid *grid, GtkWidget *child, -+ gint left, gint top, gint width, gint height); -+ -+extern void ws_gtk_grid_attach_extended(GtkGrid *grid, GtkWidget *child, -+ gint left, gint top, gint width, gint height, -+ GtkAttachOptions xoptions, GtkAttachOptions yoptions, -+ guint xpadding, guint ypadding); -+ -+extern void ws_gtk_grid_set_homogeneous(GtkGrid *grid, gboolean homogeneous); -+ -+#define ws_gtk_grid_set_row_spacing(grid, spacing) \ -+ gtk_grid_set_row_spacing(grid, spacing) -+ -+#define ws_gtk_grid_set_column_spacing(grid, spacing) \ -+ gtk_grid_set_column_spacing(grid, spacing) -+ -+ -+#endif /* GTK_CHECK_VERSION(3,0,0) */ -+ -+ - #endif /* __GUI_UTIL_H__ */ -diff --git a/ui/gtk/iax2_analysis.c b/ui/gtk/iax2_analysis.c -index 8c50ac1..7fd0735 100644 ---- a/ui/gtk/iax2_analysis.c -+++ b/ui/gtk/iax2_analysis.c -@@ -3278,7 +3278,7 @@ static void create_iax2_dialog(user_data_t* user_data) - - /* Start a notebook for flipping between sets of changes */ - notebook = gtk_notebook_new(); -- gtk_container_add(GTK_CONTAINER(main_vb), notebook); -+ gtk_box_pack_start(GTK_BOX(main_vb), notebook, TRUE, TRUE, 0); - g_object_set_data(G_OBJECT(window), "notebook", notebook); - - user_data->dlg.notebook_signal_id = -diff --git a/ui/gtk/main_menubar.c b/ui/gtk/main_menubar.c -index 28d4fa2..6b4a80f 100644 ---- a/ui/gtk/main_menubar.c -+++ b/ui/gtk/main_menubar.c -@@ -1168,9 +1168,6 @@ static const char *ui_desc_menubar = - " \n" - " \n" - " \n" --" \n" --" \n" --" \n" - " \n" - " \n" - " \n" -@@ -1633,9 +1630,6 @@ static const GtkActionEntry main_menu_bar_entries[] = { - { "/StatisticsMenu/HTTP/http_req", NULL, "Requests", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, - { "/StatisticsMenu/HTTP/http_srv", NULL, "Load Distribution", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, - -- { "/StatisticsMenu/ip_hosts", NULL, "IP Addresses...", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, -- { "/StatisticsMenu/dests", NULL, "IP Destinations...", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, -- { "/StatisticsMenu/ptype", NULL, "IP Protocol Types..", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, - { "/StatisticsMenu/ONC-RPC-Programs", NULL, "ONC-RPC Programs", NULL, NULL, G_CALLBACK(gtk_rpcprogs_cb) }, - { "/StatisticsMenu/Sametime", NULL, "Sametime", NULL, NULL, NULL }, - { "/StatisticsMenu/Sametime/sametime", NULL, "Messages", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) }, -diff --git a/ui/gtk/mcast_stream_dlg.c b/ui/gtk/mcast_stream_dlg.c -index 6dfae79..7eb0228 100644 ---- a/ui/gtk/mcast_stream_dlg.c -+++ b/ui/gtk/mcast_stream_dlg.c -@@ -270,7 +270,7 @@ static void - mcast_on_params(GtkButton *button _U_, gpointer data _U_) - { - GtkWidget *main_vb; -- GtkWidget *label, *hbuttonbox, *table; -+ GtkWidget *label, *hbuttonbox, *grid; - GtkWidget *ok_bt, *cancel_bt; - GtkWidget *entry1, *entry2, *entry3, *entry4, *entry5; - gchar label_text[51]; -@@ -293,45 +293,44 @@ mcast_on_params(GtkButton *button _U_, gpointer data _U_) - gtk_container_add(GTK_CONTAINER(mcast_params_dlg), main_vb); - gtk_widget_show(main_vb); - -- table = gtk_table_new(6, 2, FALSE); -- gtk_container_add (GTK_CONTAINER (main_vb), table); -- -+ grid = ws_gtk_grid_new(); -+ gtk_box_pack_start(GTK_BOX(main_vb), grid, TRUE, TRUE, 0); - label = gtk_label_new(" Burst measurement interval (ms) "); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, 0, 1, 1); - entry1 = gtk_entry_new(); - g_snprintf(label_text, sizeof(label_text), "%u", mcast_stream_burstint); - gtk_entry_set_text(GTK_ENTRY(entry1), label_text); -- gtk_table_attach_defaults(GTK_TABLE(table), entry1, 1, 2, 0, 1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), entry1, 1, 0, 1, 1); - label = gtk_label_new(" Burst alarm threshold (packets) "); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, 1, 1, 1); - entry2 = gtk_entry_new(); - g_snprintf(label_text, sizeof(label_text), "%u", mcast_stream_trigger); - gtk_entry_set_text(GTK_ENTRY(entry2), label_text); -- gtk_table_attach_defaults(GTK_TABLE(table), entry2, 1, 2, 1, 2); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), entry2, 1, 1, 1, 1); - label = gtk_label_new(" Buffer alarm threshold (bytes) "); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 2, 3); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, 2, 1, 1); - entry3 = gtk_entry_new(); - g_snprintf(label_text, sizeof(label_text), "%u", mcast_stream_bufferalarm); - gtk_entry_set_text(GTK_ENTRY(entry3), label_text); -- gtk_table_attach_defaults(GTK_TABLE(table), entry3, 1, 2, 2, 3); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), entry3, 1, 2, 1, 1); - label = gtk_label_new(" Stream empty speed (kbit/s) "); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 3, 4); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, 3, 1, 1); - entry4 = gtk_entry_new(); - g_snprintf(label_text, sizeof(label_text), "%u", mcast_stream_emptyspeed); - gtk_entry_set_text(GTK_ENTRY(entry4), label_text); -- gtk_table_attach_defaults(GTK_TABLE(table), entry4, 1, 2, 3, 4); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), entry4, 1, 3, 1, 1); - label = gtk_label_new(" Total empty speed (kbit/s) "); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 4, 5); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, 4, 1, 1); - entry5 = gtk_entry_new(); - g_snprintf(label_text, sizeof(label_text), "%u", mcast_stream_cumulemptyspeed); - gtk_entry_set_text(GTK_ENTRY(entry5), label_text); -- gtk_table_attach_defaults(GTK_TABLE(table), entry5, 1, 2, 4, 5); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), entry5, 1, 4, 1, 1); - -- gtk_widget_show (table); -+ gtk_widget_show (grid); - - /* button row */ - hbuttonbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL); -- gtk_table_attach_defaults(GTK_TABLE(table), hbuttonbox, 0, 2, 5, 6); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), hbuttonbox, 0, 5, 2, 1); - ok_bt = gtk_button_new_from_stock(GTK_STOCK_OK); - gtk_container_add (GTK_CONTAINER(hbuttonbox), ok_bt); - cancel_bt = gtk_button_new_from_stock(GTK_STOCK_CANCEL); -diff --git a/ui/gtk/mtp3_summary.c b/ui/gtk/mtp3_summary.c -index a96b2d3..5c358b5 100644 ---- a/ui/gtk/mtp3_summary.c -+++ b/ui/gtk/mtp3_summary.c -@@ -354,7 +354,7 @@ void mtp3_sum_gtk_sum_cb(GtkAction *action _U_, gpointer user_data _U_) - - /* MTP3 SPECIFIC */ - table_fr = gtk_frame_new("Service Indicator (SI) Totals"); -- gtk_container_add(GTK_CONTAINER(main_vb), table_fr); -+ gtk_box_pack_start(GTK_BOX(main_vb), table_fr, TRUE, TRUE, 0); - gtk_widget_show(table_fr); - - table = create_list(); -diff --git a/ui/gtk/packet_win.c b/ui/gtk/packet_win.c -index 8bd2f88..3ee1d83 100644 ---- a/ui/gtk/packet_win.c -+++ b/ui/gtk/packet_win.c -@@ -923,7 +923,7 @@ void new_packet_window(GtkWidget *w _U_, gboolean editable _U_) - - /* Panes for the tree and byte view */ - pane = gtk_paned_new(GTK_ORIENTATION_VERTICAL); -- gtk_container_add(GTK_CONTAINER(main_vbox), pane); -+ gtk_box_pack_start(GTK_BOX(main_vbox), pane, TRUE, TRUE, 0); - gtk_widget_show(pane); - - /* Tree view */ -diff --git a/ui/gtk/prefs_capture.c b/ui/gtk/prefs_capture.c -index 5f893d7..fcd190d 100644 ---- a/ui/gtk/prefs_capture.c -+++ b/ui/gtk/prefs_capture.c -@@ -329,7 +329,7 @@ ifopts_edit_cb(GtkWidget *w, gpointer data _U_) - - /* create current options frame */ - cur_opts_fr = gtk_frame_new("Interfaces"); -- gtk_container_add(GTK_CONTAINER(main_vb), cur_opts_fr); -+ gtk_box_pack_start(GTK_BOX(main_vb), cur_opts_fr, TRUE, TRUE, 0); - gtk_widget_show(cur_opts_fr); - - /* create a scrolled window to pack the current options TreeView widget into */ -diff --git a/ui/gtk/prefs_column.c b/ui/gtk/prefs_column.c -index 5a76592..cf21046 100644 ---- a/ui/gtk/prefs_column.c -+++ b/ui/gtk/prefs_column.c -@@ -134,7 +134,7 @@ column_prefs_show(GtkWidget *prefs_window) { - - list_sc = scrolled_window_new(NULL, NULL); - gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(list_sc), GTK_SHADOW_IN); -- gtk_container_add(GTK_CONTAINER(list_vb), list_sc); -+ gtk_box_pack_start(GTK_BOX(list_vb), list_sc, TRUE, TRUE, 0); - gtk_widget_show(list_sc); - - store = gtk_list_store_new(N_COLUMN, -diff --git a/ui/gtk/prefs_filter_expressions.c b/ui/gtk/prefs_filter_expressions.c -index 5e29df4..6934f71 100644 ---- a/ui/gtk/prefs_filter_expressions.c -+++ b/ui/gtk/prefs_filter_expressions.c -@@ -121,7 +121,7 @@ filter_expressions_prefs_show(void) { - list_sc = scrolled_window_new(NULL, NULL); - gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(list_sc), - GTK_SHADOW_IN); -- gtk_container_add(GTK_CONTAINER(list_vb), list_sc); -+ gtk_box_pack_start(GTK_BOX(list_vb), list_sc, TRUE, TRUE, 0); - gtk_widget_show(list_sc); - - store = gtk_list_store_new(N_COLUMN, -diff --git a/ui/gtk/print_dlg.c b/ui/gtk/print_dlg.c -index 99e6910..c7d5e02 100644 ---- a/ui/gtk/print_dlg.c -+++ b/ui/gtk/print_dlg.c -@@ -792,7 +792,7 @@ open_print_dialog(const char *title, output_action_e action, print_args_t *args) - - /* Button row */ - bbox = dlg_button_row_new(action == output_action_print ? GTK_STOCK_PRINT : GTK_STOCK_OK, GTK_STOCK_CANCEL, GTK_STOCK_HELP, NULL); -- gtk_box_pack_start(GTK_BOX(main_vb), bbox, FALSE, FALSE, 0); -+ gtk_box_pack_end(GTK_BOX(main_vb), bbox, FALSE, FALSE, 0); - gtk_widget_show(bbox); - - ok_bt = g_object_get_data(G_OBJECT(bbox), action == output_action_print ? GTK_STOCK_PRINT : GTK_STOCK_OK); -diff --git a/ui/gtk/profile_dlg.c b/ui/gtk/profile_dlg.c -index d6666a0..33978f3 100644 ---- a/ui/gtk/profile_dlg.c -+++ b/ui/gtk/profile_dlg.c -@@ -801,12 +801,12 @@ profile_dialog_new(void) - /* Container for each row of widgets */ - profile_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(profile_vb), 0); -- gtk_container_add(GTK_CONTAINER(main_vb), profile_vb); -+ gtk_box_pack_start(GTK_BOX(main_vb), profile_vb, TRUE, TRUE, 0); - gtk_widget_show(profile_vb); - - /* Top row: Buttons and profile list */ - top_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0, FALSE); -- gtk_container_add(GTK_CONTAINER(profile_vb), top_hb); -+ gtk_box_pack_start(GTK_BOX(profile_vb), top_hb, TRUE, TRUE, 0); - gtk_widget_show(top_hb); - - edit_fr = gtk_frame_new("Edit"); -@@ -892,7 +892,7 @@ profile_dialog_new(void) - - /* row: Profile name entry */ - middle_hb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(props_vb), middle_hb); -+ gtk_box_pack_start(GTK_BOX(props_vb), middle_hb, TRUE, TRUE, 0); - gtk_widget_show(middle_hb); - - name_lb = gtk_label_new("Profile name:"); -diff --git a/ui/gtk/proto_hier_stats_dlg.c b/ui/gtk/proto_hier_stats_dlg.c -index c22ebaf..9f08e2d 100644 ---- a/ui/gtk/proto_hier_stats_dlg.c -+++ b/ui/gtk/proto_hier_stats_dlg.c -@@ -533,7 +533,6 @@ create_tree(GtkWidget *container, ph_stats_t *ps) - /* Fill in the data. */ - fill_in_tree(tree, ps); - -- gtk_widget_set_size_request(tree, DEF_DLG_WIDTH, MAX_DLG_HEIGHT); - gtk_tree_view_expand_all(tree_view); - - proto_hier_create_popup_menu (); -@@ -559,6 +558,7 @@ proto_hier_stats_cb(GtkWidget *w _U_, gpointer d _U_) - } - - dlg = window_new(GTK_WINDOW_TOPLEVEL, "Wireshark: Protocol Hierarchy Statistics"); -+ gtk_widget_set_size_request(dlg, DEF_DLG_WIDTH, MAX_DLG_HEIGHT); - - vbox = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 5, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); -diff --git a/ui/gtk/rtp_analysis.c b/ui/gtk/rtp_analysis.c -index 64296b7..20ae0d3 100644 ---- a/ui/gtk/rtp_analysis.c -+++ b/ui/gtk/rtp_analysis.c -@@ -3437,7 +3437,7 @@ static void create_rtp_dialog(user_data_t* user_data) - - /* Start a notebook for flipping between sets of changes */ - notebook = gtk_notebook_new(); -- gtk_container_add(GTK_CONTAINER(main_vb), notebook); -+ gtk_box_pack_start(GTK_BOX(main_vb), notebook, TRUE, TRUE, 0); - g_object_set_data(G_OBJECT(window), "notebook", notebook); - - user_data->dlg.notebook_signal_id = -diff --git a/ui/gtk/rtp_player.c b/ui/gtk/rtp_player.c -index 9c64a72..1fb9c26 100644 ---- a/ui/gtk/rtp_player.c -+++ b/ui/gtk/rtp_player.c -@@ -2347,7 +2347,7 @@ rtp_player_dlg_create(void) - gtk_widget_set_size_request(main_scrolled_window, CHANNEL_WIDTH, 0); - - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (main_scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); -- gtk_container_add(GTK_CONTAINER(main_vb), main_scrolled_window); -+ gtk_box_pack_start(GTK_BOX(main_vb), main_scrolled_window, TRUE, TRUE, 0); - - channels_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE); - gtk_container_set_border_width (GTK_CONTAINER (channels_vb), 2); -diff --git a/ui/gtk/sctp_assoc_analyse.c b/ui/gtk/sctp_assoc_analyse.c -index fcda905..a219ebe 100644 ---- a/ui/gtk/sctp_assoc_analyse.c -+++ b/ui/gtk/sctp_assoc_analyse.c -@@ -526,7 +526,7 @@ static void create_analyse_window(struct sctp_analyse* u_data) - - /* Start a notebook for flipping between sets of changes */ - notebook = gtk_notebook_new(); -- gtk_container_add(GTK_CONTAINER(main_vb), notebook); -+ gtk_box_pack_start(GTK_BOX(main_vb), notebook, TRUE, TRUE, 0); - g_object_set_data(G_OBJECT(window), "notebook", notebook); - g_signal_connect(notebook, "switch_page", G_CALLBACK(on_notebook_switch_page), NULL); - -@@ -606,7 +606,7 @@ static void create_analyse_window(struct sctp_analyse* u_data) - u_data->analyse_nb->page2 = g_malloc(sizeof(struct page)); - - u_data->analyse_nb->page2->addr_frame = gtk_frame_new(NULL); -- gtk_container_add(GTK_CONTAINER(page2), u_data->analyse_nb->page2->addr_frame); -+ gtk_box_pack_start(GTK_BOX(page2), u_data->analyse_nb->page2->addr_frame, TRUE, TRUE, 0); - - addr_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(addr_hb), 5); -@@ -713,7 +713,7 @@ static void create_analyse_window(struct sctp_analyse* u_data) - u_data->analyse_nb->page3 = g_malloc(sizeof(struct page)); - u_data->analyse_nb->page3->addr_frame = gtk_frame_new(NULL); - -- gtk_container_add(GTK_CONTAINER(page3), u_data->analyse_nb->page3->addr_frame); -+ gtk_box_pack_start(GTK_BOX(page3), u_data->analyse_nb->page3->addr_frame, TRUE, TRUE, 0); - - addr_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(addr_hb), 5); -diff --git a/ui/gtk/sctp_chunk_stat_dlg.c b/ui/gtk/sctp_chunk_stat_dlg.c -index 8e4b438..cbc4733 100644 ---- a/ui/gtk/sctp_chunk_stat_dlg.c -+++ b/ui/gtk/sctp_chunk_stat_dlg.c -@@ -667,7 +667,7 @@ chunk_window_set_title(struct sctp_udata *u_data) - static void - sctp_chunk_dlg(struct sctp_udata *u_data) - { -- GtkWidget *main_vb, *table; -+ GtkWidget *main_vb, *grid; - GtkWidget *label, *h_button_box; - GtkWidget *close_bt; - gchar label_txt[50]; -@@ -686,34 +686,34 @@ sctp_chunk_dlg(struct sctp_udata *u_data) - gtk_container_set_border_width(GTK_CONTAINER(main_vb), 12); - gtk_container_add(GTK_CONTAINER(u_data->io->window), main_vb); - -- /* table */ -- table = gtk_table_new(1, 4, FALSE); -- gtk_table_set_col_spacings(GTK_TABLE(table), 6); -- gtk_table_set_row_spacings(GTK_TABLE(table), 3); -- gtk_container_add(GTK_CONTAINER(main_vb), table); -+ /* grid */ -+ grid = ws_gtk_grid_new(); -+ ws_gtk_grid_set_column_spacing(GTK_GRID(grid), 6); -+ ws_gtk_grid_set_row_spacing(GTK_GRID(grid), 3); -+ gtk_box_pack_start(GTK_BOX(main_vb), grid, TRUE, TRUE, 0); - row = 0; - - label = gtk_label_new("ChunkType"); - gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, row, 1, 1); - label = gtk_label_new("Association"); - gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 1, row, 1, 1); - label = gtk_label_new("Endpoint 1"); - gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 2, 3, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 2, row, 1, 1); - label = gtk_label_new("Endpoint 2"); - gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 3, 4, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 3, row, 1, 1); - row ++; - label = gtk_label_new(""); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, row, 1, 1); - label = gtk_label_new(""); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 1, row, 1, 1); - label = gtk_label_new(""); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 2, 3, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 2, row, 1, 1); - label = gtk_label_new(""); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 3, 4, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 3, row, 1, 1); - row ++; - - for (i=0; ichunk_count[i]); - label = gtk_label_new(label_txt); - gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 1, row, 1, 1); - g_snprintf(label_txt, 10, "%u", selected_stream->ep1_chunk_count[i]); - label = gtk_label_new(label_txt); - gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 2, 3, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 2, row, 1, 1); - g_snprintf(label_txt, 10, "%u", selected_stream->ep2_chunk_count[i]); - label = gtk_label_new(label_txt); - gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 3, 4, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 3, row, 1, 1); - row ++; - } - } - - label = gtk_label_new("Others"); - gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 0, row, 1, 1); - g_snprintf(label_txt, 10, "%u", selected_stream->chunk_count[OTHER_CHUNKS_INDEX]); - label = gtk_label_new(label_txt); - gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 1, row, 1, 1); - g_snprintf(label_txt, 10, "%u", selected_stream->ep1_chunk_count[OTHER_CHUNKS_INDEX]); - label = gtk_label_new(label_txt); - gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 2, 3, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 2, row, 1, 1); - g_snprintf(label_txt, 10, "%u", selected_stream->ep2_chunk_count[OTHER_CHUNKS_INDEX]); - label = gtk_label_new(label_txt); - gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f); -- gtk_table_attach_defaults(GTK_TABLE(table), label, 3, 4, row, row+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(grid), label, 3, row, 1, 1); - -- h_button_box=gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL); -+ h_button_box = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL); - gtk_box_pack_start(GTK_BOX(main_vb), h_button_box, FALSE, FALSE, 0); - gtk_container_set_border_width(GTK_CONTAINER(h_button_box), 10); - gtk_button_box_set_layout(GTK_BUTTON_BOX (h_button_box), GTK_BUTTONBOX_SPREAD); -diff --git a/ui/gtk/simple_dialog.c b/ui/gtk/simple_dialog.c -index 8c687e6..ff484b7 100644 ---- a/ui/gtk/simple_dialog.c -+++ b/ui/gtk/simple_dialog.c -@@ -139,17 +139,17 @@ display_simple_dialog(gint type, gint btn_mask, char *message) - /* Top row: Icon and message text */ - top_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(main_vb), 6); -- gtk_container_add(GTK_CONTAINER(main_vb), top_hb); -+ gtk_box_pack_start(GTK_BOX(main_vb), top_hb, TRUE, TRUE, 0); - gtk_widget_show(top_hb); - - gtk_misc_set_alignment (GTK_MISC (type_pm), 0.5f, 0.0f); -- gtk_container_add(GTK_CONTAINER(top_hb), type_pm); -+ gtk_box_pack_start(GTK_BOX(top_hb), type_pm, TRUE, TRUE, 0); - gtk_widget_show(type_pm); - - /* column for message and optional check button */ - msg_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 6, FALSE); - gtk_box_set_spacing(GTK_BOX(msg_vb), 24); -- gtk_container_add(GTK_CONTAINER(top_hb), msg_vb); -+ gtk_box_pack_start(GTK_BOX(top_hb), msg_vb, TRUE, TRUE, 0); - gtk_widget_show(msg_vb); - - /* message */ -@@ -162,7 +162,7 @@ display_simple_dialog(gint type, gint btn_mask, char *message) - - gtk_label_set_justify(GTK_LABEL(msg_label), GTK_JUSTIFY_FILL); - gtk_misc_set_alignment (GTK_MISC (type_pm), 0.5f, 0.0f); -- gtk_container_add(GTK_CONTAINER(msg_vb), msg_label); -+ gtk_box_pack_start(GTK_BOX(msg_vb), msg_label, TRUE, TRUE, 0); - gtk_label_set_line_wrap(GTK_LABEL(msg_label), TRUE); - gtk_widget_show(msg_label); - -@@ -173,7 +173,7 @@ display_simple_dialog(gint type, gint btn_mask, char *message) - - /* optional check button */ - ask_cb = gtk_check_button_new_with_label("replace with text..."); -- gtk_container_add(GTK_CONTAINER(msg_vb), ask_cb); -+ gtk_box_pack_start(GTK_BOX(msg_vb), ask_cb, TRUE, TRUE, 0); - g_object_set_data(G_OBJECT(win), CHECK_BUTTON, ask_cb); - - /* Button row */ -@@ -207,7 +207,7 @@ display_simple_dialog(gint type, gint btn_mask, char *message) - bbox = NULL; - break; - } -- gtk_container_add(GTK_CONTAINER(main_vb), bbox); -+ gtk_box_pack_start(GTK_BOX(main_vb), bbox, TRUE, TRUE, 0); - gtk_widget_show(bbox); - - ok_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_OK); -diff --git a/ui/gtk/sip_stat.c b/ui/gtk/sip_stat.c -index 2f3e16a..9fa1677 100644 ---- a/ui/gtk/sip_stat.c -+++ b/ui/gtk/sip_stat.c -@@ -612,11 +612,11 @@ gtk_sipstat_init(const char *optarg, void *userdata _U_) - /* Initialise & show number of packets */ - sp->packets = 0; - sp->packets_label = gtk_label_new("SIP stats (0 SIP packets)"); -- gtk_container_add(GTK_CONTAINER(main_vb), sp->packets_label); -+ gtk_box_pack_start(GTK_BOX(main_vb), sp->packets_label, TRUE, TRUE, 0); - - sp->resent_packets = 0; - sp->resent_label = gtk_label_new("(0 resent packets)"); -- gtk_container_add(GTK_CONTAINER(main_vb), sp->resent_label); -+ gtk_box_pack_start(GTK_BOX(main_vb), sp->resent_label, TRUE, TRUE, 0); - gtk_widget_show(sp->resent_label); - - -@@ -666,11 +666,11 @@ gtk_sipstat_init(const char *optarg, void *userdata _U_) - - /* Separator between requests and responses */ - separator = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL); -- gtk_container_add(GTK_CONTAINER(main_vb), separator); -+ gtk_box_pack_start(GTK_BOX(main_vb), separator, TRUE, TRUE, 0); - - /* Request table and frame */ - request_fr = gtk_frame_new("List of request methods"); -- gtk_container_add(GTK_CONTAINER(main_vb), request_fr); -+ gtk_box_pack_start(GTK_BOX(main_vb), request_fr, TRUE, TRUE, 0); - gtk_container_set_border_width(GTK_CONTAINER(request_fr), 0); - - sp->request_box = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 10, FALSE); -@@ -680,7 +680,7 @@ gtk_sipstat_init(const char *optarg, void *userdata _U_) - sp->max_setup_time =0; - sp->min_setup_time =0; - sp->average_setup_time_label = gtk_label_new("(Not calculated)"); -- gtk_container_add(GTK_CONTAINER(main_vb), sp->average_setup_time_label); -+ gtk_box_pack_start(GTK_BOX(main_vb), sp->average_setup_time_label, TRUE, TRUE, 0); - gtk_widget_show(sp->average_setup_time_label); - - -diff --git a/ui/gtk/stats_tree_stat.c b/ui/gtk/stats_tree_stat.c -index 2fc049c..ebb5ce9 100644 ---- a/ui/gtk/stats_tree_stat.c -+++ b/ui/gtk/stats_tree_stat.c -@@ -298,7 +298,7 @@ init_gtk_tree(const char* optarg, void *userdata _U_) - gtk_tree_view_column_set_sizing(column,GTK_TREE_VIEW_COLUMN_AUTOSIZE); - gtk_tree_view_append_column (GTK_TREE_VIEW (st->pr->tree), column); - -- gtk_container_add( GTK_CONTAINER(main_vb), scr_win); -+ gtk_box_pack_start(GTK_BOX(main_vb), scr_win, TRUE, TRUE, 0); - - error_string = register_tap_listener( cfg->tapname, - st, -diff --git a/ui/gtk/summary_dlg.c b/ui/gtk/summary_dlg.c -index ef4c86b..c2eb000 100644 ---- a/ui/gtk/summary_dlg.c -+++ b/ui/gtk/summary_dlg.c -@@ -230,7 +230,7 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_) - table = gtk_table_new(1, 2, FALSE); - gtk_table_set_col_spacings(GTK_TABLE(table), 6); - gtk_table_set_row_spacings(GTK_TABLE(table), 3); -- gtk_container_add(GTK_CONTAINER(main_vb), table); -+ gtk_box_pack_start(GTK_BOX(main_vb), table, TRUE, TRUE, 0); - row = 0; - - -@@ -273,7 +273,7 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_) - /* Capture file comment area */ - comment_frame = gtk_frame_new ("Capture file comments"); - gtk_frame_set_shadow_type (GTK_FRAME (comment_frame), GTK_SHADOW_ETCHED_IN); -- gtk_container_add (GTK_CONTAINER (main_vb), comment_frame); -+ gtk_box_pack_start (GTK_BOX (main_vb), comment_frame, TRUE, TRUE, 0); - gtk_widget_show (comment_frame); - - comment_vbox = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE); -@@ -290,7 +290,7 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_) - gtk_text_buffer_set_text (buffer, buf_str, -1); - g_free(buf_str); - } -- gtk_container_add(GTK_CONTAINER(comment_vbox), comment_view); -+ gtk_box_pack_start(GTK_BOX(comment_vbox), comment_view, TRUE, TRUE, 0); - gtk_widget_show (comment_view); - - /* -@@ -407,12 +407,12 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_) - gtk_tree_view_set_model(GTK_TREE_VIEW(treeview), GTK_TREE_MODEL(store)); - g_object_unref (store); - gtk_container_add(GTK_CONTAINER(scrolled_window), treeview); -- gtk_container_add(GTK_CONTAINER(main_vb),scrolled_window); -+ gtk_box_pack_start(GTK_BOX(main_vb), scrolled_window, TRUE, TRUE, 0); - gtk_widget_show_all (scrolled_window); - table = gtk_table_new(1, 2, FALSE); - gtk_table_set_col_spacings(GTK_TABLE(table), 6); - gtk_table_set_row_spacings(GTK_TABLE(table), 3); -- gtk_container_add(GTK_CONTAINER(main_vb), table); -+ gtk_box_pack_start(GTK_BOX(main_vb), table, TRUE, TRUE, 0); - row = 0; - - -@@ -450,7 +450,7 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_) - - /* Traffic */ - list = simple_list_new(4, titles); -- gtk_container_add(GTK_CONTAINER(main_vb), list); -+ gtk_box_pack_start(GTK_BOX(main_vb), list, TRUE, TRUE, 0); - - /* Packet count */ - g_snprintf(string_buff, SUM_STR_MAX, "%i", summary.packet_count); -@@ -590,7 +590,7 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_) - - /* Button row. */ - bbox = dlg_button_row_new(GTK_STOCK_CANCEL, GTK_STOCK_OK, GTK_STOCK_HELP, NULL); -- gtk_container_add(GTK_CONTAINER(main_vb), bbox); -+ gtk_box_pack_start(GTK_BOX(main_vb), bbox, TRUE, TRUE, 0); - - cancel_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CANCEL); - window_set_cancel_button(summary_dlg, cancel_bt, window_cancel_button_cb); -diff --git a/ui/gtk/supported_protos_dlg.c b/ui/gtk/supported_protos_dlg.c -index 77c6623..93919f6 100644 ---- a/ui/gtk/supported_protos_dlg.c -+++ b/ui/gtk/supported_protos_dlg.c -@@ -103,7 +103,7 @@ void supported_cb(GtkWidget *w _U_, gpointer data _U_) - - /* supported topics container */ - supported_nb = gtk_notebook_new(); -- gtk_container_add(GTK_CONTAINER(main_vb), supported_nb); -+ gtk_box_pack_start(GTK_BOX(main_vb), supported_nb, TRUE, TRUE, 0); - - - /* protocol list */ -diff --git a/ui/gtk/time_shift_dlg.c b/ui/gtk/time_shift_dlg.c -index d49788c..2fa502e 100644 ---- a/ui/gtk/time_shift_dlg.c -+++ b/ui/gtk/time_shift_dlg.c -@@ -136,7 +136,7 @@ time_shift_cb(GtkWidget *w _U_, gpointer d _U_) - * Shift All Packets frame - */ - main_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(main_vb), main_hb); -+ gtk_box_pack_start(GTK_BOX(main_vb), main_hb, TRUE, TRUE, 0); - gtk_widget_show(main_hb); - - types_frame = gtk_frame_new(NULL); -@@ -179,7 +179,7 @@ time_shift_cb(GtkWidget *w _U_, gpointer d _U_) - * Set Packet Number to Time frame - */ - main_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(main_vb), main_hb); -+ gtk_box_pack_start(GTK_BOX(main_vb), main_hb, TRUE, TRUE, 0); - gtk_widget_show(main_hb); - - types_frame = gtk_frame_new(NULL); -@@ -244,7 +244,7 @@ time_shift_cb(GtkWidget *w _U_, gpointer d _U_) - * Set two Packet Numbers to Time frame and extrapolate - */ - main_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(main_vb), main_hb); -+ gtk_box_pack_start(GTK_BOX(main_vb), main_hb, TRUE, TRUE, 0); - gtk_widget_show(main_hb); - - types_frame = gtk_frame_new(NULL); -@@ -345,7 +345,7 @@ time_shift_cb(GtkWidget *w _U_, gpointer d _U_) - * Undo all shifts - */ - main_hb = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 3, FALSE); -- gtk_container_add(GTK_CONTAINER(main_vb), main_hb); -+ gtk_box_pack_start(GTK_BOX(main_vb), main_hb, TRUE, TRUE, 0); - gtk_widget_show(main_hb); - - types_frame = gtk_frame_new(NULL); -@@ -380,7 +380,7 @@ time_shift_cb(GtkWidget *w _U_, gpointer d _U_) - */ - bbox = dlg_button_row_new(GTK_STOCK_APPLY, GTK_STOCK_CLOSE, GTK_STOCK_HELP, - NULL); -- gtk_box_pack_start(GTK_BOX(main_vb), bbox, FALSE, FALSE, 0); -+ gtk_box_pack_start(GTK_BOX(main_vb), bbox, TRUE, TRUE, 0); - gtk_widget_show(bbox); - - apply_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_APPLY); -diff --git a/ui/gtk/uat_gui.c b/ui/gtk/uat_gui.c -index 72d5f72..5b72ce8 100644 ---- a/ui/gtk/uat_gui.c -+++ b/ui/gtk/uat_gui.c -@@ -937,7 +937,7 @@ static GtkWidget* uat_window(void* u) { - - hbox = ws_gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(hbox), 6); -- gtk_container_add(GTK_CONTAINER(rep->vbox), hbox); -+ gtk_box_pack_start(GTK_BOX(rep->vbox), hbox, TRUE, TRUE, 0); - - vbox = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 12, FALSE); - gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); -diff --git a/ui/gtk/wsp_stat.c b/ui/gtk/wsp_stat.c -index 56f986f..36a23df 100644 ---- a/ui/gtk/wsp_stat.c -+++ b/ui/gtk/wsp_stat.c -@@ -60,9 +60,9 @@ typedef struct _wsp_stats_t { - guint32 num_pdus; - GtkWidget *win; - GHashTable *hash; -- GtkWidget *table_pdu_types; -- GtkWidget *table_status_code; -- guint index; /* Number of status code to display */ -+ GtkWidget *grid_pdu_types; -+ GtkWidget *grid_status_code; -+ guint index; /* Number of status codes to display */ - } wspstat_t; - /* used to keep track of a single type of status code */ - typedef struct _wsp_status_code_t { -@@ -102,14 +102,14 @@ wsp_draw_statuscode(gchar *key _U_, wsp_status_code_t *data, gchar * unused _U_ - - /* Maybe we should display the hexadecimal value ? */ - /* g_snprintf(string_buff, sizeof(string_buff), "%s (0X%x)", data->name, *key); */ -- tmp = gtk_label_new( data->name /* string_buff */ ); -- gtk_table_attach_defaults(GTK_TABLE(data->sp->table_status_code), tmp, x, x+1, y, y+1); -+ tmp = gtk_label_new(data->name /* string_buff */ ); -+ ws_gtk_grid_attach_defaults(GTK_GRID(data->sp->grid_status_code), tmp, x, y, 1, 1); - gtk_label_set_justify(GTK_LABEL(tmp), GTK_JUSTIFY_LEFT); - gtk_widget_show(tmp); - - g_snprintf( string_buff, sizeof(string_buff), "%9d", data->packets ); - data->widget = gtk_label_new( string_buff ); -- gtk_table_attach_defaults(GTK_TABLE(data->sp->table_status_code), data->widget, x+1, x+2, y, y+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(data->sp->grid_status_code), data->widget, x+1, y, 1, 1); - gtk_label_set_justify(GTK_LABEL(data->widget), GTK_JUSTIFY_LEFT); - gtk_widget_show( data->widget ); - -@@ -207,7 +207,6 @@ wspstat_draw(void *psp) - wspstat_t *sp=psp; - guint32 i; - char str[256]; -- guint idx; - - for(i=1;i<=sp->num_pdus ; i++) - { -@@ -215,14 +214,7 @@ wspstat_draw(void *psp) - gtk_label_set_text( GTK_LABEL(sp->pdu_stats[i].widget), str); - } - -- idx=sp->index; -- g_hash_table_foreach( sp->hash, (GHFunc) wsp_draw_statuscode, NULL ); -- if (idx != sp->index){ -- /* We have inserted a new entry corresponding to a status code , -- * let's resize the table */ -- gtk_table_resize ( GTK_TABLE(sp->table_status_code), sp->index % 2 , 4); -- } -- -+ g_hash_table_foreach(sp->hash, (GHFunc)wsp_draw_statuscode, NULL); - } - - -@@ -255,7 +247,7 @@ add_table_entry(wspstat_t *sp, const char *str, int x, int y, int idx) - GtkWidget *tmp; - - tmp=gtk_label_new( str ); -- gtk_table_attach_defaults(GTK_TABLE(sp->table_pdu_types), tmp, x, x+1, y, y+1); -+ ws_gtk_grid_attach_defaults(GTK_GRID(sp->grid_pdu_types), tmp, x, y, 1, 1); - gtk_label_set_justify(GTK_LABEL(tmp), GTK_JUSTIFY_LEFT); - gtk_widget_show(tmp); - if (idx != 0) { -@@ -368,21 +360,21 @@ gtk_wspstat_init(const char *optarg, void *userdata _U_) - - /* PDU Types frame */ - pdutypes_fr = gtk_frame_new("Summary of PDU Types (wsp.pdu_type)"); -- gtk_container_add(GTK_CONTAINER(main_vb), pdutypes_fr); -+ gtk_box_pack_start(GTK_BOX(main_vb), pdutypes_fr, TRUE, TRUE, 0); - -- sp->table_pdu_types = gtk_table_new( (sp->num_pdus+1) / 2 + 1, 4, FALSE); -- gtk_container_add( GTK_CONTAINER( pdutypes_fr), sp->table_pdu_types); -- gtk_container_set_border_width( GTK_CONTAINER(sp->table_pdu_types) , 10); -+ sp->grid_pdu_types = ws_gtk_grid_new(); -+ gtk_container_add(GTK_CONTAINER(pdutypes_fr), sp->grid_pdu_types); -+ gtk_container_set_border_width(GTK_CONTAINER(sp->grid_pdu_types), 10); - - wsp_init_table(sp); - - /* Status Codes frame */ - statuscode_fr = gtk_frame_new("Summary of Status Code (wsp.reply.status)"); -- gtk_container_add(GTK_CONTAINER(main_vb), statuscode_fr); -+ gtk_box_pack_start(GTK_BOX(main_vb), statuscode_fr, FALSE, FALSE, 0); - -- sp->table_status_code = gtk_table_new( 0, 4, FALSE); -- gtk_container_add( GTK_CONTAINER( statuscode_fr), sp->table_status_code); -- gtk_container_set_border_width( GTK_CONTAINER(sp->table_status_code) , 10); -+ sp->grid_status_code = ws_gtk_grid_new(); -+ gtk_container_add(GTK_CONTAINER(statuscode_fr), sp->grid_status_code); -+ gtk_container_set_border_width(GTK_CONTAINER(sp->grid_status_code), 10); - sp->index = 0; /* No answers to display yet */ - - error_string = register_tap_listener( diff --git a/wireshark.spec b/wireshark.spec index 39e748e..93d001b 100644 --- a/wireshark.spec +++ b/wireshark.spec @@ -2,7 +2,7 @@ %global with_adns 0 %global with_lua 1 -%global with_gtk2 0 +%global with_gtk2 1 %if 0%{?rhel} != 0 #RHEL: @@ -21,7 +21,7 @@ Summary: Network traffic analyzer Name: wireshark Version: 1.8.6 -Release: 1%{?dist} +Release: 2%{?dist} License: GPL+ Group: Applications/Internet Source0: http://wireshark.org/download/src/%{name}-%{version}.tar.bz2 @@ -40,7 +40,6 @@ Patch3: wireshark-libtool-pie.patch Patch4: wireshark-1.6.1-group-msg.patch Patch5: wireshark-1.6.0-soname.patch Patch6: wireshark-1.8.2-python-symbols.patch -Patch7: wireshark-1.8.x-gtk3-layouts.patch Url: http://www.wireshark.org/ BuildRequires: libpcap-devel >= 0.9 @@ -139,7 +138,6 @@ and plugins. %patch4 -p1 -b .group-msg %patch5 -p1 -b .soname %patch6 -p1 -b .python-symbols -%patch7 -p1 -b .gtk3-layoyts %build %ifarch s390 s390x sparcv9 sparc64 @@ -365,6 +363,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/aclocal/* %changelog +* Mon Mar 18 2013 Peter Hatina 1.8.6-2 +- return to gtk2, stable branch 1.8 is not gtk3 ready + * Tue Mar 12 2013 Peter Hatina 1.8.6-1 - upgrade to 1.8.6 - see http://www.wireshark.org/docs/relnotes/wireshark-1.8.6.html