r18214 by fschmid - Fixed Bug #11463: OK and Cancel buttons missing in PDF-JavaScript editor

scribus-commit scribus-commit at lists.scribus.net
Fri Mar 22 18:49:12 UTC 2013


Author: fschmid
Date: Fri Mar 22 18:49:12 2013
New Revision: 18214

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18214
Log:
Fixed Bug #11463: OK and Cancel buttons missing in PDF-JavaScript editor

Modified:
    branches/Version14x/Scribus/scribus/editor.cpp
    branches/Version14x/Scribus/scribus/editor.h

Modified: branches/Version14x/Scribus/scribus/editor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18214&path=/branches/Version14x/Scribus/scribus/editor.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/editor.cpp (original)
+++ branches/Version14x/Scribus/scribus/editor.cpp Fri Mar 22 18:49:12 2013
@@ -21,6 +21,10 @@
 #include <QMenu>
 #include <QMenuBar>
 #include <QAction>
+#ifdef Q_OS_MAC
+	#include <QPushButton>
+	#include <QVBoxLayout>
+#endif
 
 #include "util_icon.h"
 
@@ -86,6 +90,23 @@
 	EditTex->setMinimumSize( QSize( 400, 400 ) );
 	EditTex->setPlainText(daten);
 	EditorLayout->addWidget( EditTex );
+#ifdef Q_OS_MAC
+	Layout1_2 = new QHBoxLayout;
+	Layout1_2->setSpacing( 5 );
+	Layout1_2->setMargin( 0 );
+	QSpacerItem* spacerr = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum );
+	Layout1_2->addItem( spacerr );
+	PushButton1 = new QPushButton( this );
+	PushButton1->setText( tr( "OK" ) );
+	PushButton1->setDefault( true );
+	Layout1_2->addWidget( PushButton1 );
+	PushButton2 = new QPushButton( this );
+	PushButton2->setText( tr( "Cancel" ) );
+	Layout1_2->addWidget( PushButton2 );
+	EditorLayout->addLayout( Layout1_2 );
+	connect(PushButton1, SIGNAL(clicked()), this, SLOT(accept()));
+	connect(PushButton2, SIGNAL(clicked()), this, SLOT(reject()));
+#endif
 }
 
 void Editor::del()

Modified: branches/Version14x/Scribus/scribus/editor.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18214&path=/branches/Version14x/Scribus/scribus/editor.h
==============================================================================
--- branches/Version14x/Scribus/scribus/editor.h (original)
+++ branches/Version14x/Scribus/scribus/editor.h Fri Mar 22 18:49:12 2013
@@ -18,6 +18,10 @@
 class QAction;
 class ScribusView;
 class PrefsContext;
+#ifdef Q_OS_MAC
+	class QHBoxLayout;
+	class QPushButton;
+#endif
 
 class SCRIBUS_API Editor : public QDialog
 {
@@ -43,6 +47,10 @@
 	QAction* clearAct;
 	QAction* getFieldAct;
 	ScribusView* view;
+#ifdef Q_OS_MAC
+	QPushButton* PushButton1;
+	QPushButton* PushButton2;
+#endif
 
 private slots:
 	void del();
@@ -52,6 +60,9 @@
 
 protected:
 	QVBoxLayout* EditorLayout;
+#ifdef Q_OS_MAC
+	QHBoxLayout* Layout1_2;
+#endif
 	PrefsContext* dirs;
 };
 




More information about the scribus-commit mailing list