--- a/pidgin/gtkimhtml.c Thu Jun 03 19:31:56 2021 -0500
+++ b/pidgin/gtkimhtml.c Thu Jun 03 19:33:07 2021 -0500
@@ -354,7 +354,9 @@
index = GPOINTER_TO_INT(pos) - GPOINTER_TO_INT(t->values->str);
- t = t->children [index];
+ if(t->children != NULL) { + t = t->children [index]; @@ -544,7 +546,7 @@
- gint gap, x, y, h, w, scr_w, baseline_skip;
+ gint x, y, h, w, scr_w, baseline_skip; g_return_val_if_fail(GTK_IS_IMHTML(imhtml), FALSE);
@@ -598,11 +600,7 @@
font_metrics = pango_font_get_metrics(font, NULL);
pango_layout_get_pixel_size(layout, &scr_w, NULL);
- gap = PANGO_PIXELS((pango_font_metrics_get_ascent(font_metrics) +
- pango_font_metrics_get_descent(font_metrics))/ 4);
baseline_skip = PANGO_PIXELS(pango_font_metrics_get_ascent(font_metrics) +
pango_font_metrics_get_descent(font_metrics));
@@ -2735,7 +2733,8 @@
if ((bold == 0) && (imhtml->format_functions & GTK_IMHTML_BOLD))
gtk_imhtml_toggle_bold(imhtml);
- ws[0] = '\0'; wpos = 0;
@@ -2743,7 +2742,8 @@
if (!(options & GTK_IMHTML_NO_FORMATTING)) {
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
@@ -2757,7 +2757,8 @@
if (!(options & GTK_IMHTML_NO_FORMATTING)) {
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
if ((italics == 0) && (imhtml->format_functions & GTK_IMHTML_ITALIC))
gtk_imhtml_toggle_italic(imhtml);
@@ -2768,7 +2769,8 @@
if (!(options & GTK_IMHTML_NO_FORMATTING)) {
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
if ((italics == 0) && (imhtml->format_functions & GTK_IMHTML_ITALIC) && !imhtml->wbfo)
@@ -2780,7 +2782,8 @@
if (!(options & GTK_IMHTML_NO_FORMATTING)) {
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
if ((underline == 0) && (imhtml->format_functions & GTK_IMHTML_UNDERLINE))
gtk_imhtml_toggle_underline(imhtml);
@@ -2790,7 +2793,8 @@
case 12: /* /UNDERLINE */
if (!(options & GTK_IMHTML_NO_FORMATTING)) {
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
if ((underline == 0) && (imhtml->format_functions & GTK_IMHTML_UNDERLINE) && !imhtml->wbfo)
@@ -2801,7 +2805,8 @@
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
if ((strike == 0) && (imhtml->format_functions & GTK_IMHTML_STRIKE))
gtk_imhtml_toggle_strike(imhtml);
@@ -2809,7 +2814,8 @@
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
if ((strike == 0) && (imhtml->format_functions & GTK_IMHTML_STRIKE) && !imhtml->wbfo)
@@ -2887,7 +2893,8 @@
gtk_text_view_get_right_margin(GTK_TEXT_VIEW(imhtml));
scalable->scale(scalable, rect.width - minus, rect.height);
imhtml->scalables = g_list_append(imhtml->scalables, sd);
- ws[0] = '\0'; wpos = 0;
@@ -2896,7 +2903,8 @@
if (fonts && !imhtml->wbfo) {
GtkIMHtmlFontDetail *font = fonts->data;
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
/* NEW_BIT (NEW_TEXT_BIT); */
if (font->face && (imhtml->format_functions & GTK_IMHTML_FACE)) {
@@ -2936,7 +2944,8 @@
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
gtk_imhtml_toggle_link(imhtml, NULL);
- ws[0] = '\0'; wpos = 0;
@@ -2948,7 +2957,8 @@
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
gtk_imhtml_toggle_background(imhtml, NULL);
@@ -2970,7 +2980,8 @@
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
font = g_new0 (GtkIMHtmlFontDetail, 1);
@@ -3029,7 +3040,8 @@
char *bgcolor = gtk_imhtml_get_html_opt (tag, "BGCOLOR=");
if (bgcolor && (imhtml->format_functions & GTK_IMHTML_BACKCOLOR)) {
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
/* NEW_BIT(NEW_TEXT_BIT); */
@@ -3043,7 +3055,8 @@
gchar *href = gtk_imhtml_get_html_opt (tag, "HREF=");
if (href && (imhtml->format_functions & GTK_IMHTML_LINK)) {
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
gtk_imhtml_toggle_link(imhtml, href);
@@ -3055,7 +3068,8 @@
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
if (!(imhtml->format_functions & GTK_IMHTML_IMAGE))
@@ -3124,7 +3138,8 @@
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
/* NEW_BIT (NEW_TEXT_BIT); */
/* Bi-Directional text support */
@@ -3136,7 +3151,8 @@
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
@@ -3285,7 +3301,8 @@
GtkIMHtmlFontDetail *oldfont = NULL;
GtkIMHtmlFontDetail *font = fonts->data;
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
/* NEW_BIT (NEW_TEXT_BIT); */
fonts = g_slist_remove (fonts, font);
@@ -3356,7 +3373,8 @@
gtk_text_buffer_insert_with_tags_by_name(imhtml->text_buffer, iter, ws, wpos, "comment", NULL);
- ws[0] = '\0'; wpos = 0;
/* NEW_BIT (NEW_COMMENT_BIT); */
@@ -3382,7 +3400,7 @@
sml = imhtml->protocol_name;
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- wpos = g_snprintf (ws, smilelen + 1, "%s", c);
+ g_snprintf (ws, smilelen + 1, "%s", c); gtk_imhtml_insert_smiley_at_iter(imhtml, sml, ws, iter);
@@ -3402,7 +3420,8 @@
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
/* NEW_BIT (NEW_TEXT_BIT); */
} else if (!br) { /* Don't insert a space immediately after an HTML break */
/* A newline is defined by HTML as whitespace, which means we have to replace it with a word boundary.
@@ -3413,7 +3432,8 @@
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
@@ -3424,7 +3444,8 @@
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
/* Skip the next len_protocol characters, but
@@ -3449,7 +3470,8 @@
gtk_imhtml_toggle_link(imhtml, ws);
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
gtk_imhtml_toggle_link(imhtml, NULL);
@@ -3461,7 +3483,8 @@
gtk_text_buffer_insert(imhtml->text_buffer, iter, ws, wpos);
- ws[0] = '\0'; wpos = 0;
/* NEW_BIT(NEW_TEXT_BIT); */
@@ -3487,7 +3510,7 @@
gtk_text_buffer_insert(imhtml->text_buffer, &line_iter, ws, wpos);
gtk_text_buffer_get_end_iter(gtk_text_iter_get_buffer(&line_iter), iter);
- ws[0] = '\0'; wpos = 0;
--- a/pidgin/plugins/transparency.c Thu Jun 03 19:31:56 2021 -0500
+++ b/pidgin/plugins/transparency.c Thu Jun 03 19:33:07 2021 -0500
@@ -76,7 +76,10 @@
/* Set window transparency level */
static void set_wintrans(GtkWidget *window, int alpha, gboolean enabled,
- gboolean always_on_top) {
+ gboolean always_on_top) + g_return_if_fail(GTK_IS_WIDGET(window)); gdk_window_set_opacity(window->window, alpha / 255.0);
gdk_window_set_keep_above(window->window, always_on_top);
@@ -530,7 +533,7 @@
G_CALLBACK(update_convs_wintrans),
(gpointer) OPT_WINTRANS_IM_SLIDER);
- button = pidgin_prefs_checkbox(
_("Remove IM window transparency on focus"),
OPT_WINTRANS_IM_ONFOCUS, trans_box);
@@ -579,7 +582,7 @@
gtk_widget_show(trans_box);
g_signal_connect(GTK_OBJECT(button), "clicked",
G_CALLBACK(pidgin_toggle_sensitive), trans_box);
- button = pidgin_prefs_checkbox(
_("Remove Buddy List window transparency on focus"),
OPT_WINTRANS_BL_ONFOCUS, trans_box);
button = pidgin_prefs_checkbox(_("Always on top"), OPT_WINTRANS_BL_ONTOP,