comparison src/audacious/main.c @ 4542:26209b646930

Some cosmetic changes
author mf0102 <0102@gmx.at>
date Mon, 12 May 2008 19:19:49 +0200
parents 97b29dec6c6b
children ed94ac6182df
comparison
equal deleted inserted replaced
4541:d8920be7275a 4542:26209b646930
103 gboolean enqueue_to_temp; 103 gboolean enqueue_to_temp;
104 gboolean version; 104 gboolean version;
105 gchar *previous_session_id; 105 gchar *previous_session_id;
106 gboolean macpack; 106 gboolean macpack;
107 }; 107 };
108
109 typedef struct _AudCmdLineOpt AudCmdLineOpt; 108 typedef struct _AudCmdLineOpt AudCmdLineOpt;
110 109
111 static AudCmdLineOpt options; 110 static AudCmdLineOpt options;
112
113 111
114 gchar *aud_paths[BMP_PATH_COUNT] = {}; 112 gchar *aud_paths[BMP_PATH_COUNT] = {};
115 113
116 GCond *cond_scan; 114 GCond *cond_scan;
117 GMutex *mutex_scan; 115 GMutex *mutex_scan;
118 #ifdef USE_DBUS 116 #ifdef USE_DBUS
119 MprisPlayer *mpris; 117 MprisPlayer *mpris;
120 #endif 118 #endif
121 119
122 static void 120 static void
123 dump_version(void) 121 print_version(void)
124 { 122 {
125 g_printf("%s %s [%s]\n", _(application_name), VERSION, svn_stamp); 123 g_printf("%s %s [%s]\n", _(application_name), VERSION, svn_stamp);
126 } 124 }
127 125
128 static void 126 static void
133 make_directory(aud_paths[BMP_PATH_USER_DIR], mode755); 131 make_directory(aud_paths[BMP_PATH_USER_DIR], mode755);
134 make_directory(aud_paths[BMP_PATH_USER_PLUGIN_DIR], mode755); 132 make_directory(aud_paths[BMP_PATH_USER_PLUGIN_DIR], mode755);
135 make_directory(aud_paths[BMP_PATH_USER_SKIN_DIR], mode755); 133 make_directory(aud_paths[BMP_PATH_USER_SKIN_DIR], mode755);
136 make_directory(aud_paths[BMP_PATH_SKIN_THUMB_DIR], mode755); 134 make_directory(aud_paths[BMP_PATH_SKIN_THUMB_DIR], mode755);
137 make_directory(aud_paths[BMP_PATH_PLAYLISTS_DIR], mode755); 135 make_directory(aud_paths[BMP_PATH_PLAYLISTS_DIR], mode755);
138 }
139
140 static void
141 aud_free_paths(void)
142 {
143 int i;
144
145 for (i = 0; i < BMP_PATH_COUNT; i++)
146 {
147 g_free(aud_paths[i]);
148 aud_paths[i] = 0;
149 }
150 } 136 }
151 137
152 static void 138 static void
153 aud_init_paths() 139 aud_init_paths()
154 { 140 {
203 g_free(xdg_cache_home); 189 g_free(xdg_cache_home);
204 190
205 g_atexit(aud_free_paths); 191 g_atexit(aud_free_paths);
206 } 192 }
207 193
194 static void
195 aud_free_paths(void)
196 {
197 int i;
198
199 for (i = 0; i < BMP_PATH_COUNT; i++)
200 {
201 g_free(aud_paths[i]);
202 aud_paths[i] = 0;
203 }
204 }
208 205
209 static void 206 static void
210 aud_set_default_icon(void) 207 aud_set_default_icon(void)
211 { 208 {
212 GdkPixbuf *icon; 209 GdkPixbuf *icon;
327 gboolean is_running = audacious_remote_is_running(session); 324 gboolean is_running = audacious_remote_is_running(session);
328 #endif 325 #endif
329 326
330 if (options.version) 327 if (options.version)
331 { 328 {
332 dump_version(); 329 print_version();
333 exit(EXIT_SUCCESS); 330 exit(EXIT_SUCCESS);
334 } 331 }
335 332
336 #ifdef USE_DBUS 333 #ifdef USE_DBUS
337 if (is_running) 334 if (is_running)