author | zautrix <zautrix> | 2004-11-01 21:47:10 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-11-01 21:47:10 (UTC) |
commit | 2340aa4fcce77bf99308f2b2848680138124f837 (patch) (unidiff) | |
tree | 0c1ec45b1c10c21a0534da31083d436973ab6d37 /kaddressbook | |
parent | c90466058fa940f2fe32402bdd71feaa9ebf3ea8 (diff) | |
download | kdepimpi-2340aa4fcce77bf99308f2b2848680138124f837.zip kdepimpi-2340aa4fcce77bf99308f2b2848680138124f837.tar.gz kdepimpi-2340aa4fcce77bf99308f2b2848680138124f837.tar.bz2 |
kapi translation fix
-rw-r--r-- | kaddressbook/kabcore.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 9505a23..4445310 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -1800,411 +1800,411 @@ void KABCore::initActions() | |||
1800 | mActionBeam = 0; | 1800 | mActionBeam = 0; |
1801 | 1801 | ||
1802 | #ifndef DESKTOP_VERSION | 1802 | #ifndef DESKTOP_VERSION |
1803 | if ( Ir::supported() ) { | 1803 | if ( Ir::supported() ) { |
1804 | mActionBeamVCard = new KAction( i18n( "Beam selected v&Card(s)" ), "beam", 0, this, | 1804 | mActionBeamVCard = new KAction( i18n( "Beam selected v&Card(s)" ), "beam", 0, this, |
1805 | SLOT( beamVCard() ), actionCollection(), | 1805 | SLOT( beamVCard() ), actionCollection(), |
1806 | "kaddressbook_beam_vcard" ); | 1806 | "kaddressbook_beam_vcard" ); |
1807 | 1807 | ||
1808 | mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, | 1808 | mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, |
1809 | SLOT( beamMySelf() ), actionCollection(), | 1809 | SLOT( beamMySelf() ), actionCollection(), |
1810 | "kaddressbook_beam_myself" ); | 1810 | "kaddressbook_beam_myself" ); |
1811 | } | 1811 | } |
1812 | #endif | 1812 | #endif |
1813 | 1813 | ||
1814 | mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, | 1814 | mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, |
1815 | this, SLOT( editContact2() ), | 1815 | this, SLOT( editContact2() ), |
1816 | actionCollection(), "file_properties" ); | 1816 | actionCollection(), "file_properties" ); |
1817 | 1817 | ||
1818 | #ifdef KAB_EMBEDDED | 1818 | #ifdef KAB_EMBEDDED |
1819 | // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); | 1819 | // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); |
1820 | mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, | 1820 | mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, |
1821 | mMainWindow, SLOT( exit() ), | 1821 | mMainWindow, SLOT( exit() ), |
1822 | actionCollection(), "quit" ); | 1822 | actionCollection(), "quit" ); |
1823 | #endif //KAB_EMBEDDED | 1823 | #endif //KAB_EMBEDDED |
1824 | 1824 | ||
1825 | // edit menu | 1825 | // edit menu |
1826 | if ( mIsPart ) { | 1826 | if ( mIsPart ) { |
1827 | mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, | 1827 | mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, |
1828 | SLOT( copyContacts() ), actionCollection(), | 1828 | SLOT( copyContacts() ), actionCollection(), |
1829 | "kaddressbook_copy" ); | 1829 | "kaddressbook_copy" ); |
1830 | mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, | 1830 | mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, |
1831 | SLOT( cutContacts() ), actionCollection(), | 1831 | SLOT( cutContacts() ), actionCollection(), |
1832 | "kaddressbook_cut" ); | 1832 | "kaddressbook_cut" ); |
1833 | mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, | 1833 | mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, |
1834 | SLOT( pasteContacts() ), actionCollection(), | 1834 | SLOT( pasteContacts() ), actionCollection(), |
1835 | "kaddressbook_paste" ); | 1835 | "kaddressbook_paste" ); |
1836 | mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, | 1836 | mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, |
1837 | SLOT( selectAllContacts() ), actionCollection(), | 1837 | SLOT( selectAllContacts() ), actionCollection(), |
1838 | "kaddressbook_select_all" ); | 1838 | "kaddressbook_select_all" ); |
1839 | mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, | 1839 | mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, |
1840 | SLOT( undo() ), actionCollection(), | 1840 | SLOT( undo() ), actionCollection(), |
1841 | "kaddressbook_undo" ); | 1841 | "kaddressbook_undo" ); |
1842 | mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, | 1842 | mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, |
1843 | this, SLOT( redo() ), actionCollection(), | 1843 | this, SLOT( redo() ), actionCollection(), |
1844 | "kaddressbook_redo" ); | 1844 | "kaddressbook_redo" ); |
1845 | } else { | 1845 | } else { |
1846 | mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); | 1846 | mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); |
1847 | mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); | 1847 | mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); |
1848 | mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); | 1848 | mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); |
1849 | mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); | 1849 | mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); |
1850 | mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); | 1850 | mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); |
1851 | mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); | 1851 | mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); |
1852 | } | 1852 | } |
1853 | 1853 | ||
1854 | mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", | 1854 | mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", |
1855 | Key_Delete, this, SLOT( deleteContacts() ), | 1855 | Key_Delete, this, SLOT( deleteContacts() ), |
1856 | actionCollection(), "edit_delete" ); | 1856 | actionCollection(), "edit_delete" ); |
1857 | 1857 | ||
1858 | mActionUndo->setEnabled( false ); | 1858 | mActionUndo->setEnabled( false ); |
1859 | mActionRedo->setEnabled( false ); | 1859 | mActionRedo->setEnabled( false ); |
1860 | 1860 | ||
1861 | // settings menu | 1861 | // settings menu |
1862 | #ifdef KAB_EMBEDDED | 1862 | #ifdef KAB_EMBEDDED |
1863 | //US special menuentry to configure the addressbook resources. On KDE | 1863 | //US special menuentry to configure the addressbook resources. On KDE |
1864 | // you do that through the control center !!! | 1864 | // you do that through the control center !!! |
1865 | mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, | 1865 | mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, |
1866 | SLOT( configureResources() ), actionCollection(), | 1866 | SLOT( configureResources() ), actionCollection(), |
1867 | "kaddressbook_configure_resources" ); | 1867 | "kaddressbook_configure_resources" ); |
1868 | #endif //KAB_EMBEDDED | 1868 | #endif //KAB_EMBEDDED |
1869 | 1869 | ||
1870 | if ( mIsPart ) { | 1870 | if ( mIsPart ) { |
1871 | mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, | 1871 | mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, |
1872 | SLOT( openConfigDialog() ), actionCollection(), | 1872 | SLOT( openConfigDialog() ), actionCollection(), |
1873 | "kaddressbook_configure" ); | 1873 | "kaddressbook_configure" ); |
1874 | 1874 | ||
1875 | //US not implemented yet | 1875 | //US not implemented yet |
1876 | //mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, | 1876 | //mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, |
1877 | // this, SLOT( configureKeyBindings() ), actionCollection(), | 1877 | // this, SLOT( configureKeyBindings() ), actionCollection(), |
1878 | // "kaddressbook_configure_shortcuts" ); | 1878 | // "kaddressbook_configure_shortcuts" ); |
1879 | #ifdef KAB_EMBEDDED | 1879 | #ifdef KAB_EMBEDDED |
1880 | mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() ); | 1880 | mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() ); |
1881 | mActionConfigureToolbars->setEnabled( false ); | 1881 | mActionConfigureToolbars->setEnabled( false ); |
1882 | #endif //KAB_EMBEDDED | 1882 | #endif //KAB_EMBEDDED |
1883 | 1883 | ||
1884 | } else { | 1884 | } else { |
1885 | mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() ); | 1885 | mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() ); |
1886 | 1886 | ||
1887 | //US not implemented yet | 1887 | //US not implemented yet |
1888 | //mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() ); | 1888 | //mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() ); |
1889 | } | 1889 | } |
1890 | 1890 | ||
1891 | mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, | 1891 | mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, |
1892 | actionCollection(), "options_show_jump_bar" ); | 1892 | actionCollection(), "options_show_jump_bar" ); |
1893 | connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBarVisible( bool ) ) ); | 1893 | connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBarVisible( bool ) ) ); |
1894 | 1894 | ||
1895 | mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0, | 1895 | mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0, |
1896 | actionCollection(), "options_show_details" ); | 1896 | actionCollection(), "options_show_details" ); |
1897 | connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) ); | 1897 | connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) ); |
1898 | 1898 | ||
1899 | 1899 | ||
1900 | mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this, | 1900 | mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this, |
1901 | SLOT( toggleBeamReceive() ), actionCollection(), | 1901 | SLOT( toggleBeamReceive() ), actionCollection(), |
1902 | "kaddressbook_beam_rec" ); | 1902 | "kaddressbook_beam_rec" ); |
1903 | 1903 | ||
1904 | 1904 | ||
1905 | // misc | 1905 | // misc |
1906 | // only enable LDAP lookup if we can handle the protocol | 1906 | // only enable LDAP lookup if we can handle the protocol |
1907 | #ifndef KAB_EMBEDDED | 1907 | #ifndef KAB_EMBEDDED |
1908 | if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { | 1908 | if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { |
1909 | new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, | 1909 | new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, |
1910 | this, SLOT( openLDAPDialog() ), actionCollection(), | 1910 | this, SLOT( openLDAPDialog() ), actionCollection(), |
1911 | "ldap_lookup" ); | 1911 | "ldap_lookup" ); |
1912 | } | 1912 | } |
1913 | #else //KAB_EMBEDDED | 1913 | #else //KAB_EMBEDDED |
1914 | //qDebug("KABCore::initActions() LDAP has to be implemented"); | 1914 | //qDebug("KABCore::initActions() LDAP has to be implemented"); |
1915 | #endif //KAB_EMBEDDED | 1915 | #endif //KAB_EMBEDDED |
1916 | 1916 | ||
1917 | 1917 | ||
1918 | mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, | 1918 | mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, |
1919 | SLOT( setWhoAmI() ), actionCollection(), | 1919 | SLOT( setWhoAmI() ), actionCollection(), |
1920 | "set_personal" ); | 1920 | "set_personal" ); |
1921 | 1921 | ||
1922 | 1922 | ||
1923 | mActionCategories = new KAction( i18n( "Set Categories" ), 0, this, | 1923 | mActionCategories = new KAction( i18n( "Set Categories" ), 0, this, |
1924 | SLOT( setCategories() ), actionCollection(), | 1924 | SLOT( setCategories() ), actionCollection(), |
1925 | "edit_set_categories" ); | 1925 | "edit_set_categories" ); |
1926 | mActionEditCategories = new KAction( i18n( "Edit Categories" ), 0, this, | 1926 | mActionEditCategories = new KAction( i18n( "Edit Categories" ), 0, this, |
1927 | SLOT( editCategories() ), actionCollection(), | 1927 | SLOT( editCategories() ), actionCollection(), |
1928 | "edit__categories" ); | 1928 | "edit__categories" ); |
1929 | 1929 | ||
1930 | mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, | 1930 | mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, |
1931 | SLOT( removeVoice() ), actionCollection(), | 1931 | SLOT( removeVoice() ), actionCollection(), |
1932 | "remove_voice" ); | 1932 | "remove_voice" ); |
1933 | 1933 | ||
1934 | mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this, | 1934 | mActionManageCategories= new KAction( i18n( "Manage new categories..." ), 0, this, |
1935 | SLOT( manageCategories() ), actionCollection(), | 1935 | SLOT( manageCategories() ), actionCollection(), |
1936 | "remove_voice" ); | 1936 | "remove_voice" ); |
1937 | 1937 | ||
1938 | 1938 | ||
1939 | mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, | 1939 | mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, |
1940 | SLOT( importFromOL() ), actionCollection(), | 1940 | SLOT( importFromOL() ), actionCollection(), |
1941 | "import_OL" ); | 1941 | "import_OL" ); |
1942 | #ifdef KAB_EMBEDDED | 1942 | #ifdef KAB_EMBEDDED |
1943 | mActionLicence = new KAction( i18n( "Licence" ), 0, | 1943 | mActionLicence = new KAction( i18n( "Licence" ), 0, |
1944 | this, SLOT( showLicence() ), actionCollection(), | 1944 | this, SLOT( showLicence() ), actionCollection(), |
1945 | "licence_about_data" ); | 1945 | "licence_about_data" ); |
1946 | mActionFaq = new KAction( i18n( "Faq" ), 0, | 1946 | mActionFaq = new KAction( i18n( "Faq" ), 0, |
1947 | this, SLOT( faq() ), actionCollection(), | 1947 | this, SLOT( faq() ), actionCollection(), |
1948 | "faq_about_data" ); | 1948 | "faq_about_data" ); |
1949 | mActionWN = new KAction( i18n( "What's New?" ), 0, | 1949 | mActionWN = new KAction( i18n( "What's New?" ), 0, |
1950 | this, SLOT( whatsnew() ), actionCollection(), | 1950 | this, SLOT( whatsnew() ), actionCollection(), |
1951 | "wn" ); | 1951 | "wn" ); |
1952 | mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, | 1952 | mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, |
1953 | this, SLOT( synchowto() ), actionCollection(), | 1953 | this, SLOT( synchowto() ), actionCollection(), |
1954 | "sync" ); | 1954 | "sync" ); |
1955 | mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, | 1955 | mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, |
1956 | this, SLOT( kdesynchowto() ), actionCollection(), | 1956 | this, SLOT( kdesynchowto() ), actionCollection(), |
1957 | "kdesync" ); | 1957 | "kdesync" ); |
1958 | mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, | 1958 | mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, |
1959 | this, SLOT( multisynchowto() ), actionCollection(), | 1959 | this, SLOT( multisynchowto() ), actionCollection(), |
1960 | "multisync" ); | 1960 | "multisync" ); |
1961 | 1961 | ||
1962 | mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, | 1962 | mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, |
1963 | this, SLOT( createAboutData() ), actionCollection(), | 1963 | this, SLOT( createAboutData() ), actionCollection(), |
1964 | "kaddressbook_about_data" ); | 1964 | "kaddressbook_about_data" ); |
1965 | #endif //KAB_EMBEDDED | 1965 | #endif //KAB_EMBEDDED |
1966 | 1966 | ||
1967 | clipboardDataChanged(); | 1967 | clipboardDataChanged(); |
1968 | connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); | 1968 | connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); |
1969 | connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); | 1969 | connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); |
1970 | } | 1970 | } |
1971 | 1971 | ||
1972 | //US we need this function, to plug all actions into the correct menues. | 1972 | //US we need this function, to plug all actions into the correct menues. |
1973 | // KDE uses a XML format to plug the actions, but we work her without this overhead. | 1973 | // KDE uses a XML format to plug the actions, but we work her without this overhead. |
1974 | void KABCore::addActionsManually() | 1974 | void KABCore::addActionsManually() |
1975 | { | 1975 | { |
1976 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); | 1976 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); |
1977 | 1977 | ||
1978 | #ifdef KAB_EMBEDDED | 1978 | #ifdef KAB_EMBEDDED |
1979 | QPopupMenu *fileMenu = new QPopupMenu( this ); | 1979 | QPopupMenu *fileMenu = new QPopupMenu( this ); |
1980 | QPopupMenu *editMenu = new QPopupMenu( this ); | 1980 | QPopupMenu *editMenu = new QPopupMenu( this ); |
1981 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 1981 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
1982 | 1982 | ||
1983 | KToolBar* tb = mMainWindow->toolBar(); | 1983 | KToolBar* tb = mMainWindow->toolBar(); |
1984 | 1984 | ||
1985 | #ifndef DESKTOP_VERSION | 1985 | #ifndef DESKTOP_VERSION |
1986 | if ( KABPrefs::instance()->mFullMenuBarVisible ) { | 1986 | if ( KABPrefs::instance()->mFullMenuBarVisible ) { |
1987 | #endif | 1987 | #endif |
1988 | QMenuBar* mb = mMainWindow->menuBar(); | 1988 | QMenuBar* mb = mMainWindow->menuBar(); |
1989 | 1989 | ||
1990 | //US setup menubar. | 1990 | //US setup menubar. |
1991 | //Disable the following block if you do not want to have a menubar. | 1991 | //Disable the following block if you do not want to have a menubar. |
1992 | mb->insertItem( "&File", fileMenu ); | 1992 | mb->insertItem( i18n("&File"), fileMenu ); |
1993 | mb->insertItem( "&Edit", editMenu ); | 1993 | mb->insertItem( i18n("&Edit"), editMenu ); |
1994 | mb->insertItem( "&View", viewMenu ); | 1994 | mb->insertItem( i18n("&View"), viewMenu ); |
1995 | mb->insertItem( "&Settings", settingsMenu ); | 1995 | mb->insertItem( i18n("&Settings"), settingsMenu ); |
1996 | mb->insertItem( i18n("Synchronize"), syncMenu ); | 1996 | mb->insertItem( i18n("Synchronize"), syncMenu ); |
1997 | mb->insertItem( "&Change selected", changeMenu ); | 1997 | mb->insertItem( i18n("&Change selected"), changeMenu ); |
1998 | mb->insertItem( "&Help", helpMenu ); | 1998 | mb->insertItem( i18n("&Help"), helpMenu ); |
1999 | mIncSearchWidget = new IncSearchWidget( tb ); | 1999 | mIncSearchWidget = new IncSearchWidget( tb ); |
2000 | // tb->insertWidget(-1, 0, mIncSearchWidget); | 2000 | // tb->insertWidget(-1, 0, mIncSearchWidget); |
2001 | #ifndef DESKTOP_VERSION | 2001 | #ifndef DESKTOP_VERSION |
2002 | } else { | 2002 | } else { |
2003 | //US setup toolbar | 2003 | //US setup toolbar |
2004 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); | 2004 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); |
2005 | QPopupMenu *popupBarTB = new QPopupMenu( this ); | 2005 | QPopupMenu *popupBarTB = new QPopupMenu( this ); |
2006 | menuBarTB->insertItem( "ME", popupBarTB); | 2006 | menuBarTB->insertItem( "ME", popupBarTB); |
2007 | tb->insertWidget(-1, 0, menuBarTB); | 2007 | tb->insertWidget(-1, 0, menuBarTB); |
2008 | mIncSearchWidget = new IncSearchWidget( tb ); | 2008 | mIncSearchWidget = new IncSearchWidget( tb ); |
2009 | 2009 | ||
2010 | tb->enableMoving(false); | 2010 | tb->enableMoving(false); |
2011 | popupBarTB->insertItem( "&File", fileMenu ); | 2011 | popupBarTB->insertItem( i18n("&File"), fileMenu ); |
2012 | popupBarTB->insertItem( "&Edit", editMenu ); | 2012 | popupBarTB->insertItem( i18n("&Edit"), editMenu ); |
2013 | popupBarTB->insertItem( "&View", viewMenu ); | 2013 | popupBarTB->insertItem( i18n("&View"), viewMenu ); |
2014 | popupBarTB->insertItem( "&Settings", settingsMenu ); | 2014 | popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); |
2015 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); | 2015 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); |
2016 | mViewManager->getFilterAction()->plug ( popupBarTB); | 2016 | mViewManager->getFilterAction()->plug ( popupBarTB); |
2017 | popupBarTB->insertItem( "&Change selected", changeMenu ); | 2017 | popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); |
2018 | popupBarTB->insertItem( "&Help", helpMenu ); | 2018 | popupBarTB->insertItem( i18n("&Help"), helpMenu ); |
2019 | if (QApplication::desktop()->width() > 320 ) { | 2019 | if (QApplication::desktop()->width() > 320 ) { |
2020 | // mViewManager->getFilterAction()->plug ( tb); | 2020 | // mViewManager->getFilterAction()->plug ( tb); |
2021 | } | 2021 | } |
2022 | } | 2022 | } |
2023 | #endif | 2023 | #endif |
2024 | // mActionQuit->plug ( mMainWindow->toolBar()); | 2024 | // mActionQuit->plug ( mMainWindow->toolBar()); |
2025 | 2025 | ||
2026 | 2026 | ||
2027 | 2027 | ||
2028 | //US Now connect the actions with the menue entries. | 2028 | //US Now connect the actions with the menue entries. |
2029 | mActionPrint->plug( fileMenu ); | 2029 | mActionPrint->plug( fileMenu ); |
2030 | mActionMail->plug( fileMenu ); | 2030 | mActionMail->plug( fileMenu ); |
2031 | fileMenu->insertSeparator(); | 2031 | fileMenu->insertSeparator(); |
2032 | 2032 | ||
2033 | mActionNewContact->plug( fileMenu ); | 2033 | mActionNewContact->plug( fileMenu ); |
2034 | mActionNewContact->plug( tb ); | 2034 | mActionNewContact->plug( tb ); |
2035 | 2035 | ||
2036 | mActionEditAddressee->plug( fileMenu ); | 2036 | mActionEditAddressee->plug( fileMenu ); |
2037 | // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || | 2037 | // if ((KGlobal::getDesktopSize() > KGlobal::Small ) || |
2038 | // (!KABPrefs::instance()->mMultipleViewsAtOnce )) | 2038 | // (!KABPrefs::instance()->mMultipleViewsAtOnce )) |
2039 | mActionEditAddressee->plug( tb ); | 2039 | mActionEditAddressee->plug( tb ); |
2040 | 2040 | ||
2041 | fileMenu->insertSeparator(); | 2041 | fileMenu->insertSeparator(); |
2042 | mActionSave->plug( fileMenu ); | 2042 | mActionSave->plug( fileMenu ); |
2043 | fileMenu->insertItem( "&Import", ImportMenu ); | 2043 | fileMenu->insertItem( "&Import", ImportMenu ); |
2044 | fileMenu->insertItem( "&Export", ExportMenu ); | 2044 | fileMenu->insertItem( "&Export", ExportMenu ); |
2045 | fileMenu->insertSeparator(); | 2045 | fileMenu->insertSeparator(); |
2046 | mActionMailVCard->plug( fileMenu ); | 2046 | mActionMailVCard->plug( fileMenu ); |
2047 | #ifndef DESKTOP_VERSION | 2047 | #ifndef DESKTOP_VERSION |
2048 | if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu ); | 2048 | if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu ); |
2049 | if ( Ir::supported() ) mActionBeam->plug(fileMenu ); | 2049 | if ( Ir::supported() ) mActionBeam->plug(fileMenu ); |
2050 | #endif | 2050 | #endif |
2051 | fileMenu->insertSeparator(); | 2051 | fileMenu->insertSeparator(); |
2052 | mActionQuit->plug( fileMenu ); | 2052 | mActionQuit->plug( fileMenu ); |
2053 | #ifdef _WIN32_ | 2053 | #ifdef _WIN32_ |
2054 | mActionImportOL->plug( ImportMenu ); | 2054 | mActionImportOL->plug( ImportMenu ); |
2055 | #endif | 2055 | #endif |
2056 | // edit menu | 2056 | // edit menu |
2057 | mActionUndo->plug( editMenu ); | 2057 | mActionUndo->plug( editMenu ); |
2058 | mActionRedo->plug( editMenu ); | 2058 | mActionRedo->plug( editMenu ); |
2059 | editMenu->insertSeparator(); | 2059 | editMenu->insertSeparator(); |
2060 | mActionCut->plug( editMenu ); | 2060 | mActionCut->plug( editMenu ); |
2061 | mActionCopy->plug( editMenu ); | 2061 | mActionCopy->plug( editMenu ); |
2062 | mActionPaste->plug( editMenu ); | 2062 | mActionPaste->plug( editMenu ); |
2063 | mActionDelete->plug( editMenu ); | 2063 | mActionDelete->plug( editMenu ); |
2064 | editMenu->insertSeparator(); | 2064 | editMenu->insertSeparator(); |
2065 | mActionSelectAll->plug( editMenu ); | 2065 | mActionSelectAll->plug( editMenu ); |
2066 | 2066 | ||
2067 | mActionRemoveVoice->plug( changeMenu ); | 2067 | mActionRemoveVoice->plug( changeMenu ); |
2068 | // settings menu | 2068 | // settings menu |
2069 | //US special menuentry to configure the addressbook resources. On KDE | 2069 | //US special menuentry to configure the addressbook resources. On KDE |
2070 | // you do that through the control center !!! | 2070 | // you do that through the control center !!! |
2071 | mActionConfigResources->plug( settingsMenu ); | 2071 | mActionConfigResources->plug( settingsMenu ); |
2072 | settingsMenu->insertSeparator(); | 2072 | settingsMenu->insertSeparator(); |
2073 | 2073 | ||
2074 | mActionConfigKAddressbook->plug( settingsMenu ); | 2074 | mActionConfigKAddressbook->plug( settingsMenu ); |
2075 | 2075 | ||
2076 | if ( mIsPart ) { | 2076 | if ( mIsPart ) { |
2077 | //US not implemented yet | 2077 | //US not implemented yet |
2078 | //mActionConfigShortcuts->plug( settingsMenu ); | 2078 | //mActionConfigShortcuts->plug( settingsMenu ); |
2079 | //mActionConfigureToolbars->plug( settingsMenu ); | 2079 | //mActionConfigureToolbars->plug( settingsMenu ); |
2080 | 2080 | ||
2081 | } else { | 2081 | } else { |
2082 | //US not implemented yet | 2082 | //US not implemented yet |
2083 | //mActionKeyBindings->plug( settingsMenu ); | 2083 | //mActionKeyBindings->plug( settingsMenu ); |
2084 | } | 2084 | } |
2085 | 2085 | ||
2086 | settingsMenu->insertSeparator(); | 2086 | settingsMenu->insertSeparator(); |
2087 | 2087 | ||
2088 | mActionJumpBar->plug( settingsMenu ); | 2088 | mActionJumpBar->plug( settingsMenu ); |
2089 | mActionDetails->plug( settingsMenu ); | 2089 | mActionDetails->plug( settingsMenu ); |
2090 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) | 2090 | //if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) |
2091 | mActionDetails->plug( tb ); | 2091 | mActionDetails->plug( tb ); |
2092 | settingsMenu->insertSeparator(); | 2092 | settingsMenu->insertSeparator(); |
2093 | mActionBR->plug(settingsMenu ); | 2093 | mActionBR->plug(settingsMenu ); |
2094 | settingsMenu->insertSeparator(); | 2094 | settingsMenu->insertSeparator(); |
2095 | 2095 | ||
2096 | mActionWhoAmI->plug( settingsMenu ); | 2096 | mActionWhoAmI->plug( settingsMenu ); |
2097 | mActionEditCategories->plug( settingsMenu ); | 2097 | mActionEditCategories->plug( settingsMenu ); |
2098 | mActionCategories->plug( settingsMenu ); | 2098 | mActionCategories->plug( settingsMenu ); |
2099 | mActionManageCategories->plug( settingsMenu ); | 2099 | mActionManageCategories->plug( settingsMenu ); |
2100 | 2100 | ||
2101 | 2101 | ||
2102 | mActionWN->plug( helpMenu ); | 2102 | mActionWN->plug( helpMenu ); |
2103 | mActionSyncHowto->plug( helpMenu ); | 2103 | mActionSyncHowto->plug( helpMenu ); |
2104 | mActionKdeSyncHowto->plug( helpMenu ); | 2104 | mActionKdeSyncHowto->plug( helpMenu ); |
2105 | mActionMultiSyncHowto->plug( helpMenu ); | 2105 | mActionMultiSyncHowto->plug( helpMenu ); |
2106 | mActionFaq->plug( helpMenu ); | 2106 | mActionFaq->plug( helpMenu ); |
2107 | mActionLicence->plug( helpMenu ); | 2107 | mActionLicence->plug( helpMenu ); |
2108 | mActionAboutKAddressbook->plug( helpMenu ); | 2108 | mActionAboutKAddressbook->plug( helpMenu ); |
2109 | 2109 | ||
2110 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { | 2110 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { |
2111 | 2111 | ||
2112 | mActionSave->plug( tb ); | 2112 | mActionSave->plug( tb ); |
2113 | mViewManager->getFilterAction()->plug ( tb); | 2113 | mViewManager->getFilterAction()->plug ( tb); |
2114 | if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { | 2114 | if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { |
2115 | mActionUndo->plug( tb ); | 2115 | mActionUndo->plug( tb ); |
2116 | mActionDelete->plug( tb ); | 2116 | mActionDelete->plug( tb ); |
2117 | mActionRedo->plug( tb ); | 2117 | mActionRedo->plug( tb ); |
2118 | } | 2118 | } |
2119 | } else { | 2119 | } else { |
2120 | mActionSave->plug( tb ); | 2120 | mActionSave->plug( tb ); |
2121 | tb->enableMoving(false); | 2121 | tb->enableMoving(false); |
2122 | } | 2122 | } |
2123 | //mActionQuit->plug ( tb ); | 2123 | //mActionQuit->plug ( tb ); |
2124 | // tb->insertWidget(-1, 0, mIncSearchWidget, 6); | 2124 | // tb->insertWidget(-1, 0, mIncSearchWidget, 6); |
2125 | 2125 | ||
2126 | //US link the searchwidget first to this. | 2126 | //US link the searchwidget first to this. |
2127 | // The real linkage to the toolbar happens later. | 2127 | // The real linkage to the toolbar happens later. |
2128 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); | 2128 | //US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE); |
2129 | //US tb->insertItem( mIncSearchWidget ); | 2129 | //US tb->insertItem( mIncSearchWidget ); |
2130 | /*US | 2130 | /*US |
2131 | mIncSearchWidget = new IncSearchWidget( tb ); | 2131 | mIncSearchWidget = new IncSearchWidget( tb ); |
2132 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 2132 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
2133 | SLOT( incrementalSearch( const QString& ) ) ); | 2133 | SLOT( incrementalSearch( const QString& ) ) ); |
2134 | 2134 | ||
2135 | mJumpButtonBar = new JumpButtonBar( this, this ); | 2135 | mJumpButtonBar = new JumpButtonBar( this, this ); |
2136 | 2136 | ||
2137 | //US topLayout->addWidget( mJumpButtonBar ); | 2137 | //US topLayout->addWidget( mJumpButtonBar ); |
2138 | this->layout()->add( mJumpButtonBar ); | 2138 | this->layout()->add( mJumpButtonBar ); |
2139 | */ | 2139 | */ |
2140 | 2140 | ||
2141 | #endif //KAB_EMBEDDED | 2141 | #endif //KAB_EMBEDDED |
2142 | 2142 | ||
2143 | mActionExport2phone->plug( ExportMenu ); | 2143 | mActionExport2phone->plug( ExportMenu ); |
2144 | connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); | 2144 | connect ( syncMenu, SIGNAL( activated ( int ) ), syncManager, SLOT (slotSyncMenu( int ) ) ); |
2145 | syncManager->fillSyncMenu(); | 2145 | syncManager->fillSyncMenu(); |
2146 | 2146 | ||
2147 | } | 2147 | } |
2148 | void KABCore::showLicence() | 2148 | void KABCore::showLicence() |
2149 | { | 2149 | { |
2150 | KApplication::showLicence(); | 2150 | KApplication::showLicence(); |
2151 | } | 2151 | } |
2152 | 2152 | ||
2153 | void KABCore::manageCategories( ) | 2153 | void KABCore::manageCategories( ) |
2154 | { | 2154 | { |
2155 | KABCatPrefs* cp = new KABCatPrefs(); | 2155 | KABCatPrefs* cp = new KABCatPrefs(); |
2156 | cp->show(); | 2156 | cp->show(); |
2157 | int w =cp->sizeHint().width() ; | 2157 | int w =cp->sizeHint().width() ; |
2158 | int h = cp->sizeHint().height() ; | 2158 | int h = cp->sizeHint().height() ; |
2159 | int dw = QApplication::desktop()->width(); | 2159 | int dw = QApplication::desktop()->width(); |
2160 | int dh = QApplication::desktop()->height(); | 2160 | int dh = QApplication::desktop()->height(); |
2161 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2161 | cp->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2162 | if ( !cp->exec() ) { | 2162 | if ( !cp->exec() ) { |
2163 | delete cp; | 2163 | delete cp; |
2164 | return; | 2164 | return; |
2165 | } | 2165 | } |
2166 | int count = 0; | 2166 | int count = 0; |
2167 | message( i18n("Please wait, processing categories...")); | 2167 | message( i18n("Please wait, processing categories...")); |
2168 | if ( cp->addCat() ) { | 2168 | if ( cp->addCat() ) { |
2169 | KABC::AddressBook::Iterator it; | 2169 | KABC::AddressBook::Iterator it; |
2170 | QStringList catList = KABPrefs::instance()->mCustomCategories; | 2170 | QStringList catList = KABPrefs::instance()->mCustomCategories; |
2171 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2171 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2172 | QStringList catIncList = (*it).categories(); | 2172 | QStringList catIncList = (*it).categories(); |
2173 | int i; | 2173 | int i; |
2174 | for( i = 0; i< catIncList.count(); ++i ) { | 2174 | for( i = 0; i< catIncList.count(); ++i ) { |
2175 | if ( !catList.contains (catIncList[i])) { | 2175 | if ( !catList.contains (catIncList[i])) { |
2176 | catList.append( catIncList[i] ); | 2176 | catList.append( catIncList[i] ); |
2177 | //qDebug("add cat %s ", catIncList[i].latin1()); | 2177 | //qDebug("add cat %s ", catIncList[i].latin1()); |
2178 | ++count; | 2178 | ++count; |
2179 | } | 2179 | } |
2180 | } | 2180 | } |
2181 | } | 2181 | } |
2182 | catList.sort(); | 2182 | catList.sort(); |
2183 | KABPrefs::instance()->mCustomCategories = catList; | 2183 | KABPrefs::instance()->mCustomCategories = catList; |
2184 | KABPrefs::instance()->writeConfig(); | 2184 | KABPrefs::instance()->writeConfig(); |
2185 | message(QString::number( count )+ i18n(" categories added to list! ")); | 2185 | message(QString::number( count )+ i18n(" categories added to list! ")); |
2186 | } else { | 2186 | } else { |
2187 | QStringList catList = KABPrefs::instance()->mCustomCategories; | 2187 | QStringList catList = KABPrefs::instance()->mCustomCategories; |
2188 | QStringList catIncList; | 2188 | QStringList catIncList; |
2189 | QStringList newCatList; | 2189 | QStringList newCatList; |
2190 | KABC::AddressBook::Iterator it; | 2190 | KABC::AddressBook::Iterator it; |
2191 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { | 2191 | for( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { |
2192 | QStringList catIncList = (*it).categories(); | 2192 | QStringList catIncList = (*it).categories(); |
2193 | int i; | 2193 | int i; |
2194 | if ( catIncList.count() ) { | 2194 | if ( catIncList.count() ) { |
2195 | newCatList.clear(); | 2195 | newCatList.clear(); |
2196 | for( i = 0; i< catIncList.count(); ++i ) { | 2196 | for( i = 0; i< catIncList.count(); ++i ) { |
2197 | if ( catList.contains (catIncList[i])) { | 2197 | if ( catList.contains (catIncList[i])) { |
2198 | newCatList.append( catIncList[i] ); | 2198 | newCatList.append( catIncList[i] ); |
2199 | } | 2199 | } |
2200 | } | 2200 | } |
2201 | newCatList.sort(); | 2201 | newCatList.sort(); |
2202 | (*it).setCategories( newCatList ); | 2202 | (*it).setCategories( newCatList ); |
2203 | mAddressBook->insertAddressee( (*it) ); | 2203 | mAddressBook->insertAddressee( (*it) ); |
2204 | } | 2204 | } |
2205 | } | 2205 | } |
2206 | setModified( true ); | 2206 | setModified( true ); |
2207 | mViewManager->refreshView(); | 2207 | mViewManager->refreshView(); |
2208 | mDetails->refreshView(); | 2208 | mDetails->refreshView(); |
2209 | message( i18n("Removing categories done!")); | 2209 | message( i18n("Removing categories done!")); |
2210 | } | 2210 | } |