Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Control panel: Change some logic for OnlyShowIn/NotShowIn, misc chang…
Browse files Browse the repository at this point in the history
…es to xfce-wn-tweaks item; chmod installed items to 0555 while instalation
  • Loading branch information
yurkis committed Jun 6, 2014
1 parent caaf2a9 commit 5a541db
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
30 changes: 15 additions & 15 deletions src-qt4/pc-controlpanel/backend/cp-itemgroup.cpp
Expand Up @@ -89,36 +89,36 @@ bool CItemGroup::checkItemDE(CControlPanelItem &item, const QStringList &enabled
QStringList item_disallowed_de=item.notShowIn();
QString current_de= pcbsd::Utils::currentDesktop().Name.toLower().trimmed();

// Check allowed desktop environments
if (item_allowed_de.size())
//Check disallowed desktop environments
if (item_disallowed_de.size())
{
for (int i=0 ;i<item_allowed_de.size(); i++)
for (int i=0 ;i<item_disallowed_de.size(); i++)
{
for (int j=0; j<enabled_de.size(); j++)
{
if (item_allowed_de[i].toLower().trimmed() == enabled_de[j].toLower().trimmed())
if (item_disallowed_de[i].toLower().trimmed() == enabled_de[j].toLower().trimmed())
{
return true;
return false;
}
}
}
return false;
}
}//for all item's disallowed de
}//if disallowed de list is not empty

//Check disallowed desktop environments
if (item_disallowed_de.size())
// Check allowed desktop environments
if (item_allowed_de.size())
{
for (int i=0 ;i<item_disallowed_de.size(); i++)
for (int i=0 ;i<item_allowed_de.size(); i++)
{
for (int j=0; j<enabled_de.size(); j++)
{
if (item_disallowed_de[i].toLower().trimmed() == enabled_de[j].toLower().trimmed())
if (item_allowed_de[i].toLower().trimmed() == enabled_de[j].toLower().trimmed())
{
return false;
return true;
}
}
}//for all item's disallowed de
}//if disallowed de list is not empty
}
return false;
}
return true;
}

Expand Down
Expand Up @@ -7,7 +7,7 @@ Terminal=false
Type=Application
Categories=X-XFCE;Settings;DesktopSettings;X-XfceSettingsDialog;
StartupNotify=true
OnlyShowIn=XFCE;
NotShowIn=KDE;
X-XfcePluggable=true
X-XfceHelpFile=xfwm4.html
Name=Window Manager Tweaks
Expand Down
3 changes: 2 additions & 1 deletion src-qt4/pc-controlpanel/pc-controlpanel.pro
Expand Up @@ -109,14 +109,15 @@ mkdiritems.path=/usr/local/share/pcbsd/pc-controlpanel/items
mkdiritems.extra=mkdir -p $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-controlpanel/items

cpitems.path=/usr/local/share/pcbsd/pc-controlpanel/items
cpitems.extra=tar cvf - --exclude '.svn/' -C items . 2>/dev/null | tar xvf - -C $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-controlpanel/items 2>/dev/null
cpitems.extra=tar cvf - --exclude '.svn/' -C items . 2>/dev/null | tar xvf - -C $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-controlpanel/items && chmod -R 0555 $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-controlpanel/items 2>/dev/null

mkdiricons.path=/usr/local/share/pcbsd/pc-controlpanel/icons
mkdiricons.extra=mkdir -p $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-controlpanel/icons

cpicons.path=/usr/local/share/pcbsd/pc-controlpanel/items
cpicons.extra=tar cvf - --exclude '.svn/' -C icons . 2>/dev/null | tar xvf - -C $(INSTALL_ROOT)/usr/local/share/pcbsd/pc-controlpanel/icons 2>/dev/null


INSTALLS += target desktop cleanitems mkdiritems cpitems mkdiricons cpicons dotrans

RESOURCES += \
Expand Down

0 comments on commit 5a541db

Please sign in to comment.