comparison audacious/main.c @ 1653:a6e6d3500c13 trunk

[svn] - revert back to r2216
author nenolod
date Thu, 07 Sep 2006 22:26:54 -0700
parents 62c5bff8a05b
children eeaf62b288a3
comparison
equal deleted inserted replaced
1652:62c5bff8a05b 1653:a6e6d3500c13
52 #include "libaudacious/vfs.h" 52 #include "libaudacious/vfs.h"
53 53
54 #include "controlsocket.h" 54 #include "controlsocket.h"
55 #include "dnd.h" 55 #include "dnd.h"
56 #include "effect.h" 56 #include "effect.h"
57 #include "equalizer.h"
57 #include "general.h" 58 #include "general.h"
58 #include "genevent.h" 59 #include "genevent.h"
59 #include "hints.h" 60 #include "hints.h"
60 #include "input.h" 61 #include "input.h"
61 #include "logger.h" 62 #include "logger.h"
63 #include "mainwin.h"
62 #include "output.h" 64 #include "output.h"
63 #include "playback.h" 65 #include "playback.h"
64 #include "playlist.h" 66 #include "playlist.h"
67 #include "ui_playlist.h"
65 #include "pluginenum.h" 68 #include "pluginenum.h"
66 #include "prefswin.h" 69 #include "prefswin.h"
67 #include "skinwin.h" 70 #include "skinwin.h"
68 #include "util.h" 71 #include "util.h"
69 #include "visualization.h" 72 #include "visualization.h"
77 80
78 /* Translatable string for beep.desktop's comment field */ 81 /* Translatable string for beep.desktop's comment field */
79 const gchar *desktop_comment = N_("Audacious"); 82 const gchar *desktop_comment = N_("Audacious");
80 83
81 const gchar *application_name = N_("Audacious"); 84 const gchar *application_name = N_("Audacious");
85
82 86
83 struct _BmpCmdLineOpt { 87 struct _BmpCmdLineOpt {
84 GList *filenames; 88 GList *filenames;
85 gint session; 89 gint session;
86 gboolean play, stop, pause, fwd, rew, play_pause, playcd; 90 gboolean play, stop, pause, fwd, rew, play_pause, playcd;
530 g_free(cfg.mainwin_font); 534 g_free(cfg.mainwin_font);
531 cfg.mainwin_font = NULL; 535 cfg.mainwin_font = NULL;
532 } 536 }
533 537
534 if (!cfg.playlist_font) 538 if (!cfg.playlist_font)
535 cfg.playlist_font = g_strdup("Sans Bold 8"); 539 cfg.playlist_font = g_strdup(PLAYLISTWIN_DEFAULT_FONT);
536 540
537 if (!cfg.mainwin_font) 541 if (!cfg.mainwin_font)
538 cfg.mainwin_font = g_strdup("Sans Bold 9"); 542 cfg.mainwin_font = g_strdup(MAINWIN_DEFAULT_FONT);
539 543
540 if (!cfg.gentitle_format) 544 if (!cfg.gentitle_format)
541 cfg.gentitle_format = g_strdup("%{p:%p - %}%{a:%a - %}%t"); 545 cfg.gentitle_format = g_strdup("%{p:%p - %}%{a:%a - %}%t");
542 546
543 if (!cfg.outputplugin) { 547 if (!cfg.outputplugin) {
551 cfg.outputplugin = g_strdup(""); 555 cfg.outputplugin = g_strdup("");
552 #endif 556 #endif
553 } 557 }
554 558
555 if (!cfg.eqpreset_default_file) 559 if (!cfg.eqpreset_default_file)
556 cfg.eqpreset_default_file = g_strdup("dir_default.preset"); 560 cfg.eqpreset_default_file = g_strdup(EQUALIZER_DEFAULT_DIR_PRESET);
557 561
558 if (!cfg.eqpreset_extension) 562 if (!cfg.eqpreset_extension)
559 cfg.eqpreset_extension = g_strdup("preset"); 563 cfg.eqpreset_extension = g_strdup(EQUALIZER_DEFAULT_PRESET_EXT);
560 564
561 if (!cfg.cover_name_include) 565 if (!cfg.cover_name_include)
562 cfg.cover_name_include = g_strdup(""); 566 cfg.cover_name_include = g_strdup("");
563 567
564 if (!cfg.cover_name_exclude) 568 if (!cfg.cover_name_exclude)
1055 1059
1056 bmp_set_default_icon(); 1060 bmp_set_default_icon();
1057 1061
1058 gtk_accel_map_load(bmp_paths[BMP_PATH_ACCEL_FILE]); 1062 gtk_accel_map_load(bmp_paths[BMP_PATH_ACCEL_FILE]);
1059 1063
1060 current_interface->init();
1061 #if 0
1062 /* *** TO WA2GUI *** */
1063 mainwin_create(); 1064 mainwin_create();
1064 1065
1065 playlistwin_create(); 1066 playlistwin_create();
1066 equalizerwin_create(); 1067 equalizerwin_create();
1067 #endif
1068 1068
1069 if (!init_skins(cfg.skin)) { 1069 if (!init_skins(cfg.skin)) {
1070 run_load_skin_error_dialog(cfg.skin); 1070 run_load_skin_error_dialog(cfg.skin);
1071 exit(EXIT_FAILURE); 1071 exit(EXIT_FAILURE);
1072 } 1072 }
1077 plugin_system_init(); 1077 plugin_system_init();
1078 1078
1079 playlist_load(bmp_paths[BMP_PATH_PLAYLIST_FILE]); 1079 playlist_load(bmp_paths[BMP_PATH_PLAYLIST_FILE]);
1080 playlist_set_position(cfg.playlist_position); 1080 playlist_set_position(cfg.playlist_position);
1081 1081
1082 #if 0
1083 /* *** TO WA2GUI *** */
1084 /* this needs to be called after all 3 windows are created and 1082 /* this needs to be called after all 3 windows are created and
1085 * input plugins are setup'ed 1083 * input plugins are setup'ed
1086 * but not if we're running headless --nenolod 1084 * but not if we're running headless --nenolod
1087 */ 1085 */
1088 mainwin_setup_menus(); 1086 mainwin_setup_menus();
1089 #endif
1090 1087
1091 if (options.headless != 1) 1088 if (options.headless != 1)
1092 GDK_THREADS_LEAVE(); 1089 GDK_THREADS_LEAVE();
1093 1090
1094 ctrlsocket_start(); 1091 ctrlsocket_start();
1107 create_prefs_window(); 1104 create_prefs_window();
1108 1105
1109 create_fileinfo_window(); 1106 create_fileinfo_window();
1110 create_filepopup_window(); 1107 create_filepopup_window();
1111 1108
1112 #if 0
1113 if (cfg.player_visible) 1109 if (cfg.player_visible)
1114 mainwin_show(TRUE); 1110 mainwin_show(TRUE);
1115 else if (!cfg.playlist_visible && !cfg.equalizer_visible) 1111 else if (!cfg.playlist_visible && !cfg.equalizer_visible)
1116 mainwin_show(TRUE); 1112 mainwin_show(TRUE);
1117 1113
1120 1116
1121 if (cfg.playlist_visible) 1117 if (cfg.playlist_visible)
1122 playlistwin_show(); 1118 playlistwin_show();
1123 1119
1124 hint_set_always(cfg.always_on_top); 1120 hint_set_always(cfg.always_on_top);
1125 #endif
1126
1127 current_interface->present();
1128 1121
1129 playlist_start_get_info_thread(); 1122 playlist_start_get_info_thread();
1130 mainwin_attach_idle_func(); 1123 mainwin_attach_idle_func();
1131 1124
1132 starting_up = FALSE; 1125 starting_up = FALSE;