From 6f2ff462f9a324f1547dde296a7517c9863f3b06 Mon Sep 17 00:00:00 2001 From: nils Date: Wed, 29 Sep 2010 20:26:26 +0000 Subject: nearly added icon for attachments in statusbar git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@379 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- gpgwin.cpp | 37 +++++++++++++++---------------------- gpgwin.h | 1 + keylist.cpp | 11 ----------- release/icons/statusbar_icon.png | Bin 0 -> 870 bytes 4 files changed, 16 insertions(+), 33 deletions(-) create mode 100644 release/icons/statusbar_icon.png diff --git a/gpgwin.cpp b/gpgwin.cpp index d9d740d..3619a37 100644 --- a/gpgwin.cpp +++ b/gpgwin.cpp @@ -324,31 +324,21 @@ void GpgWin::createToolBars() void GpgWin::createStatusBar() { - QWidget *langBox = new QWidget(); - QHBoxLayout *vbox2 = new QHBoxLayout(); - - langBox->setLayout(vbox2); - -// langBox->addMenuAction(appendSelectedKeysAct); - + QWidget *statusBarBox = new QWidget(); + QHBoxLayout *statusBarBoxLayout = new QHBoxLayout(); statusBar()->showMessage(tr("Ready"),2000); - statusBar()->setContentsMargins(0,0,0,0); - QLabel *label; QPixmap *pixmap; - QMenu *menu; - pixmap = new QPixmap(iconPath + "statusbar_txt3.png"); - label = new QLabel(statusBar()); - label->setPixmap(*pixmap); - langBox->setLayout(vbox2); - menu = new QMenu(label); - QMenu *filemenu; - filemenu= menu->addMenu(tr("&File")); - label->setStatusTip("Es liegen Dateien im Attachments-Ordner"); - label->setWhatsThis("Attachment vorhanden"); - statusBar()->insertPermanentWidget(0,label,0); - statusBar()->setFixedHeight(30); + pixmap = new QPixmap(iconPath + "statusbar_icon.png"); + statusBarIcon = new QLabel(statusBar()); + statusBarIcon->setPixmap(*pixmap); + statusBarBox->setLayout(statusBarBoxLayout); + + statusBarIcon->setStatusTip(tr("Files have been saved to attachment subdirectory")); + + statusBar()->insertPermanentWidget(0,statusBarIcon,0); + statusBarIcon->hide(); } void GpgWin::createDockWindows() @@ -617,7 +607,10 @@ void GpgWin::parseMime(QByteArray *message) } *message = pText.toUtf8(); - if (showmadock) aDock->show(); + if (showmadock) { + aDock->show(); + statusBarIcon->show(); + } } /** diff --git a/gpgwin.h b/gpgwin.h index bba998c..3081539 100644 --- a/gpgwin.h +++ b/gpgwin.h @@ -149,6 +149,7 @@ private: QLabel *passwordLabel; QLabel *repeatpwLabel; QLabel *errorLabel; + QLabel *statusBarIcon; QSettings settings; QString curFile; diff --git a/keylist.cpp b/keylist.cpp index d9976fd..b26bd78 100644 --- a/keylist.cpp +++ b/keylist.cpp @@ -131,17 +131,6 @@ void KeyList::setChecked(QStringList *keyIds) } } -/*QStringList *KeyList::getPrivateChecked() -{ - QStringList *ret = new QStringList(); - for (int i = 0; i < mKeyList->rowCount(); i++) { - if ((mKeyList->item(i, 0)->checkState() == Qt::Checked) && (mKeyList->item(i, 4))) { - *ret << mKeyList->item(i, 4)->text(); - } - } - return ret; -} -*/ QStringList *KeyList::getSelected() { QStringList *ret = new QStringList(); diff --git a/release/icons/statusbar_icon.png b/release/icons/statusbar_icon.png new file mode 100644 index 0000000..6bb93bb Binary files /dev/null and b/release/icons/statusbar_icon.png differ -- cgit v1.2.3