Mercurial > pidgin.yaz
comparison src/gtkimhtml.c @ 8932:849507541e86
[gaim-migrate @ 9702]
Edits some comments, and removes some old commented out code, that I
forgot to remove before.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Sat, 15 May 2004 06:24:52 +0000 |
parents | 73223e21b943 |
children | 97a1f314b051 |
comparison
equal
deleted
inserted
replaced
8931:73223e21b943 | 8932:849507541e86 |
---|---|
868 (GtkClipboardGetFunc)gtk_imhtml_clipboard_get, | 868 (GtkClipboardGetFunc)gtk_imhtml_clipboard_get, |
869 (GtkClipboardClearFunc)gtk_imhtml_primary_clipboard_clear, G_OBJECT(imhtml)); | 869 (GtkClipboardClearFunc)gtk_imhtml_primary_clipboard_clear, G_OBJECT(imhtml)); |
870 } | 870 } |
871 } | 871 } |
872 | 872 |
873 /* does this go in the #ifdef too? I need to keep track of which functions are 2.2 only */ | |
874 /* adapted from gtktextview.c */ | |
875 static gboolean gtk_imhtml_button_press_event(GtkIMHtml *imhtml, GdkEventButton *event, gpointer unused) | 873 static gboolean gtk_imhtml_button_press_event(GtkIMHtml *imhtml, GdkEventButton *event, gpointer unused) |
876 { | 874 { |
877 if (event->button == 2) { | 875 if (event->button == 2) { |
878 int x, y; | 876 int x, y; |
879 GtkTextIter iter; | 877 GtkTextIter iter; |
1001 gtk_text_view_set_right_margin(GTK_TEXT_VIEW(imhtml), 2); | 999 gtk_text_view_set_right_margin(GTK_TEXT_VIEW(imhtml), 2); |
1002 /*gtk_text_view_set_indent(GTK_TEXT_VIEW(imhtml), -15);*/ | 1000 /*gtk_text_view_set_indent(GTK_TEXT_VIEW(imhtml), -15);*/ |
1003 /*gtk_text_view_set_justification(GTK_TEXT_VIEW(imhtml), GTK_JUSTIFY_FILL);*/ | 1001 /*gtk_text_view_set_justification(GTK_TEXT_VIEW(imhtml), GTK_JUSTIFY_FILL);*/ |
1004 | 1002 |
1005 /* These tags will be used often and can be reused--we create them on init and then apply them by name | 1003 /* These tags will be used often and can be reused--we create them on init and then apply them by name |
1006 * other tags (color, size, face, etc.) will have to be created and applied dynamically */ | 1004 * other tags (color, size, face, etc.) will have to be created and applied dynamically |
1005 * Note that even though we created STRIKE, SUB, SUP, and PRE tags here, we don't really | |
1006 * apply them anywhere yet. */ | |
1007 gtk_text_buffer_create_tag(imhtml->text_buffer, "BOLD", "weight", PANGO_WEIGHT_BOLD, NULL); | 1007 gtk_text_buffer_create_tag(imhtml->text_buffer, "BOLD", "weight", PANGO_WEIGHT_BOLD, NULL); |
1008 gtk_text_buffer_create_tag(imhtml->text_buffer, "ITALICS", "style", PANGO_STYLE_ITALIC, NULL); | 1008 gtk_text_buffer_create_tag(imhtml->text_buffer, "ITALICS", "style", PANGO_STYLE_ITALIC, NULL); |
1009 gtk_text_buffer_create_tag(imhtml->text_buffer, "UNDERLINE", "underline", PANGO_UNDERLINE_SINGLE, NULL); | 1009 gtk_text_buffer_create_tag(imhtml->text_buffer, "UNDERLINE", "underline", PANGO_UNDERLINE_SINGLE, NULL); |
1010 gtk_text_buffer_create_tag(imhtml->text_buffer, "STRIKE", "strikethrough", TRUE, NULL); | 1010 gtk_text_buffer_create_tag(imhtml->text_buffer, "STRIKE", "strikethrough", TRUE, NULL); |
1011 gtk_text_buffer_create_tag(imhtml->text_buffer, "SUB", "rise", -5000, NULL); | 1011 gtk_text_buffer_create_tag(imhtml->text_buffer, "SUB", "rise", -5000, NULL); |
1041 g_signal_connect(G_OBJECT(imhtml), "drag_data_received", G_CALLBACK(gtk_imhtml_link_drag_rcv_cb), imhtml); | 1041 g_signal_connect(G_OBJECT(imhtml), "drag_data_received", G_CALLBACK(gtk_imhtml_link_drag_rcv_cb), imhtml); |
1042 | 1042 |
1043 g_signal_connect(G_OBJECT(imhtml), "copy-clipboard", G_CALLBACK(copy_clipboard_cb), NULL); | 1043 g_signal_connect(G_OBJECT(imhtml), "copy-clipboard", G_CALLBACK(copy_clipboard_cb), NULL); |
1044 g_signal_connect(G_OBJECT(imhtml), "cut-clipboard", G_CALLBACK(cut_clipboard_cb), NULL); | 1044 g_signal_connect(G_OBJECT(imhtml), "cut-clipboard", G_CALLBACK(cut_clipboard_cb), NULL); |
1045 g_signal_connect(G_OBJECT(imhtml), "paste-clipboard", G_CALLBACK(paste_clipboard_cb), NULL); | 1045 g_signal_connect(G_OBJECT(imhtml), "paste-clipboard", G_CALLBACK(paste_clipboard_cb), NULL); |
1046 //g_signal_connect_after(G_OBJECT(imhtml), "button-release-event", G_CALLBACK(button_release_cb), imhtml); | |
1047 g_signal_connect_after(G_OBJECT(imhtml), "realize", G_CALLBACK(imhtml_realized_remove_primary), NULL); | 1046 g_signal_connect_after(G_OBJECT(imhtml), "realize", G_CALLBACK(imhtml_realized_remove_primary), NULL); |
1048 g_signal_connect(G_OBJECT(imhtml), "unrealize", G_CALLBACK(imhtml_destroy_add_primary), NULL); | 1047 g_signal_connect(G_OBJECT(imhtml), "unrealize", G_CALLBACK(imhtml_destroy_add_primary), NULL); |
1049 | 1048 |
1050 g_signal_connect_after(G_OBJECT(GTK_IMHTML(imhtml)->text_buffer), "mark-set", | 1049 g_signal_connect_after(G_OBJECT(GTK_IMHTML(imhtml)->text_buffer), "mark-set", |
1051 G_CALLBACK(mark_set_so_update_selection_cb), imhtml); | 1050 G_CALLBACK(mark_set_so_update_selection_cb), imhtml); |
2443 if (font->back) | 2442 if (font->back) |
2444 g_free (font->back); | 2443 g_free (font->back); |
2445 if (font->sml) | 2444 if (font->sml) |
2446 g_free (font->sml); | 2445 g_free (font->sml); |
2447 g_free (font); | 2446 g_free (font); |
2448 //if (str) | 2447 } |
2449 // str = g_string_append (str, "</FONT>"); | 2448 |
2450 } | 2449 g_free(ws); |
2451 #if 0 | 2450 if (bg) |
2452 if (str) { | |
2453 while (bold) { | |
2454 // str = g_string_append (str, "</B>"); | |
2455 bold--; | |
2456 } | |
2457 while (italics) { | |
2458 // str = g_string_append (str, "</I>"); | |
2459 italics--; | |
2460 } | |
2461 while (underline) { | |
2462 //str = g_string_append (str, "</U>"); | |
2463 underline--; | |
2464 } | |
2465 while (strike) { | |
2466 //str = g_string_append (str, "</S>"); | |
2467 strike--; | |
2468 } | |
2469 while (sub) { | |
2470 //str = g_string_append (str, "</SUB>"); | |
2471 sub--; | |
2472 } | |
2473 while (sup) { | |
2474 //str = g_string_append (str, "</SUP>"); | |
2475 sup--; | |
2476 } | |
2477 while (title) { | |
2478 //str = g_string_append (str, "</TITLE>"); | |
2479 title--; | |
2480 } | |
2481 while (pre) { | |
2482 //str = g_string_append (str, "</PRE>"); | |
2483 pre--; | |
2484 } | |
2485 } | |
2486 #endif | |
2487 g_free (ws); | |
2488 if(bg) | |
2489 g_free(bg); | 2451 g_free(bg); |
2490 | 2452 |
2491 if (!imhtml->wbfo) | 2453 if (!imhtml->wbfo) |
2492 gtk_imhtml_close_tags(imhtml, iter); | 2454 gtk_imhtml_close_tags(imhtml, iter); |
2493 | 2455 |