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 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) (limited to 'gpgwin.cpp') 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(); + } } /** -- cgit v1.2.3