author | zautrix <zautrix> | 2004-09-15 07:09:02 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-15 07:09:02 (UTC) |
commit | 540bbf4ded9f06df9a56e74f48bb606fb43f05d7 (patch) (unidiff) | |
tree | 6d9e57d33eb732c990fceb794c8c88f70fd764f1 | |
parent | 29059299ec9c8705de675b8f70d11c810e4e22a7 (diff) | |
download | kdepimpi-540bbf4ded9f06df9a56e74f48bb606fb43f05d7.zip kdepimpi-540bbf4ded9f06df9a56e74f48bb606fb43f05d7.tar.gz kdepimpi-540bbf4ded9f06df9a56e74f48bb606fb43f05d7.tar.bz2 |
Fix of the emport menu
-rw-r--r-- | kaddressbook/kabcore.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index f0a49f8..013e243 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -1706,193 +1706,193 @@ void KABCore::initActions() | |||
1706 | 1706 | ||
1707 | mActionCategories = new KAction( i18n( "Set Categories" ), 0, this, | 1707 | mActionCategories = new KAction( i18n( "Set Categories" ), 0, this, |
1708 | SLOT( setCategories() ), actionCollection(), | 1708 | SLOT( setCategories() ), actionCollection(), |
1709 | "edit_set_categories" ); | 1709 | "edit_set_categories" ); |
1710 | 1710 | ||
1711 | mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, | 1711 | mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, |
1712 | SLOT( removeVoice() ), actionCollection(), | 1712 | SLOT( removeVoice() ), actionCollection(), |
1713 | "remove_voice" ); | 1713 | "remove_voice" ); |
1714 | mActionImportOL = new KAction( i18n( "Import from OL..." ), 0, this, | 1714 | mActionImportOL = new KAction( i18n( "Import from OL..." ), 0, this, |
1715 | SLOT( importFromOL() ), actionCollection(), | 1715 | SLOT( importFromOL() ), actionCollection(), |
1716 | "import_OL" ); | 1716 | "import_OL" ); |
1717 | #ifdef KAB_EMBEDDED | 1717 | #ifdef KAB_EMBEDDED |
1718 | mActionLicence = new KAction( i18n( "Licence" ), 0, | 1718 | mActionLicence = new KAction( i18n( "Licence" ), 0, |
1719 | this, SLOT( showLicence() ), actionCollection(), | 1719 | this, SLOT( showLicence() ), actionCollection(), |
1720 | "licence_about_data" ); | 1720 | "licence_about_data" ); |
1721 | mActionFaq = new KAction( i18n( "Faq" ), 0, | 1721 | mActionFaq = new KAction( i18n( "Faq" ), 0, |
1722 | this, SLOT( faq() ), actionCollection(), | 1722 | this, SLOT( faq() ), actionCollection(), |
1723 | "faq_about_data" ); | 1723 | "faq_about_data" ); |
1724 | 1724 | ||
1725 | mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, | 1725 | mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, |
1726 | this, SLOT( createAboutData() ), actionCollection(), | 1726 | this, SLOT( createAboutData() ), actionCollection(), |
1727 | "kaddressbook_about_data" ); | 1727 | "kaddressbook_about_data" ); |
1728 | #endif //KAB_EMBEDDED | 1728 | #endif //KAB_EMBEDDED |
1729 | 1729 | ||
1730 | clipboardDataChanged(); | 1730 | clipboardDataChanged(); |
1731 | connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); | 1731 | connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); |
1732 | connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); | 1732 | connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); |
1733 | } | 1733 | } |
1734 | 1734 | ||
1735 | //US we need this function, to plug all actions into the correct menues. | 1735 | //US we need this function, to plug all actions into the correct menues. |
1736 | // KDE uses a XML format to plug the actions, but we work her without this overhead. | 1736 | // KDE uses a XML format to plug the actions, but we work her without this overhead. |
1737 | void KABCore::addActionsManually() | 1737 | void KABCore::addActionsManually() |
1738 | { | 1738 | { |
1739 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); | 1739 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); |
1740 | 1740 | ||
1741 | #ifdef KAB_EMBEDDED | 1741 | #ifdef KAB_EMBEDDED |
1742 | QPopupMenu *fileMenu = new QPopupMenu( this ); | 1742 | QPopupMenu *fileMenu = new QPopupMenu( this ); |
1743 | QPopupMenu *editMenu = new QPopupMenu( this ); | 1743 | QPopupMenu *editMenu = new QPopupMenu( this ); |
1744 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 1744 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
1745 | 1745 | ||
1746 | KToolBar* tb = mMainWindow->toolBar(); | 1746 | KToolBar* tb = mMainWindow->toolBar(); |
1747 | 1747 | ||
1748 | #ifdef DESKTOP_VERSION | 1748 | #ifdef DESKTOP_VERSION |
1749 | QMenuBar* mb = mMainWindow->menuBar(); | 1749 | QMenuBar* mb = mMainWindow->menuBar(); |
1750 | 1750 | ||
1751 | //US setup menubar. | 1751 | //US setup menubar. |
1752 | //Disable the following block if you do not want to have a menubar. | 1752 | //Disable the following block if you do not want to have a menubar. |
1753 | mb->insertItem( "&File", fileMenu ); | 1753 | mb->insertItem( "&File", fileMenu ); |
1754 | mb->insertItem( "&Edit", editMenu ); | 1754 | mb->insertItem( "&Edit", editMenu ); |
1755 | mb->insertItem( "&View", viewMenu ); | 1755 | mb->insertItem( "&View", viewMenu ); |
1756 | mb->insertItem( "&Settings", settingsMenu ); | 1756 | mb->insertItem( "&Settings", settingsMenu ); |
1757 | mb->insertItem( "&Change selected", changeMenu ); | 1757 | mb->insertItem( "&Change selected", changeMenu ); |
1758 | mb->insertItem( "&Help", helpMenu ); | 1758 | mb->insertItem( "&Help", helpMenu ); |
1759 | mIncSearchWidget = new IncSearchWidget( tb ); | 1759 | mIncSearchWidget = new IncSearchWidget( tb ); |
1760 | // tb->insertWidget(-1, 0, mIncSearchWidget); | 1760 | // tb->insertWidget(-1, 0, mIncSearchWidget); |
1761 | 1761 | ||
1762 | #else | 1762 | #else |
1763 | //US setup toolbar | 1763 | //US setup toolbar |
1764 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); | 1764 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); |
1765 | QPopupMenu *popupBarTB = new QPopupMenu( this ); | 1765 | QPopupMenu *popupBarTB = new QPopupMenu( this ); |
1766 | menuBarTB->insertItem( "ME", popupBarTB); | 1766 | menuBarTB->insertItem( "ME", popupBarTB); |
1767 | tb->insertWidget(-1, 0, menuBarTB); | 1767 | tb->insertWidget(-1, 0, menuBarTB); |
1768 | mIncSearchWidget = new IncSearchWidget( tb ); | 1768 | mIncSearchWidget = new IncSearchWidget( tb ); |
1769 | 1769 | ||
1770 | tb->enableMoving(false); | 1770 | tb->enableMoving(false); |
1771 | popupBarTB->insertItem( "&File", fileMenu ); | 1771 | popupBarTB->insertItem( "&File", fileMenu ); |
1772 | popupBarTB->insertItem( "&Edit", editMenu ); | 1772 | popupBarTB->insertItem( "&Edit", editMenu ); |
1773 | popupBarTB->insertItem( "&View", viewMenu ); | 1773 | popupBarTB->insertItem( "&View", viewMenu ); |
1774 | popupBarTB->insertItem( "&Settings", settingsMenu ); | 1774 | popupBarTB->insertItem( "&Settings", settingsMenu ); |
1775 | mViewManager->getFilterAction()->plug ( popupBarTB); | 1775 | mViewManager->getFilterAction()->plug ( popupBarTB); |
1776 | popupBarTB->insertItem( "&Change selected", changeMenu ); | 1776 | popupBarTB->insertItem( "&Change selected", changeMenu ); |
1777 | popupBarTB->insertItem( "&Help", helpMenu ); | 1777 | popupBarTB->insertItem( "&Help", helpMenu ); |
1778 | if (QApplication::desktop()->width() > 320 ) { | 1778 | if (QApplication::desktop()->width() > 320 ) { |
1779 | // mViewManager->getFilterAction()->plug ( tb); | 1779 | // mViewManager->getFilterAction()->plug ( tb); |
1780 | } | 1780 | } |
1781 | #endif | 1781 | #endif |
1782 | // mActionQuit->plug ( mMainWindow->toolBar()); | 1782 | // mActionQuit->plug ( mMainWindow->toolBar()); |
1783 | 1783 | ||
1784 | 1784 | ||
1785 | 1785 | ||
1786 | //US Now connect the actions with the menue entries. | 1786 | //US Now connect the actions with the menue entries. |
1787 | mActionPrint->plug( fileMenu ); | 1787 | mActionPrint->plug( fileMenu ); |
1788 | mActionMail->plug( fileMenu ); | 1788 | mActionMail->plug( fileMenu ); |
1789 | fileMenu->insertSeparator(); | 1789 | fileMenu->insertSeparator(); |
1790 | 1790 | ||
1791 | mActionNewContact->plug( fileMenu ); | 1791 | mActionNewContact->plug( fileMenu ); |
1792 | mActionNewContact->plug( tb ); | 1792 | mActionNewContact->plug( tb ); |
1793 | 1793 | ||
1794 | mActionEditAddressee->plug( fileMenu ); | 1794 | mActionEditAddressee->plug( fileMenu ); |
1795 | if ((KGlobal::getDesktopSize() > KGlobal::Small ) || | 1795 | if ((KGlobal::getDesktopSize() > KGlobal::Small ) || |
1796 | (!KABPrefs::instance()->mMultipleViewsAtOnce )) | 1796 | (!KABPrefs::instance()->mMultipleViewsAtOnce )) |
1797 | mActionEditAddressee->plug( tb ); | 1797 | mActionEditAddressee->plug( tb ); |
1798 | 1798 | ||
1799 | fileMenu->insertSeparator(); | 1799 | fileMenu->insertSeparator(); |
1800 | mActionSave->plug( fileMenu ); | 1800 | mActionSave->plug( fileMenu ); |
1801 | fileMenu->insertItem( "&Import", ImportMenu ); | 1801 | fileMenu->insertItem( "&Import", ImportMenu ); |
1802 | fileMenu->insertItem( "&Emport", ExportMenu ); | 1802 | fileMenu->insertItem( "&Export", ExportMenu ); |
1803 | fileMenu->insertSeparator(); | 1803 | fileMenu->insertSeparator(); |
1804 | mActionMailVCard->plug( fileMenu ); | 1804 | mActionMailVCard->plug( fileMenu ); |
1805 | #ifndef DESKTOP_VERSION | 1805 | #ifndef DESKTOP_VERSION |
1806 | if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu ); | 1806 | if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu ); |
1807 | if ( Ir::supported() ) mActionBeam->plug(fileMenu ); | 1807 | if ( Ir::supported() ) mActionBeam->plug(fileMenu ); |
1808 | #endif | 1808 | #endif |
1809 | fileMenu->insertSeparator(); | 1809 | fileMenu->insertSeparator(); |
1810 | mActionQuit->plug( fileMenu ); | 1810 | mActionQuit->plug( fileMenu ); |
1811 | #ifdef _WIN32_ | 1811 | #ifdef _WIN32_ |
1812 | mActionImportOL->plug( ImportMenu ); | 1812 | mActionImportOL->plug( ImportMenu ); |
1813 | #endif | 1813 | #endif |
1814 | // edit menu | 1814 | // edit menu |
1815 | mActionUndo->plug( editMenu ); | 1815 | mActionUndo->plug( editMenu ); |
1816 | mActionRedo->plug( editMenu ); | 1816 | mActionRedo->plug( editMenu ); |
1817 | editMenu->insertSeparator(); | 1817 | editMenu->insertSeparator(); |
1818 | mActionCut->plug( editMenu ); | 1818 | mActionCut->plug( editMenu ); |
1819 | mActionCopy->plug( editMenu ); | 1819 | mActionCopy->plug( editMenu ); |
1820 | mActionPaste->plug( editMenu ); | 1820 | mActionPaste->plug( editMenu ); |
1821 | mActionDelete->plug( editMenu ); | 1821 | mActionDelete->plug( editMenu ); |
1822 | editMenu->insertSeparator(); | 1822 | editMenu->insertSeparator(); |
1823 | mActionSelectAll->plug( editMenu ); | 1823 | mActionSelectAll->plug( editMenu ); |
1824 | 1824 | ||
1825 | mActionRemoveVoice->plug( changeMenu ); | 1825 | mActionRemoveVoice->plug( changeMenu ); |
1826 | // settings menu | 1826 | // settings menu |
1827 | //US special menuentry to configure the addressbook resources. On KDE | 1827 | //US special menuentry to configure the addressbook resources. On KDE |
1828 | // you do that through the control center !!! | 1828 | // you do that through the control center !!! |
1829 | mActionConfigResources->plug( settingsMenu ); | 1829 | mActionConfigResources->plug( settingsMenu ); |
1830 | settingsMenu->insertSeparator(); | 1830 | settingsMenu->insertSeparator(); |
1831 | 1831 | ||
1832 | mActionConfigKAddressbook->plug( settingsMenu ); | 1832 | mActionConfigKAddressbook->plug( settingsMenu ); |
1833 | 1833 | ||
1834 | if ( mIsPart ) { | 1834 | if ( mIsPart ) { |
1835 | mActionConfigShortcuts->plug( settingsMenu ); | 1835 | mActionConfigShortcuts->plug( settingsMenu ); |
1836 | mActionConfigureToolbars->plug( settingsMenu ); | 1836 | mActionConfigureToolbars->plug( settingsMenu ); |
1837 | 1837 | ||
1838 | } else { | 1838 | } else { |
1839 | mActionKeyBindings->plug( settingsMenu ); | 1839 | mActionKeyBindings->plug( settingsMenu ); |
1840 | } | 1840 | } |
1841 | 1841 | ||
1842 | settingsMenu->insertSeparator(); | 1842 | settingsMenu->insertSeparator(); |
1843 | 1843 | ||
1844 | mActionJumpBar->plug( settingsMenu ); | 1844 | mActionJumpBar->plug( settingsMenu ); |
1845 | mActionDetails->plug( settingsMenu ); | 1845 | mActionDetails->plug( settingsMenu ); |
1846 | if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) | 1846 | if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) |
1847 | mActionDetails->plug( tb ); | 1847 | mActionDetails->plug( tb ); |
1848 | settingsMenu->insertSeparator(); | 1848 | settingsMenu->insertSeparator(); |
1849 | 1849 | ||
1850 | mActionWhoAmI->plug( settingsMenu ); | 1850 | mActionWhoAmI->plug( settingsMenu ); |
1851 | mActionCategories->plug( settingsMenu ); | 1851 | mActionCategories->plug( settingsMenu ); |
1852 | 1852 | ||
1853 | mActionLicence->plug( helpMenu ); | 1853 | mActionLicence->plug( helpMenu ); |
1854 | mActionFaq->plug( helpMenu ); | 1854 | mActionFaq->plug( helpMenu ); |
1855 | mActionAboutKAddressbook->plug( helpMenu ); | 1855 | mActionAboutKAddressbook->plug( helpMenu ); |
1856 | 1856 | ||
1857 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { | 1857 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { |
1858 | 1858 | ||
1859 | mActionSave->plug( tb ); | 1859 | mActionSave->plug( tb ); |
1860 | mViewManager->getFilterAction()->plug ( tb); | 1860 | mViewManager->getFilterAction()->plug ( tb); |
1861 | if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { | 1861 | if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { |
1862 | mActionUndo->plug( tb ); | 1862 | mActionUndo->plug( tb ); |
1863 | mActionDelete->plug( tb ); | 1863 | mActionDelete->plug( tb ); |
1864 | mActionRedo->plug( tb ); | 1864 | mActionRedo->plug( tb ); |
1865 | } | 1865 | } |
1866 | } | 1866 | } |
1867 | //mActionQuit->plug ( tb ); | 1867 | //mActionQuit->plug ( tb ); |
1868 | // tb->insertWidget(-1, 0, mIncSearchWidget, 6); | 1868 | // tb->insertWidget(-1, 0, mIncSearchWidget, 6); |
1869 | 1869 | ||
1870 | //US link the searchwidget first to this. | 1870 | //US link the searchwidget first to this. |
1871 | // The real linkage to the toolbar happens later. | 1871 | // The real linkage to the toolbar happens later. |
1872 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); | 1872 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); |
1873 | //US tb->insertItem( mIncSearchWidget ); | 1873 | //US tb->insertItem( mIncSearchWidget ); |
1874 | /*US | 1874 | /*US |
1875 | mIncSearchWidget = new IncSearchWidget( tb ); | 1875 | mIncSearchWidget = new IncSearchWidget( tb ); |
1876 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 1876 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
1877 | SLOT( incrementalSearch( const QString& ) ) ); | 1877 | SLOT( incrementalSearch( const QString& ) ) ); |
1878 | 1878 | ||
1879 | mJumpButtonBar = new JumpButtonBar( this, this ); | 1879 | mJumpButtonBar = new JumpButtonBar( this, this ); |
1880 | 1880 | ||
1881 | //US topLayout->addWidget( mJumpButtonBar ); | 1881 | //US topLayout->addWidget( mJumpButtonBar ); |
1882 | this->layout()->add( mJumpButtonBar ); | 1882 | this->layout()->add( mJumpButtonBar ); |
1883 | */ | 1883 | */ |
1884 | 1884 | ||
1885 | #endif //KAB_EMBEDDED | 1885 | #endif //KAB_EMBEDDED |
1886 | } | 1886 | } |
1887 | void KABCore::showLicence() | 1887 | void KABCore::showLicence() |
1888 | { | 1888 | { |
1889 | KApplication::showLicence(); | 1889 | KApplication::showLicence(); |
1890 | } | 1890 | } |
1891 | void KABCore::removeVoice() | 1891 | void KABCore::removeVoice() |
1892 | { | 1892 | { |
1893 | if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No ) | 1893 | if ( KMessageBox::questionYesNo( this, i18n("After importing, phone numbers\nmay have two or more types.\n(E.g. work+voice)\nThese numbers are shown as \"other\".\nClick Yes to remove the voice type\nfrom numbers with more than one type.\n\nRemove voice type?") ) == KMessageBox::No ) |
1894 | return; | 1894 | return; |
1895 | KABC::Addressee::List list = mViewManager->selectedAddressees(); | 1895 | KABC::Addressee::List list = mViewManager->selectedAddressees(); |
1896 | KABC::Addressee::List::Iterator it; | 1896 | KABC::Addressee::List::Iterator it; |
1897 | for ( it = list.begin(); it != list.end(); ++it ) { | 1897 | for ( it = list.begin(); it != list.end(); ++it ) { |
1898 | PhoneNumber::List phoneNumbers = (*it).phoneNumbers(); | 1898 | PhoneNumber::List phoneNumbers = (*it).phoneNumbers(); |