Mercurial > pidgin
comparison src/gtkimhtml.c @ 8466:5562e8a74c94
[gaim-migrate @ 9196]
" if the user has the pref set to false, we're still
handling the key.. This is bad if for instance.. the
user wants to do something like ctrl-shift-b-3 to
display a superscripted 3. This patch makes the
callback function return FALSE so that it will
propergate down to the GtkTextView and give the user
the desired behavior.
i realized this will conflict when i finish 9, 10, and 11 on
simguys list, and since i already had 11 done.. I'll just
throw it in with this.. so here's the updated update patch ;)
simguy's imhtml bug 11 is that the italic and underline
buttons don't get toggled when you press ctrl-i ctrl-u this
fixes that as well as my initial comment ;)" --Gary Kramlich
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 17 Mar 2004 20:23:44 +0000 |
parents | daeeb96cdf8f |
children | 12fe38c195a6 |
comparison
equal
deleted
inserted
replaced
8465:4b4547b23fac | 8466:5562e8a74c94 |
---|---|
391 if(imhtml->html_shortcuts) { | 391 if(imhtml->html_shortcuts) { |
392 gtk_imhtml_toggle_bold(imhtml); | 392 gtk_imhtml_toggle_bold(imhtml); |
393 object = g_object_ref(G_OBJECT(imhtml)); | 393 object = g_object_ref(G_OBJECT(imhtml)); |
394 g_signal_emit(object, signals[TOGGLE_FORMAT], 0, GTK_IMHTML_BOLD); | 394 g_signal_emit(object, signals[TOGGLE_FORMAT], 0, GTK_IMHTML_BOLD); |
395 g_object_unref(object); | 395 g_object_unref(object); |
396 return TRUE; | |
396 } | 397 } |
397 } | 398 } |
398 return TRUE; | 399 return FALSE; |
399 break; | 400 break; |
400 | 401 |
401 case 'f': | 402 case 'f': |
402 case 'F': | 403 case 'F': |
403 /*set_toggle(gtkconv->toolbar.font, | 404 /*set_toggle(gtkconv->toolbar.font, |
408 break; | 409 break; |
409 | 410 |
410 case 'i': | 411 case 'i': |
411 case 'I': | 412 case 'I': |
412 if (imhtml->format_functions & GTK_IMHTML_ITALIC) | 413 if (imhtml->format_functions & GTK_IMHTML_ITALIC) |
413 if(imhtml->html_shortcuts) | 414 if(imhtml->html_shortcuts) { |
414 gtk_imhtml_toggle_italic(imhtml); | 415 gtk_imhtml_toggle_italic(imhtml); |
415 return TRUE; | 416 object = g_object_ref(G_OBJECT(imhtml)); |
417 g_signal_emit(object, signals[TOGGLE_FORMAT], 0, GTK_IMHTML_ITALIC); | |
418 g_object_unref(object); | |
419 return TRUE; | |
420 } | |
421 return FALSE; | |
416 break; | 422 break; |
417 | 423 |
418 case 'u': /* ctrl-u is GDK_Clear, which clears the line. */ | 424 case 'u': /* ctrl-u is GDK_Clear, which clears the line. */ |
419 case 'U': | 425 case 'U': |
420 if (imhtml->format_functions & GTK_IMHTML_UNDERLINE) | 426 if (imhtml->format_functions & GTK_IMHTML_UNDERLINE) |
421 if(imhtml->html_shortcuts) | 427 if(imhtml->html_shortcuts) { |
422 gtk_imhtml_toggle_underline(imhtml); | 428 gtk_imhtml_toggle_underline(imhtml); |
423 return TRUE; | 429 object = g_object_ref(G_OBJECT(imhtml)); |
430 g_signal_emit(object, signals[TOGGLE_FORMAT], 0, GTK_IMHTML_UNDERLINE); | |
431 g_object_unref(object); | |
432 return TRUE; | |
433 } | |
434 return FALSE; | |
424 break; | 435 break; |
425 | 436 |
426 case '-': | 437 case '-': |
427 if (imhtml->format_functions & GTK_IMHTML_SHRINK) | 438 if (imhtml->format_functions & GTK_IMHTML_SHRINK) |
428 gtk_imhtml_font_shrink(imhtml); | 439 gtk_imhtml_font_shrink(imhtml); |