Mercurial > pidgin.yaz
comparison src/gtkconv.c @ 6066:c99959f1bb73
[gaim-migrate @ 6516]
Re-add javabsp's F2 patch. I didn't feel like taking it out of my CVS
again, and I think he'll be able to get it working without the weird
highlight behavior.
Also fixed the ctlr+a/ctrl+pgup/ctrl+pgdown thing in gtkimhtml rather
than gtkconv.c. So now it applies to info windows and other stuff.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 09 Jul 2003 00:33:06 +0000 |
parents | 2cd7c409d71d |
children | 97835d03f0bb |
comparison
equal
deleted
inserted
replaced
6065:3a40666c08b4 | 6066:c99959f1bb73 |
---|---|
1400 | 1400 |
1401 return FALSE; | 1401 return FALSE; |
1402 } | 1402 } |
1403 | 1403 |
1404 /* | 1404 /* |
1405 * This function exists to work around some gross bugs in GtkTextView. | |
1406 * Basically, we short circuit ctrl+a and ctrl+end because they make | |
1407 * Gaim go boom. | |
1408 * | |
1409 * It's supposed to be fixed in gtk2.2. You can view the bug report at | |
1410 * http://bugzilla.gnome.org/show_bug.cgi?id=107939 | |
1411 */ | |
1412 static gboolean | |
1413 textview_key_pressed_cb(GtkWidget *entry, GdkEventKey *event, gpointer data) | |
1414 { | |
1415 if (event->state & GDK_CONTROL_MASK) | |
1416 switch (event->keyval) { | |
1417 case 'a': | |
1418 return TRUE; | |
1419 break; | |
1420 | |
1421 case GDK_Home: | |
1422 return TRUE; | |
1423 break; | |
1424 | |
1425 case GDK_End: | |
1426 return TRUE; | |
1427 break; | |
1428 } | |
1429 | |
1430 return FALSE; | |
1431 } | |
1432 | |
1433 /* | |
1434 * NOTE: | 1405 * NOTE: |
1435 * This guy just kills a single right click from being propagated any | 1406 * This guy just kills a single right click from being propagated any |
1436 * further. I have no idea *why* we need this, but we do ... It | 1407 * further. I have no idea *why* we need this, but we do ... It |
1437 * prevents right clicks on the GtkTextView in a convo dialog from | 1408 * prevents right clicks on the GtkTextView in a convo dialog from |
1438 * going all the way down to the notebook. I suspect a bug in | 1409 * going all the way down to the notebook. I suspect a bug in |
3584 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(gtkconv->entry), GTK_WRAP_WORD_CHAR); | 3555 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(gtkconv->entry), GTK_WRAP_WORD_CHAR); |
3585 gtk_widget_set_size_request(gtkconv->entry, -1, | 3556 gtk_widget_set_size_request(gtkconv->entry, -1, |
3586 MAX(gaim_prefs_get_int("/gaim/gtk/conversations/im/entry_height"), | 3557 MAX(gaim_prefs_get_int("/gaim/gtk/conversations/im/entry_height"), |
3587 25)); | 3558 25)); |
3588 | 3559 |
3589 /* Connect the signal handlers. */ | |
3590 /* XXX - This first one should be removed eventually. It exists to | |
3591 * work around a gtk bug. See the callback comments for more info. */ | |
3592 g_signal_connect(G_OBJECT(gtkconv->imhtml), "key_press_event", | |
3593 G_CALLBACK(textview_key_pressed_cb), conv); | |
3594 g_signal_connect_swapped(G_OBJECT(gtkconv->entry), "key_press_event", | 3560 g_signal_connect_swapped(G_OBJECT(gtkconv->entry), "key_press_event", |
3595 G_CALLBACK(entry_key_pressed_cb_1), | 3561 G_CALLBACK(entry_key_pressed_cb_1), |
3596 gtkconv->entry_buffer); | 3562 gtkconv->entry_buffer); |
3597 g_signal_connect(G_OBJECT(gtkconv->entry), "key_press_event", | 3563 g_signal_connect(G_OBJECT(gtkconv->entry), "key_press_event", |
3598 G_CALLBACK(entry_key_pressed_cb_2), conv); | 3564 G_CALLBACK(entry_key_pressed_cb_2), conv); |