コード例 #1
0
ファイル: ui.c プロジェクト: binarycodes/gcolor3
void about_dialog_open (void) {
	GtkWidget *about_dialog;
	gchar *license_trans;

	const gchar *authors[] = {"Jente Hidskes", NULL};
	const gchar *license[] = {
		N_("Gcolor3 is free software: you can redistribute it and/or modify "
		   "it under the terms of the GNU General Public License as published by "
		   "the Free Software Foundation, either version 3 of the License, or "
		   "(at your option) any later version."),
		N_("Gcolor3 is distributed in the hope that it will be useful "
		   "but WITHOUT ANY WARRANTY; without even the implied warranty of "
		   "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "
		   "GNU General Public License for more details."),
		N_("You should have received a copy of the GNU General Public License "
		   "along with this program. If not, see http://www.gnu.org/licenses/.")
	};
	license_trans = g_strjoin ("\n\n", _(license[0]), _(license[1]), _(license[2]), NULL);

	about_dialog = gtk_about_dialog_new ();
	gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (about_dialog), "Gcolor3");
	gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (about_dialog), _("A simple color selection dialog in GTK3")),
	gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (about_dialog), "Copyright \xc2\xa9 2013 Jente Hidskes");
	gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (about_dialog), license_trans);
	gtk_about_dialog_set_wrap_license (GTK_ABOUT_DIALOG (about_dialog), TRUE);
	gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about_dialog), authors);
	gtk_about_dialog_set_website_label (GTK_ABOUT_DIALOG (about_dialog), "GitHub");
	gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (about_dialog), "https://github.com/Unia/gcolor3");
	gtk_about_dialog_set_logo_icon_name (GTK_ABOUT_DIALOG (about_dialog), "gcolor2");

	g_signal_connect (GTK_DIALOG (about_dialog), "response", G_CALLBACK (about_dialog_close), NULL);

	gtk_widget_show (about_dialog);
	g_free(license_trans);
}
コード例 #2
0
ファイル: mate-about.c プロジェクト: philesel/mate-desktop
	void mate_about_run(void)
	{
		mate_about_dialog = (GtkAboutDialog*) gtk_about_dialog_new();

		gtk_window_set_default_icon_name(desktop_icon);

		GtkIconTheme* icon_theme = gtk_icon_theme_get_default();

		if (gtk_icon_theme_has_icon(icon_theme, icon))
		{
			gtk_about_dialog_set_logo_icon_name(mate_about_dialog, icon);
		}
		else
		{
			gtk_about_dialog_set_logo_icon_name(mate_about_dialog, desktop_icon);
		}

		// name
		#if GTK_CHECK_VERSION(3, 0, 0) || GTK_CHECK_VERSION(2, 12, 0)
			gtk_about_dialog_set_program_name(mate_about_dialog, gettext(program_name));
		#else
			gtk_about_dialog_set_name(mate_about_dialog, gettext(program_name));
		#endif

		// version
		gtk_about_dialog_set_version(mate_about_dialog, version);

		// credits and website
		gtk_about_dialog_set_copyright(mate_about_dialog, copyright);
		gtk_about_dialog_set_website(mate_about_dialog, website);

		/**
		 * This generate a random message.
		 * The comments index must not be more than comments_count - 1
		 */
		gtk_about_dialog_set_comments(mate_about_dialog, gettext(comments_array[g_random_int_range(0, comments_count - 1)]));

		gtk_about_dialog_set_authors(mate_about_dialog, authors);
		gtk_about_dialog_set_artists(mate_about_dialog, artists);
		gtk_about_dialog_set_documenters(mate_about_dialog, documenters);
		/* Translators should localize the following string which will be
		 * displayed in the about box to give credit to the translator(s). */
		gtk_about_dialog_set_translator_credits(mate_about_dialog, _("translator-credits"));

		#if GTK_CHECK_VERSION(3, 0, 0)
			gtk_about_dialog_set_license_type(mate_about_dialog, GTK_LICENSE_GPL_3_0);
			gtk_about_dialog_set_wrap_license(mate_about_dialog, TRUE);
		#endif

		#ifdef USE_UNIQUE
			unique_app_watch_window(mate_about_application, (GtkWindow*) mate_about_dialog);
		#elif GTK_CHECK_VERSION(3, 0, 0) && !defined(UNIQUE)
			gtk_window_set_application(GTK_WINDOW(mate_about_dialog), mate_about_application);
		#endif

		// start and destroy
		gtk_dialog_run((GtkDialog*) mate_about_dialog);
		gtk_widget_destroy((GtkWidget*) mate_about_dialog);
	}
コード例 #3
0
ファイル: dialogs.cpp プロジェクト: Tekden/MicroMusicPlayer
void display_about_dialog(GtkWidget *widget, gpointer *user_data) {

  /** Display the about window. **/

  GtkWidget *about_dialog = gtk_about_dialog_new() ;

  gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about_dialog), prgname.c_str()) ;

  gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about_dialog), VERSION) ;

  GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(PATH_TO_PRG_ICON, NULL);

  gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about_dialog), pixbuf) ;

  g_object_unref(pixbuf) ;

  gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about_dialog), COPYRIGHT) ;

  char *license_content ;

  g_file_get_contents(PATH_TO_GPLV3, &license_content, NULL, NULL);

  gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about_dialog), license_content) ;

  gtk_about_dialog_set_wrap_license(GTK_ABOUT_DIALOG(about_dialog), TRUE) ;

  gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about_dialog), PRGWEBURL) ;

  gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(about_dialog), PRGNAME "Website" ) ;

  gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about_dialog), "Thanks to my beloved mother, my family and to the doctors.\nStay away from drugs: drugs destroy your brain and your life.") ;

  const char *programmer[] = { AUTHOR " " MAIL, NULL } ;

  gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about_dialog),  programmer) ;

  const char *artist[] = { AUTHOR " " MAIL, NULL } ;

  gtk_about_dialog_set_artists( GTK_ABOUT_DIALOG(about_dialog), artist) ;

  const char *documenters[] = { AUTHOR " " MAIL, NULL } ;

  gtk_about_dialog_set_documenters( GTK_ABOUT_DIALOG(about_dialog), documenters) ;


  gtk_window_set_icon_from_file(GTK_WINDOW(about_dialog), PATH_TO_PRG_WIN_ICON, NULL) ;
  gtk_window_set_position(GTK_WINDOW(about_dialog), GTK_WIN_POS_CENTER_ALWAYS) ;
  gtk_window_set_resizable(GTK_WINDOW(about_dialog), FALSE);
  gtk_widget_set_size_request(about_dialog, -1, -1) ;
  gtk_window_set_destroy_with_parent(GTK_WINDOW(about_dialog), TRUE) ;

  gtk_window_set_transient_for(GTK_WINDOW(about_dialog), GTK_WINDOW(gui->window)) ;

  g_signal_connect_swapped(G_OBJECT(about_dialog), "response", G_CALLBACK (gtk_widget_destroy), about_dialog) ;

  gtk_dialog_run(GTK_DIALOG(about_dialog) ) ;

}
コード例 #4
0
void cb_about()
{
    GtkWidget *about;
    const gchar *authors[] = {
        "Author:",
        "Leandro A. F. Pereira",
        "",
        "Contributors:",
        "Agney Lopes Roth Ferraz",
        "SCSI support by Pascal F. Martin",
        "",
        "Based on work by:",
        "MD5 implementation by Colin Plumb (see md5.c for details)",
        "SHA1 implementation by Steve Raid (see sha1.c for details)",
        "Blowfish implementation by Paul Kocher (see blowfich.c for details)",
        "Raytracing benchmark by John Walker (see fbench.c for details)",
        "Some code partly based on x86cpucaps by Osamu Kayasono",
        "Vendor list based on GtkSysInfo by Pissens Sebastien",
        NULL
    };
    const gchar *artists[] = {
        "The GNOME Project",
        "Tango Project",
        NULL
    };

    about = gtk_about_dialog_new();
    gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about), "HardInfo");
    gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about), VERSION);
    gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about),
				   "Copyright \302\251 2003-2007 " 
				   "Leandro A. F. Pereira");
    gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about),
				  "System information and benchmark tool");
    gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about),
			      icon_cache_get_pixbuf("logo.png"));

    gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about),
       "HardInfo is free software; you can redistribute it and/or modify " \
       "it under the terms of the GNU General Public License as published by " \
       "the Free Software Foundation, version 2.\n\n"
       "This program is distributed in the hope that it will be useful, " \
       "but WITHOUT ANY WARRANTY; without even the implied warranty of " \
       "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the " \
       "GNU General Public License for more details.\n\n"
       "You should have received a copy of the GNU General Public License " \
       "along with this program; if not, write to the Free Software " \
       "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA");
#if GTK_CHECK_VERSION(2,8,0)
    gtk_about_dialog_set_wrap_license(GTK_ABOUT_DIALOG(about), TRUE);
#endif
    
    gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about), authors);
    gtk_about_dialog_set_artists(GTK_ABOUT_DIALOG(about), artists);

    gtk_dialog_run(GTK_DIALOG(about));
    gtk_widget_destroy(about);
}
コード例 #5
0
static void indicator_about()
{
  GtkWidget *dialog;
  gint response;

  dialog = gtk_about_dialog_new();

  gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(dialog),
                                    "IIJmio indicator");
  gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog),
                               PACKAGE_VERSION);
  gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog),
                                 "Copyright 2013 HAYASHI Kentaro");
  gtk_about_dialog_set_wrap_license(GTK_ABOUT_DIALOG(dialog), TRUE);
  gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog),
                               IIJMIO_INDICATOR_WEBSITE_URL);
  gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(dialog),
                                     IIJMIO_INDICATOR_WEBSITE_LABEL);

  gtk_widget_show_all(dialog);
  response = gtk_dialog_run(GTK_DIALOG(dialog));
  gtk_widget_destroy(dialog);
}
コード例 #6
0
ファイル: help.c プロジェクト: grisbi/grisbi
/**
 * Create and run an About dialog.
 *
 * \param bouton	Widget that triggered this handler (not used).
 * \param data		Not used.
 */
void a_propos ( GtkWidget *bouton, gint data )
{
    GtkWidget *about;
    GdkPixbuf *logo;
    gchar *chemin_logo ;

#define CSUFFIX "\n"

    const gchar *auteurs[] = {
_("Programming"),
"Benjamin Drieu <*****@*****.**>",
"Cedric Auger <*****@*****.**>",
"Francois Terrot <*****@*****.**>",
"Pierre Biava <*****@*****.**>",
"Mickaël Remars <*****@*****.**>",
"William Ollivier <*****@*****.**>",
"Rémi Cardona <*****@*****.**>",
"Ludovic Rousseau <*****@*****.**>"
"\n",

_("Packaging"),
"Alain Pichon <*****@*****.**>",
"Baluchiterium  <*****@*****.**>",
"Francois Terrot <*****@*****.**>",
"Gerald Niel <*****@*****.**>",
"Gilles Morel <*****@*****.**>",
"PMF <*****@*****.**>",
"Pascal Bleser <*****@*****.**>",
"Sylvain Glaize <*****@*****.**>",
"Thierry Thomas <*****@*****.**>",
"Vincent Marqueton <*****@*****.**>",
"William Ollivier <*****@*****.**>",
"Frederic Trouche <*****@*****.**>",
"\n",

_("Other"),
"Axel Rousseau <*****@*****.**>",
"Dominique Parisot <*****@*****.**>",
"Gerald Niel <*****@*****.**>", CSUFFIX,
NULL };

  gchar * translators = g_strconcat(
"Alain Portal <*****@*****.**>: ", _("English"), CSUFFIX,
"Benjamin Drieu <*****@*****.**>: ", _("English"), CSUFFIX,
"Carlos M. Cámara Mora <*****@*****.**>: ", _("Spanish"), CSUFFIX,
"Daniel Cartron <*****@*****.**>: ", _("English"), CSUFFIX,
"Edwin Huijsing <*****@*****.**>: ", _("Dutch"), CSUFFIX,
"Fabio Erculiani <*****@*****.**>: ", _("Italian"), CSUFFIX,
"Flavio Henrique Somensi <*****@*****.**>: ", _("Brazilian Portuguese"), CSUFFIX,
"Giorgio Mandolfo <*****@*****.**>: ", _("Italian"), CSUFFIX,
"Martin Stromberger <*****@*****.**>: ", _("German"), CSUFFIX,
"Ryszard Jeziorski <rjeziorski@eagleW>: ", _("Polish"), CSUFFIX,
"Achilleas Kaskamanidis <*****@*****.**>: ", _("Greek"), CSUFFIX,
NULL);

  const gchar *documenters [] = {
"Alain Portal <*****@*****.**>",
"Benjamin Drieu <*****@*****.**>",
"Daniel Cartron <*****@*****.**>",
"Jean-Luc Duflot <*****@*****.**>",
"Loic Breilloux <*****@*****.**>", CSUFFIX,
NULL};

  const gchar *artists [] = {
"Andre Pascual <*****@*****.**>",
"Jakub 'jimmac' Steiner <*****@*****.**>",
"Jean-Baptiste Renard <*****@*****.**>",
"Tuomas 'tigert' Kuosmanen <*****@*****.**>",
NULL};

  const gchar *license = "This program is free software; you can redistribute "
                        "it and/or modify it under the terms of the GNU General "
                        "Public License as published by the Free Software Foundation; "
                        "either version 2 of the License, or (at your option) any later "
                        "version.\n\nThis program is distributed in the hope that it "
                        "will be useful, but WITHOUT ANY WARRANTY; without even the "
                        "implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR "
                        "PURPOSE.  See the GNU General Public License for more details.\n\n"
                        "You should have received a copy of the GNU General Public License "
                        "along with this program; if not, write to the Free Software "
                        "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n\n"
                        "This product includes software developed by the OpenSSL Project "
                        "for use in the OpenSSL Toolkit.\n(http://www.openssl.org/)";

    /* Others info */
    gchar *comments;
    gchar *extra;
    gchar *version_to_string;

    extra = extra_support ( );
    version_to_string = get_gtk_run_version ( );

#ifdef DEBUG
    {
        gchar *compiled_time;

        compiled_time = gsb_date_get_compiled_time ( );
        comments = g_strconcat ( _("Personal finance manager for everyone\n"),
                        extra,
                        "Version de GTK : ",
                        version_to_string,
                        "\n",
                        _("This instance of Grisbi was compiled on\n"),
                        compiled_time,
                        " ",
                        _("at"),
                        " ",
                        __TIME__,
                        NULL );

        g_free ( compiled_time );
    }
#else
	comments = g_strconcat ( _("Personal finance manager for everyone\n"),
					extra,
					"Version de GTK : ",
					version_to_string,
					NULL );
#endif

    /* Logo */
    logo = gsb_select_icon_get_logo_pixbuf ( );
    if (logo == NULL )
    {
        chemin_logo = my_strdup ( LOGO_PATH );
        logo =  gdk_pixbuf_new_from_file ( chemin_logo, NULL );

        g_free ( chemin_logo );
    }

    about = gtk_about_dialog_new ( );
    gtk_about_dialog_set_program_name ( GTK_ABOUT_DIALOG (about), "Grisbi" );
    gtk_about_dialog_set_logo ( GTK_ABOUT_DIALOG (about), logo );
    gtk_about_dialog_set_comments ( GTK_ABOUT_DIALOG (about), comments );
    gtk_about_dialog_set_website ( GTK_ABOUT_DIALOG (about), "http://www.grisbi.org/");
    gtk_about_dialog_set_license ( GTK_ABOUT_DIALOG (about), license );
    gtk_about_dialog_set_wrap_license ( GTK_ABOUT_DIALOG (about), TRUE );
    gtk_about_dialog_set_version ( GTK_ABOUT_DIALOG (about), VERSION );
    gtk_about_dialog_set_artists ( GTK_ABOUT_DIALOG (about), artists );
    gtk_about_dialog_set_documenters ( GTK_ABOUT_DIALOG (about), documenters );
    gtk_about_dialog_set_authors ( GTK_ABOUT_DIALOG (about), auteurs );
    gtk_about_dialog_set_translator_credits ( GTK_ABOUT_DIALOG (about), translators );

    gtk_window_set_position ( GTK_WINDOW ( about ), GTK_WIN_POS_CENTER_ON_PARENT );
    gtk_window_set_resizable ( GTK_WINDOW ( about ), TRUE );
    gtk_window_set_modal ( GTK_WINDOW ( about ), TRUE );
    gtk_window_set_transient_for ( GTK_WINDOW ( about ), GTK_WINDOW ( grisbi_app_get_active_window (NULL) ) );

    g_free ( extra );
    g_free ( version_to_string );
    g_free ( comments );
    g_signal_connect ( G_OBJECT ( about ),
                        "activate-link",
                        G_CALLBACK ( url_clicked ),
                        NULL );

    gtk_dialog_run ( GTK_DIALOG (about)) ;

    gtk_widget_destroy (about);

    if (logo)
    g_object_unref (logo);

    return;
}
コード例 #7
0
ファイル: about.c プロジェクト: alessio/gmtp
/**
 * Display the About Dialog Box.
 */
void displayAbout(void) {

#if GTK_CHECK_VERSION(2,12,0)
    GtkWidget *dialog;
    const char *authors[] = {
        "Development",
        "Darran Kartaschew ([email protected])",
        "\nTranslations",
        "English - Darran Kartaschew",
        "English (Australia) - Darran Kartaschew",
        "Italian - Francesca Ciceri, Fabio Castelli (Muflone)",
        "French - 'Coug'",
        "German - Laurenz Kamp",
        "Spanish - Google Translate",
        "Danish - Cai Andersen",
        "Russian - PuppyRus Linux team",
        "Brazilian Portuguese - Rafael Ferreira",
        NULL
    };
    dialog = gtk_about_dialog_new();
    gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(dialog), PACKAGE_NAME);
    gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), PACKAGE_VERSION);
    gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog),
            "Copyright 2009-2015, Darran Kartaschew\nReleased under the BSD License");
    gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog),
            _("A simple MTP Client for Solaris 10\nand other UNIX / UNIX-like systems\n"));
    gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(dialog),
            "gMTP License\n"
            "------------\n\n"
            "Copyright (C) 2009-2015, Darran Kartaschew.\n"
            "All rights reserved.\n\n"
            "Redistribution and use in source and binary forms, with or without "
            "modification, are permitted provided that the following conditions are met:\n\n"
            "*  Redistributions of source code must retain the above copyright notice, "
            "this list of conditions and the following disclaimer.\n\n"
            "*  Redistributions in binary form must reproduce the above copyright notice, "
            "this list of conditions and the following disclaimer in the documentation "
            "and/or other materials provided with the distribution. \n\n"
            "*  Neither the name of \"gMTP Development Team\" nor the names of its  "
            "contributors may be used to endorse or promote products derived from this  "
            "software without specific prior written permission. \n\n"
            "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" "
            "AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE "
            "IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE "
            "ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE "
            "LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR "
            "CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF "
            "SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS "
            "INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN "
            "CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) "
            "ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE "
            "POSSIBILITY OF SUCH DAMAGE.");
    gtk_about_dialog_set_wrap_license(GTK_ABOUT_DIALOG(dialog), TRUE);
    gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog), "http://gmtp.sourceforge.net");
    gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), gdk_pixbuf_new_from_file(file_logo_png, NULL));
    gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(dialog), authors);
    gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(dialog), _("translator-credits"));
    gtk_dialog_run(GTK_DIALOG(dialog));
    gtk_widget_destroy(dialog);
#else
    GtkWidget *dialog, *vbox, *label, *label2, *label3, *label4, *label5, *image;
    gchar *version_string;
    gchar *gtk_version_string;

    dialog = gtk_dialog_new_with_buttons(_("About gMTP"), GTK_WINDOW(windowMain),
            (GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT),
            _("_Close"), GTK_RESPONSE_CLOSE,
            NULL);
    gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE);
    gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);

#if HAVE_GTK3 == 0
    gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
#endif
#if HAVE_GTK3 == 0
    vbox = gtk_vbox_new(FALSE, 5);
#else
    vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
#endif
    gtk_widget_show(vbox);
#if HAVE_GTK3 == 0
    gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), vbox);
#else
    gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), vbox);
#endif

    // Add in our icon.
    image = gtk_image_new_from_file(file_logo_png);
    gtk_widget_show(image);
    gtk_container_add(GTK_CONTAINER(vbox), image);

    version_string = g_strconcat("<span size=\"xx-large\"><b>", PACKAGE_NAME, " v", PACKAGE_VERSION, "</b></span>", NULL);

    label = gtk_label_new(version_string);
    gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
    gtk_widget_show(label);
    gtk_container_add(GTK_CONTAINER(vbox), label);

    label2 = gtk_label_new(_("A simple MTP Client for Solaris 10\nand other UNIX / UNIX-like systems\n"));
    gtk_label_set_use_markup(GTK_LABEL(label2), TRUE);
    gtk_label_set_justify(GTK_LABEL(label2), GTK_JUSTIFY_CENTER);
    gtk_misc_set_padding(GTK_MISC(label2), 5, 0);
    gtk_widget_show(label2);
    gtk_container_add(GTK_CONTAINER(vbox), label2);

    label5 = gtk_label_new("http://gmtp.sourceforge.net\n");
    gtk_label_set_use_markup(GTK_LABEL(label5), TRUE);
    gtk_widget_show(label5);
    gtk_container_add(GTK_CONTAINER(vbox), label5);

    label3 = gtk_label_new(_("<small>Copyright 2009-2014, Darran Kartaschew</small>\n<small>Released under the BSD License</small>"));
    gtk_label_set_use_markup(GTK_LABEL(label3), TRUE);
    gtk_widget_show(label3);
    gtk_container_add(GTK_CONTAINER(vbox), label3);

    gtk_version_string = g_strdup_printf("<small>Built with GTK v%d.%d.%d</small>\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
    label4 = gtk_label_new(gtk_version_string);
    gtk_label_set_use_markup(GTK_LABEL(label4), TRUE);
    gtk_widget_show(label4);
    gtk_container_add(GTK_CONTAINER(vbox), label4);

    gtk_dialog_run(GTK_DIALOG(dialog));
    gtk_widget_destroy(dialog);
    g_free(version_string);
    g_free(gtk_version_string);
#endif
}
コード例 #8
0
struct about gebr_gui_about_setup_ui(const gchar * program, const gchar * description)
{
	struct about about;
	const gchar *authors[] = {
		_("GêBR Core Team:"),
		" ",
		_("Coordinator"),
		"  Ricardo Biloti <*****@*****.**>",
                "  Ph.D. Applied Mathematics",
                "  State University of Campinas, Brazil",
		" ",
                _("Development manager"),
		"  Fabrício Matheus Gonçalves <*****@*****.**>",
                "  B.Sc. Computer Engineering",
                " ",
		_("Developers"),
		"  Eric Keiji <*****@*****.**>",
		"  Ian Liu Rodrigues <*****@*****.**>",
		"  Igor Henrique Soares Nunes <*****@*****.**>",
		"  Jorge Pizzolatto <*****@*****.**>",
		"  Júlia Koury Marques <*****@*****.**>",
		"  Vinícius Oliveira Querência <*****@*****.**>",
		" ",
		_("Consultants"),
		"  Bráulio Oliveira",
		"  Eduardo Filpo, Petrobras",
		"  Fernando Roxo, Prosismo",
		"  Luis Alberto D'Afonseca, CGG",
		"  Rodrigo Portugal, Schlumberger",
                " ",
                _("Former members"),
		"  Alexandre Baaklini",
		"  Davi Clemente",
		"  Fábio Azevedo",
		"  Gabriel Sobral",
		"  Giuliano Roberto Pinheiro",
		"  Priscila Moraes",
		"  Renan William Giarola Miranda",               
		"  Rodrigo Morelatto",
		NULL
	};

#if !GTK_CHECK_VERSION(2,20,0)
	// Instala a funcao que nada faz. Este bug ja foi
	// corrigido no trunk do Gtk+, eu acredito.
	gtk_about_dialog_set_url_hook(__dummy__, NULL, NULL);
#endif

	about.dialog = gtk_about_dialog_new();

	gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about.dialog), program);
	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about.dialog), gebr_version());
	gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about.dialog), gebr_gui_pixmaps_gebr_logo());
	gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about.dialog), _("GêBR Core Team"));

	gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about.dialog),
				     _("Copyright (C) 2007-2012 GêBR core team (http://www.gebrproject.com/)\n" "\n"
				       "This program is free software: you can redistribute it and/or modify "
				       "it under the terms of the GNU General Public License as published by "
				       "the Free Software Foundation, either version 3 of the License, or "
				       "(at your option) any later version.\n" "\n"
				       "This program is distributed in the hope that it will be useful, "
				       "but WITHOUT ANY WARRANTY; without even the implied warranty of "
				       "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the "
				       "GNU General Public License for more details.\n" "\n"
				       "You should have received a copy of the GNU General Public License "
				       "along with this program.  If not, see <http://www.gnu.org/licenses/>.\n" "\n"
				       "In Brazil, this program is under protection against unauthorized usage, "
				       "in accordance to brazilian laws #9609, Feb 19, 1998, #2556, "
				       "Apr 20, 1998, and #9610, Feb 19, 1998, and is registered in "
				       "Instituto Nacional da Propriedade Industrial (INPI) under number 70156."));
	gtk_about_dialog_set_wrap_license(GTK_ABOUT_DIALOG(about.dialog), TRUE);

	gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about.dialog), "http://www.gebrproject.com/");
	gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(about.dialog), _("GêBR Home page"));
	gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about.dialog), authors);
	gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about.dialog), description);

	g_signal_connect (about.dialog, "close",
			  G_CALLBACK (gtk_widget_hide), about.dialog);

	g_signal_connect (about.dialog, "response",
			  G_CALLBACK (gtk_widget_hide), about.dialog);

	g_signal_connect(about.dialog, "delete-event",
			 G_CALLBACK (gtk_widget_hide_on_delete), NULL);

	return about;
}
コード例 #9
0
ファイル: about.c プロジェクト: Shayan-To/bluefish
static void
about_dialog_create(GtkAction * action, gpointer user_data)
{
	Tbfwin *bfwin = BFWIN(user_data);
	GdkPixbuf *logo;

	const gchar *artists[] = {
		"Dave Lyon",
		NULL
	};

	const gchar *authors[] = {
		"Olivier Sessink <*****@*****.**> (Project leader)",
		"Andrius <*****@*****.**>",
		"Jim Hayward <*****@*****.**>",
		"Daniel Leidert <*****@*****.**>",
		"Shawn Novak <*****@*****.**>",
		"Frédéric Falsetti <*****@*****.**>",
		_("\nDevelopers of previous releases:"),
		"Alastair Porter <*****@*****.**>",
		"Antti-Juhani Kaijanaho",
		"Bo Forslund",
		"Chris Mazuc",
		"Christian Tellefsen <*****@*****.**>",
		"David Arno",
		"Eugene Morenko <*****@*****.**>",
		"Gero Takke",
		"Neil Millar",
		"Oskar Świda <*****@*****.**>",
		"Pablo De Napoli",
		"Rasmus Toftdahl Olesen <*****@*****.**>",
		"Roland Steinbach <*****@*****.**>",
		"Santiago Capel Torres",
		"Yanike Mann <*****@*****.**>",
		_("\nPackage maintainers:"),
		"Debian: Daniel Leidert <*****@*****.**>",
		"Fink: Michèle Garoche <*****@*****.**>, Kevin Horton <*****@*****.**>",
		"Gentoo: Hanno Böck <*****@*****.**>",
		"Mandrake: Todd Lyons <*****@*****.**>",
		"Redhat: Matthias Haase <*****@*****.**>",
		"Windows: Shawn Novak <*****@*****.**>, Daniel Leidert <*****@*****.**>",
		_("\nIf you know of anyone missing from this list,\nplease let us know at:"),
		_("[email protected] <*****@*****.**>"),
		_("\nThanks to all who helped make this software available.\n"),
		NULL
	};

	const gchar *documenters[] = {
		"Scott White <*****@*****.**>",
		"Michèle Garoche <*****@*****.**>",
		"Anita Lewis <*****@*****.**>",
		"Alastair Porter <*****@*****.**>",
		"Daniel Blair <*****@*****.**>",
		"Olivier Sessink <*****@*****.**>",
		"Denny Reeh\n",
		NULL
	};

	const gchar *copyright = "Copyright \xc2\xa9 1998-2015 Olivier Sessink and others.\n";

	/* wrap the license here,
	 * the "wrap-license" property is only available with GTK >= 2.8
	 */
	const gchar *license =
		"This program is free software; you can redistribute it and/or modify it "
		"under the terms of the GNU General Public License as published by "
		"the Free Software Foundation; either version 3 of the License, or "
		"(at your option) any later version.\n"
		"\n"
		"This program is distributed in the hope that it will be useful, "
		"but WITHOUT ANY WARRANTY; without even the implied warranty of "
		"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "
		"GNU General Public License for more details.\n"
		"\n"
		"You should have received a copy of the GNU General Public License "
		"along with this program.  If not, see http://www.gnu.org/licenses/ .";

	const gchar *comments =
		_
		("An open-source editor for experienced web designers and programmers, supporting many programming and markup languages, but focusing on creating dynamic and interactive websites.");

	/* Translators: This is a special message that shouldn't be translated
	 * literally. It is used in the about box to give credits to
	 * the translators.
	 * Thus, you should translate it to your name and email address and
	 * the name and email address of all translator who have contributed
	 * to this translation (in general: this special locale). Please
	 * use a separate line for every translator ending with a newlines (\n).
	 */
	const gchar *translator_credits = _("translator-credits");

	{
		GError *error = NULL;
		logo = gdk_pixbuf_new_from_file(BLUEFISH_SPLASH_FILENAME, &error);
		if (error) {
			g_print("ERROR while loading splash screen: %s\n", error->message);
			g_error_free(error);
		}
	}

#if !GTK_CHECK_VERSION(3, 0, 0)
	gtk_about_dialog_set_url_hook(about_activate_url, NULL, NULL);
#endif /* gtk3 */
#ifndef MAC_INTEGRATION
	gtk_show_about_dialog(GTK_WINDOW(bfwin->main_window), "logo", logo, "name", PACKAGE,
#ifdef SVN_REVISION
						  "version", VERSION " rev" SVN_REVISION,
#else	/* SVN_REVISION */
						  "version", VERSION,
#endif	/* SVN_REVISION */
						  "comments", comments,
						  "copyright", copyright,
						  "license", license,
						  "website", "http://bluefish.openoffice.nl",
						  "authors", authors,
						  "artists", artists,
						  "documenters", documenters,
						  "translator_credits", translator_credits,
						  "wrap-license", TRUE,
						  NULL);

	if (logo)
		g_object_unref(logo);
#else
/* gtk_show_about_dialog hides window when it is closed (no other choices). On OSX this hidden dead window can be accessed from WIndow menu, so we have
to construct about dialog manually and destroy it after use */
	GtkWidget *dialog;
	dialog = gtk_about_dialog_new();
	gtk_window_set_transient_for(GTK_WINDOW( dialog ), GTK_WINDOW(bfwin->main_window));
	gtk_window_set_destroy_with_parent (GTK_WINDOW(dialog), TRUE);
	g_signal_connect (dialog, "activate-link", G_CALLBACK (activate_link_lcb), NULL);
         /* Set it's properties */
	gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(dialog), "Bluefish" );
	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog),
#ifdef SVN_REVISION
						  VERSION " rev" SVN_REVISION
#else	/* SVN_REVISION */
					  VERSION
#endif	/* SVN_REVISION */
	 );
	gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog), copyright);
	gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog), "http://bluefish.openoffice.nl" );
	gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(dialog), authors);
	gtk_about_dialog_set_artists(GTK_ABOUT_DIALOG(dialog), artists);
	gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG(dialog), documenters);
	gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(dialog), license);
	gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog), comments);
	gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(dialog), translator_credits);
	gtk_about_dialog_set_wrap_license(GTK_ABOUT_DIALOG(dialog), TRUE);
	gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), logo);
	g_object_unref(logo), logo=NULL;
    /* Run dialog and destroy it after it returns. */
    gtk_dialog_run( GTK_DIALOG(dialog) );
    gtk_widget_destroy(GTK_WIDGET(dialog));
#endif /* MAC_INTEGRATION */
}