diff options
| author | 2016-04-18 23:06:12 +0100 | |
|---|---|---|
| committer | 2016-06-28 17:33:35 +0100 | |
| commit | 7b716c3eade99a7cf6ecc16e21d84c3110d51d2e (patch) | |
| tree | 48a8371143afb26c2f8958120340aacbae83f8dc /src/modules/toolbareditor/CustomizeToolBarsDialog.cpp | |
| parent | KviUserListView: add minimum width for userlist (#2028) (diff) | |
| download | KVIrc-7b716c3eade99a7cf6ecc16e21d84c3110d51d2e.tar.gz KVIrc-7b716c3eade99a7cf6ecc16e21d84c3110d51d2e.tar.bz2 KVIrc-7b716c3eade99a7cf6ecc16e21d84c3110d51d2e.zip | |
CustomizeToolBarsDialog: add import toolbar button
export exists so why not import?
resolves #1943
Diffstat (limited to 'src/modules/toolbareditor/CustomizeToolBarsDialog.cpp')
| -rw-r--r-- | src/modules/toolbareditor/CustomizeToolBarsDialog.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/modules/toolbareditor/CustomizeToolBarsDialog.cpp b/src/modules/toolbareditor/CustomizeToolBarsDialog.cpp index d88b9baed..a59f3261e 100644 --- a/src/modules/toolbareditor/CustomizeToolBarsDialog.cpp +++ b/src/modules/toolbareditor/CustomizeToolBarsDialog.cpp @@ -36,6 +36,7 @@ #include "KviImageDialog.h" #include "KviFileUtils.h" #include "KviFileDialog.h" +#include "KviInternalCommand.h" #include "KviKvsUserAction.h" #include "KviTalToolTip.h" #include "kvi_fileextensions.h" @@ -325,14 +326,18 @@ CustomizeToolBarsDialog::CustomizeToolBarsDialog(QWidget * p) connect(m_pExportToolBarButton, SIGNAL(clicked()), this, SLOT(exportToolBar())); g->addWidget(m_pExportToolBarButton, 4, 1); + m_pImportToolBarButton = new QPushButton(__tr2qs_ctx("Import Toolbar","editor"),this); + connect(m_pImportToolBarButton,SIGNAL(clicked()),this,SLOT(importToolBar())); + g->addWidget(m_pImportToolBarButton, 5, 1); + TrashcanLabel * t = new TrashcanLabel(this); - g->addWidget(t, 6, 1); + g->addWidget(t, 7, 1); - b = new QPushButton(__tr2qs_ctx("Close", "editor"), this); - connect(b, SIGNAL(clicked()), this, SLOT(closeClicked())); - g->addWidget(b, 7, 1); + b = new QPushButton(__tr2qs_ctx("Close","editor"),this); + connect(b,SIGNAL(clicked()),this,SLOT(closeClicked())); + g->addWidget(b, 8, 1); - g->setRowStretch(5, 1); + g->setRowStretch(6, 1); g->setColumnStretch(0, 1); m_pDrawer->fill(); @@ -474,6 +479,11 @@ void CustomizeToolBarsDialog::exportToolBar() } } +void CustomizeToolBarsDialog::importToolBar() +{ + g_pMainWindow->executeInternalCommand(KVI_INTERNALCOMMAND_EXECUTE_SCRIPT_FROM_DISK); +} + void CustomizeToolBarsDialog::renameToolBar() { KviCustomToolBar * t = KviActionManager::currentToolBar(); |
