Added back button, removed list selection from location list view when
authorJussi Laitinen <jupe@l3l7588.ixonos.local>
Mon, 6 Sep 2010 07:54:19 +0000 (10:54 +0300)
committerJussi Laitinen <jupe@l3l7588.ixonos.local>
Mon, 6 Sep 2010 07:54:19 +0000 (10:54 +0300)
there is only one location populated to the list.

images.qrc
res/images/back_btn.png [new file with mode: 0644]
res/images/back_btn_d.png [new file with mode: 0644]
res/images/back_btn_s.png [new file with mode: 0644]
src/engine/engine.cpp
src/ui/listview.cpp
src/ui/locationsearchpanel.cpp

index 3dc6593..c64db73 100644 (file)
         <file>res/images/list_item_context_button_bar_right.png</file>
         <file>res/images/list_item_context_button_bar_tile.png</file>
         <file>res/images/search_history.png</file>
-        <file>res/images/clear_btn_d.png</file>
-        <file>res/images/clear_btn_s.png</file>
-        <file>res/images/clear_btn.png</file>
         <file>res/images/contact_btn.png</file>
         <file>res/images/contact_btn_d.png</file>
         <file>res/images/contact_btn_s.png</file>
+        <file>res/images/back_btn_d.png</file>
+        <file>res/images/back_btn_s.png</file>
+        <file>res/images/back_btn.png</file>
     </qresource>
 </RCC>
diff --git a/res/images/back_btn.png b/res/images/back_btn.png
new file mode 100644 (file)
index 0000000..ddef5ca
Binary files /dev/null and b/res/images/back_btn.png differ
diff --git a/res/images/back_btn_d.png b/res/images/back_btn_d.png
new file mode 100644 (file)
index 0000000..70591a9
Binary files /dev/null and b/res/images/back_btn_d.png differ
diff --git a/res/images/back_btn_s.png b/res/images/back_btn_s.png
new file mode 100644 (file)
index 0000000..26471e3
Binary files /dev/null and b/res/images/back_btn_s.png differ
index d94ebfd..f8fcf91 100644 (file)
@@ -580,8 +580,8 @@ void SituareEngine::showContactDialog(const QString &facebookId)
     if (!guid.isEmpty())
         m_ui->showContactDialog(guid);
     else
-        m_ui->buildInformationBox(tr("Unable to find contact.\nYou must have Facebook "
-                                     "chat account to be able to open contact dialog."), true);
+        m_ui->buildInformationBox(tr("Unable to find contact.\nAdd Facebook IM "
+                                     "account from Conversations to use this feature."), true);
 }
 
 void SituareEngine::signalsFromFacebookAuthenticator()
index c1e8617..94be566 100644 (file)
@@ -64,12 +64,16 @@ void ListView::clearItemSelection()
 
     if (m_currentItem)
         m_currentItem->setSelected(false);
+
+    emit listItemSelectionChanged();
 }
 
 void ListView::clearList()
 {
     qDebug() << __PRETTY_FUNCTION__;
 
+    clearItemSelection();
+
     qDeleteAll(m_listItems.begin(), m_listItems.end());
     m_listItems.clear();
     clear();
index 63449a0..533da07 100644 (file)
@@ -107,9 +107,9 @@ LocationSearchPanel::LocationSearchPanel(QWidget *parent)
     connect(searchLocationButton, SIGNAL(clicked()),
             this, SIGNAL(requestSearchLocation()));
 
-    m_clearLocationListButton = new ImageButton(":/res/images/clear_btn.png",
-                                                ":/res/images/clear_btn_s.png",
-                                                ":/res/images/clear_btn_d.png", this);
+    m_clearLocationListButton = new ImageButton(":/res/images/back_btn.png",
+                                                ":/res/images/back_btn_s.png",
+                                                ":/res/images/back_btn_d.png", this);
     m_clearLocationListButton->setDisabled(true);
 
     connect(m_clearLocationListButton, SIGNAL(clicked()),
@@ -190,16 +190,6 @@ void LocationSearchPanel::populateLocationListView(const QList<Location> &locati
         m_locationListView->addListItem(QString::number(i), item);
     }
 
-    const int FIRST_LOCATION_ITEM_INDEX = 0;
-    const int ONE_LOCATION_ITEM = 1;
-
-    if (locations.size() == ONE_LOCATION_ITEM) {
-        ListItem *item = m_locationListView->listItemAt(FIRST_LOCATION_ITEM_INDEX);
-
-        if (item)
-            m_locationListView->setSelectedItem(item);
-    }
-
     m_locationListView->scrollToTop();
 }