summaryrefslogtreecommitdiffstats
path: root/kicker
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2014-10-08 00:33:34 -0500
committerTimothy Pearson <[email protected]>2014-10-08 00:33:34 -0500
commitf4dab230c4d9f9e2aca86df98d2ee7398f9988aa (patch)
tree0d2b9292ae4ba365aab22c59a2de05146e407ee7 /kicker
parent4724b1a838bf20c85309d8812c1a0bd23bbf2f90 (diff)
downloadtdebase-f4dab230c4d9f9e2aca86df98d2ee7398f9988aa.tar.gz
tdebase-f4dab230c4d9f9e2aca86df98d2ee7398f9988aa.zip
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
Diffstat (limited to 'kicker')
-rw-r--r--kicker/data/kmenu_side/CMakeLists.txt2
-rw-r--r--kicker/data/kmenu_side/Makefile.am2
-rw-r--r--kicker/data/kmenu_side/kside_top_left.pngbin0 -> 178 bytes
-rw-r--r--kicker/data/kmenu_side/kside_top_right.pngbin0 -> 204 bytes
-rw-r--r--kicker/data/kmenu_side/kside_top_tile.pngbin0 -> 158 bytes
-rw-r--r--kicker/kicker/ui/CMakeLists.txt2
-rw-r--r--kicker/kicker/ui/Makefile.am2
-rw-r--r--kicker/kicker/ui/k_mnu.cpp40
-rw-r--r--kicker/libkicker/kickerSettings.kcfg38
9 files changed, 71 insertions, 15 deletions
diff --git a/kicker/data/kmenu_side/CMakeLists.txt b/kicker/data/kmenu_side/CMakeLists.txt
index 4207e1361..197db4e39 100644
--- a/kicker/data/kmenu_side/CMakeLists.txt
+++ b/kicker/data/kmenu_side/CMakeLists.txt
@@ -9,4 +9,4 @@
#
#################################################
-install( FILES kside.png kside_tile.png DESTINATION ${DATA_INSTALL_DIR}/kicker/pics )
+install( FILES kside.png kside_tile.png kside_top_left.png kside_top_right.png kside_top_tile.png DESTINATION ${DATA_INSTALL_DIR}/kicker/pics )
diff --git a/kicker/data/kmenu_side/Makefile.am b/kicker/data/kmenu_side/Makefile.am
index 2d3e00932..3df9240ea 100644
--- a/kicker/data/kmenu_side/Makefile.am
+++ b/kicker/data/kmenu_side/Makefile.am
@@ -1,4 +1,4 @@
-kicker_kmenuside_pics_data_DATA = kside.png kside_tile.png
+kicker_kmenuside_pics_data_DATA = kside.png kside_tile.png kside_top_left.png kside_top_right.png kside_top_tile.png
kicker_kmenuside_pics_datadir = $(kde_datadir)/kicker/pics
EXTRA_DIST = $(kicker_kmenuside_pics_data_DATA)
diff --git a/kicker/data/kmenu_side/kside_top_left.png b/kicker/data/kmenu_side/kside_top_left.png
new file mode 100644
index 000000000..38a527aef
--- /dev/null
+++ b/kicker/data/kmenu_side/kside_top_left.png
Binary files differ
diff --git a/kicker/data/kmenu_side/kside_top_right.png b/kicker/data/kmenu_side/kside_top_right.png
new file mode 100644
index 000000000..d6ea97fd9
--- /dev/null
+++ b/kicker/data/kmenu_side/kside_top_right.png
Binary files differ
diff --git a/kicker/data/kmenu_side/kside_top_tile.png b/kicker/data/kmenu_side/kside_top_tile.png
new file mode 100644
index 000000000..08ddb6712
--- /dev/null
+++ b/kicker/data/kmenu_side/kside_top_tile.png
Binary files differ
diff --git a/kicker/kicker/ui/CMakeLists.txt b/kicker/kicker/ui/CMakeLists.txt
index e1fdfd957..754288ce9 100644
--- a/kicker/kicker/ui/CMakeLists.txt
+++ b/kicker/kicker/ui/CMakeLists.txt
@@ -48,7 +48,7 @@ set( ${target}_SRCS
extensionop_mnu.cpp k_mnu_stub.cpp recentapps.cpp
browser_dlg.cpp itemview.cpp kickoff_bar.cpp removeapplet_mnu.cpp
removeextension_mnu.cpp removecontainer_mnu.cpp removebutton_mnu.cpp
- popupmenutitle.cpp hidebutton.cpp addappletvisualfeedback.cpp
+ popupmenutitle.cpp hidebutton.cpp popupmenutop.cpp addappletvisualfeedback.cpp
clicklineedit.cpp flipscrollview.cpp media_watcher.cpp
media_watcher.skel mykickoffsearchinterface.cpp query.cpp
)
diff --git a/kicker/kicker/ui/Makefile.am b/kicker/kicker/ui/Makefile.am
index f624e35ec..40ddeb144 100644
--- a/kicker/kicker/ui/Makefile.am
+++ b/kicker/kicker/ui/Makefile.am
@@ -12,7 +12,7 @@ libkicker_ui_la_SOURCES = addbutton_mnu.cpp appletitem.ui appletview.ui addapple
addextension_mnu.cpp extensionop_mnu.cpp k_mnu_stub.cpp \
recentapps.cpp browser_dlg.cpp itemview.cpp kickoff_bar.cpp \
removeapplet_mnu.cpp removeextension_mnu.cpp removecontainer_mnu.cpp \
- removebutton_mnu.cpp popupmenutitle.cpp hidebutton.cpp \
+ removebutton_mnu.cpp popupmenutitle.cpp popupmenutop.cpp hidebutton.cpp \
addappletvisualfeedback.cpp clicklineedit.cpp flipscrollview.cpp \
media_watcher.cpp media_watcher.skel mykickoffsearchinterface.cpp query.cpp
diff --git a/kicker/kicker/ui/k_mnu.cpp b/kicker/kicker/ui/k_mnu.cpp
index a39da3051..6f8ddc4aa 100644
--- a/kicker/kicker/ui/k_mnu.cpp
+++ b/kicker/kicker/ui/k_mnu.cpp
@@ -51,6 +51,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <kstandarddirs.h>
#include <tdetoolbarbutton.h>
#include <twin.h>
+#include <popupmenutop.h>
#include "client_mnu.h"
#include "container_base.h"
@@ -156,7 +157,7 @@ void PanelKMenu::windowClearTimeout()
bool PanelKMenu::loadSidePixmap()
{
- if (!KickerSettings::useSidePixmap())
+ if (!KickerSettings::useSidePixmap() || KickerSettings::useTopSide())
{
return false;
}
@@ -754,8 +755,15 @@ void PanelKMenu::createRecentMenuItems()
if (RecentApps.count() > 0)
{
bool bSeparator = KickerSettings::showMenuTitles();
+ bool bTitleTop = KickerSettings::useTopSide();
int nId = serviceMenuEndId() + 1;
- int nIndex = KickerSettings::showMenuTitles() ? 1 : 0;
+
+ int nIndex;
+ if( bTitleTop ) {
+ nIndex = KickerSettings::showMenuTitles() ? 2 : 0;
+ } else {
+ nIndex = KickerSettings::showMenuTitles() ? 1 : 0;
+ }
for (TQValueList<TQString>::ConstIterator it =
RecentApps.fromLast(); /*nop*/; --it)
@@ -775,6 +783,10 @@ void PanelKMenu::createRecentMenuItems()
RecentlyLaunchedApps::the().caption(), font()),
serviceMenuEndId(), 0);
setItemEnabled( id, false );
+ if( bTitleTop) {
+ id = insertItem(new PopupMenuTop(),serviceMenuEndId(),0);
+ setItemEnabled( id, false );
+ }
}
insertMenuItem(s, nId++, nIndex);
RecentlyLaunchedApps::the().m_nNumMenuItems++;
@@ -791,6 +803,11 @@ void PanelKMenu::createRecentMenuItems()
insertSeparator(RecentlyLaunchedApps::the().m_nNumMenuItems);
}
}
+ else if(KickerSettings::useTopSide())
+ {
+ int id = insertItem(new PopupMenuTop(),serviceMenuEndId(),0);
+ setItemEnabled( id, false );
+ }
}
void PanelKMenu::clearSubmenus()
@@ -822,6 +839,8 @@ void PanelKMenu::updateRecent()
RecentlyLaunchedApps::the().m_bNeedToUpdate = false;
+ bool bTitleTop = KickerSettings::useTopSide();
+
int nId = serviceMenuEndId() + 1;
// remove previous items
@@ -829,6 +848,10 @@ void PanelKMenu::updateRecent()
{
// -1 --> menu title
int i = KickerSettings::showMenuTitles() ? -1 : 0;
+ if(bTitleTop) {
+ i = KickerSettings::showMenuTitles() ? -2 : 0;
+ }
+
for (; i < RecentlyLaunchedApps::the().m_nNumMenuItems; i++)
{
removeItem(nId + i);
@@ -842,6 +865,10 @@ void PanelKMenu::updateRecent()
}
}
+ if(bTitleTop) {
+ removeItemAt(0);
+ }
+
// insert new items
TQStringList RecentApps;
RecentlyLaunchedApps::the().getRecentApps(RecentApps);
@@ -866,6 +893,10 @@ void PanelKMenu::updateRecent()
RecentlyLaunchedApps::the().caption(),
font()), nId - 1, 0);
setItemEnabled( id, false );
+ if(bTitleTop) {
+ id = insertItem(new PopupMenuTop(),nId - 1,0);
+ setItemEnabled( id, false );
+ }
}
insertMenuItem(s, nId++, KickerSettings::showMenuTitles() ?
1 : 0);
@@ -881,6 +912,11 @@ void PanelKMenu::updateRecent()
insertSeparator(RecentlyLaunchedApps::the().m_nNumMenuItems);
}
}
+ else if(bTitleTop)
+ {
+ int id = insertItem(new PopupMenuTop(),serviceMenuEndId(),0);
+ setItemEnabled( id, false );
+ }
}
void PanelKMenu::clearRecentMenuItems()
diff --git a/kicker/libkicker/kickerSettings.kcfg b/kicker/libkicker/kickerSettings.kcfg
index 0b022a30e..0abc51bf0 100644
--- a/kicker/libkicker/kickerSettings.kcfg
+++ b/kicker/libkicker/kickerSettings.kcfg
@@ -354,42 +354,62 @@
<group name="KMenu" >
-<entry name="UseSidePixmap" type="Bool" >
+ <entry name="UseSidePixmap" type="Bool" >
<label>Use side image in Kmenu</label>
<default>true</default>
</entry>
-<entry name="UseTooltip" type="Bool" >
+ <entry name="UseTooltip" type="Bool" >
<label>Use Tooltip in Kmenu</label>
<default>false</default>
-</entry>
+ </entry>
-<entry name="UseSearchBar" type="Bool" >
+ <entry name="UseSearchBar" type="Bool" >
<label>Show searh field in Kmenu</label>
<default>true</default>
</entry>
-<entry name="SidePixmapName" key="SideName" type="String" >
+ <entry name="UseTopSide" type="Bool" >
+ <label>Use side image on top of Kmenu</label>
+ <default>false</default>
+ </entry>
+
+ <entry name="LeftSideTopPixmapName" key="LeftSideTopName" type="String" >
+ <label>The name of the file to use as the side image in the TDE Menu</label>
+ <default>kside_top_left.png</default>
+ </entry>
+
+ <entry name="RightSideTopPixmapName" key="RightSideTopName" type="String" >
+ <label>The name of the file to use as the side image in the TDE Menu</label>
+ <default>kside_top_right.png</default>
+ </entry>
+
+ <entry name="SideTopTileName" key="SideTopTileName" type="String" >
+ <label>The name of the file used as a tile to fill the height of TDE Menu that SidePixmapName does not cover</label>
+ <default>kside_top_tile.png</default>
+ </entry>
+
+ <entry name="SidePixmapName" key="SideName" type="String" >
<label>The name of the file to use as the side image in the TDE Menu</label>
<default>kside.png</default>
</entry>
-<entry name="SideTileName" key="SideTileName" type="String" >
+ <entry name="SideTileName" key="SideTileName" type="String" >
<label>The name of the file used as a tile to fill the height of TDE Menu that SidePixmapName does not cover</label>
<default>kside_tile.png</default>
</entry>
-<entry name="ShowKMenuText" key="ShowText" type="Bool" >
+ <entry name="ShowKMenuText" key="ShowText" type="Bool" >
<label>Show text on the TDE Menu button</label>
<default>false</default>
</entry>
-<entry name="KMenuText" key="Text" type="String" >
+ <entry name="KMenuText" key="Text" type="String" >
<label>Text to be shown on TDE Menu Button</label>
<default code="true">i18n("Applications")</default>
</entry>
-<entry name="CustomKMenuIcon" key="CustomIcon" type="Path" >
+ <entry name="CustomKMenuIcon" key="CustomIcon" type="Path" >
<label>Custom TDE Menu Button Icon</label>
<default code="true">QString("kmenu")</default>
</entry>