From c216100f843d5ec0fba5a4f49907d666a65028b1 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Wed, 4 Aug 2010 17:56:00 +0000 Subject: Theme Editor: Overhauled main window toolbar git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27697 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/gui/editorwindow.cpp | 27 +++++++++----- utils/themeeditor/gui/editorwindow.ui | 43 ++++++++++++++++++++-- utils/themeeditor/resources.qrc | 7 ++++ utils/themeeditor/resources/COPYING | 9 +++-- utils/themeeditor/resources/document-save-as.png | Bin 0 -> 1837 bytes utils/themeeditor/resources/edit-copy.png | Bin 0 -> 723 bytes utils/themeeditor/resources/edit-cut.png | Bin 0 -> 2087 bytes utils/themeeditor/resources/edit-find-replace.png | Bin 0 -> 2104 bytes utils/themeeditor/resources/edit-paste.png | Bin 0 -> 1027 bytes utils/themeeditor/resources/edit-redo.png | Bin 0 -> 1502 bytes utils/themeeditor/resources/edit-undo.png | Bin 0 -> 1601 bytes utils/themeeditor/themeeditor.pro | 9 ++++- 12 files changed, 78 insertions(+), 17 deletions(-) create mode 100644 utils/themeeditor/resources/document-save-as.png create mode 100644 utils/themeeditor/resources/edit-copy.png create mode 100644 utils/themeeditor/resources/edit-cut.png create mode 100644 utils/themeeditor/resources/edit-find-replace.png create mode 100644 utils/themeeditor/resources/edit-paste.png create mode 100644 utils/themeeditor/resources/edit-redo.png create mode 100644 utils/themeeditor/resources/edit-undo.png diff --git a/utils/themeeditor/gui/editorwindow.cpp b/utils/themeeditor/gui/editorwindow.cpp index 6bc40fbff6..48ee76d11c 100644 --- a/utils/themeeditor/gui/editorwindow.cpp +++ b/utils/themeeditor/gui/editorwindow.cpp @@ -207,6 +207,24 @@ void EditorWindow::setupUI() void EditorWindow::setupMenus() { + /* Adding actions to the toolbar */ + ui->toolBar->addAction(ui->actionNew_Document); + ui->toolBar->addAction(ui->actionOpen_Document); + ui->toolBar->addAction(ui->actionSave_Document); + ui->toolBar->addAction(ui->actionSave_Document_As); + + ui->toolBar->addSeparator(); + ui->toolBar->addAction(ui->actionUndo); + ui->toolBar->addAction(ui->actionRedo); + + ui->toolBar->addSeparator(); + ui->toolBar->addAction(ui->actionCut); + ui->toolBar->addAction(ui->actionCopy); + ui->toolBar->addAction(ui->actionPaste); + + ui->toolBar->addSeparator(); + ui->toolBar->addAction(ui->actionFind_Replace); + /* Connecting panel show actions */ QObject::connect(ui->actionFile_Panel, SIGNAL(triggered()), this, SLOT(showPanel())); @@ -224,8 +242,6 @@ void EditorWindow::setupMenus() this, SLOT(newTab())); QObject::connect(ui->actionNew_Project, SIGNAL(triggered()), this, SLOT(newProject())); - QObject::connect(ui->actionToolbarNew, SIGNAL(triggered()), - this, SLOT(newTab())); QObject::connect(ui->actionClose_Document, SIGNAL(triggered()), this, SLOT(closeCurrent())); @@ -236,15 +252,11 @@ void EditorWindow::setupMenus() this, SLOT(saveCurrent())); QObject::connect(ui->actionSave_Document_As, SIGNAL(triggered()), this, SLOT(saveCurrentAs())); - QObject::connect(ui->actionToolbarSave, SIGNAL(triggered()), - this, SLOT(saveCurrent())); QObject::connect(ui->actionExport_Project, SIGNAL(triggered()), this, SLOT(exportProject())); QObject::connect(ui->actionOpen_Document, SIGNAL(triggered()), this, SLOT(openFile())); - QObject::connect(ui->actionToolbarOpen, SIGNAL(triggered()), - this, SLOT(openFile())); QObject::connect(ui->actionOpen_Project, SIGNAL(triggered()), this, SLOT(openProject())); @@ -409,7 +421,6 @@ void EditorWindow::shiftTab(int index) ui->actionSave_Document->setEnabled(false); ui->actionSave_Document_As->setEnabled(false); ui->actionClose_Document->setEnabled(false); - ui->actionToolbarSave->setEnabled(false); ui->fromTree->setEnabled(false); ui->actionUndo->setEnabled(false); ui->actionRedo->setEnabled(false); @@ -424,7 +435,6 @@ void EditorWindow::shiftTab(int index) ui->actionSave_Document->setEnabled(true); ui->actionSave_Document_As->setEnabled(true); ui->actionClose_Document->setEnabled(true); - ui->actionToolbarSave->setEnabled(true); ui->actionUndo->setEnabled(false); ui->actionRedo->setEnabled(false); ui->actionCut->setEnabled(false); @@ -443,7 +453,6 @@ void EditorWindow::shiftTab(int index) ui->actionSave_Document->setEnabled(true); ui->actionSave_Document_As->setEnabled(true); ui->actionClose_Document->setEnabled(true); - ui->actionToolbarSave->setEnabled(true); ui->fromTree->setEnabled(true); ui->actionUndo->setEnabled(true); diff --git a/utils/themeeditor/gui/editorwindow.ui b/utils/themeeditor/gui/editorwindow.ui index bd74e1369e..65f6f7e528 100644 --- a/utils/themeeditor/gui/editorwindow.ui +++ b/utils/themeeditor/gui/editorwindow.ui @@ -129,9 +129,6 @@ false - - - @@ -230,6 +227,10 @@ + + + :/resources/resources/document-new.png:/resources/resources/document-new.png + &New Document @@ -238,6 +239,10 @@ + + + :/resources/resources/document-open.png:/resources/resources/document-open.png + &Open Document @@ -249,6 +254,10 @@ false + + + :/resources/resources/document-save.png:/resources/resources/document-save.png + &Save Document @@ -271,6 +280,10 @@ false + + + :/resources/resources/document-save-as.png:/resources/resources/document-save-as.png + Save Document &As @@ -334,6 +347,10 @@ + + + :/resources/resources/edit-undo.png:/resources/resources/edit-undo.png + &Undo @@ -342,6 +359,10 @@ + + + :/resources/resources/edit-redo.png:/resources/resources/edit-redo.png + &Redo @@ -350,6 +371,10 @@ + + + :/resources/resources/edit-cut.png:/resources/resources/edit-cut.png + C&ut @@ -358,6 +383,10 @@ + + + :/resources/resources/edit-copy.png:/resources/resources/edit-copy.png + &Copy @@ -366,6 +395,10 @@ + + + :/resources/resources/edit-paste.png:/resources/resources/edit-paste.png + &Paste @@ -374,6 +407,10 @@ + + + :/resources/resources/edit-find-replace.png:/resources/resources/edit-find-replace.png + &Find/Replace diff --git a/utils/themeeditor/resources.qrc b/utils/themeeditor/resources.qrc index c00953a3c0..9290ca9b48 100644 --- a/utils/themeeditor/resources.qrc +++ b/utils/themeeditor/resources.qrc @@ -16,6 +16,13 @@ resources/cursor.png resources/lines.png resources/tagdb + resources/document-save-as.png + resources/edit-redo.png + resources/edit-undo.png + resources/edit-copy.png + resources/edit-cut.png + resources/edit-paste.png + resources/edit-find-replace.png resources/render/scenebg.png diff --git a/utils/themeeditor/resources/COPYING b/utils/themeeditor/resources/COPYING index 3d9e7e72f0..14c27fa030 100644 --- a/utils/themeeditor/resources/COPYING +++ b/utils/themeeditor/resources/COPYING @@ -1,7 +1,8 @@ -The files ffwd.png, rwnd.png, play.png, pause.png, document-new.png, -document-open.png, and document-save.png came from -the Tango Desktop Project (http://www.tango.freedesktop.org) and are in -the public domain. +The files edit-cut.png, edit-copy.png, edit-paste.png, edit-find-replace.png, +edit-undo.png, edit-redo.png, ffwd.png, rwnd.png, play.png, pause.png, +document-new.png, document-open.png, document-save-as.png, and document-save.png +came from the Tango Desktop Project (http://www.tango.freedesktop.org) and are +in the public domain. The files zoomin.png, zoomout.png, and zoomeven.png came from the Tango Project with modifications by Robert Bieber, also in the public domain. diff --git a/utils/themeeditor/resources/document-save-as.png b/utils/themeeditor/resources/document-save-as.png new file mode 100644 index 0000000000..5c9f6b343b Binary files /dev/null and b/utils/themeeditor/resources/document-save-as.png differ diff --git a/utils/themeeditor/resources/edit-copy.png b/utils/themeeditor/resources/edit-copy.png new file mode 100644 index 0000000000..3348ee08fd Binary files /dev/null and b/utils/themeeditor/resources/edit-copy.png differ diff --git a/utils/themeeditor/resources/edit-cut.png b/utils/themeeditor/resources/edit-cut.png new file mode 100644 index 0000000000..217663b19c Binary files /dev/null and b/utils/themeeditor/resources/edit-cut.png differ diff --git a/utils/themeeditor/resources/edit-find-replace.png b/utils/themeeditor/resources/edit-find-replace.png new file mode 100644 index 0000000000..0f1b117ff7 Binary files /dev/null and b/utils/themeeditor/resources/edit-find-replace.png differ diff --git a/utils/themeeditor/resources/edit-paste.png b/utils/themeeditor/resources/edit-paste.png new file mode 100644 index 0000000000..dd429ced62 Binary files /dev/null and b/utils/themeeditor/resources/edit-paste.png differ diff --git a/utils/themeeditor/resources/edit-redo.png b/utils/themeeditor/resources/edit-redo.png new file mode 100644 index 0000000000..3eb7b05c84 Binary files /dev/null and b/utils/themeeditor/resources/edit-redo.png differ diff --git a/utils/themeeditor/resources/edit-undo.png b/utils/themeeditor/resources/edit-undo.png new file mode 100644 index 0000000000..61b2ce9a53 Binary files /dev/null and b/utils/themeeditor/resources/edit-undo.png differ diff --git a/utils/themeeditor/themeeditor.pro b/utils/themeeditor/themeeditor.pro index da5fe4156b..d3d8b1d080 100644 --- a/utils/themeeditor/themeeditor.pro +++ b/utils/themeeditor/themeeditor.pro @@ -175,7 +175,14 @@ OTHER_FILES += README \ quazip/README.ROCKBOX \ quazip/LICENSE.GPL \ qtfindreplacedialog/dialogs.pro \ - resources/tagdb + resources/tagdb \ + resources/document-save-as.png \ + resources/edit-undo.png \ + resources/edit-redo.png \ + resources/edit-paste.png \ + resources/edit-cut.png \ + resources/edit-copy.png \ + resources/edit-find-replace.png FORMS += gui/editorwindow.ui \ gui/preferencesdialog.ui \ gui/configdocument.ui \ -- cgit v1.2.3