Mercurial > pidgin
annotate 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 |
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 | |
546
e312b8b9bee5
[gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
541
diff
changeset
|
44 static void version_exit() |
e312b8b9bee5
[gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
541
diff
changeset
|
45 { |
e312b8b9bee5
[gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
541
diff
changeset
|
46 exit(0); |
e312b8b9bee5
[gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
541
diff
changeset
|
47 } |
e312b8b9bee5
[gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
541
diff
changeset
|
48 |
e312b8b9bee5
[gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
541
diff
changeset
|
49 |
523
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
50 static void about_click(GtkWidget *w, gpointer m) |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
51 { |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
52 open_url_nw(NULL, "http://www.marko.net/gaim/"); |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
53 } |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
54 |
1 | 55 |
56 void show_about(GtkWidget *w, void *null) | |
57 { | |
58 GtkWidget *button; | |
59 GtkWidget *vbox; | |
60 GtkWidget *pixmap; | |
61 GtkWidget *label; | |
523
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
62 GtkWidget *eventbox; |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
63 GtkWidget *label2; |
1 | 64 GtkStyle *style; |
65 GdkPixmap *pm; | |
66 GdkBitmap *bm; | |
67 char abouttitle[45]; | |
68 | |
69 if (!about) { | |
70 about = gtk_window_new(GTK_WINDOW_DIALOG); | |
71 | |
349
b402a23f35df
[gaim-migrate @ 359]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
338
diff
changeset
|
72 g_snprintf(abouttitle, sizeof(abouttitle), _("About GAIM v%s"), VERSION); |
1 | 73 gtk_window_set_title(GTK_WINDOW(about), abouttitle); |
905 | 74 gtk_window_set_wmclass(GTK_WINDOW(about), "about", "Gaim" ); |
1 | 75 gtk_container_border_width(GTK_CONTAINER(about), 2); |
556 | 76 gtk_widget_set_usize(about, 535, 430); |
1 | 77 |
78 gtk_widget_show(about); | |
79 aol_icon(about->window); | |
80 | |
81 | |
82 vbox = gtk_vbox_new(FALSE, 0); | |
83 gtk_container_add(GTK_CONTAINER(about), vbox); | |
84 gtk_widget_show(vbox); | |
85 | |
86 style = gtk_widget_get_style(about); | |
87 pm = gdk_pixmap_create_from_xpm_d(about->window, &bm, | |
88 &style->bg[GTK_STATE_NORMAL], (gchar **)aol_logo); | |
89 pixmap = gtk_pixmap_new(pm, bm); | |
90 gtk_box_pack_start(GTK_BOX(vbox), pixmap, TRUE, TRUE, 0); | |
91 gtk_widget_show(pixmap); | |
644
b3900e312d8e
[gaim-migrate @ 654]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
622
diff
changeset
|
92 gdk_pixmap_unref(pm); |
804
17def2bb9720
[gaim-migrate @ 814]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
644
diff
changeset
|
93 gdk_bitmap_unref(bm); |
1 | 94 |
95 label = gtk_label_new( | |
96 "GAIM is a client that supports AOL's Instant Messenger protocol\nwritten under the GTK\n" | |
97 "It is developed by:\n" | |
98 "Rob Flynn <rflynn@blueridge.net> <IM: RobFlynn> (Maintainer)\n" | |
538 | 99 "Eric Warmenhoven <warmenhoven@yahoo.com> <IM: EWarmenhoven> (Second in Command)\n" |
177 | 100 "Syd Logan (Designated Driver and Super Hacker *OoOoO*)\n" |
571 | 101 "Todd Kulesza <fflewddur@linuxfreak.com> <IM: semblanceofself> (Caffeine Consumer)\n" |
1 | 102 "Jim Duchek <jimduchek@ou.edu> <IM:Zilding> (Former Maintainer)\n" |
103 "Mark Spencer <markster@marko.net> <IM: Markster97> (Original Author)\n" | |
104 "\n" | |
105 "Gaim is brought to you by a team of penguin pimps, the letter G, and beer.\n"); | |
106 | |
107 gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0); | |
108 gtk_widget_show(label); | |
523
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
109 |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
110 eventbox = gtk_event_box_new(); |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
111 gtk_box_pack_start(GTK_BOX(vbox), eventbox, TRUE, TRUE, 0); |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
112 gtk_widget_show(eventbox); |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
113 |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
114 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
|
115 gtk_container_add(GTK_CONTAINER(eventbox), label2); |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
116 gtk_widget_show(label2); |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
117 |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
118 gtk_signal_connect(GTK_OBJECT(eventbox), "button_press_event", |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
119 GTK_SIGNAL_FUNC(about_click), NULL); |
023c3851db0a
[gaim-migrate @ 533]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
356
diff
changeset
|
120 gdk_window_set_cursor(eventbox->window, gdk_cursor_new(GDK_HAND2)); |
622 | 121 |
122 button = gtk_button_new_with_label("Close"); | |
123 | |
1009
d496fe2614a6
[gaim-migrate @ 1019]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
960
diff
changeset
|
124 if (null == NULL) {/* there's a mindtrip */ |
546
e312b8b9bee5
[gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
541
diff
changeset
|
125 gtk_signal_connect_object(GTK_OBJECT(button), "clicked", |
e312b8b9bee5
[gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
541
diff
changeset
|
126 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about)); |
1009
d496fe2614a6
[gaim-migrate @ 1019]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
960
diff
changeset
|
127 gtk_signal_connect(GTK_OBJECT(about), "destroy", |
d496fe2614a6
[gaim-migrate @ 1019]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
960
diff
changeset
|
128 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about)); |
d496fe2614a6
[gaim-migrate @ 1019]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
960
diff
changeset
|
129 } else { |
546
e312b8b9bee5
[gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
541
diff
changeset
|
130 gtk_signal_connect(GTK_OBJECT(button), "clicked", |
e312b8b9bee5
[gaim-migrate @ 556]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
541
diff
changeset
|
131 GTK_SIGNAL_FUNC(version_exit), NULL); |
1009
d496fe2614a6
[gaim-migrate @ 1019]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
960
diff
changeset
|
132 gtk_signal_connect(GTK_OBJECT(about), "destroy", |
d496fe2614a6
[gaim-migrate @ 1019]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
960
diff
changeset
|
133 GTK_SIGNAL_FUNC(version_exit), NULL); |
d496fe2614a6
[gaim-migrate @ 1019]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
960
diff
changeset
|
134 } |
535
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
523
diff
changeset
|
135 |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
523
diff
changeset
|
136 if (display_options & OPT_DISP_COOL_LOOK) |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
523
diff
changeset
|
137 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); |
f03f041c1aa9
[gaim-migrate @ 545]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
523
diff
changeset
|
138 |
1 | 139 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); |
140 gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, FALSE, 0); | |
141 gtk_widget_grab_default(button); | |
142 gtk_widget_show(button); | |
143 | |
144 } else | |
145 gtk_widget_show(about); | |
146 | |
147 } |