diff options
author | oabad <oabad@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-08-31 09:55:22 +0000 |
---|---|---|
committer | oabad <oabad@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-08-31 09:55:22 +0000 |
commit | 5be294335911e1547c564aef789551ef1e8edf09 (patch) | |
tree | aaa172f3e9f0d9afd5a24ce67509aa9468ff8401 /file.c | |
parent | faaa787e9f6381f3a6ea58f749d7193240b14d1f (diff) |
GTK+ v2 port.
All the deprecated widgets have not been replaced yet :
GtkList and GtkCList ==> GtkTreeView conversion :
- color_dlg.c
- column_prefs.c
- decode_as_dlg.c : done
- dfilter_expr_dialog
- filter_prefs.c
- main.c
- plugins_dlg.c : done
GtkCTree ==> GtkTreeView conversion : done
GtkText ==> GtkTextView conversion : done
Remaining problems :
- gtk_font_selection_dialog_set_filter doesn't exist anymore (but hasn't
been removed from the documentation). I don't know how to filter the
font selection dialog to get only fixed width fonts ;
- we have to remove GUI prefs which are not usefule anymore : tree line
style and tree expander style.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6153 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* file.c * File I/O routines * - * $Id: file.c,v 1.287 2002/08/28 21:00:06 jmayer Exp $ + * $Id: file.c,v 1.288 2002/08/31 09:55:18 oabad Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -63,9 +63,17 @@ #include <epan/epan.h> #include <epan/filesystem.h> +#if GTK_MAJOR_VERSION == 1 #include "gtk/main.h" +#else +#include "gtk2/main.h" +#endif #include "color.h" +#if GTK_MAJOR_VERSION == 1 #include "gtk/color_utils.h" +#else +#include "gtk2/color_utils.h" +#endif #include "column.h" #include <epan/packet.h> #include "print.h" @@ -77,12 +85,21 @@ #include "ui_util.h" #include "statusbar.h" #include "prefs.h" +#if GTK_MAJOR_VERSION == 1 #include "gtk/proto_draw.h" #include "gtk/packet_win.h" +#else +#include "gtk2/proto_draw.h" +#include "gtk2/packet_win.h" +#endif #include <epan/dfilter/dfilter.h> #include <epan/conversation.h> #include "globals.h" +#if GTK_MAJOR_VERSION == 1 #include "gtk/colors.h" +#else +#include "gtk2/colors.h" +#endif #include <epan/epan_dissect.h> extern GtkWidget *packet_list, *byte_nb_ptr, *tree_view; @@ -1429,7 +1446,12 @@ change_time_formats(capture_file *cf) for (i = 0; i < cf->cinfo.num_cols; i++) { if (cf->cinfo.fmt_matx[i][COL_CLS_TIME]) { gtk_clist_set_column_width(GTK_CLIST(packet_list), i, +#if GTK_MAJOR_VERSION == 1 gdk_string_width(pl_style->font, get_column_longest_string(COL_CLS_TIME))); +#else + gdk_string_width(gdk_font_from_description(pl_style->font_desc), + get_column_longest_string(COL_CLS_TIME))); +#endif } } |