Skip to content
This repository
Browse code

waf updated to version 1.6 (works with python 2 and 3)

  • Loading branch information...
commit 1dfe140a0d5bf8f880d084ff96ce313d54600359 1 parent c0b15f7
Oleg Khlystov authored

Showing 3 changed files with 32 additions and 11 deletions. Show diff stats Hide diff stats

  1. +21 1 src/juick.c
  2. BIN  waf
  3. +11 10 wscript
22 src/juick.c
@@ -54,6 +54,8 @@
54 54 #include <gtkconv.h>
55 55 #include <gtksound.h>
56 56
  57 +#define UNUSED(expr) do { (void)(expr); } while (0)
  58 +
57 59 #define DBGID "juick"
58 60 #define JUICK_JID "juick@juick.com"
59 61 #define JUBO_JID "jubo@nologin.ru"
@@ -213,6 +215,7 @@ juick_on_displaying(PurpleAccount *account, const char *who,
213 215 char **displaying, PurpleConversation *conv,
214 216 PurpleMessageFlags flags)
215 217 {
  218 + UNUSED(conv);
216 219 GString *output;
217 220 gchar *p, *prev, *src;
218 221 const gchar *account_user;
@@ -474,6 +477,7 @@ make_message(const gchar *from, const gchar *to, const gchar *body)
474 477 static void
475 478 xmlnode_received_cb(PurpleConnection *gc, xmlnode **packet)
476 479 {
  480 + UNUSED(gc);
477 481 xmlnode *node;
478 482 const char *from;
479 483 gchar *s = NULL;
@@ -756,6 +760,7 @@ send_link(PurpleConversation *conv, const gchar *send, const gchar *body,
756 760 static gboolean
757 761 juick_uri_handler(const char *proto, const char *cmd, GHashTable *params)
758 762 {
  763 + UNUSED(cmd);
759 764 PurpleAccount *account = NULL;
760 765 PurpleConversation *conv = NULL;
761 766 gchar *body = NULL, *account_user = NULL, *reply = NULL, *send = NULL;
@@ -784,6 +789,7 @@ juick_uri_handler(const char *proto, const char *cmd, GHashTable *params)
784 789 static gboolean
785 790 window_keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
786 791 {
  792 + UNUSED(widget);
787 793 PurpleConversation *conv = (PurpleConversation *)data;
788 794 PurpleConvIm *convim;
789 795 PurpleConnection *gc;
@@ -810,6 +816,7 @@ window_keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
810 816 static void
811 817 attach_to_conversation(gpointer data, gpointer user_data)
812 818 {
  819 + UNUSED(user_data);
813 820 PurpleConversation *conv = (PurpleConversation *) data;
814 821 PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
815 822 gulong handler_id;
@@ -830,6 +837,7 @@ attach_to_conversation(gpointer data, gpointer user_data)
830 837 static void
831 838 detach_from_conversation(gpointer data, gpointer user_data)
832 839 {
  840 + UNUSED(user_data);
833 841 PurpleConversation *conv = (PurpleConversation *) data;
834 842 PidginConversation *gtkconv = PIDGIN_CONVERSATION(conv);
835 843 gulong handler_id;
@@ -945,54 +953,63 @@ process_link(const gchar *url, JuickLinkStatus status)
945 953 static void
946 954 menu_show_activate_cb(GtkMenuItem *menuitem, gchar *link)
947 955 {
  956 + UNUSED(menuitem);
948 957 process_link(link, JUICK_LINK_SHOW);
949 958 }
950 959
951 960 static void
952 961 menu_insert_activate_cb(GtkMenuItem *menuitem, gchar *link)
953 962 {
  963 + UNUSED(menuitem);
954 964 process_link(link, JUICK_LINK_INSERT);
955 965 }
956 966
957 967 static void
958 968 menu_insert_replace_activate_cb(GtkMenuItem *menuitem, gchar *link)
959 969 {
  970 + UNUSED(menuitem);
960 971 process_link(link, JUICK_LINK_INSERT_WITH_REPLACE);
961 972 }
962 973
963 974 static void
964 975 menu_user_info_activate_cb(GtkMenuItem *menuitem, gchar *link)
965 976 {
  977 + UNUSED(menuitem);
966 978 process_link(link, JUICK_LINK_USER_INFO);
967 979 }
968 980
969 981 static void
970 982 menu_user_posts_activate_cb(GtkMenuItem *menuitem, gchar *link)
971 983 {
  984 + UNUSED(menuitem);
972 985 process_link(link, JUICK_LINK_USER_POSTS);
973 986 }
974 987
975 988 static void
976 989 menu_subscribe_activate_cb(GtkMenuItem *menuitem, gchar *link)
977 990 {
  991 + UNUSED(menuitem);
978 992 process_link(link, JUICK_LINK_SUBSCRIBE);
979 993 }
980 994
981 995 static void
982 996 menu_unsubscribe_activate_cb(GtkMenuItem *menuitem, gchar *link)
983 997 {
  998 + UNUSED(menuitem);
984 999 process_link(link, JUICK_LINK_UNSUBSCRIBE);
985 1000 }
986 1001
987 1002 static void
988 1003 menu_webpage_activate_cb(GtkMenuItem *menuitem, gchar *link)
989 1004 {
  1005 + UNUSED(menuitem);
990 1006 process_link(link, JUICK_LINK_WEBPAGE);
991 1007 }
992 1008
993 1009 static void
994 1010 menu_recommend_activate_cb(GtkMenuItem *menuitem, gchar *link)
995 1011 {
  1012 + UNUSED(menuitem);
996 1013 process_link(link, JUICK_LINK_RECOMMEND);
997 1014 }
998 1015
@@ -1120,6 +1137,7 @@ juick_context_menu(GtkWidget *menu, const gchar *url, const gchar *text)
1120 1137 static gboolean
1121 1138 juick_url_clicked_cb(GtkIMHtml * imhtml, GtkIMHtmlLink * link)
1122 1139 {
  1140 + UNUSED(imhtml);
1123 1141 const gchar * url = gtk_imhtml_link_get_url(link);
1124 1142
1125 1143 purple_debug_info(DBGID, "%s called\n", __FUNCTION__);
@@ -1133,6 +1151,7 @@ juick_url_clicked_cb(GtkIMHtml * imhtml, GtkIMHtmlLink * link)
1133 1151 static gboolean
1134 1152 context_menu(GtkIMHtml *imhtml, GtkIMHtmlLink *link, GtkWidget *menu)
1135 1153 {
  1154 + UNUSED(imhtml);
1136 1155 const gchar *url = gtk_imhtml_link_get_url(link);
1137 1156 const gchar *body = "&body=";
1138 1157 gchar *text;
@@ -1168,6 +1187,7 @@ static void *juick_notify_uri(const char *uri) {
1168 1187 static PurplePluginPrefFrame*
1169 1188 get_plugin_pref_frame(PurplePlugin *plugin)
1170 1189 {
  1190 + UNUSED(plugin);
1171 1191 PurplePluginPrefFrame *frame;
1172 1192 PurplePluginPref *ppref;
1173 1193
@@ -1298,7 +1318,7 @@ static PurplePluginInfo info =
1298 1318
1299 1319 "gtkjuick", /**< id */
1300 1320 N_("Juick"), /**< name */
1301   - "0.3", /**< version */
  1321 + "0.3.3", /**< version */
1302 1322 N_("Adds some color and button for juick bot."), /**< summary */
1303 1323 N_("Adds some color and button for juick bot.\n" \
1304 1324 "Unfortunately pidgin developers have decided that more than " \
BIN  waf
Binary file not shown
21 wscript
@@ -6,12 +6,12 @@ import os, sys
6 6 import Options
7 7
8 8 APPNAME = 'pidgin-juick-plugin'
9   -VERSION = '0.3.2'
  9 +VERSION = '0.3.3'
10 10
11   -srcdir = '.'
12   -blddir = 'build'
  11 +top = '.'
  12 +out = 'build'
13 13
14   -def set_options(opt):
  14 +def options(opt):
15 15 opt.tool_options('compiler_cc')
16 16 opt.tool_options('intltool')
17 17 group = opt.add_option_group ('Install', '')
@@ -29,14 +29,15 @@ def set_options(opt):
29 29
30 30 def configure(conf):
31 31 is_win32=sys.platform=='win32'
  32 + conf.setenv('default')
32 33
33 34 if Options.options.win32:
34 35 # create the second environment, set the variant and set its name
35   - env = conf.env.copy()
36   - env.set_variant('win32')
37   - conf.set_env_name('win32', env)
  36 + #env = conf.env.copy()
  37 + #env.set_variant('win32')
  38 + #conf.set_env_name('win32', env)
38 39 # call the debug environment
39   - conf.setenv('win32')
  40 + conf.setenv('win32', env = conf.env.derive())
40 41
41 42 conf.check_tool('compiler_cc')
42 43 #conf.check_tool('gcc')
@@ -56,7 +57,7 @@ def configure(conf):
56 57 uselib_store='pidgin',
57 58 mandatory=True)
58 59
59   - conf.env.append_value('CCFLAGS', '-DHAVE_CONFIG_H')
  60 + conf.env.append_value('CFLAGS', ['-DHAVE_CONFIG_H', '-Wall', '-Wextra'])
60 61
61 62 if is_win32 or Options.options.win32:
62 63 # on Windows LOCALEDIR define in purple win32dep.h
@@ -92,7 +93,7 @@ def build(bld):
92 93 )
93 94
94 95 bld.new_task_gen(
95   - features = 'cc cshlib',
  96 + features = 'c cshlib',
96 97 source = 'src/juick.c',
97 98 includes = '.',
98 99 target = APPNAME,

0 comments on commit 1dfe140

Please sign in to comment.
Something went wrong with that request. Please try again.