Mercurial > pidgin
comparison src/gtknotify.c @ 7455:3a5f89ba0da5
[gaim-migrate @ 8068]
we'll see if anyone complains about this
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Fri, 07 Nov 2003 06:40:07 +0000 |
parents | 9ab1987e5d8b |
children | 0351ff7030d0 |
comparison
equal
deleted
inserted
replaced
7454:50f4386a8262 | 7455:3a5f89ba0da5 |
---|---|
20 * along with this program; if not, write to the Free Software | 20 * along with this program; if not, write to the Free Software |
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 */ | 22 */ |
23 #include "gtkinternal.h" | 23 #include "gtkinternal.h" |
24 | 24 |
25 #include <gdk/gdkkeysyms.h> | |
26 | |
25 #include "connection.h" | 27 #include "connection.h" |
26 #include "debug.h" | 28 #include "debug.h" |
27 #include "prefs.h" | 29 #include "prefs.h" |
28 #include "stock.h" | 30 #include "stock.h" |
29 #include "util.h" | 31 #include "util.h" |
255 | 257 |
256 /* Show everything. */ | 258 /* Show everything. */ |
257 gtk_widget_show_all(dialog); | 259 gtk_widget_show_all(dialog); |
258 | 260 |
259 return data; | 261 return data; |
262 } | |
263 | |
264 static | |
265 gboolean formatted_input_cb(GtkWidget *dialog, | |
266 GdkEventKey *event, gpointer data) | |
267 { | |
268 if (event->keyval == GDK_Escape) { | |
269 gtk_object_destroy(GTK_OBJECT(dialog)); | |
270 return TRUE; | |
271 } | |
272 return FALSE; | |
260 } | 273 } |
261 | 274 |
262 static void * | 275 static void * |
263 gaim_gtk_notify_formatted(const char *title, const char *primary, | 276 gaim_gtk_notify_formatted(const char *title, const char *primary, |
264 const char *secondary, const char *text, | 277 const char *secondary, const char *text, |
323 gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); | 336 gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); |
324 gtk_widget_show(button); | 337 gtk_widget_show(button); |
325 | 338 |
326 g_signal_connect_swapped(G_OBJECT(button), "clicked", | 339 g_signal_connect_swapped(G_OBJECT(button), "clicked", |
327 G_CALLBACK(formatted_close_cb), window); | 340 G_CALLBACK(formatted_close_cb), window); |
341 g_signal_connect(G_OBJECT(window), "key_press_event", | |
342 G_CALLBACK(formatted_input_cb), NULL); | |
343 | |
328 | 344 |
329 /* Add the text to the gtkimhtml */ | 345 /* Add the text to the gtkimhtml */ |
330 if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_colors")) | 346 if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_colors")) |
331 options ^= GTK_IMHTML_NO_COLOURS; | 347 options ^= GTK_IMHTML_NO_COLOURS; |
332 | 348 |