[meego-commits] 7562: Changes to Trunk:Handset/meego-handset-socialweb
James Ausmus
no_reply at build.meego.com
Thu Sep 16 22:47:46 UTC 2010
Hi,
I have made the following changes to meego-handset-socialweb in project Trunk:Handset. Please review and accept ASAP.
Thank You,
James Ausmus
[This message was auto-generated]
---
Request #7562:
submit: devel:ux:handset/meego-handset-socialweb(r6) -> Trunk:Handset/meego-handset-socialweb
Message:
Fix for BMC#6153 (No Settings/Refresh buttons)
Fix for BMC#6154 (Statuses appear in random order)
Fix for BMC#6317 (Red box background on statuses)
Fix for BMC#6319 (Flash to social networking main window on account config)
Fix for BMC#6640 (Photo not shown completely in individual status page)
Fix for BMC#6867 (Missing string internationalization)
State: new 2010-09-16T15:47:46 jausmus
Comment: None
changes files:
--------------
--- meego-handset-socialweb.changes
+++ meego-handset-socialweb.changes
@@ -0,0 +1,8 @@
+* Thu Sep 16 2010 James Ausmus <james.ausmus at intel.com> - 0.1.3
+- Fix for BMC#6153 (No Settings/Refresh buttons)
+- Fix for BMC#6154 (Statuses appear in random order)
+- Fix for BMC#6317 (Red box background on statuses)
+- Fix for BMC#6319 (Flash to social networking main window on account config)
+- Fix for BMC#6640 (Photo not shown completely in individual status page)
+- Fix for BMC#6867 (Missing string internationalization)
+
old:
----
meego-handset-socialweb-0.1.2.tar.bz2
new:
----
meego-handset-socialweb-0.1.3.tar.bz2
spec files:
-----------
--- meego-handset-socialweb.spec
+++ meego-handset-socialweb.spec
@@ -7,7 +7,7 @@
Name: meego-handset-socialweb
Summary: MeeGo Touch Framework and libsocialweb based social networking application
-Version: 0.1.2
+Version: 0.1.3
Release: 1
Group: Applications/Communications
License: Apache License, Version 2.0
other changes:
--------------
++++++ meego-handset-socialweb-0.1.2.tar.bz2 -> meego-handset-socialweb-0.1.3.tar.bz2
--- common.pri
+++ common.pri
@@ -1,4 +1,4 @@
-VERSION = 0.1.2
+VERSION = 0.1.3
# Paths
M_PREFIX = /usr
M_INSTALL_BIN = $$INSTALL_ROOT$$M_PREFIX/bin/
--- src/nocfgsvcpage.cpp
+++ src/nocfgsvcpage.cpp
@@ -63,8 +63,28 @@
void NoCfgSvcPage::btnNextClicked()
{
+ connect(this,
+ SIGNAL(displayExited()),
+ this,
+ SLOT(dismissPage()));
DuiControlPanelIf *dcpIf = new DuiControlPanelIf();
+
dcpIf->appletPage("SocialWebApplet");
+ //We don't immediately dismiss, as it can take several tens of seconds
+ //for the DCPIF page to come up, and we don't want to have the user see
+ //a transition back to the main page for a few seconds, before the setup
+ //page comes up. The escape mode settings and backButtonClicked signal
+ //connection is a fail-safe - just in case we never get the displayExited() signal
+ //from above (as is the case when testing the app on a regular MeeGo Netbook image)
+ this->setEscapeMode(MApplicationPageModel::EscapeManualBack);
+ connect(this,
+ SIGNAL(backButtonClicked()),
+ this,
+ SLOT(dismissPage()));
+}
+
+void NoCfgSvcPage::dismissPage()
+{
this->dismiss();
}
--- src/nocfgsvcpage.h
+++ src/nocfgsvcpage.h
@@ -27,6 +27,7 @@
private slots:
void btnNextClicked();
+ void dismissPage();
private:
MButton *btnNext;
--- src/switemlistitem.cpp
+++ src/switemlistitem.cpp
@@ -110,7 +110,8 @@
const SwClientService *service = swItem->getService();
if ((!mActReply) && service->canUpdateStatus()) {
- mActReply = new MAction("Reply", this);
+ //% "Reply"
+ mActReply = new MAction(qtTrId("action_reply"), this);
this->addAction(mActReply);
connect(mActReply,
SIGNAL(triggered()),
@@ -123,8 +124,10 @@
}
//We have to special case twitter, so we can RT and reply with the @...
- if ((!mActRetweet) && (swItem->getServiceName() == "twitter")) {
- mActRetweet = new MAction("Retweet", this);
+ if ((!mActRetweet) && (swItem->getServiceName() == "twitter")
+ && service->canUpdateStatus()) {
+ //% "Retweet"
+ mActRetweet = new MAction(qtTrId("action_retweet"), this);
this->addAction(mActRetweet);
connect(mActRetweet,
SIGNAL(triggered()),
@@ -151,11 +154,13 @@
//Centralize the text setting, as it may need to change as the ListItem is recycled between
//different SwClientItems
if (mActViewOn) {
- mActViewOn->setText(QString("View on %1").arg(service->getDisplayName()));
+ //% "View on %1 - 1 is service Display Name"
+ mActViewOn->setText(qtTrId("action_view_on").arg(service->getDisplayName()));
}
if ((!mActHide) && service->hasBanishItems()) {
- mActHide = new MAction("Remove from timeline", this);
+ //% "Remove from timeline"
+ mActHide = new MAction(qtTrId("action_remove_from_timeline"), this);
this->addAction(mActHide);
connect(mActHide,
SIGNAL(triggered()),
@@ -173,8 +178,10 @@
mURLActions.remove(act);
delete act;
}
+
foreach (QUrl url, Marmazon::Utils::GetURLsFromText(swItem->getContent())) {
- MAction *actOpenURL = new MAction(QString("Open %1").arg(url.toString()), this);
+ //% "Open %1 - 1 is link from item text"
+ MAction *actOpenURL = new MAction(qtTrId("action_open_url").arg(url.toString()), this);
this->addAction(actOpenURL);
connect(actOpenURL,
SIGNAL(triggered()),
--- src/switemlistpage.cpp
+++ src/switemlistpage.cpp
@@ -17,14 +17,21 @@
#include "switempage.h"
#include <QDebug>
+#include <QGraphicsItem>
#include <MWidgetCreator>
#include <MSceneManager>
+#include <MAction>
+#include <DuiControlPanelIf>
#include <libsocialweb-qt/swclientitem.h>
#include <libsocialweb-qt/swclientserviceconfig.h>
M_REGISTER_WIDGET(SwItemListPage);
+bool swItemListItemLessThan(SwItemListItem *one, SwItemListItem *two)
+{
+ return (one->getItem()->getDateTime() < two->getItem()->getDateTime());
+}
SwItemListPage::SwServiceGroup::SwServiceGroup() :
service(0),
@@ -77,8 +84,8 @@
void SwItemListPage::createContent()
{
- //% "Social Networking"
- setTitle(qtTrId("item_list_page_title"));
+ //% "Status - updates"
+ setTitle(qtTrId("page_title_status_updates"));
MApplicationPage::createContent();
setPannable(false);
@@ -105,11 +112,11 @@
mStatusUpdateEdit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
mStatusUpdatePolicy->addItem(mStatusUpdateEdit, Qt::AlignTop);
- mStatusUpdateClearButton = new MButton("icon-m-framework-close-alt", "");
+/* mStatusUpdateClearButton = new MButton("icon-m-framework-close-alt", "");
mStatusUpdateClearButton->setObjectName("SwItemListPageStatusUpdateClearButton");
mStatusUpdateClearButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
mStatusUpdatePolicy->addItem(mStatusUpdateClearButton, Qt::AlignTop);
-
+*/
mStatusUpdateSubmitButton = new MButton("icon-m-toolbar-send", "");
mStatusUpdateSubmitButton->setObjectName("SwItemListPageStatusUpdateSubmitButton");
mStatusUpdateSubmitButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
@@ -123,10 +130,10 @@
SIGNAL(returnPressed()),
this,
SLOT(onSubmitButtonClicked()));
- connect(mStatusUpdateClearButton,
+/* connect(mStatusUpdateClearButton,
SIGNAL(clicked()),
this,
- SLOT(onClearButtonClicked()));
+ SLOT(onClearButtonClicked()));*/
connect(mStatusUpdateSubmitButton,
SIGNAL(clicked()),
this,
@@ -198,6 +205,23 @@
SIGNAL(orientationChanged(M::Orientation)),
this,
SLOT(setItemViewWidget()));
+ //% "Settings"
+ MAction *actSettings = new MAction(qtTrId("action_settings"), this);
+ actSettings->setLocation(MAction::ApplicationMenuLocation);
+ addAction(actSettings);
+ connect(actSettings,
+ SIGNAL(triggered()),
+ this,
+ SLOT(onSettingsActionTriggered()));
+
+ //% "Refresh"
+ MAction *actRefresh = new MAction(qtTrId("action_refresh"), this);
+ actRefresh->setLocation(MAction::ApplicationMenuLocation);
+ addAction(actRefresh);
+ connect(actRefresh,
+ SIGNAL(triggered()),
+ this,
+ SLOT(onRefreshActionTriggered()));
//This is ugly - need to refactor whole app to real MVC structure.
//Until then, we trigger display of the NoCfgSvcPage with a QTimer
@@ -334,7 +358,7 @@
void SwItemListPage::onStatusEditTextChanged()
{
bool set = !mStatusUpdateEdit->text().isEmpty();
- mStatusUpdateClearButton->setEnabled(set);
+ //mStatusUpdateClearButton->setEnabled(set);
mStatusUpdateSubmitButton->setEnabled(set);
}
@@ -355,6 +379,46 @@
}
qDebug("---------------------------------\n");*/
}
+ //We're not guaranteed to get items in-order from lsw,
+ //so we have to do our own sort, then clear/re-add items
+ //in the correct order for both Portrait and Landscape views...
+ qSort(mListItemsP.begin(), mListItemsP.end(), swItemListItemLessThan);
+ QGraphicsItem *item;
+ while (!mItemPLayout->isEmpty()) {
+ if ((item = mItemPLayout->takeAt(0)->graphicsItem()))
+ item->hide();
+ }
+ foreach(SwItemListItem *listItem, mListItemsP) {
+ mItemPPolicy->insertItem(0, listItem);
+ listItem->show();
+ }
+
+ /* if (mItemLLayoutV1->count() > mItemLLayoutV2->count()) {
+ mItemLPolicyV2->insertItem(0, listItemL);
+ } else {
+ mItemLPolicyV1->insertItem(0, listItemL);
+ }
+ */
+ qSort(mListItemsL.begin(), mListItemsL.end(), swItemListItemLessThan);
+ while (!mItemLLayoutV1->isEmpty()) {
+ if ((item = mItemLLayoutV1->takeAt(0)->graphicsItem()))
+ item->hide();
+ }
+ while (!mItemLLayoutV2->isEmpty()) {
+ if ((item = mItemLLayoutV2->takeAt(0)->graphicsItem()))
+ item->hide();
+ }
+ bool left = true;
+ foreach(SwItemListItem *listItem, mListItemsL) {
+ if (left)
+ mItemLPolicyV1->insertItem(0, listItem);
+ else
+ mItemLPolicyV2->insertItem(0, listItem);
+ left = !left;
+ listItem->show();
+ }
+
+
}
void SwItemListPage::onItemsChanged(QList<SwClientItem *> itemsChanged)
@@ -402,6 +466,19 @@
noCfgSvcPage->appear(MSceneWindow::DestroyWhenDone);
}
+void SwItemListPage::onSettingsActionTriggered()
+{
+ DuiControlPanelIf *dcpIf = new DuiControlPanelIf();
+ dcpIf->appletPage("SocialWebApplet");
+}
+
+void SwItemListPage::onRefreshActionTriggered()
+{
+ foreach (SwServiceGroup *swGroup, mSvcGroups) {
+ swGroup->view->refreshView();
+ }
+}
+
//Private functions
void SwItemListPage::addServiceToGroups(SwClientService *service)
@@ -473,7 +550,6 @@
//TODO: Currently we don't sort by date/time
SwItemListItem *listItemP = new SwItemListItem(this);
listItemP->setItem(item);
- mItemPPolicy->insertItem(0, listItemP);
mListItemsP.append(listItemP);
connect(listItemP,
@@ -489,14 +565,10 @@
this,
SLOT(onRetweetClicked(SwClientItem*)));
- //We can't have the List Item in both of the layouts - doesn't work!
+ //We can't have the same List Item in both of the layouts - doesn't work!
+ //So we have to maintain 2 separate lists of items. *Very* ugly...
SwItemListItem *listItemL = new SwItemListItem(this);
listItemL->setItem(item);
- if (mItemLLayoutV1->count() > mItemLLayoutV2->count()) {
- mItemLPolicyV2->insertItem(0, listItemL);
- } else {
- mItemLPolicyV1->insertItem(0, listItemL);
- }
mListItemsL.append(listItemL);
connect(listItemL,
--- src/switemlistpage.h
+++ src/switemlistpage.h
@@ -73,6 +73,9 @@
void showNoAccountPage();
+ void onSettingsActionTriggered();
+ void onRefreshActionTriggered();
+
private:
void addServiceToGroups(SwClientService *service);
@@ -96,7 +99,7 @@
MLayout *mStatusUpdateLayout;
MLinearLayoutPolicy *mStatusUpdatePolicy;
MTextEdit *mStatusUpdateEdit;
- MButton *mStatusUpdateClearButton;
+ //MButton *mStatusUpdateClearButton;
MButton *mStatusUpdateSubmitButton;
--- src/switempage.cpp
+++ src/switempage.cpp
@@ -37,6 +37,9 @@
mBtnHide(0)
{
this->setObjectName("SwItemPage");
+ this->setPannable(true);
+ //% "Status - update"
+ this->setTitle(qtTrId("page_title_status_update_single"));
}
@@ -45,12 +48,17 @@
if (!swItem)
return;
- MLayout *oldLayout = dynamic_cast<MLayout *>(this->layout());
+ MLayout *oldLayout = dynamic_cast<MLayout *>(centralWidget()->layout());
if (oldLayout && oldLayout->isLayout()) {
while (!oldLayout->isEmpty()) {
QGraphicsLayoutItem *item = oldLayout->takeAt(0);
delete item;
}
+ mBtnReply = 0;
+ mBtnRetweet = 0;
+ mBtnViewOn = 0;
+ mBtnHide = 0;
+ mURLButtons.clear();
}
mItem = swItem;
@@ -59,11 +67,14 @@
setObjectName("SwItemPage");
- MLayout *mLayout = new MLayout(this);
+ MWidgetController *mwcSwItem = new MWidgetController();
+ mwcSwItem->setObjectName("mwcSwItem");
+ MLayout *mLayout = new MLayout(mwcSwItem);
MGridLayoutPolicy *mPolicy = new MGridLayoutPolicy(mLayout);
mLayout->setPolicy(mPolicy);
- setLayout(mLayout);
+ mwcSwItem->setLayout(mLayout);
+ this->setCentralWidget(mwcSwItem);
QPixmap *authPic = mItem->getAuthorIcon();
MImageWidget *mAuthorPic = new MImageWidget();
@@ -72,7 +83,7 @@
else
mAuthorPic->setPixmap(*authPic);
mAuthorPic->setObjectName("SwItemPageAuthorPic");
- mAuthorPic->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ mAuthorPic->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
mPolicy->addItem(mAuthorPic, 0, 0, Qt::AlignHCenter | Qt::AlignTop);
MLabel *mAuthorName = new MLabel(mItem->getAuthorName());
@@ -107,24 +118,28 @@
const SwClientService *service = swItem->getService();
if ((!mBtnReply) && service->canUpdateStatus()) {
- mBtnReply = new MButton("Reply", this);
+ //% "Reply"
+ mBtnReply = new MButton(qtTrId("btn_reply"), this);
connect(mBtnReply,
- SIGNAL(triggered()),
+ SIGNAL(clicked()),
this,
SLOT(onReplyClicked()));
- //TODO - add buttons to mLayout
+ mPolicy->addItem(mBtnReply, 3+offset++, 0, 1, 2, Qt::AlignCenter);
} else if ((mBtnReply) && !service->canUpdateStatus()) {
mLayout->animatedDeleteItem(mBtnReply);
mBtnReply = 0;
}
//We have to special case twitter, so we can RT and reply with the @...
- if ((!mBtnRetweet) && (swItem->getServiceName() == "twitter")) {
- mBtnRetweet = new MButton("Retweet", this);
+ if ((!mBtnRetweet) && (swItem->getServiceName() == "twitter")
+ && service->canUpdateStatus()) {
+ //% "Retweet"
+ mBtnRetweet = new MButton(qtTrId("btn_retweet"), this);
connect(mBtnRetweet,
- SIGNAL(triggered()),
+ SIGNAL(clicked()),
this,
SLOT(onRetweetClicked()));
+ mPolicy->addItem(mBtnRetweet, 3+offset++, 0, 1, 2, Qt::AlignCenter);
} else if ((mBtnRetweet) && (swItem->getServiceName() != "twitter")) {
mLayout->animatedDeleteItem(mBtnRetweet);
mBtnRetweet = 0;
@@ -133,9 +148,10 @@
if ((!mBtnViewOn) && !swItem->getURL().isEmpty()) {
mBtnViewOn = new MButton("", this);
connect(mBtnViewOn,
- SIGNAL(triggered()),
+ SIGNAL(clicked()),
this,
SLOT(onViewOnClicked()));
+ mPolicy->addItem(mBtnViewOn, 3+offset++, 0, 1, 2, Qt::AlignCenter);
} else if ((mBtnViewOn) && swItem->getURL().isEmpty()) {
mLayout->animatedDeleteItem(mBtnViewOn);
mBtnViewOn = 0;
@@ -143,33 +159,41 @@
//Centralize the text setting, as it may need to change as the ListItem is recycled between
//different SwClientItems
if (mBtnViewOn) {
- mBtnViewOn->setText(QString("View on %1").arg(service->getDisplayName()));
+ //% "View on %1 - 1 is the service Display Name"
+ mBtnViewOn->setText(qtTrId("btn_view_on").arg(service->getDisplayName()));
}
if ((!mBtnHide) && service->hasBanishItems()) {
- mBtnHide = new MButton("Remove from timeline", this);
+ //% "Remove from timeline"
+ mBtnHide = new MButton(qtTrId("btn_remove_from_timeline"), this);
connect(mBtnHide,
- SIGNAL(triggered()),
+ SIGNAL(clicked()),
this,
SLOT(onHideClicked()));
+ mPolicy->addItem(mBtnHide, 3+offset++, 0, 1, 2, Qt::AlignCenter);
} else if ((mBtnHide) && !service->hasBanishItems()) {
mLayout->animatedDeleteItem(mBtnHide);
mBtnHide = 0;
}
- while (mURLButtons.count()) {
+/* while (mURLButtons.count()) {
MButton *btn = mURLButtons.uniqueKeys()[0];
mURLButtons.remove(btn);
mLayout->animatedDeleteItem(btn);
}
+ */
+
foreach (QUrl url, Marmazon::Utils::GetURLsFromText(swItem->getContent())) {
- MButton *btnOpenURL = new MButton(QString("Open %1").arg(url.toString()), this);
+ //% "Open %1 - 1 is URL from item text"
+ MButton *btnOpenURL = new MButton(qtTrId("btn_open_url").arg(url.toString()), this);
connect(btnOpenURL,
- SIGNAL(triggered()),
+ SIGNAL(clicked()),
this,
SLOT(onBtnOpenURL()));
mURLButtons.insert(btnOpenURL, url);
+ mPolicy->addItem(btnOpenURL, 3+offset++, 0, 1, 2, Qt::AlignCenter);
}
+
//relayoutButtons();
}
@@ -179,11 +203,13 @@
void SwItemPage::onReplyClicked()
{
emit this->replyClicked(mItem);
+ dismiss();
}
void SwItemPage::onRetweetClicked()
{
emit this->retweetClicked(mItem);
+ dismiss();
}
void SwItemPage::onViewOnClicked()
--- theme/base/style/meego-handset-socialweb.css
+++ theme/base/style/meego-handset-socialweb.css
@@ -8,7 +8,7 @@
}
#SwItemListItem {
- background-image: "im-conversationIncoming-background-pressed";
+ background-image: "meegotouch-speechbubble-incoming-background";
margin-left: 0;
margin-right: 0;
}
++++++ meego-handset-socialweb.yaml
--- meego-handset-socialweb.yaml
+++ meego-handset-socialweb.yaml
@@ -1,6 +1,6 @@
Name: meego-handset-socialweb
Summary: MeeGo Touch Framework and libsocialweb based social networking application
-Version: 0.1.2
+Version: 0.1.3
Release: 1
Group: Applications/Communications
License: Apache License, Version 2.0
More information about the MeeGo-commits
mailing list