diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-01-11 07:40:32 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-01-11 07:40:32 +0000 |
commit | feb5791d6ae22cca80342e84961273ddaaf52b6f (patch) | |
tree | 467547aec98e0b9c4656c1d3ff930b5a308bd1f7 /gtk/main.c | |
parent | e592fa4a6bdf6342a790f488596c73d2332c9d27 (diff) |
Have a routine to create a scrolled window, set its vertical scrollbar
preference, and add it to the list of scrolled windows; call that
routine to create scrolled windows, rather than creating it and calling
other routines to do the other two operations.
As "set_scrollbar_placement_all()" and "set_ctree_styles_all()" always
set the styles to match the user's preference, don't have them take an
argument, have them just use the user's preference settings.
Get rid of unnecessary includes of "prefs_dlg.h", replacing them with
includes of "prefs.h" if necessary. Don't have "prefs_dlg.h" include
"prefs.h" - its sole purpose is to declare routines defined in
"prefs_dlg.c" - and add any additional includes of "prefs.h" this
requires.
Get rid of unnecessary includes of "prefs.h" and "gtkglobals.h".
Fix up white space.
svn path=/trunk/; revision=4521
Diffstat (limited to 'gtk/main.c')
-rw-r--r-- | gtk/main.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gtk/main.c b/gtk/main.c index db96b2af6a..c59570fbb1 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -1,6 +1,6 @@ /* main.c * - * $Id: main.c,v 1.226 2002/01/11 06:43:17 guy Exp $ + * $Id: main.c,v 1.227 2002/01/11 07:40:31 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -122,12 +122,12 @@ #include "summary.h" #include "file.h" #include "filters.h" +#include "prefs.h" #include "menu.h" #include "../menu.h" #include "color.h" #include "color_utils.h" #include "filter_prefs.h" -#include "prefs_dlg.h" #include "file_dlg.h" #include "column.h" #include "print.h" @@ -146,7 +146,6 @@ #include "colors.h" #include "strutil.h" #include "register.h" -#include "prefs.h" #include "ringbuffer.h" #include "ui_util.h" #include "image/clist_ascend.xpm" @@ -1933,11 +1932,9 @@ create_main_window (gint pl_size, gint tv_size, gint bv_size, e_prefs *prefs) gtk_widget_show(u_pane); /* Packet list */ - pkt_scrollw = gtk_scrolled_window_new(NULL, NULL); + pkt_scrollw = scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(pkt_scrollw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - set_scrollbar_placement_scrollw(pkt_scrollw, prefs->gui_scrollbar_on_right); - remember_scrolled_window(pkt_scrollw); gtk_widget_show(pkt_scrollw); gtk_paned_add1(GTK_PANED(u_pane), pkt_scrollw); |