[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/extragear/graphics/digikam/core/utilities/imageeditor/editor
From: Gilles Caulier <caulier.gilles () gmail ! com>
Date: 2011-01-10 13:42:06
Message-ID: 20110110134206.253D1AC8B2 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1213470 by cgilles:
dispatch "OK" and "Cancel" buttons icon/text/toolstip from current editortool to \
editor toolbar, to give an homogenous interface
M +2 -2 editortooliface.cpp
M +16 -4 editorwindow.cpp
M +2 -1 editorwindow.h
--- branches/extragear/graphics/digikam/core/utilities/imageeditor/editor/editortooliface.cpp \
#1213469:1213470 @@ -99,7 +99,7 @@
d->editor->rightSideBar()->appendTab(d->tool->toolSettings(), \
d->tool->toolIcon(), d->tool->toolName()); \
d->editor->rightSideBar()->setActiveTab(d->tool->toolSettings()); \
d->editor->toggleActions(false);
- d->editor->toggleToolActions(true);
+ d->editor->toggleToolActions(d->tool);
// If editor tool has zoomable preview, switch on zoom actions.
if (d->editor->editorStackView()->previewWidget())
@@ -160,7 +160,7 @@
d->editor->editorStackView()->setToolView(0);
d->editor->rightSideBar()->deleteTab(d->tool->toolSettings());
d->editor->toggleActions(true);
- d->editor->toggleToolActions(false);
+ d->editor->toggleToolActions();
d->editor->setPreviewModeMask(PreviewToolBar::NoPreviewMode);
// To restore canvas zoom level in zoom combobox.
--- branches/extragear/graphics/digikam/core/utilities/imageeditor/editor/editorwindow.cpp \
#1213469:1213470 @@ -126,6 +126,8 @@
#include "dpopupmenu.h"
#include "dzoombar.h"
#include "editorstackview.h"
+#include "editortool.h"
+#include "editortoolsettings.h"
#include "editortooliface.h"
#include "exposurecontainer.h"
#include "filesaveoptionsbox.h"
@@ -681,7 +683,7 @@
actionCollection()->addAction("logo_action", m_animLogo);
toggleNonDestructiveActions();
- toggleToolActions(false);
+ toggleToolActions();
}
void EditorWindow::EditorWindowPriv::plugNewVersionInFormatAction(EditorWindow *q, \
KActionMenu* menuAction, @@ -1216,11 +1218,21 @@
m_discardChangesAction->setVisible(m_nonDestructive);
}
-void EditorWindow::toggleToolActions(bool hasTool)
+void EditorWindow::toggleToolActions(EditorTool* tool)
{
- m_applyToolAction->setVisible(hasTool);
- m_closeToolAction->setVisible(hasTool);
+ if (tool)
+ {
+ m_applyToolAction->setText(tool->toolSettings()->button(EditorToolSettings::Ok)->text());
+ m_applyToolAction->setIcon(tool->toolSettings()->button(EditorToolSettings::Ok)->icon());
+ m_applyToolAction->setToolTip(tool->toolSettings()->button(EditorToolSettings::Ok)->toolTip());
+
+ m_closeToolAction->setText(tool->toolSettings()->button(EditorToolSettings::Cancel)->text());
+ m_closeToolAction->setIcon(tool->toolSettings()->button(EditorToolSettings::Cancel)->icon());
+ m_closeToolAction->setToolTip(tool->toolSettings()->button(EditorToolSettings::Cancel)->toolTip());
}
+ m_applyToolAction->setVisible(tool);
+ m_closeToolAction->setVisible(tool);
+}
void EditorWindow::slotToggleFullScreen()
{
--- branches/extragear/graphics/digikam/core/utilities/imageeditor/editor/editorwindow.h \
#1213469:1213470 @@ -63,6 +63,7 @@
class DImageHistory;
class DPopupMenu;
class DLogoAction;
+class EditorTool;
class EditorStackView;
class ExposureSettingsContainer;
class IOFileSettingsContainer;
@@ -176,7 +177,7 @@
void toggleStandardActions(bool val);
void toggleZoomActions(bool val);
void toggleNonDestructiveActions();
- void toggleToolActions(bool val);
+ void toggleToolActions(EditorTool* tool=0);
void printImage(const KUrl& url);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic