From 6b16a4fa0fbaa24b64cd313d42c5b71eb6523384 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Mon, 2 Feb 2015 13:43:48 +0100 Subject: [PATCH] Add extra text field to facebook dialog When any of the boxes in the facebook post dialog are changed, any user edits to the text field get lost. This patch makes the text field read only and adds an extra textfield for ad lib comments (that do not get lost upon changing check marks). Signed-off-by: Robert C. Helling --- qt-ui/socialnetworks.cpp | 2 + qt-ui/socialnetworksdialog.ui | 153 +++++++++++++++++++++++++++++------------- 2 files changed, 110 insertions(+), 45 deletions(-) diff --git a/qt-ui/socialnetworks.cpp b/qt-ui/socialnetworks.cpp index 21ccf93..63a8d69 100644 --- a/qt-ui/socialnetworks.cpp +++ b/qt-ui/socialnetworks.cpp @@ -281,6 +281,7 @@ SocialNetworkDialog::SocialNetworkDialog(QWidget *parent) : QDialog(parent) connect(ui->Location, SIGNAL(clicked()), this, SLOT(selectionChanged())); connect(ui->Notes, SIGNAL(clicked()), this, SLOT(selectionChanged())); connect(ui->album, SIGNAL(textChanged(QString)), this, SLOT(albumChanged())); + connect(ui->extraText, SIGNAL(textChanged()), this, SLOT(selectionChanged())); } void SocialNetworkDialog::albumChanged() @@ -313,6 +314,7 @@ void SocialNetworkDialog::selectionChanged() if (ui->Notes->isChecked()) { fullText += tr("\n%1").arg(d->notes); } + fullText += ui->extraText->toPlainText(); ui->text->setPlainText(fullText); } diff --git a/qt-ui/socialnetworksdialog.ui b/qt-ui/socialnetworksdialog.ui index e8953d1..5ec9af6 100644 --- a/qt-ui/socialnetworksdialog.ui +++ b/qt-ui/socialnetworksdialog.ui @@ -38,7 +38,7 @@ 361 - + 1 @@ -51,44 +51,100 @@ 1 - - - - The text to the right will be posted as the description with your profile picture to Facebook. The album name is required (the profile picture will be posted to that album). + + + + + + + + + 236 + 229 + 255 + + + + + + + + + 236 + 229 + 255 + + + + + + + + + 237 + 237 + 237 + + + + + - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + Qt::NoFocus - + + false + + true + + QFrame::Box + + + Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + - - + + + + + 75 + true + + - Album + Facebook post preview - - - - The profile picture will be posted in this album (required) + + + + Notes - - + + - Include + Buddy - - + + - Date and time + Divemaster + + + + + + + Location @@ -99,49 +155,56 @@ - - + + - Location + Date and time - - + + - Divemaster + Album - - + + - Buddy + Include - - - - Notes + + + + The profile picture will be posted in this album (required) - - - - - 75 - true - - + + - Facebook post preview + The text to the right will be posted as the description with your profile picture to Facebook. The album name is required (the profile picture will be posted to that album). + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true - - + + + + + + + Extra text + + -- 1.9.3 (Apple Git-50)