Diffstat (limited to 'core/settings/launcher/menusettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/launcher/menusettings.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp index 6fca621..faa7cf4 100644 --- a/core/settings/launcher/menusettings.cpp +++ b/core/settings/launcher/menusettings.cpp | |||
@@ -13,13 +13,13 @@ | |||
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | .i_,=:_. -<s. This file is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
18 | ..}^=.= = ; Public License for more details. | 18 | ..}^=.= = ; Public License for more details. |
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
@@ -57,16 +57,19 @@ MenuSettings::MenuSettings ( QWidget *parent, const char *name ) | |||
57 | 57 | ||
58 | m_list = new QListView ( this ); | 58 | m_list = new QListView ( this ); |
59 | m_list-> addColumn ( "foobar" ); | 59 | m_list-> addColumn ( "foobar" ); |
60 | m_list-> header ( )-> hide ( ); | 60 | m_list-> header ( )-> hide ( ); |
61 | 61 | ||
62 | lay-> addWidget ( m_list ); | 62 | lay-> addWidget ( m_list ); |
63 | 63 | ||
64 | m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this ); | 64 | m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this ); |
65 | lay-> addWidget ( m_menutabs ); | 65 | lay-> addWidget ( m_menutabs ); |
66 | 66 | ||
67 | m_menusubpopup = new QCheckBox ( tr( "Show Applications in subpopups" ), this ); | ||
68 | lay-> addWidget ( m_menusubpopup ); | ||
69 | |||
67 | QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." )); | 70 | QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." )); |
68 | QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." )); | 71 | QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." )); |
69 | 72 | ||
70 | connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); | 73 | connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); |
71 | 74 | ||
72 | init ( ); | 75 | init ( ); |
@@ -116,12 +119,13 @@ void MenuSettings::init ( ) | |||
116 | delete lib; | 119 | delete lib; |
117 | } | 120 | } |
118 | } | 121 | } |
119 | 122 | ||
120 | cfg. setGroup ( "Menu" ); | 123 | cfg. setGroup ( "Menu" ); |
121 | m_menutabs-> setChecked ( cfg. readBoolEntry ( "LauncherTabs", true )); | 124 | m_menutabs-> setChecked ( cfg. readBoolEntry ( "LauncherTabs", true )); |
125 | m_menusubpopup-> setChecked ( cfg. readBoolEntry ( "LauncherSubPopup", true )); | ||
122 | } | 126 | } |
123 | 127 | ||
124 | void MenuSettings::appletChanged() | 128 | void MenuSettings::appletChanged() |
125 | { | 129 | { |
126 | m_applets_changed = true; | 130 | m_applets_changed = true; |
127 | } | 131 | } |
@@ -146,18 +150,26 @@ void MenuSettings::accept ( ) | |||
146 | cfg. setGroup ( "Menu" ); | 150 | cfg. setGroup ( "Menu" ); |
147 | 151 | ||
148 | if ( m_menutabs-> isChecked ( ) != cfg. readBoolEntry ( "LauncherTabs", true )) { | 152 | if ( m_menutabs-> isChecked ( ) != cfg. readBoolEntry ( "LauncherTabs", true )) { |
149 | apps_changed = true; | 153 | apps_changed = true; |
150 | cfg. writeEntry ( "LauncherTabs", m_menutabs-> isChecked ( )); | 154 | cfg. writeEntry ( "LauncherTabs", m_menutabs-> isChecked ( )); |
151 | } | 155 | } |
152 | 156 | ||
157 | if ( m_menusubpopup-> isChecked ( ) != cfg. readBoolEntry ( "LauncherSubPopup", true )) { | ||
158 | apps_changed = true; | ||
159 | cfg. writeEntry ( "LauncherSubPopup", m_menusubpopup-> isChecked ( )); | ||
160 | } | ||
161 | |||
153 | cfg. write ( ); | 162 | cfg. write ( ); |
154 | 163 | ||
155 | if ( m_applets_changed ) { | 164 | if ( m_applets_changed ) { |
156 | QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" ); | 165 | QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" ); |
157 | m_applets_changed = false; | 166 | m_applets_changed = false; |
158 | } | 167 | } |
159 | if ( apps_changed ) { | 168 | if ( apps_changed ) { |
169 | // currently use reloadApplets() since reloadApps is now used exclusive for server | ||
170 | // to refresh the tabs. But what we want here is also a refresh of the startmenu entries | ||
160 | QCopEnvelope ( "QPE/TaskBar", "reloadApps()" ); | 171 | QCopEnvelope ( "QPE/TaskBar", "reloadApps()" ); |
172 | QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" ); | ||
161 | } | 173 | } |
162 | } | 174 | } |
163 | 175 | ||