/soc/2013/ankitkv/gobjectification: 8b63b9948107: Merged default...
Ankit Vani
a at nevitus.org
Fri May 9 18:29:07 EDT 2014
Changeset: 8b63b99481079f9f2eac4ac5f89c87b9a6cd7a1d
Author: Ankit Vani <a at nevitus.org>
Date: 2014-05-10 03:56 +0530
Branch: soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/8b63b9948107
Description:
Merged default branch
diffstat:
ChangeLog | 21 +++-
Makefile.am | 4 +-
autogen.sh | 1 -
finch/gntaccount.c | 22 ++--
finch/gntdebug.c | 1 +
finch/gntnotify.c | 2 +
finch/gntprefs.c | 6 +-
finch/gntrequest.c | 7 +-
finch/libfinch.c | 6 +-
finch/libgnt/gntbox.c | 4 +-
finch/libgnt/gntcheckbox.c | 2 +-
finch/libgnt/gntcombobox.c | 2 +-
finch/libgnt/gntentry.c | 2 +-
finch/libgnt/gnttextview.c | 2 +-
finch/libgnt/gntwidget.c | 2 +
finch/libgnt/gntwm.c | 4 +-
finch/libgnt/gntws.c | 2 +
finch/libgnt/wms/irssi.c | 2 +-
libpurple/accountopt.c | 18 +++
libpurple/accountopt.h | 25 +++++
libpurple/dnsquery.c | 4 +-
libpurple/dnssrv.c | 6 +
libpurple/log.c | 38 +++++--
libpurple/mediamanager.c | 6 +-
libpurple/network.c | 5 +-
libpurple/plugins/log_reader.c | 34 ++++--
libpurple/plugins/perl/common/Cipher.xs | 6 +
libpurple/plugins/perl/perl-common.c | 3 +-
libpurple/protocols/bonjour/bonjour_ft.c | 3 +-
libpurple/protocols/bonjour/jabber.c | 28 ++++-
libpurple/protocols/irc/cmds.c | 90 +++++++++++++----
libpurple/protocols/irc/dcc_send.c | 3 +-
libpurple/protocols/jabber/Makefile.am | 2 +
libpurple/protocols/jabber/chat.c | 3 +-
libpurple/protocols/jabber/facebook.c | 86 ++++++++++++-----
libpurple/protocols/jabber/facebook_roster.c | 135 +++++++++++++++++++++++++++
libpurple/protocols/jabber/facebook_roster.h | 35 +++++++
libpurple/protocols/jabber/jabber.c | 4 +-
libpurple/protocols/jabber/jabber.h | 5 +
libpurple/protocols/jabber/roster.c | 10 +-
libpurple/protocols/jabber/si.c | 3 +-
libpurple/protocols/msn/contact.c | 1 +
libpurple/protocols/msn/msnutils.c | 2 +-
libpurple/protocols/oscar/family_auth.c | 2 +-
libpurple/protocols/oscar/family_icbm.c | 8 +-
libpurple/protocols/oscar/family_oservice.c | 9 +-
libpurple/protocols/oscar/oscar.c | 6 +-
libpurple/protocols/oscar/peer.c | 3 +-
libpurple/protocols/oscar/userinfo.c | 9 +-
libpurple/protocols/sametime/sametime.c | 1 +
libpurple/protocols/silc/buddy.c | 12 +-
libpurple/protocols/silc/util.c | 6 +-
libpurple/protocols/simple/simple.c | 10 +-
libpurple/protocols/yahoo/util.c | 17 ++-
libpurple/protocols/yahoo/ymsg.c | 4 +-
libpurple/protocols/zephyr/ZOpenPort.c | 15 ++-
libpurple/protocols/zephyr/ZReadAscii.c | 7 +-
libpurple/protocols/zephyr/ZRetSubs.c | 1 +
libpurple/protocols/zephyr/Zinternal.c | 4 +-
libpurple/protocols/zephyr/zephyr.c | 48 +++++----
libpurple/proxy.c | 15 ++-
libpurple/stun.c | 9 +-
libpurple/util.c | 45 ++++----
libpurple/xfer.c | 7 +-
libpurple/xmlnode.c | 1 +
pidgin/gtkaccount.c | 40 +++++--
pidgin/gtkblist.c | 3 +
pidgin/gtkconv.c | 5 +-
pidgin/gtknotify.c | 5 +-
pidgin/gtkprefs.c | 6 +-
pidgin/gtkrequest.c | 33 +++++-
pidgin/gtksession.c | 3 +-
pidgin/gtkstatusbox.c | 4 +
pidgin/plugins/screencap.c | 84 ++++++----------
pidgin/plugins/spellchk.c | 5 +-
75 files changed, 788 insertions(+), 286 deletions(-)
diffs (truncated from 2541 to 300 lines):
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -86,16 +86,27 @@ version 3.0.0 (??/??/????):
* Doxygen has been replaced by gtk-doc for generating documentation.
version 2.10.10 (?/?/?):
- Finch:
- * Fix build against Python 3. (Ed Catmur) (#15969)
-
- Gadu-Gadu:
- * Updated internal libgadu to version 1.12.0-rc2.
+ libpurple3 compatibility:
+ * Encrypted account passwords are preserved until the new one is set.
+ * Fix loading Google Talk and Facebook XMPP accounts.
Windows-Specific Changes:
* Updates to dependencies:
* NSS 3.16 and NSPR 4.10.4
+ Finch:
+ * Fix build against Python 3. (Ed Catmur) (#15969)
+
+ Gadu-Gadu:
+ * Updated internal libgadu to version 1.12.0-rc2.
+
+ IRC:
+ * Fix a possible leak of unencrypted data when using /me command
+ with OTR. (Thijs Alkemade) (#15750)
+
+ XMPP:
+ * Fix Facebook XMPP roster quirks. (#15041, #15957)
+
version 2.10.9 (2/2/2014):
XMPP:
* Fix problems logging into some servers including jabber.org and
diff --git a/Makefile.am b/Makefile.am
--- a/Makefile.am
+++ b/Makefile.am
@@ -126,10 +126,10 @@ package_revision_raw.txt: .FORCE
fi
package_revision.h: package_revision_raw.txt
$(AM_V_GEN)if test -f $<; then \
- echo "#define REVISION \"`cat $<`\"" > $@; \
+ echo "#define REVISION \"`cat $<`\"" > $@; \
fi
$(AM_V_at)if test ! -f $@ -a -f $(srcdir)/$@; then \
- cp $(srcdir)/$@ $@; \
+ cp $(srcdir)/$@ $@; \
fi
$(AM_V_at)test -f $@ || echo "#define REVISION \"unknown\"" > $@
diff --git a/autogen.sh b/autogen.sh
--- a/autogen.sh
+++ b/autogen.sh
@@ -184,4 +184,3 @@ if test -z "$NOCONFIGURE"; then
echo "running ./configure ${CONFIGURE_FLAGS} $@"
./configure ${CONFIGURE_FLAGS} $@
fi
-
diff --git a/finch/gntaccount.c b/finch/gntaccount.c
--- a/finch/gntaccount.c
+++ b/finch/gntaccount.c
@@ -137,7 +137,7 @@ save_account_cb(AccountEditDialog *dialo
PurpleAccountUserSplit *split = iter->data;
GntWidget *entry = entries->data;
- value = gnt_entry_get_text(GNT_ENTRY(entry));
+ value = entry ? gnt_entry_get_text(GNT_ENTRY(entry)) : NULL;
if (value == NULL || *value == '\0')
value = purple_account_user_split_get_default_value(split);
g_string_append_printf(username, "%c%s",
@@ -317,17 +317,19 @@ update_user_splits(AccountEditDialog *di
for (iter = purple_protocol_get_user_splits(protocol); iter; iter = iter->next)
{
PurpleAccountUserSplit *split = iter->data;
- GntWidget *entry;
- char *buf;
+ GntWidget *entry = NULL;
+ char *buf = NULL;
- hbox = gnt_hbox_new(TRUE);
- gnt_box_add_widget(GNT_BOX(dialog->splits), hbox);
+ if (!purple_account_user_split_is_constant(split)) {
+ hbox = gnt_hbox_new(TRUE);
+ gnt_box_add_widget(GNT_BOX(dialog->splits), hbox);
- buf = g_strdup_printf("%s:", purple_account_user_split_get_text(split));
- gnt_box_add_widget(GNT_BOX(hbox), gnt_label_new(buf));
+ buf = g_strdup_printf("%s:", purple_account_user_split_get_text(split));
+ gnt_box_add_widget(GNT_BOX(hbox), gnt_label_new(buf));
- entry = gnt_entry_new(NULL);
- gnt_box_add_widget(GNT_BOX(hbox), entry);
+ entry = gnt_entry_new(NULL);
+ gnt_box_add_widget(GNT_BOX(hbox), entry);
+ }
dialog->split_entries = g_list_append(dialog->split_entries, entry);
g_free(buf);
@@ -358,7 +360,7 @@ update_user_splits(AccountEditDialog *di
if (value == NULL)
value = purple_account_user_split_get_default_value(split);
- if (value != NULL)
+ if (value != NULL && entry != NULL)
gnt_entry_set_text(GNT_ENTRY(entry), value);
}
diff --git a/finch/gntdebug.c b/finch/gntdebug.c
--- a/finch/gntdebug.c
+++ b/finch/gntdebug.c
@@ -130,6 +130,7 @@ finch_debug_print(PurpleDebugLevel level
{
case PURPLE_DEBUG_WARNING:
flag |= GNT_TEXT_FLAG_UNDERLINE;
+ /* fall through */
case PURPLE_DEBUG_ERROR:
case PURPLE_DEBUG_FATAL:
flag |= GNT_TEXT_FLAG_BOLD;
diff --git a/finch/gntnotify.c b/finch/gntnotify.c
--- a/finch/gntnotify.c
+++ b/finch/gntnotify.c
@@ -59,8 +59,10 @@ finch_notify_common(PurpleNotifyType nty
{
case PURPLE_NOTIFY_MSG_ERROR:
sf |= GNT_TEXT_FLAG_BOLD;
+ /* fall through */
case PURPLE_NOTIFY_MSG_WARNING:
pf |= GNT_TEXT_FLAG_UNDERLINE;
+ /* fall through */
case PURPLE_NOTIFY_MSG_INFO:
pf |= GNT_TEXT_FLAG_BOLD;
break;
diff --git a/finch/gntprefs.c b/finch/gntprefs.c
--- a/finch/gntprefs.c
+++ b/finch/gntprefs.c
@@ -143,12 +143,14 @@ get_pref_field(Prefs *prefs)
switch (prefs->type)
{
case PURPLE_PREF_BOOLEAN:
- sscanf(iter->data, "%d", &idata);
+ if (sscanf(iter->data, "%d", &idata) != 1)
+ idata = FALSE;
if (purple_prefs_get_bool(prefs->pref) == idata)
select = TRUE;
break;
case PURPLE_PREF_INT:
- sscanf(iter->data, "%d", &idata);
+ if (sscanf(iter->data, "%d", &idata) != 1)
+ idata = 0;
if (purple_prefs_get_int(prefs->pref) == idata)
select = TRUE;
break;
diff --git a/finch/gntrequest.c b/finch/gntrequest.c
--- a/finch/gntrequest.c
+++ b/finch/gntrequest.c
@@ -916,8 +916,11 @@ void finch_request_save_in_prefs(gpointe
case PURPLE_PREF_INT:
{
long int tmp = GPOINTER_TO_INT(val);
- if (type == PURPLE_REQUEST_FIELD_LIST) /* Lists always return string */
- sscanf(val, "%ld", &tmp);
+ if (type == PURPLE_REQUEST_FIELD_LIST) {
+ /* Lists always return string */
+ if (sscanf(val, "%ld", &tmp) != 1)
+ tmp = 0;
+ }
purple_prefs_set_int(id, (gint)tmp);
break;
}
diff --git a/finch/libfinch.c b/finch/libfinch.c
--- a/finch/libfinch.c
+++ b/finch/libfinch.c
@@ -268,7 +268,6 @@ init_libpurple(int argc, char **argv)
gboolean opt_version = FALSE;
char *opt_config_dir_arg = NULL;
gboolean debug_enabled = FALSE;
- GStatBuf st;
struct option long_options[] = {
{"config", required_argument, NULL, 'c'},
@@ -368,8 +367,8 @@ init_libpurple(int argc, char **argv)
}
path = g_build_filename(purple_user_dir(), "plugins", NULL);
- if (!g_stat(path, &st))
- g_mkdir(path, S_IRUSR | S_IWUSR | S_IXUSR);
+ if (g_mkdir(path, S_IRUSR | S_IWUSR | S_IXUSR) != 0 && errno != EEXIST)
+ fprintf(stderr, "Couldn't create plugins dir\n");
purple_plugins_add_search_path(path);
g_free(path);
@@ -418,4 +417,3 @@ gboolean finch_start(int *argc, char ***
purple_blist_show();
return TRUE;
}
-
diff --git a/finch/libgnt/gntbox.c b/finch/libgnt/gntbox.c
--- a/finch/libgnt/gntbox.c
+++ b/finch/libgnt/gntbox.c
@@ -232,8 +232,8 @@ gnt_box_size_request(GntWidget *widget)
h = maxh;
}
- gnt_widget_confirm_size(wid, w, h);
- gnt_widget_set_size(wid, w, h);
+ if (gnt_widget_confirm_size(wid, w, h))
+ gnt_widget_set_size(wid, w, h);
}
reposition_children(widget);
diff --git a/finch/libgnt/gntcheckbox.c b/finch/libgnt/gntcheckbox.c
--- a/finch/libgnt/gntcheckbox.c
+++ b/finch/libgnt/gntcheckbox.c
@@ -52,7 +52,7 @@ gnt_check_box_draw(GntWidget *widget)
wbkgdset(widget->window, '\0' | gnt_color_pair(GNT_COLOR_NORMAL));
mvwaddstr(widget->window, 0, 4, C_(GNT_BUTTON(cb)->priv->text));
- wmove(widget->window, 0, 1);
+ (void)wmove(widget->window, 0, 1);
GNTDEBUG;
}
diff --git a/finch/libgnt/gntcombobox.c b/finch/libgnt/gntcombobox.c
--- a/finch/libgnt/gntcombobox.c
+++ b/finch/libgnt/gntcombobox.c
@@ -96,7 +96,7 @@ gnt_combo_box_draw(GntWidget *widget)
whline(widget->window, ' ' | gnt_color_pair(type), widget->priv.width - 4 - len);
mvwaddch(widget->window, 1, widget->priv.width - 3, ACS_VLINE | gnt_color_pair(GNT_COLOR_NORMAL));
mvwaddch(widget->window, 1, widget->priv.width - 2, ACS_DARROW | gnt_color_pair(GNT_COLOR_NORMAL));
- wmove(widget->window, 1, 1);
+ (void)wmove(widget->window, 1, 1);
g_free(text);
GNTDEBUG;
diff --git a/finch/libgnt/gntentry.c b/finch/libgnt/gntentry.c
--- a/finch/libgnt/gntentry.c
+++ b/finch/libgnt/gntentry.c
@@ -299,7 +299,7 @@ gnt_entry_draw(GntWidget *widget)
curpos = gnt_util_onscreen_width(entry->scroll, entry->cursor);
if (focus)
mvwchgat(widget->window, 0, curpos, 1, A_REVERSE, GNT_COLOR_TEXT_NORMAL, NULL);
- wmove(widget->window, 0, curpos);
+ (void)wmove(widget->window, 0, curpos);
GNTDEBUG;
}
diff --git a/finch/libgnt/gnttextview.c b/finch/libgnt/gnttextview.c
--- a/finch/libgnt/gnttextview.c
+++ b/finch/libgnt/gnttextview.c
@@ -106,7 +106,7 @@ gnt_text_view_draw(GntWidget *widget)
GList *iter;
GntTextLine *line = lines->data;
- wmove(widget->window, widget->priv.height - 1 - i - comp, 0);
+ (void)wmove(widget->window, widget->priv.height - 1 - i - comp, 0);
for (iter = line->segments; iter; iter = iter->next)
{
diff --git a/finch/libgnt/gntwidget.c b/finch/libgnt/gntwidget.c
--- a/finch/libgnt/gntwidget.c
+++ b/finch/libgnt/gntwidget.c
@@ -318,6 +318,8 @@ gnt_widget_destroy(GntWidget *obj)
void
gnt_widget_show(GntWidget *widget)
{
+ g_return_if_fail(widget != NULL);
+
gnt_widget_draw(widget);
gnt_screen_occupy(widget);
}
diff --git a/finch/libgnt/gntwm.c b/finch/libgnt/gntwm.c
--- a/finch/libgnt/gntwm.c
+++ b/finch/libgnt/gntwm.c
@@ -141,7 +141,7 @@ gnt_wm_copy_win(GntWidget *widget, GntNo
int curx = active->priv.x + getcurx(active->window);
int cury = active->priv.y + getcury(active->window);
if (wmove(node->window, cury - widget->priv.y, curx - widget->priv.x) != OK)
- wmove(node->window, 0, 0);
+ (void)wmove(node->window, 0, 0);
}
}
}
@@ -1817,6 +1817,8 @@ gnt_wm_new_window_real(GntWM *wm, GntWid
maxx = getmaxx(stdscr);
maxy = getmaxy(stdscr) - 1; /* room for the taskbar */
+ maxx = MAX(0, maxx);
+ maxy = MAX(0, maxy);
x = MAX(0, x);
y = MAX(0, y);
diff --git a/finch/libgnt/gntws.c b/finch/libgnt/gntws.c
--- a/finch/libgnt/gntws.c
+++ b/finch/libgnt/gntws.c
@@ -62,6 +62,8 @@ gnt_ws_draw_taskbar(GntWS *ws, gboolean
if (gnt_is_refugee())
return;
More information about the Commits
mailing list