Freeciv-3.3
Loading...
Searching...
No Matches
soundset_dlg.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18#include <gtk/gtk.h>
19
20/* utility */
21#include "fcintl.h"
22
23/* common */
24#include "game.h"
25
26/* client */
27#include "audio.h"
28#include "client_main.h"
29
30/* client/gui-gtk-4.0 */
31#include "gui_main.h"
32#include "gui_stuff.h"
33
34#include "dialogs_g.h"
35
36/************************************************************************/
40{
41 if (arg == GTK_RESPONSE_YES) {
42 /* User accepted soundset loading */
45 }
46}
47
48/************************************************************************/
53{
54 GtkWidget *dialog, *label;
55 char buf[1024];
56
57 dialog = gtk_dialog_new_with_buttons(_("Preferred soundset"),
58 NULL,
59 0,
60 _("_Load soundset"),
62 _("_Keep current soundset"),
64 NULL);
65 setup_dialog(dialog, toplevel);
68
69 fc_snprintf(buf, sizeof(buf),
70 _("Modpack suggests using %s soundset.\n"
71 "It might not work with other soundsets.\n"
72 "You are currently using soundset %s."),
74
75 label = gtk_label_new(buf);
77 label);
80
81 /* In case incoming rulesets are incompatible with current soundset
82 * we need to block their receive before user has accepted loading
83 * of the correct soundset. */
85
87}
88
89/************************************************************************/
93{
94 if (arg == GTK_RESPONSE_YES) {
95 /* User accepted musicset loading */
97 }
98}
99
100/************************************************************************/
105{
106 GtkWidget *dialog, *label;
107 char buf[1024];
108
109 dialog = gtk_dialog_new_with_buttons(_("Preferred musicset"),
110 NULL,
111 0,
112 _("_Load musicset"),
114 _("_Keep current musicset"),
116 NULL);
119
120 fc_snprintf(buf, sizeof(buf),
121 _("Modpack suggests using %s musicset.\n"
122 "It might not work with other musicsets.\n"
123 "You are currently using musicset %s."),
125
126 label = gtk_label_new(buf);
128 label);
131
132 /* In case incoming rulesets are incompatible with current musicset
133 * we need to block their receive before user has accepted loading
134 * of the correct musicset. */
136
138}
void audio_restart(const char *soundset_name, const char *musicset_name)
Definition audio.c:376
char music_set_name[512]
char sound_set_name[512]
char * incite_cost
Definition comments.c:76
#define _(String)
Definition fcintl.h:67
struct civ_game game
Definition game.c:61
GtkWidget * toplevel
Definition gui_main.c:126
void setup_dialog(GtkWidget *shell, GtkWidget *parent)
Definition gui_stuff.c:287
void popup_musicset_suggestion_dialog(void)
void popup_soundset_suggestion_dialog(void)
gint blocking_dialog(GtkWidget *dlg)
Definition gui_stuff.c:1136
static void soundset_suggestion_response(gint arg)
static void musicset_suggestion_response(gint arg)
struct packet_ruleset_control control
Definition game.h:83
char preferred_soundset[MAX_LEN_NAME]
char preferred_musicset[MAX_LEN_NAME]
int fc_snprintf(char *str, size_t n, const char *format,...)
Definition support.c:960
#define TRUE
Definition support.h:46