Mercurial > audlegacy-plugins
annotate src/lirc/lirc_cfg.c @ 2752:cd2d2118fdee
Fix length calculation to include fades.
| author | William Pitcock <nenolod@atheme.org> |
|---|---|
| date | Mon, 30 Jun 2008 23:52:43 -0500 |
| parents | 769e17da93dd |
| children | 5df83337516f |
| rev | line source |
|---|---|
| 2279 | 1 #include <config.h> |
| 2 | |
| 3 #include <gtk/gtk.h> | |
| 4 #include <audacious/i18n.h> | |
| 5 #include <audacious/plugin.h> | |
| 6 | |
| 7 #include "common.h" | |
| 8 | |
| 9 GtkWidget *lirc_cfg = NULL; | |
| 10 | |
| 11 gint b_enable_reconnect; | |
| 12 gint reconnect_timeout; | |
|
2305
738914331374
Add ability to enter track number using remote. (Bugzilla #115)
Andrew O. Shadoura <bugzilla@tut.by>
parents:
2279
diff
changeset
|
13 gchar *aosd_font = NULL; |
| 2279 | 14 |
| 15 void load_cfg(void) | |
| 16 { | |
|
2523
769e17da93dd
Replaced s/ConfigDb/mcs_handle_t/g, as per changes in the core.
Matti Hamalainen <ccr@tnsp.org>
parents:
2498
diff
changeset
|
17 mcs_handle_t *db; |
| 2279 | 18 db = aud_cfg_db_open(); |
| 19 aud_cfg_db_get_int(db, "lirc", "enable_reconnect", &b_enable_reconnect); | |
| 20 aud_cfg_db_get_int(db, "lirc", "reconnect_timeout", &reconnect_timeout); | |
|
2305
738914331374
Add ability to enter track number using remote. (Bugzilla #115)
Andrew O. Shadoura <bugzilla@tut.by>
parents:
2279
diff
changeset
|
21 if (!aud_cfg_db_get_string(db, "aosd", "text_fonts_name_0", &aosd_font)) |
|
738914331374
Add ability to enter track number using remote. (Bugzilla #115)
Andrew O. Shadoura <bugzilla@tut.by>
parents:
2279
diff
changeset
|
22 aosd_font = g_strdup("Sans 26"); |
| 2279 | 23 if (!reconnect_timeout) reconnect_timeout = 5; |
| 24 aud_cfg_db_close(db); | |
| 25 } | |
| 26 | |
| 27 void save_cfg(void) | |
| 28 { | |
|
2523
769e17da93dd
Replaced s/ConfigDb/mcs_handle_t/g, as per changes in the core.
Matti Hamalainen <ccr@tnsp.org>
parents:
2498
diff
changeset
|
29 mcs_handle_t *db; |
| 2279 | 30 db = aud_cfg_db_open(); |
| 31 aud_cfg_db_set_int(db, "lirc", "enable_reconnect", b_enable_reconnect); | |
| 32 aud_cfg_db_set_int(db, "lirc", "reconnect_timeout", reconnect_timeout); | |
| 33 aud_cfg_db_close(db); | |
| 34 } | |
| 35 | |
| 36 void configure(void) | |
| 37 { | |
| 38 if (lirc_cfg) | |
| 39 { | |
| 40 gtk_window_present(GTK_WINDOW(lirc_cfg)); | |
| 41 return; | |
| 42 } | |
| 43 load_cfg(); | |
| 44 lirc_cfg = create_lirc_cfg(); | |
| 45 gtk_widget_show_all(lirc_cfg); | |
| 46 } |
