Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unified some string translations #72

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/generic/generic.pro
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ maemo5: {
SOURCES += main.cpp \
ui/mainwindow.cpp \
ui/settingsdialog.cpp \
ui/connectdialog.cpp \
ui/aboutdialog.cpp \
ui/authenticationdialog.cpp \
qmlapplicationviewer/qmlapplicationviewer.cpp \
ui/connectiondialog.cpp


HEADERS += ui/mainwindow.h \
ui/settingsdialog.h \
ui/connectdialog.h \
ui/aboutdialog.h \
ui/authenticationdialog.h \
qmlapplicationviewer/qmlapplicationviewer.h \
ui/connectiondialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* *
****************************************************************************/

#include "connectdialog.h"
#include "connectiondialog.h"

#include <QGridLayout>
#include <QDialogButtonBox>
Expand All @@ -33,7 +33,7 @@
#include "libkodimote/kodihostmodel.h"
#include "libkodimote/kodidiscovery.h"

ConnectDialog::ConnectDialog(QWidget *parent) :
ConnectionDialog::ConnectionDialog(QWidget *parent) :
QDialog(parent)
{

Expand Down Expand Up @@ -135,7 +135,7 @@ ConnectDialog::ConnectDialog(QWidget *parent) :
#endif
}

void ConnectDialog::accept()
void ConnectionDialog::accept()
{
if(m_stackedLayout->currentIndex() == 0) {
KodiHost *host = Kodi::instance()->hostModel()->host(m_hostView->currentIndex().row());
Expand All @@ -153,7 +153,7 @@ void ConnectDialog::accept()
QDialog::accept();
}

void ConnectDialog::showManualLayout()
void ConnectionDialog::showManualLayout()
{
if(m_stackedLayout->currentIndex() != 2) {
m_stackedLayout->setCurrentIndex(2);
Expand All @@ -169,12 +169,12 @@ void ConnectDialog::showManualLayout()
enableOkButton();
}

void ConnectDialog::showHostList()
void ConnectionDialog::showHostList()
{
m_stackedLayout->setCurrentIndex(0);
}

void ConnectDialog::enableOkButton()
void ConnectionDialog::enableOkButton()
{
switch(m_stackedLayout->currentIndex()) {
case 0:
Expand All @@ -193,7 +193,7 @@ void ConnectDialog::enableOkButton()
}
}

void ConnectDialog::removeHost()
void ConnectionDialog::removeHost()
{
Kodi::instance()->hostModel()->removeHost(m_hostView->currentIndex().row());
enableOkButton();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ class QGridLayout;
class QListView;
class QDialogButtonBox;

class ConnectDialog : public QDialog
class ConnectionDialog : public QDialog
{
Q_OBJECT

public:
explicit ConnectDialog(QWidget *parent = 0);
explicit ConnectionDialog(QWidget *parent = 0);

void setHostname(const QString &hostname);
QString hostname();
Expand Down
14 changes: 7 additions & 7 deletions apps/generic/ui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "mainwindow.h"
#include "settingsdialog.h"
#include "connectdialog.h"
#include "connectiondialog.h"
#include "aboutdialog.h"
#include "authenticationdialog.h"

Expand Down Expand Up @@ -81,8 +81,8 @@ MainWindow::MainWindow(Settings *settings, QWidget *parent) :

QMenuBar *menuBar = new QMenuBar();
QMenu *menu = menuBar->addMenu("Kodi");
menu->addAction(tr("Connect..."), this, SLOT(openConnectDialog()));
menu->addAction(tr("Settings"), this, SLOT(openSettingsDialog()));
menu->addAction(tr("Connect..."), this, SLOT(openConnectionDialog()));
menu->addAction(SettingsDialog::tr("Settings"), this, SLOT(openSettingsDialog()));

QAction *quitAction = menu->addAction("Quit Kodi", Kodi::instance(), SLOT(quit()));
Kodi::instance()->connect(Kodi::instance(), SIGNAL(connectedChanged(bool)), quitAction, SLOT(setEnabled(bool)));
Expand All @@ -101,7 +101,7 @@ MainWindow::MainWindow(Settings *settings, QWidget *parent) :
connect(Kodi::instance(), SIGNAL(authenticationRequired(QString,QString)), SLOT(authenticationRequired(QString,QString)), Qt::QueuedConnection);

if(!Kodi::instance()->connecting()) {
openConnectDialog();
openConnectionDialog();
}
}

Expand Down Expand Up @@ -134,10 +134,10 @@ void MainWindow::openSettingsDialog()
settings->exec();
}

void MainWindow::openConnectDialog()
void MainWindow::openConnectionDialog()
{
ConnectDialog *settings = new ConnectDialog();
settings->exec();
ConnectionDialog *connection = new ConnectionDialog();
connection->exec();
}

void MainWindow::openAboutDialog()
Expand Down
2 changes: 1 addition & 1 deletion apps/generic/ui/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class MainWindow : public QMainWindow
private slots:
void orientationChanged();
void openSettingsDialog();
void openConnectDialog();
void openConnectionDialog();
void openAboutDialog();

#ifdef Q_WS_MAEMO_5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import com.nokia.meego 1.0
import Xbmc 1.0

Sheet {
id: connectionSheet
id: authenticationDialog
acceptButtonText: qsTr("OK")
rejectButtonText: qsTr("Cancel")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import QtMobility.connectivity 1.2
import Xbmc 1.0

Sheet {
id: connectionSheet
id: connectionDialog
acceptButtonText: qsTr("Connect")
rejectButtonText: qsTr("Cancel")
acceptButton.enabled: itemView.currentIndex == 0 && hostList.currentIndex >= 0 || hostnameTextField.text != ""
Expand All @@ -39,7 +39,7 @@ Sheet {
target: xbmc
onConnectedChanged: {
if(connected)
connectionSheet.reject();
connectionDialog.reject();
}
}

Expand Down Expand Up @@ -254,11 +254,11 @@ Sheet {
var newIndex = xbmc.hostModel().createHost(hostnameTextField.text, hostnameTextField.text, portTextField.text, macTextField.text);
xbmc.hostModel().connectToHost(newIndex);
}
connectionSheet.destroy();
connectionDialog.destroy();
}

onRejected: {
print("rejected");
connectionSheet.destroy();
connectionDialog.destroy();
}
}
2 changes: 1 addition & 1 deletion apps/harmattan/qml/NoConnectionPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Page {
text: qsTr("Connect...")
anchors.horizontalCenter: parent.horizontalCenter
onClicked: {
var component = Qt.createComponent("ConnectionSheet.qml")
var component = Qt.createComponent("ConnectionDialog.qml")
if (component.status === Component.Ready) {
component.createObject(mainPage).open()
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import QtQuick 1.1
import com.nokia.meego 1.0

Sheet {
id: connectionSheet
id: settingsDialog
acceptButtonText: qsTr("Save")
rejectButtonText: qsTr("Cancel")

Expand Down
8 changes: 4 additions & 4 deletions apps/harmattan/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ PageStackWindow {

print("connecting", xbmc.connecting, "connected", xbmc.connected)
if(!(xbmc.connecting || xbmc.connected)) {
var component = Qt.createComponent("ConnectionSheet.qml")
var component = Qt.createComponent("ConnectionDialog.qml")
if (component.status == Component.Ready) {
component.createObject(mainPage).open()
} else {
Expand Down Expand Up @@ -98,7 +98,7 @@ PageStackWindow {
MenuItem {
text: qsTr("Connect...")
onClicked: {
var component = Qt.createComponent("ConnectionSheet.qml")
var component = Qt.createComponent("ConnectionDialog.qml")
if (component.status == Component.Ready) {
component.createObject(mainPage).open()
} else {
Expand Down Expand Up @@ -129,7 +129,7 @@ PageStackWindow {
text: qsTr("Settings")
onClicked: {
onClicked: {
var component = Qt.createComponent("SettingsSheet.qml")
var component = Qt.createComponent("SettingsDialog.qml")
if (component.status == Component.Ready) {
component.createObject(mainPage).open()
} else {
Expand Down Expand Up @@ -171,7 +171,7 @@ PageStackWindow {
target: xbmc
onAuthenticationRequired: {
print("auth required");
var component = Qt.createComponent("AuthenticationSheet.qml")
var component = Qt.createComponent("AuthenticationDialog.qml")
if (component.status == Component.Ready) {
var authSheet = component.createObject(mainPage);
authSheet.hostname = hostname;
Expand Down
2 changes: 1 addition & 1 deletion apps/sailfish/qml/pages/BrowserPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Page {
}

MenuItem {
text: qsTr("Now playing")
text: qsTr("Now Playing")
enabled: kodi.activePlayer !== null
onClicked: {
pageStack.push("NowPlayingPage.qml")
Expand Down
2 changes: 1 addition & 1 deletion apps/sailfish/qml/pages/Keypad.qml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Page {
}

MenuItem {
text: qsTr("Now playing")
text: qsTr("Now Playing")
enabled: kodi.activePlayer !== null
onClicked: {
pageStack.replace("NowPlayingPage.qml")
Expand Down
2 changes: 1 addition & 1 deletion apps/sailfish/qml/pages/MainPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Page {
}

MenuItem {
text: qsTr("Now playing")
text: qsTr("Now Playing")
enabled: kodi.activePlayer !== null
onClicked: {
pageStack.push("NowPlayingPage.qml")
Expand Down
2 changes: 1 addition & 1 deletion apps/sailfish/qml/pages/NowPlayingPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Page {
}

MenuItem {
text: qsTr("Now playing")
text: qsTr("Now Playing")
enabled: false
}
}
Expand Down
2 changes: 1 addition & 1 deletion apps/ubuntu/qml/MainPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ KodiPage {
text: qsTr("Options")
Layout.fillWidth: true
onClicked: {
PopupUtils.open(Qt.resolvedUrl("SettingsSheet.qml"), mainPage)
PopupUtils.open(Qt.resolvedUrl("SettingsDialog.qml"), mainPage)
}
}
BottomEdgeButton {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion apps/ubuntu/resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<file>qml/NowPlayingPage.qml</file>
<file>qml/OpenEffect.qml</file>
<file>qml/RatingStars.qml</file>
<file>qml/SettingsSheet.qml</file>
<file>qml/SettingsDialog.qml</file>
<file>qml/Thumbnail.qml</file>
<file>qml/components/AboutDialog.qml</file>
<file>qml/components/BottomEdge.qml</file>
Expand Down
Loading