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" - "