Freeciv-3.1: /fast/freeciv/nightly/S3_1/tools/fcmp/mpgui_gtk3.c Source File

Freeciv-3.1

Loading...
Searching...
No Matches
mpgui_gtk3.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 <stdlib.h>
19
20#include <gtk/gtk.h>
21
22/* utility */
23#include "fc_cmdline.h"
24#include "fciconv.h"
25#include "fcintl.h"
26#include "log.h"
27#include "mem.h"
28
29/* common */
30#include "version.h"
31
32/* modinst */
33#include "download.h"
34#include "mpcmdline.h"
35#include "mpdb.h"
36
37#include "modinst.h"
38
39 static GtkWidget *statusbar;
40 static GtkWidget *progressbar;
41 static GtkWidget *main_list;
42 static GtkListStore *main_store;
43 static GtkWidget *URL_input;
44 static gboolean downloading = FALSE;
45
46 struct fcmp_params fcmp = {
47 .list_url = MODPACK_LIST_URL,
48 .inst_prefix = NULL,
49 .autoinstall = NULL
50};
51
52static gboolean quit_dialog_callback(void);
53
54#define ML_COL_NAME 0
55#define ML_COL_VER 1
56#define ML_COL_INST 2
57#define ML_COL_TYPE 3
58#define ML_COL_SUBTYPE 4
59#define ML_COL_LIC 5
60#define ML_COL_URL 6
61
62#define ML_COL_COUNT 7
63
64#define ML_TYPE 7
65#define ML_NOTES 8
66#define ML_STORE_SIZE 9
67
68/**********************************************************************/
71 static void modinst_quit(void)
72{
73 gtk_main_quit();
74}
75
76/**********************************************************************/
80 static void quit_dialog_response(GtkWidget *dialog, gint response)
81{
82 gtk_widget_destroy(dialog);
83 if (response == GTK_RESPONSE_YES) {
84 modinst_quit();
85 }
86}
87
88/**********************************************************************/
91 static gboolean quit_dialog_callback(void)
92{
93 if (downloading) {
94 /* Download in progress. Confirm quit from user. */
95 static GtkWidget *dialog;
96
97 if (!dialog) {
98 dialog = gtk_message_dialog_new(NULL,
99 0,
100 GTK_MESSAGE_WARNING,
101 GTK_BUTTONS_YES_NO,
102 _("Modpack installation in progress.\nAre you sure you want to quit?"));
103
104 gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE);
105
106 g_signal_connect(dialog, "response",
107 G_CALLBACK(quit_dialog_response), NULL);
108 g_signal_connect(dialog, "destroy",
109 G_CALLBACK(gtk_widget_destroyed), &dialog);
110 }
111
112 gtk_window_present(GTK_WINDOW(dialog));
113
114 } else {
115 /* User loses no work by quitting, so let's not annoy them
116 * with confirmation dialog. */
117 modinst_quit();
118 }
119
120 /* Stop emission of event. */
121 return TRUE;
122}
123
124/**********************************************************************/
127 static void msg_callback(const char *msg)
128{
129 log_verbose("%s", msg);
130 gtk_label_set_text(GTK_LABEL(statusbar), msg);
131}
132
133/**********************************************************************/
136 static void pbar_callback(int downloaded, int max)
137{
138 /* Control file already downloaded */
139 double fraction = (double) downloaded / (max);
140
141 gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progressbar), fraction);
142}
143
144 struct msg_data {
145 char *msg;
146};
147
148/**********************************************************************/
151 static gboolean msg_main_thread(gpointer user_data)
152{
153 struct msg_data *data = (struct msg_data *)user_data;
154
155 msg_callback(data->msg);
156
157 FC_FREE(data->msg);
158 FC_FREE(data);
159
160 return G_SOURCE_REMOVE;
161}
162
163/**********************************************************************/
166 static void msg_dl_thread(const char *msg)
167{
168 struct msg_data *data = fc_malloc(sizeof(*data));
169
170 data->msg = fc_strdup(msg);
171
172 gdk_threads_add_idle(msg_main_thread, data);
173}
174
175 struct pbar_data {
176 int current;
177 int max;
178};
179
180/**********************************************************************/
183 static gboolean pbar_main_thread(gpointer user_data)
184{
185 struct pbar_data *data = (struct pbar_data *)user_data;
186
187 pbar_callback(data->current, data->max);
188
189 FC_FREE(data);
190
191 return G_SOURCE_REMOVE;
192}
193
194/**********************************************************************/
197 static void pbar_dl_thread(int current, int max)
198{
199 struct pbar_data *data = fc_malloc(sizeof(*data));
200
201 data->current = current;
202 data->max = max;
203
204 gdk_threads_add_idle(pbar_main_thread, data);
205}
206
207/**********************************************************************/
210 static gboolean versionlist_update_main_thread(gpointer user_data)
211{
212 GtkTreeIter iter;
213
214 if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(main_store), &iter)) {
215 do {
216 const char *name_str;
217 int type_int;
218 const char *new_inst;
219 enum modpack_type type;
220
221 gtk_tree_model_get(GTK_TREE_MODEL(main_store), &iter,
222 ML_COL_NAME, &name_str,
223 ML_TYPE, &type_int,
224 -1);
225
226 type = type_int;
227
228 new_inst = mpdb_installed_version(name_str, type);
229
230 if (new_inst == NULL) {
231 new_inst = _("Not installed");
232 }
233
234 gtk_list_store_set(main_store, &iter,
235 ML_COL_INST, new_inst,
236 -1);
237
238 } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(main_store), &iter));
239 }
240
241 return G_SOURCE_REMOVE;
242}
243
244/**********************************************************************/
247 static void versionlist_update_dl_thread(void)
248{
249 gdk_threads_add_idle(versionlist_update_main_thread, NULL);
250}
251
252/**********************************************************************/
255 static gpointer download_thread(gpointer data)
256{
257 const char *errmsg;
258
259 errmsg = download_modpack(data, &fcmp, msg_dl_thread, pbar_dl_thread);
260
261 if (errmsg == NULL) {
262 msg_dl_thread(_("Ready"));
263 } else {
264 msg_dl_thread(errmsg);
265 }
266
267 free(data);
268
269 versionlist_update_dl_thread();
270
271 downloading = FALSE;
272
273 return NULL;
274}
275
276/**********************************************************************/
279 static void gui_download_modpack(const char *URL)
280{
281 GThread *downloader;
282 char *URLbuf;
283
284 if (downloading) {
285 gtk_label_set_text(GTK_LABEL(statusbar),
286 _("Another download already active"));
287 return;
288 }
289
290 downloading = TRUE;
291
292 URLbuf = fc_malloc(strlen(URL) + 1);
293
294 strcpy(URLbuf, URL);
295
296 downloader = g_thread_new("Downloader", download_thread, URLbuf);
297 if (downloader == NULL) {
298 gtk_label_set_text(GTK_LABEL(statusbar),
299 _("Failed to start downloader"));
300 free(URLbuf);
301 } else {
302 g_thread_unref(downloader);
303 }
304}
305
306/**********************************************************************/
309 static void install_clicked(GtkWidget *w, gpointer data)
310{
311 GtkEntry *URL_in = data;
312 const char *URL = gtk_entry_get_text(URL_in);
313
314 gui_download_modpack(URL);
315}
316
317/**********************************************************************/
320 static void URL_return(GtkEntry *w, gpointer data)
321{
322 const char *URL;
323
324 URL = gtk_entry_get_text(w);
325 gui_download_modpack(URL);
326}
327
328/**********************************************************************/
331 static gboolean query_main_list_tooltip_cb(GtkWidget *widget,
332 gint x, gint y,
333 gboolean keyboard_tip,
334 GtkTooltip *tooltip,
335 gpointer data)
336{
337 GtkTreeIter iter;
338 GtkTreeView *tree_view = GTK_TREE_VIEW(widget);
339 GtkTreeModel *model;
340 const char *notes;
341
342 if (!gtk_tree_view_get_tooltip_context(tree_view, &x, &y,
343 keyboard_tip,
344 &model, NULL, &iter)) {
345 return FALSE;
346 }
347
348 gtk_tree_model_get(model, &iter,
349 ML_NOTES, &notes,
350 -1);
351
352 if (notes != NULL) {
353 gtk_tooltip_set_markup(tooltip, notes);
354
355 return TRUE;
356 }
357
358 return FALSE;
359}
360
361/**********************************************************************/
364 static void setup_modpack_list(const char *name, const char *URL,
365 const char *version, const char *license,
366 enum modpack_type type, const char *subtype,
367 const char *notes)
368{
369 GtkTreeIter iter;
370 const char *type_str;
371 const char *lic_str;
372 const char *inst_str;
373
374 if (modpack_type_is_valid(type)) {
375 type_str = _(modpack_type_name(type));
376 } else {
377 /* TRANS: Unknown modpack type */
378 type_str = _("?");
379 }
380
381 if (license != NULL) {
382 lic_str = license;
383 } else {
384 /* TRANS: License of modpack is not known */
385 lic_str = Q_("?license:Unknown");
386 }
387
388 inst_str = mpdb_installed_version(name, type);
389 if (inst_str == NULL) {
390 inst_str = _("Not installed");
391 }
392
393 gtk_list_store_append(main_store, &iter);
394 gtk_list_store_set(main_store, &iter,
395 ML_COL_NAME, name,
396 ML_COL_VER, version,
397 ML_COL_INST, inst_str,
398 ML_COL_TYPE, type_str,
399 ML_COL_SUBTYPE, subtype,
400 ML_COL_LIC, lic_str,
401 ML_COL_URL, URL,
402 ML_TYPE, type,
403 ML_NOTES, notes,
404 -1);
405}
406
407/**********************************************************************/
410 static void select_from_list(GtkTreeSelection *select, gpointer data)
411{
412 GtkTreeModel *model;
413 GtkTreeIter it;
414 const char *URL;
415
416 if (!gtk_tree_selection_get_selected(select, &model, &it)) {
417 return;
418 }
419
420 gtk_tree_model_get(model, &it, ML_COL_URL, &URL, -1);
421
422 gtk_entry_set_text(GTK_ENTRY(URL_input), URL);
423}
424
425/**********************************************************************/
428 static void modinst_setup_widgets(GtkWidget *toplevel)
429{
430 GtkWidget *mbox, *Ubox;
431 GtkWidget *version_label;
432 GtkWidget *install_button, *install_label;
433 GtkWidget *URL_label;
434 GtkCellRenderer *renderer;
435 GtkTreeSelection *selection;
436 const char *errmsg;
437 char verbuf[2048];
438 const char *rev_ver;
439
440 mbox = gtk_grid_new();
441 gtk_orientable_set_orientation(GTK_ORIENTABLE(mbox),
442 GTK_ORIENTATION_VERTICAL);
443 gtk_grid_set_row_spacing(GTK_GRID(mbox), 4);
444
445 rev_ver = fc_git_revision();
446
447 if (rev_ver == NULL) {
448 fc_snprintf(verbuf, sizeof(verbuf), "%s%s", word_version(), VERSION_STRING);
449 } else {
450 fc_snprintf(verbuf, sizeof(verbuf), _("%s%s\ncommit: %s"),
451 word_version(), VERSION_STRING, rev_ver);
452 }
453
454 version_label = gtk_label_new(verbuf);
455
456 main_list = gtk_tree_view_new();
457 renderer = gtk_cell_renderer_text_new();
458 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(main_list),
459 ML_COL_NAME,
460 _("Name"), renderer, "text", 0,
461 NULL);
462 renderer = gtk_cell_renderer_text_new();
463 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(main_list),
464 ML_COL_VER,
465 _("Version"), renderer, "text", 1,
466 NULL);
467 renderer = gtk_cell_renderer_text_new();
468 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(main_list),
469 ML_COL_INST,
470 _("Installed"), renderer, "text", 2,
471 NULL);
472 renderer = gtk_cell_renderer_text_new();
473 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(main_list),
474 ML_COL_TYPE,
475 Q_("?modpack:Type"),
476 renderer, "text", 3,
477 NULL);
478 renderer = gtk_cell_renderer_text_new();
479 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(main_list),
480 ML_COL_SUBTYPE,
481 _("Subtype"),
482 renderer, "text", 4,
483 NULL);
484 renderer = gtk_cell_renderer_text_new();
485 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(main_list),
486 ML_COL_LIC,
487 /* TRANS: noun */
488 _("License"), renderer, "text", 5,
489 NULL);
490 renderer = gtk_cell_renderer_text_new();
491 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(main_list),
492 ML_COL_URL,
493 _("URL"), renderer, "text", 6,
494 NULL);
495 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(main_list));
496 g_signal_connect(selection, "changed", G_CALLBACK(select_from_list), NULL);
497
498 install_button = gtk_button_new();
499 install_label = gtk_label_new(_("Install modpack"));
500 gtk_label_set_mnemonic_widget(GTK_LABEL(install_label), install_button);
501 g_object_set_data(G_OBJECT(install_button), "label", install_label);
502 gtk_container_add(GTK_CONTAINER(install_button), install_label);
503
504 Ubox = gtk_grid_new();
505 gtk_widget_set_halign(Ubox, GTK_ALIGN_CENTER);
506 gtk_grid_set_column_spacing(GTK_GRID(Ubox), 4);
507 URL_label = gtk_label_new_with_mnemonic(_("Modpack URL"));
508
509 URL_input = gtk_entry_new();
510 gtk_entry_set_width_chars(GTK_ENTRY(URL_input),
511 strlen(EXAMPLE_URL));
512 gtk_entry_set_text(GTK_ENTRY(URL_input), DEFAULT_URL_START);
513 g_signal_connect(URL_input, "activate",
514 G_CALLBACK(URL_return), NULL);
515
516 g_signal_connect(install_button, "clicked",
517 G_CALLBACK(install_clicked), URL_input);
518
519 gtk_container_add(GTK_CONTAINER(Ubox), URL_label);
520 gtk_container_add(GTK_CONTAINER(Ubox), URL_input);
521
522 progressbar = gtk_progress_bar_new();
523
524 statusbar = gtk_label_new(_("Select modpack to install"));
525
526 gtk_widget_set_hexpand(main_list, TRUE);
527 gtk_widget_set_vexpand(main_list, TRUE);
528
529 gtk_container_add(GTK_CONTAINER(mbox), version_label);
530 gtk_container_add(GTK_CONTAINER(mbox), main_list);
531 gtk_container_add(GTK_CONTAINER(mbox), Ubox);
532 gtk_container_add(GTK_CONTAINER(mbox), install_button);
533 gtk_container_add(GTK_CONTAINER(mbox), progressbar);
534 gtk_container_add(GTK_CONTAINER(mbox), statusbar);
535
536 gtk_container_add(GTK_CONTAINER(toplevel), mbox);
537
538 main_store = gtk_list_store_new((ML_STORE_SIZE), G_TYPE_STRING, G_TYPE_STRING,
539 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
540 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT,
541 G_TYPE_STRING);
542 errmsg = download_modpack_list(&fcmp, setup_modpack_list, msg_callback);
543 gtk_tree_view_set_model(GTK_TREE_VIEW(main_list), GTK_TREE_MODEL(main_store));
544
545 g_object_set(main_list, "has-tooltip", TRUE, NULL);
546 g_signal_connect(main_list, "query-tooltip",
547 G_CALLBACK(query_main_list_tooltip_cb), NULL);
548
549 g_object_unref(main_store);
550
551 if (errmsg != NULL) {
552 gtk_label_set_text(GTK_LABEL(statusbar), errmsg);
553 }
554}
555
556/**********************************************************************/
559 int main(int argc, char *argv[])
560{
561 GtkWidget *toplevel;
562 int ui_options;
563
564 fcmp_init();
565
566 /* This modifies argv! */
567 ui_options = fcmp_parse_cmdline(argc, argv);
568
569 if (ui_options != -1) {
570 int i;
571
572 for (i = 1; i <= ui_options; i++) {
573 if (is_option("--help", argv[i])) {
574 fc_fprintf(stderr,
575 _("This modpack installer accepts the standard Gtk command-line options\n"
576 "after '--'. See the Gtk documentation.\n\n"));
577
578 /* TRANS: No full stop after the URL, could cause confusion. */
579 fc_fprintf(stderr, _("Report bugs at %s\n"), BUG_URL);
580
581 ui_options = -1;
582 }
583 }
584 }
585
586 if (ui_options != -1) {
587
588 load_install_info_lists(&fcmp);
589
590 /* Process GTK arguments */
591 if (gtk_init_check(&ui_options, &argv)) {
592 toplevel = gtk_window_new(GTK_WINDOW_TOPLEVEL);
593
594 gtk_widget_realize(toplevel);
595 gtk_widget_set_name(toplevel, "Freeciv-modpack");
596 gtk_window_set_title(GTK_WINDOW(toplevel),
597 _("Freeciv modpack installer (gtk3)"));
598
599 /* Keep the icon of the executable on Windows */
600#ifndef FREECIV_MSWINDOWS
601 {
602 /* Unlike main client, this only works if installed. Ignore any
603 * errors loading the icon. */
604 GError *err;
605
606 (void) gtk_window_set_icon_from_file(GTK_WINDOW(toplevel), MPICON_PATH,
607 &err);
608 }
609#endif /* FREECIV_MSWINDOWS */
610
611 g_signal_connect(toplevel, "delete_event",
612 G_CALLBACK(quit_dialog_callback), NULL);
613
614 modinst_setup_widgets(toplevel);
615
616 gtk_widget_show_all(toplevel);
617
618 if (fcmp.autoinstall != NULL) {
619 gui_download_modpack(fcmp.autoinstall);
620 }
621
622 gtk_main();
623
624 gtk_widget_destroy(toplevel);
625 } else {
626 log_fatal(_("Failed to open graphical mode."));
627 }
628
629 close_mpdbs();
630 }
631
632 fcmp_deinit();
633 cmdline_option_values_free();
634
635 return EXIT_SUCCESS;
636}
download_modpack
const char * download_modpack(const char *URL, const struct fcmp_params *fcmp, dl_msg_callback mcb, dl_pb_callback pbcb)
Definition download.c:66
download_modpack_list
const char * download_modpack_list(const struct fcmp_params *fcmp, modpack_list_setup_cb cb, dl_msg_callback mcb)
Definition download.c:403
download.h
is_option
bool is_option(const char *option_name, char *option)
Definition fc_cmdline.c:112
cmdline_option_values_free
void cmdline_option_values_free(void)
Definition fc_cmdline.c:97
fc_cmdline.h
fciconv.h
fc_fprintf
void fc_fprintf(FILE *stream, const char *format,...) fc__attribute((__format__(__printf__
fcintl.h
Q_
#define Q_(String)
Definition fcintl.h:70
_
#define _(String)
Definition fcintl.h:67
toplevel
GtkWidget * toplevel
Definition gui_main.c:124
tooltip
const char * tooltip
Definition repodlgs.c:1314
type
GType type
Definition repodlgs.c:1312
name
const char * name
Definition inputfile.c:127
log.h
log_verbose
#define log_verbose(message,...)
Definition log.h:109
log_fatal
#define log_fatal(message,...)
Definition log.h:100
mem.h
FC_FREE
#define FC_FREE(ptr)
Definition mem.h:41
fc_strdup
#define fc_strdup(str)
Definition mem.h:43
fc_malloc
#define fc_malloc(sz)
Definition mem.h:34
load_install_info_lists
void load_install_info_lists(struct fcmp_params *fcmp)
Definition modinst.c:44
fcmp_deinit
void fcmp_deinit(void)
Definition modinst.c:98
fcmp_init
void fcmp_init(void)
Definition modinst.c:82
modinst.h
DEFAULT_URL_START
#define DEFAULT_URL_START
Definition modinst.h:32
MODPACK_LIST_URL
#define MODPACK_LIST_URL
Definition modinst.h:30
EXAMPLE_URL
#define EXAMPLE_URL
Definition modinst.h:35
fcmp_parse_cmdline
int fcmp_parse_cmdline(int argc, char *argv[])
Definition mpcmdline.c:45
mpcmdline.h
mpdb_installed_version
const char * mpdb_installed_version(const char *name, enum modpack_type type)
Definition mpdb.c:253
close_mpdbs
void close_mpdbs(void)
Definition mpdb.c:202
mpdb.h
ML_COL_SUBTYPE
#define ML_COL_SUBTYPE
Definition mpgui_gtk3.c:58
quit_dialog_response
static void quit_dialog_response(GtkWidget *dialog, gint response)
Definition mpgui_gtk3.c:80
msg_dl_thread
static void msg_dl_thread(const char *msg)
Definition mpgui_gtk3.c:166
ML_TYPE
#define ML_TYPE
Definition mpgui_gtk3.c:64
main
int main(int argc, char *argv[])
Definition mpgui_gtk3.c:559
ML_NOTES
#define ML_NOTES
Definition mpgui_gtk3.c:65
quit_dialog_callback
static gboolean quit_dialog_callback(void)
Definition mpgui_gtk3.c:91
statusbar
static GtkWidget * statusbar
Definition mpgui_gtk3.c:39
query_main_list_tooltip_cb
static gboolean query_main_list_tooltip_cb(GtkWidget *widget, gint x, gint y, gboolean keyboard_tip, GtkTooltip *tooltip, gpointer data)
Definition mpgui_gtk3.c:331
select_from_list
static void select_from_list(GtkTreeSelection *select, gpointer data)
Definition mpgui_gtk3.c:410
ML_STORE_SIZE
#define ML_STORE_SIZE
Definition mpgui_gtk3.c:66
main_store
static GtkListStore * main_store
Definition mpgui_gtk3.c:42
versionlist_update_main_thread
static gboolean versionlist_update_main_thread(gpointer user_data)
Definition mpgui_gtk3.c:210
ML_COL_NAME
#define ML_COL_NAME
Definition mpgui_gtk3.c:54
modinst_quit
static void modinst_quit(void)
Definition mpgui_gtk3.c:71
ML_COL_LIC
#define ML_COL_LIC
Definition mpgui_gtk3.c:59
pbar_callback
static void pbar_callback(int downloaded, int max)
Definition mpgui_gtk3.c:136
URL_return
static void URL_return(GtkEntry *w, gpointer data)
Definition mpgui_gtk3.c:320
URL_input
static GtkWidget * URL_input
Definition mpgui_gtk3.c:43
fcmp
struct fcmp_params fcmp
Definition mpgui_gtk3.c:46
downloading
static gboolean downloading
Definition mpgui_gtk3.c:44
progressbar
static GtkWidget * progressbar
Definition mpgui_gtk3.c:40
gui_download_modpack
static void gui_download_modpack(const char *URL)
Definition mpgui_gtk3.c:279
msg_main_thread
static gboolean msg_main_thread(gpointer user_data)
Definition mpgui_gtk3.c:151
install_clicked
static void install_clicked(GtkWidget *w, gpointer data)
Definition mpgui_gtk3.c:309
ML_COL_TYPE
#define ML_COL_TYPE
Definition mpgui_gtk3.c:57
setup_modpack_list
static void setup_modpack_list(const char *name, const char *URL, const char *version, const char *license, enum modpack_type type, const char *subtype, const char *notes)
Definition mpgui_gtk3.c:364
pbar_dl_thread
static void pbar_dl_thread(int current, int max)
Definition mpgui_gtk3.c:197
msg_callback
static void msg_callback(const char *msg)
Definition mpgui_gtk3.c:127
ML_COL_INST
#define ML_COL_INST
Definition mpgui_gtk3.c:56
main_list
static GtkWidget * main_list
Definition mpgui_gtk3.c:41
versionlist_update_dl_thread
static void versionlist_update_dl_thread(void)
Definition mpgui_gtk3.c:247
ML_COL_URL
#define ML_COL_URL
Definition mpgui_gtk3.c:60
pbar_main_thread
static gboolean pbar_main_thread(gpointer user_data)
Definition mpgui_gtk3.c:183
ML_COL_VER
#define ML_COL_VER
Definition mpgui_gtk3.c:55
download_thread
static gpointer download_thread(gpointer data)
Definition mpgui_gtk3.c:255
modinst_setup_widgets
static void modinst_setup_widgets(void)
Definition mpgui_gtk4.c:444
fcmp_params
Definition modinst.h:17
fcmp_params::list_url
const char * list_url
Definition modinst.h:18
fcmp_params::autoinstall
const char * autoinstall
Definition modinst.h:20
msg_data
Definition mpgui_gtk3.c:144
msg_data::msg
char * msg
Definition mpgui_gtk3.c:145
pbar_data
Definition mpgui_gtk3.c:175
pbar_data::max
int max
Definition mpgui_gtk3.c:177
pbar_data::current
int current
Definition mpgui_gtk3.c:176
widget
Definition widget.h:112
fc_snprintf
int fc_snprintf(char *str, size_t n, const char *format,...)
Definition support.c:969
TRUE
#define TRUE
Definition support.h:46
FALSE
#define FALSE
Definition support.h:47
fc_git_revision
const char * fc_git_revision(void)
Definition version.c:75
word_version
const char * word_version(void)
Definition version.c:62
version.h