View | Details | Raw Unified | Return to bug 133656
Collapse All | Expand All

(-)profile_chooser.cpp.old (-2 / +3 lines)
Lines 175-181 Link Here
175
	else {
175
	else {
176
		menu->insertTitle( i18n("Switch to Profile") );
176
		menu->insertTitle( i18n("Switch to Profile") );
177
		for (unsigned int i=0; i<profiles.size(); i++) {
177
		for (unsigned int i=0; i<profiles.size(); i++) {
178
			int id=menu->insertItem(profiles[i]);
178
			int id=menu->insertItem(profiles[i], i, -1);
179
			if (profiles[i]==active)
179
			if (profiles[i]==active)
180
				menu->setItemChecked(id,true);
180
				menu->setItemChecked(id,true);
181
		}
181
		}
Lines 245-250 Link Here
245
	 // check if configured switch tool is there
245
	 // check if configured switch tool is there
246
	string prefix;
246
	string prefix;
247
	try {
247
	try {
248
	        std::vector<std::string> profiles;
248
		KProcess proc(this);
249
		KProcess proc(this);
249
		if (!isSuid( switch_program )) {
250
		if (!isSuid( switch_program )) {
250
			proc << "kdesu" << "--nonewdcop" << "--";
251
			proc << "kdesu" << "--nonewdcop" << "--";
Lines 254-260 Link Here
254
			proc << "konsole" << "-T" << i18n("Switching profile") << "-e";
255
			proc << "konsole" << "-T" << i18n("Switching profile") << "-e";
255
		if (!prefix.empty()) proc << prefix;
256
		if (!prefix.empty()) proc << prefix;
256
		proc << switch_program << switch_arg
257
		proc << switch_program << switch_arg
257
				 << menu->text(item);
258
				 << ((scpm->List(profiles) && profiles.size() > (unsigned int)item) ? profiles[item] : "");
258
		qDebug( "running %s %s %s", switch_program.ascii(), switch_arg.ascii(), menu->text(item).ascii());
259
		qDebug( "running %s %s %s", switch_program.ascii(), switch_arg.ascii(), menu->text(item).ascii());
259
		proc.start( KProcess::Block );
260
		proc.start( KProcess::Block );
260
	}
261
	}

Return to bug 133656