- version 0.9.4 - fixed rudiment attachments label + fixed operations with attachments
This commit is contained in:
parent
cc997eb404
commit
ea7b412fb1
@ -1,7 +1,7 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
GenericName=App to make notes
|
GenericName=App to make notes
|
||||||
Name=Noo
|
Name=Noo
|
||||||
Version=0.9.3
|
Version=0.9.4
|
||||||
Exec=/usr/bin/noo
|
Exec=/usr/bin/noo
|
||||||
Comment=App to make notes
|
Comment=App to make notes
|
||||||
Icon=noo
|
Icon=noo
|
||||||
|
|||||||
@ -32,7 +32,13 @@
|
|||||||
<enum>Qt::CustomContextMenu</enum>
|
<enum>Qt::CustomContextMenu</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="dragDropMode">
|
<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>
|
||||||
<property name="viewMode">
|
<property name="viewMode">
|
||||||
<enum>QListView::IconMode</enum>
|
<enum>QListView::IconMode</enum>
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
#define APP_VERSION_MAJOR 0
|
#define APP_VERSION_MAJOR 0
|
||||||
#define APP_VERSION_MINOR 9
|
#define APP_VERSION_MINOR 9
|
||||||
#define APP_VERSION_SUFFIX 3
|
#define APP_VERSION_SUFFIX 4
|
||||||
|
|
||||||
//#ifdef TARGET_OSX
|
//#ifdef TARGET_OSX
|
||||||
#define ICONS ":/assets/images"
|
#define ICONS ":/assets/images"
|
||||||
|
|||||||
@ -219,25 +219,6 @@ void MainWindow::initClient()
|
|||||||
mAttachmentsAction->setText(tr("Attachments"));
|
mAttachmentsAction->setText(tr("Attachments"));
|
||||||
//ui->mMainToolbar->addAction(mAttachmentsAction);
|
//ui->mMainToolbar->addAction(mAttachmentsAction);
|
||||||
connect(mAttachmentsAction, SIGNAL(triggered()), this, SLOT(showAttachments()));
|
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
|
#ifdef TARGET_OSX
|
||||||
@ -648,12 +629,6 @@ void MainWindow::taskIndexChanged(const QModelIndex& current, const QModelIndex&
|
|||||||
ui->mStartOrStopTrackingAction->setText(tr("Start tracking"));
|
ui->mStartOrStopTrackingAction->setText(tr("Start tracking"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t)
|
|
||||||
{
|
|
||||||
mAttachmentsAction->setToolTip(tr("Attachments for ") + t->title());
|
|
||||||
updateAttachmentsLabel(t);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (current.isValid())
|
if (current.isValid())
|
||||||
{
|
{
|
||||||
// Reset search position
|
// 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()
|
void MainWindow::setupMainUi()
|
||||||
{
|
{
|
||||||
// Construct main UI
|
// Construct main UI
|
||||||
@ -1437,9 +1400,6 @@ void MainWindow::showAttachments()
|
|||||||
|
|
||||||
// Refresh current item in task tree to ensure attachment icon is shown/hidden
|
// Refresh current item in task tree to ensure attachment icon is shown/hidden
|
||||||
mTaskTreeModel->dataChanged(taskIndex, taskIndex);
|
mTaskTreeModel->dataChanged(taskIndex, taskIndex);
|
||||||
|
|
||||||
// Refresh attachments link
|
|
||||||
updateAttachmentsLabel(t);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::checkForUpdates()
|
void MainWindow::checkForUpdates()
|
||||||
|
|||||||
@ -74,9 +74,6 @@ private:
|
|||||||
// Attachments action
|
// Attachments action
|
||||||
QAction* mAttachmentsAction = nullptr;
|
QAction* mAttachmentsAction = nullptr;
|
||||||
|
|
||||||
// Attachments label
|
|
||||||
QLabel* mAttachmentsLabel = nullptr;
|
|
||||||
|
|
||||||
// Delegate to draw task items in custom way
|
// Delegate to draw task items in custom way
|
||||||
TaskItemDelegate mTaskItemDelegate;
|
TaskItemDelegate mTaskItemDelegate;
|
||||||
|
|
||||||
@ -142,7 +139,6 @@ private:
|
|||||||
void installDockMenu();
|
void installDockMenu();
|
||||||
void startTracking(PTask t);
|
void startTracking(PTask t);
|
||||||
void prepareRecentTasksMenu(QMenu* submenu);
|
void prepareRecentTasksMenu(QMenu* submenu);
|
||||||
void updateAttachmentsLabel(PTask t);
|
|
||||||
|
|
||||||
// Builds main UI layut
|
// Builds main UI layut
|
||||||
void setupMainUi();
|
void setupMainUi();
|
||||||
|
|||||||
@ -7,6 +7,7 @@ NodePropertiesWidget::NodePropertiesWidget(QWidget *parent) :
|
|||||||
ui(new Ui::NodePropertiesWidget)
|
ui(new Ui::NodePropertiesWidget)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->mFileListView->setParentWidget(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
NodePropertiesWidget::~NodePropertiesWidget()
|
NodePropertiesWidget::~NodePropertiesWidget()
|
||||||
|
|||||||
@ -11,7 +11,7 @@ TARGET = noo
|
|||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|
||||||
# Send version to app
|
# Send version to app
|
||||||
VERSION = 0.9.3
|
VERSION = 0.9.4
|
||||||
# VERSION_STRING = '\\"$${VERSION}\\"'
|
# VERSION_STRING = '\\"$${VERSION}\\"'
|
||||||
# DEFINES += APP_VERSION=\"$${VERSION_STRING}\"
|
# DEFINES += APP_VERSION=\"$${VERSION_STRING}\"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user