diff options
Diffstat (limited to 'kfax')
-rw-r--r-- | kfax/CMakeL10n.txt | 6 | ||||
-rw-r--r-- | kfax/CMakeLists.txt | 2 | ||||
-rw-r--r-- | kfax/faxinput.cpp | 2 | ||||
-rw-r--r-- | kfax/kfax.cpp | 88 | ||||
-rw-r--r-- | kfax/kfax.desktop | 74 | ||||
-rw-r--r-- | kfax/kfax.h | 2 | ||||
-rw-r--r-- | kfax/kfax_printsettings.h | 2 | ||||
-rw-r--r-- | kfax/options.cpp | 96 | ||||
-rw-r--r-- | kfax/options.h | 2 | ||||
-rw-r--r-- | kfax/viewfax.cpp | 4 |
10 files changed, 105 insertions, 173 deletions
diff --git a/kfax/CMakeL10n.txt b/kfax/CMakeL10n.txt index 13088803..6a956427 100644 --- a/kfax/CMakeL10n.txt +++ b/kfax/CMakeL10n.txt @@ -1,3 +1,9 @@ ##### create translation templates ############## tde_l10n_create_template( "kfax" ) + +tde_l10n_create_template( + CATALOG "desktop_files/kfax.desktop/" + SOURCES kfax.desktop + DESTINATION "${CMAKE_SOURCE_DIR}/translations" +) diff --git a/kfax/CMakeLists.txt b/kfax/CMakeLists.txt index 0ace8632..ac20f8d3 100644 --- a/kfax/CMakeLists.txt +++ b/kfax/CMakeLists.txt @@ -23,7 +23,7 @@ link_directories( #### other data ################################# -install( FILES kfax.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) +tde_create_translated_desktop( kfax.desktop ) install( FILES kfax.tif kfaxlogo.xpm DESTINATION ${DATA_INSTALL_DIR}/kfax/pics ) install( FILES kfaxui.rc DESTINATION ${DATA_INSTALL_DIR}/kfax ) diff --git a/kfax/faxinput.cpp b/kfax/faxinput.cpp index b0f7495f..b70dc40f 100644 --- a/kfax/faxinput.cpp +++ b/kfax/faxinput.cpp @@ -215,7 +215,7 @@ notetiff(const char *name) get2(buf, endian) : get4(buf, endian); } break; - case 274: /* Qt::Orientation */ + case 274: /* Orientation */ switch(value) { default: /* row0 at top, col0 at left */ orient = 0; diff --git a/kfax/kfax.cpp b/kfax/kfax.cpp index 716bcbb6..0388c05e 100644 --- a/kfax/kfax.cpp +++ b/kfax/kfax.cpp @@ -41,7 +41,7 @@ #include <tdelocale.h> #include <tdeaboutdata.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kiconloader.h> #include <tdefiledialog.h> #include <tdefilemetainfo.h> @@ -58,7 +58,7 @@ #include <kurldrag.h> #include <kstatusbar.h> #include <tdeaction.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <kprinter.h> #include <tdeio/job.h> #include <kdebug.h> @@ -147,8 +147,8 @@ Window qtwin; // the qt window Window Win; int qwindow_height; int qwindow_width; -bool have_no_fax = TRUE; -bool display_is_setup = FALSE; +bool have_no_fax = true; +bool display_is_setup = false; struct optionsinfo fop; // contains the fax options extern struct pagenode *firstpage, *lastpage, *thispage; @@ -161,7 +161,7 @@ bool buttondown; bool MyApp::x11EventFilter( XEvent * ev) { if (TDEApplication::x11EventFilter(ev)) - return TRUE; + return true; if (ev->type == ButtonRelease){ /* this is so that the cursor goes back to normal on leaving the fax window @@ -177,14 +177,14 @@ bool MyApp::x11EventFilter( XEvent * ev) ev->xany.window == Win){ if(startingup || have_no_fax) - return FALSE; + return false; toplevel->handle_X_event(*ev); ev->xany.window = qtwin; } - return FALSE; + return false; } @@ -211,14 +211,14 @@ TopLevel::TopLevel (TQWidget *, const char *name) // Create a Vertical scroll bar - vsb = new TQScrollBar( Qt::Vertical,faxqtwin,"scrollBar" ); + vsb = new TQScrollBar( TQt::Vertical,faxqtwin,"scrollBar" ); vsb->hide(); - connect( vsb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrollVert(int)) ); + connect( vsb, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(scrollVert(int)) ); // Create a Horizontal scroll bar - hsb = new TQScrollBar( Qt::Horizontal,faxqtwin,"scrollBar" ); - connect( hsb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrollHorz(int)) ); + hsb = new TQScrollBar( TQt::Horizontal,faxqtwin,"scrollBar" ); + connect( hsb, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(scrollHorz(int)) ); hsb->hide(); setCentralWidget(faxqtwin); @@ -236,43 +236,43 @@ TopLevel::~TopLevel() void TopLevel::setupMenuBar() { // File menu - KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( faxOpen() ), actionCollection() ); - actRecent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( faxOpen( const KURL & ) ), + KStdAction::open( this, TQ_SLOT( faxOpen() ), actionCollection() ); + actRecent = KStdAction::openRecent( this, TQ_SLOT( faxOpen( const KURL & ) ), actionCollection() ); - actSave = KStdAction::save( TQT_TQOBJECT(this), TQT_SLOT( faxSave() ), actionCollection() ); - actSaveAs = KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT( faxSaveAs() ), + actSave = KStdAction::save( this, TQ_SLOT( faxSave() ), actionCollection() ); + actSaveAs = KStdAction::saveAs( this, TQ_SLOT( faxSaveAs() ), actionCollection() ); - actPrint = KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT( print() ), actionCollection() ); - KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection() ); - actAdd = new TDEAction( i18n( "A&dd..." ), "document-new", TDEShortcut(), TQT_TQOBJECT(this), - TQT_SLOT( faxAdd() ), actionCollection(), "file_add_fax" ); + actPrint = KStdAction::print( this, TQ_SLOT( print() ), actionCollection() ); + KStdAction::quit( this, TQ_SLOT( close() ), actionCollection() ); + actAdd = new TDEAction( i18n( "A&dd..." ), "document-new", TDEShortcut(), this, + TQ_SLOT( faxAdd() ), actionCollection(), "file_add_fax" ); actRecent->setMaxItems( 5 ); // View Menu - actSize = KStdAction::actualSize( TQT_TQOBJECT(this), TQT_SLOT( actualSize() ), + actSize = KStdAction::actualSize( this, TQ_SLOT( actualSize() ), actionCollection() ); - actZoomIn = KStdAction::zoomIn( TQT_TQOBJECT(this), TQT_SLOT( zoomin() ), actionCollection() ); - actZoomOut = KStdAction::zoomOut( TQT_TQOBJECT(this), TQT_SLOT( zoomout() ), + actZoomIn = KStdAction::zoomIn( this, TQ_SLOT( zoomin() ), actionCollection() ); + actZoomOut = KStdAction::zoomOut( this, TQ_SLOT( zoomout() ), actionCollection() ); - actRotate = new TDEAction( i18n( "&Rotate Page" ), "rotate", TDEShortcut(), TQT_TQOBJECT(this), - TQT_SLOT( rotatePage() ), actionCollection(), "view_rotate" ); - actMirror = new TDEAction( i18n( "Mirror Page" ), TDEShortcut(), TQT_TQOBJECT(this), - TQT_SLOT( mirrorPage() ), actionCollection(), "view_mirror" ); - actFlip = new TDEAction( i18n( "&Flip Page" ), TDEShortcut(), TQT_TQOBJECT(this), - TQT_SLOT( flipPage() ), actionCollection(), "view_flip" ); + actRotate = new TDEAction( i18n( "&Rotate Page" ), "rotate", TDEShortcut(), this, + TQ_SLOT( rotatePage() ), actionCollection(), "view_rotate" ); + actMirror = new TDEAction( i18n( "Mirror Page" ), TDEShortcut(), this, + TQ_SLOT( mirrorPage() ), actionCollection(), "view_mirror" ); + actFlip = new TDEAction( i18n( "&Flip Page" ), TDEShortcut(), this, + TQ_SLOT( flipPage() ), actionCollection(), "view_flip" ); // Go menu - actNext = KStdAction::next( TQT_TQOBJECT(this), TQT_SLOT( nextPage() ), actionCollection() ); - actPrev = KStdAction::prior( TQT_TQOBJECT(this), TQT_SLOT( prevPage() ), actionCollection() ); - actFirst = KStdAction::firstPage( TQT_TQOBJECT(this), TQT_SLOT( firstPage() ), + actNext = KStdAction::next( this, TQ_SLOT( nextPage() ), actionCollection() ); + actPrev = KStdAction::prior( this, TQ_SLOT( prevPage() ), actionCollection() ); + actFirst = KStdAction::firstPage( this, TQ_SLOT( firstPage() ), actionCollection() ); - actLast = KStdAction::lastPage( TQT_TQOBJECT(this), TQT_SLOT( lastPage() ), + actLast = KStdAction::lastPage( this, TQ_SLOT( lastPage() ), actionCollection() ); // Settings menu - KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT( faxoptions() ), actionCollection() ); + KStdAction::preferences( this, TQ_SLOT( faxoptions() ), actionCollection() ); } void TopLevel::setupStatusBar() @@ -295,7 +295,7 @@ void TopLevel::setupStatusBar() void TopLevel::readSettings() { - config = kapp->config(); + config = tdeApp->config(); applyMainWindowSettings( config, "MainWindowSettings" ); @@ -358,7 +358,7 @@ bool TopLevel::queryClose() void TopLevel::writeSettings() { - config = kapp->config(); + config = tdeApp->config(); config->setGroup("General Options"); @@ -723,7 +723,7 @@ void TopLevel::printIt( KPrinter &printer, TQPainter &painter ) TQPaintDeviceMetrics dm(painter.device()); TQApplication::setOverrideCursor( waitCursor ); - kapp->processEvents(); + tdeApp->processEvents(); const bool fullpage = printer.option(APP_KFAX_SCALE_FULLPAGE) == "true"; const bool center_h = printer.option(APP_KFAX_CENTER_HORZ) == "true"; @@ -890,7 +890,7 @@ void SetupDisplay(){ return; } - display_is_setup = TRUE; + display_is_setup = true; xpos = ypos = ox = oy = 0; ExpectConfNotify = 1; @@ -957,7 +957,7 @@ void TopLevel::handle_X_event(XEvent Event) if(!Image) break; - putimage = TRUE; + putimage = true; } break; @@ -983,19 +983,19 @@ void TopLevel::handle_X_event(XEvent Event) case XK_Up: ypos-= qwindow_height / 3; - putimage = TRUE; + putimage = true; break; case XK_Down: ypos+= qwindow_height / 3; - putimage = TRUE; + putimage = true; break; case XK_Left: xpos-= qwindow_width / 4; - putimage = TRUE; + putimage = true; break; case XK_Right: xpos+= qwindow_width / 4; - putimage = TRUE; + putimage = true; break; case XK_Home: case XK_R7: @@ -1117,7 +1117,7 @@ void TopLevel::handle_X_event(XEvent Event) offx = nx; offy = ny; - putimage = TRUE; + putimage = true; break; @@ -1134,7 +1134,7 @@ void TopLevel::handle_X_event(XEvent Event) } while (XCheckWindowEvent(qtdisplay, Win, KeyPressMask|ButtonPressMask, &Event)); - if(putimage == TRUE) { + if(putimage) { Refresh = Resize = 1; putImage(); } diff --git a/kfax/kfax.desktop b/kfax/kfax.desktop index 9d6c674a..71e7b1c2 100644 --- a/kfax/kfax.desktop +++ b/kfax/kfax.desktop @@ -1,81 +1,7 @@ [Desktop Entry] MimeType=image/fax-g3;image/tiff; GenericName=Fax Viewer -GenericName[af]=Faks Aansig -GenericName[ar]=عارض الفاكس -GenericName[bg]=Преглед на факсове -GenericName[br]=Gweler faks -GenericName[bs]=Preglednik faxova -GenericName[ca]=Visualitzador de fax -GenericName[cs]=Prohlížeč faxů -GenericName[cy]=Gwelydd Ffacs -GenericName[da]=Fax-fremviser -GenericName[de]=Faxbetrachter -GenericName[el]=Προβολέας φαξ -GenericName[eo]=Faksrigardilo -GenericName[es]=Visor de faxes -GenericName[et]=Fakside vaataja -GenericName[eu]=Fax ikustailua -GenericName[fa]=مشاهدهگر دورنگار -GenericName[fi]=Faksinäytin -GenericName[fr]=Afficheur de fax -GenericName[gl]=Visor de fax -GenericName[he]=מציג פקסים -GenericName[hi]=फ़ैक्स प्रदर्शक -GenericName[hr]=Preglednik faksova -GenericName[hu]=Faxnézegető -GenericName[is]=Fax sjá -GenericName[it]=Visore di fax -GenericName[ja]=ファクスビューア -GenericName[kk]=Факсты қарау -GenericName[km]=កម្មវិធីមើលទូរសារ -GenericName[lt]=Faksų žiūriklis -GenericName[lv]=Faksu Skatītājs -GenericName[ms]=Pemapar Faks -GenericName[nb]=Faksfremviser -GenericName[nds]=Faxkieker -GenericName[ne]=फ्याक्स द्रष्टा -GenericName[nl]=Faxweergaveprogramma -GenericName[nn]=Faksvisar -GenericName[pa]=ਫੈਕਸ ਦਰਸ਼ਕ -GenericName[pl]=Przeglądarka faksów -GenericName[pt]=Visualizador de Faxes -GenericName[pt_BR]=Visualizador de Faxes -GenericName[ro]=Vizualizor FAX -GenericName[ru]=Просмотр факсов -GenericName[se]=Fáksačájeheaddji -GenericName[sk]=Prehliadač faxov -GenericName[sl]=Pregledovalnik faksov -GenericName[sr]=Приказивач факсова -GenericName[sr@Latn]=Prikazivač faksova -GenericName[sv]=Faxvisare -GenericName[ta]=ஃபாக்ஸ் காட்சி -GenericName[tg]=Хондани факс -GenericName[th]=เครื่องมือแสดงโทรสารของ TDE -GenericName[tr]=Faks Görüntüleyici -GenericName[uk]=Переглядач факсів -GenericName[uz]=Faks koʻruvchi -GenericName[uz@cyrillic]=Факс кўрувчи -GenericName[ven]=Muvhoni wa Fekisi -GenericName[wa]=Håyneu di facs -GenericName[xh]=Umboniseli Wefax -GenericName[zh_CN]=传真查看器 -GenericName[zh_HK]=傳真檢視器 -GenericName[zh_TW]=傳真檢視器 -GenericName[zu]=Umbonisi wefax Name=KFax -Name[af]=K-faks -Name[ar]=برنامج KFax -Name[cy]=KFfacs -Name[eo]=Faksrigardilo -Name[hi]=के-फ़ैक्स -Name[lv]=KFakss -Name[ne]=केडीई फ्याक्स -Name[sv]=Kfax -Name[ta]=கேஃபாக்ஸ் -Name[ven]=Fekisi ya K -Name[wa]=KFacs -Name[zh_TW]=KFax 傳真檢視器 Exec=kfax %f -caption "%c" %i %m Icon=kfax Path= diff --git a/kfax/kfax.h b/kfax/kfax.h index 07a6a784..ac2df263 100644 --- a/kfax/kfax.h +++ b/kfax/kfax.h @@ -53,7 +53,7 @@ public: class TopLevel : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT diff --git a/kfax/kfax_printsettings.h b/kfax/kfax_printsettings.h index c2f0e258..11fc2935 100644 --- a/kfax/kfax_printsettings.h +++ b/kfax/kfax_printsettings.h @@ -30,7 +30,7 @@ class TQCheckBox; class KFAXPrintSettings : public KPrintDialogPage { - Q_OBJECT + TQ_OBJECT public: KFAXPrintSettings(TQWidget *parent = 0, const char *name = 0); diff --git a/kfax/options.cpp b/kfax/options.cpp index 756eac62..150314ba 100644 --- a/kfax/options.cpp +++ b/kfax/options.cpp @@ -57,7 +57,7 @@ OptionsDialog::OptionsDialog( TQWidget *parent, const char *name) TQVBoxLayout *mainLayout = new TQVBoxLayout(mainWidget, 0, spacingHint()); bg = new TQGroupBox(mainWidget,"bg"); - bg->setColumnLayout( 0, Qt::Horizontal ); + bg->setColumnLayout( 0, TQt::Horizontal ); mainLayout->addWidget( bg ); TQVBoxLayout *vbl = new TQVBoxLayout(bg->layout()); @@ -143,17 +143,17 @@ OptionsDialog::OptionsDialog( TQWidget *parent, const char *name) hbl4->addWidget( rawlabel ); g3 = new TQRadioButton("G3",rawgroup,"g3"); - connect(g3,TQT_SIGNAL(clicked()), this, TQT_SLOT(g3toggled())); + connect(g3,TQ_SIGNAL(clicked()), this, TQ_SLOT(g3toggled())); hbl4->addSpacing( 20 ); hbl4->addWidget( g3 ); g32d = new TQRadioButton("G32d",rawgroup,"g32d"); - connect(g32d,TQT_SIGNAL(clicked()), this,TQT_SLOT(g32toggled())); + connect(g32d,TQ_SIGNAL(clicked()), this,TQ_SLOT(g32toggled())); hbl4->addSpacing( 30 ); hbl4->addWidget( g32d ); g4 = new TQRadioButton("G4",rawgroup,"g4"); - connect(g4,TQT_SIGNAL(clicked()), this, TQT_SLOT(g4toggled())); + connect(g4,TQ_SIGNAL(clicked()), this, TQ_SLOT(g4toggled())); hbl4->addSpacing( 30 ); hbl4->addWidget( g4 ); @@ -179,7 +179,7 @@ OptionsDialog::OptionsDialog( TQWidget *parent, const char *name) hbl5->addWidget( heightedit ); geomauto = new TQCheckBox(i18n("Auto"),bg,"geomauto"); - connect(geomauto,TQT_SIGNAL(clicked()),this,TQT_SLOT(geomtoggled())); + connect(geomauto,TQ_SIGNAL(clicked()),this,TQ_SLOT(geomtoggled())); hbl5->addSpacing( 10 ); hbl5->addWidget( geomauto ); } @@ -255,64 +255,64 @@ void OptionsDialog::setWidgets(struct optionsinfo* newoi ){ } else{ if(newoi->fine == 1){ - resauto->setChecked(FALSE); - fine->setChecked(TRUE); - normal->setChecked(FALSE); + resauto->setChecked(false); + fine->setChecked(true); + normal->setChecked(false); } else{ - resauto->setChecked(FALSE); - fine->setChecked(FALSE); - normal->setChecked(TRUE); + resauto->setChecked(false); + fine->setChecked(false); + normal->setChecked(true); } } if(newoi->landscape == 1) - landscape->setChecked(TRUE); + landscape->setChecked(true); else - landscape->setChecked(FALSE); + landscape->setChecked(false); if(newoi->flip == 1) - flip->setChecked(TRUE); + flip->setChecked(true); else - flip->setChecked(FALSE); + flip->setChecked(false); if(newoi->invert == 1) - invert->setChecked(TRUE); + invert->setChecked(true); else - invert->setChecked(FALSE); + invert->setChecked(false); if(newoi->lsbfirst == 1) - lsb->setChecked(TRUE); + lsb->setChecked(true); else - lsb->setChecked(FALSE); + lsb->setChecked(false); if(newoi->raw == 3){ - geomauto->setEnabled(TRUE); - g3->setChecked(TRUE); + geomauto->setEnabled(true); + g3->setChecked(true); } if(newoi->raw == 2){ - geomauto->setEnabled(FALSE); - g32d->setChecked(TRUE); + geomauto->setEnabled(false); + g32d->setChecked(true); } if(newoi->raw == 4){ - geomauto->setEnabled(FALSE); - g4->setChecked(TRUE); + geomauto->setEnabled(false); + g4->setChecked(true); } widthedit->setValue(newoi->width); heightedit->setValue(newoi->height); // auto height and width can only work with g3 faxes if(newoi->geomauto == 1 && newoi->raw != 4 && newoi->raw != 2){ - geomauto->setChecked(TRUE); - widthedit->setEnabled(FALSE); - heightedit->setEnabled(FALSE); + geomauto->setChecked(true); + widthedit->setEnabled(false); + heightedit->setEnabled(false); } else{ - geomauto->setChecked(FALSE); - widthedit->setEnabled(TRUE); - heightedit->setEnabled(TRUE); + geomauto->setChecked(false); + widthedit->setEnabled(true); + heightedit->setEnabled(true); } @@ -321,19 +321,19 @@ void OptionsDialog::setWidgets(struct optionsinfo* newoi ){ void OptionsDialog::g32toggled(){ - geomauto->setChecked(FALSE); - geomauto->setEnabled(FALSE); - widthedit->setEnabled(TRUE); - heightedit->setEnabled(TRUE); + geomauto->setChecked(false); + geomauto->setEnabled(false); + widthedit->setEnabled(true); + heightedit->setEnabled(true); } void OptionsDialog::g4toggled(){ - geomauto->setChecked(FALSE); - geomauto->setEnabled(FALSE); - widthedit->setEnabled(TRUE); - heightedit->setEnabled(TRUE); + geomauto->setChecked(false); + geomauto->setEnabled(false); + widthedit->setEnabled(true); + heightedit->setEnabled(true); } @@ -341,10 +341,10 @@ void OptionsDialog::g4toggled(){ void OptionsDialog::g3toggled(){ - geomauto->setEnabled(TRUE); - geomauto->setChecked(TRUE); - widthedit->setEnabled(FALSE); - heightedit->setEnabled(FALSE); + geomauto->setEnabled(true); + geomauto->setChecked(true); + widthedit->setEnabled(false); + heightedit->setEnabled(false); } @@ -353,21 +353,21 @@ void OptionsDialog::geomtoggled(){ if(geomauto->isChecked()){ - widthedit->setEnabled(FALSE); - heightedit->setEnabled(FALSE); + widthedit->setEnabled(false); + heightedit->setEnabled(false); } else{ - widthedit->setEnabled(TRUE); - heightedit->setEnabled(TRUE); + widthedit->setEnabled(true); + heightedit->setEnabled(true); } } void OptionsDialog::slotHelp(){ - kapp->invokeHelp(); + tdeApp->invokeHelp(); } diff --git a/kfax/options.h b/kfax/options.h index 8f0c8caf..c539eced 100644 --- a/kfax/options.h +++ b/kfax/options.h @@ -57,7 +57,7 @@ class KIntNumInput; class OptionsDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kfax/viewfax.cpp b/kfax/viewfax.cpp index 09560320..09872ceb 100644 --- a/kfax/viewfax.cpp +++ b/kfax/viewfax.cpp @@ -114,7 +114,7 @@ int verbose = 0; int abell = 1; /* audio bell */ int vbell = 0; /* visual bell */ -bool have_cmd_opt = FALSE; +bool have_cmd_opt = false; size_t Memused = 0; /* image memory usage */ static size_t Memlimit = 8*1024*1024; /* try not to exceed */ @@ -160,7 +160,7 @@ int viewfaxmain() bo.i = 1; defaultpage.vres = -1; - have_no_fax = TRUE; + have_no_fax = true; /* TODO Do I need to know this: */ defaultpage.expander = g31expand; |