From ade058df51e1a2f33fe6774ad81b62313ca6ecfe Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 22 May 2004 04:25:57 +0000 Subject: [PATCH] Declare "text_page_new()" in a "gtk/text_page.h" header, rather than embedding a declaration in "gtk/about_dlg.c". Do the Authors page in the About dialog on UN*X as well as on Windows. svn path=/trunk/; revision=10951 --- gtk/Makefile.am | 3 ++- gtk/about_dlg.c | 10 +--------- gtk/help_dlg.c | 3 ++- gtk/text_page.h | 30 ++++++++++++++++++++++++++++++ 4 files changed, 35 insertions(+), 11 deletions(-) create mode 100644 gtk/text_page.h diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 178d0c1f40..fa46e995b4 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -1,7 +1,7 @@ # Makefile.am # Automake file for the GTK interface routines for Ethereal # -# $Id: Makefile.am,v 1.97 2004/05/21 08:44:45 guy Exp $ +# $Id: Makefile.am,v 1.98 2004/05/22 04:25:57 guy Exp $ # # Ethereal - Network traffic analyzer # By Gerald Combs @@ -83,6 +83,7 @@ noinst_HEADERS = \ supported_protos_dlg.h \ tap_dfilter_dlg.h \ tap_menu.h \ + text_page.h \ toolbar.h \ ui_util.h diff --git a/gtk/about_dlg.c b/gtk/about_dlg.c index 5aadf03bf3..2576d9a5c7 100644 --- a/gtk/about_dlg.c +++ b/gtk/about_dlg.c @@ -1,6 +1,6 @@ /* about_dlg.c * - * $Id: about_dlg.c,v 1.7 2004/05/21 17:35:43 ulfl Exp $ + * $Id: about_dlg.c,v 1.8 2004/05/22 04:25:57 guy Exp $ * * Ulf Lamping * @@ -106,9 +106,6 @@ about_ethereal_page_new(void) return main_vb; } -#ifdef WIN32 -extern GtkWidget * text_page_new(const char *absolute_path); - static GtkWidget * about_authors_page_new(void) { @@ -120,7 +117,6 @@ about_authors_page_new(void) return page; } -#endif static void about_folders_row(GtkWidget *table, const char *label, const char *dir, const char *tip) @@ -208,9 +204,7 @@ about_ethereal_cb( GtkWidget *w _U_, gpointer data _U_ ) GtkWidget *main_vb, *main_nb, *bbox, *ok_btn; GtkWidget *page_lb, *about_page, *folders_page, *plugins_page; -#ifdef WIN32 GtkWidget *authors_page; -#endif if (about_ethereal_w != NULL) { /* There's already an "About Ethereal" dialog box; reactivate it. */ @@ -239,11 +233,9 @@ about_ethereal_cb( GtkWidget *w _U_, gpointer data _U_ ) page_lb = gtk_label_new("Ethereal"); gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), about_page, page_lb); -#ifdef WIN32 authors_page = about_authors_page_new(); page_lb = gtk_label_new("Authors"); gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), authors_page, page_lb); -#endif folders_page = about_folders_page_new(); WIDGET_SET_SIZE(folders_page, 500, 200); diff --git a/gtk/help_dlg.c b/gtk/help_dlg.c index b25bad1139..64764c17ea 100644 --- a/gtk/help_dlg.c +++ b/gtk/help_dlg.c @@ -1,6 +1,6 @@ /* help_dlg.c * - * $Id: help_dlg.c,v 1.50 2004/05/21 08:55:07 ulfl Exp $ + * $Id: help_dlg.c,v 1.51 2004/05/22 04:25:57 guy Exp $ * * Laurent Deniel * @@ -34,6 +34,7 @@ #include "epan/filesystem.h" #include "help_dlg.h" +#include "text_page.h" #include "prefs.h" #include "gtkglobals.h" #include "ui_util.h" diff --git a/gtk/text_page.h b/gtk/text_page.h new file mode 100644 index 0000000000..2cbdf04db4 --- /dev/null +++ b/gtk/text_page.h @@ -0,0 +1,30 @@ +/* text_page.h + * Declarations of routine to construct a simple text page from a file. + * + * $Id: text_page.h,v 1.1 2004/05/22 04:25:57 guy Exp $ + * + * Ethereal - Network traffic analyzer + * By Gerald Combs + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef __TEXT_PAGE_H__ +#define __TEXT_PAGE_H__ + +extern GtkWidget * text_page_new(const char *absolute_path); + +#endif /* __TEXT_PAGE_H__ */