Skip to content

Commit

Permalink
Prefer 'that' over 'which' when restrictive.
Browse files Browse the repository at this point in the history
  • Loading branch information
gijsbers committed Aug 19, 2023
1 parent 2c8244e commit 6acb3f0
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/WinMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@

#define WIN_STATE_ALL (WinStateSticky | WinStateUnmapped |\
WinStateMaximizedBoth | WinStateFullscreen)
/* Win state flags which are also in _NET_WM_STATE: */
/* Win state flags that are also in _NET_WM_STATE: */
#define WIN_STATE_NET (WIN_STATE_ALL | WinStateModal | WinStateUrgent |\
WinStateSkipPager | WinStateSkipTaskBar |\
WinStateBelow | WinStateAbove | WinStateFocused)
Expand Down
6 changes: 3 additions & 3 deletions src/default.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ cfoption icewm_preferences[] = {
OBV("ConsiderHBorder", &considerHorizBorder, "Consider border frames when maximizing horizontally"),
OBV("ConsiderVBorder", &considerVertBorder, "Consider border frames when maximizing vertically"),
OBV("ConsiderSizeHintsMaximized", &considerSizeHintsMaximized, "Consider XSizeHints if frame is maximized"),
OBV("CenterMaximizedWindows", &centerMaximizedWindows, "Center maximized windows which can't fit the screen (like terminals)"),
OBV("CenterMaximizedWindows", &centerMaximizedWindows, "Center maximized windows that can't fit the screen (like terminals)"),
OBV("HideBordersMaximized", &hideBordersMaximized, "Hide window borders if window is maximized"),
OBV("SizeMaximized", &sizeMaximized, "Maximized windows can be resized"),
OBV("ShowMoveSizeStatus", &showMoveSizeStatus, "Show position status window during move/resize"),
Expand Down Expand Up @@ -471,9 +471,9 @@ cfoption icewm_preferences[] = {
OKV("MouseWinRaise", gMouseWinRaise, "Mouse binding to raise window"),
OKV("MouseWinLower", gMouseWinLower, "Mouse binding to lower window"),
OKV("MouseWinTabbing", gMouseWinTabbing, "Mouse binding to create tabs"),
OKV("KeyWinRaise", gKeyWinRaise, "Raises the window which currently has input focus."),
OKV("KeyWinRaise", gKeyWinRaise, "Raises the window that currently has input focus."),
OKV("KeyWinOccupyAll", gKeyWinOccupyAll, "Makes the active window occupy all work spaces."),
OKV("KeyWinLower", gKeyWinLower, "Lowers the window which currently has input focus."),
OKV("KeyWinLower", gKeyWinLower, "Lowers the window that currently has input focus."),
OKV("KeyWinClose", gKeyWinClose, "Closes the active window."),
OKV("KeyWinRestore", gKeyWinRestore, "Restores the active window to its visible state."),
OKV("KeyWinPrev", gKeyWinPrev, "Switches focus to the previous window."),
Expand Down
2 changes: 1 addition & 1 deletion src/icehelp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class lowbuffer : public cbuffer {
}
};

// singly linked list of nodes which have a 'next' pointer.
// singly linked list of nodes that have a 'next' pointer.
template <class T>
class flist {
flist(const flist&);
Expand Down
2 changes: 1 addition & 1 deletion src/themes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void ThemesMenu::findThemes(const upath& path, ObjectMenu* container) {
else
{
// ok, have the position of the related entry
// which needs to be moved to submenu
// that needs to be moved to submenu
YMenuItem *relatedItem = container->getItem(relatedItemPos);
MSG(("Moving %s to submenu to prepare for %s",
relatedItem->getName().c_str(),
Expand Down
4 changes: 4 additions & 0 deletions src/upath.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ bool upath::isExecutable() {
return access(X_OK) == 0;
}

bool upath::isSearchable() {
return access(R_OK | X_OK) == 0;
}

int upath::mkdir(int mode) {
return ::mkdir(string(), mode_t(mode));
}
Expand Down
1 change: 1 addition & 0 deletions src/upath.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class upath {
bool isReadable();
bool isWritable();
bool isExecutable();
bool isSearchable();
bool isHttp() const;
bool hasProtocol() const;
int access(int mode = 0);
Expand Down
2 changes: 1 addition & 1 deletion src/wmconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class WMConfig {
static int rewritePrefs(cfoption* startup, const char* config);
};

// functions which are used in preferences options:
// functions that are used in preferences options:

void addWorkspace(const char *name, const char *value, bool append);
void addKeyboard(const char *name, const char *value, bool append);
Expand Down
2 changes: 1 addition & 1 deletion src/wmmenu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static mstring guessIconNameFromExe(const char* exe)
}
if (path) {
char* base = const_cast<char*>(my_basename(path));
// scripts may have a suffix which is not part of the icon name
// scripts may have a suffix that is not part of the icon name
char* dot = strchr(base, '.');
if (dot) *dot = '\0';
return base;
Expand Down
2 changes: 1 addition & 1 deletion src/wmprog.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class StartMenu: public MenuFileMenu {
};

/**
* Management item which wraps DProgram and holds the trigger key information.
* Management item that wraps DProgram and holds the trigger key information.
*/
class KProgram {
public:
Expand Down
2 changes: 1 addition & 1 deletion src/ycollections.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* License: WTFPL
*
* Collection of various data structures used to support certain IceWM functionality.
* All of them are made for simple data structures which must be trivially copyable and mem-movable!
* All of them are made for simple data structures that must be trivially copyable and mem-movable!
*/

#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/ycollections.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* License: WTFPL
*
* Collection of various data structures used to support certain IceWM functionality.
* All of them are made for simple data structures which must be trivially copyable and mem-movable!
* All of them are made for simple data structures that must be trivially copyable and mem-movable!
*/
#ifndef __YCOLLECTIONS_H
#define __YCOLLECTIONS_H
Expand Down
4 changes: 2 additions & 2 deletions src/yicon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ class IconPathIndex {

// for compaction reasons, the lambdas return true on success,
// but the success is only found in _this_ lambda only,
// and this is the only one which touches `result`!
// and this is the only one that touches `result`!
auto checkFile = [&](upath path) {
return path.fileExists() ? (res = path, true) : false;
};
Expand Down Expand Up @@ -518,7 +518,7 @@ ref<YImage> YIcon::loadIcon(unsigned size) {
}

}
// if the image data which was found in the expected file does not really
// if the image data that was found in the expected file does not really
// match the filename, scale the data to fit
if (icon != null) {
if (size != icon->width() || size != icon->height()) {
Expand Down
4 changes: 2 additions & 2 deletions src/ypointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class ysmart {
DataType** operator&() { return &fData; }
};

// For pointers to objects which were allocated with 'new'.
// For pointers to objects that were allocated with 'new'.
template <class DataType>
class osmart : public ysmart<DataType, osmart<DataType> > {
typedef ysmart<DataType, osmart<DataType> > super;
Expand All @@ -87,7 +87,7 @@ class osmart : public ysmart<DataType, osmart<DataType> > {
using super::operator=;
};

// For arrays which were allocated with 'new[]'.
// For arrays that were allocated with 'new[]'.
template <class DataType>
class asmart : public ysmart<DataType, asmart<DataType> > {
protected:
Expand Down
2 changes: 1 addition & 1 deletion src/yxtray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ void YXTray::backgroundChanged() {
relayout(true);
repaint();
for (IterType ec = fDocked.iterator(); ++ec; ) {
/* something is not clearing which background changes */
/* something is not clearing the background */
XClearArea(xapp->display(), ec->client_handle(), 0, 0, 0, 0, True);
ec->repaint();
}
Expand Down

0 comments on commit 6acb3f0

Please sign in to comment.