示例#1
0
文件: main.c 项目: blutsvente/MIX
int main(int argc, char *argv[])
{

#ifdef ENABLE_NLS
    bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
    bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
    textdomain(GETTEXT_PACKAGE);
#endif

    gtk_set_locale();
    gtk_init(&argc, &argv);

    // create and show main window
    mainWindow = (GtkWidget*) create_MainWindow();
    gtk_widget_show(mainWindow);

    // read config file
    if(read_settings()!=0)
	    show_preferences();

    while(!get_mix_path())
	if(!show_preferences()) return 0;

    // initialize MIX
    while(mix_init(get_mix_path()))
	if(!show_preferences()) return 0;

    // open cmd arg passed sheet
    if(argc > 1) {
	open_project((const char*) argv[1]);
    }

    gtk_main();
    return 0;
}
示例#2
0
void mainWindow::makeConnections()
{
	QObject::connect(actionAbout, SIGNAL( triggered() ), this, SLOT( show_aboutDialog() ) );
	QObject::connect(actionPreferences, SIGNAL( triggered() ), this, SLOT( show_preferences() ) );
	QObject::connect(actionStart, SIGNAL( triggered() ), this, SLOT( startFolding() ) );
	QObject::connect(actionStop, SIGNAL( triggered() ), this, SLOT( stopFolding() ) );
	QObject::connect(actionHomepage, SIGNAL( triggered() ), this, SLOT( loadHomepage() ) );
	QObject::connect(actionSourceForge, SIGNAL( triggered() ), this, SLOT( loadSourceForge() ) );
	QObject::connect(actionFoldingWebsite, SIGNAL( triggered() ), this, SLOT( loadFoldingWebsite() ) );
	QObject::connect(actionFoldingForum, SIGNAL( triggered() ), this, SLOT( loadFoldingForum() ) );
	QObject::connect(actionContact, SIGNAL( triggered() ), this, SLOT( contactAuthor() ) );
	QObject::connect(actionAddClient, SIGNAL( triggered() ), this, SLOT( addClient() ) );
	QObject::connect(actionRemoveClient, SIGNAL( triggered() ), this, SLOT( removeClient() ) );
	QObject::connect(actionSaveConfig, SIGNAL( triggered() ), this, SLOT( saveConfig() ) );
	QObject::connect(actionPersonalStats, SIGNAL( triggered() ), this, SLOT( reloadPersonalStats() ) );
	QObject::connect(actionTeamStats, SIGNAL( triggered() ), this, SLOT( reloadTeamStats() ) );
	QObject::connect(actionMoleculeViewer, SIGNAL( triggered() ), this, SLOT( showMolecule() ) );
	QObject::connect(actionExit, SIGNAL(triggered()), this, SLOT(checkExit()));

	
	QObject::connect(clients->table, SIGNAL( cellClicked( int, int) ), this, SLOT( showInfo()));
	
	Reloader = new QTimer(this);
    	connect(Reloader, SIGNAL(timeout()), this, SLOT(reloadClients()));
    	Reloader->start(60000);
}
示例#3
0
/* Called when Preferences is selected from right-click menu */
static void preferences_selected(GtkMenuItem *menu_item, gpointer user_data) {
  /* Show the preferences dialog */
  show_preferences(0);
}
示例#4
0
/* Called when Edit Actions is selected from actions menu */
static void edit_actions_selected(GtkButton *button, gpointer user_data) {
  /* Show the preferences dialog on the actions tab */
  show_preferences(ACTIONS_TAB);
}