Skip to content

Commit

Permalink
remove this option, doesn't seem to work (well), just clutter
Browse files Browse the repository at this point in the history
  • Loading branch information
NattyNarwhal committed May 15, 2014
1 parent 25af827 commit 45e6a74
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 55 deletions.
3 changes: 0 additions & 3 deletions Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ class DynamicConfig
#define CONFIG_COMMAND_MENU ".wmx"
// only used if COMMAND_MENU is not found; ignored if invalid directory:
#define CONFIG_SYSTEM_COMMAND_MENU "/usr/local/lib/wmx/menu"
// append screennumber to COMMAND_MENU directory;
// use non screen style as fallback
#define CONFIG_ADD_SCREEN_TO_COMMAND_MENU False

// Focus possibilities.
//
Expand Down
45 changes: 0 additions & 45 deletions Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -745,9 +745,6 @@ CommandMenu::CommandMenu(WindowManager *manager, XEvent *e, char* otherdir)

if (otherdir == NULL)
{
#if CONFIG_ADD_SCREEN_TO_COMMAND_MENU
isRootDir = True;
#endif
if (wmxdir == NULL)
{
if (home == NULL) return;
Expand All @@ -773,9 +770,6 @@ CommandMenu::CommandMenu(WindowManager *manager, XEvent *e, char* otherdir)
}
else // otherdir != NULL
{
#if CONFIG_ADD_SCREEN_TO_COMMAND_MENU
isRootDir = False;
#endif
m_commandDir = (char *)malloc(strlen(otherdir) + 1);
strcpy(m_commandDir, otherdir);
}
Expand Down Expand Up @@ -827,32 +821,6 @@ void CommandMenu::createSubmenu (XEvent *e, int i)
free(new_directory);
}

#if CONFIG_ADD_SCREEN_TO_COMMAND_MENU
DIR *CommandMenu::screenopendir(char *m_commandDir,int *dirlen,int olddirlen)
{
char *p;
DIR *dir;

if(isRootDir)
{
for(p=m_commandDir;*p;p++); // search end of m_commandDir
sprintf(p,".%d",screen()); // append screen number
dir = opendir(m_commandDir);
if (dir == NULL) {
m_commandDir[olddirlen] = '\0'; // strip of screen number
*dirlen = olddirlen;
dir = opendir(m_commandDir);
}
}
else
{
*dirlen = olddirlen;
dir = opendir(m_commandDir);
}
return(dir);
}
#endif

char **CommandMenu::getItems(int *niR, int *nhR)
{
*niR = *nhR = 0;
Expand All @@ -862,15 +830,8 @@ char **CommandMenu::getItems(int *niR, int *nhR)

if ((home = getenv("HOME")) == NULL) return NULL;

#if CONFIG_ADD_SCREEN_TO_COMMAND_MENU
int olddirlen = strlen(m_commandDir);
int dirlen = olddirlen + 1 + m_windowManager->numdigits(screen());
m_commandDir=(char *)realloc((void *)m_commandDir,(size_t)dirlen);
dir = screenopendir(m_commandDir,&dirlen,olddirlen);
#else
int dirlen = strlen(m_commandDir);
dir = opendir(m_commandDir);
#endif

if (dir == NULL) {

Expand All @@ -879,14 +840,8 @@ char **CommandMenu::getItems(int *niR, int *nhR)
(char *)malloc(strlen(CONFIG_SYSTEM_COMMAND_MENU) + 1);
sprintf(m_commandDir, CONFIG_SYSTEM_COMMAND_MENU);

#if CONFIG_ADD_SCREEN_TO_COMMAND_MENU
olddirlen = strlen(m_commandDir);
dirlen = olddirlen + 1 + m_windowManager->numdigits(screen());
dir = screenopendir(m_commandDir,&dirlen,olddirlen);
#else
dirlen = strlen(m_commandDir);
dir = opendir(m_commandDir);
#endif

if (dir == NULL) {
return NULL;
Expand Down
5 changes: 0 additions & 5 deletions Menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ class CommandMenu : public Menu
void createSubmenu(XEvent *, int i);
virtual char **getItems(int *, int *);
char *m_commandDir;

#if CONFIG_ADD_SCREEN_TO_COMMAND_MENU
Boolean isRootDir;
DIR *screenopendir(char *,int *,int);
#endif
};

class ShowGeometry : public Menu
Expand Down
2 changes: 0 additions & 2 deletions wmx.1
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,6 @@ Area where the "[Exit wmx]" is shown.
The directory in which executables are shown for the middle-click menu.
.It CONFIG_SYSTEM_COMMAND_MENU
The other directory to find executables if CONFIG_COMMAND_MENU is invalid.
.It CONFIG_ADD_SCREEN_TO_COMMAND_MENU
If True, adds the screen number to the command menu.
.It CONFIG_CLICK_TO_FOCUS ,CONFIG_RAISE_ON_FOCUS, CONFIG_AUTO_RAISE
Focus policy options.
.Pp
Expand Down

0 comments on commit 45e6a74

Please sign in to comment.