44 if (arg == GTK_RESPONSE_YES) {
57 GtkWidget *dialog, *label;
60 dialog = gtk_dialog_new_with_buttons(
_(
"Preferred soundset"),
65 _(
"_Keep current soundset"),
69 gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_YES);
70 gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog),
TRUE);
73 _(
"Modpack suggests using %s soundset.\n"
74 "It might not work with other soundsets.\n"
75 "You are currently using soundset %s."),
78 label = gtk_label_new(buf);
79 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), label);
80 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER);
81 gtk_widget_show(label);
83 g_signal_connect(dialog,
"response",
89 gtk_dialog_run(GTK_DIALOG(dialog));
91 gtk_widget_destroy(dialog);
99 if (arg == GTK_RESPONSE_YES) {
111 GtkWidget *dialog, *label;
114 dialog = gtk_dialog_new_with_buttons(
_(
"Preferred musicset"),
119 _(
"_Keep current musicset"),
122 gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_YES);
123 gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog),
TRUE);
126 _(
"Modpack suggests using %s musicset.\n"
127 "It might not work with other musicsets.\n"
128 "You are currently using musicset %s."),
131 label = gtk_label_new(buf);
132 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), label);
133 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER);
134 gtk_widget_show(label);
136 g_signal_connect(dialog,
"response",
142 gtk_dialog_run(GTK_DIALOG(dialog));
144 gtk_widget_destroy(dialog);
void audio_restart(const char *soundset_name, const char *musicset_name)
void setup_dialog(GtkWidget *shell, GtkWidget *parent)
void popup_musicset_suggestion_dialog(void)
void popup_soundset_suggestion_dialog(void)
static void musicset_suggestion_callback(GtkWidget *dlg, gint arg)
static void soundset_suggestion_callback(GtkWidget *dlg, gint arg)
struct packet_ruleset_control control
char preferred_soundset[MAX_LEN_NAME]
char preferred_musicset[MAX_LEN_NAME]
int fc_snprintf(char *str, size_t n, const char *format,...)