コード例 #1
0
ファイル: VersionInfo.cpp プロジェクト: galek/dava.framework
VersionInfo::VersionMap VersionInfo::GetVersionHistory()
{
    VersionMap versions;

    // Current version
    SceneVersion currentVersion;
    currentVersion.version = 14;    // Current version of scene file
    AddVersion(versions, currentVersion);

    return versions;
}
コード例 #2
0
ファイル: fonrec.c プロジェクト: PauloMigAlmeida/cuneiform
int recog_raster(puchar r, uint16_t fullBytes, uint16_t w, uint16_t h, FONBASE *fonba,
		RECRESULT *recres, int maxNames, int inCTB, int col, int row) {
	int i;
	welet *wel;
	int num = 0;
	int rec;

	//memset(probs,0,maxNames);

	for (i = 0, wel = fonba->start, num = 0; i < fonba->inBase; i++, wel++) {
		// don't recog itself
		if (wel->weight == 1 && (wel->nInCTB == inCTB ||
		//	    wel->sr_col == col && wel->sr_row==row
				abs(col - wel->sr_col) <= 1 && abs(row - wel->sr_row) <= 1))
			continue;
		if (wel->num < 0) // не из нашего алфавита
			continue;
		if ((rec = recogWelet(r, fullBytes, w, h, wel)) < POROG_GOOD)
			continue;

		num = AddVersion(recres, (uchar) wel->let, (uchar) rec, i, num, maxNames);
	}
	return num;
}
コード例 #3
0
CAboutDlg::CAboutDlg(GtkWindow *pParent)
{
	float x;
	char buf[2048];
	GtkWidget *tbox, *label, *scrolled_window, *text_view;

	// Dialog with buttons
	m_pDlg = gtk_dialog_new_with_buttons("About Muniwin", pParent, 
		(GtkDialogFlags)(GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR),
		GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, GTK_STOCK_HELP, GTK_RESPONSE_HELP, NULL);
	gtk_dialog_widget_standard_tooltips(GTK_DIALOG(m_pDlg));
	g_signal_connect(G_OBJECT(m_pDlg), "response", G_CALLBACK(response_dialog), this);

	// Dialog icon
	gchar *icon = get_icon_file("about");
	gtk_window_set_icon(GTK_WINDOW(m_pDlg), gdk_pixbuf_new_from_file(icon, NULL));
	g_free(icon);

	// Notebook
	m_Notebook = gtk_notebook_new();
	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(m_pDlg)->vbox), m_Notebook, TRUE, TRUE, 0);
	gtk_widget_set_size_request(m_Notebook, 400, 240);

	// Page "General"
	tbox = gtk_table_new(4, 1, FALSE);
	gtk_container_set_border_width(GTK_CONTAINER(tbox), 8);
	gtk_table_set_row_spacings(GTK_TABLE(tbox), 8);
	gtk_notebook_append_page(GTK_NOTEBOOK(m_Notebook), tbox, gtk_label_new("General"));

	label = gtk_label_new(NULL);
	gtk_label_set_markup(GTK_LABEL(label), "<span size=\"xx-large\" weight=\"bold\">Muniwin</span>");
	gtk_table_attach_defaults(GTK_TABLE(tbox), label, 0, 1, 0, 1);

	label = gtk_label_new(NULL);
	sprintf(buf, "<span size=\"x-large\" weight=\"bold\">Stable version %s</span>", VERSION);
	gtk_label_set_markup(GTK_LABEL(label), buf);
	gtk_table_attach_defaults(GTK_TABLE(tbox), label, 0, 1, 1, 2);

	label = gtk_label_new(NULL);
	sprintf(buf, "<span size=\"large\">%s</span>", ProjectDescription);
	gtk_label_set_markup(GTK_LABEL(label), buf);
	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
	gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_CENTER);
	gtk_table_attach_defaults(GTK_TABLE(tbox), label, 0, 1, 2, 3);

	label = gtk_label_new(NULL);
	gtk_label_set_markup(GTK_LABEL(label), "<span size=\"x-large\" underline=\"single\" foreground=\"blue\">http://c-munipack.sourceforge.net</span>");
	gtk_table_attach_defaults(GTK_TABLE(tbox), label, 0, 1, 3, 4);

	// Page "Versions"
	tbox = gtk_table_new(5, 2, false);
	gtk_container_set_border_width(GTK_CONTAINER(tbox), 8);
	gtk_table_set_row_spacings(GTK_TABLE(tbox), 8);
	gtk_table_set_col_spacings(GTK_TABLE(tbox), 16);
	gtk_notebook_append_page(GTK_NOTEBOOK(m_Notebook), tbox, gtk_label_new("Versions"));
	AddVersion(GTK_TABLE(tbox), 0, g_AppTitle, VERSION);
	AddVersion(GTK_TABLE(tbox), 1, "C-Munipack", cmpack_versionid());
	sprintf(buf, "%.03f", ffvers(&x));
	AddVersion(GTK_TABLE(tbox), 2, "CFITSIO", buf);
	AddVersion(GTK_TABLE(tbox), 3, "Expat", XML_ExpatVersion());
	sprintf(buf, "%d.%d.%d", gtk_major_version, gtk_minor_version, gtk_micro_version);
	AddVersion(GTK_TABLE(tbox), 4, "GTK+", buf);
	sprintf(buf, "%d.%d.%d", glib_major_version, glib_minor_version, glib_micro_version);
	AddVersion(GTK_TABLE(tbox), 5, "GLib", buf);
#if HAVE_LIBGSTREAMER_0_10
	gchar *gstver = gst_version_string();
	AddVersion(GTK_TABLE(tbox), 6, "GStreamer", gstver);
	free(gstver);
#endif
	
	// Page "License"
	scrolled_window = gtk_scrolled_window_new (NULL, NULL);
	gtk_notebook_append_page(GTK_NOTEBOOK(m_Notebook), scrolled_window, gtk_label_new("License"));
	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
		GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_window), 
		GTK_SHADOW_ETCHED_IN);

	text_view = gtk_text_view_new_with_buffer(NULL);
	gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text_view), GTK_WRAP_WORD);
	gtk_text_view_set_editable(GTK_TEXT_VIEW(text_view), false);
	gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(text_view), false);
	gtk_text_buffer_set_text(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view)), 
		CopyrightText, -1);
	gtk_container_add(GTK_CONTAINER(scrolled_window), text_view);

	// Page "Credits"
	scrolled_window = gtk_scrolled_window_new (NULL, NULL);
	gtk_notebook_append_page(GTK_NOTEBOOK(m_Notebook), scrolled_window, gtk_label_new("Credits"));
	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
		GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_window), 
		GTK_SHADOW_ETCHED_IN);

	text_view = gtk_text_view_new_with_buffer(NULL);
	gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text_view), GTK_WRAP_WORD);
	gtk_text_view_set_editable(GTK_TEXT_VIEW(text_view), false);
	gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(text_view), false);
	gtk_text_buffer_set_text(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view)), 
		CreditsText, -1);
	gtk_container_add(GTK_CONTAINER(scrolled_window), text_view);

	gtk_widget_show_all(GTK_DIALOG(m_pDlg)->vbox);
}
コード例 #4
0
ファイル: Version.cpp プロジェクト: errorcodexero/balance
Version::Version( const char *ver )
{
    AddVersion(ver);
}