Active Topics

 


Reply
Thread Tools
Posts: 121 | Thanked: 53 times | Joined on Aug 2006 @ Alexandria, VA, USA
#1
I need help with osso_abook_contact_chooser_select_contacts(). Should it make check marks next to the OssoABookContacts I give it? I'm not seeing that in the application I'm writing with Qt. I will appreciate any help you all can give me here.

Here is the bit of code that I'm using. Most of it came from
How to use native Maemo5 contacts dialogs on forum.nokia.com.

Code:
// list of QString representations of contact UIDs
// This is already populated for me and I can prove that the 
// strings in it represent valid contact UIDs.
QStringList *selectedContacts = ...;
GtkWidget* contactChooser = osso_abook_contact_chooser_new_with_capabilities (NULL, qPrintable(windowTitle), caps, order);
    osso_abook_contact_chooser_set_minimum_selection(OSSO_ABOOK_CONTACT_CHOOSER(contactChooser), lower_limit);
    osso_abook_contact_chooser_set_maximum_selection(OSSO_ABOOK_CONTACT_CHOOSER(contactChooser), upper_limit);

if (0 != selectedContacts) {
    QString contact;
    foreach (contact, *selectedContacts) {
          OssoABookContact *c = QOssoABookDialog::lookup(contact);
          if (0 != c) {
                g= g_list_prepend(g, c);
          } else qDebug() << "Did not find " << contact;
    }

osso_abook_contact_chooser_select_contacts(OSSO_ABOOK_CONTACT_CHOOSER(contactChooser), g);
}

//Shows a modal dialog.
GList* contacts; // Do not free
if (gtk_dialog_run(GTK_DIALOG(contactChooser)) == GTK_RESPONSE_OK){
  ...
}
 
Reply


 
Forum Jump


All times are GMT. The time now is 13:24.