Mercurial > pidgin-twitter
comparison pidgin-twitter.h @ 173:45da59a32019 multiaccounts
trying to make a dialog per conversation
author | mikanbako <maoutwo@gmail.com> |
---|---|
date | Thu, 31 Jul 2008 19:30:24 +0900 |
parents | 56e3873e58a8 |
children | 002538feba6e |
comparison
equal
deleted
inserted
replaced
172:3c5fc8d7b506 | 173:45da59a32019 |
---|---|
116 #define OPT_ICON_MAX_COUNT OPT_PIDGINTWITTER "/icon_max_count" | 116 #define OPT_ICON_MAX_COUNT OPT_PIDGINTWITTER "/icon_max_count" |
117 #define OPT_ICON_MAX_DAYS OPT_PIDGINTWITTER "/icon_max_days" | 117 #define OPT_ICON_MAX_DAYS OPT_PIDGINTWITTER "/icon_max_days" |
118 #define OPT_API_BASE_GET_INTERVAL OPT_PIDGINTWITTER "/api_base_get_interval" | 118 #define OPT_API_BASE_GET_INTERVAL OPT_PIDGINTWITTER "/api_base_get_interval" |
119 #define OPT_LOG_OUTPUT OPT_PIDGINTWITTER "/log_output" | 119 #define OPT_LOG_OUTPUT OPT_PIDGINTWITTER "/log_output" |
120 | 120 |
121 /* options depend on service account */ | |
122 #define OPT_SCREEN_NAME OPT_PIDGINTWITTER "/screen_name" | |
123 #define OPT_API_BASE_PASSWORD OPT_PIDGINTWITTER "/api_base_password" | |
124 | |
121 /* formats and templates */ | 125 /* formats and templates */ |
122 #define RECIPIENT_FORMAT_TWITTER "@<a href='http://twitter.com/%s'>%s</a>" | 126 #define RECIPIENT_FORMAT_TWITTER "@<a href='http://twitter.com/%s'>%s</a>" |
123 #define SENDER_FORMAT_TWITTER "%s<a href='http://twitter.com/%s'>%s</a>: " | 127 #define SENDER_FORMAT_TWITTER "%s<a href='http://twitter.com/%s'>%s</a>: " |
124 #define RECIPIENT_FORMAT_WASSR "@<a href='http://wassr.jp/user/%s'>%s</a>" | 128 #define RECIPIENT_FORMAT_WASSR "@<a href='http://wassr.jp/user/%s'>%s</a>" |
125 #define SENDER_FORMAT_WASSR "%s<a href='http://wassr.jp/user/%s'>%s</a>: " | 129 #define SENDER_FORMAT_WASSR "%s<a href='http://wassr.jp/user/%s'>%s</a>: " |
127 #define SENDER_FORMAT_IDENTICA "%s<a href='http://identi.ca/%s'>%s</a>: " | 131 #define SENDER_FORMAT_IDENTICA "%s<a href='http://identi.ca/%s'>%s</a>: " |
128 #define CHANNEL_FORMAT_WASSR "%s<a href='http://wassr.jp/channel/%s'>%s</a> " | 132 #define CHANNEL_FORMAT_WASSR "%s<a href='http://wassr.jp/channel/%s'>%s</a> " |
129 #define DEFAULT_LIST "(list of users: separated with ' ,:;')" | 133 #define DEFAULT_LIST "(list of users: separated with ' ,:;')" |
130 #define OOPS_MESSAGE "<body>Oops! Your update was over 140 characters. We sent the short version to your friends (they can view the entire update on the web).<BR></body>" | 134 #define OOPS_MESSAGE "<body>Oops! Your update was over 140 characters. We sent the short version to your friends (they can view the entire update on the web).<BR></body>" |
131 #define EMPTY "" | 135 #define EMPTY "" |
136 | |
137 /* labels of account preference button */ | |
138 #define ACCOUNT_PREF_BUTTON_NORMAL "Account Preference" | |
139 #define ACCOUNT_PREF_BUTTON_NOTICE "(*)Account Preference" | |
132 | 140 |
133 /* patterns */ | 141 /* patterns */ |
134 #define P_RECIPIENT "@([A-Za-z0-9_]+)" | 142 #define P_RECIPIENT "@([A-Za-z0-9_]+)" |
135 #define P_SENDER "^(\\r?\\n?)\\s*([A-Za-z0-9_]+): " | 143 #define P_SENDER "^(\\r?\\n?)\\s*([A-Za-z0-9_]+): " |
136 #define P_COMMAND "^(?:\\s*)([dDfFgGlLmMnNtTwW]{1}\\s+[A-Za-z0-9_]+)(?:\\s*\\Z)" | 144 #define P_COMMAND "^(?:\\s*)([dDfFgGlLmMnNtTwW]{1}\\s+[A-Za-z0-9_]+)(?:\\s*\\Z)" |
183 static void detach_from_window(void); | 191 static void detach_from_window(void); |
184 static void detach_from_conv(PurpleConversation *conv, gpointer null); | 192 static void detach_from_conv(PurpleConversation *conv, gpointer null); |
185 static void delete_requested_icon_marks(PidginConversation *gtkconv, GHashTable *table); | 193 static void delete_requested_icon_marks(PidginConversation *gtkconv, GHashTable *table); |
186 static void attach_to_window(void); | 194 static void attach_to_window(void); |
187 static void attach_to_conv(PurpleConversation *conv, gpointer null); | 195 static void attach_to_conv(PurpleConversation *conv, gpointer null); |
196 static void append_account_preference_button(PidginConversation *gtkconv); | |
188 static gboolean is_twitter_account(PurpleAccount *account, const char *name); | 197 static gboolean is_twitter_account(PurpleAccount *account, const char *name); |
189 static gboolean is_twitter_conv(PurpleConversation *conv); | 198 static gboolean is_twitter_conv(PurpleConversation *conv); |
190 static gboolean is_wassr_account(PurpleAccount *account, const char *name); | 199 static gboolean is_wassr_account(PurpleAccount *account, const char *name); |
191 static gboolean is_wassr_conv(PurpleConversation *conv); | 200 static gboolean is_wassr_conv(PurpleConversation *conv); |
192 static gboolean is_identica_account(PurpleAccount *account, const char *name); | 201 static gboolean is_identica_account(PurpleAccount *account, const char *name); |
208 static void init_plugin(PurplePlugin *plugin); | 217 static void init_plugin(PurplePlugin *plugin); |
209 static void remove_marks_func(gpointer key, gpointer value, gpointer user_data); | 218 static void remove_marks_func(gpointer key, gpointer value, gpointer user_data); |
210 static void cancel_fetch_func(gpointer key, gpointer value, gpointer user_data); | 219 static void cancel_fetch_func(gpointer key, gpointer value, gpointer user_data); |
211 static gint get_service_type(PurpleConversation *conv); | 220 static gint get_service_type(PurpleConversation *conv); |
212 static GdkPixbuf *make_scaled_pixbuf(const gchar *url_text, gsize len); | 221 static GdkPixbuf *make_scaled_pixbuf(const gchar *url_text, gsize len); |
222 static void open_account_preference_window(GtkWidget *called_widged, gpointer gtkconv_ptr); | |
223 static void build_screen_name_preference_form(PurpleConversation *conv, GtkWidget *notebook); | |
224 static void build_twitter_api_preference_form(PurpleConversation *conv, GtkWidget *notebook); | |
225 static void destroyed_pref_button_cb(GtkWidget *pref_button, gpointer dialog); | |
226 static void closed_account_preference_window_cb(GtkDialog *dialog, gint response_id, gpointer pref_button); | |
227 static void account_preference_text_changed_cb(GtkEditable *editable, gpointer conv_ptr); | |
228 static void account_preference_bool_toggled_cb(GtkToggleButton *togglebutton, gpointer conv_ptr); | |
229 static void account_preference_spin_changed_cb(GtkSpinButton *spinbutton, gpointer conv_ptr); | |
230 static gchar* create_key_with_service_account(PurpleConversation *conv, const char *key); | |
231 static void service_account_set_string(PurpleConversation *conv, const char *key, const char *value); | |
232 static const char* service_account_get_string(PurpleConversation *conv, const char *key, const char *default_value); | |
233 static void service_account_set_int(PurpleConversation *conv, const char *key, gboolean value); | |
234 static gboolean service_account_get_int(PurpleConversation *conv, const char *key, gboolean default_value); | |
235 static void service_account_set_bool(PurpleConversation *conv, const char *key, gboolean value); | |
236 static gboolean service_account_get_bool(PurpleConversation *conv, const char *key, gboolean default_value); | |
213 | 237 |
214 static void parse_user(xmlNode *user, status_t *st); | 238 static void parse_user(xmlNode *user, status_t *st); |
215 static void parse_status(xmlNode *status, status_t *st); | 239 static void parse_status(xmlNode *status, status_t *st); |
216 static void get_status_with_api_cb(PurpleUtilFetchUrlData *url_data, gpointer user_data, const gchar *url_text, size_t len, const gchar *error_message); | 240 static void get_status_with_api_cb(PurpleUtilFetchUrlData *url_data, gpointer user_data, const gchar *url_text, size_t len, const gchar *error_message); |
217 static gboolean get_status_with_api(gpointer data); | 241 static gboolean get_status_with_api(gpointer data); |