]> git.0d.be Git - empathy.git/blobdiff - tests/empetit.c
Adjust empetit to test the contact selector filtering.
[empathy.git] / tests / empetit.c
index 2d71c5359753e483fa0d13a8354f281f6c117a9c..e2eb61f66eeaec3007cec65d5994e2bef9c08df4 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));
@@ -60,6 +60,9 @@ int main (int argc,
   manager = empathy_contact_manager_dup_singleton ();
   selector = empathy_contact_selector_new (EMPATHY_CONTACT_LIST (manager));
 
+  empathy_contact_selector_set_visible (EMPATHY_CONTACT_SELECTOR (selector),
+      (EmpathyContactSelectorFilterFunc) empathy_contact_can_send_files, NULL);
+
   vbox = gtk_vbox_new (FALSE, 2);
 
   gtk_box_pack_start (GTK_BOX (vbox), selector, FALSE, FALSE, 5);