]> git.0d.be Git - empathy.git/blobdiff - tests/empetit.c
Updated Basque translation.
[empathy.git] / tests / empetit.c
index 43fddcbe23aa12b8757c858de557dd20dc849986..2c69d101dc1ac4d4165caafcffc31559a6a9e1d9 100644 (file)
@@ -21,7 +21,7 @@ chat_cb (EmpathyDispatchOperation *dispatch,
   if (error != NULL)
     {
       dialog = gtk_message_dialog_new (GTK_WINDOW (window), GTK_DIALOG_MODAL,
-          GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+          GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s",
           error->message ? error->message : "No error message");
 
       gtk_dialog_run (GTK_DIALOG (dialog));
@@ -37,16 +37,14 @@ clicked_cb (GtkButton *button,
   EmpathyContactSelector *selector = EMPATHY_CONTACT_SELECTOR (data);
   EmpathyContact *contact;
 
-  contact = empathy_contact_selector_get_selected (selector);
+  contact = empathy_contact_selector_dup_selected (selector);
 
   if (!contact)
     return;
 
-  /* This is required otherwise the dispatcher isn't ref'd, and so it
-   * disappears by the time the callback gets called. It's deliberately not
-   * freed otherwise it segfaults... sigh */
-  empathy_dispatcher_dup_singleton ();
   empathy_dispatcher_chat_with_contact (contact, chat_cb, NULL);
+
+  g_object_unref (contact);
 }
 
 int main (int argc,