示例#1
0
文件: interface.c 项目: 54chen/MyNet
GtkWidget*
create_aboutdialog1 (void)
{
    GtkWidget *aboutdialog1;
    const gchar *authors[] = {
        "*****@*****.**",
        "*****@*****.**",
        NULL
    };
    /* TRANSLATORS: Replace this string with your names, one name per line. */
    gchar *translators = _("translator-credits");
    GdkPixbuf *aboutdialog1_logo_pixbuf;

    aboutdialog1 = gtk_about_dialog_new ();
    gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (aboutdialog1), VERSION);
    gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (aboutdialog1), _("MyNet"));
    gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (aboutdialog1), _("copyright 2006 cc0cc"));
    gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (aboutdialog1), _("\345\243\260\346\230\216\357\274\232MyNet\346\230\257\344\273\245\347\240\224\347\251\266\345\222\214\345\255\246\344\271\240\344\270\272\347\233\256\347\232\204\345\274\200\345\217\221\347\232\204\357\274\214\346\210\221\344\273\254\346\211\200\345\201\232\347\232\204\344\270\200\345\210\207\351\203\275\351\201\265\345\276\252\344\270\255\345\215\216\344\272\272\346\260\221\345\205\261\345\222\214\345\233\275\343\200\212\350\256\241\347\256\227\346\234\272\350\275\257\344\273\266\344\277\235\346\212\244\346\235\241\344\276\213\343\200\213\343\200\202\n\345\246\202\346\236\234\344\275\240\345\234\250\345\255\246\344\271\240\350\277\207\347\250\213\344\270\255\351\234\200\350\246\201\346\255\244\350\275\257\344\273\266\357\274\214\350\257\267\345\210\260cc0cc.126.com\346\217\220\344\272\244\344\275\240\347\232\204\345\206\205\347\275\221IP\345\222\214E-mail"));
    gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (aboutdialog1), authors);
    gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (aboutdialog1), translators);
    aboutdialog1_logo_pixbuf = gdk_pixbuf_new_from_xpm_data((gchar **)MyNet_xpm);
    //create_pixbuf ("../pixmaps/MyNet.png");
    gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (aboutdialog1), aboutdialog1_logo_pixbuf);
    if (aboutdialog1_logo_pixbuf)
    {
        gtk_window_set_icon (GTK_WINDOW (aboutdialog1), aboutdialog1_logo_pixbuf);
        gdk_pixbuf_unref (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
/*
 Creates & runs about dialog
*/
void
libgadget_sidegadget_about_dialog (GtkWidget *widget, sidegadget_core_s *sidegadget)
{
	GtkWidget *dialog;
	
	const gchar *auth[] = {g_strdup_printf ("%s <%s>", sidegadget->author_name, sidegadget->author_email), NULL};
	
	dialog = gtk_about_dialog_new ();
	gtk_about_dialog_set_name (GTK_ABOUT_DIALOG(dialog), sidegadget->name);
	gtk_about_dialog_set_version (GTK_ABOUT_DIALOG(dialog), sidegadget->version);
	gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG(dialog), sidegadget->description);
	gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG(dialog), sidegadget->license);
	gtk_about_dialog_set_website (GTK_ABOUT_DIALOG(dialog), sidegadget->author_website);
	gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG(dialog), auth);
	
	/* Run the dialog */
	gint result = gtk_dialog_run (GTK_DIALOG (dialog));
	switch (result) {
		case GTK_RESPONSE_DELETE_EVENT:
			gtk_widget_destroy (dialog);
			break;
		case GTK_RESPONSE_CANCEL:
			gtk_widget_destroy (dialog);
			break;	
	}	
}
示例#3
0
GtkWidget*
create_aboutdialog_gshpvoronoi (void)
{
  GtkWidget *aboutdialog_gshpvoronoi;
  const gchar *authors[] = {
    "Steffen Macke <*****@*****.**>",
    "Maher Abdel Karim <*****@*****.**>",
    NULL
  };
  /* TRANSLATORS: Replace this string with your names, one name per line. */
  gchar *translators = _("translator-credits");
  GdkPixbuf *aboutdialog_gshpvoronoi_logo_pixbuf;

  aboutdialog_gshpvoronoi = gtk_about_dialog_new ();
  gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (aboutdialog_gshpvoronoi), VERSION);
  gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (aboutdialog_gshpvoronoi), _("gshpvoronoi"));
  gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (aboutdialog_gshpvoronoi), _("Copyright (c) 2006 DC Water and Enviroment"));
  gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (aboutdialog_gshpvoronoi), _("Create Voronoi polygons from point shapfiles.\nGraphical frontend to qvoronoi."));
  gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (aboutdialog_gshpvoronoi), _(" gshpvoronoi - Create Voronoi polygons from point shapefiles Graphical frontend to qvoronoi\n    Copyright (C) 2006  DC Water and Environment\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 Street, Fifth Floor, Boston, MA  02110-1301  USA"));
  gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (aboutdialog_gshpvoronoi), "http://dcwaterdesign.sourceforge.net");
  gtk_about_dialog_set_website_label (GTK_ABOUT_DIALOG (aboutdialog_gshpvoronoi), _("http://dcwaterdesign.sourceforge.net"));
  gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (aboutdialog_gshpvoronoi), authors);
  gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (aboutdialog_gshpvoronoi), translators);
  aboutdialog_gshpvoronoi_logo_pixbuf = create_pixbuf ("dc.png");
  gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (aboutdialog_gshpvoronoi), aboutdialog_gshpvoronoi_logo_pixbuf);

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

  return aboutdialog_gshpvoronoi;
}
示例#4
0
extern void
on_help_about_activate(void)
{
	GtkWidget *about;
	GdkPixbuf *logo;

	const gchar *authors[] = {"Sebastien Tricaud", 
				  "Jerome Marrec", 
				  "Frederic Motte", 
				  "Alastair Porter", 
				  NULL};
	
	const gchar *artists[] = {"Damien Cante (logos)", 
				  "Audrey Maurin (pixmaps from lilypond)",
				  NULL};

	gchar *filename;
	filename = get_file_from_data_dir("pixmaps/gscore.xpm");
	logo = gtk_image_get_pixbuf((GtkImage *)gtk_image_new_from_file(filename));

	about = gtk_about_dialog_new();

	gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about), "Gscore");
	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about), VERSION);
	gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about), logo);
	gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about), "Copyright (C) Sebastien Tricaud 2001-2005");
	gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about), LICENSE_TEXT);
	gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about), "http://www.gscore.org");
	gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about), "A musical score editor");
	gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about), authors);
	gtk_about_dialog_set_artists(GTK_ABOUT_DIALOG(about), artists);

	gtk_widget_show(about);

}
示例#5
0
void
on_about_clicked(GtkButton* button, gpointer user_data) {
  GtkWidget *about;
  const gchar *authors[] = {
    "Sergey Zorin <*****@*****.**>",
    NULL
  };
  
  /* TRANSLATORS: Replace this string with your names, one name per line. */
  gchar *translators = "Sergey Zorin <*****@*****.**>\n"
    "Mathias Weinert\n"
    "Hayashi Kentaro";
  GdkPixbuf *about_logo_pixbuf;

  about = gtk_about_dialog_new();
  gtk_widget_set_name(about, "about");
  gtk_window_set_destroy_with_parent(GTK_WINDOW(about), TRUE);
  gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about), VERSION);
  gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about), _("diff-ext setup"));
  gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about), _("(c) 2007 Sergey Zorin. All rights reserved."));
  gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about), _("Copyright (c) 2007, Sergey Zorin\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n   1. Redistributions  of  source  code   must  retain  the  above\n      copyright notice,  this list of conditions and the following\n      disclaimer.\n   2. Redistributions in binary  form  must  reproduce  the  above\n      copyright notice,  this list of conditions and the following\n      disclaimer  in  the  documentation  and/or  other  materials\n      provided with the distribution.\n\nTHIS SOFTWARE  IS  PROVIDED  BY  THE  COPYRIGHT  HOLDERS  AND  CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED  WARRANTIES, INCLUDING,  BUT NOT LIMITED\nTO, THE IMPLIED WARRANTIES  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE  ARE  DISCLAIMED.  IN  NO  EVENT  SHALL  THE  COPYRIGHT   OWNER  OR\nCONTRIBUTORS  BE  LIABLE  FOR  ANY DIRECT,  INDIRECT, INCIDENTAL,  SPECIAL,\nEXEMPLARY,  OR  CONSEQUENTIAL  DAMAGES  (INCLUDING,  BUT  NOT  LIMITED  TO,\nPROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\nOR BUSINESS INTERRUPTION)  HOWEVER CAUSED AND ON ANY THEORY  OF  LIABILITY,\nWHETHER IN CONTRACT,  STRICT LIABILITY,  OR  TORT  (INCLUDING NEGLIGENCE OR\nOTHERWISE) ARISING  IN  ANY WAY OUT OF THE USE  OF THIS  SOFTWARE,  EVEN IF\nADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"));
  gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about), "http://diff-ext.sourceforge.net");
  gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(about), _("diff-ext"));
  gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about), authors);
  gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(about), translators);
  about_logo_pixbuf = create_pixbuf("de.png");
  gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about), about_logo_pixbuf);

  g_object_set_data(G_OBJECT(about), "about", about);
  
  gtk_widget_show(about); 
}
示例#6
0
	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);
	}
示例#7
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);
}
示例#8
0
GtkWidget*
init_about_window(GtkWidget *)
{
	GtkWidget *about_window = NULL;
	GdkPixbuf *about_logo = NULL;
	const gchar *authors[] = {"Andy Lo A Foe\t\t\t<*****@*****.**>",
								"Dominique Michel\t\t<*****@*****.**>",
								"Erik de Castro Lopo\t\thttp://www.mega-nerd.com",
								"Madej",
								"\nPatches:",
								"Hubert Chan",
								"Viktor Radnai and Paul Brossier",
								"\nCheck AUTHORS file for a more complete list",
								NULL};
//	const gchar *artists[] = {"", NULL};
	const gchar *documenters[] = {"Yvo Timmermans",
									"Dominique Michel",
									"Andy Lo A Foe",
									NULL};
	const gchar *license = _("AlsaPlayer is free software; you can redistribute it and/or modify\n\
it under the terms of the GNU General Public Licence as published by\n\
the Free Software Foundation; either version 3 of the Licence, or\n\
(at your option) any later version.\n\
\n\
AlsaPlayer 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 Licence for more details.\n\
\n\
You should have received a copy of the GNU General Public Licence\n\
along with AlsaPlayer; if not, see <http://www.gnu.org/licenses/>.");

	about_logo = gdk_pixbuf_new_from_xpm_data((const char **)logo_xpm);

	about_window = gtk_about_dialog_new();

	gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about_window), "AlsaPlayer");
	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about_window), VERSION);
	gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about_window), "http://alsaplayer.sourceforge.net");
	gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about_window), "Copyright © 1998-2014");
	gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about_window), _("You like it, please contribute."));
	gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about_window), license);
	gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about_window), authors);
//	gtk_about_dialog_set_artists(GTK_ABOUT_DIALOG(about_window), artists);
	gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG(about_window), documenters);
	gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG(about_window), _("translator-credits"));
	gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about_window), about_logo);

	g_signal_connect(G_OBJECT(about_window), "delete-event", G_CALLBACK(about_delete_event), NULL);
	g_signal_connect(G_OBJECT(about_window), "response", G_CALLBACK(about_response), NULL);

	g_object_unref(G_OBJECT(about_logo));

	return about_window;
}
示例#9
0
文件: ftmenu.c 项目: taq/ftmenu
static void menu_about(void){
	GtkWidget *about = NULL;
	about = gtk_about_dialog_new();
	gtk_about_dialog_set_name		(GTK_ABOUT_DIALOG(about),APP_NAME);
	gtk_about_dialog_set_version	(GTK_ABOUT_DIALOG(about),APP_VERSION);
	gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about),APP_AUTHOR);
	gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG(about),APP_DESCRIPTION);
	gtk_about_dialog_set_license  (GTK_ABOUT_DIALOG(about),APP_LICENSE);
	gtk_about_dialog_set_website  (GTK_ABOUT_DIALOG(about),APP_WEBSITE);
	gtk_dialog_run(GTK_DIALOG (about));
	gtk_widget_destroy(about);
}
示例#10
0
void cb_about_module(GtkAction * action)
{
    Shell *shell = shell_get_main_shell();
    GSList *modules = shell->tree->modules;
    ModuleAbout *ma;
    gchar *name;

    g_object_get(G_OBJECT(action), "tooltip", &name, NULL);

    for (; modules; modules = modules->next) {
	ShellModule *sm = (ShellModule *) modules->data;

	if (!g_str_equal(sm->name, name))
	    continue;

	if ((ma = module_get_about(sm))) {
	    GtkWidget *about;
	    gchar *text;

	    about = gtk_about_dialog_new();

	    text = g_strdup_printf("%s Module", sm->name);
	    gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about), text);
	    g_free(text);

	    gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about),
					 ma->version);

	    text = g_strdup_printf("Written by %s\nLicensed under %s",
				   ma->author, ma->license);
	    gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about), text);
	    g_free(text);

	    if (ma->description)
		gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about),
					      ma->description);

	    gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about), sm->icon);
	    gtk_dialog_run(GTK_DIALOG(about));
	    gtk_widget_destroy(about);
	} else {
	    g_warning
		("No about information is associated with the %s module.",
		 name);
	}

	break;
    }

    g_free(name);
}
示例#11
0
static void open_about_dialog ()
{
	GtkWidget *dialog = gtk_about_dialog_new ();
	gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (dialog), "Cryptkeeper "VERSION);
	gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (dialog), about_authors);
	gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (dialog), _("translator-credits"));
	gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (dialog),
		_("This program is free software; you can redistribute it and/or modify it\n"
		"under the terms of the GNU General Public License version 3, as published\n"
		"by the Free Software Foundation."));
	gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (dialog), "Hasta la victoria siempre!");
	gtk_dialog_run (GTK_DIALOG (dialog));
	gtk_widget_destroy (dialog);
}
示例#12
0
int main( int argc, char **argv ) {
  gtk_init( &argc, &argv );
  const gchar *authors[] = {
    "Author #1",
    "Author #2",
    NULL,
  };
  const gchar *docs[] = {
    "Doc #1",
    "Doc #2", 
    NULL,
  };
  GtkWidget *dialog = gtk_about_dialog_new();
  GError *error = NULL;
  GdkPixbuf *logo = gdk_pixbuf_new_from_file( "/home/alex/work/gtk-work/foundation-gtk/chap05/logo.png", &error );

  /* set the application logo or handle the errors */
  if ( error == NULL ) { /* no error, set the logo */
    gtk_about_dialog_set_logo( GTK_ABOUT_DIALOG( dialog ), logo );
  } else {
    if ( error->domain == GDK_PIXBUF_ERROR ) {
      g_print( "GdkPixbufError: %s\n", error->message );
    } else if ( error->domain == G_FILE_ERROR ) {
      g_print( "GFileError: %s\n", error->message );
    } else {
      g_print( "An Error in the domain: %d has occured!\n", error->domain );
    }
    g_error_free( error );
  }

  /* set application data that will be displayed in the main dialog */
  gtk_about_dialog_set_name( GTK_ABOUT_DIALOG( dialog ), "NEFW" );
  gtk_about_dialog_set_version( GTK_ABOUT_DIALOG( dialog ), "3.2.0.02" );
  gtk_about_dialog_set_copyright( GTK_ABOUT_DIALOG( dialog ), "(c) 2009 Alex Hilton" );
  gtk_about_dialog_set_comments( GTK_ABOUT_DIALOG( dialog ), "All about dialog" );

  /* set licese tex */
  gtk_about_dialog_set_license( GTK_ABOUT_DIALOG( dialog ), "Free to everyone" );
  gtk_about_dialog_set_website( GTK_ABOUT_DIALOG( dialog ), "http://book.alexhilton.net" );
  gtk_about_dialog_set_website_label( GTK_ABOUT_DIALOG( dialog ), "book.alexhilton.net" );

  /* set the application authors, docs and translators */
  gtk_about_dialog_set_authors( GTK_ABOUT_DIALOG( dialog ), authors );
  gtk_about_dialog_set_documenters( GTK_ABOUT_DIALOG( dialog ), docs );
  gtk_about_dialog_set_translator_credits( GTK_ABOUT_DIALOG( dialog ), "tran #1\nTran #2" );

  gtk_dialog_run( GTK_DIALOG( dialog ) );
  gtk_widget_destroy( dialog );
  return 0;
}
示例#13
0
GtkWidget*
create_aboutdialog1 (void)
{
  GtkWidget *aboutdialog1;
  const gchar *authors[] = {
    "Mean",
    "JSC",
    "Anish Mistry",
    "Jakub Misak",
    "Kuisathaverat",
	"Gruntster",
    QT_TR_NOOP("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), "Avidemux");
  gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (aboutdialog1), "\302\251 2001 - 2008 Mean");
  gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (aboutdialog1), QT_TR_NOOP("Multi-platform 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), "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;
}
示例#14
0
void saa_main_window_a_propos_activate		(SaaMainWindow * w) {
	GtkWidget * about = gtk_about_dialog_new();
	gchar * authors[] = {"Cedric COULIOU", NULL};

	gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about), PACKAGE_NAME);
	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about), PACKAGE_VERSION);

	gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about), "http://gsolaar.sourceforge.net/");
	gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about), (const gchar **)authors);
	if(w->icon)
		gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about), w->icon);

	gtk_dialog_run(GTK_DIALOG(about));
	gtk_widget_destroy(about);
}
示例#15
0
文件: global.c 项目: zizoumgs/Aman
void globalShowAbout(GtkWidget *widget, gpointer data){
	GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file("home.png", NULL);
	GtkWidget *dialog = gtk_about_dialog_new();
	gtk_window_set_modal( GTK_WINDOW( dialog ), TRUE );
	gtk_window_set_transient_for( GTK_WINDOW( dialog ),GTK_WINDOW( globalGetParent() ) );
	gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(dialog), globalGetAppName());
	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), globalGetVersion()); 
	gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog),"(C) F.U - 13-02-15 ");
	gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog),"Aman adalah alarm sekolah sederhana yang ternyata tidak sederhana.");
	gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog),"http://www.manggisan.com");
	gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), pixbuf);
	gtk_dialog_run(GTK_DIALOG (dialog));
	gtk_widget_destroy(dialog);
//	g_object_unref(pixbuf);
}
示例#16
0
void
quicklauncher_about(XfcePanelPlugin *plugin, t_quicklauncher *quicklauncher)
{
	GtkWidget *about;
	const gchar* authors[2] = {"Bountykiller <*****@*****.**>", NULL};
	about = gtk_about_dialog_new();
	gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about), _("Quicklauncher"));
	gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about), NULL);
	gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about), (const gchar**) authors);
	gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about), _("Allows you to add launchers easily and display them on many lines."));
	gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about), "http://xfce-goodies.berlios.de");
	gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(about), _("Other plugins available here"));
	gtk_dialog_run(GTK_DIALOG(about));
	gtk_widget_destroy (about);
}
示例#17
0
void pokaz_oprogramie(GtkWidget *widget, gpointer data)
{
    GtkWidget *dialog = gtk_about_dialog_new();

    gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(dialog), "Rzucacz");
    gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), "v0.15");
    gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog), "Patryk Kajdas");
    gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog),
    "Srodek kartki formatu A4 pokrywa sie z rzutem srodka O ukladu wspolrzednych OXYZ na plaszczyzne rzutni.\n" \
    "Orientacja osi O'X' i O'Y' na rzutni jest arbitralnie\n ustalana przez program, gdyz w przeciwnym przypadku\n nie jest ona jednoznaczna.\n" \
    "Wspolrzedne sa podawane w milimetrach.\n Zatem prawy gorny rog kartki ma\n wspolrzedne (105.0 ; 148.5) w ukladzie O'X'Y'.");
    gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
    gtk_dialog_run(GTK_DIALOG (dialog));
    gtk_widget_destroy(dialog);
}
示例#18
0
void GUIShowInfo(GtkWidget *empty)
{
	GdkPixbuf *pix;
	GtkWidget *dialog = gtk_about_dialog_new();
	pix = gdk_pixbuf_new_from_file("freerainbowtables.png", NULL);
	
	gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(dialog), "rcracki_mt-GUI");
	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), "0.2b"); 
	gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog), "(c) Paragon");
	gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog), "rcracki_mt-GUI is a graphical user interface for rcracki_mt, a multithreaded hash cracker using rainbow tables.");
	gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog), "http://www.freerainbowtables.com");
	
	gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), pix);
	
	gtk_dialog_run(GTK_DIALOG (dialog));
	gtk_widget_destroy(dialog);
}
示例#19
0
//"About" toolbar button handler
void onAboutClicked(GtkWidget *widget, gpointer window) {
	GtkWidget *dialog = gtk_about_dialog_new();
	gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(dialog), "Client Viewer");
	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), "0.1");
	gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog), "(c) Team 2");
	gtk_about_dialog_set_comments(
			GTK_ABOUT_DIALOG(dialog),
			"Client Viewer is a program to create a real-time visual representation of the a single robot as generated by the client.");
	const gchar
			*authors[2] = {
					"Peter Neufeld, Frank Lau, Egor Philippov,\nYouyou Yang, Jianfeng Hu, Roy Chiang,\nWilson Huynh, Gordon Leung, Kevin Fahy,\nBenjamin Saunders",
					NULL };

	gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(dialog), authors);
	gtk_dialog_run(GTK_DIALOG(dialog));
	gtk_widget_destroy(dialog);
}
示例#20
0
void window_about_create(GtkWidget* widget, gpointer window) {
	GdkPixbuf* pixbuf = gdk_pixbuf_new_from_file("icon.png", NULL);
	GtkWidget* dialog = gtk_about_dialog_new();

	gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(dialog), "LAN Party Intracomms");
	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), "0.0.1");
	gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog), "(c) João 'anatoly' Neto");
	gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog), "XLPARTY Client");
	gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog), "http://www.sourceforge.net/p/xl-com");
	gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(dialog), "Visit the project website on SourceForge");
	gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), pixbuf);

	g_object_unref(pixbuf);

	gtk_dialog_run(GTK_DIALOG(dialog));
	gtk_widget_destroy(dialog);
}
示例#21
0
文件: about.c 项目: JessonChan/Birl
void about()
{
    GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(ABOUT_ICO, NULL);

    GtkWidget *dialog = gtk_about_dialog_new();
    gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(dialog), "Birl");
    gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), VERSION);
    gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog),
                                   "(c) JessonChan");
    gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog),
                                  "Birl is a simple GUI Ruijie client for Ubuntu.\nBirl Is Ruijie for Linux.");
    gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog),
                                 "http://www.cnblogs.com/JessonChan/");
    gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), pixbuf);
    g_object_unref(pixbuf), pixbuf = NULL;
    gtk_dialog_run(GTK_DIALOG (dialog));
    gtk_widget_destroy(dialog);
}
示例#22
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;
}
示例#23
0
文件: amyplay.c 项目: Gargantia/Amy
void show_about(GtkWidget *widget, gpointer data)
{

  //GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file("battery.png", NULL);

  GtkWidget *dialog = gtk_about_dialog_new();
  gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(dialog), "Amy");
  gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), "0.0.8"); 
  gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog), 
      "(c) Gargantia Project");
  gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog), 
     "AMY -((Advanced Media plaYer))- is a danmaku video client for the Gargantia Project");
  gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog), 
      "http://github.com/Gargantia");
  //gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), pixbuf);
  //g_object_unref(pixbuf), pixbuf = NULL;
  gtk_dialog_run(GTK_DIALOG (dialog));
  gtk_widget_destroy(dialog);

}
示例#24
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);
}
示例#25
0
/*
 * About window
 * 
 */
void windows_about(){
	
	GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(ICON_ABOUT, NULL);
	GtkWidget *dialog = gtk_about_dialog_new();
	GError *error = NULL;
	
	/* Set all window options (color, size, position, logo, icon, etc) */
	gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(dialog), "TwitCrusader");
	gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(dialog), "");
	gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(dialog), "(c) PTKDev, RoxShannon");
	gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(dialog), "Basato su librerie GTK e semplicità!\n\nVersion: "TWC_VERSION""TWC_VERSION_STATUS);
	gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(dialog), "http://www.twitcrusader.org/");
	gtk_window_set_icon_from_file (GTK_WINDOW(dialog), ICON_STAR, &error);
	gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(dialog), pixbuf);
	g_object_unref(pixbuf), pixbuf = NULL;

	/* CALLBACK: exit event and Widget Show */
	gtk_dialog_run(GTK_DIALOG (dialog));
	gtk_widget_destroy(dialog);

}
示例#26
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);
}
示例#27
0
    void ShowLinuxGtkAboutBox()
    {
        // auto pixbuf = gdk_pixbuf_new_from_file( "lynxlogo.png", NULL );  // TODO: Statically link
        auto dialog = gtk_about_dialog_new();

        gtk_about_dialog_set_name(      GTK_ABOUT_DIALOG(dialog), "Jynx Emulator" );
        gtk_about_dialog_set_version(   GTK_ABOUT_DIALOG(dialog), "1.0.9" );
        gtk_about_dialog_set_copyright( GTK_ABOUT_DIALOG(dialog), "(c) 2015 Jonathan Markland" );

        gtk_about_dialog_set_comments(  GTK_ABOUT_DIALOG(dialog),
            "Emulator for the Camputers Lynx 48K/96K\nLinux Edition\n\n"
            "This program comes with ABSOLUTELY NO WARRANTY,\n"
            "and is licensed under the GNU General Public License Version 3\n"
            "See   http://www.gnu.org/licenses/   for your rights." );

        gtk_about_dialog_set_website(   GTK_ABOUT_DIALOG(dialog), "http://jynxemulator.wordpress.com" );

        // gtk_about_dialog_set_logo(      GTK_ABOUT_DIALOG(dialog), pixbuf);
        // g_object_unref(pixbuf);
        // pixbuf = NULL;

        gtk_dialog_run( GTK_DIALOG(dialog) );
        gtk_widget_destroy(dialog);
    }
示例#28
0
void iceb_aboutz(GtkWidget *wpredok)
{

class glmenu_data data;


data.window=gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_window_set_position( GTK_WINDOW(data.window),ICEB_POS_CENTER);

gtk_window_set_title(GTK_WINDOW(data.window),gettext("Разработчик"));

//Установка ширины окантовки внутренней области   
gtk_container_set_border_width(GTK_CONTAINER(data.window),10);
gtk_signal_connect(GTK_OBJECT(data.window),"destroy",GTK_SIGNAL_FUNC(gtk_main_quit),NULL);

gtk_signal_connect_after(GTK_OBJECT(data.window),"key_press_event",GTK_SIGNAL_FUNC(iceb_aboutz_key_press),&data);

if(wpredok != NULL)
 {
  gdk_window_set_cursor(wpredok->window,gdk_cursor_new(ICEB_CURSOR_GDITE));
  //Удерживать окно над породившем его окном всегда
  gtk_window_set_transient_for(GTK_WINDOW(data.window),GTK_WINDOW(wpredok));
  //Закрыть окно если окно предок удалено
  gtk_window_set_destroy_with_parent(GTK_WINDOW(data.window),TRUE);
 }

GtkWidget *vbox=gtk_vbox_new(FALSE,2);
gtk_container_add(GTK_CONTAINER(data.window),vbox);




//Установка ширины окантовки внутренней области   
gtk_container_set_border_width(GTK_CONTAINER(vbox),5);
gtk_widget_realize(data.window);
//gtk_widget_show(data.window);


//GtkStyle *style;
//GdkPixmap *pixmap;
//GdkBitmap *mask;
//GtkWidget *pixmapWidget;

//style = gtk_widget_get_style(data.window);
//pixmap=gdk_pixmap_create_from_xpm_d(data.window->window,&mask,&style->bg[GTK_STATE_NORMAL],
//                                    (gchar **)port_xpm);
//pixmapWidget=gtk_pixmap_new(pixmap,mask);
//gtk_container_add(GTK_CONTAINER(vbox),pixmapWidget);



//char bros[512];

//sprintf(bros,"%s:",gettext("LinuxBuh.RU"));
//sprintf(bros,"%s:",gettext(version));
//GtkWidget *name=gtk_label_new(iceb_u_toutf(bros));
//GtkWidget *version1=gtk_label_new(iceb_u_toutf(bros));
//name=gtk_label_new(gettext("Название программы"));
//gtk_box_pack_start((GtkBox*)vbox,name,TRUE,TRUE,0);
//version1=gtk_label_new(gettext("Версия программы"));
//gtk_box_pack_start((GtkBox*)vbox,version1,TRUE,TRUE,0);


printf("%s\n",__FUNCTION__);

GtkWidget *about=gtk_about_dialog_new();
gtk_signal_connect(GTK_OBJECT(about),"response",GTK_SIGNAL_FUNC(gtk_widget_destroy),NULL);
//g_signal_connect_swapped(about,"response",G_CALLBACK(gtk_widget_destroy),about);

gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(about),"iceBw");
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about),version);
gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about),"http://iceb.com.ua");
gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about),gettext("Бухгалтерский учёт"));
//gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about),"Copyright \302\251 Aleksandr Belykh");
gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG(about),"Copyright © Aleksandr Belykh");



const gchar *avtor[]={"Aleksandr Belykh","<*****@*****.**>","http://www.iceb.vc.ukrtel.net","tel:+380676654526"};
 
gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(about),avtor);


gtk_dialog_run(GTK_DIALOG(about));

gtk_box_pack_start((GtkBox*)vbox,about,TRUE,TRUE,0);

data.knopka[VIHOD]=gtk_button_new_with_label(gettext("Выход"));
//tooltips[VIHOD]=gtk_tooltips_new();
//gtk_tooltips_set_tip(tooltips[VIHOD],data.knopka[VIHOD],gettext("Завершение работы в этом окне."),NULL);
gtk_signal_connect(GTK_OBJECT(data.knopka[VIHOD]),"clicked",GTK_SIGNAL_FUNC(iceb_aboutz_knopka),&data);
gtk_object_set_user_data(GTK_OBJECT(data.knopka[VIHOD]),(gpointer)VIHOD);
gtk_box_pack_start(GTK_BOX(vbox), data.knopka[VIHOD], TRUE, TRUE,0);



gtk_widget_grab_focus(data.knopka[0]);

gtk_widget_show_all (data.window);


gtk_main();

if(wpredok != NULL)
  gdk_window_set_cursor(wpredok->window,gdk_cursor_new(ICEB_CURSOR));

}
示例#29
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);
  }
}
示例#30
0
文件: main.cpp 项目: IWhisper/libpsx
int main(int argc, char *argv[])
{
    GtkWidget *widget;
    GladeXML *xml;
    FILE *in;
    char t[256];
    int len, val = 0;
    char *pB, *p;
    char cfg[255];

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

    if (argc != 2) {
    	printf ("Usage: cfgDFSound {ABOUT | CFG}\n");
		return 0;
	}

    if (strcmp(argv[1], "CFG") != 0 && strcmp(argv[1], "ABOUT") != 0) {
		printf ("Usage: cfgDFSound {ABOUT | CFG}\n");
		return 0;
    }

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

    if (strcmp(argv[1], "ABOUT") == 0) {
		const char *authors[]= {"Pete Bernert and the P.E.Op.S. team", "Ryan Schultz", "Andrew Burton", NULL};
		widget = gtk_about_dialog_new ();
		gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (widget), "dfsound PCSX Sound Plugin");
		gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (widget), "1.6");
		gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (widget), authors);
		gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (widget), "http://pcsx-df.sourceforge.net/");

		g_signal_connect_data(GTK_OBJECT(widget), "response",
			GTK_SIGNAL_FUNC(on_about_clicked), NULL, NULL, G_CONNECT_AFTER);

		gtk_widget_show (widget);
		gtk_main();

		return 0;
    }

    xml = glade_xml_new(DATADIR "dfsound.glade2", "CfgWnd", NULL);
    if (!xml) {
		g_warning("We could not load the interface!");
		return 255;
    }

    strcpy(cfg, CONFIG_FILENAME);

    in = fopen(cfg, READBINARY);
    if (in) {
		pB = (char *)malloc(32767);
		memset(pB, 0, 32767);
		len = fread(pB, 1, 32767, in);
		fclose(in);
    } else {
		pB = 0;
		printf ("Error - no configuration file\n");
		/* TODO Raise error - no configuration file */
    }

	/* ADB TODO Replace a lot of the following with common functions */
    if (pB) {
		strcpy(t, "\nVolume");
		p = strstr(pB, t);
		if (p) {
		    p = strstr(p, "=");
	    	len = 1;
		}
	    val = set_limit (p, len, 0, 4);
    } else val = 2;

    gtk_combo_box_set_active(GTK_COMBO_BOX (glade_xml_get_widget(xml, "cbVolume2")), val);

    if (pB) {
	strcpy(t, "\nUseInterpolation");
	p = strstr(pB, t);
	if (p) {
	    p = strstr(p, "=");
	    len = 1;
	}
	    val = set_limit (p, len, 0, 3);
    } else val = 2;

    gtk_combo_box_set_active(GTK_COMBO_BOX (glade_xml_get_widget(xml, "cbInterpolation2")), val);

    if (pB) {
		strcpy(t, "\nXAPitch");
		p = strstr(pB, t);
		if (p) {
		    p = strstr(p, "=");
	    	len = 1;
		}
		val = set_limit (p, len, 0, 1);
    } else val = 0;

    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "chkXASpeed")), val);

    if (pB) {
		strcpy(t, "\nHighCompMode");
		p = strstr(pB, t);
		if (p) {
		    p = strstr(p, "=");
	    	len = 1;
		}
		val = set_limit (p, len, 0, 1);
    } else val = 0;

    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "chkHiCompat")), val);

    if (pB) {
		strcpy(t, "\nSPUIRQWait");
		p = strstr(pB, t);
		if (p) {
		    p = strstr(p, "=");
		    len = 1;
		}

		val = set_limit (p, len, 0, 1);
    } else val = 1;

    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "chkIRQWait")), val);

    if (pB) {
		strcpy(t, "\nDisStereo");
		p = strstr(pB, t);
		if (p) {
		    p = strstr(p, "=");
		    len = 1;
		}

		val = set_limit (p, len, 0, 1);
    } else val = 0;

    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (glade_xml_get_widget(xml, "chkDisStereo")), val);

    if (pB) {
		strcpy(t, "\nUseReverb");
		p = strstr(pB, t);
		if (p) {
		    p = strstr(p, "=");
		    len = 1;
		}
		val = set_limit (p, len, 0, 2);
    } else val = 2;

    gtk_combo_box_set_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "cbReverb2")), val);

    if (pB)
		free(pB);

	widget = glade_xml_get_widget(xml, "CfgWnd");
	g_signal_connect_data(GTK_OBJECT(widget), "destroy",
		GTK_SIGNAL_FUNC(SaveConfig), xml, NULL, 0);

	widget = glade_xml_get_widget(xml, "btn_close");
	g_signal_connect_data(GTK_OBJECT(widget), "clicked",
		GTK_SIGNAL_FUNC(OnConfigClose), xml, NULL, G_CONNECT_AFTER);

    gtk_main();
    return 0;
}