/* * Initial main.c file generated by Glade. Edit as required. * Glade will not overwrite this file. */ #include "linphone.h" /* #include "../osipua/src/dbgalloc.h" GMemVTable dbgtable={ smalloc, srealloc, sfree, scalloc, smalloc, srealloc }; */ LinphoneCore core; LinphoneGnomeUI ui; static gboolean verbose=0; GOptionEntry linphone_options[2]={ { .long_name="verbose", .short_name= '\0', .arg=G_OPTION_ARG_NONE, .arg_data= (gpointer)&verbose, .description="log to stdout some debug information while running." } }; int main (int argc, char *argv[]) { void *p; g_thread_init(NULL); //g_log_set_fatal_mask("GLib",G_LOG_LEVEL_WARNING); //g_mem_set_vtable(glib_mem_profiler_table); //g_mem_set_vtable(&dbgtable); #ifdef ENABLE_NLS p=bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); if (p==NULL) perror("bindtextdomain failed"); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); #else printf("NLS disabled.\n"); #endif #ifdef NOWOBSOLETE_NOTYET gnome_program_init ("linphone", LINPHONE_VERSION, LIBGNOMEUI_MODULE, argc, argv, GNOME_PARAM_APP_DATADIR, PACKAGE_DATA_DIR, GNOME_PARAM_POPT_TABLE,&linphone_options,NULL); #endif if (!gtk_init_with_args(&argc,&argv,_("A free SIP video-phone"), linphone_options,NULL,NULL)) return -1; add_pixmap_directory(PACKAGE_DATA_DIR "/pixmaps/linphone"); add_pixmap_directory("pixmaps"); if (verbose) linphone_core_enable_logs(stdout); else linphone_core_disable_logs(); linphone_gnome_init(&ui,&core); linphone_gnome_ui_show(&ui); gtk_main (); gdk_threads_leave(); /* it appears that the gdk lock is hold while exiting from gtk_main() */ linphone_gnome_uninit(&ui); //g_mem_profile(); exit(0); return 0; }