]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-new-message-dialog.c
Add en_GB in gitignore
[empathy.git] / libempathy-gtk / empathy-new-message-dialog.c
index 766087812a0a2c72c85b366595f2ccafe09d9df6..93f679e66d80696374949970da520935d92c8a20 100644 (file)
@@ -31,6 +31,7 @@
 #include <libmissioncontrol/mc-account.h>
 #include <libmissioncontrol/mission-control.h>
 
+#include <libempathy/empathy-call-factory.h>
 #include <libempathy/empathy-contact-factory.h>
 #include <libempathy/empathy-contact-manager.h>
 #include <libempathy/empathy-dispatcher.h>
@@ -175,7 +176,7 @@ new_message_dialog_response_cb (GtkWidget               *widget,
 
        account = empathy_account_chooser_get_account (EMPATHY_ACCOUNT_CHOOSER (dialog->account_chooser));
        id = gtk_entry_get_text (GTK_ENTRY (dialog->entry_id));
-       if (!account || G_STR_EMPTY (id)) {
+       if (!account || EMP_STR_EMPTY (id)) {
                if (account) {
                        g_object_unref (account);
                }
@@ -186,10 +187,13 @@ new_message_dialog_response_cb (GtkWidget               *widget,
        if (response == 1) {
                EmpathyContactFactory *factory;
                EmpathyContact *contact;
+               EmpathyCallFactory *call_factory;
 
-               factory = empathy_contact_factory_new ();
+               factory = empathy_contact_factory_dup_singleton ();
                contact = empathy_contact_factory_get_from_id (factory, account, id);
-               empathy_start_call_with_contact (contact);
+
+               call_factory = empathy_call_factory_get();
+               empathy_call_factory_new_call (call_factory, contact);
 
                g_object_unref (contact);
                g_object_unref (factory);
@@ -209,7 +213,7 @@ new_message_change_state_button_cb  (GtkEditable             *editable,
        gboolean     sensitive;
 
        id = gtk_entry_get_text (GTK_ENTRY (editable));
-       sensitive = !G_STR_EMPTY (id);
+       sensitive = !EMP_STR_EMPTY (id);
        
        gtk_widget_set_sensitive (dialog->button_chat, sensitive);
        gtk_widget_set_sensitive (dialog->button_call, sensitive);
@@ -307,4 +311,3 @@ empathy_new_message_dialog_show (GtkWindow *parent)
 
        return dialog->dialog;
 }
-