From f4dab230c4d9f9e2aca86df98d2ee7398f9988aa Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 8 Oct 2014 00:33:34 -0500 Subject: Push the top menu banner support patches from Bug 1499 These are disabled by default and need additional repair but this is a good start --- kcontrol/kicker/menutab.ui | 16 ++++++++++++++++ kcontrol/kicker/menutab_impl.cpp | 18 ++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) (limited to 'kcontrol') diff --git a/kcontrol/kicker/menutab.ui b/kcontrol/kicker/menutab.ui index aa488c1b0..5d3f8fcfe 100644 --- a/kcontrol/kicker/menutab.ui +++ b/kcontrol/kicker/menutab.ui @@ -286,6 +286,22 @@ <p><b>Tip</b>: You can customize the image that appears in the TDE Menu by putting an image file called kside.png and a tileable image file called kside_tile.png in $TDEHOME/share/apps/kicker/pics.</qt> + + + kcfg_UseTopPixmap + + + Show top ima&ge + + + true + + + <qt>When this option is selected an image will appear on top of the TDE Menu. The image will be tinted according to your color settings. + + <p><b>Tip</b>: You can customize the image that appears in the TDE Menu by putting image files called kside_top_left.png and kside_top_right.png, and a tileable image file called kside_top_tile.png in $TDEHOME/share/apps/kicker/pics.</qt> + + kcfg_ShowKMenuText diff --git a/kcontrol/kicker/menutab_impl.cpp b/kcontrol/kicker/menutab_impl.cpp index 6be59c475..fe20f2302 100644 --- a/kcontrol/kicker/menutab_impl.cpp +++ b/kcontrol/kicker/menutab_impl.cpp @@ -84,6 +84,11 @@ MenuTab::MenuTab( TQWidget *parent, const char* name ) //connect(kcfg_ButtonFont, TQT_SIGNAL(fontSelected(const TQFont &)), TQT_SLOT(kmenuChanged())); connect(maxrecentdocs, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(kmenuChanged())); + // FIXME + // When top pixmap support is ready for end-user visibility, replace + // the separate top/side checkboxes with either a drop down or radio buttons + kcfg_UseTopPixmap->hide(); + TDEIconLoader * ldr = TDEGlobal::iconLoader(); m_kmenu_icon = KickerSettings::customKMenuIcon(); if (m_kmenu_icon.isNull() == true) { @@ -109,7 +114,7 @@ void MenuTab::load() void MenuTab::load( bool useDefaults ) { TDESharedConfig::Ptr c = TDESharedConfig::openConfig(KickerConfig::the()->configName()); - + c->setReadDefaults( useDefaults ); c->setGroup("menus"); @@ -175,6 +180,7 @@ void MenuTab::menuStyleChanged() m_openOnHover->setEnabled(false); m_subMenus->setEnabled(true); kcfg_UseSidePixmap->setEnabled(true); + kcfg_UseTopPixmap->setEnabled(true); kcfg_UseTooltip->setEnabled(true); kcfg_MenuEntryFormat->setEnabled(true); kcfg_RecentVsOften->setEnabled(true); @@ -184,12 +190,13 @@ void MenuTab::menuStyleChanged() maxrecentdocs->setEnabled(true); kcfg_NumVisibleEntries->setEnabled(true); } - + // Kickoff Menu else { m_openOnHover->setEnabled(true); m_subMenus->setEnabled(false); kcfg_UseSidePixmap->setEnabled(false); + kcfg_UseTopPixmap->setEnabled(true); kcfg_UseTooltip->setEnabled(false); kcfg_MenuEntryFormat->setEnabled(false); kcfg_RecentVsOften->setEnabled(false); @@ -264,6 +271,13 @@ void MenuTab::save() forceRestart = true; } + bool toppixmapsetting = kcfg_UseTopPixmap->isChecked(); + bool oldtoppixmapsetting = c->readBoolEntry("UseTopPixmap", true); + + if (toppixmapsetting != oldtoppixmapsetting) { + forceRestart = true; + } + bool tooltipsetting = kcfg_UseTooltip->isChecked(); bool oldtooltipsetting = c->readBoolEntry("UseTooltip", false); -- cgit v1.2.1