bigboard r7351 - trunk/bigboard/empathy
- From: marco svn gnome org
- To: svn-commits-list gnome org
- Subject: bigboard r7351 - trunk/bigboard/empathy
- Date: Wed, 11 Jun 2008 12:31:54 +0000 (UTC)
Author: marco
Date: Wed Jun 11 12:31:53 2008
New Revision: 7351
URL: http://svn.gnome.org/viewvc/bigboard?rev=7351&view=rev
Log:
Add some missing ignores
Modified:
trunk/bigboard/empathy/ (props changed)
trunk/bigboard/empathy/bb-empathy.c
trunk/bigboard/empathy/bb-empathy.h
Modified: trunk/bigboard/empathy/bb-empathy.c
==============================================================================
--- trunk/bigboard/empathy/bb-empathy.c (original)
+++ trunk/bigboard/empathy/bb-empathy.c Wed Jun 11 12:31:53 2008
@@ -16,6 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <string.h>
#include <libmissioncontrol/mission-control.h>
#include <libmissioncontrol/mc-account.h>
#include <libempathy/empathy-dispatcher.h>
@@ -56,14 +57,32 @@
}
void
-bb_empathy_open_chat_with(const char *account_id,
- const char *buddy_id)
+bb_empathy_open_chat_with(const char *buddy_id,
+ const char *protocol_name)
{
- McAccount *account;
+ McAccount *target_account = NULL;
+ GList *accounts, *l;
- account = mc_account_lookup(account_id);
- if (account != NULL) {
- empathy_dispatcher_chat_with_contact_id(account, buddy_id);
- g_object_unref(account);
+ accounts = mc_accounts_list ();
+ for (l = accounts; l != NULL; l = l->next) {
+ McAccount *account = MC_ACCOUNT(l->data);
+ McProfile *profile;
+ McProtocol *protocol;
+
+ profile = mc_account_get_profile(account);
+ protocol = mc_profile_get_protocol(profile);
+
+ if (strcmp(mc_protocol_get_name(protocol), protocol_name) == 0) {
+ target_account = account;
+ }
+
+ g_object_unref(profile);
+ g_object_unref(protocol);
+ }
+
+ if (target_account != NULL) {
+ empathy_dispatcher_chat_with_contact_id(target_account, buddy_id);
}
+
+ mc_accounts_list_free (accounts);
}
Modified: trunk/bigboard/empathy/bb-empathy.h
==============================================================================
--- trunk/bigboard/empathy/bb-empathy.h (original)
+++ trunk/bigboard/empathy/bb-empathy.h Wed Jun 11 12:31:53 2008
@@ -26,8 +26,8 @@
gboolean bb_empathy_is_configured (void);
GtkWidget *bb_empathy_configure_accounts (void);
void bb_empathy_set_online (gboolean online);
-void bb_empathy_open_chat_with (const char *account_id,
- const char *buddy_id);
+void bb_empathy_open_chat_with (const char *buddy_id,
+ const char *protocol_name);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]