Put the three columns into splitters

The position of the splitters is remembered.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
feat/minor-improvements
Mavridis Philippe 1 year ago
parent d6d86f402b
commit f017178bb3
No known key found for this signature in database
GPG Key ID: 93F66F98F906147D

@ -8,8 +8,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>879</width>
<height>708</height>
<width>919</width>
<height>736</height>
</rect>
</property>
<property name="caption">
@ -38,262 +38,330 @@
<property name="frameShadow">
<enum>Raised</enum>
</property>
<grid>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQFrame" row="0" column="0" rowspan="2" colspan="1">
<widget class="TQSplitter">
<property name="name">
<cstring>leftFrame</cstring>
<cstring>leftSplitter</cstring>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>32767</height>
</size>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="backgroundOrigin">
<enum>AncestorOrigin</enum>
</property>
<property name="frameShape">
<enum>StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="midLineWidth">
<number>0</number>
</property>
<grid>
<widget class="TQFrame">
<property name="name">
<cstring>unnamed</cstring>
<cstring>leftFrame</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>32767</width>
<height>32767</height>
</size>
</property>
<property name="backgroundOrigin">
<enum>AncestorOrigin</enum>
</property>
<property name="frameShape">
<enum>StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<widget class="TastyListView" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>dynamicList</cstring>
</property>
</widget>
<widget class="TQPushButton" row="3" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>clearRecentButton</cstring>
</property>
<property name="text">
<string>&amp;Clear list</string>
</property>
</widget>
<widget class="TQLabel" row="0" column="0">
<property name="midLineWidth">
<number>0</number>
</property>
<grid>
<property name="name">
<cstring>searchLabel</cstring>
</property>
<property name="backgroundOrigin">
<enum>AncestorOrigin</enum>
</property>
<property name="text">
<string>Se&amp;arch:</string>
</property>
<property name="textFormat">
<enum>AutoText</enum>
<cstring>unnamed</cstring>
</property>
<property name="buddy" stdset="0">
<cstring>searchLine</cstring>
<property name="margin">
<number>0</number>
</property>
</widget>
<widget class="TQComboBox" row="1" column="1" rowspan="1" colspan="2">
<item>
<widget class="TastyListView" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>dynamicList</cstring>
</property>
</widget>
<widget class="TQPushButton" row="3" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>clearRecentButton</cstring>
</property>
<property name="text">
<string>Favourite applications</string>
<string>&amp;Clear list</string>
</property>
<property name="accel">
<string>Alt+C</string>
</property>
</widget>
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>searchLabel</cstring>
</property>
<property name="backgroundOrigin">
<enum>AncestorOrigin</enum>
</property>
</item>
<item>
<property name="text">
<string>Most used applications</string>
<string>Se&amp;arch:</string>
</property>
<property name="textFormat">
<enum>AutoText</enum>
</property>
<property name="buddy" stdset="0">
<cstring>searchLine</cstring>
</property>
</widget>
<widget class="TQComboBox" row="1" column="1" rowspan="1" colspan="2">
<item>
<property name="text">
<string>Favourite applications</string>
</property>
</item>
<item>
<property name="text">
<string>Most used applications</string>
</property>
</item>
<item>
<property name="text">
<string>Recent applications</string>
</property>
</item>
<item>
<property name="text">
<string>Recent documents</string>
</property>
</item>
<property name="name">
<cstring>menuModes</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip" stdset="0">
<string>Use this dropdown menu to change the behaviour of the list below</string>
</property>
</widget>
<widget class="TDEListViewSearchLine" row="0" column="1">
<property name="name">
<cstring>searchLine</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="TQToolButton" row="0" column="2">
<property name="name">
<cstring>clearButton</cstring>
</property>
</item>
<item>
<property name="text">
<string>Recent applications</string>
<string>...</string>
</property>
</widget>
<widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>showLabel</cstring>
</property>
<property name="backgroundOrigin">
<enum>AncestorOrigin</enum>
</property>
</item>
<item>
<property name="text">
<string>Recent documents</string>
<string>&amp;Show:</string>
</property>
</item>
<property name="name">
<cstring>menuModes</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip" stdset="0">
<string>Use this dropdown menu to change the behaviour of the list below</string>
</property>
</widget>
<widget class="TDEListViewSearchLine" row="0" column="1">
<property name="name">
<cstring>searchLine</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="TQToolButton" row="0" column="2">
<property name="name">
<cstring>clearButton</cstring>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
<widget class="TQLabel" row="1" column="0">
<property name="buddy" stdset="0">
<cstring>menuModes</cstring>
</property>
</widget>
</grid>
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>allApplications</cstring>
</property>
<vbox>
<property name="name">
<cstring>showLabel</cstring>
<cstring>unnamed</cstring>
</property>
<property name="backgroundOrigin">
<enum>AncestorOrigin</enum>
<property name="margin">
<number>0</number>
</property>
<property name="text">
<string>&amp;Show:</string>
</property>
<property name="buddy" stdset="0">
<cstring>menuModes</cstring>
</property>
</widget>
</grid>
</widget>
<widget class="TastyListView" row="1" column="1">
<property name="name">
<cstring>rootList</cstring>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</widget>
<widget class="TastyListView" row="1" column="2">
<property name="name">
<cstring>childList</cstring>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<widget class="TQFrame">
<property name="name">
<cstring>allAppsFrame</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>4</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="backgroundOrigin">
<enum>AncestorOrigin</enum>
</property>
<property name="frameShape">
<enum>StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>2</number>
</property>
<widget class="TQLabel">
<property name="name">
<cstring>allAppsLabel</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>4</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="backgroundOrigin">
<enum>AncestorOrigin</enum>
</property>
<property name="font">
<font>
<bold>1</bold>
</font>
</property>
<property name="text">
<string>All Applications</string>
</property>
<property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
<widget class="TQToolButton">
<property name="name">
<cstring>detachButton</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="backgroundMode">
<enum>PaletteBackground</enum>
</property>
<property name="backgroundOrigin">
<enum>AncestorOrigin</enum>
</property>
<property name="text">
<string>...</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
<property name="toolTip" stdset="0">
<string>Make this menu a normal window</string>
</property>
</widget>
</hbox>
</widget>
<widget class="TQSplitter">
<property name="name">
<cstring>rightSplitter</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<widget class="TastyListView">
<property name="name">
<cstring>rootList</cstring>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</widget>
<widget class="TastyListView">
<property name="name">
<cstring>childList</cstring>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</widget>
</widget>
</vbox>
</widget>
</widget>
<widget class="TQFrame" row="0" column="1" rowspan="1" colspan="2">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>allAppsFrame</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>5</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="backgroundOrigin">
<enum>AncestorOrigin</enum>
</property>
<property name="frameShape">
<enum>StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
<cstring>actionBar</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>2</number>
</property>
<widget class="TQLabel">
<property name="name">
<cstring>allAppsLabel</cstring>
</property>
<property name="backgroundOrigin">
<enum>AncestorOrigin</enum>
</property>
<property name="font">
<font>
<bold>1</bold>
</font>
</property>
<property name="text">
<string>All Applications</string>
</property>
<property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
<widget class="TQToolButton">
<widget class="KPushButton">
<property name="name">
<cstring>detachButton</cstring>
<cstring>runButton</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<hsizetype>1</hsizetype>
<vsizetype>4</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="backgroundOrigin">
<enum>AncestorOrigin</enum>
</property>
<property name="text">
<string>...</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
<property name="toolTip" stdset="0">
<string>Make this menu a normal window</string>
</property>
</widget>
</hbox>
</widget>
<widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>layout6</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="KPushButton">
<property name="name">
<cstring>runButton</cstring>
</property>
<property name="text">
<string>Ru&amp;n program...</string>
</property>
<property name="accel">
<string>Alt+N</string>
</property>
<property name="toolTip" stdset="0">
<string>If you know exatly how a program is named you can directly enter the application name</string>
</property>
@ -302,6 +370,14 @@
<property name="name">
<cstring>switchButton</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>4</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string></string>
</property>
@ -313,9 +389,20 @@
<property name="name">
<cstring>lockButton</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>4</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>L&amp;ock Session</string>
</property>
<property name="accel">
<string>Alt+O</string>
</property>
<property name="whatsThis" stdset="0">
<string>Lock the pc with a password if you are going away for a while</string>
</property>
@ -324,16 +411,27 @@
<property name="name">
<cstring>logoutButton</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>4</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Lo&amp;g Out...</string>
</property>
<property name="accel">
<string>Alt+G</string>
</property>
<property name="toolTip" stdset="0">
<string>Logout, reboot or shoutdown the computer</string>
</property>
</widget>
</hbox>
</widget>
</grid>
</vbox>
</widget>
</vbox>
</widget>

@ -28,6 +28,7 @@
#include <tqstyle.h>
#include <tqfile.h>
#include <tqcursor.h>
#include <tqsplitter.h>
#include <tdepopupmenu.h>
#include <tqobjectlist.h>
#include <kdebug.h>
@ -141,12 +142,15 @@ MenuHandler::MenuHandler( TQWidget *parent, Prefs *prefs, char *name, WFlags fl)
sessionsMenu = new TQPopupMenu();
menu->switchButton->setPopup(sessionsMenu);
menu->allAppsFrame->setPaletteBackgroundColor(colorGroup().background());
initializeRecentlyUsed( );
populateList( service, menu->rootList, NULL, false );
menu->leftSplitter->setBackgroundMode(NoBackground);
menu->rightSplitter->setBackgroundMode(NoBackground);
menu->leftSplitter->setSizes(prefSkel->leftSplitterSizes());
menu->rightSplitter->setSizes(prefSkel->rightSplitterSizes());
//left/middle mouse button
connect (menu->dynamicList,
SIGNAL (activated(TQListViewItem *, const TQPoint & , int )), this,
@ -521,9 +525,12 @@ void MenuHandler::closeEvent(TQCloseEvent *e)
prefSkel->setNormalWindowHeight(height());
prefSkel->setNormalWindowX(x());
prefSkel->setNormalWindowY(y());
prefSkel->writeConfig();
}
prefSkel->setLeftSplitterSizes(menu->leftSplitter->sizes());
prefSkel->setRightSplitterSizes(menu->rightSplitter->sizes());
prefSkel->writeConfig();
//HACK: I wait a little bit to permit closing the menu
// when user clicks on the menu button again
TQTimer::singleShot(50, this, SLOT(hide()));

@ -199,5 +199,12 @@
<label>Y coord of the normal window (ignored in PopUp mode)</label>
<default>0</default>
</entry>
<entry name="LeftSplitterSizes" type="IntList">
<label>Sizes of widgets in left splitter</label>
</entry>
<entry name="RightSplitterSizes" type="IntList">
<label>Sizes of widgets in right splitter</label>
</entry>
</group>
</kcfg>

Loading…
Cancel
Save