diff options
Diffstat (limited to 'src/entrywidget.cpp')
-rw-r--r-- | src/entrywidget.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/entrywidget.cpp b/src/entrywidget.cpp index 7a7aadd..607caab 100644 --- a/src/entrywidget.cpp +++ b/src/entrywidget.cpp @@ -62,7 +62,7 @@ namespace KBibTeX { TQDialog::DialogCode EntryWidget::execute( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, TQWidget *parent, const char *name ) { - EntryWidgetDialog *dlg = new EntryWidgetDialog( parent, name, TRUE, i18n( "Edit BibTeX Entry" ), KDialogBase::Ok | KDialogBase::Cancel ); + EntryWidgetDialog *dlg = new EntryWidgetDialog( parent, name, true, i18n( "Edit BibTeX Entry" ), KDialogBase::Ok | KDialogBase::Cancel ); EntryWidget *entryWidget = new EntryWidget( entry, bibtexfile, isReadOnly, isNew, dlg, "entryWidget" ); dlg->setMainWidget( entryWidget ); @@ -77,7 +77,7 @@ namespace KBibTeX EntryWidget::EntryWidget( BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, TQDialog *parent, const char *name ) : TQWidget( parent, name ), m_originalEntry( NULL ), m_bibtexfile( bibtexfile ), m_isReadOnly( isReadOnly ), m_isNew( isNew ), m_lastPage( NULL ), m_dlgParent( parent ), m_wqa( new WebQueryArXiv( NULL ) ) { - setupGUI( parent, FALSE ); + setupGUI( parent, false ); Settings * settings = Settings::self(); m_checkBoxEnableAll->setChecked( settings->editing_EnableAllFields ); @@ -199,12 +199,12 @@ namespace KBibTeX m_pushButtonForceDefaultIdSuggestion->setOn( m_defaultIdSuggestionAvailable && settings->idSuggestions_forceDefault && m_isNew ); m_pushButtonForceDefaultIdSuggestion->setEnabled( !m_isReadOnly && m_defaultIdSuggestionAvailable ); - bool foundEntryType = FALSE; + bool foundEntryType = false; for ( int i = 0; !foundEntryType && i < m_comboBoxEntryType->count(); i++ ) if (( BibTeX::Entry::EntryType ) i + BibTeX::Entry::etArticle == entry->entryType() ) { m_comboBoxEntryType->setCurrentItem( i ); - foundEntryType = TRUE; + foundEntryType = true; } if ( !foundEntryType ) m_comboBoxEntryType->setCurrentText( entry->entryTypeString() ); @@ -217,7 +217,7 @@ namespace KBibTeX void EntryWidget::slotForceDefaultIdSuggestion() { - m_isNew = FALSE; + m_isNew = false; m_lineEditID->setEnabled( !m_pushButtonForceDefaultIdSuggestion->isOn() ); m_pushButtonIdSuggestions->setEnabled( !m_pushButtonForceDefaultIdSuggestion->isOn() && !m_isReadOnly ); updateWarnings(); @@ -241,10 +241,10 @@ namespace KBibTeX ( *it ) ->apply( &temporaryEntry ); m_sourcePage->reset( &temporaryEntry ); - m_comboBoxEntryType->setEnabled( FALSE ); - m_lineEditID->setEnabled( FALSE ); - m_pushButtonIdSuggestions->setEnabled( FALSE ); - m_pushButtonForceDefaultIdSuggestion->setEnabled( FALSE ); + m_comboBoxEntryType->setEnabled( false ); + m_lineEditID->setEnabled( false ); + m_pushButtonIdSuggestions->setEnabled( false ); + m_pushButtonForceDefaultIdSuggestion->setEnabled( false ); } else if ( m_lastPage == m_sourcePage ) { @@ -276,7 +276,7 @@ namespace KBibTeX updateWarnings(); } - m_comboBoxEntryType->setEnabled( TRUE ); + m_comboBoxEntryType->setEnabled( true ); m_lineEditID->setEnabled( !m_defaultIdSuggestionAvailable || !m_pushButtonForceDefaultIdSuggestion->isOn() ); m_pushButtonIdSuggestions->setEnabled(( !m_defaultIdSuggestionAvailable || !m_pushButtonForceDefaultIdSuggestion->isOn() ) && !m_isReadOnly ); m_pushButtonForceDefaultIdSuggestion->setEnabled( !m_isReadOnly && m_defaultIdSuggestionAvailable ); @@ -313,7 +313,7 @@ namespace KBibTeX // in the top row on the left, put an entry type label and combobox TQLabel *label = new TQLabel( i18n( "E&ntry Type:" ), this ); layout->addWidget( label, 0, 0 ); - m_comboBoxEntryType = new TQComboBox( TRUE, this, "m_comboBoxEntryType" ); + m_comboBoxEntryType = new TQComboBox( true, this, "m_comboBoxEntryType" ); label->setBuddy( m_comboBoxEntryType ); m_comboBoxEntryType->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed ); m_comboBoxEntryType->setEnabled( !m_isReadOnly ); @@ -336,7 +336,7 @@ namespace KBibTeX layout->addWidget( m_pushButtonIdSuggestions, 0, 4 ); m_pushButtonForceDefaultIdSuggestion = new TQPushButton( TQIconSet( BarIcon( "favorites" ) ), "", this, "m_pushButtonForceDefaultIdSuggestion" ); - m_pushButtonForceDefaultIdSuggestion->setToggleButton( TRUE ); + m_pushButtonForceDefaultIdSuggestion->setToggleButton( true ); layout->addWidget( m_pushButtonForceDefaultIdSuggestion, 0, 5 ); TQToolTip::add( m_pushButtonForceDefaultIdSuggestion, i18n( "Use the default id suggestion to set the entry id" ) ); TQWhatsThis::add( m_pushButtonForceDefaultIdSuggestion, i18n( "Use the default id suggestion to set the entry id.\nYou can edit and select the default id suggestion in the configuration dialog." ) ); @@ -534,7 +534,7 @@ namespace KBibTeX m_idToSuggestion.insert( m_menuIdSuggestions->insertItem( *it ), *it ); if ( m_idToSuggestion.count() == 0 ) - m_menuIdSuggestions->setItemEnabled( m_menuIdSuggestions->insertItem( i18n( "No suggestions available" ) ), FALSE ); + m_menuIdSuggestions->setItemEnabled( m_menuIdSuggestions->insertItem( i18n( "No suggestions available" ) ), false ); } void EntryWidget::insertIdSuggestion( int id ) |