summaryrefslogtreecommitdiffstats
path: root/kcontrol/randr/tderandrtray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/randr/tderandrtray.cpp')
-rw-r--r--kcontrol/randr/tderandrtray.cpp321
1 files changed, 169 insertions, 152 deletions
diff --git a/kcontrol/randr/tderandrtray.cpp b/kcontrol/randr/tderandrtray.cpp
index 647f0eca7..0506639e3 100644
--- a/kcontrol/randr/tderandrtray.cpp
+++ b/kcontrol/randr/tderandrtray.cpp
@@ -36,7 +36,7 @@
#include <kstdguiitem.h>
#include <tdeglobal.h>
#include <tdemessagebox.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
#include <cstdlib>
#include <unistd.h>
@@ -59,15 +59,15 @@ KRandRSystemTray::KRandRSystemTray(TQWidget* parent, const char *name)
, m_help(new KHelpMenu(this, TDEGlobal::instance()->aboutData(), false, actionCollection()))
{
TDEPopupMenu *help = m_help->menu();
- help->connectItem(KHelpMenu::menuHelpContents, this, TQT_SLOT(slotHelpContents()));
+ help->connectItem(KHelpMenu::menuHelpContents, this, TQ_SLOT(slotHelpContents()));
setPixmap(KSystemTray::loadIcon("randr"));
- setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
- connect(this, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(_quit()));
+ setAlignment(TQt::AlignHCenter | TQt::AlignVCenter);
+ connect(this, TQ_SIGNAL(quitSelected()), this, TQ_SLOT(_quit()));
TQToolTip::add(this, i18n("Screen resize & rotate"));
my_parent = parent;
//printf("Reading configuration...\n");
- globalKeys = new TDEGlobalAccel(TQT_TQOBJECT(this));
+ globalKeys = new TDEGlobalAccel(this);
TDEGlobalAccel* keys = globalKeys;
#include "tderandrbindings.cpp"
// the keys need to be read from kdeglobals, not kickerrc
@@ -75,10 +75,10 @@ KRandRSystemTray::KRandRSystemTray(TQWidget* parent, const char *name)
globalKeys->setEnabled(true);
globalKeys->updateConnections();
- connect(kapp, TQT_SIGNAL(settingsChanged(int)), TQT_SLOT(slotSettingsChanged(int)));
+ connect(tdeApp, TQ_SIGNAL(settingsChanged(int)), TQ_SLOT(slotSettingsChanged(int)));
#if (TQT_VERSION-0 >= 0x030200) // XRANDR support
-// connect(this, TQT_SIGNAL(screenSizeChanged(int, int)), kapp->desktop(), TQT_SLOT( desktopResized()));
+// connect(this, TQ_SIGNAL(screenSizeChanged(int, int)), tdeApp->desktop(), TQ_SLOT( desktopResized()));
#endif
randr_display = XOpenDisplay(NULL);
@@ -88,7 +88,7 @@ KRandRSystemTray::KRandRSystemTray(TQWidget* parent, const char *name)
last_known_y = currentScreen()->currentPixelHeight();
}
- t_config = new KSimpleConfig("kiccconfigrc");
+ t_config = new TDESimpleConfig("kiccconfigrc");
TQString cur_profile;
cur_profile = getCurrentProfile();
@@ -98,17 +98,17 @@ KRandRSystemTray::KRandRSystemTray(TQWidget* parent, const char *name)
#ifdef WITH_TDEHWLIB
TDEHardwareDevices *hwdevices = TDEGlobal::hardwareDevices();
- connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
+ connect(hwdevices, TQ_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQ_SLOT(deviceChanged(TDEGenericDevice*)));
#endif
}
/*!
- * \b TQT_SLOT which called if tderandrtray is exited by the user. In this case the user
+ * \b TQ_SLOT which called if tderandrtray is exited by the user. In this case the user
* is asked through a yes/no box if "KRandRTray should start automatically on log in" and the
* result is written to the KDE configfile.
*/
void KRandRSystemTray::_quit (){
- r_config = new KSimpleConfig("tderandrtrayrc");
+ r_config = new TDESimpleConfig("tderandrtrayrc");
TQString tmp1 = i18n ("Start KRandRTray automatically when you log in?");
int tmp2 = KMessageBox::questionYesNo ( 0, tmp1, i18n("Question"), i18n("Start Automatically"), i18n("Do Not Start"));
@@ -147,7 +147,7 @@ void KRandRSystemTray::showEvent ( TQShowEvent * )
void KRandRSystemTray::mousePressEvent(TQMouseEvent* e)
{
// Popup the context menu with left-click
- if (e->button() == Qt::LeftButton) {
+ if (e->button() == TQt::LeftButton) {
contextMenuAboutToShow(contextMenu());
contextMenu()->popup(e->globalPos());
e->accept();
@@ -195,15 +195,15 @@ void KRandRSystemTray::reloadDisplayConfiguration()
if (RR_Disconnected == randr_screen_info->outputs[i]->info->connection) {
continue;
}
-
+
// Activate this output
randr_screen_info->cur_crtc = randr_screen_info->outputs[i]->cur_crtc;
randr_screen_info->cur_output = randr_screen_info->outputs[i];
randr_screen_info->cur_output->auto_set = 1;
randr_screen_info->cur_output->off_set = 0;
output_auto (randr_screen_info, randr_screen_info->cur_output);
- i=main_low_apply(randr_screen_info);
-
+ main_low_apply(randr_screen_info);
+
if (randr_screen_info->outputs[i]->cur_crtc) {
// Output successfully activated!
set_primary_output(randr_screen_info, randr_screen_info->cur_output->id);
@@ -253,25 +253,28 @@ void KRandRSystemTray::contextMenuAboutToShow(TDEPopupMenu* menu)
menu->setCheckable(true);
bool valid = isValid();
-
- if (!valid) {
+ if (!valid)
+ {
lastIndex = menu->insertItem(i18n("Required X Extension Not Available"));
menu->setItemEnabled(lastIndex, false);
-
}
- else {
+ else
+ {
m_screenPopups.clear();
- for (int s = 0; s < numScreens() /*&& numScreens() > 1 */; s++) {
- setCurrentScreen(s);
- if (s == screenIndexOfWidget(this)) {
- /*lastIndex = menu->insertItem(i18n("Screen %1").arg(s+1));
- menu->setItemEnabled(lastIndex, false);*/
- } else {
- TDEPopupMenu* subMenu = new TDEPopupMenu(menu, TQString("screen%1").arg(s+1).latin1());
- m_screenPopups.append(subMenu);
- populateMenu(subMenu);
- lastIndex = menu->insertItem(i18n("Screen %1").arg(s+1), subMenu);
- connect(subMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotScreenActivated()));
+ if (numScreens() > 1)
+ {
+ int screenOfWidget = screenIndexOfWidget(this);
+ for (int s = 0; s < numScreens(); s++)
+ {
+ setCurrentScreen(s);
+ if (s != screenOfWidget)
+ {
+ TDEPopupMenu *subMenu = new TDEPopupMenu(menu, TQString("screen%1").arg(s+1).latin1());
+ m_screenPopups.append(subMenu);
+ populateMenu(subMenu);
+ lastIndex = menu->insertItem(i18n("Screen %1").arg(s+1), subMenu);
+ connect(subMenu, TQ_SIGNAL(activated(int)), TQ_SLOT(slotScreenActivated()));
+ }
}
}
@@ -282,52 +285,52 @@ void KRandRSystemTray::contextMenuAboutToShow(TDEPopupMenu* menu)
addOutputMenu(menu);
// Find any user ICC profiles
- TQStringList cfgProfiles;
- cfgProfiles = t_config->groupList();
- if (cfgProfiles.isEmpty() == false) {
- menu->insertTitle(SmallIcon("kcoloredit"), i18n("Color Profile"));
- }
- for (TQStringList::Iterator t(cfgProfiles.begin()); t != cfgProfiles.end(); ++t) {
- lastIndex = menu->insertItem(*t);
- if (t_config->readEntry("CurrentProfile") == (*t)) {
- menu->setItemChecked(lastIndex, true);
+ TQStringList cfgProfiles = t_config->groupList();
+ if (!cfgProfiles.isEmpty())
+ {
+ TDEPopupMenu *profileMenu = new TDEPopupMenu(menu);
+ for (TQStringList::Iterator t(cfgProfiles.begin()); t != cfgProfiles.end(); ++t)
+ {
+ lastIndex = profileMenu->insertItem(*t);
+ if (t_config->readEntry("CurrentProfile") == (*t))
+ {
+ profileMenu->setItemChecked(lastIndex, true);
+ }
+ profileMenu->setItemEnabled(lastIndex, t_config->readBoolEntry("EnableICC", false));
+ profileMenu->connectItem(lastIndex, this, TQ_SLOT(slotColorProfileChanged(int)));
}
- menu->setItemEnabled(lastIndex, t_config->readBoolEntry("EnableICC", false));
- menu->connectItem(lastIndex, this, TQT_SLOT(slotColorProfileChanged(int)));
+ menu->insertItem(SmallIcon("kcoloredit"), i18n("Color Profile"), profileMenu);
}
- if (valid) {
+ if (valid)
+ {
// Find any display profiles
- TQStringList displayProfiles;
- displayProfiles = getDisplayConfigurationProfiles(locateLocal("config", "/", true));
- if (!displayProfiles.isEmpty()) {
- menu->insertTitle(SmallIcon("background"), i18n("Display Profiles"));
- lastIndex = menu->insertItem(SmallIcon("bookmark"), "<default>");
- menu->connectItem(lastIndex, this, TQT_SLOT(slotDisplayProfileChanged(int)));
- for (TQStringList::Iterator t(displayProfiles.begin()); t != displayProfiles.end(); ++t) {
- lastIndex = menu->insertItem(SmallIcon("bookmark"), *t);
- menu->connectItem(lastIndex, this, TQT_SLOT(slotDisplayProfileChanged(int)));
+ TQStringList displayProfiles = getDisplayConfigurationProfiles(locateLocal("config", "/", true));
+ if (!displayProfiles.isEmpty())
+ {
+ TDEPopupMenu *displayProfileMenu = new TDEPopupMenu(menu);
+ lastIndex = displayProfileMenu->insertItem(SmallIcon("bookmark"), "<default>");
+ displayProfileMenu->connectItem(lastIndex, this, TQ_SLOT(slotDisplayProfileChanged(int)));
+ for (TQStringList::Iterator t(displayProfiles.begin()); t != displayProfiles.end(); ++t)
+ {
+ lastIndex = displayProfileMenu->insertItem(SmallIcon("bookmark"), *t);
+ displayProfileMenu->connectItem(lastIndex, this, TQ_SLOT(slotDisplayProfileChanged(int)));
}
+ menu->insertItem(SmallIcon("background"), i18n("Display Profiles"), displayProfileMenu);
}
}
- menu->insertTitle(SmallIcon("randr"), i18n("Global Configuration"));
-
- TDEAction *actColors = new TDEAction( i18n( "Configure Displays..." ),
- SmallIconSet( "configure" ), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotDisplayConfig() ),
- actionCollection() );
- actColors->plug( menu );
-
-// TDEAction *actPrefs = new TDEAction( i18n( "Configure Display..." ),
-// SmallIconSet( "configure" ), TDEShortcut(), this, TQT_SLOT( slotPrefs() ),
-// actionCollection() );
-// actPrefs->plug( menu );
-
- TDEAction *actSKeys = new TDEAction( i18n( "Configure Shortcut Keys..." ),
- SmallIconSet( "configure" ), TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT( slotSKeys() ),
- actionCollection() );
- actSKeys->plug( menu );
+ // Config menu
+ TDEPopupMenu *configMenu = new TDEPopupMenu(menu);
+ TDEAction *actColors = new TDEAction(i18n("Configure Displays..."), SmallIconSet("configure"),
+ TDEShortcut(), this, TQ_SLOT(slotDisplayConfig()), actionCollection());
+ actColors->plug(configMenu);
+ TDEAction *actSKeys = new TDEAction(i18n("Configure Shortcut Keys..."), SmallIconSet("configure"),
+ TDEShortcut(), this, TQ_SLOT(slotSKeys()), actionCollection());
+ actSKeys->plug(configMenu);
+ menu->insertItem(SmallIcon("randr"), i18n("Global Configuration"), configMenu);
+ menu->insertSeparator();
menu->insertItem(SmallIcon("help"),KStdGuiItem::help().text(), m_help->menu());
TDEAction *quitAction = actionCollection()->action(KStdAction::name(KStdAction::Quit));
quitAction->plug(menu);
@@ -411,74 +414,85 @@ int KRandRSystemTray::GetHackResolutionParameter() {
return resparm;
}
-void KRandRSystemTray::populateMenu(TDEPopupMenu* menu)
+void KRandRSystemTray::populateMenu(TDEPopupMenu *menu)
{
- int lastIndex = 0;
-
- menu->insertTitle(SmallIcon("view-fullscreen"), i18n("Screen Size"));
+ int lastIndex;
int numSizes = currentScreen()->numSizes();
- int* sizeSort = new int[numSizes];
-
- for (int i = 0; i < numSizes; i++) {
+ int *sizeSort = new int[numSizes];
+ for (int i = 0; i < numSizes; i++)
+ {
sizeSort[i] = currentScreen()->pixelCount(i);
}
- for (int j = 0; j < numSizes; j++) {
- int highest = -1, highestIndex = -1;
-
- for (int i = 0; i < numSizes; i++) {
- if (sizeSort[i] && sizeSort[i] > highest) {
+ TDEPopupMenu *screenSizeMenu = new TDEPopupMenu(menu);
+ for (int j = 0; j < numSizes; j++)
+ {
+ int highest = 0, highestIndex = -1;
+ for (int i = 0; i < numSizes; i++)
+ {
+ if (sizeSort[i] > highest)
+ {
highest = sizeSort[i];
highestIndex = i;
}
}
- sizeSort[highestIndex] = -1;
Q_ASSERT(highestIndex != -1);
+ sizeSort[highestIndex] = 0;
- lastIndex = menu->insertItem(i18n("%1 x %2").arg(currentScreen()->pixelSize(highestIndex).width()).arg(currentScreen()->pixelSize(highestIndex).height()));
-
+ lastIndex = screenSizeMenu->insertItem(i18n("%1 x %2").arg(currentScreen()->pixelSize(highestIndex).width()).arg(currentScreen()->pixelSize(highestIndex).height()));
if (currentScreen()->proposedSize() == highestIndex)
- menu->setItemChecked(lastIndex, true);
+ {
+ screenSizeMenu->setItemChecked(lastIndex, true);
+ }
- menu->setItemParameter(lastIndex, highestIndex);
- menu->connectItem(lastIndex, this, TQT_SLOT(slotResolutionChanged(int)));
+ screenSizeMenu->setItemParameter(lastIndex, highestIndex);
+ screenSizeMenu->connectItem(lastIndex, this, TQ_SLOT(slotResolutionChanged(int)));
}
delete [] sizeSort;
- sizeSort = 0L;
+ sizeSort = nullptr;
+
+ menu->insertItem(SmallIcon("view-fullscreen"), i18n("Screen Size"), screenSizeMenu);
// Don't display the rotation options if there is no point (ie. none are supported)
// XFree86 4.3 does not include rotation support.
- if (currentScreen()->rotations() != RandRScreen::Rotate0) {
- menu->insertTitle(SmallIcon("reload"), i18n("Orientation"));
-
- for (int i = 0; i < 6; i++) {
- if ((1 << i) & currentScreen()->rotations()) {
- lastIndex = menu->insertItem(currentScreen()->rotationIcon(1 << i), RandRScreen::rotationName(1 << i));
-
+ if (currentScreen()->rotations() != RandRScreen::Rotate0)
+ {
+ TDEPopupMenu *orientationMenu = new TDEPopupMenu(menu);
+ for (int i = 0; i < 6; i++)
+ {
+ if ((1 << i) & currentScreen()->rotations())
+ {
+ lastIndex = orientationMenu->insertItem(currentScreen()->rotationIcon(1 << i), RandRScreen::rotationName(1 << i));
if (currentScreen()->proposedRotation() & (1 << i))
- menu->setItemChecked(lastIndex, true);
+ {
+ orientationMenu->setItemChecked(lastIndex, true);
+ }
- menu->setItemParameter(lastIndex, 1 << i);
- menu->connectItem(lastIndex, this, TQT_SLOT(slotOrientationChanged(int)));
+ orientationMenu->setItemParameter(lastIndex, 1 << i);
+ orientationMenu->connectItem(lastIndex, this, TQ_SLOT(slotOrientationChanged(int)));
}
}
+ menu->insertItem(SmallIcon("reload"), i18n("Orientation"), orientationMenu);
}
TQStringList rr = currentScreen()->refreshRates(currentScreen()->proposedSize());
-
if (rr.count())
- menu->insertTitle(SmallIcon("clock"), i18n("Refresh Rate"));
-
- int i = 0;
- for (TQStringList::Iterator it = rr.begin(); it != rr.end(); ++it, i++) {
- lastIndex = menu->insertItem(*it);
-
- if (currentScreen()->proposedRefreshRate() == i)
- menu->setItemChecked(lastIndex, true);
+ {
+ TDEPopupMenu *refreshRatesMenu = new TDEPopupMenu(menu);
+ int i = 0;
+ for (TQStringList::Iterator it = rr.begin(); it != rr.end(); ++it, i++)
+ {
+ lastIndex = refreshRatesMenu->insertItem(*it);
+ if (currentScreen()->proposedRefreshRate() == i)
+ {
+ refreshRatesMenu->setItemChecked(lastIndex, true);
+ }
- menu->setItemParameter(lastIndex, i);
- menu->connectItem(lastIndex, this, TQT_SLOT(slotRefreshRateChanged(int)));
+ refreshRatesMenu->setItemParameter(lastIndex, i);
+ refreshRatesMenu->connectItem(lastIndex, this, TQ_SLOT(slotRefreshRateChanged(int)));
+ }
+ menu->insertItem(SmallIcon("clock"), i18n("Refresh Rate"), refreshRatesMenu);
}
}
@@ -738,86 +752,89 @@ void KRandRSystemTray::findPrimaryDisplay()
}
}
-void KRandRSystemTray::addOutputMenu(TDEPopupMenu* menu)
+void KRandRSystemTray::addOutputMenu(TDEPopupMenu *menu)
{
XRROutputInfo *output_info;
char *output_name;
- int i;
int lastIndex = 0;
int connected_displays = 0;
- if (isValid() == true) {
- menu->insertTitle(SmallIcon("kcmkwm"), i18n("Output Port"));
+ if (isValid())
+ {
+ TDEPopupMenu *outputMenu = new TDEPopupMenu(menu);
- for (i = 0; i < randr_screen_info->n_output; i++) {
+ // Look for active (i.e. switched on) outputs
+ for (int i = 0; i < randr_screen_info->n_output; i++)
+ {
output_info = randr_screen_info->outputs[i]->info;
- // Look for ON outputs
- if (!randr_screen_info->outputs[i]->cur_crtc) {
+ if (!randr_screen_info->outputs[i]->cur_crtc)
+ {
continue;
}
- if (RR_Disconnected == randr_screen_info->outputs[i]->info->connection) {
+ if (RR_Disconnected == randr_screen_info->outputs[i]->info->connection)
+ {
continue;
}
output_name = output_info->name;
- //printf("ON: Found output %s\n", output_name);
-
- lastIndex = menu->insertItem(i18n("%1 (Active)").arg(output_name));
- menu->setItemChecked(lastIndex, true);
- menu->connectItem(lastIndex, this, TQT_SLOT(slotOutputChanged(int)));
- menu->setItemParameter(lastIndex, i);
+ lastIndex = outputMenu->insertItem(i18n("%1 (Active)").arg(output_name));
+ outputMenu->setItemChecked(lastIndex, true);
+ outputMenu->connectItem(lastIndex, this, TQ_SLOT(slotOutputChanged(int)));
+ outputMenu->setItemParameter(lastIndex, i);
connected_displays++;
}
- for (i = 0; i < randr_screen_info->n_output; i++) {
+ // Look for inactive (i.e. switched off) but connected outputs
+ for (int i = 0; i < randr_screen_info->n_output; i++)
+ {
output_info = randr_screen_info->outputs[i]->info;
- // Look for CONNECTED outputs....
- if (RR_Disconnected == randr_screen_info->outputs[i]->info->connection) {
+ if (RR_Disconnected == randr_screen_info->outputs[i]->info->connection)
+ {
continue;
}
- // ...that are not ON
- if (randr_screen_info->outputs[i]->cur_crtc) {
+ if (randr_screen_info->outputs[i]->cur_crtc)
+ {
continue;
}
output_name = output_info->name;
- //printf("CONNECTED, NOT ON: Found output %s\n", output_name);
-
- lastIndex = menu->insertItem(i18n("%1 (Connected, Inactive)").arg(output_name));
- menu->setItemChecked(lastIndex, false);
- menu->connectItem(lastIndex, this, TQT_SLOT(slotOutputChanged(int)));
- menu->setItemParameter(lastIndex, i);
+ lastIndex = outputMenu->insertItem(i18n("%1 (Connected, Inactive)").arg(output_name));
+ outputMenu->setItemChecked(lastIndex, false);
+ outputMenu->connectItem(lastIndex, this, TQ_SLOT(slotOutputChanged(int)));
+ outputMenu->setItemParameter(lastIndex, i);
connected_displays++;
}
- for (i = 0; i < randr_screen_info->n_output; i++) {
+ // Look for all outputs that are not connected
+ for (int i = 0; i < randr_screen_info->n_output; i++)
+ {
output_info = randr_screen_info->outputs[i]->info;
- // Look for ALL outputs that are not connected....
- if (RR_Disconnected != randr_screen_info->outputs[i]->info->connection) {
+ if (RR_Disconnected != randr_screen_info->outputs[i]->info->connection)
+ {
continue;
}
- // ...or ON
- if (randr_screen_info->outputs[i]->cur_crtc) {
+ if (randr_screen_info->outputs[i]->cur_crtc)
+ {
continue;
}
output_name = output_info->name;
- //printf("DISCONNECTED, NOT ON: Found output %s\n", output_name);
-
- lastIndex = menu->insertItem(i18n("%1 (Disconnected, Inactive)").arg(output_name));
- menu->setItemChecked(lastIndex, false);
- menu->setItemEnabled(lastIndex, false);
- menu->connectItem(lastIndex, this, TQT_SLOT(slotOutputChanged(int)));
- menu->setItemParameter(lastIndex, i);
+ lastIndex = outputMenu->insertItem(i18n("%1 (Disconnected, Inactive)").arg(output_name));
+ outputMenu->setItemChecked(lastIndex, false);
+ outputMenu->setItemEnabled(lastIndex, false);
+ outputMenu->connectItem(lastIndex, this, TQ_SLOT(slotOutputChanged(int)));
+ outputMenu->setItemParameter(lastIndex, i);
}
- lastIndex = menu->insertItem(SmallIcon("forward"), i18n("Next available output"));
- if (connected_displays < 2) {
- menu->setItemEnabled(lastIndex, false);
+ if (connected_displays >= 2)
+ {
+ lastIndex = outputMenu->insertItem(SmallIcon("forward"), i18n("Next available output"));
+ outputMenu->connectItem(lastIndex, this, TQ_SLOT(slotCycleDisplays()));
}
- menu->connectItem(lastIndex, this, TQT_SLOT(slotCycleDisplays()));
+
+ menu->insertItem(SmallIcon("kcmkwm"), i18n("Output Port"), outputMenu);
}
}
@@ -834,7 +851,7 @@ void KRandRSystemTray::slotDisplayProfileChanged(int parameter)
profileName = "";
}
TQPtrList<SingleScreenData> profileData = loadDisplayConfiguration(profileName, locateLocal("config", "/", true));
- applyDisplayConfiguration(profileData, TRUE, locateLocal("config", "/", true));
+ applyDisplayConfiguration(profileData, true, locateLocal("config", "/", true));
destroyScreenInformationObject(profileData);
}
@@ -862,7 +879,7 @@ void KRandRSystemTray::slotOutputChanged(int parameter)
randr_screen_info->cur_output->auto_set = 1;
randr_screen_info->cur_output->off_set = 0;
output_auto (randr_screen_info, randr_screen_info->cur_output);
- i=main_low_apply(randr_screen_info);
+ main_low_apply(randr_screen_info);
if (!randr_screen_info->outputs[parameter]->cur_crtc) {
output_name = randr_screen_info->outputs[parameter]->info->name;
@@ -877,7 +894,7 @@ void KRandRSystemTray::slotOutputChanged(int parameter)
randr_screen_info->cur_output->auto_set = 0;
randr_screen_info->cur_output->off_set = 1;
output_off(randr_screen_info, randr_screen_info->cur_output);
- i=main_low_apply(randr_screen_info);
+ main_low_apply(randr_screen_info);
findPrimaryDisplay();
refresh();
@@ -907,6 +924,6 @@ void KRandRSystemTray::deviceChanged (TDEGenericDevice* device) {
void KRandRSystemTray::slotHelpContents()
{
- kapp->invokeHelp(TQString::null, "tderandrtray");
+ tdeApp->invokeHelp(TQString::null, "tderandrtray");
}