diff --git a/modules/aum/backend.py b/modules/aum/backend.py
index be3a1c8a..3fb866f7 100644
--- a/modules/aum/backend.py
+++ b/modules/aum/backend.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright(C) 2010-2011 Romain Bignon
+# Copyright(C) 2010-2014 Romain Bignon
#
# This file is part of weboob.
#
@@ -127,6 +127,12 @@ class AuMBackend(BaseBackend, CapMessages, CapMessagesPost, CapDating, CapChat,
e.message = message % e.contact.name
yield e
+ def iter_new_contacts(self):
+ with self.browser:
+ for _id in self.browser.search_profiles():#.difference(self.OPTIM_PROFILE_WALKER.visited_profiles):
+ contact = Contact(_id, '', 0)
+ yield contact
+
# ---- CapMessages methods ---------------------
def fill_thread(self, thread, fields):
diff --git a/weboob/applications/qhavedate/contacts.py b/weboob/applications/qhavedate/contacts.py
index ccc166fe..f4838984 100644
--- a/weboob/applications/qhavedate/contacts.py
+++ b/weboob/applications/qhavedate/contacts.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright(C) 2010-2011 Romain Bignon
+# Copyright(C) 2010-2014 Romain Bignon
#
# This file is part of weboob.
#
@@ -313,7 +313,7 @@ class ContactProfile(QWidget):
self.display_photo()
def display_photo(self):
- if self.displayed_photo_idx >= len(self.contact.photos):
+ if self.displayed_photo_idx >= len(self.contact.photos) or self.displayed_photo_idx < 0:
self.displayed_photo_idx = len(self.contact.photos) - 1
if self.displayed_photo_idx < 0:
self.ui.photoUrlLabel.setText('')
diff --git a/weboob/applications/qhavedate/main_window.py b/weboob/applications/qhavedate/main_window.py
index 55dc5557..c60e3417 100644
--- a/weboob/applications/qhavedate/main_window.py
+++ b/weboob/applications/qhavedate/main_window.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright(C) 2010-2011 Romain Bignon
+# Copyright(C) 2010-2014 Romain Bignon
#
# This file is part of weboob.
#
@@ -34,6 +34,7 @@ from .ui.main_window_ui import Ui_MainWindow
from .status import AccountsStatus
from .contacts import ContactsWidget
from .events import EventsWidget
+from .search import SearchWidget
class MainWindow(QtMainWindow):
@@ -54,6 +55,7 @@ class MainWindow(QtMainWindow):
self.addTab(MessagesManager(self.weboob) if HAVE_BOOBMSG else None, self.tr('Messages'))
self.addTab(ContactsWidget(self.weboob), self.tr('Contacts'))
self.addTab(EventsWidget(self.weboob), self.tr('Events'))
+ self.addTab(SearchWidget(self.weboob), self.tr('Search'))
self.addTab(None, self.tr('Calendar'))
self.addTab(None, self.tr('Optimizations'))
diff --git a/weboob/applications/qhavedate/search.py b/weboob/applications/qhavedate/search.py
new file mode 100644
index 00000000..a1514bc7
--- /dev/null
+++ b/weboob/applications/qhavedate/search.py
@@ -0,0 +1,104 @@
+# -*- coding: utf-8 -*-
+
+# Copyright(C) 2010-2014 Romain Bignon
+#
+# This file is part of weboob.
+#
+# weboob is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# weboob is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with weboob. If not, see