Mercurial > pidgin
comparison src/about.c @ 5024:8e55a4d362a3
[gaim-migrate @ 5361]
Patch by Rob McQueen, NEWS and CREDITS updates.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sat, 05 Apr 2003 05:01:47 +0000 |
parents | e2047cd770d6 |
children | 059d95c67cda |
comparison
equal
deleted
inserted
replaced
5023:e218d2d2b7e9 | 5024:8e55a4d362a3 |
---|---|
63 GtkWidget *hbox; | 63 GtkWidget *hbox; |
64 GtkWidget *button; | 64 GtkWidget *button; |
65 GtkWidget *text; | 65 GtkWidget *text; |
66 GtkWidget *sw; | 66 GtkWidget *sw; |
67 GtkWidget *logo; | 67 GtkWidget *logo; |
68 | |
69 char abouttitle[45]; | 68 char abouttitle[45]; |
70 | 69 |
71 if (!about) { | 70 if (!about) { |
72 | 71 |
73 GAIM_DIALOG(about); | 72 GAIM_DIALOG(about); |
79 gtk_widget_realize(about); | 78 gtk_widget_realize(about); |
80 | 79 |
81 vbox = gtk_vbox_new(FALSE, 5); | 80 vbox = gtk_vbox_new(FALSE, 5); |
82 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | 81 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); |
83 gtk_container_add(GTK_CONTAINER(about), vbox); | 82 gtk_container_add(GTK_CONTAINER(about), vbox); |
84 gtk_widget_show(vbox); | |
85 | 83 |
86 frame = gtk_frame_new("Gaim v" VERSION); | 84 frame = gtk_frame_new("Gaim v" VERSION); |
87 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); | 85 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
88 gtk_widget_show(frame); | |
89 | 86 |
90 fbox = gtk_vbox_new(FALSE, 5); | 87 fbox = gtk_vbox_new(FALSE, 5); |
91 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); | 88 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); |
92 gtk_container_add(GTK_CONTAINER(frame), fbox); | 89 gtk_container_add(GTK_CONTAINER(frame), fbox); |
93 gtk_widget_show(fbox); | |
94 | 90 |
95 logo = gaim_pixmap(NULL, "logo.png"); | 91 logo = gtk_image_new_from_stock(GAIM_STOCK_LOGO, gtk_icon_size_from_name(GAIM_ICON_SIZE_LOGO)); |
96 gtk_box_pack_start(GTK_BOX(fbox), logo, FALSE, FALSE, 0); | 92 gtk_box_pack_start(GTK_BOX(fbox), logo, FALSE, FALSE, 0); |
97 gtk_widget_show(logo); | |
98 | 93 |
99 sw = gtk_scrolled_window_new(NULL, NULL); | 94 sw = gtk_scrolled_window_new(NULL, NULL); |
100 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), | 95 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), |
101 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); | 96 GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); |
102 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); | 97 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); |
104 | 99 |
105 text = gtk_imhtml_new(NULL, NULL); | 100 text = gtk_imhtml_new(NULL, NULL); |
106 gtk_container_add(GTK_CONTAINER(sw), text); | 101 gtk_container_add(GTK_CONTAINER(sw), text); |
107 gtk_widget_set_size_request(sw, -1, 350); | 102 gtk_widget_set_size_request(sw, -1, 350); |
108 gaim_setup_imhtml(text); | 103 gaim_setup_imhtml(text); |
109 | |
110 | 104 |
111 gtk_imhtml_append_text(GTK_IMHTML(text), | 105 gtk_imhtml_append_text(GTK_IMHTML(text), |
112 _("Gaim is a modular Instant Messaging client capable of " | 106 _("Gaim is a modular Instant Messaging client capable of " |
113 "using AIM, ICQ, Yahoo!, MSN, IRC, Jabber, Napster, " | 107 "using AIM, ICQ, Yahoo!, MSN, IRC, Jabber, Napster, " |
114 "Zephyr, and Gadu-Gadu all at once. It is written using " | 108 "Zephyr, and Gadu-Gadu all at once. It is written using " |
164 " Syd Logan (hacker and designated driver [lazy bum])<BR>" | 158 " Syd Logan (hacker and designated driver [lazy bum])<BR>" |
165 "<BR>"), -1, GTK_IMHTML_NO_SCROLL); | 159 "<BR>"), -1, GTK_IMHTML_NO_SCROLL); |
166 | 160 |
167 gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(sw)), 0); | 161 gtk_adjustment_set_value(gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(sw)), 0); |
168 | 162 |
169 gtk_widget_show(text); | |
170 gtk_widget_show(sw); | |
171 | |
172 | |
173 /* Close Button */ | 163 /* Close Button */ |
174 | 164 |
175 hbox = gtk_hbox_new(FALSE, 5); | 165 hbox = gtk_hbox_new(FALSE, 5); |
176 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); | 166 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); |
177 gtk_widget_show(hbox); | 167 gtk_widget_show(hbox); |
181 | 171 |
182 g_signal_connect_swapped(G_OBJECT(button), "clicked", | 172 g_signal_connect_swapped(G_OBJECT(button), "clicked", |
183 G_CALLBACK(destroy_about), G_OBJECT(about)); | 173 G_CALLBACK(destroy_about), G_OBJECT(about)); |
184 g_signal_connect(G_OBJECT(about), "destroy", | 174 g_signal_connect(G_OBJECT(about), "destroy", |
185 G_CALLBACK(destroy_about), G_OBJECT(about)); | 175 G_CALLBACK(destroy_about), G_OBJECT(about)); |
186 gtk_widget_show(button); | |
187 | 176 |
188 /* this makes the sizes not work. */ | 177 /* this makes the sizes not work. */ |
189 /* GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); */ | 178 /* GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); */ |
190 /* gtk_widget_grab_default(button); */ | 179 /* gtk_widget_grab_default(button); */ |
191 | 180 |
192 gtk_widget_show(button); | |
193 } | 181 } |
194 | 182 |
195 /* Let's give'em something to talk about -- woah woah woah */ | 183 /* Let's give'em something to talk about -- woah woah woah */ |
184 gtk_widget_show_all(about); | |
196 gtk_window_present(GTK_WINDOW(about)); | 185 gtk_window_present(GTK_WINDOW(about)); |
197 } | 186 } |