im.pidgin.pidgin: 3a3d731ceddf62d569fa8c7488782167189f44c1

Sean Egan seanegan at gmail.com
Thu Jan 17 15:54:13 EST 2008


I disapproved this because it was crashing like crazy (on nearly every
mouse click, or even some mouse movements). The same problem is
reported as #4666. It doesn't crash for me at all at home, and I don't
see anything wrong with the code, so I suspect it might be a GTK+ bug
that was fixed between 2.10.6 (what I'm using here, and whatever I'm
using at home). I'll investigate more and try to see if we can
disapprove the disapproval.

On Jan 11, 2008 11:50 PM,  <sadrul at pidgin.im> wrote:
> -----------------------------------------------------------------
> Revision: 3a3d731ceddf62d569fa8c7488782167189f44c1
> Ancestor: a3b0a4bc8d84102e8fd94d00e19e2919a1dfa2b3
> Author: sadrul at pidgin.im
> Date: 2008-01-12T05:37:12
> Branch: im.pidgin.pidgin
>
> Modified files:
>         pidgin/gtkimhtml.c
>
> ChangeLog:
>
> Use the 'invisible' property for text-tags (only in GTK+2.8 or above). This allows toggling on/off the timestamps on existing conversation history. References #3829.
>
>
> ============================================================
> --- pidgin/gtkimhtml.c  a05ea766de39e957c48f577279b12d590b9edd25
> +++ pidgin/gtkimhtml.c  de585f215fc728cae65c8d8a2448e12462065530
> @@ -1455,6 +1455,9 @@ static void gtk_imhtml_init (GtkIMHtml *
>         gtk_text_buffer_create_tag(imhtml->text_buffer, "SUP", "rise", 5000, NULL);
>         gtk_text_buffer_create_tag(imhtml->text_buffer, "PRE", "family", "Monospace", NULL);
>         gtk_text_buffer_create_tag(imhtml->text_buffer, "search", "background", "#22ff00", "weight", "bold", NULL);
> +#if GTK_CHECK_VERSION(2,8,0)
> +       gtk_text_buffer_create_tag(imhtml->text_buffer, "comment", "invisible", FALSE, NULL);
> +#endif
>
>         /* When hovering over a link, we show the hand cursor--elsewhere we show the plain ol' pointer cursor */
>         imhtml->hand_cursor = gdk_cursor_new (GDK_HAND2);
> @@ -2981,10 +2984,15 @@ void gtk_imhtml_insert_html_at_iter(GtkI
>
>                                         gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
>
> +#if GTK_CHECK_VERSION(2,8,0)
> +                                       wpos = g_snprintf (ws, len, "%s", tag);
> +                                       gtk_text_buffer_insert_with_tags_by_name(imhtml->text_buffer, iter, ws, wpos, "comment", NULL);
> +#else
>                                         if (imhtml->show_comments && !(options & GTK_IMHTML_NO_COMMENTS)) {
>                                                 wpos = g_snprintf (ws, len, "%s", tag);
>                                                 gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
>                                         }
> +#endif
>                                         ws[0] = '\0'; wpos = 0;
>
>                                         /* NEW_BIT (NEW_COMMENT_BIT); */
> @@ -3130,6 +3138,12 @@ void       gtk_imhtml_show_comments    (
>  void       gtk_imhtml_show_comments    (GtkIMHtml        *imhtml,
>                                         gboolean          show)
>  {
> +#if GTK_CHECK_VERSION(2,8,0)
> +       GtkTextTag *tag;
> +       tag = gtk_text_tag_table_lookup(gtk_text_buffer_get_tag_table(imhtml->text_buffer), "comment");
> +       if (tag)
> +               g_object_set(G_OBJECT(tag), "invisible", !show, NULL);
> +#endif
>         imhtml->show_comments = show;
>  }
>
>
> _______________________________________________
> Commits mailing list
> Commits at pidgin.im
> http://pidgin.im/cgi-bin/mailman/listinfo/commits
>
>




More information about the Devel mailing list