|
Lines 51-56
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Link Here
|
| 51 |
#include <kstandarddirs.h> |
51 |
#include <kstandarddirs.h> |
| 52 |
#include <tdetoolbarbutton.h> |
52 |
#include <tdetoolbarbutton.h> |
| 53 |
#include <twin.h> |
53 |
#include <twin.h> |
|
|
54 |
#include <popupmenutop.h> |
| 54 |
|
55 |
|
| 55 |
#include "client_mnu.h" |
56 |
#include "client_mnu.h" |
| 56 |
#include "container_base.h" |
57 |
#include "container_base.h" |
|
Lines 156-162
void PanelKMenu::windowClearTimeout()
Link Here
|
| 156 |
|
157 |
|
| 157 |
bool PanelKMenu::loadSidePixmap() |
158 |
bool PanelKMenu::loadSidePixmap() |
| 158 |
{ |
159 |
{ |
| 159 |
if (!KickerSettings::useSidePixmap()) |
160 |
if (!KickerSettings::useSidePixmap() || KickerSettings::useTopSide()) |
| 160 |
{ |
161 |
{ |
| 161 |
return false; |
162 |
return false; |
| 162 |
} |
163 |
} |
|
Lines 754-761
void PanelKMenu::createRecentMenuItems()
Link Here
|
| 754 |
if (RecentApps.count() > 0) |
755 |
if (RecentApps.count() > 0) |
| 755 |
{ |
756 |
{ |
| 756 |
bool bSeparator = KickerSettings::showMenuTitles(); |
757 |
bool bSeparator = KickerSettings::showMenuTitles(); |
|
|
758 |
bool bTitleTop = KickerSettings::useTopSide(); |
| 757 |
int nId = serviceMenuEndId() + 1; |
759 |
int nId = serviceMenuEndId() + 1; |
| 758 |
int nIndex = KickerSettings::showMenuTitles() ? 1 : 0; |
760 |
|
|
|
761 |
int nIndex; |
| 762 |
if( bTitleTop ) { |
| 763 |
nIndex = KickerSettings::showMenuTitles() ? 2 : 0; |
| 764 |
} else { |
| 765 |
nIndex = KickerSettings::showMenuTitles() ? 1 : 0; |
| 766 |
} |
| 759 |
|
767 |
|
| 760 |
for (TQValueList<TQString>::ConstIterator it = |
768 |
for (TQValueList<TQString>::ConstIterator it = |
| 761 |
RecentApps.fromLast(); /*nop*/; --it) |
769 |
RecentApps.fromLast(); /*nop*/; --it) |
|
Lines 775-780
void PanelKMenu::createRecentMenuItems()
Link Here
|
| 775 |
RecentlyLaunchedApps::the().caption(), font()), |
783 |
RecentlyLaunchedApps::the().caption(), font()), |
| 776 |
serviceMenuEndId(), 0); |
784 |
serviceMenuEndId(), 0); |
| 777 |
setItemEnabled( id, false ); |
785 |
setItemEnabled( id, false ); |
|
|
786 |
if( bTitleTop) { |
| 787 |
id = insertItem(new PopupMenuTop(),serviceMenuEndId(),0); |
| 788 |
setItemEnabled( id, false ); |
| 789 |
} |
| 778 |
} |
790 |
} |
| 779 |
insertMenuItem(s, nId++, nIndex); |
791 |
insertMenuItem(s, nId++, nIndex); |
| 780 |
RecentlyLaunchedApps::the().m_nNumMenuItems++; |
792 |
RecentlyLaunchedApps::the().m_nNumMenuItems++; |
|
Lines 791-796
void PanelKMenu::createRecentMenuItems()
Link Here
|
| 791 |
insertSeparator(RecentlyLaunchedApps::the().m_nNumMenuItems); |
803 |
insertSeparator(RecentlyLaunchedApps::the().m_nNumMenuItems); |
| 792 |
} |
804 |
} |
| 793 |
} |
805 |
} |
|
|
806 |
else if(KickerSettings::useTopSide()) |
| 807 |
{ |
| 808 |
int id = insertItem(new PopupMenuTop(),serviceMenuEndId(),0); |
| 809 |
setItemEnabled( id, false ); |
| 810 |
} |
| 794 |
} |
811 |
} |
| 795 |
|
812 |
|
| 796 |
void PanelKMenu::clearSubmenus() |
813 |
void PanelKMenu::clearSubmenus() |
|
Lines 822-827
void PanelKMenu::updateRecent()
Link Here
|
| 822 |
|
839 |
|
| 823 |
RecentlyLaunchedApps::the().m_bNeedToUpdate = false; |
840 |
RecentlyLaunchedApps::the().m_bNeedToUpdate = false; |
| 824 |
|
841 |
|
|
|
842 |
bool bTitleTop = KickerSettings::useTopSide(); |
| 843 |
|
| 825 |
int nId = serviceMenuEndId() + 1; |
844 |
int nId = serviceMenuEndId() + 1; |
| 826 |
|
845 |
|
| 827 |
// remove previous items |
846 |
// remove previous items |
|
Lines 829-834
void PanelKMenu::updateRecent()
Link Here
|
| 829 |
{ |
848 |
{ |
| 830 |
// -1 --> menu title |
849 |
// -1 --> menu title |
| 831 |
int i = KickerSettings::showMenuTitles() ? -1 : 0; |
850 |
int i = KickerSettings::showMenuTitles() ? -1 : 0; |
|
|
851 |
if(bTitleTop) { |
| 852 |
i = KickerSettings::showMenuTitles() ? -2 : 0; |
| 853 |
} |
| 854 |
|
| 832 |
for (; i < RecentlyLaunchedApps::the().m_nNumMenuItems; i++) |
855 |
for (; i < RecentlyLaunchedApps::the().m_nNumMenuItems; i++) |
| 833 |
{ |
856 |
{ |
| 834 |
removeItem(nId + i); |
857 |
removeItem(nId + i); |
|
Lines 842-847
void PanelKMenu::updateRecent()
Link Here
|
| 842 |
} |
865 |
} |
| 843 |
} |
866 |
} |
| 844 |
|
867 |
|
|
|
868 |
if(bTitleTop) { |
| 869 |
removeItemAt(0); |
| 870 |
} |
| 871 |
|
| 845 |
// insert new items |
872 |
// insert new items |
| 846 |
TQStringList RecentApps; |
873 |
TQStringList RecentApps; |
| 847 |
RecentlyLaunchedApps::the().getRecentApps(RecentApps); |
874 |
RecentlyLaunchedApps::the().getRecentApps(RecentApps); |
|
Lines 866-871
void PanelKMenu::updateRecent()
Link Here
|
| 866 |
RecentlyLaunchedApps::the().caption(), |
893 |
RecentlyLaunchedApps::the().caption(), |
| 867 |
font()), nId - 1, 0); |
894 |
font()), nId - 1, 0); |
| 868 |
setItemEnabled( id, false ); |
895 |
setItemEnabled( id, false ); |
|
|
896 |
if(bTitleTop) { |
| 897 |
id = insertItem(new PopupMenuTop(),nId - 1,0); |
| 898 |
setItemEnabled( id, false ); |
| 899 |
} |
| 869 |
} |
900 |
} |
| 870 |
insertMenuItem(s, nId++, KickerSettings::showMenuTitles() ? |
901 |
insertMenuItem(s, nId++, KickerSettings::showMenuTitles() ? |
| 871 |
1 : 0); |
902 |
1 : 0); |
|
Lines 881-886
void PanelKMenu::updateRecent()
Link Here
|
| 881 |
insertSeparator(RecentlyLaunchedApps::the().m_nNumMenuItems); |
912 |
insertSeparator(RecentlyLaunchedApps::the().m_nNumMenuItems); |
| 882 |
} |
913 |
} |
| 883 |
} |
914 |
} |
|
|
915 |
else if(bTitleTop) |
| 916 |
{ |
| 917 |
int id = insertItem(new PopupMenuTop(),serviceMenuEndId(),0); |
| 918 |
setItemEnabled( id, false ); |
| 919 |
} |
| 884 |
} |
920 |
} |
| 885 |
|
921 |
|
| 886 |
void PanelKMenu::clearRecentMenuItems() |
922 |
void PanelKMenu::clearRecentMenuItems() |