I've made a patch for support of non-im contacts. I don't know how it
should be made, but i hope `svn diff` is right way :)
P.S. I've deleted some strings, that haven't any sense.

Patch:

Index: plugins/_core/nonim.cpp
===================================================================
--- plugins/_core/nonim.cpp     (revision 2054)
+++ plugins/_core/nonim.cpp     (working copy)
@@ -36,9 +36,9 @@
     emit setAdd(true);
 }
 
-void NonIM::add(unsigned grp_id)
+void NonIM::add(Contact *&contact)
 {
-    Contact *contact = getContacts()->contact(0, true);
+    contact = getContacts()->contact(0, true);
     contact->setFirstName(edtFirst->text());
     contact->setLastName(edtLast->text());
     if (!edtMail->text().isEmpty())
@@ -57,10 +57,15 @@
     if (nick.isEmpty())
         nick = edtPhone->text();
     contact->setName(nick);
-    contact->setGroup(grp_id);
-    EventContact(contact, EventContact::eChanged).process();
 }
 
+void NonIM::createContact(unsigned tmpFlags, Contact *&contact)
+{
+       add(contact);
+       contact->setFlags(contact->getFlags() | tmpFlags);
+}
+
+
 #ifndef NO_MOC_INCLUDES
 #include "nonim.moc"
 #endif
Index: plugins/_core/nonim.h
===================================================================
--- plugins/_core/nonim.h       (revision 2054)
+++ plugins/_core/nonim.h       (working copy)
@@ -29,7 +29,8 @@
     void setAdd(bool);
     void showError(const QString&);
 protected slots:
-    void add(unsigned grp_id);
+    void add(SIM::Contact *&contact);
+    void createContact(unsigned tmpFlags, SIM::Contact *&contact);
 protected:
     void showEvent(QShowEvent*);
 };



_______________________________________________
sim-im-main mailing list
[email protected]
https://mailman.dg.net.ua/listinfo/sim-im-main

Reply via email to