Пример #1
0
GtkWidget*
create_aboutdialog1 (void)
{
  GtkWidget *aboutdialog1;
  const gchar *authors[] = {
    "Mean",
    "JSC",
    "Anish Mistry",
    "Jakub Misak",
    "Kuisathaverat \t",
    "And all the others.",
    NULL
  };
  const gchar *artists[] = {
    "Nestor Di",
    "Muddy",
    NULL
  };

  GdkPixbuf *aboutdialog1_logo_pixbuf;
  // MEANX : PATCH SVN VERSION
  char subversion[1024];

  if(!ADM_SUBVERSION)
	strcpy(subversion,VERSION);
  else
	sprintf(subversion,"%s (r%04u):",VERSION,ADM_SUBVERSION);

  aboutdialog1 = gtk_about_dialog_new ();
  gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (aboutdialog1), subversion);
// /MEANX
  gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (aboutdialog1), QT_TR_NOOP("Avidemux"));
  gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (aboutdialog1), QT_TR_NOOP("\302\251 2001-2007 Mean"));
  gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (aboutdialog1), QT_TR_NOOP("Multiplatform video editor"));
  gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (aboutdialog1), QT_TR_NOOP("Avidemux is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License version 2\nas published by the Free Software Foundation.\n\n\t\t    GNU GENERAL PUBLIC LICENSE\n\t\t       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Foundation, Inc.\n                       51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n\t\t\t    Preamble\n\n  The licenses for most software are designed to take away your\nfreedom to share and change it.  By contrast, the GNU General Public\nLicense is intended to guarantee your freedom to share and change free\nsoftware--to make sure the software is free for all its users.  This\nGeneral Public License applies to most of the Free Software\nFoundation's software and to any other program whose authors commit to\nusing it.  (Some other Free Software Foundation software is covered by\nthe GNU Library General Public License instead.)  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthis service if you wish), that you receive source code or can get it\nif you want it, that you can change the software or use pieces of it\nin new free programs; and that you know you can do these things.\n\n  To protect your rights, we need to make restrictions that forbid\nanyone to deny you these rights or to ask you to surrender the rights.\nThese restrictions translate to certain responsibilities for you if you\ndistribute copies of the software, or if you modify it.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must give the recipients all the rights that\nyou have.  You must make sure that they, too, receive or can get the\nsource code.  And you must show them these terms so they know their\nrights.\n\n  We protect your rights with two steps: (1) copyright the software, and\n(2) offer you this license which gives you legal permission to copy,\ndistribute and/or modify the software.\n\n  Also, for each author's protection and ours, we want to make certain\nthat everyone understands that there is no warranty for this free\nsoftware.  If the software is modified by someone else and passed on, we\nwant its recipients to know that what they have is not the original, so\nthat any problems introduced by others will not reflect on the original\nauthors' reputations.\n\n  Finally, any free program is threatened constantly by software\npatents.  We wish to avoid the danger that redistributors of a free\nprogram will individually obtain patent licenses, in effect making the\nprogram proprietary.  To prevent this, we have made it clear that any\npatent must be licensed for everyone's free use or not licensed at all.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n\t\t    GNU GENERAL PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. This License applies to any program or other work which contains\na notice placed by the copyright holder saying it may be distributed\nunder the terms of this General Public License.  The \"Program\", below,\nrefers to any such program or work, and a \"work based on the Program\"\nmeans either the Program or any derivative work under copyright law:\nthat is to say, a work containing the Program or a portion of it,\neither verbatim or with modifications and/or translated into another\nlanguage.  (Hereinafter, translation is included without limitation in\nthe term \"modification\".)  Each licensee is addressed as \"you\".\n\nActivities other than copying, distribution and modification are not\ncovered by this License; they are outside its scope.  The act of\nrunning the Program is not restricted, and the output from the Program\nis covered only if its contents constitute a work based on the\nProgram (independent of having been made by running the Program).\nWhether that is true depends on what the Program does.\n\n  1. You may copy and distribute verbatim copies of the Program's\nsource code as you receive it, in any medium, provided that you\nconspicuously and appropriately publish on each copy an appropriate\ncopyright notice and disclaimer of warranty; keep intact all the\nnotices that refer to this License and to the absence of any warranty;\nand give any other recipients of the Program a copy of this License\nalong with the Program.\n\nYou may charge a fee for the physical act of transferring a copy, and\nyou may at your option offer warranty protection in exchange for a fee.\n\n  2. You may modify your copy or copies of the Program or any portion\nof it, thus forming a work based on the Program, and copy and\ndistribute such modifications or work under the terms of Section 1\nabove, provided that you also meet all of these conditions:\n\n    a) You must cause the modified files to carry prominent notices\n    stating that you changed the files and the date of any change.\n\n    b) You must cause any work that you distribute or publish, that in\n    whole or in part contains or is derived from the Program or any\n    part thereof, to be licensed as a whole at no charge to all third\n    parties under the terms of this License.\n\n    c) If the modified program normally reads commands interactively\n    when run, you must cause it, when started running for such\n    interactive use in the most ordinary way, to print or display an\n    announcement including an appropriate copyright notice and a\n    notice that there is no warranty (or else, saying that you provide\n    a warranty) and that users may redistribute the program under\n    these conditions, and telling the user how to view a copy of this\n    License.  (Exception: if the Program itself is interactive but\n    does not normally print such an announcement, your work based on\n    the Program is not required to print an announcement.)\n\nThese requirements apply to the modified work as a whole.  If\nidentifiable sections of that work are not derived from the Program,\nand can be reasonably considered independent and separate works in\nthemselves, then this License, and its terms, do not apply to those\nsections when you distribute them as separate works.  But when you\ndistribute the same sections as part of a whole which is a work based\non the Program, the distribution of the whole must be on the terms of\nthis License, whose permissions for other licensees extend to the\nentire whole, and thus to each and every part regardless of who wrote it.\n\nThus, it is not the intent of this section to claim rights or contest\nyour rights to work written entirely by you; rather, the intent is to\nexercise the right to control the distribution of derivative or\ncollective works based on the Program.\n\nIn addition, mere aggregation of another work not based on the Program\nwith the Program (or with a work based on the Program) on a volume of\na storage or distribution medium does not bring the other work under\nthe scope of this License.\n\n  3. You may copy and distribute the Program (or a work based on it,\nunder Section 2) in object code or executable form under the terms of\nSections 1 and 2 above provided that you also do one of the following:\n\n    a) Accompany it with the complete corresponding machine-readable\n    source code, which must be distributed under the terms of Sections\n    1 and 2 above on a medium customarily used for software interchange; or,\n\n    b) Accompany it with a written offer, valid for at least three\n    years, to give any third party, for a charge no more than your\n    cost of physically performing source distribution, a complete\n    machine-readable copy of the corresponding source code, to be\n    distributed under the terms of Sections 1 and 2 above on a medium\n    customarily used for software interchange; or,\n\n    c) Accompany it with the information you received as to the offer\n    to distribute corresponding source code.  (This alternative is\n    allowed only for noncommercial distribution and only if you\n    received the program in object code or executable form with such\n    an offer, in accord with Subsection b above.)\n\nThe source code for a work means the preferred form of the work for\nmaking modifications to it.  For an executable work, complete source\ncode means all the source code for all modules it contains, plus any\nassociated interface definition files, plus the scripts used to\ncontrol compilation and installation of the executable.  However, as a\nspecial exception, the source code distributed need not include\nanything that is normally distributed (in either source or binary\nform) with the major components (compiler, kernel, and so on) of the\noperating system on which the executable runs, unless that component\nitself accompanies the executable.\n\nIf distribution of executable or object code is made by offering\naccess to copy from a designated place, then offering equivalent\naccess to copy the source code from the same place counts as\ndistribution of the source code, even though third parties are not\ncompelled to copy the source along with the object code.\n\n  4. You may not copy, modify, sublicense, or distribute the Program\nexcept as expressly provided under this License.  Any attempt\notherwise to copy, modify, sublicense or distribute the Program is\nvoid, and will automatically terminate your rights under this License.\nHowever, parties who have received copies, or rights, from you under\nthis License will not have their licenses terminated so long as such\nparties remain in full compliance.\n\n  5. You are not required to accept this License, since you have not\nsigned it.  However, nothing else grants you permission to modify or\ndistribute the Program or its derivative works.  These actions are\nprohibited by law if you do not accept this License.  Therefore, by\nmodifying or distributing the Program (or any work based on the\nProgram), you indicate your acceptance of this License to do so, and\nall its terms and conditions for copying, distributing or modifying\nthe Program or works based on it.\n\n  6. Each time you redistribute the Program (or any work based on the\nProgram), the recipient automatically receives a license from the\noriginal licensor to copy, distribute or modify the Program subject to\nthese terms and conditions.  You may not impose any further\nrestrictions on the recipients' exercise of the rights granted herein.\nYou are not responsible for enforcing compliance by third parties to\nthis License.\n\n  7. If, as a consequence of a court judgment or allegation of patent\ninfringement or for any other reason (not limited to patent issues),\nconditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot\ndistribute so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you\nmay not distribute the Program at all.  For example, if a patent\nlicense would not permit royalty-free redistribution of the Program by\nall those who receive copies directly or indirectly through you, then\nthe only way you could satisfy both it and this License would be to\nrefrain entirely from distribution of the Program.\n\nIf any portion of this section is held invalid or unenforceable under\nany particular circumstance, the balance of the section is intended to\napply and the section as a whole is intended to apply in other\ncircumstances.\n\nIt is not the purpose of this section to induce you to infringe any\npatents or other property right claims or to contest validity of any\nsuch claims; this section has the sole purpose of protecting the\nintegrity of the free software distribution system, which is\nimplemented by public license practices.  Many people have made\ngenerous contributions to the wide range of software distributed\nthrough that system in reliance on consistent application of that\nsystem; it is up to the author/donor to decide if he or she is willing\nto distribute software through any other system and a licensee cannot\nimpose that choice.\n\nThis section is intended to make thoroughly clear what is believed to\nbe a consequence of the rest of this License.\n\n  8. If the distribution and/or use of the Program is restricted in\ncertain countries either by patents or by copyrighted interfaces, the\noriginal copyright holder who places the Program under this License\nmay add an explicit geographical distribution limitation excluding\nthose countries, so that distribution is permitted only in or among\ncountries not thus excluded.  In such case, this License incorporates\nthe limitation as if written in the body of this License.\n\n  9. The Free Software Foundation may publish revised and/or new versions\nof the General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\nEach version is given a distinguishing version number.  If the Program\nspecifies a version number of this License which applies to it and \"any\nlater version\", you have the option of following the terms and conditions\neither of that version or of any later version published by the Free\nSoftware Foundation.  If the Program does not specify a version number of\nthis License, you may choose any version ever published by the Free Software\nFoundation.\n\n  10. If you wish to incorporate parts of the Program into other free\nprograms whose distribution conditions are different, write to the author\nto ask for permission.  For software which is copyrighted by the Free\nSoftware Foundation, write to the Free Software Foundation; we sometimes\nmake exceptions for this.  Our decision will be guided by the two goals\nof preserving the free status of all derivatives of our free software and\nof promoting the sharing and reuse of software generally.\n\n\t\t\t    NO WARRANTY\n\n  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\nFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN\nOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\nPROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\nOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS\nTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE\nPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\nREPAIR OR CORRECTION.\n\n  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\nREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\nINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\nOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\nTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\nYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\nPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGES.\n\n\t\t     END OF TERMS AND CONDITIONS\n\n\t    How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nconvey the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software; you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation; either version 2 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n\n\nAlso add information on how to contact you by electronic and paper mail.\n\nIf the program is interactive, make it output a short notice like this\nwhen it starts in an interactive mode:\n\n    Gnomovision version 69, Copyright (C) year name of author\n    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, the commands you use may\nbe called something other than `show w' and `show c'; they could even be\nmouse-clicks or menu items--whatever suits your program.\n\nYou should also get your employer (if you work as a programmer) or your\nschool, if any, to sign a \"copyright disclaimer\" for the program, if\nnecessary.  Here is a sample; alter the names:\n\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\n  `Gnomovision' (which makes passes at compilers) written by James Hacker.\n\n  <signature of Ty Coon>, 1 April 1989\n  Ty Coon, President of Vice\n\nThis General Public License does not permit incorporating your program into\nproprietary programs.  If your program is a subroutine library, you may\nconsider it more useful to permit linking proprietary applications with the\nlibrary.  If this is what you want to do, use the GNU Library General\nPublic License instead of this License."));
  gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (aboutdialog1), "http://www.avidemux.org");
  gtk_about_dialog_set_website_label (GTK_ABOUT_DIALOG (aboutdialog1), QT_TR_NOOP("http://www.avidemux.org"));
  gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (aboutdialog1), authors);
  gtk_about_dialog_set_artists (GTK_ABOUT_DIALOG (aboutdialog1), artists);
  gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (aboutdialog1), QT_TR_NOOP("translator-credits"));
  aboutdialog1_logo_pixbuf = create_pixbuf ("avidemux_icon.xpm");
  gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (aboutdialog1), aboutdialog1_logo_pixbuf);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (aboutdialog1, aboutdialog1, "aboutdialog1");

  return aboutdialog1;
}
Пример #2
0
void
dialog_about (void)
{
	GdkPixbuf *logo;

	const gchar *authors[] = {
		"Richard Hult",
		"Margarita Manterola",
		"Andres de Barbara",
		"Gustavo M. Pereyra",
		"Maximiliano Curia",
		"Ricardo Markiewicz",
		"Marc Lorber",
		NULL
	};

	const char *docs[] = {
		"Ricardo Markiewicz <*****@*****.**> (es)",
		"Jordi Mallach <*****@*****.**> (ca)",
		"Marc Lorber <*****@*****.**> (en)",
		NULL
	};

	const gchar *copy = _("(c) 2009-2012 Marc Lorber 2003-2006 LUGFi\n(c) 1999-2001 Richard Hult");

	// Allow only one about box at a time.
	if (about) {
		gdk_window_raise (gtk_widget_get_window (about));
		return;
	}

	logo = gdk_pixbuf_new_from_xpm_data ((const char **) logo_xpm);
	about = gtk_about_dialog_new ();
	gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (about), "Oregano");
	gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (about), VERSION);
	gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (about), copy);
	gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (about), 
		_("Schematic capture and circuit simulation.\n"));
	gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (about), 
		"GNU General Public License");
	gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (about), 
	    "https://github.com/marc-lorber/oregano");
	gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (about), authors);
	gtk_about_dialog_set_documenters (GTK_ABOUT_DIALOG (about), docs);
	gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (about), logo);
	gtk_dialog_run (GTK_DIALOG (about));
	gtk_widget_destroy (about);
}
Пример #3
0
void
display_about (GtkMenuItem *menuitem, gpointer user_data)
{
	GtkWidget *AboutWidget;
	
	AboutWidget = gtk_about_dialog_new();
	gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(AboutWidget), prog_name);
	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(AboutWidget), version);
	gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(AboutWidget), authors);
	gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(AboutWidget), copyright);
	gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(AboutWidget), comments);
	gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(AboutWidget), license);
	gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(AboutWidget), website);
	gtk_dialog_run(GTK_DIALOG(AboutWidget));
	gtk_widget_destroy(AboutWidget);
}
Пример #4
0
static void menu_about (void)
{
    GError *error = NULL;
    GIOChannel *channel = NULL;

    channel = g_io_channel_new_file ("licence.txt", "r", &error);
    if (channel != NULL)
    {
	char *text = NULL;

	if (g_io_channel_read_to_end (channel, &text, 0, &error) ==
		G_IO_STATUS_NORMAL)
	{
	    GtkWidget *p_dialog = gtk_about_dialog_new ();

	    gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (p_dialog),
		    "Exemple d'utilisation de GtkUIManager");
	    gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (p_dialog),
		    "Nicolas JOSEPH");
	    gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (p_dialog), text);
	    gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (p_dialog),
		    "http://nicolasj.developpez.com");
	    gtk_dialog_run (GTK_DIALOG (p_dialog));
	    g_free (text);
	    if (g_io_channel_shutdown (channel, FALSE, &error) ==
		    G_IO_STATUS_ERROR)
	    {
		GtkWidget *p_dialog = NULL;


		gtk_dialog_run (GTK_DIALOG (p_dialog));
		gtk_widget_destroy (p_dialog);
	    }
	}
    }
    if (error != NULL)
    {
	GtkWidget *p_dialog = NULL;

	gtk_dialog_run (GTK_DIALOG (p_dialog));
	gtk_widget_destroy (p_dialog);
    }
    return;
}
Пример #5
0
/*
函数名:		void show_about(void);
参数:		空
函数描述:	软件帮助信息
返回值:          空
*/
void show_about(void)
{
	const gchar const *rc_authors[] = {"钟华刚",NULL,NULL};
	const gchar const *rc_documenters[] = {"张珩",NULL,NULL};
	const gchar const *rc_artists[] = {"董俊杰",NULL,NULL};
	GtkWidget *dialog = gtk_about_dialog_new();
	gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(dialog), "NEU_MSN");
	gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(dialog), "NEU_MSN");
	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog),"V-2.0");
	gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog),"copyright@NEU team 6");
	gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(dialog),"NEU_MSN是自由软件;\n您可以重新发布它;\nNEU_MSN是一款局域网聊天软件,\n提供基于Internet标准的信息收发功能; \nNEU_MSN V-2.0正式版致力于为您提供更为便捷舒适的NEU_MSN使用体验;\n本软件完全免费,欢迎您使用");
	gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(dialog),(const gchar **)rc_authors);
	gtk_about_dialog_set_artists(GTK_ABOUT_DIALOG(dialog),(const gchar **)rc_documenters);
	gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG(dialog),(const gchar **)rc_artists);
	gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(dialog),"ANGRY BIRD");
	gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog), "NEU_MSN是一个局域网聊天软件.");
	gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog), "http://www.neusoft.com");
	gtk_dialog_run(GTK_DIALOG (dialog));
	gtk_widget_destroy(dialog);
}
Пример #6
0
void on_about_activate(GtkImageMenuItem* widget, gpointer data) {
  GError* err = NULL;
  GdkPixbuf* icon = gdk_pixbuf_new_from_file_at_size
    (DATADIR"/qwertickle.png", 100, 100, &err);
  const gchar* authors[] = { "Wei-Ning Huang\n<*****@*****.**>\n", NULL};

  GtkAboutDialog* dialog = GTK_ABOUT_DIALOG(gtk_about_dialog_new());
  gtk_window_set_icon_from_file(
      GTK_WINDOW(dialog), DATADIR"/qwertickle.png", &err);
  gtk_about_dialog_set_authors(dialog, authors);
  gtk_about_dialog_set_program_name(dialog, PACKAGE_NAME);
  gtk_about_dialog_set_version(dialog, PACKAGE_VERSION);
  gtk_about_dialog_set_website(dialog, PACKAGE_URL);
  gtk_about_dialog_set_copyright(dialog, PACKAGE_COPYRIGHT);
  gtk_about_dialog_set_license(dialog, PACKAGE_LICENSE);
  gtk_about_dialog_set_logo(dialog, icon);
  gtk_about_dialog_set_comments(dialog, PACKAGE_COMMENTS);
  gtk_dialog_run(GTK_DIALOG(dialog));
  gtk_widget_destroy(GTK_WIDGET(dialog));
}
Пример #7
0
void about_dialog ()
{
  g_message ("about...");
  GtkWidget *dialog;
  const gchar *authors[] = { "*****@*****.**", NULL };
  const gchar *documenters[] = { "http://www.mimuw.edu.pl/~jbednarz/AviraTrial/antivir-server-prof-3.1.3.5-2/contrib/applet/avira-guard-applet.c","https://projects.gnome.org/ORBit2/appletstutorial.html", NULL };
  dialog = gtk_about_dialog_new ();
  //gtk_widget_set_size_request(GTK_WIDGET(window),200,100);
  gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (dialog), NULL);
  gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (dialog), "网速监控");
  gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (dialog), "1.0");
  gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (dialog), "Copyright © 2016 黄颖");
  gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (dialog), "在任务栏显示网速");
  gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog), "http://sonichy.hjwhp.ghco.info");
  gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (dialog), authors);
  gtk_about_dialog_set_documenters (GTK_ABOUT_DIALOG (dialog), documenters);
  gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (dialog), "黄颖\nsonichy");
  gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (dialog), "GNU GPL");
  gtk_dialog_run (GTK_DIALOG (dialog));
  gtk_widget_destroy (dialog);
}
Пример #8
0
/**
 * 创建关于对话框.
 */
GtkWidget *HelpDialog::CreateAboutDialog()
{
        const char *authors[] = {
                _("Jally <*****@*****.**>"),
                _("ManPT <*****@*****.**>"),
                NULL
        };
        const char *artists[] = {
                _("Jally <*****@*****.**>"),
                _("LiWeijian <*****@*****.**>"),
                _("ManPT <*****@*****.**>"),
                NULL
        };
        const char *translators = _("alick <*****@*****.**>\n"
                                     "ManPT <*****@*****.**>");
        GtkWidget *dialog;

        dialog = gtk_about_dialog_new();
        gtk_about_dialog_set_email_hook(
                 GtkAboutDialogActivateLinkFunc(DialogOpenEmail), NULL, NULL);
        gtk_about_dialog_set_url_hook(
                 GtkAboutDialogActivateLinkFunc(DialogOpenUrl), NULL, NULL);
        gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(dialog), _("iptux"));
        gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), VERSION);
        gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog),
                                         "Copyright © 2008-2009 by Jally");
        gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog),
                                         _("A GTK+ based LAN Messenger."));
        gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog),
                                         "http://code.google.com/p/iptux/");
        gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(dialog), "GPL 2+");
        gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(dialog), authors);
        gtk_about_dialog_set_artists(GTK_ABOUT_DIALOG(dialog), artists);
        gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(dialog), translators);
        gtk_about_dialog_set_logo_icon_name(GTK_ABOUT_DIALOG(dialog), "ip-tux");

        return dialog;
}
Пример #9
0
extern "C" int doAbout(gpointer data)
{
	plugData*		plugdata=(plugData*)data;
	char*			licencepath;
	const char		copyright[] ="Copyright \xc2\xa9 2014 K.D.Hedger";
	char*			licence;
	GtkAboutDialog*	about;
	char*			translators;

	setTextDomain(true,plugdata);

	const char*		aboutboxstring=gettext("File Browser - Add's a simple file browser to the left pane");

	asprintf(&licencepath,"%s/docs/gpl-3.0.txt",plugdata->dataDir);
	asprintf(&translators,"%s:\nNguyen Thanh Tung <*****@*****.**>",gettext("French Translation"));

	g_file_get_contents(licencepath,&licence,NULL,NULL);
	about=(GtkAboutDialog*)gtk_about_dialog_new();
	gtk_about_dialog_set_program_name(about,gettext("FileBrowser"));
	gtk_about_dialog_set_authors(about,authors);
	gtk_about_dialog_set_comments(about,aboutboxstring);
	gtk_about_dialog_set_copyright(about,copyright);
	gtk_about_dialog_set_version(about,VERSION);
	gtk_about_dialog_set_website(about,MYWEBSITE);
	gtk_about_dialog_set_logo_icon_name(about,"KKEditPlug");
	gtk_about_dialog_set_license(about,licence);
	gtk_about_dialog_set_translator_credits(about,(const gchar*)translators);

	gtk_dialog_run(GTK_DIALOG(about));
	gtk_widget_destroy((GtkWidget*)about);
	debugFree(&licence);
	debugFree(&licencepath);
	free(translators);

	setTextDomain(false,plugdata);
	return(0);
}
void praat_showLogo (int autoPopDown) {
	#if gtk
		static const gchar *authors [3] = { "Paul Boersma", "David Weenink", NULL };

		GuiObject dialog = gtk_about_dialog_new ();
		#define xstr(s) str(s)
		#define str(s) #s
		gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (dialog), xstr (PRAAT_VERSION_STR));
		gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (dialog), "Copyright (C) 1992-" xstr(PRAAT_YEAR) " by Paul Boersma and David Weenink");
		gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (dialog), "GPL");
		gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog), "http://www.praat.org");
		//gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (dialog), authors);
		g_signal_connect (GTK_DIALOG (dialog), "response", G_CALLBACK (gtk_widget_destroy), NULL);

		gtk_dialog_run (GTK_DIALOG (dialog));

	#else
		if (theCurrentPraatApplication -> batch || ! theLogo.draw) return;
		if (! theLogo.dia) {
			int width  = theLogo.width_mm  / 25.4 * Gui_getResolution (NULL);
			int height = theLogo.height_mm / 25.4 * Gui_getResolution (NULL);
			theLogo.dia = GuiDialog_create (theCurrentPraatApplication -> topShell, 100, 100, width, height,
				L"About", gui_cb_goAway, NULL, 0);
			theLogo.form = theLogo.dia;
			theLogo.drawingArea = GuiDrawingArea_createShown (theLogo.form, 0, width, 0, height,
				gui_drawingarea_cb_expose, gui_drawingarea_cb_click, NULL, NULL, NULL, 0);
		}

		theLogo.form -> f_show ();
		theLogo.dia -> f_show ();
		
		#if motif
			if (autoPopDown)
				GuiAddTimeOut (2000, logo_timeOut, (XtPointer) NULL);
		#endif
	#endif
}
GtkWidget *trg_about_window_new(GtkWindow * parent)
{
    GtkWidget *dialog;
    GdkPixbuf *logo;
    gchar *licenseText = NULL;
    const gchar *trgAuthors[] = { "Alan Fitton <*****@*****.**>", NULL };
    gchar *licenseFile;

#ifdef WIN32
    licenseFile = trg_win32_support_path("COPYING.TXT");
#else
    licenseFile = g_strdup(TRGLICENSE);
#endif

    dialog = gtk_about_dialog_new();
    gtk_window_set_transient_for(GTK_WINDOW(dialog), parent);
    gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE);

    logo =
        gtk_icon_theme_load_icon(gtk_icon_theme_get_default(),
                                 PACKAGE_NAME, 48,
                                 GTK_ICON_LOOKUP_USE_BUILTIN, NULL);

    if (logo != NULL) {
        gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), logo);
        g_object_unref(logo);
    }

    if (g_file_get_contents(licenseFile, &licenseText, NULL, NULL)) {
        gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(dialog),
                                     licenseText);
    } else {
        gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(dialog), "GPL2");
    }

    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),
                                   "(C) 2011-2013 Alan Fitton");
    gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog),
                                  _
                                  ("A remote client to transmission-daemon."));

    gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog),
                                 "http://code.google.com/p/transmission-remote-gtk/");
    gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(dialog),
                                       "http://code.google.com/p/transmission-remote-gtk/");

    gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(dialog), trgAuthors);
    /*gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG(dialog), documenters); */
    gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(dialog),
                                            "translations kindly contributed by\n\n"
                                            "* Pierre Rudloff (French)\n"
                                            "* Julian Held (German)\n"
                                            "* Algimantas Margevičius (Lithuanian)\n"
                                            "* Youn sok Choi (Korean)\n"
                                            "* Piotr (Polish)\n"
                                            "* Y3AVD (Russian)\n"
                                            "* aspidzent (Spanish)\n"
                                            "* Åke Svensson (Swedish)\n"
                                            "* ROR191 (Ukranian)\n");

    g_free(licenseFile);
    g_free(licenseText);

    return dialog;
}
Пример #12
0
void 
gl_ui_cmd_help_about (GtkAction *action,
                      glWindow  *window)
{
        static GtkWidget *about = NULL;

        gchar            *pixbuf_filename;
        GdkPixbuf        *pixbuf = NULL;
        
        const gchar *authors[] = {
                "Jim Evins",
                " ",
                _("Glabels includes contributions from:"),
                "Mario Blättermann",
                "Robin Stuart",
                "Samuel Lown",
                "Frederic Ruaudel",
                "Wayne Schuller",
                "Emmanuel Pacaud",
                "Austin Henry",
                " ",
                _("See the file AUTHORS for additional credits,"),
                _("or visit http://glabels.org/"),
                NULL
        };

        const gchar *documenters[] = {
                "Jim Evins",
                "Mario Blättermann",
                NULL
        };
        
        const gchar *artists[] = {
                "Jim Evins",
                NULL
        };

        const gchar *copy_text = "Copyright \xc2\xa9 2001-2010 Jim Evins";

        const gchar *about_text = _("A label and business card creation program.\n");

        const gchar *url = "http://glabels.org";

        const gchar *translator_credits = _("translator-credits");

        const gchar *license = _(
                "gLabels is free software: you can redistribute it and/or modify\n"
                "it under the terms of the GNU General Public License as published by\n"
                "the Free Software Foundation, either version 3 of the License, or\n"
                "(at your option) any later version.\n"
                "\n"
                "gLabels is distributed in the hope that it will be useful,\n"
                "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
                "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
                "GNU General Public License for more details.\n");

        gl_debug (DEBUG_COMMANDS, "START");

        g_return_if_fail (action && GTK_IS_ACTION(action));
        g_return_if_fail (window && GL_IS_WINDOW(window));

        if (about != NULL)
        {

                gtk_window_present (GTK_WINDOW (about));
                gtk_window_set_transient_for (GTK_WINDOW (about),
                                              GTK_WINDOW (window));

        } else {
        
                pixbuf_filename = g_build_filename (GLABELS_DATA_DIR, "pixmaps", "glabels-logo.png", NULL);
                pixbuf = gdk_pixbuf_new_from_file (pixbuf_filename, NULL);
                g_free (pixbuf_filename);

                about = gtk_about_dialog_new ();
                gtk_window_set_title              (GTK_WINDOW(about),       _("About glabels"));
                gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG(about), "glabels");
                gtk_about_dialog_set_version      (GTK_ABOUT_DIALOG(about), VERSION);
                gtk_about_dialog_set_copyright    (GTK_ABOUT_DIALOG(about), copy_text);
                gtk_about_dialog_set_comments     (GTK_ABOUT_DIALOG(about), about_text);
                gtk_about_dialog_set_website      (GTK_ABOUT_DIALOG(about), url);
                gtk_about_dialog_set_logo         (GTK_ABOUT_DIALOG(about), pixbuf);

                gtk_about_dialog_set_authors            (GTK_ABOUT_DIALOG(about), authors);
                gtk_about_dialog_set_documenters        (GTK_ABOUT_DIALOG(about), documenters);
                gtk_about_dialog_set_artists            (GTK_ABOUT_DIALOG(about), artists);
                gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG(about), translator_credits);
                gtk_about_dialog_set_license            (GTK_ABOUT_DIALOG(about), license);
        
                gtk_window_set_destroy_with_parent (GTK_WINDOW (about), TRUE);

                g_signal_connect (G_OBJECT (about), "response",
                                  G_CALLBACK (gtk_widget_destroy), NULL);
                g_signal_connect (G_OBJECT (about), "destroy",
                                  G_CALLBACK (gtk_widget_destroyed), &about);

                gtk_window_set_transient_for (GTK_WINDOW (about),
                                              GTK_WINDOW (window));

                gtk_window_present (GTK_WINDOW (about));

                if (pixbuf != NULL)
                        g_object_unref (pixbuf);

        }
        
        gl_debug (DEBUG_COMMANDS, "END");
}
Пример #13
0
void cb_about()
{
    GtkWidget *about;
    const gchar *authors[] = {
	"Author:",
	"Leandro A. F. Pereira",
	"",
	"Contributors:",
	"Agney Lopes Roth Ferraz",
	"Andrey Esin",
	"",
	"Based on work by:",
	"MD5 implementation by Colin Plumb (see md5.c for details)",
	"SHA1 implementation by Steve Reid (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)",
	"FFT benchmark by Scott Robert Ladd (see fftbench.c for details)",
	"Some code partly based on x86cpucaps by Osamu Kayasono",
	"Vendor list based on GtkSysInfo by Pissens Sebastien",
	"DMI support based on code by Stewart Adam",
	"SCSI support based on code by Pascal F. Martin",
	NULL
    };
    const gchar *artists[] = {
	"Jakub Szypulka",
	"Tango Project",
	"The GNOME Project",
	"VMWare, Inc. (USB icon from VMWare Workstation 6)",
	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-2009 "
				   "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);
}
Пример #14
0
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 */
}
Пример #15
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;
}
Пример #16
0
G_MODULE_EXPORT
void on_menu_about_activate(GtkWidget *widget, void *user)
{
  GError* err = NULL;
  gchar* icon_file = g_build_filename(GUMMI_DATA, "icons", "gummi.png", NULL);
  GdkPixbuf* icon = gdk_pixbuf_new_from_file_at_size(icon_file, 80, 80, &err);
  g_free(icon_file);

  const gchar* authors[] = { "Alexander van der Mey "
                             "<*****@*****.**>",
                             "Wei-Ning Huang "
                             "<*****@*****.**>",
                             "Dion Timmermann "
                             "<*****@*****.**>",
                             "Robert Schroll "
                             "<*****@*****.**>\n",
                             "Former contributors:",
                             "Thomas van der Burgt",
                             "Cameron Grout", NULL
                           };

  const gchar* translators =
    "**  Visit our website for instructions on  **\n"
    "**  contributing or updating a translation **\n"
    "\n"
    "Arabic: Hamad Mohammad\n"
    "Brazilian-Portugese: Fernando Cruz and Alexandre Guimarães\n"
    "Catalan: Marc Vinyals\n"
    "Chinese (Simplified): Mathlab pass\n"
    "Chinese (Traditional): Wei-Ning Huang\n"
    "Czech: Přemysl Janouch\n"
    "Danish: Jack Olsen\n"
    "Dutch: Alexander van der Mey\n"
    "French: Yvan Duron and Olivier Brousse\n"
    "German: Thomas Niederprüm\n"
    "Greek: Dimitris Leventeas\n"
    "Hungarian: Balázs Meskó\n"
    "Italian: Salvatore Vassallo\n"
    "Polish: Hubert Kowalski\n"
    "Portugese: Alexandre Guimarães\n"
    "Romanian: Alexandru-Eugen Ichim\n"
    "Russian: Kruvalig and Max Musatov\n"
    "Swedish: Kess Vargavind\n"
    "Spanish: Carlos Salas Contreras and Francisco Javier Serrador\n";

  const gchar* documenters[] = {"Guy Edwards", NULL};

  GtkAboutDialog* dialog = GTK_ABOUT_DIALOG(gtk_about_dialog_new());
  gtk_window_set_transient_for(GTK_WINDOW(dialog), gui->mainwindow);
  gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE);
  gtk_about_dialog_set_authors(dialog, authors);
  gtk_about_dialog_set_program_name(dialog, PACKAGE_NAME);
  gtk_about_dialog_set_version(dialog, PACKAGE_VERSION);
  gtk_about_dialog_set_website(dialog, PACKAGE_URL);
  gtk_about_dialog_set_copyright(dialog, PACKAGE_COPYRIGHT);
  gtk_about_dialog_set_license(dialog, PACKAGE_LICENSE);
  gtk_about_dialog_set_logo(dialog, icon);
  gtk_about_dialog_set_comments(dialog, PACKAGE_COMMENTS);
  gtk_about_dialog_set_translator_credits(dialog, translators);
  gtk_about_dialog_set_documenters(dialog, documenters);
  gtk_dialog_run(GTK_DIALOG(dialog));
  gtk_widget_destroy(GTK_WIDGET(dialog));
}
Пример #17
0
void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* WXUNUSED(parent))
{
    if ( !gtk_check_version(2,6,0) )
    {
        // don't create another dialog if one is already present
        if ( !gs_aboutDialog )
            gs_aboutDialog = GTK_ABOUT_DIALOG(gtk_about_dialog_new());

        GtkAboutDialog * const dlg = gs_aboutDialog;
        gtk_about_dialog_set_program_name(dlg, wxGTK_CONV_SYS(info.GetName()));
        if ( info.HasVersion() )
            gtk_about_dialog_set_version(dlg, wxGTK_CONV_SYS(info.GetVersion()));
        else
            gtk_about_dialog_set_version(dlg, NULL);
        if ( info.HasCopyright() )
            gtk_about_dialog_set_copyright(dlg, wxGTK_CONV_SYS(info.GetCopyrightToDisplay()));
        else
            gtk_about_dialog_set_copyright(dlg, NULL);
        if ( info.HasDescription() )
            gtk_about_dialog_set_comments(dlg, wxGTK_CONV_SYS(info.GetDescription()));
        else
            gtk_about_dialog_set_comments(dlg, NULL);
        if ( info.HasLicence() )
            gtk_about_dialog_set_license(dlg, wxGTK_CONV_SYS(info.GetLicence()));
        else
            gtk_about_dialog_set_license(dlg, NULL);

        wxIcon icon = info.GetIcon();
        if ( icon.IsOk() )
            gtk_about_dialog_set_logo(dlg, info.GetIcon().GetPixbuf());

        if ( info.HasWebSite() )
        {
            // NB: must be called before gtk_about_dialog_set_website() as
            //     otherwise it has no effect (although GTK+ docs don't mention
            //     this...)
            gtk_about_dialog_set_url_hook(wxGtkAboutDialogOnLink, NULL, NULL);

            gtk_about_dialog_set_website(dlg, wxGTK_CONV_SYS(info.GetWebSiteURL()));
            gtk_about_dialog_set_website_label
            (
                dlg,
                wxGTK_CONV_SYS(info.GetWebSiteDescription())
            );
        }
        else
        {
            gtk_about_dialog_set_website(dlg, NULL);
            gtk_about_dialog_set_website_label(dlg, NULL);
            gtk_about_dialog_set_url_hook(NULL, NULL, NULL);
        }

        if ( info.HasDevelopers() )
            gtk_about_dialog_set_authors(dlg, GtkArray(info.GetDevelopers()));
        else
            gtk_about_dialog_set_authors(dlg, GtkArray());
        if ( info.HasDocWriters() )
            gtk_about_dialog_set_documenters(dlg, GtkArray(info.GetDocWriters()));
        else
            gtk_about_dialog_set_documenters(dlg, GtkArray());
        if ( info.HasArtists() )
            gtk_about_dialog_set_artists(dlg, GtkArray(info.GetArtists()));
        else
            gtk_about_dialog_set_artists(dlg, GtkArray());

        wxString transCredits;
        if ( info.HasTranslators() )
        {
            const wxArrayString& translators = info.GetTranslators();
            const size_t count = translators.size();
            for ( size_t n = 0; n < count; n++ )
            {
                transCredits << translators[n] << wxT('\n');
            }
        }
        else // no translators explicitly specified
        {
            // maybe we have translator credits in the message catalog?
            wxString translator = _("translator-credits");

            // gtk_about_dialog_set_translator_credits() is smart enough to
            // detect if "translator-credits" is untranslated and hide the
            // translators tab in that case, however it will still show the
            // "credits" button, (at least GTK 2.10.6) even if there are no
            // credits informations at all, so we still need to do the check
            // ourselves
            if ( translator != wxT("translator-credits") ) // untranslated!
                transCredits = translator;
        }

        if ( !transCredits.empty() )
            gtk_about_dialog_set_translator_credits(dlg, wxGTK_CONV_SYS(transCredits));
        else
            gtk_about_dialog_set_translator_credits(dlg, NULL);

        g_signal_connect(dlg, "response",
                            G_CALLBACK(wxGtkAboutDialogOnClose), NULL);

        gtk_window_present(GTK_WINDOW(dlg));
        return;
    }

    // native about dialog not available, fall back to the generic one
    wxGenericAboutBox(info);
}
Пример #18
0
/**
 * 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
}
Пример #19
0
/* Called when About is selected from right-click menu */
static void show_about_dialog(GtkMenuItem *menu_item, gpointer user_data) {
  /* This helps prevent multiple instances */
  if (!gtk_grab_get_current()) {
    const gchar* authors[] = {"Cristian Henzel <*****@*****.**>\n"
				"Gilberto \"Xyhthyx\" Miralla <*****@*****.**>\n"
				"Eugene Nikolsky <*****@*****.**>", NULL};
    const gchar* license =
      "This program is free software; you can redistribute it and/or modify\n"
      "it under the terms of the GNU General Public License as published by\n"
      "the Free Software Foundation; either version 3 of the License, or\n"
      "(at your option) any later version.\n"
      "\n"
      "This program is distributed in the hope that it will be useful,\n"
      "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
      "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
      "GNU General Public License for more details.\n"
      "\n"
      "You should have received a copy of the GNU General Public License\n"
      "along with this program.  If not, see <http://www.gnu.org/licenses/>.";

    /* Create the about dialog */
    GtkWidget* about_dialog = gtk_about_dialog_new();
    gtk_window_set_icon((GtkWindow*)about_dialog,
                        gtk_widget_render_icon(about_dialog, GTK_STOCK_ABOUT, GTK_ICON_SIZE_MENU, NULL));

    gtk_about_dialog_set_name((GtkAboutDialog*)about_dialog, "ClipIt");
    #ifdef HAVE_CONFIG_H
    gtk_about_dialog_set_version((GtkAboutDialog*)about_dialog, VERSION);
    #endif
    gtk_about_dialog_set_comments((GtkAboutDialog*)about_dialog,
                                _("Lightweight GTK+ clipboard manager."));

    gtk_about_dialog_set_website((GtkAboutDialog*)about_dialog,
                                 "http://clipit.rspwn.com/");

    gtk_about_dialog_set_copyright((GtkAboutDialog*)about_dialog, "Copyright (C) 2010-2012 Cristian Henzel");
    gtk_about_dialog_set_authors((GtkAboutDialog*)about_dialog, authors);
    gtk_about_dialog_set_translator_credits ((GtkAboutDialog*)about_dialog,
                                             "Guido Tabbernuk <*****@*****.**>\n"
                                             "Miloš Koutný <*****@*****.**>\n"
                                             "Kim Jensen <*****@*****.**>\n"
                                             "Eckhard M. Jäger <*****@*****.**>\n"
                                             "Michael Stempin <*****@*****.**>\n"
                                             "Benjamin 'sphax3d' Danon <*****@*****.**>\n"
                                             "Németh Tamás <*****@*****.**>\n"
                                             "Davide Truffa <*****@*****.**>\n"
                                             "Jiro Kawada <*****@*****.**>\n"
                                             "Øyvind Sæther <*****@*****.**>\n"
                                             "pankamyk <*****@*****.**>\n"
                                             "Tomasz Rusek <*****@*****.**>\n"
                                             "Phantom X <*****@*****.**>\n"
                                             "Ovidiu D. Niţan <*****@*****.**>\n"
                                             "Alexander Kazancev <*****@*****.**>\n"
                                             "Daniel Nylander <*****@*****.**>\n"
                                             "Hedef Türkçe <*****@*****.**>\n"
                                             "Lyman Li <*****@*****.**>\n"
                                             "Gilberto \"Xyhthyx\" Miralla <*****@*****.**>");

    gtk_about_dialog_set_license((GtkAboutDialog*)about_dialog, license);
    gtk_about_dialog_set_logo_icon_name((GtkAboutDialog*)about_dialog, GTK_STOCK_PASTE);
    /* Run the about dialog */
    gtk_dialog_run((GtkDialog*)about_dialog);
    gtk_widget_destroy(about_dialog);
  } else {
    /* A window is already open, so we present it to the user */
    GtkWidget *toplevel = gtk_widget_get_toplevel(gtk_grab_get_current());
    gtk_window_present((GtkWindow*)toplevel);
  }
}
Пример #20
0
/**
 * 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;
}
Пример #21
0
gint display_about_dbox(void)
{
	GtkWidget* widget;
	GtkAboutDialog* dlg;
	GdkPixbuf *pix;

	struct stat stbuf;
	FILE *fd;
	gchar *filename;
	int len = 0;
	gchar buffer[32768];
	gchar *version;

#ifdef _MSC_VER /* MSVC builds. MinGW builds use Linux file structures. */
	filename = g_strconcat(inst_paths.base_dir, "License.txt", NULL);
#else				/*  */
	filename = g_strconcat(inst_paths.base_dir, "COPYING", NULL);
#endif				/*  */

	if (access(filename, F_OK) == 0) 
	{
		if (stat(filename, &stbuf) != -1) 
		{
			len = stbuf.st_size;
			len -= 2;
		}
		if ((fd = fopen(filename, "r")) != NULL) 
		{
			memset(buffer, 0, sizeof(buffer));
			len = fread(buffer, 1, len, fd);
			fclose(fd);
		}
	}

	version = g_strdup_printf(_("Framework version (cables=%s, files=%s, calcs=%s, conv=%s)"),
	     ticables_version_get(), tifiles_version_get(), ticalcs_version_get(), ticonv_version_get());

	//---

	widget = gtk_about_dialog_new();
	dlg = GTK_ABOUT_DIALOG(widget);
	pix = create_pixbuf("logo.png");

	gtk_about_dialog_set_program_name(dlg, "TiLP2 - Tilp Is a Linking Program - ");
	gtk_about_dialog_set_version(dlg, TILP_VERSION);
	gtk_about_dialog_set_comments(dlg, version);
	gtk_about_dialog_set_copyright(dlg, "Copyright (c) 2001-2010 The TiLP Team");
	gtk_about_dialog_set_license(dlg, buffer);
	gtk_about_dialog_set_website(dlg, "http://www.tilp.info");
	gtk_about_dialog_set_authors(dlg, authors);
	gtk_about_dialog_set_documenters(dlg, documenters);
	gtk_about_dialog_set_artists(dlg, artists);
	gtk_about_dialog_set_logo(dlg, pix);

	g_signal_connect_swapped(dlg, "response",
		G_CALLBACK(gtk_widget_destroy), dlg);

	//gtk_show_about_dialog(NULL, "");
	gtk_widget_show_all(widget);

	return 0;
}
Пример #22
0
void
about_show (void)
{
	GdkPixbuf *logo;
	static GtkWidget *dialog = NULL;
	static const gchar *documentors[] = 
	{
		"Neil Williams  <*****@*****.**>",
		NULL
	};
	static const gchar *authors[] =
	{
		"Neil Williams  <*****@*****.**>",
		"",
		NULL
	};
	
	/*
	* Translators should localize the following string
	* which will give them credit in the About box.
	* E.g. "Fulano de Tal <*****@*****.**>" */
	gchar *path, *translators = g_strdup (_("translator-credits"));

	if (dialog)
	{
		gtk_window_present (GTK_WINDOW (dialog));
		return;
	}

	path = g_build_filename (DATADIR, "pixmaps", "gpdftext.png", NULL);
	logo = gdk_pixbuf_new_from_file (path, NULL);
	g_free (path);
	dialog = gtk_about_dialog_new ();
	gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (dialog), VERSION);
	gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (dialog),_("eBook PDF editor"));
	gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (dialog),
		"Copyright 2009 Neil Williams");
	gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (dialog),
		_("gPDFText converts ebook PDF content into ASCII text, "
		  "reformatted for long line paragraphs."));
	gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (dialog), authors);
	gtk_about_dialog_set_documenters (GTK_ABOUT_DIALOG (dialog), documentors);
	gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (dialog), translators);
	gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (dialog), logo);
	gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog), "http://gpdftext.sourceforge.net/");
	gtk_about_dialog_set_website_label (GTK_ABOUT_DIALOG (dialog), _("Homepage"));
	gtk_window_set_icon (GTK_WINDOW(dialog), logo);
	gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (dialog),
		" gpdftext is free software: you can redistribute it and/or modify it\n"
		" under the terms of the GNU General Public License\n"
		" version 2 as published by the Free Software Foundation.\n"
		"\n"
		" gpdftext is distributed in the hope that it will be useful, but\n"
		" WITHOUT ANY WARRANTY; without even the implied warranty of\n"
		" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
		" See the GNU General Public License for more details.\n"
		"\n"
		" You should have received a copy of the GNU General Public License\n"
		" along with this program; if not, write to the Free Software\n"
		" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,\n"
		" MA 02110-1301, USA.\n"
		);

	g_object_add_weak_pointer (G_OBJECT (dialog), (void **)&dialog);
	gtk_dialog_run (GTK_DIALOG(dialog));
	gtk_widget_destroy (dialog);
	g_free (translators);
}