diff 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
line wrap: on
line diff
--- a/pidgin-twitter.h	Thu Jul 31 17:22:02 2008 +0900
+++ b/pidgin-twitter.h	Thu Jul 31 19:30:24 2008 +0900
@@ -118,6 +118,10 @@
 #define OPT_API_BASE_GET_INTERVAL OPT_PIDGINTWITTER "/api_base_get_interval"
 #define OPT_LOG_OUTPUT          OPT_PIDGINTWITTER "/log_output"
 
+/* options depend on service account */
+#define OPT_SCREEN_NAME         OPT_PIDGINTWITTER "/screen_name"
+#define OPT_API_BASE_PASSWORD      OPT_PIDGINTWITTER "/api_base_password"
+
 /* formats and templates */
 #define RECIPIENT_FORMAT_TWITTER "@<a href='http://twitter.com/%s'>%s</a>"
 #define SENDER_FORMAT_TWITTER   "%s<a href='http://twitter.com/%s'>%s</a>: "
@@ -130,6 +134,10 @@
 #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>"
 #define EMPTY                   ""
 
+/* labels of account preference button */
+#define ACCOUNT_PREF_BUTTON_NORMAL   "Account Preference"
+#define ACCOUNT_PREF_BUTTON_NOTICE   "(*)Account Preference"
+
 /* patterns */
 #define P_RECIPIENT         "@([A-Za-z0-9_]+)"
 #define P_SENDER            "^(\\r?\\n?)\\s*([A-Za-z0-9_]+): "
@@ -185,6 +193,7 @@
 static void delete_requested_icon_marks(PidginConversation *gtkconv, GHashTable *table);
 static void attach_to_window(void);
 static void attach_to_conv(PurpleConversation *conv, gpointer null);
+static void append_account_preference_button(PidginConversation *gtkconv);
 static gboolean is_twitter_account(PurpleAccount *account, const char *name);
 static gboolean is_twitter_conv(PurpleConversation *conv);
 static gboolean is_wassr_account(PurpleAccount *account, const char *name);
@@ -210,6 +219,21 @@
 static void cancel_fetch_func(gpointer key, gpointer value, gpointer user_data);
 static gint get_service_type(PurpleConversation *conv);
 static GdkPixbuf *make_scaled_pixbuf(const gchar *url_text, gsize len);
+static void open_account_preference_window(GtkWidget *called_widged, gpointer gtkconv_ptr);
+static void build_screen_name_preference_form(PurpleConversation *conv, GtkWidget *notebook);
+static void build_twitter_api_preference_form(PurpleConversation *conv, GtkWidget *notebook);
+static void destroyed_pref_button_cb(GtkWidget *pref_button, gpointer dialog);
+static void closed_account_preference_window_cb(GtkDialog *dialog, gint response_id, gpointer pref_button);
+static void account_preference_text_changed_cb(GtkEditable *editable, gpointer conv_ptr);
+static void account_preference_bool_toggled_cb(GtkToggleButton *togglebutton, gpointer conv_ptr);
+static void account_preference_spin_changed_cb(GtkSpinButton *spinbutton, gpointer conv_ptr);
+static gchar* create_key_with_service_account(PurpleConversation *conv, const char *key);
+static void service_account_set_string(PurpleConversation *conv, const char *key, const char *value);
+static const char* service_account_get_string(PurpleConversation *conv, const char *key, const char *default_value);
+static void service_account_set_int(PurpleConversation *conv, const char *key, gboolean value);
+static gboolean service_account_get_int(PurpleConversation *conv, const char *key, gboolean default_value);
+static void service_account_set_bool(PurpleConversation *conv, const char *key, gboolean value);
+static gboolean service_account_get_bool(PurpleConversation *conv, const char *key, gboolean default_value);
 
 static void parse_user(xmlNode *user, status_t *st);
 static void parse_status(xmlNode *status, status_t *st);