/*------------------------------------------------------------------------- * Copyright (c) 2001-2005 Kenneth W. Sodemann (stuffle@mac.com) *------------------------------------------------------------------------- * about_dlg * * Synopsis: * PRepS' obligatory about dialog * * $Id: about_dlg.c,v 1.10 2005/02/12 03:23:52 stuffle Exp $ * * 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. * * 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. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to * Free Software Foundation, Inc. * 59 Temple Place, Suite 330 * Boston, MA 02111-1307 USA * *------------------------------------------------------------------------- */ #ifdef HAVE_CONFIG_H # include #endif #include #define MSG "A Problem Reporting System. PRepS is free software, distributed under the GNU General Public License. See the file 'COPYING' for details. If you have any problems using PRepS or any suggestions on how to make PRepS better, PLEASE let me know. Free software works, but only if you communicate your desires to the authors. Thanks!" #define LOGO "%s/preps_logo.xpm" static GtkWidget * create_about_dlg (GtkWidget *parent) { GtkWidget *about_dlg; GdkPixbuf *pixbuf; GString *logo_str; const gchar *authors[] = { "Ken Sodemann ", NULL }; logo_str = g_string_new (""); g_string_printf (logo_str, LOGO, DATA_DIR); pixbuf = gdk_pixbuf_new_from_file (logo_str->str, NULL); about_dlg = gnome_about_new (PACKAGE, VERSION, _("Copyright (c) 2001-2005 Kenneth W. Sodemann"), _(MSG), authors, authors, NULL, pixbuf); g_string_free (logo_str, TRUE); if (pixbuf != NULL) { g_object_unref (pixbuf); } return about_dlg; } void show_about_dlg (GtkWidget *parent) { static GtkWidget *about_dlg = NULL; /* * If the dialog box exists, just make sure it is visable, otherwise * create it. */ if (about_dlg) { gdk_window_show(about_dlg->window); gdk_window_raise(about_dlg->window); } else { about_dlg = create_about_dlg (parent); /* * When the dialog is destroyed, call gtk_widget_destroyed(), * which will set the "user_data" (&about_dlg in this case) to * NULL. */ g_signal_connect (about_dlg, "destroy", G_CALLBACK (gtk_widget_destroyed), &about_dlg); gtk_widget_show (about_dlg); } }