| 93 text = NULL; |
93 text = NULL; |
| 94 } |
94 } |
| 95 |
95 |
| 96 update_status_with_mood(account, mood, text); |
96 update_status_with_mood(account, mood, text); |
| 97 } else { |
97 } else { |
| 98 PurpleAccountManager *manager = purple_account_manager_get_default(); |
98 GListModel *manager_model = NULL; |
| 99 GList *accounts = purple_account_manager_get_all(manager); |
99 guint n_items = 0; |
| 100 |
100 |
| 101 for (; accounts ; accounts = g_list_delete_link(accounts, accounts)) { |
101 manager_model = purple_account_manager_get_default_as_model(); |
| 102 PurpleAccount *account = (PurpleAccount *) accounts->data; |
102 n_items = g_list_model_get_n_items(manager_model); |
| 103 |
103 for(guint index = 0; index < n_items; index++) { |
| |
104 PurpleAccount *account = NULL; |
| |
105 |
| |
106 account = g_list_model_get_item(manager_model, index); |
| 104 connection = purple_account_get_connection(account); |
107 connection = purple_account_get_connection(account); |
| 105 if(PURPLE_IS_CONNECTION(connection)) { |
108 if(PURPLE_IS_CONNECTION(connection)) { |
| 106 PurpleConnectionFlags flags; |
109 PurpleConnectionFlags flags; |
| 107 |
110 |
| 108 flags = purple_connection_get_flags(connection); |
111 flags = purple_connection_get_flags(connection); |
| 109 if(flags & PURPLE_CONNECTION_FLAG_SUPPORT_MOODS) { |
112 if(flags & PURPLE_CONNECTION_FLAG_SUPPORT_MOODS) { |
| 110 update_status_with_mood(account, mood, NULL); |
113 update_status_with_mood(account, mood, NULL); |
| 111 } |
114 } |
| 112 } |
115 } |
| |
116 |
| |
117 g_object_unref(account); |
| 113 } |
118 } |
| 114 } |
119 } |
| 115 } |
120 } |
| 116 |
121 |
| 117 /*< private > |
122 /*< private > |