Mercurial > pidgin
annotate src/about.c @ 525:5dbca28e7138
[gaim-migrate @ 535]
"Where is that report? I need that report Frank!"
"Blah blah blah blah"
"Oh you think this is funny? Do you think our client will think this is funny?"
"Funny!"
"I want that report Frank"
"Bleeeeeeeeehhhhhhhhh"
"That's it Frank. Pack up your bags. You're history"
"OK bye"
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Tue, 25 Jul 2000 08:33:20 +0000 |
| parents | 023c3851db0a |
| children | f03f041c1aa9 |
| rev | line source |
|---|---|
| 1 | 1 /* |
| 2 * gaim | |
| 3 * | |
| 4 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net> | |
| 5 * | |
| 6 * This program is free software; you can redistribute it and/or modify | |
| 7 * it under the terms of the GNU General Public License as published by | |
| 8 * the Free Software Foundation; either version 2 of the License, or | |
| 9 * (at your option) any later version. | |
| 10 * | |
| 11 * This program is distributed in the hope that it will be useful, | |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 14 * GNU General Public License for more details. | |
| 15 * | |
| 16 * You should have received a copy of the GNU General Public License | |
| 17 * along with this program; if not, write to the Free Software | |
| 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 19 * | |
| 20 */ | |
| 21 | |
|
349
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
338
diff
changeset
|
22 #ifdef HAVE_CONFIG_H |
|
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
338
diff
changeset
|
23 #include "../config.h" |
|
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
338
diff
changeset
|
24 #endif |
| 1 | 25 #include <string.h> |
| 26 #include <stdio.h> | |
| 27 #include <stdlib.h> | |
| 28 #include <time.h> | |
| 29 | |
| 30 #include <gtk/gtk.h> | |
| 31 #include "gaim.h" | |
| 32 #include "pixmaps/logo.xpm" | |
| 33 | |
| 34 static GtkWidget *about=NULL; | |
| 35 | |
| 36 static void destroy_about() | |
| 37 { | |
| 38 if (about) | |
| 39 gtk_widget_destroy(about); | |
| 40 about = NULL; | |
| 41 } | |
| 42 | |
| 43 | |
|
523
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
44 static void about_click(GtkWidget *w, gpointer m) |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
45 { |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
46 open_url_nw(NULL, "http://www.marko.net/gaim/"); |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
47 } |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
48 |
| 1 | 49 |
| 50 void show_about(GtkWidget *w, void *null) | |
| 51 { | |
| 52 GtkWidget *button; | |
| 53 GtkWidget *vbox; | |
| 54 GtkWidget *pixmap; | |
| 55 GtkWidget *label; | |
|
523
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
56 GtkWidget *eventbox; |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
57 GtkWidget *label2; |
| 1 | 58 GtkStyle *style; |
| 59 GdkPixmap *pm; | |
| 60 GdkBitmap *bm; | |
| 61 char abouttitle[45]; | |
| 62 | |
| 63 if (!about) { | |
| 64 about = gtk_window_new(GTK_WINDOW_DIALOG); | |
| 65 | |
|
349
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
338
diff
changeset
|
66 g_snprintf(abouttitle, sizeof(abouttitle), _("About GAIM v%s"), VERSION); |
| 1 | 67 gtk_window_set_title(GTK_WINDOW(about), abouttitle); |
| 68 gtk_container_border_width(GTK_CONTAINER(about), 2); | |
| 73 | 69 gtk_widget_set_usize(about, 510, 370); |
| 1 | 70 |
| 71 gtk_widget_show(about); | |
| 72 aol_icon(about->window); | |
| 73 | |
| 74 | |
| 75 vbox = gtk_vbox_new(FALSE, 0); | |
| 76 gtk_container_add(GTK_CONTAINER(about), vbox); | |
| 77 gtk_widget_show(vbox); | |
| 78 | |
| 79 style = gtk_widget_get_style(about); | |
| 80 pm = gdk_pixmap_create_from_xpm_d(about->window, &bm, | |
| 81 &style->bg[GTK_STATE_NORMAL], (gchar **)aol_logo); | |
| 82 pixmap = gtk_pixmap_new(pm, bm); | |
| 83 gtk_box_pack_start(GTK_BOX(vbox), pixmap, TRUE, TRUE, 0); | |
| 84 gtk_widget_show(pixmap); | |
| 85 | |
| 86 label = gtk_label_new( | |
| 87 "GAIM is a client that supports AOL's Instant Messenger protocol\nwritten under the GTK\n" | |
| 88 "It is developed by:\n" | |
| 89 "Rob Flynn <rflynn@blueridge.net> <IM: RobFlynn> (Maintainer)\n" | |
| 69 | 90 "Eric Warmenhoven <warmenhoven@yahoo.com> <IM: EWarmenhoven> (GNOME Applet)\n" |
| 177 | 91 "Syd Logan (Designated Driver and Super Hacker *OoOoO*)\n" |
| 1 | 92 "Jim Duchek <jimduchek@ou.edu> <IM:Zilding> (Former Maintainer)\n" |
| 93 "Mark Spencer <markster@marko.net> <IM: Markster97> (Original Author)\n" | |
| 94 "\n" | |
| 95 "Gaim is brought to you by a team of penguin pimps, the letter G, and beer.\n"); | |
| 96 | |
| 97 gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); | |
| 98 gtk_widget_show(label); | |
|
523
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
99 |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
100 eventbox = gtk_event_box_new(); |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
101 gtk_box_pack_start(GTK_BOX(vbox), eventbox, TRUE, TRUE, 0); |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
102 gtk_widget_show(eventbox); |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
103 |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
104 label2 = gtk_label_new("Gaim " VERSION " - http://www.marko.net/gaim/\n"); |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
105 gtk_container_add(GTK_CONTAINER(eventbox), label2); |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
106 gtk_widget_show(label2); |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
107 |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
108 gtk_signal_connect(GTK_OBJECT(eventbox), "button_press_event", |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
109 GTK_SIGNAL_FUNC(about_click), NULL); |
|
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
110 gdk_window_set_cursor(eventbox->window, gdk_cursor_new(GDK_HAND2)); |
| 1 | 111 |
| 356 | 112 button = gtk_button_new_with_label(_("Close")); |
| 1 | 113 gtk_signal_connect_object(GTK_OBJECT(button), "clicked", |
| 114 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about)); | |
| 115 gtk_signal_connect(GTK_OBJECT(about), "destroy", | |
| 116 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about)); | |
| 117 | |
| 118 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); | |
| 119 gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, FALSE, 0); | |
| 120 gtk_widget_grab_default(button); | |
| 121 gtk_widget_show(button); | |
| 122 | |
| 123 } else | |
| 124 gtk_widget_show(about); | |
| 125 | |
| 126 } |
