added NLS support in the new configure system.
all-local: Translation.m openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/C"; \
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/C; \
$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/C; \
ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en; \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(DESTDIR)$(pkgdatadir)/nls/C/openbox.cat; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
output=Translation.m $(MFILES)
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
DISTCLEANFILES = blackbox-nls.hh
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rmdir $(DESTDIR)$(pkgdatadir)/nls; \
fi
distclean-local:
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
ln -f -s de_DE $(DESTDIR)$(pkgdatadir)/nls/de; \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/de; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
ln -f -s es_ES $(DESTDIR)$(pkgdatadir)/nls/es; \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/es; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
ln -f -s fr_FR $(DESTDIR)$(pkgdatadir)/nls/fr; \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/fr; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
- rm -f $(DESTDIR)$(pkgdatadir)/nls/it; \
- ln -f -s it_IT $(DESTDIR)$(pkgdatadir)/nls/it; \
- fi
+ rm -f $(DESTDIR)$(pkgdatadir)/nls/it; \
+ ln -f -s it_IT $(DESTDIR)$(pkgdatadir)/nls/it; \
+fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/it; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
- rm -f $(DESTDIR)$(pkgdatadir)/nls/nl; \
- ln -f -s nl_NL $(DESTDIR)$(pkgdatadir)/nls/nl; \
- fi
+ rm -f $(DESTDIR)$(pkgdatadir)/nls/nl; \
+ ln -f -s nl_NL $(DESTDIR)$(pkgdatadir)/nls/nl; \
+fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rm -f $(DESTDIR)$(pkgdatadir)/nls/nl; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
all-local: openbox.cat
install-data-local: openbox.cat
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
echo "Installing catalog in $(THE_NLS_PATH)"; \
$(mkinstalldirs) $(THE_NLS_PATH); \
$(INSTALL_DATA) openbox.cat $(THE_NLS_PATH); \
fi
uninstall-local:
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
rm -f $(THE_NLS_PATH)/openbox.cat; \
rmdir $(THE_NLS_PATH); \
fi
Translation.m: $(MFILES)
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
fi
openbox.cat: Translation.m
- @if test x$(NLSTEST) = "x-DNLS"; then \
+ @if test x$(NLSTEST) = "xyes"; then \
$(gencat_cmd) openbox.cat Translation.m; \
fi
BScreen::ColSmartPlacement);
insert(i18n(ConfigmenuSet, ConfigmenuCascade, "Cascade Placement"),
BScreen::CascadePlacement);
+ insert(i18n(ConfigmenuSet, ConfigmenuUnderMouse, "Under Mouse Placement"),
+ BScreen::UnderMousePlacement);
insert(i18n(ConfigmenuSet, ConfigmenuLeftRight, "Left to Right"),
BScreen::LeftRight);
insert(i18n(ConfigmenuSet, ConfigmenuRightLeft, "Right to Left"),
void Configmenu::Placementmenu::setValues(void) {
- switch (getScreen()->getPlacementPolicy()) {
- case BScreen::RowSmartPlacement:
- setItemSelected(0, True);
- break;
-
- case BScreen::ColSmartPlacement:
- setItemSelected(1, True);
- break;
-
- case BScreen::CascadePlacement:
- setItemSelected(2, True);
- break;
- }
+ int placement = getScreen()->getPlacementPolicy();
+
+ setItemSelected(0, placement == BScreen::RowSmartPlacement);
+ setItemSelected(1, placement == BScreen::ColSmartPlacement);
+ setItemSelected(2, placement == BScreen::CascadePlacement);
+ setItemSelected(3, placement == BScreen::UnderMousePlacement);
bool rl = (getScreen()->getRowPlacementDirection() == BScreen::LeftRight),
- tb = (getScreen()->getColPlacementDirection() == BScreen::TopBottom);
-
- setItemSelected(3, rl);
- setItemSelected(4, ! rl);
-
- setItemSelected(5, tb);
- setItemSelected(6, ! tb);
+ tb = (getScreen()->getColPlacementDirection() == BScreen::TopBottom),
+ e = placement != BScreen::UnderMousePlacement;
+
+ setItemSelected(4, rl);
+ setItemSelected(5, ! rl);
+ setItemEnabled(4, e);
+ setItemEnabled(5, e);
+
+ setItemSelected(6, tb);
+ setItemSelected(7, ! tb);
+ setItemEnabled(6, e);
+ setItemEnabled(7, e);
}
case BScreen::RowSmartPlacement:
getScreen()->savePlacementPolicy(item->function());
- setItemSelected(0, True);
- setItemSelected(1, False);
- setItemSelected(2, False);
+ setItemSelected(0, true);
+ setItemSelected(1, false);
+ setItemSelected(2, false);
+ setItemSelected(3, false);
+ setItemEnabled(4, true);
+ setItemEnabled(5, true);
+ setItemEnabled(6, true);
+ setItemEnabled(7, true);
break;
case BScreen::ColSmartPlacement:
getScreen()->savePlacementPolicy(item->function());
- setItemSelected(0, False);
- setItemSelected(1, True);
- setItemSelected(2, False);
+ setItemSelected(0, false);
+ setItemSelected(1, true);
+ setItemSelected(2, false);
+ setItemSelected(3, false);
+ setItemEnabled(4, true);
+ setItemEnabled(5, true);
+ setItemEnabled(6, true);
+ setItemEnabled(7, true);
break;
case BScreen::CascadePlacement:
getScreen()->savePlacementPolicy(item->function());
- setItemSelected(0, False);
- setItemSelected(1, False);
- setItemSelected(2, True);
+ setItemSelected(0, false);
+ setItemSelected(1, false);
+ setItemSelected(2, true);
+ setItemSelected(3, false);
+ setItemEnabled(4, true);
+ setItemEnabled(5, true);
+ setItemEnabled(6, true);
+ setItemEnabled(7, true);
+
+ break;
+
+ case BScreen::UnderMousePlacement:
+ getScreen()->savePlacementPolicy(item->function());
+
+ setItemSelected(0, false);
+ setItemSelected(1, false);
+ setItemSelected(2, false);
+ setItemSelected(3, true);
+ setItemEnabled(4, false);
+ setItemEnabled(5, false);
+ setItemEnabled(6, false);
+ setItemEnabled(7, false);
break;
case BScreen::LeftRight:
getScreen()->saveRowPlacementDirection(BScreen::LeftRight);
- setItemSelected(3, True);
- setItemSelected(4, False);
+ setItemSelected(4, true);
+ setItemSelected(5, false);
break;
case BScreen::RightLeft:
getScreen()->saveRowPlacementDirection(BScreen::RightLeft);
- setItemSelected(3, False);
- setItemSelected(4, True);
+ setItemSelected(4, false);
+ setItemSelected(5, true);
break;
case BScreen::TopBottom:
getScreen()->saveColPlacementDirection(BScreen::TopBottom);
- setItemSelected(5, True);
- setItemSelected(6, False);
+ setItemSelected(6, true);
+ setItemSelected(7, false);
break;
case BScreen::BottomTop:
getScreen()->saveColPlacementDirection(BScreen::BottomTop);
- setItemSelected(5, False);
- setItemSelected(6, True);
+ setItemSelected(6, false);
+ setItemSelected(7, true);
break;
}
public:
- enum { RowSmartPlacement = 1, ColSmartPlacement, CascadePlacement, LeftRight,
- RightLeft, TopBottom, BottomTop };
+ enum { RowSmartPlacement = 1, ColSmartPlacement, CascadePlacement,
+ UnderMousePlacement, LeftRight, RightLeft, TopBottom, BottomTop };
enum { RoundBullet = 1, TriangleBullet, SquareBullet, NoBullet };
enum { Restart = 1, RestartOther, Exit, Shutdown, Execute, Reconfigure,
WindowShade, WindowIconify, WindowMaximize, WindowClose, WindowRaise,
}
+bool Workspace::underMousePlacement(Rect &win, const Rect &availableArea) {
+ int x, y, rx, ry;
+ Window c, r;
+ unsigned int m;
+ XQueryPointer(screen->getBlackbox()->getXDisplay(), screen->getRootWindow(),
+ &r, &c, &rx, &ry, &x, &y, &m);
+ x = rx - win.width() / 2;
+ y = ry - win.height() / 2;
+
+ if (x < availableArea.x())
+ x = availableArea.x();
+ if (y < availableArea.y())
+ y = availableArea.y();
+ if (x + win.width() > availableArea.x() + availableArea.width())
+ x = availableArea.x() + availableArea.width() - win.width();
+ if (y + win.height() > availableArea.y() + availableArea.height())
+ y = availableArea.y() + availableArea.height() - win.height();
+
+ win.setX(x);
+ win.setY(y);
+
+ return True;
+}
+
+
bool Workspace::cascadePlacement(Rect &win, const Rect &availableArea) {
if ((cascade_x > static_cast<signed>(availableArea.width() / 2)) ||
(cascade_y > static_cast<signed>(availableArea.height() / 2)))
case BScreen::ColSmartPlacement:
placed = smartPlacement(new_win, availableArea);
break;
+ case BScreen::UnderMousePlacement:
+ placed = underMousePlacement(new_win, availableArea);
default:
break; // handled below
} // switch
void placeWindow(BlackboxWindow *win);
bool cascadePlacement(Rect& win, const Rect& availableArea);
bool smartPlacement(Rect& win, const Rect& availableArea);
+ bool underMousePlacement(Rect& win, const Rect& availableArea);
public:
Workspace(BScreen *scrn, unsigned int i = 0);