aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-main-window.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-10-10 02:07:57 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-10-10 02:07:57 +0800
commitb152949a3102c150af0c99fb84e8fecf2c69191f (patch)
tree373a7f9d282419ee869db15c8a61ae8b13af53ef /libempathy-gtk/empathy-main-window.c
parentbfe4734f01b202ae448616e6c711a46c5d0d7f6e (diff)
downloadgsoc2013-empathy-b152949a3102c150af0c99fb84e8fecf2c69191f.tar
gsoc2013-empathy-b152949a3102c150af0c99fb84e8fecf2c69191f.tar.gz
gsoc2013-empathy-b152949a3102c150af0c99fb84e8fecf2c69191f.tar.bz2
gsoc2013-empathy-b152949a3102c150af0c99fb84e8fecf2c69191f.tar.lz
gsoc2013-empathy-b152949a3102c150af0c99fb84e8fecf2c69191f.tar.xz
gsoc2013-empathy-b152949a3102c150af0c99fb84e8fecf2c69191f.tar.zst
gsoc2013-empathy-b152949a3102c150af0c99fb84e8fecf2c69191f.zip
More flexible API for EmpathyContactWidget, we now have flags to set
2007-10-09 Xavier Claessens <xclaesse@gmail.com> * libempathy-gtk/empathy-main-window.c: * libempathy-gtk/empathy-contact-dialogs.c: * libempathy-gtk/empathy-contact-list-view.c: * libempathy-gtk/empathy-contact-dialogs.h: * libempathy-gtk/empathy-contact-widget.c: * libempathy-gtk/empathy-contact-widget.h: * libempathy-gtk/empathy-chat-window.c: * megaphone/src/megaphone-applet.c: More flexible API for EmpathyContactWidget, we now have flags to set editable each fields. Implement personal information menu item in main window. svn path=/trunk/; revision=365
Diffstat (limited to 'libempathy-gtk/empathy-main-window.c')
-rw-r--r--libempathy-gtk/empathy-main-window.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-main-window.c b/libempathy-gtk/empathy-main-window.c
index 7867b949c..7543c456e 100644
--- a/libempathy-gtk/empathy-main-window.c
+++ b/libempathy-gtk/empathy-main-window.c
@@ -35,6 +35,7 @@
#include <libempathy/empathy-chatroom.h>
#include <libempathy/empathy-contact-list.h>
#include <libempathy/empathy-contact-manager.h>
+#include <libempathy/empathy-contact-factory.h>
#include "empathy-main-window.h"
#include "empathy-contact-dialogs.h"
@@ -67,7 +68,7 @@
typedef struct {
EmpathyContactListView *list_view;
EmpathyContactListStore *list_store;
- MissionControl *mc;
+ MissionControl *mc;
EmpathyChatroomManager *chatroom_manager;
/* Main widgets */
@@ -662,7 +663,24 @@ static void
main_window_edit_personal_information_cb (GtkWidget *widget,
EmpathyMainWindow *window)
{
- //empathy_vcard_dialog_show (GTK_WINDOW (window->window));
+ GSList *accounts;
+
+ accounts = mission_control_get_online_connections (window->mc, NULL);
+ if (accounts) {
+ EmpathyContactFactory *factory;
+ EmpathyContact *contact;
+ McAccount *account;
+
+ account = accounts->data;
+ factory = empathy_contact_factory_new ();
+ contact = empathy_contact_factory_get_user (factory, account);
+ empathy_contact_information_dialog_show (contact,
+ GTK_WINDOW (window->window),
+ TRUE, FALSE);
+ g_slist_foreach (accounts, (GFunc) g_object_unref, NULL);
+ g_slist_free (accounts);
+ g_object_unref (factory);
+ }
}
static void