tRename WebBrowser to avoid conflicts - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 1024456d3fa3d80248ae1f8d99392eec154c4545
(DIR) parent a8aa6fa728c84074d8af961e03ba8354e6a33b78
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Mon, 30 Nov 2020 00:01:09 -0800
Rename WebBrowser to avoid conflicts
Rename WebBrowser to OurWebBrowser, since WebBrowser
is also defined (as a different type) in the Windows
shlobj.h header file.
Diffstat:
M src/dopewars.c | 6 +++---
M src/dopewars.h | 2 +-
M src/gui_client/gtk_client.c | 4 ++--
M src/gui_client/optdialog.c | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
---
(DIR) diff --git a/src/dopewars.c b/src/dopewars.c
t@@ -99,7 +99,7 @@ gboolean Daemonize = TRUE;
#define SNDPATH DPDATADIR"/dopewars/"
#endif
-gchar *WebBrowser = NULL;
+gchar *OurWebBrowser = NULL;
gint ConfigErrors = 0;
gboolean LocaleIsUTF8 = FALSE;
t@@ -298,7 +298,7 @@ struct GLOBALS Globals[] = {
{NULL, &Daemonize, NULL, NULL, NULL, "Daemonize",
N_("If TRUE, the server runs in the background"),
NULL, NULL, 0, "", NULL, NULL, FALSE, 0, 0},
- {NULL, NULL, NULL, &WebBrowser, NULL, "WebBrowser",
+ {NULL, NULL, NULL, &OurWebBrowser, NULL, "WebBrowser",
N_("The command used to start your web browser"),
NULL, NULL, 0, "", NULL, NULL, FALSE, 0, 0},
#endif
t@@ -2406,7 +2406,7 @@ static void SetupParameters(GSList *extraconfigs, gboolean antique)
AssignName(&ServerName, "localhost");
AssignName(&ServerMOTD, "");
AssignName(&BindAddress, "");
- AssignName(&WebBrowser, "/usr/bin/firefox");
+ AssignName(&OurWebBrowser, "/usr/bin/firefox");
AssignName(&Sounds.FightHit, SNDPATH"colt.wav");
AssignName(&Sounds.EnemyBitchKilled, SNDPATH"shotdown.wav");
(DIR) diff --git a/src/dopewars.h b/src/dopewars.h
t@@ -183,7 +183,7 @@ extern gboolean MinToSysTray;
#else
extern gboolean Daemonize;
#endif
-extern gchar *WebBrowser;
+extern gchar *OurWebBrowser;
extern int LoanSharkLoc, BankLoc, GunShopLoc, RoughPubLoc;
extern int DrugSortMethod, FightTimeout, IdleTimeout, ConnectTimeout;
extern int MaxClients, AITurnPause;
(DIR) diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c
t@@ -2472,11 +2472,11 @@ void display_intro(GtkWidget *widget, gpointer data)
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
docindex = GetDocIndex();
- PackCentredURL(vbox, _("Local HTML documentation"), docindex, WebBrowser);
+ PackCentredURL(vbox, _("Local HTML documentation"), docindex, OurWebBrowser);
g_free(docindex);
PackCentredURL(vbox, "https://dopewars.sourceforge.io/",
- "https://dopewars.sourceforge.io/", WebBrowser);
+ "https://dopewars.sourceforge.io/", OurWebBrowser);
hsep = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
gtk_box_pack_start(GTK_BOX(vbox), hsep, FALSE, FALSE, 0);
(DIR) diff --git a/src/gui_client/optdialog.c b/src/gui_client/optdialog.c
t@@ -654,7 +654,7 @@ static void HelpCallback(GtkWidget *widget, GtkWidget *notebook)
gchar *help;
help = GetHelpPage(pagehelp[page]);
- DisplayHTML(widget, WebBrowser, help);
+ DisplayHTML(widget, OurWebBrowser, help);
g_free(help);
}