Пример #1
0
AboutWindow::AboutWindow()
{
    typedef std::vector<Glib::ustring>	UStringList;
    moApplicationSPtr application( moApplication::Instance() );

#if defined(DEMO_VERSION) || defined(BETA_VERSION)
	set_name( (application->GetName() + moWCString(" Demo")).c_str() );
#else
	set_name( application->GetName().c_str() );
#endif

	set_version( (application->GetVersion() + "." BUILD_VERSION_STRING).c_str() );
	set_website( WEBSITE_URL );
	set_translator_credits( gettext("translator-credits") );

	const char* comments =																																																										
		"A Dungeon Master's Initiative Manager\n\n"
#if defined(DEMO_VERSION)
		"This version of Turn Watcher is a demonstration version only.\n\n"
#elif defined(BETA_VERSION)
		"This version of Turn Watcher is a beta version for demonstration purposes only, "
		"and is intended solely for registered beta testers. "
		"If you are not a registered beta tester, please uninstall this application and contact "
		"Made to Order Software Corporation to purchase a licensed copy.\n\n"
#endif
		"Uses Gtk+ 2.15, Gtkmm 2.12, iconv, intl, PNG and zlib.\n"
		"Licensed under the GNU Public License v2.\n"
		"https://sourceforge.net/projects/turnwatcher/\n"
		;

// TODO: we need to fix the comment for demo versions to work properly
#if defined(DEMO_VERSION) || defined(BETA_VERSION)
	set_comments( comments );
#else
	set_comments( gettext(comments) );
#endif

    UStringList	authors;
	authors.push_back( "R. Douglas Barbieri" );
	authors.push_back( "Alexis Wilke" );
	set_authors( authors );

    UStringList artists;
	artists.push_back( "Nikolai Lokteff" );
	set_artists( artists );

	// no gettext() for this one, doesn't need translation
	set_copyright( "Copyright (c) 2005-2013 Made to Order Software Corporation" );

	//set_license( gettext(product_license) );

	moWCString logopath( Common::GetFullPathnameForImage( ABOUT_IMAGE ) );
	if( logopath != "" )
	{
		Glib::RefPtr<Gdk::Pixbuf> logo = Gdk::Pixbuf::create_from_file( logopath.c_str() );
		set_logo( logo );
	}
}
// glade/gtkbuilder needs this constructor
GscAboutDialog::GscAboutDialog(BaseObjectType* gtkcobj, const app_ui_res_ref_t& ref_ui)
		: AppUIResWidget<GscAboutDialog, false, Gtk::AboutDialog>(gtkcobj, ref_ui)
{
	// Connect callbacks

	// APP_GTKMM_CONNECT_VIRTUAL(delete_event);  // make sure the event handler is called

	APP_GTKMM_CONNECT_VIRTUAL(response);

	// Note: The dialogs have ESC accelerator attached by default.


	set_url_hook(sigc::mem_fun(*this, &GscAboutDialog::on_activate_url));
	set_email_hook(sigc::mem_fun(*this, &GscAboutDialog::on_activate_email));


	// Note: AboutDialog changed "name" property to "program-name" in gtk 2.12.
	// We don't set either, but rely on Glib::set_application_name() during init, which
	// works with both older and newer versions.

	set_version(VERSION);

	// set these properties here (after setting hooks) to make the links work.
	set_website("http://gsmartcontrol.berlios.de/");

	set_license(LicenseTextResData().get_string());

	// spammers go away
	set_copyright("Copyright (C) 2008 - 2009  Alexander Shaduri " "<ashaduri" "" "@" "" "" "gmail.com>");


	std::string authors_str = AuthorsTextResData().get_string();
	hz::string_any_to_unix(authors_str);

	std::list<Glib::ustring> authors;
	hz::string_split(authors_str, '\n', authors, true);

	for (std::list<Glib::ustring>::iterator iter = authors.begin(); iter != authors.end(); ++iter) {
		std::string s = *iter;
		hz::string_replace(s, " '@' ", "@");  // despammer
		hz::string_replace(s, " 'at' ", "@");  // despammer
		*iter = s;
	}

	set_authors(authors);

	set_documenters(authors);


// 	run();  // don't use run - it's difficult to exit it manually.
// 	show();  // shown by the caller to enable setting the parent window.
}
Пример #3
0
/**
 * Construct the (Singleton) about dialogue.
 *
 * @return a pointer to the (Singleton) about dialogue.
 */
Gtk::AboutDialog * About::create() {
	auto about = new Gtk::AboutDialog;
	std::vector<Glib::ustring> authors;
	authors.push_back("Michael Lamothe <*****@*****.**>");
	authors.push_back("Russel Winder <*****@*****.**>");
	//std::vector<Glib::ustring> documentors;
	about->set_authors(authors);
	about->set_comments(APPLICATION_NAME " is a Digital Television (DVB) viewer for GTK+3.");
	about->set_copyright(u8"Copyright © 2010–2011 Michael Lamothe <[email protected]\nCopyright © 2014, 2016	Russel Winder <*****@*****.**>");
	//about->set_documenters(documentors);
	about->set_license("This program is licenced under GNU General Public Licence (GPL) version 3.");
	about->set_logo(Gdk::Pixbuf::create_from_resource("/me-tv/images/me-tv.png"));
	about->set_name(APPLICATION_NAME);
	about->set_translator_credits("Translator Credits");
	about->set_version(VERSION);
	return about;
}
Пример #4
0
        MyAboutDialog(): Gtk::AboutDialog(),m_link(PACKAGE_URL,PACKAGE_URL){
            set_version(PACKAGE_VERSION);
            std::vector<Glib::ustring> authors;
            authors.push_back("Quentin Geissmann<*****@*****.**>");
            set_authors(authors);
            set_license("GPL_3_0");
            set_copyright("Quentin Geissmann 2012-2013");

            #if defined _WIN64 || defined _WIN32

            std::stringstream ss;
            ss<<ABOUT_TEXT<<std::endl<<PACKAGE_URL;
            set_comments(ss.str());
            #else
            set_website(PACKAGE_URL);
            set_website_label("Website");
            set_comments(ABOUT_TEXT);
            #endif

        set_logo(Gui_PixbufOpener::pixbufOpen(LOGO_IMG));

        }