- version 0.9.4 - fixed rudiment attachments label + fixed operations with attachments

This commit is contained in:
Dmytro Bogovych 2022-07-20 22:13:07 +02:00
parent cc997eb404
commit ea7b412fb1
7 changed files with 11 additions and 48 deletions

View File

@ -1,7 +1,7 @@
[Desktop Entry]
GenericName=App to make notes
Name=Noo
Version=0.9.3
Version=0.9.4
Exec=/usr/bin/noo
Comment=App to make notes
Icon=noo

View File

@ -32,7 +32,13 @@
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::DropOnly</enum>
<enum>QAbstractItemView::DragDrop</enum>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="spacing">
<number>4</number>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>

View File

@ -39,7 +39,7 @@
#define APP_VERSION_MAJOR 0
#define APP_VERSION_MINOR 9
#define APP_VERSION_SUFFIX 3
#define APP_VERSION_SUFFIX 4
//#ifdef TARGET_OSX
#define ICONS ":/assets/images"

View File

@ -219,25 +219,6 @@ void MainWindow::initClient()
mAttachmentsAction->setText(tr("Attachments"));
//ui->mMainToolbar->addAction(mAttachmentsAction);
connect(mAttachmentsAction, SIGNAL(triggered()), this, SLOT(showAttachments()));
mAttachmentsLabel = new QLabel(this);
mAttachmentsLabel->setMargin(5);
mAttachmentsLabel->setOpenExternalLinks(false);
QFont f = mAttachmentsLabel->font();
f.setUnderline(true);
mAttachmentsLabel->setFont(f);
mAttachmentsLabel->setTextFormat(Qt::RichText);
//mAttachmentsLabel->setStyleSheet("QLabel { color:rgb(142,178,218); }");
QPalette newPal(palette());
newPal.setColor(QPalette::Link, QColor(0x100, 0x100, 0x100));
newPal.setColor(QPalette::LinkVisited, QColor(0x100, 0x100, 0x100));
mAttachmentsLabel->setPalette(newPal);
ui->mMainToolbar->addWidget(mAttachmentsLabel);
connect(mAttachmentsLabel, SIGNAL(linkActivated(QString)), this, SLOT(showAttachments()));
updateAttachmentsLabel(PTask());
}
#ifdef TARGET_OSX
@ -648,12 +629,6 @@ void MainWindow::taskIndexChanged(const QModelIndex& current, const QModelIndex&
ui->mStartOrStopTrackingAction->setText(tr("Start tracking"));
}
if (t)
{
mAttachmentsAction->setToolTip(tr("Attachments for ") + t->title());
updateAttachmentsLabel(t);
}
if (current.isValid())
{
// Reset search position
@ -785,18 +760,6 @@ void MainWindow::prepareRecentTasksMenu(QMenu* submenu)
}
}
void MainWindow::updateAttachmentsLabel(PTask t)
{
QString text = "<a href=\"localfile\" style=\"color: #3966A0\">" + tr("No attachments") + "</a>";
if (t)
{
if (t->getAttachmentCount())
text = "<a href=\"localfile\" style=\"color: #3966A0\">" + QString::number(t->getAttachmentCount()) + " " + tr("attachments") + "</a>";
}
mAttachmentsLabel->setText(text);
}
void MainWindow::setupMainUi()
{
// Construct main UI
@ -1437,9 +1400,6 @@ void MainWindow::showAttachments()
// Refresh current item in task tree to ensure attachment icon is shown/hidden
mTaskTreeModel->dataChanged(taskIndex, taskIndex);
// Refresh attachments link
updateAttachmentsLabel(t);
}
void MainWindow::checkForUpdates()

View File

@ -74,9 +74,6 @@ private:
// Attachments action
QAction* mAttachmentsAction = nullptr;
// Attachments label
QLabel* mAttachmentsLabel = nullptr;
// Delegate to draw task items in custom way
TaskItemDelegate mTaskItemDelegate;
@ -142,7 +139,6 @@ private:
void installDockMenu();
void startTracking(PTask t);
void prepareRecentTasksMenu(QMenu* submenu);
void updateAttachmentsLabel(PTask t);
// Builds main UI layut
void setupMainUi();

View File

@ -7,6 +7,7 @@ NodePropertiesWidget::NodePropertiesWidget(QWidget *parent) :
ui(new Ui::NodePropertiesWidget)
{
ui->setupUi(this);
ui->mFileListView->setParentWidget(this);
}
NodePropertiesWidget::~NodePropertiesWidget()

View File

@ -11,7 +11,7 @@ TARGET = noo
TEMPLATE = app
# Send version to app
VERSION = 0.9.3
VERSION = 0.9.4
# VERSION_STRING = '\\"$${VERSION}\\"'
# DEFINES += APP_VERSION=\"$${VERSION_STRING}\"