Tue, 06 Nov 2018 03:21:37 +0000
Merged in default (pull request #419)
Fix a collection of non-deprecated-declarations gcc warnings
Approved-by: Elliott Sales de Andrade
Approved-by: Gary Kramlich
Approved-by: Eion Robb
--- a/libpurple/protocols/gg/multilogon.c Tue Nov 06 03:20:49 2018 +0000 +++ b/libpurple/protocols/gg/multilogon.c Tue Nov 06 03:21:37 2018 +0000 @@ -116,14 +116,12 @@ return sid; } -static gg_multilogon_id_t -ggp_multilogon_sid_to_libgadu(uint64_t sid) +static void +ggp_multilogon_sid_to_libgadu(uint64_t sid, gg_multilogon_id_t *lsid) { - gg_multilogon_id_t lsid; + g_return_if_fail(lsid != NULL); - memcpy(lsid.id, &sid, sizeof(uint64_t)); - - return lsid; + memcpy(lsid->id, &sid, sizeof(uint64_t)); } static void @@ -190,12 +188,13 @@ GGPInfo *accdata = purple_connection_get_protocol_data(gc); uint64_t sid; gpointer key; + gg_multilogon_id_t lsid; key = purple_request_datasheet_record_get_key(rec); sid = ggp_keymapper_from_key(mldata->sid_mapper, key); - gg_multilogon_disconnect(accdata->session, - ggp_multilogon_sid_to_libgadu(sid)); + ggp_multilogon_sid_to_libgadu(sid, &lsid); + gg_multilogon_disconnect(accdata->session, lsid); purple_request_datasheet_record_remove( purple_request_datasheet_record_get_datasheet(rec), key);
--- a/pidgin/gtkblist.c Tue Nov 06 03:20:49 2018 +0000 +++ b/pidgin/gtkblist.c Tue Nov 06 03:21:37 2018 +0000 @@ -3666,7 +3666,7 @@ { "OnlineHelp", GTK_STOCK_HELP, N_("Online _Help"), "F1", NULL, gtk_blist_show_onlinehelp_cb }, { "DebugWindow", NULL, N_("_Debug Window"), NULL, NULL, toggle_debug }, { "PluginInformation", NULL, N_("_Plugin Information"), NULL, NULL, pidgin_dialogs_plugins_info }, - { "About", GTK_STOCK_ABOUT, N_("_About"), NULL, NULL, _pidgin_about_cb }, + { "About", GTK_STOCK_ABOUT, N_("_About"), NULL, NULL, G_CALLBACK(_pidgin_about_cb) }, }; /* Toggle items */
--- a/pidgin/gtkconv.c Tue Nov 06 03:20:49 2018 +0000 +++ b/pidgin/gtkconv.c Tue Nov 06 03:21:37 2018 +0000 @@ -1694,7 +1694,9 @@ real_who = purple_protocol_chat_iface_get_user_real_name(protocol, gc, purple_chat_conversation_get_id(chat), who); - if (!purple_protocol_xfer_can_receive(protocol, gc, real_who ? real_who : who)) { + if (!purple_protocol_xfer_can_receive( + PURPLE_PROTOCOL_XFER(protocol), + gc, real_who ? real_who : who)) { can_receive_file = FALSE; } @@ -8874,17 +8876,21 @@ now = gtk_rc_get_style_by_paths(settings, styles[iter].labelname, NULL, G_TYPE_NONE); if (parent == now || (parent && now && parent->rc_style == now->rc_style)) { - GdkColor color; - gdk_color_parse(styles[iter].color, &color); + GdkRGBA color; + gchar *color_str; + + gdk_rgba_parse(&color, styles[iter].color); pidgin_style_adjust_contrast(gtk_widget_get_default_style(), &color); + color_str = gdk_rgba_to_string(&color); g_string_append_printf(str, "style \"%s\" {\n" "fg[ACTIVE] = \"%s\"\n" "}\n" "widget \"*%s\" style \"%s\"\n", styles[iter].stylename, - gdk_color_to_string(&color), + color_str, styles[iter].labelname, styles[iter].stylename); + g_free(color_str); } } gtk_rc_parse_string(str->str); @@ -11141,7 +11147,7 @@ lmax = lbg, lmin = lfg; nr = lmax + 0.05, dr = lmin - 0.05; - if ( dr == 0 ) + if (dr < 0.005 && dr > -0.005) dr += 0.01; luminosity_ratio = nr/dr;
--- a/pidgin/gtksavedstatuses.c Tue Nov 06 03:20:49 2018 +0000 +++ b/pidgin/gtksavedstatuses.c Tue Nov 06 03:21:37 2018 +0000 @@ -1380,7 +1380,6 @@ GtkWidget *hbox; GtkWidget *editor; GtkWidget *label; - GtkWidget *text; GtkWidget *vbox; GtkWidget *win; GtkTreeIter iter;
--- a/pidgin/gtkstyle.c Tue Nov 06 03:20:49 2018 +0000 +++ b/pidgin/gtkstyle.c Tue Nov 06 03:21:37 2018 +0000 @@ -47,24 +47,16 @@ } void -pidgin_style_adjust_contrast(GtkStyle *style, GdkColor *color) { +pidgin_style_adjust_contrast(GtkStyle *style, GdkRGBA *rgba) { if (pidgin_style_is_dark(style)) { - gdouble r, g, b, h, s, v; + gdouble h, s, v; - r = ((gdouble) color->red) / 65535.0; - g = ((gdouble) color->green) / 65535.0; - b = ((gdouble) color->blue) / 65535.0; - - gtk_rgb_to_hsv(r, g, b, &h, &s, &v); + gtk_rgb_to_hsv(rgba->red, rgba->green, rgba->blue, &h, &s, &v); v += 0.3; v = v > 1.0 ? 1.0 : v; s = 0.7; - gtk_hsv_to_rgb(h, s, v, &r, &g, &b); - - color->red = (guint16) (r * 65535.0); - color->green = (guint16) (g * 65535.0); - color->blue = (guint16) (b * 65535.0); + gtk_hsv_to_rgb(h, s, v, &rgba->red, &rgba->green, &rgba->blue); } }
--- a/pidgin/gtkstyle.h Tue Nov 06 03:20:49 2018 +0000 +++ b/pidgin/gtkstyle.h Tue Nov 06 03:21:37 2018 +0000 @@ -52,7 +52,7 @@ * Lighten a color if dark mode is enabled. */ -void pidgin_style_adjust_contrast(GtkStyle *style, GdkColor *color); +void pidgin_style_adjust_contrast(GtkStyle *style, GdkRGBA *color); G_END_DECLS
--- a/pidgin/gtkutils.c Tue Nov 06 03:20:49 2018 +0000 +++ b/pidgin/gtkutils.c Tue Nov 06 03:21:37 2018 +0000 @@ -1386,7 +1386,7 @@ } shortname = strrchr(data->filename, G_DIR_SEPARATOR); shortname = shortname ? shortname + 1 : data->filename; - img = purple_image_new_from_data(filedata, size); + img = purple_image_new_from_data((guint8 *)filedata, size); purple_image_set_friendly_filename(img, shortname); pidgin_webview_insert_image(PIDGIN_WEBVIEW(gtkconv->entry), img); @@ -1438,10 +1438,13 @@ im = TRUE; if (protocol && PURPLE_IS_PROTOCOL_XFER(protocol)) { - PurpleProtocolXferInterface *iface = PURPLE_PROTOCOL_XFER(protocol); + PurpleProtocolXferInterface *iface = + PURPLE_PROTOCOL_XFER_GET_IFACE(protocol); if(iface->can_receive) { - ft = purple_protocol_xfer_can_receive(protocol, gc, who); + ft = purple_protocol_xfer_can_receive( + PURPLE_PROTOCOL_XFER(protocol), + gc, who); } else { ft = (iface->send_file) ? TRUE : FALSE; } @@ -2356,7 +2359,7 @@ g_strfreev(protocol_formats); return NULL; } - original = g_object_ref(G_OBJECT(pixbuf)); + original = g_object_ref(pixbuf); new_width = orig_width; new_height = orig_height;
--- a/pidgin/gtkwebviewtoolbar.c Tue Nov 06 03:20:49 2018 +0000 +++ b/pidgin/gtkwebviewtoolbar.c Tue Nov 06 03:21:37 2018 +0000 @@ -1063,7 +1063,7 @@ GObject *object; g_return_if_fail(toolbar); - object = g_object_ref(action); + object = g_object_ref(G_OBJECT(action)); g_signal_handlers_block_matched(object, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, toolbar);