Use tdeApp

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/23/head
Michele Calgaro 1 month ago
parent 6d9717eb18
commit f6082cf0a5
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -10,7 +10,7 @@ MAJOR FEATURES:
CONVENIENCES/MINOR FEATURES:
*Improved navigation - add a forward and back button
*E-mail recipe(s) option (using kapp->invokeMailer())
*E-mail recipe(s) option (using tdeApp->invokeMailer())
*Give option to import recipe formats by pasting the recipe text into a widget
*Allow saving and loading diet info from a file (or just store it in the database?)
*Database maintenance options (Empty database, Remove unused elements, etc.)

@ -1837,7 +1837,7 @@ cat > conftest.$ac_ext <<EOF
#endif
#include <stdio.h>
#include "confdefs.h"
#include <kapp.h>
#include <tdeapplication.h>
int main() {
printf("kde_htmldir=\\"%s\\"\n", TDEApplication::kde_htmldir().data());

@ -1,7 +1,7 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY krecipes "<application>Krecipes</application>">
<!ENTITY kappname "&krecipes;"><!-- replace kapp here, do *not* replace kappname-->
<!ENTITY kappname "&krecipes;"><!-- replace tdeApp here, do *not* replace kappname-->
<!ENTITY package "extragear/utils"><!-- tdebase, tdeadmin, etc -->
<!ENTITY % addindex "IGNORE">
<!ENTITY % Danish "INCLUDE"><!-- change language only here -->
@ -2253,7 +2253,7 @@ Also include any keys that have a special function but have no equivalent in the
menus or toolbars. This may not be necessary for small apps or apps with no tool
or menu bars. -->
<sect1 id="kapp-mainwindow">
<sect1 id="tdeApp-mainwindow">
<title><emphasis>&krecipes;s</emphasis> hovedvindue</title>
<sect2 id="file-menu">
@ -2468,7 +2468,7 @@ distribution. -->
<appendix id="installation">
<title>Installation</title>
<sect1 id="getting-kapp">
<sect1 id="getting-tdeApp">
<title>Hvordan får man fat i &krecipes;</title>
<para>Den nyeste version af &krecipes; er tilgængelig fra dets hjemmeside på <ulink url="http://krecipes.sourceforge.net">http://krecipes.sourceforge.net</ulink>.</para>

@ -1,7 +1,7 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY krecipes "<application>Krecipes</application>">
<!ENTITY kappname "&krecipes;"><!-- replace kapp here, do *not* replace kappname-->
<!ENTITY kappname "&krecipes;"><!-- replace tdeApp here, do *not* replace kappname-->
<!ENTITY package "extragear/utils"><!-- tdebase, tdeadmin, etc -->
<!ENTITY % addindex "IGNORE">
<!ENTITY % English "INCLUDE"><!-- change language only here -->
@ -2660,7 +2660,7 @@ Also include any keys that have a special function but have no equivalent in the
menus or toolbars. This may not be necessary for small apps or apps with no tool
or menu bars. -->
<sect1 id="kapp-mainwindow">
<sect1 id="tdeApp-mainwindow">
<title>The main <emphasis>&krecipes;</emphasis> window</title>
<sect2 id="file-menu">
@ -3032,7 +3032,7 @@ Documentation copyright 2004-2006 Colleen Beamer <email>colleen.beamer&#064;gmai
<appendix id="installation">
<title>Installation</title>
<sect1 id="getting-kapp">
<sect1 id="getting-tdeApp">
<title>How to obtain &krecipes;</title>
<para>The latest version of &krecipes; is available from its home page at <ulink url="http://krecipes.sourceforge.net">http://krecipes.sourceforge.net</ulink></para>

@ -1,7 +1,7 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY krecipes "<application>Krecipes</application>">
<!ENTITY kappname "&krecipes;"><!-- replace kapp here, do *not* replace kappname-->
<!ENTITY kappname "&krecipes;"><!-- replace tdeApp here, do *not* replace kappname-->
<!ENTITY package "extragear/utils"><!-- tdebase, tdeadmin, etc -->
<!ENTITY % addindex "IGNORE">
<!ENTITY % Spanish "INCLUDE"><!-- change language only here -->
@ -2253,7 +2253,7 @@ Also include any keys that have a special function but have no equivalent in the
menus or toolbars. This may not be necessary for small apps or apps with no tool
or menu bars. -->
<sect1 id="kapp-mainwindow">
<sect1 id="tdeApp-mainwindow">
<title>La ventana principal de <emphasis>&krecipes;</emphasis></title>
<sect2 id="file-menu">
@ -2468,7 +2468,7 @@ distribution. -->
<appendix id="installation">
<title>Instalación</title>
<sect1 id="getting-kapp">
<sect1 id="getting-tdeApp">
<title>Cómo obtener &krecipes;</title>
<para>La última versión de &krecipes; se encuentra disponible en su página principal en <ulink url="http://krecipes.sourceforge.net">http://krecipes.sourceforge.net</ulink>.</para>

@ -1,7 +1,7 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY krecipes "<application>Krecipes</application>">
<!ENTITY kappname "&krecipes;"><!-- replace kapp here, do *not* replace kappname-->
<!ENTITY kappname "&krecipes;"><!-- replace tdeApp here, do *not* replace kappname-->
<!ENTITY package "extragear/utils"><!-- tdebase, tdeadmin, etc -->
<!ENTITY % addindex "IGNORE">
<!ENTITY % Estonian "INCLUDE"><!-- change language only here -->
@ -1854,7 +1854,7 @@ Also include any keys that have a special function but have no equivalent in the
menus or toolbars. This may not be necessary for small apps or apps with no tool
or menu bars. -->
<sect1 id="kapp-mainwindow">
<sect1 id="tdeApp-mainwindow">
<title>&krecipes;e peaaken</title>
<sect2 id="file-menu">
@ -2052,7 +2052,7 @@ distribution. -->
<appendix id="installation">
<title>Paigaldamine</title>
<sect1 id="getting-kapp">
<sect1 id="getting-tdeApp">
<title>&krecipes;e hankimine</title>
<para>&krecipes;e uusima versiooni leiab selle koduleheküljelt <ulink url="http://krecipes.sourceforge.net">http://krecipes.sourceforge.net</ulink>.</para>

@ -1,7 +1,7 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY krecipes "<application>Krecipes</application>">
<!ENTITY kappname "&krecipes;"><!-- replace kapp here, do *not* replace kappname-->
<!ENTITY kappname "&krecipes;"><!-- replace tdeApp here, do *not* replace kappname-->
<!ENTITY package "extragear/utils"><!-- tdebase, tdeadmin, etc -->
<!ENTITY % addindex "IGNORE">
<!ENTITY % Portuguese "INCLUDE"><!-- change language only here -->
@ -2619,7 +2619,7 @@ Also include any keys that have a special function but have no equivalent in the
menus or toolbars. This may not be necessary for small apps or apps with no tool
or menu bars. -->
<sect1 id="kapp-mainwindow">
<sect1 id="tdeApp-mainwindow">
<title>A janela principal do <emphasis>&krecipes;</emphasis></title>
<sect2 id="file-menu">
@ -2867,7 +2867,7 @@ distribution. -->
<appendix id="installation">
<title>Instalação</title>
<sect1 id="getting-kapp">
<sect1 id="getting-tdeApp">
<title>Como obter o &krecipes;</title>
<para>A última versão do &krecipes; está disponível na sua página pessoal em <ulink url="http://krecipes.sourceforge.net">http://krecipes.sourceforge.net</ulink></para>

@ -1,7 +1,7 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY krecipes "<application>Krecipes</application>">
<!ENTITY kappname "&krecipes;"><!-- replace kapp here, do *not* replace kappname-->
<!ENTITY kappname "&krecipes;"><!-- replace tdeApp here, do *not* replace kappname-->
<!ENTITY package "extragear/utils"><!-- tdebase, tdeadmin, etc -->
<!ENTITY % addindex "IGNORE">
<!ENTITY % Swedish "INCLUDE"><!-- change language only here -->
@ -2253,7 +2253,7 @@ Also include any keys that have a special function but have no equivalent in the
menus or toolbars. This may not be necessary for small apps or apps with no tool
or menu bars. -->
<sect1 id="kapp-mainwindow">
<sect1 id="tdeApp-mainwindow">
<title><emphasis>Krecepts</emphasis> huvudfönster</title>
<sect2 id="file-menu">
@ -2468,7 +2468,7 @@ distribution. -->
<appendix id="installation">
<title>Installation</title>
<sect1 id="getting-kapp">
<sect1 id="getting-tdeApp">
<title>Hur man skaffar &krecipes;</title>
<para>Den senaste versionen av Krecept är tillgänglig från dess hemsida på <ulink url="http://krecipes.sourceforge.net">http://krecipes.sourceforge.net</ulink>.</para>

@ -98,7 +98,7 @@ TQString RecipeDB::krecipes_version() const
RecipeDB* RecipeDB::createDatabase( const TQString &dbType, const TQString &file )
{
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Server" );
TQString host = config->readEntry( "Host", "localhost" );
TQString user = config->readEntry( "Username", TQString::null );
@ -285,7 +285,7 @@ bool RecipeDB::backup( const TQString &backup_file, TQString *errMsg )
return false;
}
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "DBType" );
(*dumpStream) << "-- Generated for Krecipes v"<<krecipes_version()<<endl;
@ -392,7 +392,7 @@ bool RecipeDB::restore( const TQString &file, TQString *errMsg )
return false;
}
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "DBType" );
TQString dbType = stream.readLine().stripWhiteSpace();
dbType = dbType.right( dbType.length() - dbType.find(":") - 2 );
@ -448,7 +448,7 @@ bool RecipeDB::restore( const TQString &file, TQString *errMsg )
int prog = 0;
while ( process->isRunning() ){
if ( haltOperation ) { break; }
kapp->processEvents();
tdeApp->processEvents();
if ( prog % 100 == 0 ) {
emit progress();
prog = 0;

@ -207,7 +207,7 @@ void DietWizardDialog::createDiet( void )
bool found = false;
TQValueList <RecipeList::Iterator> tempDishRList = tempRList;
while ( ( !found ) && !tempDishRList.empty() ) {
int random_index = ( int ) ( ( float ) ( kapp->random() ) / ( float ) RAND_MAX * tempDishRList.count() );
int random_index = ( int ) ( ( float ) ( tdeApp->random() ) / ( float ) RAND_MAX * tempDishRList.count() );
TQValueList<RecipeList::Iterator>::Iterator iit = tempDishRList.at( random_index ); // note that at() retrieves an iterator to the iterator list, so we need to use * in order to get the RecipeList::Iterator
RecipeList::Iterator rit = *iit;

@ -118,18 +118,18 @@ void PageSetupDialog::accept()
saveLayout();
if ( !active_filename.isEmpty() ) {
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Page Setup" );
config->writeEntry( m_configEntry+"Layout", active_filename );
}
if ( !active_template.isEmpty() ) {
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Page Setup" );
config->writeEntry( m_configEntry+"Template", active_template );
}
TDEConfig *config = kapp->config();
TDEConfig *config = tdeApp->config();
config->setGroup( "Page Setup" );
config->writeEntry( "WindowSize", size() );

@ -126,7 +126,7 @@ void RefineShoppingListDialog::loadData()
TQString amount_str;
if ( ( *it ).amount > 0 ) {
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Formatting" );
if ( config->readBoolEntry( "Fraction" ) )
@ -181,7 +181,7 @@ void RefineShoppingListDialog::itemRenamed( TQListViewItem* item, const TQString
else { //revert back to the valid amount string
TQString amount_str;
if ( ( *found_it ).amount > 0 ) {
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Formatting" );
if ( config->readBoolEntry( "Fraction" ) )

@ -134,7 +134,7 @@ SelectRecipeDialog::SelectRecipeDialog( TQWidget *parent, RecipeDB* db )
connect( clearSearchButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( clearSearch() ) );
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Performance" );
if ( config->readBoolEntry("SearchAsYouType",true) ) {
connect( searchBox, TQ_SIGNAL( returnPressed( const TQString& ) ), recipeFilter, TQ_SLOT( filter( const TQString& ) ) );

@ -268,7 +268,7 @@ void RecipeActionsHandler::mergeSimilar()
{
TQPtrList<TQListViewItem> items = parentListView->selectedItems();
if ( items.count() > 1 )
KMessageBox::sorry( kapp->mainWidget(), i18n("Please select only one category."), TQString::null );
KMessageBox::sorry( tdeApp->mainWidget(), i18n("Please select only one category."), TQString::null );
else if ( items.count() == 1 && items.at(0)->rtti() == 1001 ) {
CategoryListItem * cat_it = ( CategoryListItem* ) items.at(0);
TQString name = cat_it->categoryName();
@ -297,7 +297,7 @@ void RecipeActionsHandler::mergeSimilar()
}
else //either nothing was selected or a recipe was selected
KMessageBox::sorry( kapp->mainWidget(), i18n("No recipes selected."), i18n("Edit Recipe") );
KMessageBox::sorry( tdeApp->mainWidget(), i18n("No recipes selected."), i18n("Edit Recipe") );
}
#endif

@ -181,7 +181,7 @@ void UnitsDialog::saveAllRatios( UnitRatioList &ratioList )
return ;
progress_dialog.progressBar() ->advance( 1 );
kapp->processEvents();
tdeApp->processEvents();
UnitRatio new_ratio;
new_ratio.uID1 = current_ratio.uID1;

@ -140,7 +140,7 @@ void BaseExporter::saveToFile( const TQValueList<int> &ids, RecipeDB *database )
if ( m_progress_dlg ) {
m_progress_dlg->progressBar()->advance( progressInterval() );
kapp->processEvents();
tdeApp->processEvents();
}
}

@ -134,7 +134,7 @@ void MMFExporter::writeMMFIngredients( TQString &content, const Recipe &recipe )
void MMFExporter::writeSingleIngredient( TQString &content, const Ingredient &ing, bool is_sub )
{
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Formatting" );
MixedNumber::Format number_format = ( config->readBoolEntry( "Fraction" ) ) ? MixedNumber::MixedNumberFormat : MixedNumber::DecimalFormat;

@ -214,7 +214,7 @@ void RezkonvExporter::writeIngredients( TQString &content, const Recipe &recipe
void RezkonvExporter::writeSingleIngredient( TQString &content, const IngredientData &ing, bool is_sub )
{
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Formatting" );
MixedNumber::Format number_format = ( config->readBoolEntry( "Fraction" ) ) ? MixedNumber::MixedNumberFormat : MixedNumber::DecimalFormat;

@ -29,7 +29,7 @@ BaseImporter::BaseImporter() :
m_cat_structure( 0 ),
file_recipe_count( 0 )
{
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Import" );
direct = config->readBoolEntry( "DirectImport", false );
@ -95,7 +95,7 @@ void BaseImporter::import( RecipeDB *db, bool automatic )
if ( direct ) {
m_database = db;
m_progress_dialog = new KProgressDialog( kapp->mainWidget(), 0,
m_progress_dialog = new KProgressDialog( tdeApp->mainWidget(), 0,
i18n( "Importing selected recipes" ), TQString::null, true );
KProgress *progress = m_progress_dialog->progressBar();
progress->setPercentageVisible(false);
@ -120,7 +120,7 @@ void BaseImporter::import( RecipeDB *db, bool automatic )
m_recipe_list->empty();
//db->blockSignals(true);
m_progress_dialog = new KProgressDialog( kapp->mainWidget(), 0,
m_progress_dialog = new KProgressDialog( tdeApp->mainWidget(), 0,
i18n( "Importing selected recipes" ), TQString::null, true );
KProgress *progress = m_progress_dialog->progressBar();
progress->setTotalSteps( m_recipe_list->count() );
@ -147,7 +147,7 @@ void BaseImporter::importIngredient( IngredientData &ing, RecipeDB *db, KProgres
if ( direct ) {
progress_dialog->progressBar()->advance( 1 );
kapp->processEvents();
tdeApp->processEvents();
}
//create ingredient groups
@ -168,7 +168,7 @@ void BaseImporter::importIngredient( IngredientData &ing, RecipeDB *db, KProgres
if ( direct ) {
progress_dialog->progressBar()->advance( 1 );
kapp->processEvents();
tdeApp->processEvents();
}
Unit real_unit( ing.units.name.left( max_units_length ), ing.units.plural.left( max_units_length ) );
@ -185,7 +185,7 @@ void BaseImporter::importIngredient( IngredientData &ing, RecipeDB *db, KProgres
if ( direct ) {
progress_dialog->progressBar()->advance( 1 );
kapp->processEvents();
tdeApp->processEvents();
}
if ( ing.prepMethodList.count() > 0 ) {
@ -209,7 +209,7 @@ void BaseImporter::importIngredient( IngredientData &ing, RecipeDB *db, KProgres
void BaseImporter::importRecipes( RecipeList &selected_recipes, RecipeDB *db, KProgressDialog *progress_dialog )
{
// Load Current Settings
TDEConfig *config = kapp->config();
TDEConfig *config = tdeApp->config();
config->setGroup( "Import" );
bool overwrite = config->readBoolEntry( "OverwriteExisting", false );
@ -218,7 +218,7 @@ void BaseImporter::importRecipes( RecipeList &selected_recipes, RecipeDB *db, KP
for ( recipe_it = selected_recipes.begin(); recipe_it != recipe_list_end; ++recipe_it ) {
if ( !direct ) {
if ( progress_dialog->wasCancelled() ) {
KMessageBox::information( kapp->mainWidget(), i18n( "All recipes up unto this point have been successfully imported." ) );
KMessageBox::information( tdeApp->mainWidget(), i18n( "All recipes up unto this point have been successfully imported." ) );
//db->blockSignals(false);
return ;
}
@ -229,7 +229,7 @@ void BaseImporter::importRecipes( RecipeList &selected_recipes, RecipeDB *db, KP
progress_dialog->setLabel( TQString( i18n( "Importing recipe: %1" ) ).arg( ( *recipe_it ).title ) );
progress_dialog->progressBar()->advance( 1 );
kapp->processEvents();
tdeApp->processEvents();
//add all recipe items (authors, ingredients, etc. to the database if they aren't already
IngredientList::iterator ing_list_end( ( *recipe_it ).ingList.end() );
@ -245,7 +245,7 @@ void BaseImporter::importRecipes( RecipeList &selected_recipes, RecipeDB *db, KP
for ( ElementList::iterator author_it = ( *recipe_it ).authorList.begin(); author_it != author_list_end; ++author_it ) {
if ( direct ) {
progress_dialog->progressBar()->advance( 1 );
kapp->processEvents();
tdeApp->processEvents();
}
int new_author_id = db->findExistingAuthorByName(( *author_it ).name);
@ -261,7 +261,7 @@ void BaseImporter::importRecipes( RecipeList &selected_recipes, RecipeDB *db, KP
for ( ElementList::iterator cat_it = ( *recipe_it ).categoryList.begin(); cat_it != cat_list_end; ++cat_it ) {
if ( direct ) {
progress_dialog->progressBar()->advance( 1 );
kapp->processEvents();
tdeApp->processEvents();
}
int new_cat_id = db->findExistingCategoryByName(( *cat_it ).name);
@ -286,7 +286,7 @@ void BaseImporter::importRecipes( RecipeList &selected_recipes, RecipeDB *db, KP
for ( RatingList::iterator rating_it = ( *recipe_it ).ratingList.begin(); rating_it != rating_list_end; ++rating_it ) {
if ( direct ) {
progress_dialog->progressBar()->advance( 1 );
kapp->processEvents();
tdeApp->processEvents();
}
for ( RatingCriteriaList::iterator rc_it = (*rating_it).ratingCriteriaList.begin(); rc_it != (*rating_it).ratingCriteriaList.end(); ++rc_it ) {
@ -307,7 +307,7 @@ void BaseImporter::importRecipes( RecipeList &selected_recipes, RecipeDB *db, KP
if ( direct ) {
progress_dialog->progressBar()->advance( 1 );
kapp->processEvents();
tdeApp->processEvents();
}
//save into the database

@ -75,7 +75,7 @@ void MMFImporter::parseFile( const TQString &file )
void MMFImporter::importMMF( TQTextStream &stream )
{
kapp->processEvents(); //don't want the user to think its frozen... especially for files with thousands of recipes
tdeApp->processEvents(); //don't want the user to think its frozen... especially for files with thousands of recipes
TQString current;

@ -64,7 +64,7 @@ void MXPImporter::importMXP( TQTextStream &stream )
{
Recipe recipe;
kapp->processEvents(); //don't want the user to think its frozen... especially for files with thousands of recipes
tdeApp->processEvents(); //don't want the user to think its frozen... especially for files with thousands of recipes
//kdDebug()<<"Found recipe MXP format: * Exported from MasterCook *"<<endl;
TQString current;

@ -52,7 +52,7 @@ NYCGenericImporter::~NYCGenericImporter()
void NYCGenericImporter::importNYCGeneric( TQTextStream &stream )
{
kapp->processEvents(); //don't want the user to think its frozen... especially for files with thousands of recipes
tdeApp->processEvents(); //don't want the user to think its frozen... especially for files with thousands of recipes
TQString current;

@ -57,7 +57,7 @@ void RezkonvImporter::parseFile( const TQString &filename )
void RezkonvImporter::readRecipe( const TQStringList &raw_recipe )
{
kapp->processEvents(); //don't want the user to think its frozen... especially for files with thousands of recipes
tdeApp->processEvents(); //don't want the user to think its frozen... especially for files with thousands of recipes
Recipe recipe;

@ -191,7 +191,7 @@ void Krecipes::setupActions()
saveAction = KStdAction::save( this, TQ_SLOT( fileSave() ), actionCollection() );
KStdAction::quit( kapp, TQ_SLOT( quit() ), actionCollection() );
KStdAction::quit( tdeApp, TQ_SLOT( quit() ), actionCollection() );
m_toolbarAction = KStdAction::showToolbar( this, TQ_SLOT( optionsShowToolbar() ), actionCollection() );
m_statusbarAction = KStdAction::showStatusbar( this, TQ_SLOT( optionsShowStatusbar() ), actionCollection() );
@ -367,7 +367,7 @@ void Krecipes::import()
parsing_file_dlg->hide();
TDEApplication::restoreOverrideCursor();
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Import" );
bool direct = config->readBoolEntry( "DirectImport", false );
if ( !direct ) {

@ -64,7 +64,7 @@ KrecipesView::KrecipesView( TQWidget *parent )
TQTime dbg_total_timer; dbg_total_timer.start();
#endif
kapp->dcopClient()->setDefaultObject( objId() );
tdeApp->dcopClient()->setDefaultObject( objId() );
// Init the setup wizard if necessary
kdDebug() << "Beginning wizard" << endl;
@ -84,7 +84,7 @@ KrecipesView::KrecipesView( TQWidget *parent )
// Read the database setup
TDEConfig *config;
config = kapp->config();
config = tdeApp->config();
config->sync();
@ -309,7 +309,7 @@ bool KrecipesView::questionRerunWizard( const TQString &message, const TQString
wizard( true );
else {
kdError() << error << ". " << i18n( "Exiting" ) << endl;
kapp->exit( 1 ); exit ( 1 ); //FIXME: why doesn't kapp->exit(1) do anything?
tdeApp->exit( 1 ); exit ( 1 ); //FIXME: why doesn't tdeApp->exit(1) do anything?
return false;
}
@ -543,7 +543,7 @@ void KrecipesView::createNewElement( void )
void KrecipesView::wizard( bool force )
{
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Wizard" );
bool setupDone = config->readBoolEntry( "SystemSetup", false );
@ -561,7 +561,7 @@ void KrecipesView::wizard( bool force )
if ( setupWizard->exec() == TQDialog::Accepted )
{
TDEConfig * config;
config = kapp->config();
config = tdeApp->config();
config->sync();
config->setGroup( "DBType" );
dbType = config->readEntry( "Type", "SQLite" );
@ -677,7 +677,7 @@ void KrecipesView::initializeData( const TQString &host, const TQString &dbName,
RecipeDB * db = RecipeDB::createDatabase( dbType, host, user, pass, dbName, port, dbName );
if ( !db ) {
kdError() << i18n( "Code error. No DB support has been included. Exiting" ) << endl;
kapp->exit( 1 );
tdeApp->exit( 1 );
}
db->connect();
@ -751,51 +751,51 @@ void KrecipesView::activateContextHelp()
{
switch ( m_activePanel ) {
case RecipeView:
//kapp->invokeHelp("");
//tdeApp->invokeHelp("");
break;
case SelectP:
kapp->invokeHelp("find-edit");
tdeApp->invokeHelp("find-edit");
break;
case ShoppingP:
kapp->invokeHelp("shopping-list");
tdeApp->invokeHelp("shopping-list");
break;
case DietP:
kapp->invokeHelp("diet-helper");
tdeApp->invokeHelp("diet-helper");
break;
case MatcherP:
kapp->invokeHelp("ingredient-matcher");
tdeApp->invokeHelp("ingredient-matcher");
break;
case RecipeEdit:
kapp->invokeHelp("enter-edit-recipes");
tdeApp->invokeHelp("enter-edit-recipes");
break;
case IngredientsP:
kapp->invokeHelp("ingredients-component");
tdeApp->invokeHelp("ingredients-component");
break;
case PropertiesP:
kapp->invokeHelp("properties-component");
tdeApp->invokeHelp("properties-component");
break;
case UnitsP:
kapp->invokeHelp("units-component");
tdeApp->invokeHelp("units-component");
break;
case PrepMethodsP:
kapp->invokeHelp("prep-methods");
tdeApp->invokeHelp("prep-methods");
break;
case CategoriesP:
kapp->invokeHelp("categories-component");
tdeApp->invokeHelp("categories-component");
break;
case AuthorsP:
kapp->invokeHelp("authors-component");
tdeApp->invokeHelp("authors-component");
break;
}
}
@ -847,7 +847,7 @@ void KrecipesView::initDatabase( TDEConfig *config )
// No DB type has been enabled(should not happen at all, but just in case)
kdError() << i18n( "Code error. No DB support was built in. Exiting" ) << endl;
kapp->exit( 1 );
tdeApp->exit( 1 );
}
database->connect();
@ -873,7 +873,7 @@ void KrecipesView::initDatabase( TDEConfig *config )
// No DB type has been enabled (should not happen at all, but just in case)
kdError() << i18n( "Code error. No DB support was built in. Exiting" ) << endl;
kapp->exit( 1 );
tdeApp->exit( 1 );
break;
}
}
@ -889,7 +889,7 @@ TQString KrecipesView::checkCorrectDBType( TDEConfig *config )
// Read the database setup again
config = kapp->config();
config = tdeApp->config();
config->sync();
config->setGroup( "DBType" );
dbType = config->readEntry( "Type", "SQLite" );

@ -87,7 +87,7 @@ KrecipesPreferences::KrecipesPreferences( TQWidget *parent )
void KrecipesPreferences::slotHelp()
{
kapp->invokeHelp( m_helpMap[activePageIndex()] );
tdeApp->invokeHelp( m_helpMap[activePageIndex()] );
}
@ -193,7 +193,7 @@ MySQLServerPrefs::MySQLServerPrefs( TQWidget *parent ) : TQWidget( parent )
layout->addItem( spacerRight, 1, 4 );
// Load & Save Current Settings
TDEConfig *config = kapp->config();
TDEConfig *config = tdeApp->config();
config->setGroup( "Server" );
serverEdit->setText( config->readEntry( "Host", "localhost" ) );
usernameEdit->setText( config->readEntry( "Username", "" ) );
@ -206,7 +206,7 @@ MySQLServerPrefs::MySQLServerPrefs( TQWidget *parent ) : TQWidget( parent )
void MySQLServerPrefs::saveOptions( void )
{
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Server" );
config->writeEntry( "Host", serverEdit->text() );
config->writeEntry( "Username", usernameEdit->text() );
@ -320,7 +320,7 @@ PostgreSQLServerPrefs::PostgreSQLServerPrefs( TQWidget *parent ) : TQWidget( par
layout->addItem( spacerRight, 1, 4 );
// Load & Save Current Settings
TDEConfig *config = kapp->config();
TDEConfig *config = tdeApp->config();
config->setGroup( "Server" );
serverEdit->setText( config->readEntry( "Host", "localhost" ) );
usernameEdit->setText( config->readEntry( "Username", "" ) );
@ -333,7 +333,7 @@ PostgreSQLServerPrefs::PostgreSQLServerPrefs( TQWidget *parent ) : TQWidget( par
void PostgreSQLServerPrefs::saveOptions( void )
{
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Server" );
config->writeEntry( "Host", serverEdit->text() );
config->writeEntry( "Username", usernameEdit->text() );
@ -378,7 +378,7 @@ SQLiteServerPrefs::SQLiteServerPrefs( TQWidget *parent ) : TQWidget( parent )
dumpPathRequester->setFilter( sqliteBinary );
// Load & Save Current Settings
TDEConfig *config = kapp->config();
TDEConfig *config = tdeApp->config();
config->setGroup( "Server" );
fileRequester->setURL( config->readEntry( "DBFile", locateLocal( "appdata", "krecipes.krecdb" ) ) );
dumpPathRequester->setURL( config->readEntry( "SQLitePath", sqliteBinary ) );
@ -386,7 +386,7 @@ SQLiteServerPrefs::SQLiteServerPrefs( TQWidget *parent ) : TQWidget( parent )
void SQLiteServerPrefs::saveOptions( void )
{
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Server" );
config->writeEntry( "DBFile", fileRequester->url() );
config->writeEntry( "SQLitePath", dumpPathRequester->url() );
@ -399,7 +399,7 @@ ServerPrefs::ServerPrefs( TQWidget *parent )
{
TQVBoxLayout * Form1Layout = new TQVBoxLayout( this, 11, 6 );
TDEConfig *config = kapp->config();
TDEConfig *config = tdeApp->config();
config->setGroup( "DBType" );
TQString DBtype = config->readEntry( "Type" );
if ( DBtype == "MySQL" )
@ -436,7 +436,7 @@ void KrecipesPreferences::saveSettings( void )
// Save Server settings
void ServerPrefs::saveOptions( void )
{
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "DBType" );
TQString DBtype = config->readEntry( "Type" );
if ( DBtype == "MySQL" )
@ -504,7 +504,7 @@ NumbersPrefs::NumbersPrefs( TQWidget *parent )
languageChange();
// Load Current Settings
TDEConfig *config = kapp->config();
TDEConfig *config = tdeApp->config();
config->setGroup( "Formatting" );
int button = ( config->readBoolEntry( "Fraction", false ) ) ? 1 : 0;
@ -517,7 +517,7 @@ NumbersPrefs::NumbersPrefs( TQWidget *parent )
void NumbersPrefs::saveOptions()
{
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Formatting" );
bool fraction = !numberButtonGroup->find( 0 ) ->isOn();
@ -540,7 +540,7 @@ ImportPrefs::ImportPrefs( TQWidget *parent )
: TQWidget( parent )
{
// Load Current Settings
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Import" );
bool overwrite = config->readBoolEntry( "OverwriteExisting", false );
@ -600,7 +600,7 @@ ImportPrefs::ImportPrefs( TQWidget *parent )
void ImportPrefs::saveOptions()
{
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Import" );
config->writeEntry( "OverwriteExisting", overwriteCheckbox->isChecked() );
@ -617,7 +617,7 @@ PerformancePrefs::PerformancePrefs( TQWidget *parent )
: TQWidget( parent )
{
// Load Current Settings
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Performance" );
int cat_limit = config->readNumEntry( "CategoryLimit", -1 );
@ -661,7 +661,7 @@ PerformancePrefs::PerformancePrefs( TQWidget *parent )
void PerformancePrefs::saveOptions()
{
TDEConfig * config = kapp->config();
TDEConfig * config = tdeApp->config();
config->setGroup( "Performance" );
int catLimit = ( catLimitInput->value() == 0 ) ? -1 : catLimitInput->value();

@ -211,13 +211,13 @@ void RecipeActionsHandler::edit()
{
TQPtrList<TQListViewItem> items = parentListView->selectedItems();
if ( items.count() > 1 )
KMessageBox::sorry( kapp->mainWidget(), i18n("Please select only one recipe."), i18n("Edit Recipe") );
KMessageBox::sorry( tdeApp->mainWidget(), i18n("Please select only one recipe."), i18n("Edit Recipe") );
else if ( items.count() == 1 && items.at(0)->rtti() == 1000 ) {
RecipeListItem * recipe_it = ( RecipeListItem* ) items.at(0);
emit recipeSelected( recipe_it->recipeID(), 1 );
}
else //either nothing was selected or a category was selected
KMessageBox::sorry( kapp->mainWidget(), i18n("No recipes selected."), i18n("Edit Recipe") );
KMessageBox::sorry( tdeApp->mainWidget(), i18n("No recipes selected."), i18n("Edit Recipe") );
}
void RecipeActionsHandler::recipeExport()
@ -240,7 +240,7 @@ void RecipeActionsHandler::recipeExport()
{
TQValueList<int> ids = getAllVisibleItems();
if ( ids.count() > 0 ) {
switch ( KMessageBox::questionYesNo( kapp->mainWidget(), i18n("No recipes are currently selected.\nWould you like to export all recipes in the current view?")) )
switch ( KMessageBox::questionYesNo( tdeApp->mainWidget(), i18n("No recipes are currently selected.\nWould you like to export all recipes in the current view?")) )
{
case KMessageBox::Yes:
exportRecipes( ids, i18n( "Export Recipes" ), i18n( "Recipes" ), database );
@ -249,7 +249,7 @@ void RecipeActionsHandler::recipeExport()
}
}
else
KMessageBox::sorry( kapp->mainWidget(), i18n("No recipes selected."), i18n("Export") );
KMessageBox::sorry( tdeApp->mainWidget(), i18n("No recipes selected."), i18n("Export") );
}
}

@ -616,7 +616,7 @@ SavePage::SavePage( TQWidget *parent ) : TQWidget( parent )
void SetupWizard::save( void )
{
kdDebug() << "Setting parameters in tdeconfig..." << endl;
TDEConfig *config = kapp->config();
TDEConfig *config = tdeApp->config();
// Save the database type
TQString sDBType;

@ -136,13 +136,13 @@ void DBListViewBase::keyPressEvent( TQKeyEvent *k )
return;
}
kapp->processEvents(); //if auto-repeating, user won't otherwise see change in the listview
tdeApp->processEvents(); //if auto-repeating, user won't otherwise see change in the listview
activateNext();
k->accept();
break;
}
case TQt::Key_P: {
kapp->processEvents(); //if auto-repeating, user won't otherwise see change in the listview
tdeApp->processEvents(); //if auto-repeating, user won't otherwise see change in the listview
activatePrev();
k->accept();
break;
@ -166,7 +166,7 @@ void DBListViewBase::reload( ReloadFlags flag )
//m_progress->progressBar()->setPercentageVisible(false);
//m_progress->progressBar()->setTotalSteps( m_totalSteps );
//m_progress->show();
//kapp->processEvents();
//tdeApp->processEvents();
//reset some things
clear();

@ -209,7 +209,7 @@ void RecipeListView::populate( TQListViewItem *item )
if ( m_progress_dlg ){
m_progress_dlg->progressBar()->advance(1);
kapp->processEvents();
tdeApp->processEvents();
}
StdCategoryListView::populate(item);

Loading…
Cancel
Save