summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 68d3d2d..8d08713 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -993,385 +993,385 @@ QString KABCore::getNameByPhone( const QString &phone )
993 return ownerName; 993 return ownerName;
994#else //KAB_EMBEDDED 994#else //KAB_EMBEDDED
995 qDebug("KABCore::getNameByPhone finsih method"); 995 qDebug("KABCore::getNameByPhone finsih method");
996 return ""; 996 return "";
997#endif //KAB_EMBEDDED 997#endif //KAB_EMBEDDED
998 998
999} 999}
1000 1000
1001void KABCore::openConfigDialog() 1001void KABCore::openConfigDialog()
1002{ 1002{
1003 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true ); 1003 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true );
1004 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" ); 1004 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" );
1005 ConfigureDialog->addModule(kabcfg ); 1005 ConfigureDialog->addModule(kabcfg );
1006 connect( ConfigureDialog, SIGNAL( applyClicked() ), 1006 connect( ConfigureDialog, SIGNAL( applyClicked() ),
1007 this, SLOT( configurationChanged() ) ); 1007 this, SLOT( configurationChanged() ) );
1008 connect( ConfigureDialog, SIGNAL( okClicked() ), 1008 connect( ConfigureDialog, SIGNAL( okClicked() ),
1009 this, SLOT( configurationChanged() ) ); 1009 this, SLOT( configurationChanged() ) );
1010 saveSettings(); 1010 saveSettings();
1011 ConfigureDialog->showMaximized(); 1011 ConfigureDialog->showMaximized();
1012 if ( ConfigureDialog->exec() ) 1012 if ( ConfigureDialog->exec() )
1013 KMessageBox::information( this, i18n("If you configured \nExtensions,\nplease restart!\n") ); 1013 KMessageBox::information( this, i18n("If you configured \nExtensions,\nplease restart!\n") );
1014 delete ConfigureDialog; 1014 delete ConfigureDialog;
1015} 1015}
1016 1016
1017void KABCore::openLDAPDialog() 1017void KABCore::openLDAPDialog()
1018{ 1018{
1019#ifndef KAB_EMBEDDED 1019#ifndef KAB_EMBEDDED
1020 if ( !mLdapSearchDialog ) { 1020 if ( !mLdapSearchDialog ) {
1021 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this ); 1021 mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this );
1022 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager, 1022 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), mViewManager,
1023 SLOT( refreshView() ) ); 1023 SLOT( refreshView() ) );
1024 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this, 1024 connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), this,
1025 SLOT( setModified() ) ); 1025 SLOT( setModified() ) );
1026 } else 1026 } else
1027 mLdapSearchDialog->restoreSettings(); 1027 mLdapSearchDialog->restoreSettings();
1028 1028
1029 if ( mLdapSearchDialog->isOK() ) 1029 if ( mLdapSearchDialog->isOK() )
1030 mLdapSearchDialog->exec(); 1030 mLdapSearchDialog->exec();
1031#else //KAB_EMBEDDED 1031#else //KAB_EMBEDDED
1032 qDebug("KABCore::openLDAPDialog() finsih method"); 1032 qDebug("KABCore::openLDAPDialog() finsih method");
1033#endif //KAB_EMBEDDED 1033#endif //KAB_EMBEDDED
1034} 1034}
1035 1035
1036void KABCore::print() 1036void KABCore::print()
1037{ 1037{
1038#ifndef KAB_EMBEDDED 1038#ifndef KAB_EMBEDDED
1039 KPrinter printer; 1039 KPrinter printer;
1040 if ( !printer.setup( this ) ) 1040 if ( !printer.setup( this ) )
1041 return; 1041 return;
1042 1042
1043 KABPrinting::PrintingWizard wizard( &printer, mAddressBook, 1043 KABPrinting::PrintingWizard wizard( &printer, mAddressBook,
1044 mViewManager->selectedUids(), this ); 1044 mViewManager->selectedUids(), this );
1045 1045
1046 wizard.exec(); 1046 wizard.exec();
1047#else //KAB_EMBEDDED 1047#else //KAB_EMBEDDED
1048 qDebug("KABCore::print() finsih method"); 1048 qDebug("KABCore::print() finsih method");
1049#endif //KAB_EMBEDDED 1049#endif //KAB_EMBEDDED
1050 1050
1051} 1051}
1052 1052
1053 1053
1054void KABCore::addGUIClient( KXMLGUIClient *client ) 1054void KABCore::addGUIClient( KXMLGUIClient *client )
1055{ 1055{
1056 if ( mGUIClient ) 1056 if ( mGUIClient )
1057 mGUIClient->insertChildClient( client ); 1057 mGUIClient->insertChildClient( client );
1058 else 1058 else
1059 KMessageBox::error( this, "no KXMLGUICLient"); 1059 KMessageBox::error( this, "no KXMLGUICLient");
1060} 1060}
1061 1061
1062 1062
1063void KABCore::configurationChanged() 1063void KABCore::configurationChanged()
1064{ 1064{
1065 mExtensionManager->reconfigure(); 1065 mExtensionManager->reconfigure();
1066} 1066}
1067 1067
1068void KABCore::addressBookChanged() 1068void KABCore::addressBookChanged()
1069{ 1069{
1070#ifndef KAB_EMBEDDED 1070#ifndef KAB_EMBEDDED
1071 QDictIterator<AddresseeEditorDialog> it( mEditorDict ); 1071 QDictIterator<AddresseeEditorDialog> it( mEditorDict );
1072 while ( it.current() ) { 1072 while ( it.current() ) {
1073 if ( it.current()->dirty() ) { 1073 if ( it.current()->dirty() ) {
1074 QString text = i18n( "Data has been changed externally. Unsaved " 1074 QString text = i18n( "Data has been changed externally. Unsaved "
1075 "changes will be lost." ); 1075 "changes will be lost." );
1076 KMessageBox::information( this, text ); 1076 KMessageBox::information( this, text );
1077 } 1077 }
1078 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) ); 1078 it.current()->setAddressee( mAddressBook->findByUid( it.currentKey() ) );
1079 ++it; 1079 ++it;
1080 } 1080 }
1081 1081
1082 mViewManager->refreshView(); 1082 mViewManager->refreshView();
1083#else //KAB_EMBEDDED 1083#else //KAB_EMBEDDED
1084 qDebug("KABCore::addressBookChanged() finsih method"); 1084 qDebug("KABCore::addressBookChanged() finsih method");
1085#endif //KAB_EMBEDDED 1085#endif //KAB_EMBEDDED
1086} 1086}
1087 1087
1088AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, 1088AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent,
1089 const char *name ) 1089 const char *name )
1090{ 1090{
1091 AddresseeEditorDialog *dialog = new AddresseeEditorDialog( this, parent, 1091 AddresseeEditorDialog *dialog = new AddresseeEditorDialog( this, parent,
1092 name ? name : "editorDialog" ); 1092 name ? name : "editorDialog" );
1093 1093
1094//US 1094//US
1095 dialog->setMaximumSize( 640, 480 ); 1095 dialog->setMaximumSize( 640, 480 );
1096 dialog->showMaximized(); 1096 dialog->showMaximized();
1097 1097
1098 connect( dialog, SIGNAL( contactModified( const KABC::Addressee& ) ), 1098 connect( dialog, SIGNAL( contactModified( const KABC::Addressee& ) ),
1099 SLOT( contactModified( const KABC::Addressee& ) ) ); 1099 SLOT( contactModified( const KABC::Addressee& ) ) );
1100 connect( dialog, SIGNAL( editorDestroyed( const QString& ) ), 1100 connect( dialog, SIGNAL( editorDestroyed( const QString& ) ),
1101 SLOT( slotEditorDestroyed( const QString& ) ) ); 1101 SLOT( slotEditorDestroyed( const QString& ) ) );
1102 1102
1103 return dialog; 1103 return dialog;
1104} 1104}
1105 1105
1106void KABCore::slotEditorDestroyed( const QString &uid ) 1106void KABCore::slotEditorDestroyed( const QString &uid )
1107{ 1107{
1108 mEditorDict.remove( uid ); 1108 mEditorDict.remove( uid );
1109} 1109}
1110 1110
1111void KABCore::initGUI() 1111void KABCore::initGUI()
1112{ 1112{
1113#ifndef KAB_EMBEDDED 1113#ifndef KAB_EMBEDDED
1114 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1114 QHBoxLayout *topLayout = new QHBoxLayout( this );
1115 topLayout->setSpacing( KDialogBase::spacingHint() ); 1115 topLayout->setSpacing( KDialogBase::spacingHint() );
1116 1116
1117 mExtensionBarSplitter = new QSplitter( this ); 1117 mExtensionBarSplitter = new QSplitter( this );
1118 mExtensionBarSplitter->setOrientation( Qt::Vertical ); 1118 mExtensionBarSplitter->setOrientation( Qt::Vertical );
1119 1119
1120 mDetailsSplitter = new QSplitter( mExtensionBarSplitter ); 1120 mDetailsSplitter = new QSplitter( mExtensionBarSplitter );
1121 1121
1122 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1122 QVBox *viewSpace = new QVBox( mDetailsSplitter );
1123 mIncSearchWidget = new IncSearchWidget( viewSpace ); 1123 mIncSearchWidget = new IncSearchWidget( viewSpace );
1124 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1124 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1125 SLOT( incrementalSearch( const QString& ) ) ); 1125 SLOT( incrementalSearch( const QString& ) ) );
1126 1126
1127 mViewManager = new ViewManager( this, viewSpace ); 1127 mViewManager = new ViewManager( this, viewSpace );
1128 viewSpace->setStretchFactor( mViewManager, 1 ); 1128 viewSpace->setStretchFactor( mViewManager, 1 );
1129 1129
1130 mDetails = new ViewContainer( mDetailsSplitter ); 1130 mDetails = new ViewContainer( mDetailsSplitter );
1131 1131
1132 mJumpButtonBar = new JumpButtonBar( this, this ); 1132 mJumpButtonBar = new JumpButtonBar( this, this );
1133 1133
1134 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1134 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1135 1135
1136 topLayout->addWidget( mExtensionBarSplitter ); 1136 topLayout->addWidget( mExtensionBarSplitter );
1137 topLayout->setStretchFactor( mExtensionBarSplitter, 100 ); 1137 topLayout->setStretchFactor( mExtensionBarSplitter, 100 );
1138 topLayout->addWidget( mJumpButtonBar ); 1138 topLayout->addWidget( mJumpButtonBar );
1139 topLayout->setStretchFactor( mJumpButtonBar, 1 ); 1139 topLayout->setStretchFactor( mJumpButtonBar, 1 );
1140 1140
1141 mXXPortManager = new XXPortManager( this, this ); 1141 mXXPortManager = new XXPortManager( this, this );
1142 1142
1143#else //KAB_EMBEDDED 1143#else //KAB_EMBEDDED
1144 //US initialize viewMenu before settingup viewmanager. 1144 //US initialize viewMenu before settingup viewmanager.
1145 // Viewmanager needs this menu to plugin submenues. 1145 // Viewmanager needs this menu to plugin submenues.
1146 viewMenu = new QPopupMenu( this ); 1146 viewMenu = new QPopupMenu( this );
1147 settingsMenu = new QPopupMenu( this ); 1147 settingsMenu = new QPopupMenu( this );
1148 //filterMenu = new QPopupMenu( this ); 1148 //filterMenu = new QPopupMenu( this );
1149 ImportMenu = new QPopupMenu( this ); 1149 ImportMenu = new QPopupMenu( this );
1150 ExportMenu = new QPopupMenu( this ); 1150 ExportMenu = new QPopupMenu( this );
1151 1151
1152 1152
1153//US since we have no splitter for the embedded system, setup 1153//US since we have no splitter for the embedded system, setup
1154// a layout with two frames. One left and one right. 1154// a layout with two frames. One left and one right.
1155 1155
1156 QBoxLayout *topLayout; 1156 QBoxLayout *topLayout;
1157 1157
1158 // = new QHBoxLayout( this ); 1158 // = new QHBoxLayout( this );
1159// QBoxLayout *topLayout = (QBoxLayout*)layout(); 1159// QBoxLayout *topLayout = (QBoxLayout*)layout();
1160 1160
1161// QWidget *mainBox = new QWidget( this ); 1161// QWidget *mainBox = new QWidget( this );
1162// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox); 1162// QBoxLayout * mainBoxLayout = new QHBoxLayout(mainBox);
1163 1163
1164#ifdef DESKTOP_VERSION 1164#ifdef DESKTOP_VERSION
1165 topLayout = new QHBoxLayout( this ); 1165 topLayout = new QHBoxLayout( this );
1166 1166
1167 1167
1168 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1168 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1169 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1169 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1170 1170
1171 topLayout->addWidget(mMiniSplitter ); 1171 topLayout->addWidget(mMiniSplitter );
1172 1172
1173 mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter ); 1173 mExtensionBarSplitter = new KDGanttMinimizeSplitter( Qt::Vertical,mMiniSplitter );
1174 mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1174 mExtensionBarSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1175 mViewManager = new ViewManager( this, mExtensionBarSplitter ); 1175 mViewManager = new ViewManager( this, mExtensionBarSplitter );
1176 mDetails = new ViewContainer( mMiniSplitter ); 1176 mDetails = new ViewContainer( mMiniSplitter );
1177 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter ); 1177 mExtensionManager = new ExtensionManager( this, mExtensionBarSplitter );
1178#else 1178#else
1179 if ( QApplication::desktop()->width() > 480 ) { 1179 if ( QApplication::desktop()->width() > 480 ) {
1180 topLayout = new QHBoxLayout( this ); 1180 topLayout = new QHBoxLayout( this );
1181 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 1181 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
1182 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 1182 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
1183 } else { 1183 } else {
1184 1184
1185 topLayout = new QVBoxLayout( this ); 1185 topLayout = new QHBoxLayout( this );
1186 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this); 1186 mMiniSplitter = new KDGanttMinimizeSplitter( Qt::Vertical, this);
1187 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down ); 1187 mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Down );
1188 } 1188 }
1189 1189
1190 topLayout->addWidget(mMiniSplitter ); 1190 topLayout->addWidget(mMiniSplitter );
1191 mViewManager = new ViewManager( this, mMiniSplitter ); 1191 mViewManager = new ViewManager( this, mMiniSplitter );
1192 mDetails = new ViewContainer( mMiniSplitter ); 1192 mDetails = new ViewContainer( mMiniSplitter );
1193 1193
1194 1194
1195 mExtensionManager = new ExtensionManager( this, mMiniSplitter ); 1195 mExtensionManager = new ExtensionManager( this, mMiniSplitter );
1196#endif 1196#endif
1197 //eh->hide(); 1197 //eh->hide();
1198 // topLayout->addWidget(mExtensionManager ); 1198 // topLayout->addWidget(mExtensionManager );
1199 1199
1200 1200
1201/*US 1201/*US
1202#ifndef KAB_NOSPLITTER 1202#ifndef KAB_NOSPLITTER
1203 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1203 QHBoxLayout *topLayout = new QHBoxLayout( this );
1204//US topLayout->setSpacing( KDialogBase::spacingHint() ); 1204//US topLayout->setSpacing( KDialogBase::spacingHint() );
1205 topLayout->setSpacing( 10 ); 1205 topLayout->setSpacing( 10 );
1206 1206
1207 mDetailsSplitter = new QSplitter( this ); 1207 mDetailsSplitter = new QSplitter( this );
1208 1208
1209 QVBox *viewSpace = new QVBox( mDetailsSplitter ); 1209 QVBox *viewSpace = new QVBox( mDetailsSplitter );
1210 1210
1211 mViewManager = new ViewManager( this, viewSpace ); 1211 mViewManager = new ViewManager( this, viewSpace );
1212 viewSpace->setStretchFactor( mViewManager, 1 ); 1212 viewSpace->setStretchFactor( mViewManager, 1 );
1213 1213
1214 mDetails = new ViewContainer( mDetailsSplitter ); 1214 mDetails = new ViewContainer( mDetailsSplitter );
1215 1215
1216 topLayout->addWidget( mDetailsSplitter ); 1216 topLayout->addWidget( mDetailsSplitter );
1217 topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1217 topLayout->setStretchFactor( mDetailsSplitter, 100 );
1218#else //KAB_NOSPLITTER 1218#else //KAB_NOSPLITTER
1219 QHBoxLayout *topLayout = new QHBoxLayout( this ); 1219 QHBoxLayout *topLayout = new QHBoxLayout( this );
1220//US topLayout->setSpacing( KDialogBase::spacingHint() ); 1220//US topLayout->setSpacing( KDialogBase::spacingHint() );
1221 topLayout->setSpacing( 10 ); 1221 topLayout->setSpacing( 10 );
1222 1222
1223// mDetailsSplitter = new QSplitter( this ); 1223// mDetailsSplitter = new QSplitter( this );
1224 1224
1225 QVBox *viewSpace = new QVBox( this ); 1225 QVBox *viewSpace = new QVBox( this );
1226 1226
1227 mViewManager = new ViewManager( this, viewSpace ); 1227 mViewManager = new ViewManager( this, viewSpace );
1228 viewSpace->setStretchFactor( mViewManager, 1 ); 1228 viewSpace->setStretchFactor( mViewManager, 1 );
1229 1229
1230 mDetails = new ViewContainer( this ); 1230 mDetails = new ViewContainer( this );
1231 1231
1232 topLayout->addWidget( viewSpace ); 1232 topLayout->addWidget( viewSpace );
1233// topLayout->setStretchFactor( mDetailsSplitter, 100 ); 1233// topLayout->setStretchFactor( mDetailsSplitter, 100 );
1234 topLayout->addWidget( mDetails ); 1234 topLayout->addWidget( mDetails );
1235#endif //KAB_NOSPLITTER 1235#endif //KAB_NOSPLITTER
1236*/ 1236*/
1237 1237
1238 1238
1239#endif //KAB_EMBEDDED 1239#endif //KAB_EMBEDDED
1240 initActions(); 1240 initActions();
1241 1241
1242#ifdef KAB_EMBEDDED 1242#ifdef KAB_EMBEDDED
1243 addActionsManually(); 1243 addActionsManually();
1244 //US make sure the export and import menues are initialized before creating the xxPortManager. 1244 //US make sure the export and import menues are initialized before creating the xxPortManager.
1245 mXXPortManager = new XXPortManager( this, this ); 1245 mXXPortManager = new XXPortManager( this, this );
1246 1246
1247 // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); 1247 // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() );
1248 //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); 1248 //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget);
1249 // mActionQuit->plug ( mMainWindow->toolBar()); 1249 // mActionQuit->plug ( mMainWindow->toolBar());
1250 //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); 1250 //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() );
1251 //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); 1251 //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget);
1252 // mIncSearchWidget->hide(); 1252 // mIncSearchWidget->hide();
1253 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), 1253 connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ),
1254 SLOT( incrementalSearch( const QString& ) ) ); 1254 SLOT( incrementalSearch( const QString& ) ) );
1255 1255
1256 1256
1257 mJumpButtonBar = new JumpButtonBar( this, this ); 1257 mJumpButtonBar = new JumpButtonBar( this, this );
1258 1258
1259 topLayout->addWidget( mJumpButtonBar ); 1259 topLayout->addWidget( mJumpButtonBar );
1260//US topLayout->setStretchFactor( mJumpButtonBar, 10 ); 1260//US topLayout->setStretchFactor( mJumpButtonBar, 10 );
1261 1261
1262// mMainWindow->getIconToolBar()->raise(); 1262// mMainWindow->getIconToolBar()->raise();
1263 1263
1264#endif //KAB_EMBEDDED 1264#endif //KAB_EMBEDDED
1265 1265
1266} 1266}
1267void KABCore::initActions() 1267void KABCore::initActions()
1268{ 1268{
1269//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 1269//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
1270 1270
1271#ifndef KAB_EMBEDDED 1271#ifndef KAB_EMBEDDED
1272 connect( QApplication::clipboard(), SIGNAL( dataChanged() ), 1272 connect( QApplication::clipboard(), SIGNAL( dataChanged() ),
1273 SLOT( clipboardDataChanged() ) ); 1273 SLOT( clipboardDataChanged() ) );
1274#endif //KAB_EMBEDDED 1274#endif //KAB_EMBEDDED
1275 1275
1276 // file menu 1276 // file menu
1277 if ( mIsPart ) { 1277 if ( mIsPart ) {
1278 mActionMail = new KAction( i18n( "&Mail" ), "mail_generic", 0, this, 1278 mActionMail = new KAction( i18n( "&Mail" ), "mail_generic", 0, this,
1279 SLOT( sendMail() ), actionCollection(), 1279 SLOT( sendMail() ), actionCollection(),
1280 "kaddressbook_mail" ); 1280 "kaddressbook_mail" );
1281 mActionPrint = new KAction( i18n( "&Print" ), "fileprint", CTRL + Key_P, this, 1281 mActionPrint = new KAction( i18n( "&Print" ), "fileprint", CTRL + Key_P, this,
1282 SLOT( print() ), actionCollection(), "kaddressbook_print" ); 1282 SLOT( print() ), actionCollection(), "kaddressbook_print" );
1283 1283
1284 } else { 1284 } else {
1285 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); 1285 mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() );
1286 mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); 1286 mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() );
1287 } 1287 }
1288 1288
1289 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, 1289 mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this,
1290 SLOT( save() ), actionCollection(), "file_sync" ); 1290 SLOT( save() ), actionCollection(), "file_sync" );
1291 1291
1292 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, 1292 mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this,
1293 SLOT( newContact() ), actionCollection(), "file_new_contact" ); 1293 SLOT( newContact() ), actionCollection(), "file_new_contact" );
1294 1294
1295 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, 1295 mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0,
1296 this, SLOT( mailVCard() ), 1296 this, SLOT( mailVCard() ),
1297 actionCollection(), "file_mail_vcard"); 1297 actionCollection(), "file_mail_vcard");
1298 1298
1299 mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, 1299 mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0,
1300 this, SLOT( editContact2() ), 1300 this, SLOT( editContact2() ),
1301 actionCollection(), "file_properties" ); 1301 actionCollection(), "file_properties" );
1302 1302
1303#ifdef KAB_EMBEDDED 1303#ifdef KAB_EMBEDDED
1304 // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); 1304 // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() );
1305 mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, 1305 mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0,
1306 mMainWindow, SLOT( exit() ), 1306 mMainWindow, SLOT( exit() ),
1307 actionCollection(), "quit" ); 1307 actionCollection(), "quit" );
1308#endif //KAB_EMBEDDED 1308#endif //KAB_EMBEDDED
1309 1309
1310 // edit menu 1310 // edit menu
1311 if ( mIsPart ) { 1311 if ( mIsPart ) {
1312 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, 1312 mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this,
1313 SLOT( copyContacts() ), actionCollection(), 1313 SLOT( copyContacts() ), actionCollection(),
1314 "kaddressbook_copy" ); 1314 "kaddressbook_copy" );
1315 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, 1315 mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this,
1316 SLOT( cutContacts() ), actionCollection(), 1316 SLOT( cutContacts() ), actionCollection(),
1317 "kaddressbook_cut" ); 1317 "kaddressbook_cut" );
1318 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, 1318 mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this,
1319 SLOT( pasteContacts() ), actionCollection(), 1319 SLOT( pasteContacts() ), actionCollection(),
1320 "kaddressbook_paste" ); 1320 "kaddressbook_paste" );
1321 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, 1321 mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this,
1322 SLOT( selectAllContacts() ), actionCollection(), 1322 SLOT( selectAllContacts() ), actionCollection(),
1323 "kaddressbook_select_all" ); 1323 "kaddressbook_select_all" );
1324 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, 1324 mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this,
1325 SLOT( undo() ), actionCollection(), 1325 SLOT( undo() ), actionCollection(),
1326 "kaddressbook_undo" ); 1326 "kaddressbook_undo" );
1327 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, 1327 mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z,
1328 this, SLOT( redo() ), actionCollection(), 1328 this, SLOT( redo() ), actionCollection(),
1329 "kaddressbook_redo" ); 1329 "kaddressbook_redo" );
1330 } else { 1330 } else {
1331 mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); 1331 mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() );
1332 mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); 1332 mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() );
1333 mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); 1333 mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() );
1334 mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); 1334 mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() );
1335 mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); 1335 mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() );
1336 mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); 1336 mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() );
1337 } 1337 }
1338 1338
1339 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", 1339 mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete",
1340 Key_Delete, this, SLOT( deleteContacts() ), 1340 Key_Delete, this, SLOT( deleteContacts() ),
1341 actionCollection(), "edit_delete" ); 1341 actionCollection(), "edit_delete" );
1342 1342
1343 mActionUndo->setEnabled( false ); 1343 mActionUndo->setEnabled( false );
1344 mActionRedo->setEnabled( false ); 1344 mActionRedo->setEnabled( false );
1345 1345
1346 // settings menu 1346 // settings menu
1347#ifdef KAB_EMBEDDED 1347#ifdef KAB_EMBEDDED
1348//US special menuentry to configure the addressbook resources. On KDE 1348//US special menuentry to configure the addressbook resources. On KDE
1349// you do that through the control center !!! 1349// you do that through the control center !!!
1350 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, 1350 mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this,
1351 SLOT( configureResources() ), actionCollection(), 1351 SLOT( configureResources() ), actionCollection(),
1352 "kaddressbook_configure_resources" ); 1352 "kaddressbook_configure_resources" );
1353#endif //KAB_EMBEDDED 1353#endif //KAB_EMBEDDED
1354 1354
1355 if ( mIsPart ) { 1355 if ( mIsPart ) {
1356 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, 1356 mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this,
1357 SLOT( openConfigDialog() ), actionCollection(), 1357 SLOT( openConfigDialog() ), actionCollection(),
1358 "kaddressbook_configure" ); 1358 "kaddressbook_configure" );
1359 1359
1360 mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, 1360 mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0,
1361 this, SLOT( configureKeyBindings() ), actionCollection(), 1361 this, SLOT( configureKeyBindings() ), actionCollection(),
1362 "kaddressbook_configure_shortcuts" ); 1362 "kaddressbook_configure_shortcuts" );
1363#ifdef KAB_EMBEDDED 1363#ifdef KAB_EMBEDDED
1364 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() ); 1364 mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() );
1365 mActionConfigureToolbars->setEnabled( false ); 1365 mActionConfigureToolbars->setEnabled( false );
1366#endif //KAB_EMBEDDED 1366#endif //KAB_EMBEDDED
1367 1367
1368 } else { 1368 } else {
1369 mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() ); 1369 mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() );
1370 1370
1371 mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() ); 1371 mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() );
1372 } 1372 }
1373 1373
1374 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, 1374 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0,
1375 actionCollection(), "options_show_jump_bar" ); 1375 actionCollection(), "options_show_jump_bar" );
1376 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBarVisible( bool ) ) ); 1376 connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBarVisible( bool ) ) );
1377 1377