/**************************************************************************** Loads a theme with the given name. First matching directory will be used. If there's no such theme the function returns FALSE. ****************************************************************************/ bool load_theme(const char *theme_name) { int i, j; for (i = 0; i < num_directories; i++) { for (j = 0; j < directories[i].num_themes; j++) { if (strcmp(theme_name, directories[i].themes[j]) == 0) { gui_load_theme(directories[i].path, directories[i].themes[j]); return TRUE; } } } return FALSE; }
int main(int argc, char *argv[]) { char option[2]; int n; int err=0; if(!argc) usage(argv[0]); clone_args( argv, argc ); #if !GLIB_CHECK_VERSION(2,36,0) g_type_init(); #endif gtk_init( &argc, &argv ); // default host to connect to snprintf(hostname,sizeof(hostname), "127.0.0.1"); while( ( n = getopt( argc, argv, "s:h:p:tabnvLHfX:P:Vl:T:m:g:")) != EOF ) { sprintf(option, "%c", n ); err += set_option( option, optarg); if(err) usage(argv[0]); } if( optind > argc ) err ++; if( err ) usage(argv[0]); glade_init(); vj_mem_init(); vevo_strict_init(); find_user_themes(gveejay_theme); vj_gui_set_debug_level( verbosity , n_tracks,0,0); set_skin( selected_skin, gveejay_theme ); default_bank_values( &col, &row ); gui_load_theme(); register_signals(); vj_gui_init( skins[selected_skin].file, launcher, hostname, port_num, use_threads, load_midi, midi_file,beta,auto_connect); vj_gui_style_setup(); if( preview ) { veejay_msg(VEEJAY_MSG_INFO, "Starting with preview enabled"); gveejay_preview(preview); } if( launcher ) { reloaded_launcher( hostname, port_num ); } memset( &time_last_, 0, sizeof(struct timeval)); while(gveejay_running()) { if(gveejay_idle(NULL)==FALSE) break; while( gtk_events_pending() ) gtk_main_iteration(); } veejay_msg(VEEJAY_MSG_INFO, "See you!"); return 0; }