Mercurial > pidgin.yaz
comparison src/about.c @ 1250:b5783215b245
[gaim-migrate @ 1260]
decklin's clean up of the account editor, much needed.
indent -kr -i8 -l105 -ncs -cp7 -npcs -T GtkWidget -T gpointer -T AppletCallbackFunc -T GtkFunction -T gaim_plugin_remove -T name -T FILE -T gchar -T user_opts -T GdkEvent -T GtkObject ...
did about.c, aim.c, away.c, browser.c, buddy_chat.c, gaimrc.c, html.c, idle.c, multi.c. Need to do buddy.c, conversation.c, dialogs.c, oscar.c, perl.c, plugins.c, prefs.c, proxy.c, prpl.c, rvous.c, server.c, sound.c, toc.c, util.c. not doing gtkhtml.c because it's a piece of crap anyway, or *ticker.c because they're syd's.
got rid of debug_buff, just debug_printf now.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 13 Dec 2000 20:18:35 +0000 |
parents | 728a90516211 |
children | 3456fd563e75 |
comparison
equal
deleted
inserted
replaced
1249:3e44de27622d | 1250:b5783215b245 |
---|---|
31 #include "gaim.h" | 31 #include "gaim.h" |
32 #include "pixmaps/logo.xpm" | 32 #include "pixmaps/logo.xpm" |
33 #include "pixmaps/cancel.xpm" | 33 #include "pixmaps/cancel.xpm" |
34 #include "pixmaps/about_small.xpm" | 34 #include "pixmaps/about_small.xpm" |
35 | 35 |
36 static GtkWidget *about=NULL; | 36 static GtkWidget *about = NULL; |
37 | 37 |
38 static void destroy_about() | 38 static void destroy_about() |
39 { | 39 { |
40 if (about) | 40 if (about) |
41 gtk_widget_destroy(about); | 41 gtk_widget_destroy(about); |
67 GdkBitmap *bm; | 67 GdkBitmap *bm; |
68 GtkWidget *hbox; | 68 GtkWidget *hbox; |
69 GtkWidget *button; | 69 GtkWidget *button; |
70 | 70 |
71 char abouttitle[45]; | 71 char abouttitle[45]; |
72 | 72 |
73 if (!about) { | 73 if (!about) { |
74 | 74 |
75 about = gtk_window_new(GTK_WINDOW_DIALOG); | 75 about = gtk_window_new(GTK_WINDOW_DIALOG); |
76 | 76 |
77 g_snprintf(abouttitle, sizeof(abouttitle), _("About GAIM v%s"), VERSION); | 77 g_snprintf(abouttitle, sizeof(abouttitle), _("About GAIM v%s"), VERSION); |
78 gtk_window_set_title(GTK_WINDOW(about), abouttitle); | 78 gtk_window_set_title(GTK_WINDOW(about), abouttitle); |
79 gtk_window_set_wmclass(GTK_WINDOW(about), "about", "Gaim" ); | 79 gtk_window_set_wmclass(GTK_WINDOW(about), "about", "Gaim"); |
80 gtk_window_set_policy(GTK_WINDOW(about), FALSE, TRUE, TRUE); | 80 gtk_window_set_policy(GTK_WINDOW(about), FALSE, TRUE, TRUE); |
81 | 81 |
82 gtk_widget_realize(about); | 82 gtk_widget_realize(about); |
83 aol_icon(about->window); | 83 aol_icon(about->window); |
84 | 84 |
85 vbox = gtk_vbox_new(FALSE, 5); | 85 vbox = gtk_vbox_new(FALSE, 5); |
86 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); | 86 gtk_container_set_border_width(GTK_CONTAINER(vbox), 5); |
87 gtk_container_add(GTK_CONTAINER(about), vbox); | 87 gtk_container_add(GTK_CONTAINER(about), vbox); |
88 | 88 |
89 frame = gtk_frame_new("Gaim " VERSION); | 89 frame = gtk_frame_new("Gaim " VERSION); |
90 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); | 90 gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0); |
91 | 91 |
92 fbox = gtk_hbox_new(FALSE, 5); | 92 fbox = gtk_hbox_new(FALSE, 5); |
93 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); | 93 gtk_container_set_border_width(GTK_CONTAINER(fbox), 5); |
94 gtk_container_add(GTK_CONTAINER(frame), fbox); | 94 gtk_container_add(GTK_CONTAINER(frame), fbox); |
95 | 95 |
96 /* Left side, TOP */ | 96 /* Left side, TOP */ |
97 style = gtk_widget_get_style(about); | 97 style = gtk_widget_get_style(about); |
98 pm = gdk_pixmap_create_from_xpm_d(about->window, &bm, | 98 pm = gdk_pixmap_create_from_xpm_d(about->window, &bm, |
99 &style->bg[GTK_STATE_NORMAL], (gchar **)aol_logo); | 99 &style->bg[GTK_STATE_NORMAL], (gchar **) aol_logo); |
100 pixmap = gtk_pixmap_new(pm, bm); | 100 pixmap = gtk_pixmap_new(pm, bm); |
101 | 101 |
102 gdk_pixmap_unref(pm); | 102 gdk_pixmap_unref(pm); |
103 gdk_bitmap_unref(bm); | 103 gdk_bitmap_unref(bm); |
104 | 104 |
105 gtk_box_pack_start(GTK_BOX(fbox), pixmap, FALSE, FALSE, 0); | 105 gtk_box_pack_start(GTK_BOX(fbox), pixmap, FALSE, FALSE, 0); |
106 | 106 |
107 /* Set up the author table */ | 107 /* Set up the author table */ |
108 a_table = gtk_table_new(6, 2, TRUE); | 108 a_table = gtk_table_new(6, 2, TRUE); |
109 gtk_table_set_row_spacings(GTK_TABLE(a_table), 5); | 109 gtk_table_set_row_spacings(GTK_TABLE(a_table), 5); |
110 gtk_table_set_col_spacings(GTK_TABLE(a_table), 5); | 110 gtk_table_set_col_spacings(GTK_TABLE(a_table), 5); |
111 | 111 |
112 label = gtk_label_new(_("GAIM is a client that supports AOL's Instant Messenger protocol. " | 112 label = |
113 "It is written using Gtk+ and is licensed under the GPL.\n" | 113 gtk_label_new(_ |
114 "URL: http://www.marko.net/gaim/")); | 114 ("GAIM is a client that supports AOL's Instant Messenger protocol. " |
115 "It is written using Gtk+ and is licensed under the GPL.\n" | |
116 "URL: http://www.marko.net/gaim/")); | |
115 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); | 117 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); |
116 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 2, 0, 2); | 118 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 2, 0, 2); |
117 | 119 |
118 /* Rob */ | 120 /* Rob */ |
119 label = gtk_label_new("Rob Flynn (Maintainer)"); | 121 label = gtk_label_new("Rob Flynn (Maintainer)"); |
120 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); | 122 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
121 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 1, 2, 3); | 123 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 1, 2, 3); |
122 | 124 |
123 label = gtk_label_new("rob@tgflinux.com"); | 125 label = gtk_label_new("rob@tgflinux.com"); |
124 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); | 126 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
125 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 1, 2, 2, 3); | 127 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 1, 2, 2, 3); |
126 | 128 |
127 /* Eric */ | 129 /* Eric */ |
128 label = gtk_label_new("Eric Warmenhoven"); | 130 label = gtk_label_new("Eric Warmenhoven"); |
129 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); | 131 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
130 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 1, 3, 4); | 132 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 1, 3, 4); |
131 | 133 |
132 label = gtk_label_new("warmenhoven@yahoo.com"); | 134 label = gtk_label_new("warmenhoven@yahoo.com"); |
133 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); | 135 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
134 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 1, 2, 3, 4); | 136 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 1, 2, 3, 4); |
135 | 137 |
136 /* Jim */ | 138 /* Jim */ |
137 label = gtk_label_new("Jim Duchek"); | 139 label = gtk_label_new("Jim Duchek"); |
138 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); | 140 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
139 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 1, 4, 5); | 141 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 1, 4, 5); |
140 | 142 |
141 /* Mark */ | 143 /* Mark */ |
142 label = gtk_label_new("Mark Spencer"); | 144 label = gtk_label_new("Mark Spencer"); |
143 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); | 145 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
144 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 1, 5, 6); | 146 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 0, 1, 5, 6); |
145 | 147 |
146 label = gtk_label_new("markster@marko.net"); | 148 label = gtk_label_new("markster@marko.net"); |
147 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); | 149 gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); |
148 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 1, 2, 5, 6); | 150 gtk_table_attach_defaults(GTK_TABLE(a_table), label, 1, 2, 5, 6); |
149 | 151 |
150 gtk_box_pack_start(GTK_BOX(fbox), a_table, TRUE, TRUE, 0); | 152 gtk_box_pack_start(GTK_BOX(fbox), a_table, TRUE, TRUE, 0); |
151 | 153 |
152 /* Close Button */ | 154 /* Close Button */ |
153 | 155 |
154 hbox = gtk_hbox_new(FALSE, 5); | 156 hbox = gtk_hbox_new(FALSE, 5); |
156 | 158 |
157 button = picture_button(about, _("Close"), cancel_xpm); | 159 button = picture_button(about, _("Close"), cancel_xpm); |
158 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 160 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
159 | 161 |
160 if (null != (void *)2) { | 162 if (null != (void *)2) { |
161 /* 2 can be as sad as 1, it's the loneliest number since the number 1 */ | 163 /* 2 can be as sad as 1, it's the loneliest number since the number 1 */ |
162 gtk_signal_connect_object(GTK_OBJECT(button), "clicked", | 164 gtk_signal_connect_object(GTK_OBJECT(button), "clicked", |
163 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about)); | 165 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about)); |
164 gtk_signal_connect(GTK_OBJECT(about), "destroy", | 166 gtk_signal_connect(GTK_OBJECT(about), "destroy", |
165 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about)); | 167 GTK_SIGNAL_FUNC(destroy_about), GTK_OBJECT(about)); |
166 } else { | 168 } else { |
167 gtk_signal_connect(GTK_OBJECT(button), "clicked", | 169 gtk_signal_connect(GTK_OBJECT(button), "clicked", |
168 GTK_SIGNAL_FUNC(version_exit), NULL); | 170 GTK_SIGNAL_FUNC(version_exit), NULL); |
169 gtk_signal_connect(GTK_OBJECT(about), "destroy", | 171 gtk_signal_connect(GTK_OBJECT(about), "destroy", |
170 GTK_SIGNAL_FUNC(version_exit), NULL); | 172 GTK_SIGNAL_FUNC(version_exit), NULL); |
171 } | 173 } |
172 | 174 |
173 /* this makes the sizes not work. */ | 175 /* this makes the sizes not work. */ |
174 //GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); | 176 //GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); |
175 //gtk_widget_grab_default(button); | 177 //gtk_widget_grab_default(button); |
176 | 178 |
177 button = picture_button(about, _("Web Site"), about_small_xpm); | 179 button = picture_button(about, _("Web Site"), about_small_xpm); |
178 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); | 180 gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); |
179 gtk_signal_connect(GTK_OBJECT(button), "clicked", | 181 gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(about_click), NULL); |
180 GTK_SIGNAL_FUNC(about_click), NULL); | |
181 | 182 |
182 if (display_options & OPT_DISP_COOL_LOOK) | 183 if (display_options & OPT_DISP_COOL_LOOK) |
183 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); | 184 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); |
184 } | 185 } |
185 | 186 |
186 /* Let's give'em something to talk about -- woah woah woah */ | 187 /* Let's give'em something to talk about -- woah woah woah */ |
187 gtk_widget_show_all(about); | 188 gtk_widget_show_all(about); |
188 | 189 |
189 } | 190 } |
190 |