summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 638abc9..5ebd3a4 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1889,133 +1889,135 @@ void KABCore::initActions()
1889 1889
1890 mActionCategories = new KAction( i18n( "Set Categories" ), 0, this, 1890 mActionCategories = new KAction( i18n( "Set Categories" ), 0, this,
1891 SLOT( setCategories() ), actionCollection(), 1891 SLOT( setCategories() ), actionCollection(),
1892 "edit_set_categories" ); 1892 "edit_set_categories" );
1893 1893
1894 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, 1894 mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this,
1895 SLOT( removeVoice() ), actionCollection(), 1895 SLOT( removeVoice() ), actionCollection(),
1896 "remove_voice" ); 1896 "remove_voice" );
1897 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, 1897 mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this,
1898 SLOT( importFromOL() ), actionCollection(), 1898 SLOT( importFromOL() ), actionCollection(),
1899 "import_OL" ); 1899 "import_OL" );
1900#ifdef KAB_EMBEDDED 1900#ifdef KAB_EMBEDDED
1901 mActionLicence = new KAction( i18n( "Licence" ), 0, 1901 mActionLicence = new KAction( i18n( "Licence" ), 0,
1902 this, SLOT( showLicence() ), actionCollection(), 1902 this, SLOT( showLicence() ), actionCollection(),
1903 "licence_about_data" ); 1903 "licence_about_data" );
1904 mActionFaq = new KAction( i18n( "Faq" ), 0, 1904 mActionFaq = new KAction( i18n( "Faq" ), 0,
1905 this, SLOT( faq() ), actionCollection(), 1905 this, SLOT( faq() ), actionCollection(),
1906 "faq_about_data" ); 1906 "faq_about_data" );
1907 mActionWN = new KAction( i18n( "What's New?" ), 0, 1907 mActionWN = new KAction( i18n( "What's New?" ), 0,
1908 this, SLOT( whatsnew() ), actionCollection(), 1908 this, SLOT( whatsnew() ), actionCollection(),
1909 "wn" ); 1909 "wn" );
1910 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, 1910 mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0,
1911 this, SLOT( synchowto() ), actionCollection(), 1911 this, SLOT( synchowto() ), actionCollection(),
1912 "sync" ); 1912 "sync" );
1913 1913
1914 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, 1914 mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0,
1915 this, SLOT( createAboutData() ), actionCollection(), 1915 this, SLOT( createAboutData() ), actionCollection(),
1916 "kaddressbook_about_data" ); 1916 "kaddressbook_about_data" );
1917#endif //KAB_EMBEDDED 1917#endif //KAB_EMBEDDED
1918 1918
1919 clipboardDataChanged(); 1919 clipboardDataChanged();
1920 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 1920 connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
1921 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); 1921 connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
1922} 1922}
1923 1923
1924//US we need this function, to plug all actions into the correct menues. 1924//US we need this function, to plug all actions into the correct menues.
1925// KDE uses a XML format to plug the actions, but we work her without this overhead. 1925// KDE uses a XML format to plug the actions, but we work her without this overhead.
1926void KABCore::addActionsManually() 1926void KABCore::addActionsManually()
1927{ 1927{
1928//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); 1928//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
1929 1929
1930#ifdef KAB_EMBEDDED 1930#ifdef KAB_EMBEDDED
1931 QPopupMenu *fileMenu = new QPopupMenu( this ); 1931 QPopupMenu *fileMenu = new QPopupMenu( this );
1932 QPopupMenu *editMenu = new QPopupMenu( this ); 1932 QPopupMenu *editMenu = new QPopupMenu( this );
1933 QPopupMenu *helpMenu = new QPopupMenu( this ); 1933 QPopupMenu *helpMenu = new QPopupMenu( this );
1934 1934
1935 KToolBar* tb = mMainWindow->toolBar(); 1935 KToolBar* tb = mMainWindow->toolBar();
1936 1936
1937 1937#ifndef DESKTOP_VERSION
1938 if ( KABPrefs::instance()->mFullMenuBarVisible ) { 1938 if ( KABPrefs::instance()->mFullMenuBarVisible ) {
1939#endif
1939 QMenuBar* mb = mMainWindow->menuBar(); 1940 QMenuBar* mb = mMainWindow->menuBar();
1940 1941
1941 //US setup menubar. 1942 //US setup menubar.
1942 //Disable the following block if you do not want to have a menubar. 1943 //Disable the following block if you do not want to have a menubar.
1943 mb->insertItem( "&File", fileMenu ); 1944 mb->insertItem( "&File", fileMenu );
1944 mb->insertItem( "&Edit", editMenu ); 1945 mb->insertItem( "&Edit", editMenu );
1945 mb->insertItem( "&View", viewMenu ); 1946 mb->insertItem( "&View", viewMenu );
1946 mb->insertItem( "&Settings", settingsMenu ); 1947 mb->insertItem( "&Settings", settingsMenu );
1947 mb->insertItem( i18n("Synchronize"), syncMenu ); 1948 mb->insertItem( i18n("Synchronize"), syncMenu );
1948 mb->insertItem( "&Change selected", changeMenu ); 1949 mb->insertItem( "&Change selected", changeMenu );
1949 mb->insertItem( "&Help", helpMenu ); 1950 mb->insertItem( "&Help", helpMenu );
1950 mIncSearchWidget = new IncSearchWidget( tb ); 1951 mIncSearchWidget = new IncSearchWidget( tb );
1951 // tb->insertWidget(-1, 0, mIncSearchWidget); 1952 // tb->insertWidget(-1, 0, mIncSearchWidget);
1952 1953#ifndef DESKTOP_VERSION
1953 } else { 1954 } else {
1954 //US setup toolbar 1955 //US setup toolbar
1955 QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); 1956 QPEMenuBar *menuBarTB = new QPEMenuBar( tb );
1956 QPopupMenu *popupBarTB = new QPopupMenu( this ); 1957 QPopupMenu *popupBarTB = new QPopupMenu( this );
1957 menuBarTB->insertItem( "ME", popupBarTB); 1958 menuBarTB->insertItem( "ME", popupBarTB);
1958 tb->insertWidget(-1, 0, menuBarTB); 1959 tb->insertWidget(-1, 0, menuBarTB);
1959 mIncSearchWidget = new IncSearchWidget( tb ); 1960 mIncSearchWidget = new IncSearchWidget( tb );
1960 1961
1961 tb->enableMoving(false); 1962 tb->enableMoving(false);
1962 popupBarTB->insertItem( "&File", fileMenu ); 1963 popupBarTB->insertItem( "&File", fileMenu );
1963 popupBarTB->insertItem( "&Edit", editMenu ); 1964 popupBarTB->insertItem( "&Edit", editMenu );
1964 popupBarTB->insertItem( "&View", viewMenu ); 1965 popupBarTB->insertItem( "&View", viewMenu );
1965 popupBarTB->insertItem( "&Settings", settingsMenu ); 1966 popupBarTB->insertItem( "&Settings", settingsMenu );
1966 popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); 1967 popupBarTB->insertItem( i18n("Synchronize"), syncMenu );
1967 mViewManager->getFilterAction()->plug ( popupBarTB); 1968 mViewManager->getFilterAction()->plug ( popupBarTB);
1968 popupBarTB->insertItem( "&Change selected", changeMenu ); 1969 popupBarTB->insertItem( "&Change selected", changeMenu );
1969 popupBarTB->insertItem( "&Help", helpMenu ); 1970 popupBarTB->insertItem( "&Help", helpMenu );
1970 if (QApplication::desktop()->width() > 320 ) { 1971 if (QApplication::desktop()->width() > 320 ) {
1971 // mViewManager->getFilterAction()->plug ( tb); 1972 // mViewManager->getFilterAction()->plug ( tb);
1972 } 1973 }
1973 } 1974 }
1975#endif
1974 // mActionQuit->plug ( mMainWindow->toolBar()); 1976 // mActionQuit->plug ( mMainWindow->toolBar());
1975 1977
1976 1978
1977 1979
1978 //US Now connect the actions with the menue entries. 1980 //US Now connect the actions with the menue entries.
1979 mActionPrint->plug( fileMenu ); 1981 mActionPrint->plug( fileMenu );
1980 mActionMail->plug( fileMenu ); 1982 mActionMail->plug( fileMenu );
1981 fileMenu->insertSeparator(); 1983 fileMenu->insertSeparator();
1982 1984
1983 mActionNewContact->plug( fileMenu ); 1985 mActionNewContact->plug( fileMenu );
1984 mActionNewContact->plug( tb ); 1986 mActionNewContact->plug( tb );
1985 1987
1986 mActionEditAddressee->plug( fileMenu ); 1988 mActionEditAddressee->plug( fileMenu );
1987 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || 1989 // if ((KGlobal::getDesktopSize() > KGlobal::Small ) ||
1988 // (!KABPrefs::instance()->mMultipleViewsAtOnce )) 1990 // (!KABPrefs::instance()->mMultipleViewsAtOnce ))
1989 mActionEditAddressee->plug( tb ); 1991 mActionEditAddressee->plug( tb );
1990 1992
1991 fileMenu->insertSeparator(); 1993 fileMenu->insertSeparator();
1992 mActionSave->plug( fileMenu ); 1994 mActionSave->plug( fileMenu );
1993 fileMenu->insertItem( "&Import", ImportMenu ); 1995 fileMenu->insertItem( "&Import", ImportMenu );
1994 fileMenu->insertItem( "&Export", ExportMenu ); 1996 fileMenu->insertItem( "&Export", ExportMenu );
1995 fileMenu->insertSeparator(); 1997 fileMenu->insertSeparator();
1996 mActionMailVCard->plug( fileMenu ); 1998 mActionMailVCard->plug( fileMenu );
1997#ifndef DESKTOP_VERSION 1999#ifndef DESKTOP_VERSION
1998 if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu ); 2000 if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu );
1999 if ( Ir::supported() ) mActionBeam->plug(fileMenu ); 2001 if ( Ir::supported() ) mActionBeam->plug(fileMenu );
2000#endif 2002#endif
2001 fileMenu->insertSeparator(); 2003 fileMenu->insertSeparator();
2002 mActionQuit->plug( fileMenu ); 2004 mActionQuit->plug( fileMenu );
2003#ifdef _WIN32_ 2005#ifdef _WIN32_
2004 mActionImportOL->plug( ImportMenu ); 2006 mActionImportOL->plug( ImportMenu );
2005#endif 2007#endif
2006 // edit menu 2008 // edit menu
2007 mActionUndo->plug( editMenu ); 2009 mActionUndo->plug( editMenu );
2008 mActionRedo->plug( editMenu ); 2010 mActionRedo->plug( editMenu );
2009 editMenu->insertSeparator(); 2011 editMenu->insertSeparator();
2010 mActionCut->plug( editMenu ); 2012 mActionCut->plug( editMenu );
2011 mActionCopy->plug( editMenu ); 2013 mActionCopy->plug( editMenu );
2012 mActionPaste->plug( editMenu ); 2014 mActionPaste->plug( editMenu );
2013 mActionDelete->plug( editMenu ); 2015 mActionDelete->plug( editMenu );
2014 editMenu->insertSeparator(); 2016 editMenu->insertSeparator();
2015 mActionSelectAll->plug( editMenu ); 2017 mActionSelectAll->plug( editMenu );
2016 2018
2017 mActionRemoveVoice->plug( changeMenu ); 2019 mActionRemoveVoice->plug( changeMenu );
2018 // settings menu 2020 // settings menu
2019//US special menuentry to configure the addressbook resources. On KDE 2021//US special menuentry to configure the addressbook resources. On KDE
2020// you do that through the control center !!! 2022// you do that through the control center !!!
2021 mActionConfigResources->plug( settingsMenu ); 2023 mActionConfigResources->plug( settingsMenu );