Mercurial > audlegacy
annotate src/audacious/main.c @ 2574:40407b7363f3 trunk
[svn] - enforce playback stop when clearing the playlist to load new files in. closes #808.
| author | nenolod |
|---|---|
| date | Sun, 25 Feb 2007 00:53:19 -0800 |
| parents | 7b1b52eb663b |
| children | 1ceaf00f9c6d |
| rev | line source |
|---|---|
| 2313 | 1 /* Audacious - Cross-platform multimedia player |
| 2 * Copyright (C) 2005-2007 Audacious development team. | |
| 3 * | |
| 4 * Based on BMP: | |
| 5 * Copyright (C) 2003-2004 BMP development team. | |
| 6 * | |
| 7 * Based on XMMS: | |
| 8 * Copyright (C) 1998-2003 XMMS development team. | |
| 9 * | |
| 10 * This program is free software; you can redistribute it and/or modify | |
| 11 * it under the terms of the GNU General Public License as published by | |
| 12 * the Free Software Foundation; under version 2 of the License. | |
| 13 * | |
| 14 * This program is distributed in the hope that it will be useful, | |
| 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 17 * GNU General Public License for more details. | |
| 18 * | |
| 19 * You should have received a copy of the GNU General Public License | |
| 20 * along with this program; if not, write to the Free Software | |
| 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
| 22 */ | |
| 23 | |
| 24 #ifdef HAVE_CONFIG_H | |
| 25 # include "config.h" | |
| 26 #endif | |
| 27 | |
| 28 #include "main.h" | |
| 29 | |
| 30 #include <glib.h> | |
| 31 #include <glib/gi18n.h> | |
| 32 #include <glib/gprintf.h> | |
| 33 #include <gdk/gdk.h> | |
| 34 #include <stdlib.h> | |
| 35 #include <string.h> | |
| 36 #include <getopt.h> | |
| 37 #include <ctype.h> | |
| 38 #include <time.h> | |
| 39 | |
| 40 #include <unistd.h> | |
| 41 #include <errno.h> | |
| 42 #include <sys/types.h> | |
| 43 #include <sys/stat.h> | |
| 44 #include <signal.h> | |
| 45 | |
| 46 #include "platform/smartinclude.h" | |
| 47 | |
| 48 #include "libaudacious/configdb.h" | |
| 49 #include "libaudacious/beepctrl.h" | |
| 50 #include "vfs.h" | |
| 51 | |
| 52 #include "controlsocket.h" | |
| 53 #include "dnd.h" | |
| 54 #include "effect.h" | |
| 55 #include "ui_equalizer.h" | |
| 56 #include "general.h" | |
| 57 #include "genevent.h" | |
| 58 #include "hints.h" | |
| 59 #include "input.h" | |
| 60 #include "logger.h" | |
| 61 #include "ui_main.h" | |
| 62 #include "ui_manager.h" | |
| 63 #include "output.h" | |
| 64 #include "playback.h" | |
| 65 #include "playlist.h" | |
| 66 #include "ui_playlist.h" | |
| 67 #include "ui_preferences.h" | |
| 68 #include "pluginenum.h" | |
| 69 #include "ui_skinselector.h" | |
| 70 #include "util.h" | |
| 71 #include "visualization.h" | |
| 72 #include "build_stamp.h" | |
| 73 #include "ui_fileinfo.h" | |
| 74 #include "signals.h" | |
| 2530 | 75 #include "ui_skinned_window.h" |
| 2313 | 76 |
| 77 #include "icons-csource.h" | |
| 78 #include "icons-stock.h" | |
| 79 #include "images/audacious_player.xpm" | |
| 80 | |
| 2364 | 81 gboolean has_x11_connection = FALSE; /* do we have an X11 connection? */ |
| 2313 | 82 |
| 83 /* Translatable string for beep.desktop's comment field */ | |
| 84 const gchar *desktop_comment = N_("Audacious"); | |
| 85 | |
| 86 const gchar *application_name = N_("Audacious"); | |
| 87 | |
| 88 | |
| 89 struct _BmpCmdLineOpt { | |
| 2411 | 90 gchar **filenames; |
| 2313 | 91 gint session; |
| 92 gboolean play, stop, pause, fwd, rew, play_pause, playcd, show_jump_box; | |
| 93 gboolean enqueue, mainwin, remote, activate; | |
| 94 gboolean load_skins; | |
| 95 gboolean headless; | |
| 96 gboolean no_log; | |
| 97 gboolean enqueue_to_temp; | |
| 2411 | 98 gboolean version; |
| 2313 | 99 gchar *previous_session_id; |
| 100 }; | |
| 101 | |
| 102 typedef struct _BmpCmdLineOpt BmpCmdLineOpt; | |
| 103 | |
| 104 BmpCmdLineOpt options; | |
| 105 | |
| 106 BmpConfig cfg; | |
| 107 | |
| 108 BmpConfig bmp_default_config = { | |
| 109 MAINWIN_DEFAULT_POS_X, /* mainwin x position */ | |
| 110 MAINWIN_DEFAULT_POS_Y, /* mainwin y position */ | |
| 111 EQUALIZER_DEFAULT_POS_X, /* equalizer x position */ | |
| 112 EQUALIZER_DEFAULT_POS_Y, /* equalizer y position */ | |
| 113 PLAYLISTWIN_DEFAULT_POS_X, /* playlistwin x position */ | |
| 114 PLAYLISTWIN_DEFAULT_POS_Y, /* playlistwin y position */ | |
| 115 PLAYLISTWIN_DEFAULT_WIDTH, /* playlistwin width */ | |
| 116 PLAYLISTWIN_DEFAULT_HEIGHT, /* playlistwin height */ | |
| 117 10, /* snap distance */ | |
| 118 FALSE, /* real-time priority */ | |
| 119 FALSE, FALSE, /* shuffle, repeat */ | |
| 120 FALSE, /* UNUSED (double size) */ | |
| 121 TRUE, /* autoscroll */ | |
| 122 TRUE, /* analyzer peaks */ | |
| 123 FALSE, /* equalizer autoload */ | |
| 124 FALSE, /* easy move */ | |
| 125 FALSE, /* equalizer active */ | |
| 126 FALSE, /* playlistwin visible */ | |
| 127 FALSE, /* equalizer visible */ | |
| 128 TRUE, /* player visible */ | |
| 129 FALSE, /* player shaded */ | |
| 130 FALSE, /* playlistwin shaded */ | |
| 131 FALSE, /* equalizer shaded */ | |
| 132 FALSE, /* allow multiple instances */ | |
| 133 TRUE, /* always show cb */ | |
| 134 TRUE, TRUE, TRUE, /* convert '_', %20 and '\' */ | |
| 135 TRUE, /* show numbers in playlist */ | |
| 136 TRUE, /* snap windows */ | |
| 137 TRUE, /* save window positions */ | |
| 138 TRUE, /* dim titlebar */ | |
| 139 FALSE, /* get playlist info on load */ | |
| 140 TRUE, /* get playlist info on demand */ | |
| 141 TRUE, /* UNUSED (equalizer doublesize linked) */ | |
| 142 FALSE, /* sort jump to file */ | |
| 143 FALSE, /* use effect plugins */ | |
| 144 FALSE, /* always on top */ | |
| 145 FALSE, /* sticky */ | |
| 146 FALSE, /* no playlist advance */ | |
| 147 FALSE, /* stop after current song */ | |
| 148 TRUE, /* refresh file list */ | |
| 149 TRUE, /* UNUSED (smooth title scrolling) */ | |
| 150 TRUE, /* use playlist metadata */ | |
| 151 TRUE, /* warn about unplayables */ | |
| 152 FALSE, /* use \ as directory delimiter */ | |
| 153 FALSE, /* random skin on play */ | |
| 154 FALSE, /* use fontsets */ | |
| 155 FALSE, /* use X font for mainwin */ | |
| 2364 | 156 TRUE, /* use custom cursors */ |
| 157 TRUE, /* close dialog on open */ | |
| 158 TRUE, /* close dialog on add */ | |
| 2313 | 159 0.0, /* equalizer preamp */ |
| 160 {0, 0, 0, 0, 0, /* equalizer bands */ | |
| 161 0, 0, 0, 0, 0}, | |
| 162 NULL, /* skin */ | |
| 163 NULL, /* output plugin */ | |
| 164 NULL, /* file selector path */ | |
| 165 NULL, /* playlist path */ | |
| 166 NULL, /* playlist font */ | |
| 167 NULL, /* mainwin font */ | |
| 168 NULL, /* disabled input plugins */ | |
| 169 NULL, /* enabled general plugins */ | |
| 170 NULL, /* enabled visualization plugins */ | |
| 171 NULL, /* enabled effect plugins */ | |
| 172 NULL, /* equalizer preset default file */ | |
| 173 NULL, /* equalizer preset extension */ | |
| 174 NULL, /* URL history */ | |
| 175 0, /* timer mode */ | |
| 176 VIS_ANALYZER, /* visualizer type */ | |
| 177 ANALYZER_NORMAL, /* analyzer mode */ | |
| 178 ANALYZER_BARS, /* analyzer type */ | |
| 179 SCOPE_DOT, /* scope mode */ | |
| 180 VOICEPRINT_NORMAL, /* voiceprint mode */ | |
| 181 VU_SMOOTH, /* VU mode */ | |
| 182 REFRESH_FULL, /* visualizer refresh rate */ | |
| 183 FALLOFF_FAST, /* analyzer fall off rate */ | |
| 184 FALLOFF_SLOW, /* peaks fall off rate */ | |
| 185 0, /* playlist position */ | |
| 186 2, /* pause between songs time */ | |
| 187 FALSE, /* pause between songs */ | |
| 188 FALSE, /* show window decorations */ | |
| 189 8, /* mouse wheel scroll step */ | |
| 190 FALSE, /* playlist transparent */ | |
| 191 2, /* 3rd preset (ARTIST - ALBUM - TITLE) */ | |
| 192 NULL, /* title format */ | |
| 193 FALSE, /* software volume control enabled */ | |
| 194 TRUE, /* UNUSED (XMMS compatibility mode) */ | |
| 195 TRUE, /* extra eq filtering */ | |
| 196 3, /* scroll pl by */ | |
| 197 FALSE, /* resume playback on startup */ | |
| 198 -1, /* resume playback on startup time */ | |
| 2364 | 199 TRUE, /* show seperators in pl */ |
| 2313 | 200 NULL, |
| 201 NULL, | |
| 2364 | 202 3000, /* audio buffer size */ |
| 203 FALSE, /* whether or not to postpone format detection on initial add */ | |
| 204 TRUE, /* show filepopup for tuple */ | |
| 205 NULL, /* words identifying covers */ | |
| 206 NULL, /* words that might not show up in cover names */ | |
| 2313 | 207 FALSE, |
| 208 0, | |
| 2364 | 209 NULL, /* default session uri base (non-NULL = custom session uri base) */ |
| 210 150, /* short side length of the picture in the filepopup */ | |
| 211 20, /* delay until the filepopup comes up */ | |
| 212 FALSE, /* use filename.jpg for coverart */ | |
| 213 FALSE, /* use XMMS-style file selection */ | |
| 214 TRUE, /* use extension probing */ | |
| 215 255, 255, 255, /* colorize r, g, b */ | |
| 216 FALSE, /* internal: whether or not to terminate */ | |
| 2405 | 217 TRUE, /* whether show progress bar in filepopup or not */ |
| 2313 | 218 }; |
| 219 | |
| 220 typedef struct bmp_cfg_boolent_t { | |
| 221 char const *be_vname; | |
| 222 gboolean *be_vloc; | |
| 223 gboolean be_wrt; | |
| 224 } bmp_cfg_boolent; | |
| 225 | |
| 226 typedef struct bmp_cfg_nument_t { | |
| 227 char const *ie_vname; | |
| 228 gint *ie_vloc; | |
| 229 gboolean ie_wrt; | |
| 230 } bmp_cfg_nument; | |
| 231 | |
| 232 typedef struct bmp_cfg_strent_t { | |
| 233 char const *se_vname; | |
| 234 char **se_vloc; | |
| 235 gboolean se_wrt; | |
| 236 } bmp_cfg_strent; | |
| 237 | |
| 238 const gchar *bmp_titlestring_presets[] = { | |
| 239 "%t", | |
| 240 "%{p:%p - %}%t", | |
| 241 "%{p:%p - %}%{a:%a - %}%t", | |
| 242 "%{p:%p - %}%{a:%a - %}%{n:%n. %}%t", | |
| 243 "%{p:%p %}%{a:[ %a ] %}%{p:- %}%{n:%n. %}%{t:%t%}", | |
| 244 "%{a:%a - %}%t" | |
| 245 }; | |
| 246 | |
| 247 const guint n_titlestring_presets = G_N_ELEMENTS(bmp_titlestring_presets); | |
| 248 | |
| 249 const gchar *chardet_detector_presets[] = { | |
| 2364 | 250 "None", |
| 251 "Japanese", | |
| 252 "Taiwanese", | |
| 253 "Chinese", | |
| 254 "Korean", | |
| 255 "Russian", | |
| 2313 | 256 #ifdef HAVE_UDET |
| 2364 | 257 "Universal" |
| 2313 | 258 #endif |
| 259 }; | |
| 260 | |
| 2364 | 261 const guint n_chardet_detector_presets = G_N_ELEMENTS(chardet_detector_presets); |
| 2313 | 262 |
| 263 static bmp_cfg_boolent bmp_boolents[] = { | |
| 264 {"allow_multiple_instances", &cfg.allow_multiple_instances, TRUE}, | |
| 265 {"use_realtime", &cfg.use_realtime, TRUE}, | |
| 266 {"always_show_cb", &cfg.always_show_cb, TRUE}, | |
| 267 {"convert_underscore", &cfg.convert_underscore, TRUE}, | |
| 268 {"convert_twenty", &cfg.convert_twenty, TRUE}, | |
| 269 {"convert_slash", &cfg.convert_slash, TRUE }, | |
| 270 {"show_numbers_in_pl", &cfg.show_numbers_in_pl, TRUE}, | |
| 271 {"show_separator_in_pl", &cfg.show_separator_in_pl, TRUE}, | |
| 272 {"snap_windows", &cfg.snap_windows, TRUE}, | |
| 273 {"save_window_positions", &cfg.save_window_position, TRUE}, | |
| 274 {"dim_titlebar", &cfg.dim_titlebar, TRUE}, | |
| 275 {"get_info_on_load", &cfg.get_info_on_load, TRUE}, | |
| 276 {"get_info_on_demand", &cfg.get_info_on_demand, TRUE}, | |
| 277 {"eq_doublesize_linked", &cfg.eq_doublesize_linked, TRUE}, | |
| 278 {"no_playlist_advance", &cfg.no_playlist_advance, TRUE}, | |
| 279 {"refresh_file_list", &cfg.refresh_file_list, TRUE}, | |
| 280 {"sort_jump_to_file", &cfg.sort_jump_to_file, TRUE}, | |
| 281 {"use_pl_metadata", &cfg.use_pl_metadata, TRUE}, | |
| 282 {"warn_about_unplayables", &cfg.warn_about_unplayables, TRUE}, | |
| 283 {"use_backslash_as_dir_delimiter", &cfg.use_backslash_as_dir_delimiter, TRUE}, | |
| 284 {"player_shaded", &cfg.player_shaded, TRUE}, | |
| 285 {"player_visible", &cfg.player_visible, TRUE}, | |
| 286 {"shuffle", &cfg.shuffle, TRUE}, | |
| 287 {"repeat", &cfg.repeat, TRUE}, | |
| 288 {"doublesize", &cfg.doublesize, TRUE}, | |
| 289 {"autoscroll_songname", &cfg.autoscroll, TRUE}, | |
| 290 {"stop_after_current_song", &cfg.stopaftersong, TRUE}, | |
| 291 {"playlist_shaded", &cfg.playlist_shaded, TRUE}, | |
| 292 {"playlist_visible", &cfg.playlist_visible, TRUE}, | |
| 293 {"use_fontsets", &cfg.use_fontsets, TRUE}, | |
| 294 {"mainwin_use_xfont", &cfg.mainwin_use_xfont, FALSE}, | |
| 295 {"equalizer_visible", &cfg.equalizer_visible, TRUE}, | |
| 296 {"equalizer_active", &cfg.equalizer_active, TRUE}, | |
| 297 {"equalizer_shaded", &cfg.equalizer_shaded, TRUE}, | |
| 298 {"equalizer_autoload", &cfg.equalizer_autoload, TRUE}, | |
| 299 {"easy_move", &cfg.easy_move, TRUE}, | |
| 300 {"use_eplugins", &cfg.use_eplugins, TRUE}, | |
| 301 {"always_on_top", &cfg.always_on_top, TRUE}, | |
| 302 {"sticky", &cfg.sticky, TRUE}, | |
| 303 {"random_skin_on_play", &cfg.random_skin_on_play, TRUE}, | |
| 304 {"pause_between_songs", &cfg.pause_between_songs, TRUE}, | |
| 305 {"show_wm_decorations", &cfg.show_wm_decorations, TRUE}, | |
| 306 {"eq_extra_filtering", &cfg.eq_extra_filtering, TRUE}, | |
| 307 {"analyzer_peaks", &cfg.analyzer_peaks, TRUE}, | |
| 308 {"custom_cursors", &cfg.custom_cursors, TRUE}, | |
| 309 {"close_dialog_open", &cfg.close_dialog_open, TRUE}, | |
| 310 {"close_dialog_add", &cfg.close_dialog_add, TRUE}, | |
| 311 {"resume_playback_on_startup", &cfg.resume_playback_on_startup, TRUE}, | |
| 312 {"playlist_detect", &cfg.playlist_detect, TRUE}, | |
| 313 {"show_filepopup_for_tuple", &cfg.show_filepopup_for_tuple, TRUE}, | |
| 314 {"recurse_for_cover", &cfg.recurse_for_cover, TRUE}, | |
| 315 {"use_file_cover", &cfg.use_file_cover, TRUE}, | |
| 316 {"use_xmms_style_fileselector", &cfg.use_xmms_style_fileselector, TRUE}, | |
| 317 {"use_extension_probing", &cfg.use_extension_probing, TRUE}, | |
| 2405 | 318 {"filepopup_showprogressbar", &cfg.filepopup_showprogressbar, TRUE}, |
| 2313 | 319 }; |
| 320 | |
| 321 static gint ncfgbent = G_N_ELEMENTS(bmp_boolents); | |
| 322 | |
| 323 static bmp_cfg_nument bmp_numents[] = { | |
| 324 {"player_x", &cfg.player_x, TRUE}, | |
| 325 {"player_y", &cfg.player_y, TRUE}, | |
| 326 {"timer_mode", &cfg.timer_mode, TRUE}, | |
| 327 {"vis_type", &cfg.vis_type, TRUE}, | |
| 328 {"analyzer_mode", &cfg.analyzer_mode, TRUE}, | |
| 329 {"analyzer_type", &cfg.analyzer_type, TRUE}, | |
| 330 {"scope_mode", &cfg.scope_mode, TRUE}, | |
| 331 {"vu_mode", &cfg.vu_mode, TRUE}, | |
| 332 {"voiceprint_mode", &cfg.voiceprint_mode, TRUE}, | |
| 333 {"vis_refresh_rate", &cfg.vis_refresh, TRUE}, | |
| 334 {"analyzer_falloff", &cfg.analyzer_falloff, TRUE}, | |
| 335 {"peaks_falloff", &cfg.peaks_falloff, TRUE}, | |
| 336 {"playlist_x", &cfg.playlist_x, TRUE}, | |
| 337 {"playlist_y", &cfg.playlist_y, TRUE}, | |
| 338 {"playlist_width", &cfg.playlist_width, TRUE}, | |
| 339 {"playlist_height", &cfg.playlist_height, TRUE}, | |
| 340 {"playlist_position", &cfg.playlist_position, TRUE}, | |
| 341 {"equalizer_x", &cfg.equalizer_x, TRUE}, | |
| 342 {"equalizer_y", &cfg.equalizer_y, TRUE}, | |
| 343 {"snap_distance", &cfg.snap_distance, TRUE}, | |
| 344 {"pause_between_songs_time", &cfg.pause_between_songs_time, TRUE}, | |
| 345 {"mouse_wheel_change", &cfg.mouse_change, TRUE}, | |
| 346 {"scroll_pl_by", &cfg.scroll_pl_by, TRUE}, | |
| 347 {"titlestring_preset", &cfg.titlestring_preset, TRUE}, | |
| 348 {"resume_playback_on_startup_time", &cfg.resume_playback_on_startup_time, TRUE}, | |
| 349 {"output_buffer_size", &cfg.output_buffer_size, TRUE}, | |
| 350 {"recurse_for_cover_depth", &cfg.recurse_for_cover_depth, TRUE}, | |
| 351 {"filepopup_pixelsize", &cfg.filepopup_pixelsize, TRUE}, | |
| 352 {"filepopup_delay", &cfg.filepopup_delay, TRUE}, | |
| 353 {"colorize_r", &cfg.colorize_r, TRUE}, | |
| 354 {"colorize_g", &cfg.colorize_g, TRUE}, | |
| 355 {"colorize_b", &cfg.colorize_b, TRUE}, | |
| 356 }; | |
| 357 | |
| 358 static gint ncfgient = G_N_ELEMENTS(bmp_numents); | |
| 359 | |
| 360 static bmp_cfg_strent bmp_strents[] = { | |
| 361 {"playlist_font", &cfg.playlist_font, TRUE}, | |
| 362 {"mainwin_font", &cfg.mainwin_font, TRUE}, | |
| 363 {"eqpreset_default_file", &cfg.eqpreset_default_file, TRUE}, | |
| 364 {"eqpreset_extension", &cfg.eqpreset_extension, TRUE}, | |
| 365 {"skin", &cfg.skin, FALSE}, | |
| 366 {"output_plugin", &cfg.outputplugin, FALSE}, | |
| 367 {"disabled_iplugins", &cfg.disabled_iplugins, TRUE}, | |
| 368 {"enabled_gplugins", &cfg.enabled_gplugins, FALSE}, | |
| 369 {"enabled_vplugins", &cfg.enabled_vplugins, FALSE}, | |
| 370 {"enabled_eplugins", &cfg.enabled_eplugins, FALSE}, | |
| 371 {"filesel_path", &cfg.filesel_path, FALSE}, | |
| 372 {"playlist_path", &cfg.playlist_path, FALSE}, | |
| 373 {"generic_title_format", &cfg.gentitle_format, TRUE}, | |
| 374 {"chardet_detector", &cfg.chardet_detector, TRUE}, | |
| 375 {"chardet_fallback", &cfg.chardet_fallback, TRUE}, | |
| 376 {"cover_name_include", &cfg.cover_name_include, TRUE}, | |
| 377 {"cover_name_exclude", &cfg.cover_name_exclude, TRUE}, | |
| 378 {"session_uri_base", &cfg.session_uri_base, TRUE} | |
| 379 }; | |
| 380 | |
| 381 static gint ncfgsent = G_N_ELEMENTS(bmp_strents); | |
| 382 | |
| 383 gchar *bmp_paths[BMP_PATH_COUNT] = {}; | |
| 384 | |
| 385 GList *dock_window_list = NULL; | |
| 386 | |
| 387 gboolean pposition_broken = FALSE; | |
| 388 | |
| 389 gboolean starting_up = TRUE; | |
| 390 | |
| 391 /* XXX: case-sensitivity is bad for lazy nenolods. :( -nenolod */ | |
| 392 static gchar *pl_candidates[] = { | |
| 2364 | 393 PLUGIN_FILENAME("ALSA"), |
| 394 PLUGIN_FILENAME("coreaudio"), | |
| 395 PLUGIN_FILENAME("OSS"), | |
| 396 PLUGIN_FILENAME("sun"), | |
| 397 PLUGIN_FILENAME("ESD"), | |
| 398 PLUGIN_FILENAME("pulse_audio"), | |
| 399 PLUGIN_FILENAME("disk_writer"), | |
| 400 NULL | |
| 2313 | 401 }; |
| 402 | |
| 403 GCond *cond_scan; | |
| 404 GMutex *mutex_scan; | |
| 405 | |
| 406 static GSList * | |
| 407 get_feature_list(void) | |
| 408 { | |
| 409 GSList *features = NULL; | |
| 410 | |
| 411 #ifdef HAVE_GCONF | |
| 412 features = g_slist_append(features, "GConf"); | |
| 413 #endif | |
| 414 | |
| 415 return features; | |
| 416 } | |
| 417 | |
| 418 static void | |
| 419 dump_version(void) | |
| 420 { | |
| 421 GSList *features; | |
| 422 | |
| 423 g_printf("%s %s [%s]", _(application_name), VERSION, svn_stamp); | |
| 424 | |
| 425 features = get_feature_list(); | |
| 426 | |
| 427 if (features) { | |
| 428 GSList *item; | |
| 429 | |
| 430 g_printf(" ("); | |
| 431 | |
| 432 for (item = features; g_slist_next(item); item = g_slist_next(item)) | |
| 433 g_printf("%s, ", (const gchar *) item->data); | |
| 434 | |
| 435 g_printf("%s)", (const gchar *) item->data); | |
| 436 | |
| 437 g_slist_free(features); | |
| 438 } | |
| 439 | |
| 440 g_printf("\n"); | |
| 441 } | |
| 442 | |
| 443 const gchar * | |
| 444 xmms_get_gentitle_format(void) | |
| 445 { | |
| 446 guint titlestring_preset = cfg.titlestring_preset; | |
| 447 | |
| 448 if (titlestring_preset < n_titlestring_presets) | |
| 2364 | 449 return bmp_titlestring_presets[titlestring_preset]; |
| 2313 | 450 |
| 451 return cfg.gentitle_format; | |
| 452 } | |
| 453 | |
| 454 void | |
| 455 make_directory(const gchar * path, mode_t mode) | |
| 456 { | |
|
2317
49d285f6008b
[svn] Full support for XDG basedir added. The old config doesn't get automatically converted yet.
js
parents:
2313
diff
changeset
|
457 if (g_mkdir_with_parents(path, mode) == 0) |
| 2313 | 458 return; |
| 459 | |
|
2317
49d285f6008b
[svn] Full support for XDG basedir added. The old config doesn't get automatically converted yet.
js
parents:
2313
diff
changeset
|
460 g_printerr(_("Could not create directory (%s): %s\n"), path, |
| 2313 | 461 g_strerror(errno)); |
| 462 } | |
| 463 | |
| 464 static void | |
| 465 bmp_make_user_dir(void) | |
| 466 { | |
| 467 const mode_t mode755 = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH; | |
| 468 | |
| 469 make_directory(bmp_paths[BMP_PATH_USER_DIR], mode755); | |
| 470 make_directory(bmp_paths[BMP_PATH_USER_PLUGIN_DIR], mode755); | |
| 471 make_directory(bmp_paths[BMP_PATH_USER_SKIN_DIR], mode755); | |
| 472 make_directory(bmp_paths[BMP_PATH_SKIN_THUMB_DIR], mode755); | |
| 473 } | |
| 474 | |
| 475 static void | |
| 476 bmp_free_paths(void) | |
| 477 { | |
| 478 int i; | |
| 479 | |
| 480 for (i = 0; i < BMP_PATH_COUNT; i++) | |
| 481 { | |
| 482 g_free(bmp_paths[i]); | |
| 483 bmp_paths[i] = 0; | |
| 484 } | |
| 485 } | |
| 486 | |
|
2317
49d285f6008b
[svn] Full support for XDG basedir added. The old config doesn't get automatically converted yet.
js
parents:
2313
diff
changeset
|
487 static void |
|
49d285f6008b
[svn] Full support for XDG basedir added. The old config doesn't get automatically converted yet.
js
parents:
2313
diff
changeset
|
488 bmp_init_paths() |
|
49d285f6008b
[svn] Full support for XDG basedir added. The old config doesn't get automatically converted yet.
js
parents:
2313
diff
changeset
|
489 { |
| 2364 | 490 char *xdg_config_home; |
| 491 char *xdg_data_home; | |
| 492 char *xdg_cache_home; | |
| 2313 | 493 |
| 2364 | 494 xdg_config_home = (getenv("XDG_CONFIG_HOME") == NULL |
| 495 ? g_build_filename(g_get_home_dir(), ".config", NULL) | |
| 496 : g_strdup(getenv("XDG_CONFIG_HOME"))); | |
| 497 xdg_data_home = (getenv("XDG_DATA_HOME") == NULL | |
| 498 ? g_build_filename(g_get_home_dir(), ".local", "share", NULL) | |
| 499 : g_strdup(getenv("XDG_DATA_HOME"))); | |
| 500 xdg_cache_home = (getenv("XDG_CACHE_HOME") == NULL | |
| 501 ? g_build_filename(g_get_home_dir(), ".cache", NULL) | |
| 502 : g_strdup(getenv("XDG_CACHE_HOME"))); | |
| 2313 | 503 |
| 2364 | 504 bmp_paths[BMP_PATH_USER_DIR] = |
| 505 g_build_filename(xdg_config_home, "audacious", NULL); | |
| 506 bmp_paths[BMP_PATH_USER_SKIN_DIR] = | |
| 507 g_build_filename(xdg_data_home, "audacious", "Skins", NULL); | |
| 508 bmp_paths[BMP_PATH_USER_PLUGIN_DIR] = | |
|
2506
630910fd140f
[svn] - changed plugin directory to ~/.local/share/audacious/Plugins (seems more logical to me)
mf0102
parents:
2475
diff
changeset
|
509 g_build_filename(xdg_data_home, "audacious", "Plugins", NULL); |
|
630910fd140f
[svn] - changed plugin directory to ~/.local/share/audacious/Plugins (seems more logical to me)
mf0102
parents:
2475
diff
changeset
|
510 |
| 2364 | 511 bmp_paths[BMP_PATH_SKIN_THUMB_DIR] = |
| 512 g_build_filename(xdg_cache_home, "audacious", "thumbs", NULL); | |
| 2313 | 513 |
| 2364 | 514 bmp_paths[BMP_PATH_CONFIG_FILE] = |
| 515 g_build_filename(bmp_paths[BMP_PATH_USER_DIR], "config", NULL); | |
|
2317
49d285f6008b
[svn] Full support for XDG basedir added. The old config doesn't get automatically converted yet.
js
parents:
2313
diff
changeset
|
516 #ifdef HAVE_XSPF_PLAYLIST |
| 2364 | 517 bmp_paths[BMP_PATH_PLAYLIST_FILE] = |
| 518 g_build_filename(bmp_paths[BMP_PATH_USER_DIR], | |
| 519 "playlist.xspf", NULL); | |
|
2317
49d285f6008b
[svn] Full support for XDG basedir added. The old config doesn't get automatically converted yet.
js
parents:
2313
diff
changeset
|
520 #else |
| 2364 | 521 bmp_paths[BMP_PATH_PLAYLIST_FILE] = |
| 522 g_build_filename(bmp_paths[BMP_PATH_USER_DIR], | |
| 523 "playlist.m3u", NULL); | |
|
2317
49d285f6008b
[svn] Full support for XDG basedir added. The old config doesn't get automatically converted yet.
js
parents:
2313
diff
changeset
|
524 #endif |
| 2364 | 525 bmp_paths[BMP_PATH_ACCEL_FILE] = |
| 526 g_build_filename(bmp_paths[BMP_PATH_USER_DIR], "accels", NULL); | |
| 527 bmp_paths[BMP_PATH_LOG_FILE] = | |
| 528 g_build_filename(bmp_paths[BMP_PATH_USER_DIR], "log", NULL); | |
|
2317
49d285f6008b
[svn] Full support for XDG basedir added. The old config doesn't get automatically converted yet.
js
parents:
2313
diff
changeset
|
529 |
| 2463 | 530 bmp_paths[BMP_PATH_GTKRC_FILE] = |
| 2570 | 531 g_build_filename(bmp_paths[BMP_PATH_USER_DIR], "gtkrc", NULL); |
| 2463 | 532 |
| 2364 | 533 g_free(xdg_config_home); |
| 534 g_free(xdg_data_home); | |
| 535 g_free(xdg_cache_home); | |
|
2317
49d285f6008b
[svn] Full support for XDG basedir added. The old config doesn't get automatically converted yet.
js
parents:
2313
diff
changeset
|
536 |
| 2364 | 537 g_atexit(bmp_free_paths); |
| 2313 | 538 } |
| 539 | |
| 540 void | |
| 541 bmp_config_load(void) | |
| 542 { | |
| 543 ConfigDb *db; | |
| 544 gint i, length; | |
| 545 | |
| 546 memcpy(&cfg, &bmp_default_config, sizeof(BmpConfig)); | |
| 547 | |
| 548 db = bmp_cfg_db_open(); | |
| 549 for (i = 0; i < ncfgbent; ++i) { | |
| 550 bmp_cfg_db_get_bool(db, NULL, | |
| 551 bmp_boolents[i].be_vname, | |
| 552 bmp_boolents[i].be_vloc); | |
| 553 } | |
| 554 | |
| 555 for (i = 0; i < ncfgient; ++i) { | |
| 556 bmp_cfg_db_get_int(db, NULL, | |
| 557 bmp_numents[i].ie_vname, | |
| 558 bmp_numents[i].ie_vloc); | |
| 559 } | |
| 560 | |
| 561 for (i = 0; i < ncfgsent; ++i) { | |
| 562 bmp_cfg_db_get_string(db, NULL, | |
| 563 bmp_strents[i].se_vname, | |
| 564 bmp_strents[i].se_vloc); | |
| 565 } | |
| 566 | |
| 567 /* Preset */ | |
| 568 bmp_cfg_db_get_float(db, NULL, "equalizer_preamp", &cfg.equalizer_preamp); | |
| 569 for (i = 0; i < 10; i++) { | |
| 570 gchar eqtext[18]; | |
| 571 | |
| 572 g_snprintf(eqtext, sizeof(eqtext), "equalizer_band%d", i); | |
| 573 bmp_cfg_db_get_float(db, NULL, eqtext, &cfg.equalizer_bands[i]); | |
| 574 } | |
| 575 | |
| 576 /* History */ | |
| 577 if (bmp_cfg_db_get_int(db, NULL, "url_history_length", &length)) { | |
| 578 for (i = 1; i <= length; i++) { | |
| 579 gchar str[19], *tmp; | |
| 580 | |
| 581 g_snprintf(str, sizeof(str), "url_history%d", i); | |
| 582 if (bmp_cfg_db_get_string(db, NULL, str, &tmp)) | |
| 583 cfg.url_history = g_list_append(cfg.url_history, tmp); | |
| 584 } | |
| 585 } | |
| 586 | |
| 587 bmp_cfg_db_close(db); | |
| 588 | |
| 589 | |
| 590 if (cfg.playlist_font && strlen(cfg.playlist_font) == 0) { | |
| 591 g_free(cfg.playlist_font); | |
| 592 cfg.playlist_font = NULL; | |
| 593 } | |
| 594 | |
| 595 if (cfg.mainwin_font && strlen(cfg.mainwin_font) == 0) { | |
| 596 g_free(cfg.mainwin_font); | |
| 597 cfg.mainwin_font = NULL; | |
| 598 } | |
| 599 | |
| 600 if (!cfg.playlist_font) | |
| 601 cfg.playlist_font = g_strdup(PLAYLISTWIN_DEFAULT_FONT); | |
| 602 | |
| 603 if (!cfg.mainwin_font) | |
| 604 cfg.mainwin_font = g_strdup(MAINWIN_DEFAULT_FONT); | |
| 605 | |
| 606 if (!cfg.gentitle_format) | |
| 607 cfg.gentitle_format = g_strdup("%{p:%p - %}%{a:%a - %}%t"); | |
| 608 | |
| 609 if (!cfg.outputplugin) { | |
| 2364 | 610 gint iter; |
| 2313 | 611 gchar *pl_path = g_build_filename(PLUGIN_DIR, plugin_dir_list[0], NULL); |
| 612 | |
| 613 for (iter = 0; pl_candidates[iter] != NULL && cfg.outputplugin == NULL; iter++) | |
| 2364 | 614 { |
| 615 cfg.outputplugin = find_file_recursively(pl_path, pl_candidates[iter]); | |
| 616 } | |
| 2313 | 617 |
| 618 g_free(pl_path); | |
| 619 } | |
| 620 | |
| 621 if (!cfg.eqpreset_default_file) | |
| 622 cfg.eqpreset_default_file = g_strdup(EQUALIZER_DEFAULT_DIR_PRESET); | |
| 623 | |
| 624 if (!cfg.eqpreset_extension) | |
| 625 cfg.eqpreset_extension = g_strdup(EQUALIZER_DEFAULT_PRESET_EXT); | |
| 626 | |
| 627 if (!cfg.chardet_detector) | |
| 628 cfg.chardet_detector = g_strdup(""); | |
| 629 | |
| 630 if (!cfg.chardet_fallback) | |
| 631 cfg.chardet_fallback = g_strdup(""); | |
| 632 | |
| 633 if (!cfg.cover_name_include) | |
| 2364 | 634 cfg.cover_name_include = g_strdup(""); |
| 2313 | 635 |
| 636 if (!cfg.cover_name_exclude) | |
| 2364 | 637 cfg.cover_name_exclude = g_strdup("back"); |
| 2313 | 638 |
| 639 if (!cfg.session_uri_base) | |
| 640 cfg.session_uri_base = g_strdup(""); | |
| 641 | |
| 642 /* at least one of these should be true */ | |
| 643 if ((!cfg.get_info_on_demand) && (!cfg.get_info_on_load)) | |
| 644 cfg.get_info_on_demand = TRUE; | |
| 645 } | |
| 646 | |
| 647 | |
| 648 void | |
| 649 bmp_config_save(void) | |
| 650 { | |
| 651 GList *node; | |
| 652 gchar *str; | |
| 653 gint i, cur_pb_time; | |
| 654 ConfigDb *db; | |
| 655 Playlist *playlist = playlist_get_active(); | |
| 656 | |
| 657 cfg.disabled_iplugins = input_stringify_disabled_list(); | |
| 658 | |
| 659 | |
| 660 db = bmp_cfg_db_open(); | |
| 661 | |
| 662 for (i = 0; i < ncfgbent; ++i) | |
| 663 if (bmp_boolents[i].be_wrt) | |
| 664 bmp_cfg_db_set_bool(db, NULL, | |
| 665 bmp_boolents[i].be_vname, | |
| 666 *bmp_boolents[i].be_vloc); | |
| 667 | |
| 668 for (i = 0; i < ncfgient; ++i) | |
| 669 if (bmp_numents[i].ie_wrt) | |
| 670 bmp_cfg_db_set_int(db, NULL, | |
| 671 bmp_numents[i].ie_vname, | |
| 672 *bmp_numents[i].ie_vloc); | |
| 673 | |
| 674 /* This is a bit lame .. it'll end up being written twice, | |
| 675 * could do with being done a bit neater. -larne */ | |
| 676 bmp_cfg_db_set_int(db, NULL, "playlist_position", | |
| 677 playlist_get_position(playlist)); | |
| 678 | |
| 2530 | 679 /* FIXME: we're looking up SkinnedWindow::x &c ourselves here. |
| 680 * this isn't exactly right. -nenolod | |
| 681 */ | |
| 682 bmp_cfg_db_set_int(db, NULL, "playlist_x", | |
| 683 SKINNED_WINDOW(playlistwin)->x); | |
| 684 | |
| 685 bmp_cfg_db_set_int(db, NULL, "playlist_y", | |
| 686 SKINNED_WINDOW(playlistwin)->y); | |
| 687 | |
| 688 bmp_cfg_db_set_int(db, NULL, "player_x", | |
| 689 SKINNED_WINDOW(mainwin)->x); | |
| 690 | |
| 691 bmp_cfg_db_set_int(db, NULL, "player_y", | |
| 692 SKINNED_WINDOW(mainwin)->y); | |
| 693 | |
| 694 bmp_cfg_db_set_int(db, NULL, "equalizer_x", | |
| 695 SKINNED_WINDOW(equalizerwin)->x); | |
| 696 | |
| 697 bmp_cfg_db_set_int(db, NULL, "equalizer_y", | |
| 698 SKINNED_WINDOW(equalizerwin)->y); | |
| 699 | |
| 2313 | 700 bmp_cfg_db_set_bool(db, NULL, "mainwin_use_xfont", |
| 2364 | 701 cfg.mainwin_use_xfont); |
| 2313 | 702 |
| 703 for (i = 0; i < ncfgsent; ++i) { | |
| 704 if (bmp_strents[i].se_wrt) | |
| 705 bmp_cfg_db_set_string(db, NULL, | |
| 706 bmp_strents[i].se_vname, | |
| 707 *bmp_strents[i].se_vloc); | |
| 708 } | |
| 709 | |
| 710 bmp_cfg_db_set_float(db, NULL, "equalizer_preamp", cfg.equalizer_preamp); | |
| 711 | |
| 712 for (i = 0; i < 10; i++) { | |
| 713 str = g_strdup_printf("equalizer_band%d", i); | |
| 714 bmp_cfg_db_set_float(db, NULL, str, cfg.equalizer_bands[i]); | |
| 715 g_free(str); | |
| 716 } | |
| 717 | |
| 718 if (bmp_active_skin != NULL) | |
| 719 { | |
| 720 if (bmp_active_skin->path) | |
| 721 bmp_cfg_db_set_string(db, NULL, "skin", bmp_active_skin->path); | |
| 722 else | |
| 723 bmp_cfg_db_unset_key(db, NULL, "skin"); | |
| 724 } | |
| 725 | |
| 726 if (get_current_output_plugin()) | |
| 727 bmp_cfg_db_set_string(db, NULL, "output_plugin", | |
| 728 get_current_output_plugin()->filename); | |
| 729 else | |
| 730 bmp_cfg_db_unset_key(db, NULL, "output_plugin"); | |
| 731 | |
| 732 str = general_stringify_enabled_list(); | |
| 733 if (str) { | |
| 734 bmp_cfg_db_set_string(db, NULL, "enabled_gplugins", str); | |
| 735 g_free(str); | |
| 736 } | |
| 737 else | |
| 738 bmp_cfg_db_unset_key(db, NULL, "enabled_gplugins"); | |
| 739 | |
| 740 str = vis_stringify_enabled_list(); | |
| 741 if (str) { | |
| 742 bmp_cfg_db_set_string(db, NULL, "enabled_vplugins", str); | |
| 743 g_free(str); | |
| 744 } | |
| 745 else | |
| 746 bmp_cfg_db_unset_key(db, NULL, "enabled_vplugins"); | |
| 747 | |
| 748 str = effect_stringify_enabled_list(); | |
| 749 if (str) { | |
| 750 bmp_cfg_db_set_string(db, NULL, "enabled_eplugins", str); | |
| 751 g_free(str); | |
| 752 } | |
| 753 else | |
| 754 bmp_cfg_db_unset_key(db, NULL, "enabled_eplugins"); | |
| 755 | |
| 756 if (cfg.filesel_path) | |
| 757 bmp_cfg_db_set_string(db, NULL, "filesel_path", cfg.filesel_path); | |
| 758 | |
| 759 if (cfg.playlist_path) | |
| 760 bmp_cfg_db_set_string(db, NULL, "playlist_path", cfg.playlist_path); | |
| 761 | |
| 762 bmp_cfg_db_set_int(db, NULL, "url_history_length", | |
| 763 g_list_length(cfg.url_history)); | |
| 764 | |
| 765 for (node = cfg.url_history, i = 1; node; node = g_list_next(node), i++) { | |
| 766 str = g_strdup_printf("url_history%d", i); | |
| 767 bmp_cfg_db_set_string(db, NULL, str, node->data); | |
| 768 g_free(str); | |
| 769 } | |
| 770 | |
| 771 if (playback_get_playing()) { | |
| 2364 | 772 cur_pb_time = playback_get_time(); |
| 2313 | 773 } else |
| 2364 | 774 cur_pb_time = -1; |
| 2313 | 775 cfg.resume_playback_on_startup_time = cur_pb_time; |
| 776 bmp_cfg_db_set_int(db, NULL, "resume_playback_on_startup_time", | |
| 2364 | 777 cfg.resume_playback_on_startup_time); |
| 2313 | 778 |
| 779 bmp_cfg_db_close(db); | |
| 780 | |
| 781 playlist_save(playlist, bmp_paths[BMP_PATH_PLAYLIST_FILE]); | |
| 782 } | |
| 783 | |
| 784 static void | |
| 785 bmp_set_default_icon(void) | |
| 786 { | |
| 787 GdkPixbuf *icon; | |
| 788 | |
| 789 icon = gdk_pixbuf_new_from_xpm_data((const gchar **) audacious_player_xpm); | |
| 790 gtk_window_set_default_icon(icon); | |
| 791 g_object_unref(icon); | |
| 792 } | |
| 793 | |
| 794 static void | |
| 795 register_aud_stock_icons(void) | |
| 796 { | |
| 797 GtkIconFactory *iconfactory = gtk_icon_factory_new(); | |
| 798 GtkIconSet *iconset; | |
| 799 GdkPixbuf *pixbuf; | |
| 800 | |
| 801 /* pick images in icons-csource.h */ | |
| 802 pixbuf = gdk_pixbuf_new_from_inline( -1 , removedups_pixbuf , FALSE , NULL ); | |
| 803 iconset = gtk_icon_set_new_from_pixbuf( pixbuf ); g_object_unref( pixbuf ); | |
| 804 gtk_icon_factory_add( iconfactory , AUD_STOCK_REMOVEDUPS , iconset ); | |
| 805 pixbuf = gdk_pixbuf_new_from_inline( -1 , removeunavail_pixbuf , FALSE , NULL ); | |
| 806 iconset = gtk_icon_set_new_from_pixbuf( pixbuf ); g_object_unref( pixbuf ); | |
| 807 gtk_icon_factory_add( iconfactory , AUD_STOCK_REMOVEUNAVAIL , iconset ); | |
| 808 pixbuf = gdk_pixbuf_new_from_inline( -1 , randomizepl_pixbuf , FALSE , NULL ); | |
| 809 iconset = gtk_icon_set_new_from_pixbuf( pixbuf ); g_object_unref( pixbuf ); | |
| 810 gtk_icon_factory_add( iconfactory , AUD_STOCK_RANDOMIZEPL , iconset ); | |
| 811 pixbuf = gdk_pixbuf_new_from_inline( -1 , sortbytitle_pixbuf , FALSE , NULL ); | |
| 812 iconset = gtk_icon_set_new_from_pixbuf( pixbuf ); g_object_unref( pixbuf ); | |
| 813 gtk_icon_factory_add( iconfactory , AUD_STOCK_SORTBYTITLE , iconset ); | |
| 814 pixbuf = gdk_pixbuf_new_from_inline( -1 , sortbyfilename_pixbuf , FALSE , NULL ); | |
| 815 iconset = gtk_icon_set_new_from_pixbuf( pixbuf ); g_object_unref( pixbuf ); | |
| 816 gtk_icon_factory_add( iconfactory , AUD_STOCK_SORTBYFILENAME , iconset ); | |
| 817 pixbuf = gdk_pixbuf_new_from_inline( -1 , sortbyartist_pixbuf , FALSE , NULL ); | |
| 818 iconset = gtk_icon_set_new_from_pixbuf( pixbuf ); g_object_unref( pixbuf ); | |
| 819 gtk_icon_factory_add( iconfactory , AUD_STOCK_SORTBYARTIST , iconset ); | |
| 820 pixbuf = gdk_pixbuf_new_from_inline( -1 , sortbypathfile_pixbuf , FALSE , NULL ); | |
| 821 iconset = gtk_icon_set_new_from_pixbuf( pixbuf ); g_object_unref( pixbuf ); | |
| 822 gtk_icon_factory_add( iconfactory , AUD_STOCK_SORTBYPATHFILE , iconset ); | |
| 823 pixbuf = gdk_pixbuf_new_from_inline( -1 , selectnone_pixbuf , FALSE , NULL ); | |
| 824 iconset = gtk_icon_set_new_from_pixbuf( pixbuf ); g_object_unref( pixbuf ); | |
| 825 gtk_icon_factory_add( iconfactory , AUD_STOCK_SELECTNONE , iconset ); | |
| 826 pixbuf = gdk_pixbuf_new_from_inline( -1 , selectall_pixbuf , FALSE , NULL ); | |
| 827 iconset = gtk_icon_set_new_from_pixbuf( pixbuf ); g_object_unref( pixbuf ); | |
| 828 gtk_icon_factory_add( iconfactory , AUD_STOCK_SELECTALL , iconset ); | |
| 829 pixbuf = gdk_pixbuf_new_from_inline( -1 , selectinvert_pixbuf , FALSE , NULL ); | |
| 830 iconset = gtk_icon_set_new_from_pixbuf( pixbuf ); g_object_unref( pixbuf ); | |
| 831 gtk_icon_factory_add( iconfactory , AUD_STOCK_SELECTINVERT , iconset ); | |
| 832 pixbuf = gdk_pixbuf_new_from_inline( -1 , invertpl_pixbuf , FALSE , NULL ); | |
| 833 iconset = gtk_icon_set_new_from_pixbuf( pixbuf ); g_object_unref( pixbuf ); | |
| 834 gtk_icon_factory_add( iconfactory , AUD_STOCK_INVERTPL , iconset ); | |
| 835 pixbuf = gdk_pixbuf_new_from_inline( -1 , queuetoggle_pixbuf , FALSE , NULL ); | |
| 836 iconset = gtk_icon_set_new_from_pixbuf( pixbuf ); g_object_unref( pixbuf ); | |
| 837 gtk_icon_factory_add( iconfactory , AUD_STOCK_QUEUETOGGLE , iconset ); | |
| 838 pixbuf = gdk_pixbuf_new_from_inline( -1 , info_pixbuf , FALSE , NULL ); | |
| 839 iconset = gtk_icon_set_new_from_pixbuf( pixbuf ); g_object_unref( pixbuf ); | |
| 840 gtk_icon_factory_add( iconfactory , AUD_STOCK_INFO , iconset ); | |
| 841 pixbuf = gdk_pixbuf_new_from_inline( -1 , playlist_pixbuf , FALSE , NULL ); | |
| 842 iconset = gtk_icon_set_new_from_pixbuf( pixbuf ); g_object_unref( pixbuf ); | |
| 843 gtk_icon_factory_add( iconfactory , AUD_STOCK_PLAYLIST , iconset ); | |
| 844 | |
| 845 gtk_icon_factory_add_default( iconfactory ); | |
| 846 g_object_unref( iconfactory ); | |
| 847 } | |
| 848 | |
| 2411 | 849 static GOptionEntry cmd_entries[] = { |
|
2448
ff135e2ba10e
[svn] - mark some strings used by GOption as translatable
nenolod
parents:
2420
diff
changeset
|
850 {"session", 'n', 0, G_OPTION_ARG_INT, &options.session, N_("Select which Audacious session ID to use"), NULL}, |
|
ff135e2ba10e
[svn] - mark some strings used by GOption as translatable
nenolod
parents:
2420
diff
changeset
|
851 {"rew", 'r', 0, G_OPTION_ARG_NONE, &options.rew, N_("Skip backwards in playlist"), NULL}, |
|
ff135e2ba10e
[svn] - mark some strings used by GOption as translatable
nenolod
parents:
2420
diff
changeset
|
852 {"play", 'p', 0, G_OPTION_ARG_NONE, &options.play, N_("Start playing current playlist"), NULL}, |
|
ff135e2ba10e
[svn] - mark some strings used by GOption as translatable
nenolod
parents:
2420
diff
changeset
|
853 {"pause", 'u', 0, G_OPTION_ARG_NONE, &options.pause, N_("Pause current song"), NULL}, |
| 2475 | 854 {"stop", 's', 0, G_OPTION_ARG_NONE, &options.stop, N_("Stop current song"), NULL}, |
|
2551
cea3528b2996
[svn] Fix --play-pause commandline option, by Alex "Monkey" Maclean in #gentoo-x86
chainsaw
parents:
2530
diff
changeset
|
855 {"play-pause", 't', 0, G_OPTION_ARG_NONE, &options.play_pause, N_("Pause if playing, play otherwise"), NULL}, |
|
2448
ff135e2ba10e
[svn] - mark some strings used by GOption as translatable
nenolod
parents:
2420
diff
changeset
|
856 {"fwd", 'f', 0, G_OPTION_ARG_NONE, &options.fwd, N_("Skip forward in playlist"), NULL}, |
|
ff135e2ba10e
[svn] - mark some strings used by GOption as translatable
nenolod
parents:
2420
diff
changeset
|
857 {"show-jump-box", 'j', 0, G_OPTION_ARG_NONE, &options.show_jump_box, N_("Display Jump to File dialog"), NULL}, |
|
ff135e2ba10e
[svn] - mark some strings used by GOption as translatable
nenolod
parents:
2420
diff
changeset
|
858 {"enqueue", 'e', 0, G_OPTION_ARG_NONE, &options.enqueue, N_("Don't clear the playlist"), NULL}, |
|
ff135e2ba10e
[svn] - mark some strings used by GOption as translatable
nenolod
parents:
2420
diff
changeset
|
859 {"enqueue-to-temp", 'E', 0, G_OPTION_ARG_NONE, &options.enqueue_to_temp, N_("Add new files to a temporary playlist"), NULL}, |
|
ff135e2ba10e
[svn] - mark some strings used by GOption as translatable
nenolod
parents:
2420
diff
changeset
|
860 {"show-main-window", 'm', 0, G_OPTION_ARG_NONE, &options.mainwin, N_("Display the main window"), NULL}, |
|
ff135e2ba10e
[svn] - mark some strings used by GOption as translatable
nenolod
parents:
2420
diff
changeset
|
861 {"activate", 'a', 0, G_OPTION_ARG_NONE, &options.activate, N_("Display all open Audacious windows"), NULL}, |
|
ff135e2ba10e
[svn] - mark some strings used by GOption as translatable
nenolod
parents:
2420
diff
changeset
|
862 {"headless", 'H', 0, G_OPTION_ARG_NONE, &options.headless, N_("Enable headless operation"), NULL}, |
|
ff135e2ba10e
[svn] - mark some strings used by GOption as translatable
nenolod
parents:
2420
diff
changeset
|
863 {"no-log", 'N', 0, G_OPTION_ARG_NONE, &options.no_log, N_("Print all errors and warnings to stdout"), NULL}, |
|
ff135e2ba10e
[svn] - mark some strings used by GOption as translatable
nenolod
parents:
2420
diff
changeset
|
864 {"version", 'v', 0, G_OPTION_ARG_NONE, &options.version, N_("Show version and builtin features"), NULL}, |
| 2411 | 865 {G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &options.filenames, N_("FILE..."), NULL}, |
| 866 {NULL}, | |
| 867 }; | |
| 2313 | 868 |
| 869 static void | |
| 870 handle_cmd_line_options(BmpCmdLineOpt * options, | |
| 871 gboolean remote) | |
| 872 { | |
| 2411 | 873 gchar **filenames = options->filenames; |
| 2313 | 874 gint session = options->session; |
| 875 | |
| 2411 | 876 if (options->version) |
| 877 { | |
| 878 dump_version(); | |
| 879 exit(EXIT_SUCCESS); | |
| 880 } | |
| 881 | |
| 2313 | 882 if (session == -1) { |
| 883 if (!remote) | |
| 884 session = ctrlsocket_get_session_id(); | |
| 885 else | |
| 886 session = 0; | |
| 887 } | |
| 888 | |
| 2411 | 889 if (filenames != NULL) |
| 890 { | |
| 2313 | 891 gint pos = 0; |
| 2411 | 892 gint i = 0; |
| 2313 | 893 |
| 2411 | 894 for (i = 0; filenames[i] != NULL; i++) |
| 895 { | |
| 2570 | 896 gchar *filename; |
|
2512
3a1fc6f7c187
[svn] - unbreak relative path support. closes #791.
nenolod
parents:
2506
diff
changeset
|
897 gchar *current_dir = g_get_current_dir(); |
|
3a1fc6f7c187
[svn] - unbreak relative path support. closes #791.
nenolod
parents:
2506
diff
changeset
|
898 |
|
3a1fc6f7c187
[svn] - unbreak relative path support. closes #791.
nenolod
parents:
2506
diff
changeset
|
899 if (filenames[i][0] == '/' || strstr(filenames[i], "://")) |
|
3a1fc6f7c187
[svn] - unbreak relative path support. closes #791.
nenolod
parents:
2506
diff
changeset
|
900 filename = g_strdup(filenames[i]); |
|
3a1fc6f7c187
[svn] - unbreak relative path support. closes #791.
nenolod
parents:
2506
diff
changeset
|
901 else |
|
3a1fc6f7c187
[svn] - unbreak relative path support. closes #791.
nenolod
parents:
2506
diff
changeset
|
902 filename = g_build_filename(current_dir, filenames[i], NULL); |
|
3a1fc6f7c187
[svn] - unbreak relative path support. closes #791.
nenolod
parents:
2506
diff
changeset
|
903 |
| 2411 | 904 if (options->load_skins) |
| 905 { | |
|
2512
3a1fc6f7c187
[svn] - unbreak relative path support. closes #791.
nenolod
parents:
2506
diff
changeset
|
906 xmms_remote_set_skin(session, filename); |
|
3a1fc6f7c187
[svn] - unbreak relative path support. closes #791.
nenolod
parents:
2506
diff
changeset
|
907 skin_install_skin(filename); |
| 2411 | 908 } |
| 909 else | |
| 910 { | |
| 911 if (options->enqueue_to_temp) | |
|
2512
3a1fc6f7c187
[svn] - unbreak relative path support. closes #791.
nenolod
parents:
2506
diff
changeset
|
912 xmms_remote_playlist_enqueue_to_temp(session, filename); |
| 2313 | 913 |
| 2411 | 914 if (options->enqueue && options->play) |
| 915 pos = xmms_remote_get_playlist_length(session); | |
| 916 | |
| 917 if (!options->enqueue) | |
|
2574
40407b7363f3
[svn] - enforce playback stop when clearing the playlist to load new files in. closes #808.
nenolod
parents:
2570
diff
changeset
|
918 { |
| 2411 | 919 xmms_remote_playlist_clear(session); |
|
2574
40407b7363f3
[svn] - enforce playback stop when clearing the playlist to load new files in. closes #808.
nenolod
parents:
2570
diff
changeset
|
920 xmms_remote_stop(session); |
|
40407b7363f3
[svn] - enforce playback stop when clearing the playlist to load new files in. closes #808.
nenolod
parents:
2570
diff
changeset
|
921 } |
| 2411 | 922 |
|
2512
3a1fc6f7c187
[svn] - unbreak relative path support. closes #791.
nenolod
parents:
2506
diff
changeset
|
923 xmms_remote_playlist_add_url_string(session, filename); |
| 2313 | 924 |
| 2411 | 925 if (options->enqueue && options->play && |
| 926 xmms_remote_get_playlist_length(session) > pos) | |
| 927 xmms_remote_set_playlist_pos(session, pos); | |
| 2313 | 928 |
| 2411 | 929 if (!options->enqueue) |
| 930 xmms_remote_play(session); | |
| 931 } | |
|
2512
3a1fc6f7c187
[svn] - unbreak relative path support. closes #791.
nenolod
parents:
2506
diff
changeset
|
932 |
|
3a1fc6f7c187
[svn] - unbreak relative path support. closes #791.
nenolod
parents:
2506
diff
changeset
|
933 g_free(filename); |
|
3a1fc6f7c187
[svn] - unbreak relative path support. closes #791.
nenolod
parents:
2506
diff
changeset
|
934 g_free(current_dir); |
| 2313 | 935 } |
| 936 | |
| 2411 | 937 g_strfreev(filenames); |
| 2313 | 938 } |
| 939 | |
| 940 if (options->rew) | |
| 941 xmms_remote_playlist_prev(session); | |
| 942 | |
| 943 if (options->play) | |
| 944 xmms_remote_play(session); | |
| 945 | |
| 946 if (options->pause) | |
| 947 xmms_remote_pause(session); | |
| 948 | |
| 949 if (options->stop) | |
| 950 xmms_remote_stop(session); | |
| 951 | |
| 952 if (options->fwd) | |
| 953 xmms_remote_playlist_next(session); | |
| 954 | |
| 955 if (options->play_pause) | |
| 956 xmms_remote_play_pause(session); | |
| 957 | |
| 958 if (options->show_jump_box) | |
| 959 xmms_remote_show_jtf_box(session); | |
| 960 | |
| 961 if (options->mainwin) | |
| 962 xmms_remote_main_win_toggle(session, TRUE); | |
| 963 | |
| 964 if (options->activate) | |
| 965 xmms_remote_activate(session); | |
| 966 | |
| 967 if (options->playcd) | |
| 968 play_medium(); | |
| 969 } | |
| 970 | |
| 971 static void | |
| 972 bmp_setup_logger(void) | |
| 973 { | |
| 974 if (!bmp_logger_start(bmp_paths[BMP_PATH_LOG_FILE])) | |
| 975 return; | |
| 976 | |
| 977 g_atexit(bmp_logger_stop); | |
| 978 } | |
| 979 | |
| 980 static void | |
| 981 run_load_skin_error_dialog(const gchar * skin_path) | |
| 982 { | |
| 983 const gchar *markup = | |
| 984 N_("<b><big>Unable to load skin.</big></b>\n" | |
| 985 "\n" | |
| 986 "Check that skin at '%s' is usable and default skin is properly " | |
| 987 "installed at '%s'\n"); | |
| 988 | |
| 989 GtkWidget *dialog = | |
| 990 gtk_message_dialog_new_with_markup(NULL, | |
| 991 GTK_DIALOG_MODAL, | |
| 992 GTK_MESSAGE_ERROR, | |
| 993 GTK_BUTTONS_CLOSE, | |
| 994 _(markup), | |
| 995 skin_path, | |
| 996 BMP_DEFAULT_SKIN_PATH); | |
| 997 gtk_dialog_run(GTK_DIALOG(dialog)); | |
| 998 gtk_widget_destroy(dialog); | |
| 999 } | |
| 1000 | |
| 1001 // use a format string? | |
| 1002 void report_error(const gchar *error_text) | |
| 1003 { | |
| 2364 | 1004 fprintf(stderr, error_text); |
| 2570 | 1005 |
| 1006 if (options.headless != 1) | |
| 1007 { | |
| 2313 | 1008 gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(err), |
| 1009 error_text); | |
| 1010 gtk_dialog_run(GTK_DIALOG(err)); | |
| 1011 gtk_widget_hide(err); | |
| 1012 } | |
| 1013 } | |
| 1014 | |
| 2369 | 1015 static gboolean |
| 1016 aud_headless_iteration(gpointer unused) | |
| 1017 { | |
|
2506
630910fd140f
[svn] - changed plugin directory to ~/.local/share/audacious/Plugins (seems more logical to me)
mf0102
parents:
2475
diff
changeset
|
1018 audcore_generic_events(); |
|
630910fd140f
[svn] - changed plugin directory to ~/.local/share/audacious/Plugins (seems more logical to me)
mf0102
parents:
2475
diff
changeset
|
1019 free_vis_data(); |
|
630910fd140f
[svn] - changed plugin directory to ~/.local/share/audacious/Plugins (seems more logical to me)
mf0102
parents:
2475
diff
changeset
|
1020 return TRUE; |
| 2369 | 1021 } |
| 1022 | |
| 2313 | 1023 gint |
| 1024 main(gint argc, gchar ** argv) | |
| 1025 { | |
| 1026 gboolean gtk_init_check_ok; | |
| 1027 Playlist *playlist; | |
| 2411 | 1028 GOptionContext *context; |
| 1029 GError *error = NULL; | |
| 2313 | 1030 |
| 1031 /* Setup l10n early so we can print localized error messages */ | |
| 1032 gtk_set_locale(); | |
| 1033 bindtextdomain(PACKAGE_NAME, LOCALEDIR); | |
| 1034 bind_textdomain_codeset(PACKAGE_NAME, "UTF-8"); | |
|
2388
52bcc18eb8bb
[svn] - attempt to bind the audacious-plugins domain
nenolod
parents:
2369
diff
changeset
|
1035 bindtextdomain(PACKAGE_NAME "-plugins", LOCALEDIR); |
|
52bcc18eb8bb
[svn] - attempt to bind the audacious-plugins domain
nenolod
parents:
2369
diff
changeset
|
1036 bind_textdomain_codeset(PACKAGE_NAME "-plugins", "UTF-8"); |
| 2313 | 1037 textdomain(PACKAGE_NAME); |
| 1038 | |
| 1039 bmp_init_paths(); | |
| 1040 bmp_make_user_dir(); | |
| 1041 | |
| 1042 /* Check GTK version. Really, this is only needed for binary | |
| 1043 * distribution since configure already checks. */ | |
| 1044 if (!GTK_CHECK_VERSION(2, 6, 0)) { | |
| 1045 g_printerr(_("Sorry, your GTK+ version (%d.%d.%d) does not work with Audacious.\n" | |
| 1046 "Please use GTK+ %s or newer.\n"), | |
| 1047 gtk_major_version, gtk_minor_version, gtk_micro_version, | |
| 1048 "2.6.0"); | |
| 1049 exit(EXIT_FAILURE); | |
| 1050 } | |
| 1051 | |
| 1052 g_set_application_name(_(application_name)); | |
| 1053 | |
| 1054 g_thread_init(NULL); | |
| 1055 if (!g_thread_supported()) { | |
| 1056 g_printerr(_("Sorry, threads isn't supported on your platform.\n\n" | |
| 1057 "If you're on a libc5 based linux system and installed Glib & GTK+ before you\n" | |
| 1058 "installed LinuxThreads you need to recompile Glib & GTK+.\n")); | |
| 1059 exit(EXIT_FAILURE); | |
| 1060 } | |
| 1061 | |
| 1062 gdk_threads_init(); | |
| 1063 | |
| 1064 cond_scan = g_cond_new(); | |
| 1065 mutex_scan = g_mutex_new(); | |
| 1066 | |
| 2463 | 1067 gtk_rc_add_default_file(bmp_paths[BMP_PATH_GTKRC_FILE]); |
| 1068 | |
| 2313 | 1069 gtk_init_check_ok = gtk_init_check(&argc, &argv); |
| 2411 | 1070 |
| 2413 | 1071 memset(&options, '\0', sizeof(BmpCmdLineOpt)); |
| 1072 options.session = -1; | |
| 1073 | |
| 2411 | 1074 context = g_option_context_new(_("- play multimedia files")); |
| 1075 g_option_context_add_main_entries(context, cmd_entries, PACKAGE_NAME); | |
| 1076 g_option_context_add_group(context, gtk_get_option_group(TRUE)); | |
| 1077 g_option_context_parse(context, &argc, &argv, &error); | |
| 1078 | |
| 2412 | 1079 if (error != NULL) |
| 1080 { | |
| 1081 g_printerr(_("%s: %s\nTry `%s --help' for more information.\n"), argv[0], error->message, argv[0]); | |
| 1082 exit(EXIT_FAILURE); | |
| 1083 } | |
| 1084 | |
| 2313 | 1085 if (!gtk_init_check_ok) { |
| 1086 if (argc < 2) { | |
| 1087 /* GTK check failed, and no arguments passed to indicate | |
| 1088 that user is intending to only remote control a running | |
| 1089 session */ | |
| 2412 | 1090 g_printerr(_("%s: Unable to open display, exiting.\n"), argv[0]); |
| 2313 | 1091 exit(EXIT_FAILURE); |
| 1092 } | |
| 1093 | |
| 1094 handle_cmd_line_options(&options, TRUE); | |
| 1095 | |
| 1096 /* we could be running headless, so GTK probably wont matter */ | |
| 1097 if (options.headless != 1) | |
| 1098 exit(EXIT_SUCCESS); | |
| 1099 } | |
| 1100 | |
| 1101 if (options.no_log == FALSE) | |
| 1102 bmp_setup_logger(); | |
| 1103 | |
| 1104 signal_handlers_init(); | |
| 1105 | |
| 1106 g_random_set_seed(time(NULL)); | |
| 1107 | |
| 1108 bmp_config_load(); | |
| 1109 | |
| 1110 if (options.session != -1 || !ctrlsocket_setup()) { | |
| 1111 handle_cmd_line_options(&options, TRUE); | |
| 1112 exit(EXIT_SUCCESS); | |
| 1113 } | |
| 1114 | |
| 1115 plugin_system_init(); | |
| 1116 | |
| 1117 /* Initialize the playlist system. */ | |
| 1118 playlist_init(); | |
| 1119 | |
| 1120 if (options.headless != 1) | |
| 1121 { | |
| 1122 /* register icons in stock */ | |
| 1123 register_aud_stock_icons(); | |
| 1124 | |
| 1125 bmp_set_default_icon(); | |
| 1126 | |
| 1127 gtk_accel_map_load(bmp_paths[BMP_PATH_ACCEL_FILE]); | |
| 1128 | |
| 1129 /* uimanager */ | |
| 1130 ui_manager_init(); | |
| 1131 ui_manager_create_menus(); | |
| 1132 | |
| 1133 if (!init_skins(cfg.skin)) { | |
| 1134 run_load_skin_error_dialog(cfg.skin); | |
| 1135 exit(EXIT_FAILURE); | |
| 1136 } | |
| 1137 | |
| 1138 GDK_THREADS_ENTER(); | |
| 1139 } | |
| 1140 | |
| 1141 /* Load the default playlist in. */ | |
| 1142 playlist = playlist_get_active(); | |
| 1143 playlist_load(playlist, bmp_paths[BMP_PATH_PLAYLIST_FILE]); | |
| 1144 playlist_set_position(playlist, cfg.playlist_position); | |
| 1145 | |
| 1146 /* this needs to be called after all 3 windows are created and | |
| 1147 * input plugins are setup'ed | |
| 1148 * but not if we're running headless --nenolod | |
| 1149 */ | |
| 1150 mainwin_setup_menus(); | |
| 1151 | |
| 1152 if (options.headless != 1) | |
| 1153 GDK_THREADS_LEAVE(); | |
| 1154 | |
| 1155 ctrlsocket_start(); | |
| 1156 | |
| 1157 handle_cmd_line_options(&options, FALSE); | |
| 1158 | |
| 1159 if (options.headless != 1) | |
| 1160 { | |
| 1161 GDK_THREADS_ENTER(); | |
| 1162 | |
| 1163 read_volume(VOLSET_STARTUP); | |
| 1164 mainwin_set_info_text(); | |
| 1165 | |
| 1166 /* FIXME: delayed, because it deals directly with the plugin | |
| 1167 * interface to set menu items */ | |
| 1168 create_prefs_window(); | |
| 1169 | |
| 2364 | 1170 create_fileinfo_window(); |
| 1171 | |
| 2313 | 1172 |
| 1173 if (cfg.player_visible) | |
| 1174 mainwin_show(TRUE); | |
| 1175 else if (!cfg.playlist_visible && !cfg.equalizer_visible) | |
| 1176 mainwin_show(TRUE); | |
| 1177 | |
| 1178 if (cfg.equalizer_visible) | |
| 1179 equalizerwin_show(TRUE); | |
| 1180 | |
| 1181 if (cfg.playlist_visible) | |
| 1182 playlistwin_show(); | |
| 1183 | |
| 1184 hint_set_always(cfg.always_on_top); | |
| 1185 | |
| 1186 playlist_start_get_info_thread(); | |
| 1187 mainwin_attach_idle_func(); | |
| 1188 | |
| 1189 | |
| 2364 | 1190 starting_up = FALSE; |
| 1191 has_x11_connection = TRUE; | |
| 2313 | 1192 |
| 2364 | 1193 if (cfg.resume_playback_on_startup) |
| 1194 { | |
| 1195 if (cfg.resume_playback_on_startup_time != -1 && | |
| 1196 playlist_get_length(playlist) > 0) | |
| 1197 { | |
| 1198 int i; | |
| 1199 gint l = 0, r = 0; | |
| 1200 while (gtk_events_pending()) gtk_main_iteration(); | |
| 1201 output_get_volume(&l, &r); | |
| 1202 output_set_volume(0,0); | |
| 1203 playback_initiate(); | |
| 2313 | 1204 |
| 2364 | 1205 /* Busy wait; loop is fairly tight to minimize duration of |
| 1206 * "frozen" GUI. Feel free to tune. --chainsaw */ | |
| 1207 for (i = 0; i < 20; i++) | |
| 1208 { | |
| 1209 g_usleep(1000); | |
| 1210 if (!ip_data.playing) | |
| 1211 break; | |
| 1212 } | |
| 1213 playback_seek(cfg.resume_playback_on_startup_time / 1000); | |
| 1214 output_set_volume(l, r); | |
| 1215 } | |
| 1216 } | |
| 1217 | |
| 2313 | 1218 gtk_main(); |
| 1219 | |
| 1220 GDK_THREADS_LEAVE(); | |
| 1221 | |
| 1222 g_cond_free(cond_scan); | |
| 1223 g_mutex_free(mutex_scan); | |
| 1224 | |
| 1225 return EXIT_SUCCESS; | |
| 1226 } | |
| 2364 | 1227 // if we are running headless |
| 2313 | 1228 else |
| 1229 { | |
|
2506
630910fd140f
[svn] - changed plugin directory to ~/.local/share/audacious/Plugins (seems more logical to me)
mf0102
parents:
2475
diff
changeset
|
1230 GMainLoop *loop; |
| 2369 | 1231 |
| 2313 | 1232 mainwin_set_info_text(); |
| 1233 playlist_start_get_info_thread(); | |
| 1234 | |
| 2364 | 1235 starting_up = FALSE; |
| 2313 | 1236 |
|
2506
630910fd140f
[svn] - changed plugin directory to ~/.local/share/audacious/Plugins (seems more logical to me)
mf0102
parents:
2475
diff
changeset
|
1237 loop = g_main_loop_new(NULL, TRUE); |
|
630910fd140f
[svn] - changed plugin directory to ~/.local/share/audacious/Plugins (seems more logical to me)
mf0102
parents:
2475
diff
changeset
|
1238 g_timeout_add(10, aud_headless_iteration, NULL); |
|
630910fd140f
[svn] - changed plugin directory to ~/.local/share/audacious/Plugins (seems more logical to me)
mf0102
parents:
2475
diff
changeset
|
1239 g_main_loop_run(loop); |
| 2313 | 1240 |
| 1241 return EXIT_SUCCESS; | |
| 1242 } | |
| 1243 } |
