/pidgin/main: 35d4640f79ac: Style: keyrings, examples
Tomasz Wasilczyk
twasilczyk at pidgin.im
Mon Feb 3 19:27:21 EST 2014
Changeset: 35d4640f79ac42111f244063f3b56b935a90d401
Author: Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date: 2014-02-04 01:27 +0100
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/35d4640f79ac
Description:
Style: keyrings, examples
diffstat:
libpurple/example/defines.h | 23 +++++++++++++++++++++++
libpurple/example/nullclient.c | 11 +++++------
libpurple/plugins/keyrings/kwallet.cpp | 6 ++++--
3 files changed, 32 insertions(+), 8 deletions(-)
diffs (89 lines):
diff --git a/libpurple/example/defines.h b/libpurple/example/defines.h
--- a/libpurple/example/defines.h
+++ b/libpurple/example/defines.h
@@ -1,3 +1,26 @@
+/*
+ * pidgin
+ *
+ * Pidgin is the legal property of its developers, whose names are too numerous
+ * to list here. Please refer to the COPYRIGHT file distributed with this
+ * source distribution.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
+ *
+ */
+
#define CUSTOM_USER_DIRECTORY "/dev/null"
#define CUSTOM_PLUGIN_PATH ""
#define PLUGIN_SAVE_PREF "/purple/nullclient/plugins/saved"
diff --git a/libpurple/example/nullclient.c b/libpurple/example/nullclient.c
--- a/libpurple/example/nullclient.c
+++ b/libpurple/example/nullclient.c
@@ -64,13 +64,13 @@ static gboolean purple_glib_io_invoke(GI
purple_cond |= PURPLE_INPUT_WRITE;
closure->function(closure->data, g_io_channel_unix_get_fd(source),
- purple_cond);
+ purple_cond);
return TRUE;
}
-static guint glib_input_add(gint fd, PurpleInputCondition condition, PurpleInputFunction function,
- gpointer data)
+static guint glib_input_add(gint fd, PurpleInputCondition condition,
+ PurpleInputFunction function, gpointer data)
{
PurpleGLibIOClosure *closure = g_new0(PurpleGLibIOClosure, 1);
GIOChannel *channel;
@@ -89,8 +89,8 @@ static guint glib_input_add(gint fd, Pur
#else
channel = g_io_channel_unix_new(fd);
#endif
- closure->result = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT, cond,
- purple_glib_io_invoke, closure, purple_glib_io_destroy);
+ closure->result = g_io_add_watch_full(channel, G_PRIORITY_DEFAULT,
+ cond, purple_glib_io_invoke, closure, purple_glib_io_destroy);
g_io_channel_unref(channel);
return closure->result;
@@ -315,4 +315,3 @@ int main(int argc, char *argv[])
return 0;
}
-
diff --git a/libpurple/plugins/keyrings/kwallet.cpp b/libpurple/plugins/keyrings/kwallet.cpp
--- a/libpurple/plugins/keyrings/kwallet.cpp
+++ b/libpurple/plugins/keyrings/kwallet.cpp
@@ -433,7 +433,8 @@ kwallet_read(PurpleAccount *account, Pur
new KWalletPlugin::read_request(account, cb, data);
if (KWallet::Wallet::keyDoesNotExist(KWALLET_WALLET_NAME,
- KWALLET_FOLDER_NAME, kwallet_account_key(account))) {
+ KWALLET_FOLDER_NAME, kwallet_account_key(account)))
+ {
req->detailedAbort(PURPLE_KEYRING_ERROR_NOPASSWORD);
delete req;
}
@@ -447,7 +448,8 @@ kwallet_save(PurpleAccount *account, con
{
if (password == NULL && KWallet::Wallet::keyDoesNotExist(
KWALLET_WALLET_NAME, KWALLET_FOLDER_NAME,
- kwallet_account_key(account))) {
+ kwallet_account_key(account)))
+ {
if (cb != NULL)
cb(account, NULL, data);
}
More information about the Commits
mailing list