view src/about.c @ 1106:5bc8fdacd2cb

[gaim-migrate @ 1116] lots of changes. buddy.c: just in general tried to get things to work better. moving things in the edit list window and signing off should be handled better in the main buddy list window (watch out for flashes). gaim.h: removed toc-specific things and moved them to toc.c and rvous.c as needed. gtkhtml.c: possible fix for AOL 6.0 problems (I wasn't able to reproduce the problem before or after the fix, but i fixed what i think might have been causing the problem). multi.c: moved LOGIN_STEPS from gaim.h here and actually use it now oscar.c: moved an oscar-specific struct definition from gaim.h here and also handle problems better perl.c: fix for stupid problem rvous.c: first pass at attempt to be able to remove toc.c and rvous.c (though this will never happen; gaim will support toc as long as aol does) without cruft. gaim is now only dependent on toc.c and rvous.c for toc_build_config and parse_toc_buddy_list, which gaim needs to save and read its buddy list. toc.c: rewrote the signin process so that the read()'s won't block. it's not actually a non-blocking read; it's just that it won't ever get to the read until there's data to be read (thanks to the gdk_input watcher). this means the cancel button should work after it's connected, but it's still not a non-blocking connect. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 20 Nov 2000 07:24:18 +0000
parents d496fe2614a6
children f3e0f41beddb
line wrap: on
line source

/*
 * gaim
 *
 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
 *
 * 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 the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */

#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

#include <gtk/gtk.h>
#include "gaim.h"
#include "pixmaps/logo.xpm"

static GtkWidget *about=NULL;

static void destroy_about()
{
	if (about)
		gtk_widget_destroy(about);
	about = NULL;
}


static void version_exit()
{
	exit(0);
}


static void about_click(GtkWidget *w, gpointer m)
{
	open_url_nw(NULL, "http://www.marko.net/gaim/");
}


void show_about(GtkWidget *w, void *null)
{
	GtkWidget *button;
	GtkWidget *vbox;
	GtkWidget *pixmap;
	GtkWidget *label;
	GtkWidget *eventbox;
	GtkWidget *label2;
	GtkStyle *style;
	GdkPixmap *pm;
	GdkBitmap *bm;
	char abouttitle[45]; 

	if (!about) {
		about = gtk_window_new(GTK_WINDOW_DIALOG);
	             
		g_snprintf(abouttitle, sizeof(abouttitle), _("About GAIM v%s"), VERSION);
		gtk_window_set_title(GTK_WINDOW(about), abouttitle);
                gtk_window_set_wmclass(GTK_WINDOW(about), "about", "Gaim" );
		gtk_container_border_width(GTK_CONTAINER(about), 2);
		gtk_widget_set_usize(about, 535, 430);

		gtk_widget_show(about);
        	aol_icon(about->window);

		
		vbox = gtk_vbox_new(FALSE, 0);
		gtk_container_add(GTK_CONTAINER(about), vbox);
		gtk_widget_show(vbox);
		
		style = gtk_widget_get_style(about);
		pm = gdk_pixmap_create_from_xpm_d(about->window, &bm, 
			&style->bg[GTK_STATE_NORMAL], (gchar **)aol_logo);
		pixmap = gtk_pixmap_new(pm, bm);
		gtk_box_pack_start(GTK_BOX(vbox), pixmap, TRUE, TRUE, 0);
		gtk_widget_show(pixmap);
		gdk_pixmap_unref(pm);
		gdk_bitmap_unref(bm);
		
		label = gtk_label_new(
"GAIM is a client that supports AOL's Instant Messenger protocol\nwritten under the GTK\n" 
"It is developed by:\n"
"Rob Flynn <rflynn@blueridge.net> <IM: RobFlynn> (Maintainer)\n"
"Eric Warmenhoven <warmenhoven@yahoo.com> <IM: EWarmenhoven> (Second in Command)\n"
"Syd Logan (Designated Driver and Super Hacker *OoOoO*)\n"
"Todd Kulesza <fflewddur@linuxfreak.com> <IM: semblanceofself> (Caffeine Consumer)\n"
"Jim Duchek <jimduchek@ou.edu> <IM:Zilding> (Former Maintainer)\n" 
"Mark Spencer <markster@marko.net> <IM: Markster97> (Original Author)\n" 
"\n"
"Gaim is brought to you by a team of penguin pimps, the letter G, and beer.\n");

		gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
		gtk_widget_show(label);

		eventbox = gtk_event_box_new();
		gtk_box_pack_start(GTK_BOX(vbox), eventbox, TRUE, TRUE, 0);
		gtk_widget_show(eventbox);

		label2 = gtk_label_new("Gaim " VERSION " - http://www.marko.net/gaim/\n");
		gtk_container_add(GTK_CONTAINER(eventbox), label2);
		gtk_widget_show(label2);

		gtk_signal_connect(GTK_OBJECT(eventbox), "button_press_event",
				   GTK_SIGNAL_FUNC(about_click), NULL);
		gdk_window_set_cursor(eventbox->window, gdk_cursor_new(GDK_HAND2));
	
		button = gtk_button_new_with_label("Close");

		if (null == NULL) {/* there's a mindtrip */
			gtk_signal_connect_object(GTK_OBJECT(button), "clicked",
        	                                  GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about));
			gtk_signal_connect(GTK_OBJECT(about), "destroy",
					   GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about));
		} else {
			gtk_signal_connect(GTK_OBJECT(button), "clicked",
					   GTK_SIGNAL_FUNC(version_exit), NULL);
			gtk_signal_connect(GTK_OBJECT(about), "destroy",
					   GTK_SIGNAL_FUNC(version_exit), NULL);
		}
 		
 		if (display_options & OPT_DISP_COOL_LOOK)
 			gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
 			
		GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
		gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, FALSE, 0);
		gtk_widget_grab_default(button);
		gtk_widget_show(button);
	
	} else
                gtk_widget_show(about);

}