Changed direction of the new text method on GxsGroupDialog. Now the service group dialogs can set the string for the gui elements.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6063 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-01-07 11:40:05 +00:00
parent 1c7e374fcd
commit 70e9b08bb0
8 changed files with 50 additions and 72 deletions

View file

@ -62,26 +62,20 @@ GxsForumGroupDialog::GxsForumGroupDialog(const RsGxsForumGroup &group, Mode mode
{
}
QString GxsForumGroupDialog::uiText(UiType uiType)
void GxsForumGroupDialog::initUi()
{
switch (uiType)
switch (mode())
{
case UITYPE_SERVICE_HEADER:
switch (mode())
{
case MODE_CREATE:
return tr("Create New Forum");
case MODE_SHOW:
return tr("Forum");
case MODE_EDIT:
return tr("Edit Forum");
}
case MODE_CREATE:
setUiText(UITYPE_SERVICE_HEADER, tr("Create New Forum"));
break;
default:
// remove compiler warnings
case MODE_SHOW:
setUiText(UITYPE_SERVICE_HEADER, tr("Forum"));
break;
case MODE_EDIT:
setUiText(UITYPE_SERVICE_HEADER, tr("Edit Forum"));
break;
}
return "";
}
QPixmap GxsForumGroupDialog::serviceImage()

View file

@ -34,7 +34,7 @@ public:
GxsForumGroupDialog(const RsGxsForumGroup &group, Mode mode, QWidget *parent);
protected:
virtual QString uiText(UiType uiType);
virtual void initUi();
virtual QPixmap serviceImage();
virtual bool service_CreateGroup(uint32_t &token, const RsGroupMetaData &meta);
};