Diffstat (limited to 'core/settings/launcher/taskbarsettings.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/settings/launcher/taskbarsettings.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp index 6921ee8..b5c03c8 100644 --- a/core/settings/launcher/taskbarsettings.cpp +++ b/core/settings/launcher/taskbarsettings.cpp | |||
@@ -58,27 +58,15 @@ TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name ) | |||
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_omenu = new QCheckBox ( tr( "Show O-Menu" ), this ); | ||
65 | lay-> addWidget ( m_omenu ); | ||
66 | |||
67 | m_omenu_tabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this ); | ||
68 | lay-> addWidget ( m_omenu_tabs ); | ||
69 | |||
70 | QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." )); | 64 | QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." )); |
71 | QWhatsThis::add( m_omenu_tabs, tr( "Adds the contents of the Launcher as menus in the O-Menu." )); | ||
72 | QWhatsThis::add( m_omenu, tr( "Check if you want the O-Menu in the taskbar." )); | ||
73 | 65 | ||
74 | connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); | 66 | connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); |
75 | connect ( m_omenu, SIGNAL( toggled ( bool )), m_omenu_tabs, SLOT( setEnabled ( bool ))); | ||
76 | |||
77 | // This option does not make sense ! (sandman) | ||
78 | m_omenu_tabs-> hide ( ); | ||
79 | 67 | ||
80 | init ( ); | 68 | init ( ); |
81 | } | 69 | } |
82 | 70 | ||
83 | void TaskbarSettings::init ( ) | 71 | void TaskbarSettings::init ( ) |
84 | { | 72 | { |
@@ -125,19 +113,12 @@ void TaskbarSettings::init ( ) | |||
125 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); | 113 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); |
126 | if ( !icon. isNull ( )) | 114 | if ( !icon. isNull ( )) |
127 | item-> setPixmap ( 0, icon ); | 115 | item-> setPixmap ( 0, icon ); |
128 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); | 116 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); |
129 | m_applets [*it] = item; | 117 | m_applets [*it] = item; |
130 | } | 118 | } |
131 | |||
132 | cfg. setGroup ( "Menu" ); | ||
133 | |||
134 | m_omenu_tabs-> setChecked ( cfg. readBoolEntry ( "LauncherTabs", true )); | ||
135 | m_omenu-> setChecked ( cfg. readBoolEntry ( "ShowMenu", true )); | ||
136 | |||
137 | m_omenu_tabs-> setEnabled ( m_omenu-> isChecked ( )); | ||
138 | } | 119 | } |
139 | 120 | ||
140 | void TaskbarSettings::appletChanged() | 121 | void TaskbarSettings::appletChanged() |
141 | { | 122 | { |
142 | m_applets_changed = true; | 123 | m_applets_changed = true; |
143 | } | 124 | } |
@@ -153,24 +134,12 @@ void TaskbarSettings::accept ( ) | |||
153 | if ( !(*it)-> isOn ( )) | 134 | if ( !(*it)-> isOn ( )) |
154 | exclude << it. key ( ); | 135 | exclude << it. key ( ); |
155 | } | 136 | } |
156 | cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); | 137 | cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); |
157 | } | 138 | } |
158 | cfg. writeEntry ( "SafeMode", false ); | 139 | cfg. writeEntry ( "SafeMode", false ); |
159 | |||
160 | cfg. setGroup ( "Menu" ); | ||
161 | |||
162 | if ( m_omenu_tabs-> isChecked ( ) != cfg. readBoolEntry ( "LauncherTabs", true )) { | ||
163 | m_applets_changed = true; | ||
164 | cfg. writeEntry ( "LauncherTabs", m_omenu_tabs-> isChecked ( )); | ||
165 | } | ||
166 | |||
167 | if ( m_omenu-> isChecked ( ) != cfg. readBoolEntry ( "ShowMenu", true )) { | ||
168 | m_applets_changed = true; | ||
169 | cfg. writeEntry ( "ShowMenu", m_omenu-> isChecked ( )); | ||
170 | } | ||
171 | cfg. write ( ); | 140 | cfg. write ( ); |
172 | 141 | ||
173 | if ( m_applets_changed ) { | 142 | if ( m_applets_changed ) { |
174 | QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" ); | 143 | QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" ); |
175 | m_applets_changed = false; | 144 | m_applets_changed = false; |
176 | } | 145 | } |