-rw-r--r-- | kaddressbook/kabcore.cpp | 2 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index c4382d6..4c1d5da 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -1654,385 +1654,385 @@ void KABCore::initGUI() | |||
1654 | QHBoxLayout *topLayout = new QHBoxLayout( this ); | 1654 | QHBoxLayout *topLayout = new QHBoxLayout( this ); |
1655 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); | 1655 | //US topLayout->setSpacing( KDialogBase::spacingHint() ); |
1656 | topLayout->setSpacing( 10 ); | 1656 | topLayout->setSpacing( 10 ); |
1657 | 1657 | ||
1658 | // mDetailsSplitter = new QSplitter( this ); | 1658 | // mDetailsSplitter = new QSplitter( this ); |
1659 | 1659 | ||
1660 | QVBox *viewSpace = new QVBox( this ); | 1660 | QVBox *viewSpace = new QVBox( this ); |
1661 | 1661 | ||
1662 | mViewManager = new ViewManager( this, viewSpace ); | 1662 | mViewManager = new ViewManager( this, viewSpace ); |
1663 | viewSpace->setStretchFactor( mViewManager, 1 ); | 1663 | viewSpace->setStretchFactor( mViewManager, 1 ); |
1664 | 1664 | ||
1665 | mDetails = new ViewContainer( this ); | 1665 | mDetails = new ViewContainer( this ); |
1666 | 1666 | ||
1667 | topLayout->addWidget( viewSpace ); | 1667 | topLayout->addWidget( viewSpace ); |
1668 | // topLayout->setStretchFactor( mDetailsSplitter, 100 ); | 1668 | // topLayout->setStretchFactor( mDetailsSplitter, 100 ); |
1669 | topLayout->addWidget( mDetails ); | 1669 | topLayout->addWidget( mDetails ); |
1670 | #endif //KAB_NOSPLITTER | 1670 | #endif //KAB_NOSPLITTER |
1671 | */ | 1671 | */ |
1672 | 1672 | ||
1673 | syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); | 1673 | syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu); |
1674 | syncManager->setBlockSave(false); | 1674 | syncManager->setBlockSave(false); |
1675 | 1675 | ||
1676 | connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); | 1676 | connect(syncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); |
1677 | connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); | 1677 | connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); |
1678 | syncManager->setDefaultFileName( sentSyncFile()); | 1678 | syncManager->setDefaultFileName( sentSyncFile()); |
1679 | //connect(syncManager , SIGNAL( ), this, SLOT( ) ); | 1679 | //connect(syncManager , SIGNAL( ), this, SLOT( ) ); |
1680 | 1680 | ||
1681 | #endif //KAB_EMBEDDED | 1681 | #endif //KAB_EMBEDDED |
1682 | initActions(); | 1682 | initActions(); |
1683 | 1683 | ||
1684 | #ifdef KAB_EMBEDDED | 1684 | #ifdef KAB_EMBEDDED |
1685 | addActionsManually(); | 1685 | addActionsManually(); |
1686 | //US make sure the export and import menues are initialized before creating the xxPortManager. | 1686 | //US make sure the export and import menues are initialized before creating the xxPortManager. |
1687 | mXXPortManager = new XXPortManager( this, this ); | 1687 | mXXPortManager = new XXPortManager( this, this ); |
1688 | 1688 | ||
1689 | // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); | 1689 | // LR mIncSearchWidget = new IncSearchWidget( mMainWindow->getIconToolBar() ); |
1690 | //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); | 1690 | //mMainWindow->toolBar()->insertWidget(-1, 4, mIncSearchWidget); |
1691 | // mActionQuit->plug ( mMainWindow->toolBar()); | 1691 | // mActionQuit->plug ( mMainWindow->toolBar()); |
1692 | //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); | 1692 | //mIncSearchWidget = new IncSearchWidget( mMainWindow->toolBar() ); |
1693 | //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); | 1693 | //mMainWindow->toolBar()->insertWidget(-1, 0, mIncSearchWidget); |
1694 | // mIncSearchWidget->hide(); | 1694 | // mIncSearchWidget->hide(); |
1695 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), | 1695 | connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), |
1696 | SLOT( incrementalSearch( const QString& ) ) ); | 1696 | SLOT( incrementalSearch( const QString& ) ) ); |
1697 | connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) ); | 1697 | connect( mIncSearchWidget, SIGNAL( scrollUP() ),mViewManager, SLOT( scrollUP() ) ); |
1698 | connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) ); | 1698 | connect( mIncSearchWidget, SIGNAL( scrollDOWN() ),mViewManager, SLOT( scrollDOWN() ) ); |
1699 | 1699 | ||
1700 | mJumpButtonBar = new JumpButtonBar( this, this ); | 1700 | mJumpButtonBar = new JumpButtonBar( this, this ); |
1701 | 1701 | ||
1702 | topLayout->addWidget( mJumpButtonBar ); | 1702 | topLayout->addWidget( mJumpButtonBar ); |
1703 | //US topLayout->setStretchFactor( mJumpButtonBar, 10 ); | 1703 | //US topLayout->setStretchFactor( mJumpButtonBar, 10 ); |
1704 | 1704 | ||
1705 | // mMainWindow->getIconToolBar()->raise(); | 1705 | // mMainWindow->getIconToolBar()->raise(); |
1706 | 1706 | ||
1707 | #endif //KAB_EMBEDDED | 1707 | #endif //KAB_EMBEDDED |
1708 | 1708 | ||
1709 | } | 1709 | } |
1710 | void KABCore::initActions() | 1710 | void KABCore::initActions() |
1711 | { | 1711 | { |
1712 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); | 1712 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); |
1713 | 1713 | ||
1714 | #ifndef KAB_EMBEDDED | 1714 | #ifndef KAB_EMBEDDED |
1715 | connect( QApplication::clipboard(), SIGNAL( dataChanged() ), | 1715 | connect( QApplication::clipboard(), SIGNAL( dataChanged() ), |
1716 | SLOT( clipboardDataChanged() ) ); | 1716 | SLOT( clipboardDataChanged() ) ); |
1717 | #endif //KAB_EMBEDDED | 1717 | #endif //KAB_EMBEDDED |
1718 | 1718 | ||
1719 | // file menu | 1719 | // file menu |
1720 | if ( mIsPart ) { | 1720 | if ( mIsPart ) { |
1721 | mActionMail = new KAction( i18n( "&Mail" ), "mail_generic", 0, this, | 1721 | mActionMail = new KAction( i18n( "&Mail" ), "mail_generic", 0, this, |
1722 | SLOT( sendMail() ), actionCollection(), | 1722 | SLOT( sendMail() ), actionCollection(), |
1723 | "kaddressbook_mail" ); | 1723 | "kaddressbook_mail" ); |
1724 | mActionPrint = new KAction( i18n( "&Print" ), "fileprint", CTRL + Key_P, this, | 1724 | mActionPrint = new KAction( i18n( "&Print" ), "fileprint", CTRL + Key_P, this, |
1725 | SLOT( print() ), actionCollection(), "kaddressbook_print" ); | 1725 | SLOT( print() ), actionCollection(), "kaddressbook_print" ); |
1726 | 1726 | ||
1727 | } else { | 1727 | } else { |
1728 | mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); | 1728 | mActionMail = KStdAction::mail( this, SLOT( sendMail() ), actionCollection() ); |
1729 | mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); | 1729 | mActionPrint = KStdAction::print( this, SLOT( print() ), actionCollection() ); |
1730 | } | 1730 | } |
1731 | 1731 | ||
1732 | 1732 | ||
1733 | mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, | 1733 | mActionSave = new KAction( i18n( "&Save" ), "filesave", CTRL+Key_S, this, |
1734 | SLOT( save() ), actionCollection(), "file_sync" ); | 1734 | SLOT( save() ), actionCollection(), "file_sync" ); |
1735 | 1735 | ||
1736 | mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, | 1736 | mActionNewContact = new KAction( i18n( "&New Contact..." ), "filenew", CTRL+Key_N, this, |
1737 | SLOT( newContact() ), actionCollection(), "file_new_contact" ); | 1737 | SLOT( newContact() ), actionCollection(), "file_new_contact" ); |
1738 | 1738 | ||
1739 | mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, | 1739 | mActionMailVCard = new KAction(i18n("Mail &vCard..."), "mail_post_to", 0, |
1740 | this, SLOT( mailVCard() ), | 1740 | this, SLOT( mailVCard() ), |
1741 | actionCollection(), "file_mail_vcard"); | 1741 | actionCollection(), "file_mail_vcard"); |
1742 | 1742 | ||
1743 | mActionExport2phone = new KAction( i18n( "Selected to phone" ), "ex2phone", 0, this, | 1743 | mActionExport2phone = new KAction( i18n( "Selected to phone" ), "ex2phone", 0, this, |
1744 | SLOT( export2phone() ), actionCollection(), | 1744 | SLOT( export2phone() ), actionCollection(), |
1745 | "kaddressbook_ex2phone" ); | 1745 | "kaddressbook_ex2phone" ); |
1746 | 1746 | ||
1747 | mActionBeamVCard = 0; | 1747 | mActionBeamVCard = 0; |
1748 | mActionBeam = 0; | 1748 | mActionBeam = 0; |
1749 | 1749 | ||
1750 | #ifndef DESKTOP_VERSION | 1750 | #ifndef DESKTOP_VERSION |
1751 | if ( Ir::supported() ) { | 1751 | if ( Ir::supported() ) { |
1752 | mActionBeamVCard = new KAction( i18n( "Beam selected v&Card(s)" ), "beam", 0, this, | 1752 | mActionBeamVCard = new KAction( i18n( "Beam selected v&Card(s)" ), "beam", 0, this, |
1753 | SLOT( beamVCard() ), actionCollection(), | 1753 | SLOT( beamVCard() ), actionCollection(), |
1754 | "kaddressbook_beam_vcard" ); | 1754 | "kaddressbook_beam_vcard" ); |
1755 | 1755 | ||
1756 | mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, | 1756 | mActionBeam = new KAction( i18n( "&Beam personal vCard" ), "beam", 0, this, |
1757 | SLOT( beamMySelf() ), actionCollection(), | 1757 | SLOT( beamMySelf() ), actionCollection(), |
1758 | "kaddressbook_beam_myself" ); | 1758 | "kaddressbook_beam_myself" ); |
1759 | } | 1759 | } |
1760 | #endif | 1760 | #endif |
1761 | 1761 | ||
1762 | mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, | 1762 | mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, |
1763 | this, SLOT( editContact2() ), | 1763 | this, SLOT( editContact2() ), |
1764 | actionCollection(), "file_properties" ); | 1764 | actionCollection(), "file_properties" ); |
1765 | 1765 | ||
1766 | #ifdef KAB_EMBEDDED | 1766 | #ifdef KAB_EMBEDDED |
1767 | // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); | 1767 | // mActionQuit = KStdAction::quit( mMainWindow, SLOT( exit() ), actionCollection() ); |
1768 | mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, | 1768 | mActionQuit = new KAction( i18n( "&Exit" ), "exit", 0, |
1769 | mMainWindow, SLOT( exit() ), | 1769 | mMainWindow, SLOT( exit() ), |
1770 | actionCollection(), "quit" ); | 1770 | actionCollection(), "quit" ); |
1771 | #endif //KAB_EMBEDDED | 1771 | #endif //KAB_EMBEDDED |
1772 | 1772 | ||
1773 | // edit menu | 1773 | // edit menu |
1774 | if ( mIsPart ) { | 1774 | if ( mIsPart ) { |
1775 | mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, | 1775 | mActionCopy = new KAction( i18n( "&Copy" ), "editcopy", CTRL + Key_C, this, |
1776 | SLOT( copyContacts() ), actionCollection(), | 1776 | SLOT( copyContacts() ), actionCollection(), |
1777 | "kaddressbook_copy" ); | 1777 | "kaddressbook_copy" ); |
1778 | mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, | 1778 | mActionCut = new KAction( i18n( "Cu&t" ), "editcut", CTRL + Key_X, this, |
1779 | SLOT( cutContacts() ), actionCollection(), | 1779 | SLOT( cutContacts() ), actionCollection(), |
1780 | "kaddressbook_cut" ); | 1780 | "kaddressbook_cut" ); |
1781 | mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, | 1781 | mActionPaste = new KAction( i18n( "&Paste" ), "editpaste", CTRL + Key_V, this, |
1782 | SLOT( pasteContacts() ), actionCollection(), | 1782 | SLOT( pasteContacts() ), actionCollection(), |
1783 | "kaddressbook_paste" ); | 1783 | "kaddressbook_paste" ); |
1784 | mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, | 1784 | mActionSelectAll = new KAction( i18n( "Select &All" ), CTRL + Key_A, this, |
1785 | SLOT( selectAllContacts() ), actionCollection(), | 1785 | SLOT( selectAllContacts() ), actionCollection(), |
1786 | "kaddressbook_select_all" ); | 1786 | "kaddressbook_select_all" ); |
1787 | mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, | 1787 | mActionUndo = new KAction( i18n( "&Undo" ), "undo", CTRL + Key_Z, this, |
1788 | SLOT( undo() ), actionCollection(), | 1788 | SLOT( undo() ), actionCollection(), |
1789 | "kaddressbook_undo" ); | 1789 | "kaddressbook_undo" ); |
1790 | mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, | 1790 | mActionRedo = new KAction( i18n( "Re&do" ), "redo", CTRL + SHIFT + Key_Z, |
1791 | this, SLOT( redo() ), actionCollection(), | 1791 | this, SLOT( redo() ), actionCollection(), |
1792 | "kaddressbook_redo" ); | 1792 | "kaddressbook_redo" ); |
1793 | } else { | 1793 | } else { |
1794 | mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); | 1794 | mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); |
1795 | mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); | 1795 | mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); |
1796 | mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); | 1796 | mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); |
1797 | mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); | 1797 | mActionSelectAll = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); |
1798 | mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); | 1798 | mActionUndo = KStdAction::undo( this, SLOT( undo() ), actionCollection() ); |
1799 | mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); | 1799 | mActionRedo = KStdAction::redo( this, SLOT( redo() ), actionCollection() ); |
1800 | } | 1800 | } |
1801 | 1801 | ||
1802 | mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", | 1802 | mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", |
1803 | Key_Delete, this, SLOT( deleteContacts() ), | 1803 | Key_Delete, this, SLOT( deleteContacts() ), |
1804 | actionCollection(), "edit_delete" ); | 1804 | actionCollection(), "edit_delete" ); |
1805 | 1805 | ||
1806 | mActionUndo->setEnabled( false ); | 1806 | mActionUndo->setEnabled( false ); |
1807 | mActionRedo->setEnabled( false ); | 1807 | mActionRedo->setEnabled( false ); |
1808 | 1808 | ||
1809 | // settings menu | 1809 | // settings menu |
1810 | #ifdef KAB_EMBEDDED | 1810 | #ifdef KAB_EMBEDDED |
1811 | //US special menuentry to configure the addressbook resources. On KDE | 1811 | //US special menuentry to configure the addressbook resources. On KDE |
1812 | // you do that through the control center !!! | 1812 | // you do that through the control center !!! |
1813 | mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, | 1813 | mActionConfigResources = new KAction( i18n( "Configure &Resources..." ), "configure_resources", 0, this, |
1814 | SLOT( configureResources() ), actionCollection(), | 1814 | SLOT( configureResources() ), actionCollection(), |
1815 | "kaddressbook_configure_resources" ); | 1815 | "kaddressbook_configure_resources" ); |
1816 | #endif //KAB_EMBEDDED | 1816 | #endif //KAB_EMBEDDED |
1817 | 1817 | ||
1818 | if ( mIsPart ) { | 1818 | if ( mIsPart ) { |
1819 | mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, | 1819 | mActionConfigKAddressbook = new KAction( i18n( "&Configure KAddressBook..." ), "configure", 0, this, |
1820 | SLOT( openConfigDialog() ), actionCollection(), | 1820 | SLOT( openConfigDialog() ), actionCollection(), |
1821 | "kaddressbook_configure" ); | 1821 | "kaddressbook_configure" ); |
1822 | 1822 | ||
1823 | mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, | 1823 | mActionConfigShortcuts = new KAction( i18n( "Configure S&hortcuts..." ), "configure_shortcuts", 0, |
1824 | this, SLOT( configureKeyBindings() ), actionCollection(), | 1824 | this, SLOT( configureKeyBindings() ), actionCollection(), |
1825 | "kaddressbook_configure_shortcuts" ); | 1825 | "kaddressbook_configure_shortcuts" ); |
1826 | #ifdef KAB_EMBEDDED | 1826 | #ifdef KAB_EMBEDDED |
1827 | mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() ); | 1827 | mActionConfigureToolbars = KStdAction::configureToolbars( this, SLOT( mMainWindow->configureToolbars() ), actionCollection() ); |
1828 | mActionConfigureToolbars->setEnabled( false ); | 1828 | mActionConfigureToolbars->setEnabled( false ); |
1829 | #endif //KAB_EMBEDDED | 1829 | #endif //KAB_EMBEDDED |
1830 | 1830 | ||
1831 | } else { | 1831 | } else { |
1832 | mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() ); | 1832 | mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() ); |
1833 | 1833 | ||
1834 | mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() ); | 1834 | mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() ); |
1835 | } | 1835 | } |
1836 | 1836 | ||
1837 | mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, | 1837 | mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, |
1838 | actionCollection(), "options_show_jump_bar" ); | 1838 | actionCollection(), "options_show_jump_bar" ); |
1839 | connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBarVisible( bool ) ) ); | 1839 | connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBarVisible( bool ) ) ); |
1840 | 1840 | ||
1841 | mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0, | 1841 | mActionDetails = new KToggleAction( i18n( "Show Details" ), "listview", 0, |
1842 | actionCollection(), "options_show_details" ); | 1842 | actionCollection(), "options_show_details" ); |
1843 | connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) ); | 1843 | connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) ); |
1844 | 1844 | ||
1845 | 1845 | ||
1846 | mActionBR = new KToggleAction( i18n( "Beam receice enabled" ), "beam", 0, this, | 1846 | mActionBR = new KToggleAction( i18n( "Beam receive enabled" ), "beam", 0, this, |
1847 | SLOT( toggleBeamReceive() ), actionCollection(), | 1847 | SLOT( toggleBeamReceive() ), actionCollection(), |
1848 | "kaddressbook_beam_rec" ); | 1848 | "kaddressbook_beam_rec" ); |
1849 | 1849 | ||
1850 | 1850 | ||
1851 | // misc | 1851 | // misc |
1852 | // only enable LDAP lookup if we can handle the protocol | 1852 | // only enable LDAP lookup if we can handle the protocol |
1853 | #ifndef KAB_EMBEDDED | 1853 | #ifndef KAB_EMBEDDED |
1854 | if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { | 1854 | if ( KProtocolInfo::isKnownProtocol( KURL( "ldap://localhost" ) ) ) { |
1855 | new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, | 1855 | new KAction( i18n( "&Lookup Addresses in Directory" ), "find", 0, |
1856 | this, SLOT( openLDAPDialog() ), actionCollection(), | 1856 | this, SLOT( openLDAPDialog() ), actionCollection(), |
1857 | "ldap_lookup" ); | 1857 | "ldap_lookup" ); |
1858 | } | 1858 | } |
1859 | #else //KAB_EMBEDDED | 1859 | #else //KAB_EMBEDDED |
1860 | //qDebug("KABCore::initActions() LDAP has to be implemented"); | 1860 | //qDebug("KABCore::initActions() LDAP has to be implemented"); |
1861 | #endif //KAB_EMBEDDED | 1861 | #endif //KAB_EMBEDDED |
1862 | 1862 | ||
1863 | 1863 | ||
1864 | mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, | 1864 | mActionWhoAmI = new KAction( i18n( "Set Who Am I" ), "personal", 0, this, |
1865 | SLOT( setWhoAmI() ), actionCollection(), | 1865 | SLOT( setWhoAmI() ), actionCollection(), |
1866 | "set_personal" ); | 1866 | "set_personal" ); |
1867 | 1867 | ||
1868 | 1868 | ||
1869 | 1869 | ||
1870 | 1870 | ||
1871 | mActionCategories = new KAction( i18n( "Set Categories" ), 0, this, | 1871 | mActionCategories = new KAction( i18n( "Set Categories" ), 0, this, |
1872 | SLOT( setCategories() ), actionCollection(), | 1872 | SLOT( setCategories() ), actionCollection(), |
1873 | "edit_set_categories" ); | 1873 | "edit_set_categories" ); |
1874 | 1874 | ||
1875 | mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, | 1875 | mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this, |
1876 | SLOT( removeVoice() ), actionCollection(), | 1876 | SLOT( removeVoice() ), actionCollection(), |
1877 | "remove_voice" ); | 1877 | "remove_voice" ); |
1878 | mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, | 1878 | mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this, |
1879 | SLOT( importFromOL() ), actionCollection(), | 1879 | SLOT( importFromOL() ), actionCollection(), |
1880 | "import_OL" ); | 1880 | "import_OL" ); |
1881 | #ifdef KAB_EMBEDDED | 1881 | #ifdef KAB_EMBEDDED |
1882 | mActionLicence = new KAction( i18n( "Licence" ), 0, | 1882 | mActionLicence = new KAction( i18n( "Licence" ), 0, |
1883 | this, SLOT( showLicence() ), actionCollection(), | 1883 | this, SLOT( showLicence() ), actionCollection(), |
1884 | "licence_about_data" ); | 1884 | "licence_about_data" ); |
1885 | mActionFaq = new KAction( i18n( "Faq" ), 0, | 1885 | mActionFaq = new KAction( i18n( "Faq" ), 0, |
1886 | this, SLOT( faq() ), actionCollection(), | 1886 | this, SLOT( faq() ), actionCollection(), |
1887 | "faq_about_data" ); | 1887 | "faq_about_data" ); |
1888 | mActionWN = new KAction( i18n( "What's New?" ), 0, | 1888 | mActionWN = new KAction( i18n( "What's New?" ), 0, |
1889 | this, SLOT( whatsnew() ), actionCollection(), | 1889 | this, SLOT( whatsnew() ), actionCollection(), |
1890 | "wn" ); | 1890 | "wn" ); |
1891 | mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, | 1891 | mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, |
1892 | this, SLOT( synchowto() ), actionCollection(), | 1892 | this, SLOT( synchowto() ), actionCollection(), |
1893 | "sync" ); | 1893 | "sync" ); |
1894 | 1894 | ||
1895 | mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, | 1895 | mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, |
1896 | this, SLOT( createAboutData() ), actionCollection(), | 1896 | this, SLOT( createAboutData() ), actionCollection(), |
1897 | "kaddressbook_about_data" ); | 1897 | "kaddressbook_about_data" ); |
1898 | #endif //KAB_EMBEDDED | 1898 | #endif //KAB_EMBEDDED |
1899 | 1899 | ||
1900 | clipboardDataChanged(); | 1900 | clipboardDataChanged(); |
1901 | connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); | 1901 | connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); |
1902 | connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); | 1902 | connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) ); |
1903 | } | 1903 | } |
1904 | 1904 | ||
1905 | //US we need this function, to plug all actions into the correct menues. | 1905 | //US we need this function, to plug all actions into the correct menues. |
1906 | // KDE uses a XML format to plug the actions, but we work her without this overhead. | 1906 | // KDE uses a XML format to plug the actions, but we work her without this overhead. |
1907 | void KABCore::addActionsManually() | 1907 | void KABCore::addActionsManually() |
1908 | { | 1908 | { |
1909 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); | 1909 | //US qDebug("KABCore::initActions(): mIsPart %i", mIsPart); |
1910 | 1910 | ||
1911 | #ifdef KAB_EMBEDDED | 1911 | #ifdef KAB_EMBEDDED |
1912 | QPopupMenu *fileMenu = new QPopupMenu( this ); | 1912 | QPopupMenu *fileMenu = new QPopupMenu( this ); |
1913 | QPopupMenu *editMenu = new QPopupMenu( this ); | 1913 | QPopupMenu *editMenu = new QPopupMenu( this ); |
1914 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 1914 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
1915 | 1915 | ||
1916 | KToolBar* tb = mMainWindow->toolBar(); | 1916 | KToolBar* tb = mMainWindow->toolBar(); |
1917 | 1917 | ||
1918 | #ifdef DESKTOP_VERSION | 1918 | #ifdef DESKTOP_VERSION |
1919 | QMenuBar* mb = mMainWindow->menuBar(); | 1919 | QMenuBar* mb = mMainWindow->menuBar(); |
1920 | 1920 | ||
1921 | //US setup menubar. | 1921 | //US setup menubar. |
1922 | //Disable the following block if you do not want to have a menubar. | 1922 | //Disable the following block if you do not want to have a menubar. |
1923 | mb->insertItem( "&File", fileMenu ); | 1923 | mb->insertItem( "&File", fileMenu ); |
1924 | mb->insertItem( "&Edit", editMenu ); | 1924 | mb->insertItem( "&Edit", editMenu ); |
1925 | mb->insertItem( "&View", viewMenu ); | 1925 | mb->insertItem( "&View", viewMenu ); |
1926 | mb->insertItem( "&Settings", settingsMenu ); | 1926 | mb->insertItem( "&Settings", settingsMenu ); |
1927 | mb->insertItem( i18n("Synchronize"), syncMenu ); | 1927 | mb->insertItem( i18n("Synchronize"), syncMenu ); |
1928 | mb->insertItem( "&Change selected", changeMenu ); | 1928 | mb->insertItem( "&Change selected", changeMenu ); |
1929 | mb->insertItem( "&Help", helpMenu ); | 1929 | mb->insertItem( "&Help", helpMenu ); |
1930 | mIncSearchWidget = new IncSearchWidget( tb ); | 1930 | mIncSearchWidget = new IncSearchWidget( tb ); |
1931 | // tb->insertWidget(-1, 0, mIncSearchWidget); | 1931 | // tb->insertWidget(-1, 0, mIncSearchWidget); |
1932 | 1932 | ||
1933 | #else | 1933 | #else |
1934 | //US setup toolbar | 1934 | //US setup toolbar |
1935 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); | 1935 | QPEMenuBar *menuBarTB = new QPEMenuBar( tb ); |
1936 | QPopupMenu *popupBarTB = new QPopupMenu( this ); | 1936 | QPopupMenu *popupBarTB = new QPopupMenu( this ); |
1937 | menuBarTB->insertItem( "ME", popupBarTB); | 1937 | menuBarTB->insertItem( "ME", popupBarTB); |
1938 | tb->insertWidget(-1, 0, menuBarTB); | 1938 | tb->insertWidget(-1, 0, menuBarTB); |
1939 | mIncSearchWidget = new IncSearchWidget( tb ); | 1939 | mIncSearchWidget = new IncSearchWidget( tb ); |
1940 | 1940 | ||
1941 | tb->enableMoving(false); | 1941 | tb->enableMoving(false); |
1942 | popupBarTB->insertItem( "&File", fileMenu ); | 1942 | popupBarTB->insertItem( "&File", fileMenu ); |
1943 | popupBarTB->insertItem( "&Edit", editMenu ); | 1943 | popupBarTB->insertItem( "&Edit", editMenu ); |
1944 | popupBarTB->insertItem( "&View", viewMenu ); | 1944 | popupBarTB->insertItem( "&View", viewMenu ); |
1945 | popupBarTB->insertItem( "&Settings", settingsMenu ); | 1945 | popupBarTB->insertItem( "&Settings", settingsMenu ); |
1946 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); | 1946 | popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); |
1947 | mViewManager->getFilterAction()->plug ( popupBarTB); | 1947 | mViewManager->getFilterAction()->plug ( popupBarTB); |
1948 | popupBarTB->insertItem( "&Change selected", changeMenu ); | 1948 | popupBarTB->insertItem( "&Change selected", changeMenu ); |
1949 | popupBarTB->insertItem( "&Help", helpMenu ); | 1949 | popupBarTB->insertItem( "&Help", helpMenu ); |
1950 | if (QApplication::desktop()->width() > 320 ) { | 1950 | if (QApplication::desktop()->width() > 320 ) { |
1951 | // mViewManager->getFilterAction()->plug ( tb); | 1951 | // mViewManager->getFilterAction()->plug ( tb); |
1952 | } | 1952 | } |
1953 | #endif | 1953 | #endif |
1954 | // mActionQuit->plug ( mMainWindow->toolBar()); | 1954 | // mActionQuit->plug ( mMainWindow->toolBar()); |
1955 | 1955 | ||
1956 | 1956 | ||
1957 | 1957 | ||
1958 | //US Now connect the actions with the menue entries. | 1958 | //US Now connect the actions with the menue entries. |
1959 | mActionPrint->plug( fileMenu ); | 1959 | mActionPrint->plug( fileMenu ); |
1960 | mActionMail->plug( fileMenu ); | 1960 | mActionMail->plug( fileMenu ); |
1961 | fileMenu->insertSeparator(); | 1961 | fileMenu->insertSeparator(); |
1962 | 1962 | ||
1963 | mActionNewContact->plug( fileMenu ); | 1963 | mActionNewContact->plug( fileMenu ); |
1964 | mActionNewContact->plug( tb ); | 1964 | mActionNewContact->plug( tb ); |
1965 | 1965 | ||
1966 | mActionEditAddressee->plug( fileMenu ); | 1966 | mActionEditAddressee->plug( fileMenu ); |
1967 | if ((KGlobal::getDesktopSize() > KGlobal::Small ) || | 1967 | if ((KGlobal::getDesktopSize() > KGlobal::Small ) || |
1968 | (!KABPrefs::instance()->mMultipleViewsAtOnce )) | 1968 | (!KABPrefs::instance()->mMultipleViewsAtOnce )) |
1969 | mActionEditAddressee->plug( tb ); | 1969 | mActionEditAddressee->plug( tb ); |
1970 | 1970 | ||
1971 | fileMenu->insertSeparator(); | 1971 | fileMenu->insertSeparator(); |
1972 | mActionSave->plug( fileMenu ); | 1972 | mActionSave->plug( fileMenu ); |
1973 | fileMenu->insertItem( "&Import", ImportMenu ); | 1973 | fileMenu->insertItem( "&Import", ImportMenu ); |
1974 | fileMenu->insertItem( "&Export", ExportMenu ); | 1974 | fileMenu->insertItem( "&Export", ExportMenu ); |
1975 | fileMenu->insertSeparator(); | 1975 | fileMenu->insertSeparator(); |
1976 | mActionMailVCard->plug( fileMenu ); | 1976 | mActionMailVCard->plug( fileMenu ); |
1977 | #ifndef DESKTOP_VERSION | 1977 | #ifndef DESKTOP_VERSION |
1978 | if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu ); | 1978 | if ( Ir::supported() ) mActionBeamVCard->plug( fileMenu ); |
1979 | if ( Ir::supported() ) mActionBeam->plug(fileMenu ); | 1979 | if ( Ir::supported() ) mActionBeam->plug(fileMenu ); |
1980 | #endif | 1980 | #endif |
1981 | fileMenu->insertSeparator(); | 1981 | fileMenu->insertSeparator(); |
1982 | mActionQuit->plug( fileMenu ); | 1982 | mActionQuit->plug( fileMenu ); |
1983 | #ifdef _WIN32_ | 1983 | #ifdef _WIN32_ |
1984 | mActionImportOL->plug( ImportMenu ); | 1984 | mActionImportOL->plug( ImportMenu ); |
1985 | #endif | 1985 | #endif |
1986 | // edit menu | 1986 | // edit menu |
1987 | mActionUndo->plug( editMenu ); | 1987 | mActionUndo->plug( editMenu ); |
1988 | mActionRedo->plug( editMenu ); | 1988 | mActionRedo->plug( editMenu ); |
1989 | editMenu->insertSeparator(); | 1989 | editMenu->insertSeparator(); |
1990 | mActionCut->plug( editMenu ); | 1990 | mActionCut->plug( editMenu ); |
1991 | mActionCopy->plug( editMenu ); | 1991 | mActionCopy->plug( editMenu ); |
1992 | mActionPaste->plug( editMenu ); | 1992 | mActionPaste->plug( editMenu ); |
1993 | mActionDelete->plug( editMenu ); | 1993 | mActionDelete->plug( editMenu ); |
1994 | editMenu->insertSeparator(); | 1994 | editMenu->insertSeparator(); |
1995 | mActionSelectAll->plug( editMenu ); | 1995 | mActionSelectAll->plug( editMenu ); |
1996 | 1996 | ||
1997 | mActionRemoveVoice->plug( changeMenu ); | 1997 | mActionRemoveVoice->plug( changeMenu ); |
1998 | // settings menu | 1998 | // settings menu |
1999 | //US special menuentry to configure the addressbook resources. On KDE | 1999 | //US special menuentry to configure the addressbook resources. On KDE |
2000 | // you do that through the control center !!! | 2000 | // you do that through the control center !!! |
2001 | mActionConfigResources->plug( settingsMenu ); | 2001 | mActionConfigResources->plug( settingsMenu ); |
2002 | settingsMenu->insertSeparator(); | 2002 | settingsMenu->insertSeparator(); |
2003 | 2003 | ||
2004 | mActionConfigKAddressbook->plug( settingsMenu ); | 2004 | mActionConfigKAddressbook->plug( settingsMenu ); |
2005 | 2005 | ||
2006 | if ( mIsPart ) { | 2006 | if ( mIsPart ) { |
2007 | mActionConfigShortcuts->plug( settingsMenu ); | 2007 | mActionConfigShortcuts->plug( settingsMenu ); |
2008 | mActionConfigureToolbars->plug( settingsMenu ); | 2008 | mActionConfigureToolbars->plug( settingsMenu ); |
2009 | 2009 | ||
2010 | } else { | 2010 | } else { |
2011 | mActionKeyBindings->plug( settingsMenu ); | 2011 | mActionKeyBindings->plug( settingsMenu ); |
2012 | } | 2012 | } |
2013 | 2013 | ||
2014 | settingsMenu->insertSeparator(); | 2014 | settingsMenu->insertSeparator(); |
2015 | 2015 | ||
2016 | mActionJumpBar->plug( settingsMenu ); | 2016 | mActionJumpBar->plug( settingsMenu ); |
2017 | mActionDetails->plug( settingsMenu ); | 2017 | mActionDetails->plug( settingsMenu ); |
2018 | if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) | 2018 | if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop ) |
2019 | mActionDetails->plug( tb ); | 2019 | mActionDetails->plug( tb ); |
2020 | settingsMenu->insertSeparator(); | 2020 | settingsMenu->insertSeparator(); |
2021 | mActionBR->plug(settingsMenu ); | 2021 | mActionBR->plug(settingsMenu ); |
2022 | settingsMenu->insertSeparator(); | 2022 | settingsMenu->insertSeparator(); |
2023 | 2023 | ||
2024 | mActionWhoAmI->plug( settingsMenu ); | 2024 | mActionWhoAmI->plug( settingsMenu ); |
2025 | mActionCategories->plug( settingsMenu ); | 2025 | mActionCategories->plug( settingsMenu ); |
2026 | 2026 | ||
2027 | 2027 | ||
2028 | mActionWN->plug( helpMenu ); | 2028 | mActionWN->plug( helpMenu ); |
2029 | mActionSyncHowto->plug( helpMenu ); | 2029 | mActionSyncHowto->plug( helpMenu ); |
2030 | mActionLicence->plug( helpMenu ); | 2030 | mActionLicence->plug( helpMenu ); |
2031 | mActionFaq->plug( helpMenu ); | 2031 | mActionFaq->plug( helpMenu ); |
2032 | mActionAboutKAddressbook->plug( helpMenu ); | 2032 | mActionAboutKAddressbook->plug( helpMenu ); |
2033 | 2033 | ||
2034 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { | 2034 | if (KGlobal::getDesktopSize() > KGlobal::Small ) { |
2035 | 2035 | ||
2036 | mActionSave->plug( tb ); | 2036 | mActionSave->plug( tb ); |
2037 | mViewManager->getFilterAction()->plug ( tb); | 2037 | mViewManager->getFilterAction()->plug ( tb); |
2038 | if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { | 2038 | if (KGlobal::getDesktopSize() == KGlobal::Desktop ) { |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index e3dad94..fbfcd20 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -619,385 +619,385 @@ void MainWindow::initActions() | |||
619 | icon = loadPixmap( pathString + "day" ); | 619 | icon = loadPixmap( pathString + "day" ); |
620 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); | 620 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); |
621 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); | 621 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); |
622 | day1_action->addTo( viewMenu ); | 622 | day1_action->addTo( viewMenu ); |
623 | // action->addTo( toolBar ); | 623 | // action->addTo( toolBar ); |
624 | connect( day1_action, SIGNAL( activated() ), | 624 | connect( day1_action, SIGNAL( activated() ), |
625 | mView->viewManager(), SLOT( showDayView() ) ); | 625 | mView->viewManager(), SLOT( showDayView() ) ); |
626 | 626 | ||
627 | icon = loadPixmap( pathString + "workweek" ); | 627 | icon = loadPixmap( pathString + "workweek" ); |
628 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); | 628 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); |
629 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); | 629 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); |
630 | day5_action->addTo( viewMenu ); | 630 | day5_action->addTo( viewMenu ); |
631 | connect( day5_action, SIGNAL( activated() ), | 631 | connect( day5_action, SIGNAL( activated() ), |
632 | mView->viewManager(), SLOT( showWorkWeekView() ) ); | 632 | mView->viewManager(), SLOT( showWorkWeekView() ) ); |
633 | 633 | ||
634 | icon = loadPixmap( pathString + "week" ); | 634 | icon = loadPixmap( pathString + "week" ); |
635 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); | 635 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); |
636 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); | 636 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); |
637 | day7_action->addTo( viewMenu ); | 637 | day7_action->addTo( viewMenu ); |
638 | connect( day7_action, SIGNAL( activated() ), | 638 | connect( day7_action, SIGNAL( activated() ), |
639 | mView->viewManager(), SLOT( showWeekView() ) ); | 639 | mView->viewManager(), SLOT( showWeekView() ) ); |
640 | 640 | ||
641 | icon = loadPixmap( pathString + "month" ); | 641 | icon = loadPixmap( pathString + "month" ); |
642 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); | 642 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); |
643 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); | 643 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); |
644 | month_action->addTo( viewMenu ); | 644 | month_action->addTo( viewMenu ); |
645 | connect( month_action, SIGNAL( activated() ), | 645 | connect( month_action, SIGNAL( activated() ), |
646 | mView->viewManager(), SLOT( showMonthView() ) ); | 646 | mView->viewManager(), SLOT( showMonthView() ) ); |
647 | 647 | ||
648 | icon = loadPixmap( pathString + "todo" ); | 648 | icon = loadPixmap( pathString + "todo" ); |
649 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); | 649 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); |
650 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); | 650 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); |
651 | todoview_action->addTo( viewMenu ); | 651 | todoview_action->addTo( viewMenu ); |
652 | connect( todoview_action, SIGNAL( activated() ), | 652 | connect( todoview_action, SIGNAL( activated() ), |
653 | mView->viewManager(), SLOT( showTodoView() ) ); | 653 | mView->viewManager(), SLOT( showTodoView() ) ); |
654 | 654 | ||
655 | icon = loadPixmap( pathString + "journal" ); | 655 | icon = loadPixmap( pathString + "journal" ); |
656 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); | 656 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); |
657 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); | 657 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); |
658 | viewjournal_action->addTo( viewMenu ); | 658 | viewjournal_action->addTo( viewMenu ); |
659 | connect( viewjournal_action, SIGNAL( activated() ), | 659 | connect( viewjournal_action, SIGNAL( activated() ), |
660 | mView->viewManager(), SLOT( showJournalView() ) ); | 660 | mView->viewManager(), SLOT( showJournalView() ) ); |
661 | 661 | ||
662 | icon = loadPixmap( pathString + "xdays" ); | 662 | icon = loadPixmap( pathString + "xdays" ); |
663 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 ); | 663 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 ); |
664 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); | 664 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); |
665 | xdays_action->addTo( viewMenu ); | 665 | xdays_action->addTo( viewMenu ); |
666 | connect( xdays_action, SIGNAL( activated() ), | 666 | connect( xdays_action, SIGNAL( activated() ), |
667 | mView->viewManager(), SLOT( showNextXView() ) ); | 667 | mView->viewManager(), SLOT( showNextXView() ) ); |
668 | 668 | ||
669 | icon = loadPixmap( pathString + "whatsnext" ); | 669 | icon = loadPixmap( pathString + "whatsnext" ); |
670 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 ); | 670 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 ); |
671 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); | 671 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); |
672 | whatsnext_action->addTo( viewMenu ); | 672 | whatsnext_action->addTo( viewMenu ); |
673 | connect( whatsnext_action, SIGNAL( activated() ), | 673 | connect( whatsnext_action, SIGNAL( activated() ), |
674 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | 674 | mView->viewManager(), SLOT( showWhatsNextView() ) ); |
675 | 675 | ||
676 | #if 0 | 676 | #if 0 |
677 | action = new QAction( "view_timespan", "Time Span", 0, this ); | 677 | action = new QAction( "view_timespan", "Time Span", 0, this ); |
678 | action->addTo( viewMenu ); | 678 | action->addTo( viewMenu ); |
679 | connect( action, SIGNAL( activated() ), | 679 | connect( action, SIGNAL( activated() ), |
680 | mView->viewManager(), SLOT( showTimeSpanView() ) ); | 680 | mView->viewManager(), SLOT( showTimeSpanView() ) ); |
681 | #endif | 681 | #endif |
682 | 682 | ||
683 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, | 683 | mNewSubTodoAction = new QAction( "new_subtodo", i18n("New Sub-Todo..."), 0, |
684 | this ); | 684 | this ); |
685 | mNewSubTodoAction->addTo( actionMenu ); | 685 | mNewSubTodoAction->addTo( actionMenu ); |
686 | connect( mNewSubTodoAction, SIGNAL( activated() ), | 686 | connect( mNewSubTodoAction, SIGNAL( activated() ), |
687 | mView, SLOT( newSubTodo() ) ); | 687 | mView, SLOT( newSubTodo() ) ); |
688 | 688 | ||
689 | actionMenu->insertSeparator(); | 689 | actionMenu->insertSeparator(); |
690 | 690 | ||
691 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); | 691 | mShowAction = new QAction( "show_incidence", i18n("Show..."), 0, this ); |
692 | mShowAction->addTo( actionMenu ); | 692 | mShowAction->addTo( actionMenu ); |
693 | connect( mShowAction, SIGNAL( activated() ), | 693 | connect( mShowAction, SIGNAL( activated() ), |
694 | mView, SLOT( showIncidence() ) ); | 694 | mView, SLOT( showIncidence() ) ); |
695 | 695 | ||
696 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); | 696 | mEditAction = new QAction( "edit_incidence", i18n("Edit..."), 0, this ); |
697 | mEditAction->addTo( actionMenu ); | 697 | mEditAction->addTo( actionMenu ); |
698 | connect( mEditAction, SIGNAL( activated() ), | 698 | connect( mEditAction, SIGNAL( activated() ), |
699 | mView, SLOT( editIncidence() ) ); | 699 | mView, SLOT( editIncidence() ) ); |
700 | 700 | ||
701 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); | 701 | mDeleteAction = new QAction( "delete_incidence", i18n("Delete..."), 0, this ); |
702 | mDeleteAction->addTo( actionMenu ); | 702 | mDeleteAction->addTo( actionMenu ); |
703 | connect( mDeleteAction, SIGNAL( activated() ), | 703 | connect( mDeleteAction, SIGNAL( activated() ), |
704 | mView, SLOT( deleteIncidence() ) ); | 704 | mView, SLOT( deleteIncidence() ) ); |
705 | 705 | ||
706 | 706 | ||
707 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); | 707 | mCloneAction = new QAction( "clone_incidence", i18n("Clone..."), 0, this ); |
708 | mCloneAction->addTo( actionMenu ); | 708 | mCloneAction->addTo( actionMenu ); |
709 | connect( mCloneAction, SIGNAL( activated() ), | 709 | connect( mCloneAction, SIGNAL( activated() ), |
710 | mView, SLOT( cloneIncidence() ) ); | 710 | mView, SLOT( cloneIncidence() ) ); |
711 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); | 711 | mMoveAction = new QAction( "Move_incidence", i18n("Move..."), 0, this ); |
712 | mMoveAction->addTo( actionMenu ); | 712 | mMoveAction->addTo( actionMenu ); |
713 | connect( mMoveAction, SIGNAL( activated() ), | 713 | connect( mMoveAction, SIGNAL( activated() ), |
714 | mView, SLOT( moveIncidence() ) ); | 714 | mView, SLOT( moveIncidence() ) ); |
715 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); | 715 | mBeamAction = new QAction( "Beam_incidence", i18n("Beam..."), 0, this ); |
716 | mBeamAction->addTo( actionMenu ); | 716 | mBeamAction->addTo( actionMenu ); |
717 | connect( mBeamAction, SIGNAL( activated() ), | 717 | connect( mBeamAction, SIGNAL( activated() ), |
718 | mView, SLOT( beamIncidence() ) ); | 718 | mView, SLOT( beamIncidence() ) ); |
719 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); | 719 | mCancelAction = new QAction( "Cancel_incidence", i18n("Toggle Cancel"), 0, this ); |
720 | mCancelAction->addTo( actionMenu ); | 720 | mCancelAction->addTo( actionMenu ); |
721 | connect( mCancelAction, SIGNAL( activated() ), | 721 | connect( mCancelAction, SIGNAL( activated() ), |
722 | mView, SLOT( toggleCancelIncidence() ) ); | 722 | mView, SLOT( toggleCancelIncidence() ) ); |
723 | 723 | ||
724 | actionMenu->insertSeparator(); | 724 | actionMenu->insertSeparator(); |
725 | 725 | ||
726 | action = new QAction( "purge_completed", i18n("Purge Completed"), 0, | 726 | action = new QAction( "purge_completed", i18n("Purge Completed"), 0, |
727 | this ); | 727 | this ); |
728 | action->addTo( actionMenu ); | 728 | action->addTo( actionMenu ); |
729 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); | 729 | connect( action, SIGNAL( activated() ), mView, SLOT( purgeCompleted() ) ); |
730 | 730 | ||
731 | icon = loadPixmap( pathString + "search" ); | 731 | icon = loadPixmap( pathString + "search" ); |
732 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); | 732 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); |
733 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4); | 733 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4); |
734 | search_action->addTo( actionMenu ); | 734 | search_action->addTo( actionMenu ); |
735 | connect( search_action, SIGNAL( activated() ), | 735 | connect( search_action, SIGNAL( activated() ), |
736 | mView->dialogManager(), SLOT( showSearchDialog() ) ); | 736 | mView->dialogManager(), SLOT( showSearchDialog() ) ); |
737 | 737 | ||
738 | icon = loadPixmap( pathString + "today" ); | 738 | icon = loadPixmap( pathString + "today" ); |
739 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); | 739 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); |
740 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 740 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
741 | today_action->addTo( actionMenu ); | 741 | today_action->addTo( actionMenu ); |
742 | connect( today_action, SIGNAL( activated() ), | 742 | connect( today_action, SIGNAL( activated() ), |
743 | mView, SLOT( goToday() ) ); | 743 | mView, SLOT( goToday() ) ); |
744 | 744 | ||
745 | if ( KOPrefs::instance()->mShowFullMenu ) { | 745 | if ( KOPrefs::instance()->mShowFullMenu ) { |
746 | actionMenu->insertSeparator(); | 746 | actionMenu->insertSeparator(); |
747 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); | 747 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); |
748 | 748 | ||
749 | } | 749 | } |
750 | // actionMenu->insertSeparator(); | 750 | // actionMenu->insertSeparator(); |
751 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, | 751 | action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, |
752 | this ); | 752 | this ); |
753 | action->addTo( importMenu ); | 753 | action->addTo( importMenu ); |
754 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); | 754 | connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); |
755 | action = new QAction( "import_quick", i18n("Import last file"), 0, | 755 | action = new QAction( "import_quick", i18n("Import last file"), 0, |
756 | this ); | 756 | this ); |
757 | action->addTo( importMenu ); | 757 | action->addTo( importMenu ); |
758 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); | 758 | connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); |
759 | importMenu->insertSeparator(); | 759 | importMenu->insertSeparator(); |
760 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, | 760 | action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, |
761 | this ); | 761 | this ); |
762 | action->addTo( importMenu ); | 762 | action->addTo( importMenu ); |
763 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); | 763 | connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); |
764 | #ifndef DESKTOP_VERSION | 764 | #ifndef DESKTOP_VERSION |
765 | importMenu->insertSeparator(); | 765 | importMenu->insertSeparator(); |
766 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, | 766 | action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, |
767 | this ); | 767 | this ); |
768 | action->addTo( importMenu ); | 768 | action->addTo( importMenu ); |
769 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); | 769 | connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); |
770 | #else | 770 | #else |
771 | #ifdef _WIN32_ | 771 | #ifdef _WIN32_ |
772 | importMenu->insertSeparator(); | 772 | importMenu->insertSeparator(); |
773 | action = new QAction( "import_ol", i18n("Import from OL"), 0, | 773 | action = new QAction( "import_ol", i18n("Import from OL"), 0, |
774 | this ); | 774 | this ); |
775 | action->addTo( importMenu ); | 775 | action->addTo( importMenu ); |
776 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); | 776 | connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); |
777 | #endif | 777 | #endif |
778 | #endif | 778 | #endif |
779 | 779 | ||
780 | importMenu->insertSeparator(); | 780 | importMenu->insertSeparator(); |
781 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, | 781 | action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, |
782 | this ); | 782 | this ); |
783 | action->addTo( importMenu ); | 783 | action->addTo( importMenu ); |
784 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); | 784 | connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); |
785 | 785 | ||
786 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, | 786 | action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, |
787 | this ); | 787 | this ); |
788 | action->addTo( importMenu ); | 788 | action->addTo( importMenu ); |
789 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); | 789 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); |
790 | 790 | ||
791 | importMenu->insertSeparator(); | 791 | importMenu->insertSeparator(); |
792 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, | 792 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, |
793 | this ); | 793 | this ); |
794 | action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); | 794 | action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); |
795 | 795 | ||
796 | 796 | ||
797 | //LR | 797 | //LR |
798 | QPopupMenu *ex2phone = new QPopupMenu( this ); | 798 | QPopupMenu *ex2phone = new QPopupMenu( this ); |
799 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 799 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
800 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 800 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
801 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); | 801 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); |
802 | importMenu->insertItem( i18n("Export to phone"), ex2phone ); | 802 | importMenu->insertItem( i18n("Export to phone"), ex2phone ); |
803 | 803 | ||
804 | importMenu->insertSeparator(); | 804 | importMenu->insertSeparator(); |
805 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, | 805 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, |
806 | this ); | 806 | this ); |
807 | action->addTo( importMenu ); | 807 | action->addTo( importMenu ); |
808 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 808 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
809 | #ifndef DESKTOP_VERSION | 809 | #ifndef DESKTOP_VERSION |
810 | importMenu->insertSeparator(); | 810 | importMenu->insertSeparator(); |
811 | brAction = new QAction( "beam toggle", i18n("Beam receice enabled"), 0, | 811 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, |
812 | this ); | 812 | this ); |
813 | brAction->addTo( importMenu ); | 813 | brAction->addTo( importMenu ); |
814 | brAction->setToggleAction (true ) ; | 814 | brAction->setToggleAction (true ) ; |
815 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); | 815 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); |
816 | 816 | ||
817 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, | 817 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, |
818 | this ); | 818 | this ); |
819 | action->addTo( importMenu ); | 819 | action->addTo( importMenu ); |
820 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); | 820 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); |
821 | 821 | ||
822 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 822 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, |
823 | this ); | 823 | this ); |
824 | action->addTo( importMenu ); | 824 | action->addTo( importMenu ); |
825 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); | 825 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); |
826 | #else | 826 | #else |
827 | importMenu->insertSeparator(); | 827 | importMenu->insertSeparator(); |
828 | icon = loadPixmap( pathString + "print" ); | 828 | icon = loadPixmap( pathString + "print" ); |
829 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 829 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
830 | action->addTo( importMenu ); | 830 | action->addTo( importMenu ); |
831 | connect( action, SIGNAL( activated() ), | 831 | connect( action, SIGNAL( activated() ), |
832 | this, SLOT( printCal() ) ); | 832 | this, SLOT( printCal() ) ); |
833 | 833 | ||
834 | icon = loadPixmap( pathString + "print" ); | 834 | icon = loadPixmap( pathString + "print" ); |
835 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); | 835 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); |
836 | action->addTo( importMenu ); | 836 | action->addTo( importMenu ); |
837 | connect( action, SIGNAL( activated() ), | 837 | connect( action, SIGNAL( activated() ), |
838 | this, SLOT( printSel() ) ); | 838 | this, SLOT( printSel() ) ); |
839 | #endif | 839 | #endif |
840 | importMenu->insertSeparator(); | 840 | importMenu->insertSeparator(); |
841 | action = new QAction( "beam all", i18n("Save"), 0, | 841 | action = new QAction( "beam all", i18n("Save"), 0, |
842 | this ); | 842 | this ); |
843 | action->addTo( importMenu ); | 843 | action->addTo( importMenu ); |
844 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); | 844 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); |
845 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, | 845 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, |
846 | this ); | 846 | this ); |
847 | action->addTo( importMenu ); | 847 | action->addTo( importMenu ); |
848 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); | 848 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); |
849 | 849 | ||
850 | //menuBar->insertItem( "Configure",configureMenu ); | 850 | //menuBar->insertItem( "Configure",configureMenu ); |
851 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); | 851 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); |
852 | icon = loadPixmap( "korganizer/korganizer" ); | 852 | icon = loadPixmap( "korganizer/korganizer" ); |
853 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); | 853 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); |
854 | action->addTo( helpMenu ); | 854 | action->addTo( helpMenu ); |
855 | connect( action, SIGNAL( activated() ), | 855 | connect( action, SIGNAL( activated() ), |
856 | SLOT( keyBindings() ) ); | 856 | SLOT( keyBindings() ) ); |
857 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); | 857 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); |
858 | action->addTo( helpMenu ); | 858 | action->addTo( helpMenu ); |
859 | connect( action, SIGNAL( activated() ), | 859 | connect( action, SIGNAL( activated() ), |
860 | SLOT( features() ) ); | 860 | SLOT( features() ) ); |
861 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); | 861 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); |
862 | action->addTo( helpMenu ); | 862 | action->addTo( helpMenu ); |
863 | connect( action, SIGNAL( activated() ), | 863 | connect( action, SIGNAL( activated() ), |
864 | SLOT( aboutAutoSaving() ) ); | 864 | SLOT( aboutAutoSaving() ) ); |
865 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); | 865 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); |
866 | action->addTo( helpMenu ); | 866 | action->addTo( helpMenu ); |
867 | connect( action, SIGNAL( activated() ), | 867 | connect( action, SIGNAL( activated() ), |
868 | SLOT( aboutKnownBugs() ) ); | 868 | SLOT( aboutKnownBugs() ) ); |
869 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); | 869 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); |
870 | action->addTo( helpMenu ); | 870 | action->addTo( helpMenu ); |
871 | connect( action, SIGNAL( activated() ), | 871 | connect( action, SIGNAL( activated() ), |
872 | SLOT( usertrans() ) ); | 872 | SLOT( usertrans() ) ); |
873 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); | 873 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); |
874 | action->addTo( helpMenu ); | 874 | action->addTo( helpMenu ); |
875 | connect( action, SIGNAL( activated() ), | 875 | connect( action, SIGNAL( activated() ), |
876 | SLOT( synchowto() ) ); | 876 | SLOT( synchowto() ) ); |
877 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); | 877 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); |
878 | action->addTo( helpMenu ); | 878 | action->addTo( helpMenu ); |
879 | connect( action, SIGNAL( activated() ), | 879 | connect( action, SIGNAL( activated() ), |
880 | SLOT( whatsNew() ) ); | 880 | SLOT( whatsNew() ) ); |
881 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); | 881 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); |
882 | action->addTo( helpMenu ); | 882 | action->addTo( helpMenu ); |
883 | connect( action, SIGNAL( activated() ), | 883 | connect( action, SIGNAL( activated() ), |
884 | SLOT( faq() ) ); | 884 | SLOT( faq() ) ); |
885 | 885 | ||
886 | 886 | ||
887 | action = new QAction( "about", i18n("About..."), 0, this ); | 887 | action = new QAction( "about", i18n("About..."), 0, this ); |
888 | action->addTo( helpMenu ); | 888 | action->addTo( helpMenu ); |
889 | connect( action, SIGNAL( activated() ), | 889 | connect( action, SIGNAL( activated() ), |
890 | SLOT( about() ) ); | 890 | SLOT( about() ) ); |
891 | action = new QAction( "licence", i18n("Licence..."), 0, this ); | 891 | action = new QAction( "licence", i18n("Licence..."), 0, this ); |
892 | action->addTo( helpMenu ); | 892 | action->addTo( helpMenu ); |
893 | connect( action, SIGNAL( activated() ), | 893 | connect( action, SIGNAL( activated() ), |
894 | SLOT( licence() ) ); | 894 | SLOT( licence() ) ); |
895 | //menuBar->insertSeparator(); | 895 | //menuBar->insertSeparator(); |
896 | 896 | ||
897 | // ****************************************************** | 897 | // ****************************************************** |
898 | // menubar icons | 898 | // menubar icons |
899 | 899 | ||
900 | 900 | ||
901 | iconToolBar->setHorizontalStretchable (true ); | 901 | iconToolBar->setHorizontalStretchable (true ); |
902 | //menuBar->insertItem( iconToolBar ); | 902 | //menuBar->insertItem( iconToolBar ); |
903 | //xdays_action | 903 | //xdays_action |
904 | if (p-> mShowIconNewEvent) | 904 | if (p-> mShowIconNewEvent) |
905 | ne_action->addTo( iconToolBar ); | 905 | ne_action->addTo( iconToolBar ); |
906 | if (p->mShowIconNewTodo ) | 906 | if (p->mShowIconNewTodo ) |
907 | nt_action->addTo( iconToolBar ); | 907 | nt_action->addTo( iconToolBar ); |
908 | if (p-> mShowIconSearch) | 908 | if (p-> mShowIconSearch) |
909 | search_action->addTo( iconToolBar ); | 909 | search_action->addTo( iconToolBar ); |
910 | if (p-> mShowIconNext) | 910 | if (p-> mShowIconNext) |
911 | whatsnext_action->addTo( iconToolBar ); | 911 | whatsnext_action->addTo( iconToolBar ); |
912 | if (p-> mShowIconNextDays) | 912 | if (p-> mShowIconNextDays) |
913 | xdays_action->addTo( iconToolBar ); | 913 | xdays_action->addTo( iconToolBar ); |
914 | if (p-> mShowIconList) | 914 | if (p-> mShowIconList) |
915 | showlist_action->addTo( iconToolBar ); | 915 | showlist_action->addTo( iconToolBar ); |
916 | if (p-> mShowIconDay1) | 916 | if (p-> mShowIconDay1) |
917 | day1_action->addTo( iconToolBar ); | 917 | day1_action->addTo( iconToolBar ); |
918 | if (p-> mShowIconDay5) | 918 | if (p-> mShowIconDay5) |
919 | day5_action->addTo( iconToolBar ); | 919 | day5_action->addTo( iconToolBar ); |
920 | if (p-> mShowIconDay7) | 920 | if (p-> mShowIconDay7) |
921 | day7_action->addTo( iconToolBar ); | 921 | day7_action->addTo( iconToolBar ); |
922 | if (p-> mShowIconMonth) | 922 | if (p-> mShowIconMonth) |
923 | month_action->addTo( iconToolBar ); | 923 | month_action->addTo( iconToolBar ); |
924 | if (p-> mShowIconTodoview) | 924 | if (p-> mShowIconTodoview) |
925 | todoview_action->addTo( iconToolBar ); | 925 | todoview_action->addTo( iconToolBar ); |
926 | if (p-> mShowIconJournal) | 926 | if (p-> mShowIconJournal) |
927 | viewjournal_action->addTo( iconToolBar ); | 927 | viewjournal_action->addTo( iconToolBar ); |
928 | icon = loadPixmap( pathString + "2leftarrowB" ); | 928 | icon = loadPixmap( pathString + "2leftarrowB" ); |
929 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); | 929 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); |
930 | if (p-> mShowIconBackFast) { | 930 | if (p-> mShowIconBackFast) { |
931 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); | 931 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); |
932 | connect( action, SIGNAL( activated() ), | 932 | connect( action, SIGNAL( activated() ), |
933 | mView, SLOT( goPreviousMonth() ) ); | 933 | mView, SLOT( goPreviousMonth() ) ); |
934 | action->addTo( iconToolBar ); | 934 | action->addTo( iconToolBar ); |
935 | } | 935 | } |
936 | icon = loadPixmap( pathString + "1leftarrowB" ); | 936 | icon = loadPixmap( pathString + "1leftarrowB" ); |
937 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); | 937 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); |
938 | if (p-> mShowIconBack) { | 938 | if (p-> mShowIconBack) { |
939 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); | 939 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); |
940 | connect( action, SIGNAL( activated() ), | 940 | connect( action, SIGNAL( activated() ), |
941 | mView, SLOT( goPrevious() ) ); | 941 | mView, SLOT( goPrevious() ) ); |
942 | action->addTo( iconToolBar ); | 942 | action->addTo( iconToolBar ); |
943 | } | 943 | } |
944 | if (p-> mShowIconToday) | 944 | if (p-> mShowIconToday) |
945 | today_action->addTo( iconToolBar ); | 945 | today_action->addTo( iconToolBar ); |
946 | icon = loadPixmap( pathString + "1rightarrowB" ); | 946 | icon = loadPixmap( pathString + "1rightarrowB" ); |
947 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); | 947 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); |
948 | if (p-> mShowIconForward) { | 948 | if (p-> mShowIconForward) { |
949 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); | 949 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); |
950 | connect( action, SIGNAL( activated() ), | 950 | connect( action, SIGNAL( activated() ), |
951 | mView, SLOT( goNext() ) ); | 951 | mView, SLOT( goNext() ) ); |
952 | action->addTo( iconToolBar ); | 952 | action->addTo( iconToolBar ); |
953 | } | 953 | } |
954 | icon = loadPixmap( pathString + "2rightarrowB" ); | 954 | icon = loadPixmap( pathString + "2rightarrowB" ); |
955 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); | 955 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); |
956 | if (p-> mShowIconForwardFast) { | 956 | if (p-> mShowIconForwardFast) { |
957 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); | 957 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); |
958 | connect( action, SIGNAL( activated() ), | 958 | connect( action, SIGNAL( activated() ), |
959 | mView, SLOT( goNextMonth() ) ); | 959 | mView, SLOT( goNextMonth() ) ); |
960 | action->addTo( iconToolBar ); | 960 | action->addTo( iconToolBar ); |
961 | } | 961 | } |
962 | 962 | ||
963 | 963 | ||
964 | configureToolBarMenu->insertItem(i18n("What's This?"), 300); | 964 | configureToolBarMenu->insertItem(i18n("What's This?"), 300); |
965 | 965 | ||
966 | if (p-> mShowIconNewEvent) | 966 | if (p-> mShowIconNewEvent) |
967 | configureToolBarMenu->setItemChecked( 10, true ); | 967 | configureToolBarMenu->setItemChecked( 10, true ); |
968 | if (p->mShowIconNewTodo ) | 968 | if (p->mShowIconNewTodo ) |
969 | configureToolBarMenu->setItemChecked( 20, true ); | 969 | configureToolBarMenu->setItemChecked( 20, true ); |
970 | if (p-> mShowIconSearch) | 970 | if (p-> mShowIconSearch) |
971 | configureToolBarMenu->setItemChecked( 120, true ); | 971 | configureToolBarMenu->setItemChecked( 120, true ); |
972 | if (p-> mShowIconList) | 972 | if (p-> mShowIconList) |
973 | configureToolBarMenu->setItemChecked( 30, true ); | 973 | configureToolBarMenu->setItemChecked( 30, true ); |
974 | if (p-> mShowIconDay1) | 974 | if (p-> mShowIconDay1) |
975 | configureToolBarMenu->setItemChecked( 40, true ); | 975 | configureToolBarMenu->setItemChecked( 40, true ); |
976 | if (p-> mShowIconDay5) | 976 | if (p-> mShowIconDay5) |
977 | configureToolBarMenu->setItemChecked( 50, true ); | 977 | configureToolBarMenu->setItemChecked( 50, true ); |
978 | if (p-> mShowIconDay7) | 978 | if (p-> mShowIconDay7) |
979 | configureToolBarMenu->setItemChecked( 60, true ); | 979 | configureToolBarMenu->setItemChecked( 60, true ); |
980 | if (p-> mShowIconMonth) | 980 | if (p-> mShowIconMonth) |
981 | configureToolBarMenu->setItemChecked( 70, true ); | 981 | configureToolBarMenu->setItemChecked( 70, true ); |
982 | if (p-> mShowIconTodoview) | 982 | if (p-> mShowIconTodoview) |
983 | configureToolBarMenu->setItemChecked( 80, true ); | 983 | configureToolBarMenu->setItemChecked( 80, true ); |
984 | if (p-> mShowIconBackFast) | 984 | if (p-> mShowIconBackFast) |
985 | configureToolBarMenu->setItemChecked( 200, true ); | 985 | configureToolBarMenu->setItemChecked( 200, true ); |
986 | if (p-> mShowIconBack) | 986 | if (p-> mShowIconBack) |
987 | configureToolBarMenu->setItemChecked( 210, true ); | 987 | configureToolBarMenu->setItemChecked( 210, true ); |
988 | if (p-> mShowIconToday) | 988 | if (p-> mShowIconToday) |
989 | configureToolBarMenu->setItemChecked( 130, true ); | 989 | configureToolBarMenu->setItemChecked( 130, true ); |
990 | if (p-> mShowIconForward) | 990 | if (p-> mShowIconForward) |
991 | configureToolBarMenu->setItemChecked( 220, true ); | 991 | configureToolBarMenu->setItemChecked( 220, true ); |
992 | if (p-> mShowIconForwardFast) | 992 | if (p-> mShowIconForwardFast) |
993 | configureToolBarMenu->setItemChecked( 230, true ); | 993 | configureToolBarMenu->setItemChecked( 230, true ); |
994 | if (p-> mShowIconNextDays) | 994 | if (p-> mShowIconNextDays) |
995 | configureToolBarMenu->setItemChecked( 100, true ); | 995 | configureToolBarMenu->setItemChecked( 100, true ); |
996 | if (p-> mShowIconNext) | 996 | if (p-> mShowIconNext) |
997 | configureToolBarMenu->setItemChecked( 110, true ); | 997 | configureToolBarMenu->setItemChecked( 110, true ); |
998 | if (p-> mShowIconJournal) | 998 | if (p-> mShowIconJournal) |
999 | configureToolBarMenu->setItemChecked( 90, true ); | 999 | configureToolBarMenu->setItemChecked( 90, true ); |
1000 | if (p-> mShowIconWhatsThis) | 1000 | if (p-> mShowIconWhatsThis) |
1001 | configureToolBarMenu->setItemChecked( 300, true ); | 1001 | configureToolBarMenu->setItemChecked( 300, true ); |
1002 | 1002 | ||
1003 | QLabel* dummy = new QLabel( iconToolBar ); | 1003 | QLabel* dummy = new QLabel( iconToolBar ); |