Also re-gens the dialog files so the dialog can't be resized
infinitely small ;)
thanks
john
p.s. A new tarball of qtarch should be on its way soon that fixes the
compile troubles - although you don't really need it as you can just do
"touch *.dlg && make" in module/kde for it to work again.
--
"Penguins are so sensitive to my needs."
- Lyle Lovett
diff -u -r1.607 ChangeLog
--- ChangeLog 2000/10/13 13:14:07 1.607
+++ ChangeLog 2000/10/13 15:17:15
@@ -1,3 +1,22 @@
+2000-10-13 John Levon <[EMAIL PROTECTED]>
+
+ * src/frontends/kde/formprintdialog.C: add
+ file browser for selecting postscript output
+
+ * src/frontends/kde/formprintdialogdata.C:
+ * src/frontends/kde/formprintdialogdata.h: re-generate
+ correctly
+
2000-10-13 John Levon <[EMAIL PROTECTED]>
* src/frontends/gnome/Makefile.am:
diff -u -r1.1 formprintdialog.C
--- src/frontends/kde/formprintdialog.C 2000/10/05 14:01:05 1.1
+++ src/frontends/kde/formprintdialog.C 2000/10/13 15:17:16
@@ -7,6 +7,7 @@
#include "formprintdialogdata.h"
#include "formprintdialog.h"
#include "support/lstrings.h"
+#include "support/filetools.h"
#include <kfiledialog.h>
#include <gettext.h>
@@ -26,5 +27,10 @@
void FormPrintDialog::clickedBrowse()
{
- // FIXME: open a file dialog here
+ // FIXME: move into utility class later, accept URLs etc.
+
+ KFileDialog filedlg(OnlyPath(filename->text()).c_str(), "*.ps|PostScript Files
+(*.ps)", this, 0, true, false);
+
+ if (filedlg.exec() == QDialog::Accepted)
+ filename->setText(filedlg.selectedFile().data());
}
diff -u -r1.2 formprintdialogdata.C
--- src/frontends/kde/formprintdialogdata.C 2000/10/10 10:38:11 1.2
+++ src/frontends/kde/formprintdialogdata.C 2000/10/13 15:17:16
@@ -3,13 +3,15 @@
--- Qt Architect generated file ---
File: formprintdialogdata.C
- Last generated: Fri Oct 6 13:10:28 2000
+ Last generated: Fri Oct 13 16:07:46 2000
DO NOT EDIT!!! This file will be automatically
regenerated by qtarch. All changes will be lost.
*********************************************************************/
+#include <gettext.h>
+
#include <qpixmap.h>
#include <qlayout.h>
#include "formprintdialogdata.h"
@@ -37,7 +39,7 @@
pagesGroupBox->setLineWidth( 1 );
pagesGroupBox->setMidLineWidth( 0 );
pagesGroupBox->QFrame::setMargin( 0 );
- pagesGroupBox->setTitle( "Pages" );
+ pagesGroupBox->setTitle( _("Pages") );
pagesGroupBox->setAlignment( 1 );
pagesRadioGroup = new QButtonGroup( pagesGroupBox, "pagesRadioGroup" );
@@ -52,7 +54,7 @@
pagesRadioGroup->setLineWidth( 1 );
pagesRadioGroup->setMidLineWidth( 0 );
pagesRadioGroup->QFrame::setMargin( 0 );
- pagesRadioGroup->setTitle( "" );
+ pagesRadioGroup->setTitle( _("") );
pagesRadioGroup->setAlignment( 1 );
pagesRadioGroup->setExclusive( TRUE );
@@ -68,7 +70,7 @@
copies->setLineWidth( 1 );
copies->setMidLineWidth( 0 );
copies->QFrame::setMargin( 0 );
- copies->setTitle( "Copies" );
+ copies->setTitle( _("Copies") );
copies->setAlignment( 1 );
printToGroupBox = new QGroupBox( this, "printToGroupBox" );
@@ -83,7 +85,7 @@
printToGroupBox->setLineWidth( 1 );
printToGroupBox->setMidLineWidth( 0 );
printToGroupBox->QFrame::setMargin( 0 );
- printToGroupBox->setTitle( "Print to" );
+ printToGroupBox->setTitle( _("Print to") );
printToGroupBox->setAlignment( 1 );
printToRadioGroup = new QButtonGroup( printToGroupBox, "printToRadioGroup" );
@@ -98,7 +100,7 @@
printToRadioGroup->setLineWidth( 1 );
printToRadioGroup->setMidLineWidth( 0 );
printToRadioGroup->QFrame::setMargin( 0 );
- printToRadioGroup->setTitle( "" );
+ printToRadioGroup->setTitle( _("") );
printToRadioGroup->setAlignment( 1 );
printToRadioGroup->setExclusive( TRUE );
@@ -111,7 +113,7 @@
print->setBackgroundMode( QWidget::PaletteBackground );
print->setFontPropagation( QWidget::NoChildren );
print->setPalettePropagation( QWidget::NoChildren );
- print->setText( "&Print" );
+ print->setText( _("&Print") );
print->setAutoRepeat( FALSE );
print->setAutoResize( FALSE );
print->setToggleButton( FALSE );
@@ -128,7 +130,7 @@
cancel->setBackgroundMode( QWidget::PaletteBackground );
cancel->setFontPropagation( QWidget::NoChildren );
cancel->setPalettePropagation( QWidget::NoChildren );
- cancel->setText( "&Cancel" );
+ cancel->setText( _("&Cancel") );
cancel->setAutoRepeat( FALSE );
cancel->setAutoResize( FALSE );
cancel->setToggleButton( FALSE );
@@ -144,7 +146,7 @@
allpages->setBackgroundMode( QWidget::PaletteBackground );
allpages->setFontPropagation( QWidget::NoChildren );
allpages->setPalettePropagation( QWidget::NoChildren );
- allpages->setText( "&All pages" );
+ allpages->setText( _("&All pages") );
allpages->setAutoRepeat( FALSE );
allpages->setAutoResize( FALSE );
allpages->setChecked( FALSE );
@@ -157,7 +159,7 @@
evenpages->setBackgroundMode( QWidget::PaletteBackground );
evenpages->setFontPropagation( QWidget::NoChildren );
evenpages->setPalettePropagation( QWidget::NoChildren );
- evenpages->setText( "&Even pages" );
+ evenpages->setText( _("&Even pages") );
evenpages->setAutoRepeat( FALSE );
evenpages->setAutoResize( FALSE );
evenpages->setChecked( FALSE );
@@ -170,7 +172,7 @@
from->setBackgroundMode( QWidget::PaletteBase );
from->setFontPropagation( QWidget::NoChildren );
from->setPalettePropagation( QWidget::NoChildren );
- from->setText( "" );
+ from->setText( _("") );
from->setMaxLength( 32767 );
from->setFrame( QLineEdit::Normal );
from->setFrame( TRUE );
@@ -187,7 +189,7 @@
fromLabel->setLineWidth( 1 );
fromLabel->setMidLineWidth( 0 );
fromLabel->QFrame::setMargin( 0 );
- fromLabel->setText( "From" );
+ fromLabel->setText( _("From") );
fromLabel->setAlignment( 289 );
fromLabel->setMargin( -1 );
@@ -203,7 +205,7 @@
toLabel->setLineWidth( 1 );
toLabel->setMidLineWidth( 0 );
toLabel->QFrame::setMargin( 0 );
- toLabel->setText( "To" );
+ toLabel->setText( _("To") );
toLabel->setAlignment( 289 );
toLabel->setMargin( -1 );
@@ -215,7 +217,7 @@
oddpages->setBackgroundMode( QWidget::PaletteBackground );
oddpages->setFontPropagation( QWidget::NoChildren );
oddpages->setPalettePropagation( QWidget::NoChildren );
- oddpages->setText( "&Odd pages" );
+ oddpages->setText( _("&Odd pages") );
oddpages->setAutoRepeat( FALSE );
oddpages->setAutoResize( FALSE );
oddpages->setChecked( FALSE );
@@ -228,7 +230,7 @@
toprinter->setBackgroundMode( QWidget::PaletteBackground );
toprinter->setFontPropagation( QWidget::NoChildren );
toprinter->setPalettePropagation( QWidget::NoChildren );
- toprinter->setText( "&Printer" );
+ toprinter->setText( _("&Printer") );
toprinter->setAutoRepeat( FALSE );
toprinter->setAutoResize( FALSE );
toprinter->setChecked( FALSE );
@@ -241,7 +243,7 @@
tofile->setBackgroundMode( QWidget::PaletteBackground );
tofile->setFontPropagation( QWidget::NoChildren );
tofile->setPalettePropagation( QWidget::NoChildren );
- tofile->setText( "&File" );
+ tofile->setText( _("&File") );
tofile->setAutoRepeat( FALSE );
tofile->setAutoResize( FALSE );
tofile->setChecked( FALSE );
@@ -254,7 +256,7 @@
printername->setBackgroundMode( QWidget::PaletteBase );
printername->setFontPropagation( QWidget::NoChildren );
printername->setPalettePropagation( QWidget::NoChildren );
- printername->setText( "" );
+ printername->setText( _("") );
printername->setMaxLength( 32767 );
printername->setFrame( QLineEdit::Normal );
printername->setFrame( TRUE );
@@ -267,7 +269,7 @@
reverse->setBackgroundMode( QWidget::PaletteBackground );
reverse->setFontPropagation( QWidget::NoChildren );
reverse->setPalettePropagation( QWidget::NoChildren );
- reverse->setText( "&Reverse order" );
+ reverse->setText( _("&Reverse order") );
reverse->setAutoRepeat( FALSE );
reverse->setAutoResize( TRUE );
reverse->setChecked( FALSE );
@@ -280,7 +282,7 @@
filename->setBackgroundMode( QWidget::PaletteBase );
filename->setFontPropagation( QWidget::NoChildren );
filename->setPalettePropagation( QWidget::NoChildren );
- filename->setText( "" );
+ filename->setText( _("") );
filename->setMaxLength( 32767 );
filename->setFrame( QLineEdit::Normal );
filename->setFrame( TRUE );
@@ -293,7 +295,7 @@
sort->setBackgroundMode( QWidget::PaletteBackground );
sort->setFontPropagation( QWidget::NoChildren );
sort->setPalettePropagation( QWidget::NoChildren );
- sort->setText( "&Sort" );
+ sort->setText( _("&Sort") );
sort->setAutoRepeat( FALSE );
sort->setAutoResize( TRUE );
sort->setChecked( FALSE );
@@ -307,7 +309,7 @@
browse->setBackgroundMode( QWidget::PaletteBackground );
browse->setFontPropagation( QWidget::NoChildren );
browse->setPalettePropagation( QWidget::NoChildren );
- browse->setText( "&Browse" );
+ browse->setText( _("&Browse") );
browse->setAutoRepeat( FALSE );
browse->setAutoResize( FALSE );
browse->setToggleButton( FALSE );
@@ -323,7 +325,7 @@
count->setBackgroundMode( QWidget::PaletteBase );
count->setFontPropagation( QWidget::NoChildren );
count->setPalettePropagation( QWidget::NoChildren );
- count->setText( "" );
+ count->setText( _("") );
count->setMaxLength( 32767 );
count->setFrame( QLineEdit::Normal );
count->setFrame( TRUE );
@@ -340,7 +342,7 @@
countLabel->setLineWidth( 1 );
countLabel->setMidLineWidth( 0 );
countLabel->QFrame::setMargin( 0 );
- countLabel->setText( "Count" );
+ countLabel->setText( _("Count") );
countLabel->setAlignment( 289 );
countLabel->setMargin( -1 );
@@ -352,7 +354,7 @@
to->setBackgroundMode( QWidget::PaletteBase );
to->setFontPropagation( QWidget::NoChildren );
to->setPalettePropagation( QWidget::NoChildren );
- to->setText( "" );
+ to->setText( _("") );
to->setMaxLength( 32767 );
to->setFrame( QLineEdit::Normal );
to->setFrame( TRUE );
@@ -364,6 +366,140 @@
printToRadioGroup->insert( toprinter );
printToRadioGroup->insert( tofile );
+ if (print->sizeHint().width()!=-1)
+ print->setMinimumWidth(print->sizeHint().width());
+ if (print->sizeHint().height()!=-1)
+ print->setMinimumHeight(print->sizeHint().height());
+ if (print->sizeHint().width()!=-1)
+ print->setMaximumWidth(print->sizeHint().width());
+ if (print->sizeHint().height()!=-1)
+ print->setMaximumHeight(print->sizeHint().height());
+ if (cancel->sizeHint().width()!=-1)
+ cancel->setMinimumWidth(cancel->sizeHint().width());
+ if (cancel->sizeHint().height()!=-1)
+ cancel->setMinimumHeight(cancel->sizeHint().height());
+ if (cancel->sizeHint().width()!=-1)
+ cancel->setMaximumWidth(cancel->sizeHint().width());
+ if (cancel->sizeHint().height()!=-1)
+ cancel->setMaximumHeight(cancel->sizeHint().height());
+ if (allpages->sizeHint().width()!=-1)
+ allpages->setMinimumWidth(allpages->sizeHint().width());
+ if (allpages->sizeHint().height()!=-1)
+ allpages->setMinimumHeight(allpages->sizeHint().height());
+ if (allpages->sizeHint().width()!=-1)
+ allpages->setMaximumWidth(allpages->sizeHint().width());
+ if (allpages->sizeHint().height()!=-1)
+ allpages->setMaximumHeight(allpages->sizeHint().height());
+ if (evenpages->sizeHint().width()!=-1)
+ evenpages->setMinimumWidth(evenpages->sizeHint().width());
+ if (evenpages->sizeHint().height()!=-1)
+ evenpages->setMinimumHeight(evenpages->sizeHint().height());
+ if (evenpages->sizeHint().width()!=-1)
+ evenpages->setMaximumWidth(evenpages->sizeHint().width());
+ if (evenpages->sizeHint().height()!=-1)
+ evenpages->setMaximumHeight(evenpages->sizeHint().height());
+ if (from->sizeHint().width()!=-1)
+ from->setMinimumWidth(from->sizeHint().width());
+ if (from->sizeHint().height()!=-1)
+ from->setMinimumHeight(from->sizeHint().height());
+ if (from->sizeHint().height()!=-1)
+ from->setMaximumHeight(from->sizeHint().height());
+ if (fromLabel->sizeHint().width()!=-1)
+ fromLabel->setMinimumWidth(fromLabel->sizeHint().width());
+ if (fromLabel->sizeHint().height()!=-1)
+ fromLabel->setMinimumHeight(fromLabel->sizeHint().height());
+ if (fromLabel->sizeHint().width()!=-1)
+ fromLabel->setMaximumWidth(fromLabel->sizeHint().width());
+ if (fromLabel->sizeHint().height()!=-1)
+ fromLabel->setMaximumHeight(fromLabel->sizeHint().height());
+ if (toLabel->sizeHint().width()!=-1)
+ toLabel->setMinimumWidth(toLabel->sizeHint().width());
+ if (toLabel->sizeHint().height()!=-1)
+ toLabel->setMinimumHeight(toLabel->sizeHint().height());
+ if (toLabel->sizeHint().width()!=-1)
+ toLabel->setMaximumWidth(toLabel->sizeHint().width());
+ if (toLabel->sizeHint().height()!=-1)
+ toLabel->setMaximumHeight(toLabel->sizeHint().height());
+ if (oddpages->sizeHint().width()!=-1)
+ oddpages->setMinimumWidth(oddpages->sizeHint().width());
+ if (oddpages->sizeHint().height()!=-1)
+ oddpages->setMinimumHeight(oddpages->sizeHint().height());
+ if (oddpages->sizeHint().width()!=-1)
+ oddpages->setMaximumWidth(oddpages->sizeHint().width());
+ if (oddpages->sizeHint().height()!=-1)
+ oddpages->setMaximumHeight(oddpages->sizeHint().height());
+ if (toprinter->sizeHint().width()!=-1)
+ toprinter->setMinimumWidth(toprinter->sizeHint().width());
+ if (toprinter->sizeHint().height()!=-1)
+ toprinter->setMinimumHeight(toprinter->sizeHint().height());
+ if (toprinter->sizeHint().width()!=-1)
+ toprinter->setMaximumWidth(toprinter->sizeHint().width());
+ if (toprinter->sizeHint().height()!=-1)
+ toprinter->setMaximumHeight(toprinter->sizeHint().height());
+ if (tofile->sizeHint().width()!=-1)
+ tofile->setMinimumWidth(tofile->sizeHint().width());
+ if (tofile->sizeHint().height()!=-1)
+ tofile->setMinimumHeight(tofile->sizeHint().height());
+ if (tofile->sizeHint().width()!=-1)
+ tofile->setMaximumWidth(tofile->sizeHint().width());
+ if (tofile->sizeHint().height()!=-1)
+ tofile->setMaximumHeight(tofile->sizeHint().height());
+ if (printername->sizeHint().width()!=-1)
+ printername->setMinimumWidth(printername->sizeHint().width());
+ if (printername->sizeHint().height()!=-1)
+ printername->setMinimumHeight(printername->sizeHint().height());
+ if (printername->sizeHint().height()!=-1)
+ printername->setMaximumHeight(printername->sizeHint().height());
+ if (reverse->sizeHint().width()!=-1)
+ reverse->setMinimumWidth(reverse->sizeHint().width());
+ if (reverse->sizeHint().height()!=-1)
+ reverse->setMinimumHeight(reverse->sizeHint().height());
+ if (reverse->sizeHint().width()!=-1)
+ reverse->setMaximumWidth(reverse->sizeHint().width());
+ if (reverse->sizeHint().height()!=-1)
+ reverse->setMaximumHeight(reverse->sizeHint().height());
+ if (filename->sizeHint().width()!=-1)
+ filename->setMinimumWidth(filename->sizeHint().width());
+ if (filename->sizeHint().height()!=-1)
+ filename->setMinimumHeight(filename->sizeHint().height());
+ if (filename->sizeHint().height()!=-1)
+ filename->setMaximumHeight(filename->sizeHint().height());
+ if (sort->sizeHint().width()!=-1)
+ sort->setMinimumWidth(sort->sizeHint().width());
+ if (sort->sizeHint().height()!=-1)
+ sort->setMinimumHeight(sort->sizeHint().height());
+ if (sort->sizeHint().width()!=-1)
+ sort->setMaximumWidth(sort->sizeHint().width());
+ if (sort->sizeHint().height()!=-1)
+ sort->setMaximumHeight(sort->sizeHint().height());
+ if (browse->sizeHint().width()!=-1)
+ browse->setMinimumWidth(browse->sizeHint().width());
+ if (browse->sizeHint().height()!=-1)
+ browse->setMinimumHeight(browse->sizeHint().height());
+ if (browse->sizeHint().width()!=-1)
+ browse->setMaximumWidth(browse->sizeHint().width());
+ if (browse->sizeHint().height()!=-1)
+ browse->setMaximumHeight(browse->sizeHint().height());
+ if (count->sizeHint().width()!=-1)
+ count->setMinimumWidth(count->sizeHint().width());
+ if (count->sizeHint().height()!=-1)
+ count->setMinimumHeight(count->sizeHint().height());
+ if (count->sizeHint().height()!=-1)
+ count->setMaximumHeight(count->sizeHint().height());
+ if (countLabel->sizeHint().width()!=-1)
+ countLabel->setMinimumWidth(countLabel->sizeHint().width());
+ if (countLabel->sizeHint().height()!=-1)
+ countLabel->setMinimumHeight(countLabel->sizeHint().height());
+ if (countLabel->sizeHint().width()!=-1)
+ countLabel->setMaximumWidth(countLabel->sizeHint().width());
+ if (countLabel->sizeHint().height()!=-1)
+ countLabel->setMaximumHeight(countLabel->sizeHint().height());
+ if (to->sizeHint().width()!=-1)
+ to->setMinimumWidth(to->sizeHint().width());
+ if (to->sizeHint().height()!=-1)
+ to->setMinimumHeight(to->sizeHint().height());
+ if (to->sizeHint().height()!=-1)
+ to->setMaximumHeight(to->sizeHint().height());
QGridLayout* qtarch_layout_1 = new QGridLayout( this, 2, 1, 5, 5, NULL );
qtarch_layout_1->addColSpacing( 0, 5 );
qtarch_layout_1->setColStretch( 0, 1 );
diff -u -r1.2 formprintdialogdata.h
--- src/frontends/kde/formprintdialogdata.h 2000/10/10 10:38:11 1.2
+++ src/frontends/kde/formprintdialogdata.h 2000/10/13 15:17:16
@@ -3,7 +3,7 @@
--- Qt Architect generated file ---
File: formprintdialogdata.h
- Last generated: Fri Oct 6 13:10:28 2000
+ Last generated: Fri Oct 13 16:07:46 2000
DO NOT EDIT!!! This file will be automatically
regenerated by qtarch. All changes will be lost.