Skip to content

Commit

Permalink
remove hard coded compiler options
Browse files Browse the repository at this point in the history
  • Loading branch information
shaleh committed Mar 12, 2002
1 parent 13e1f0e commit 6047ecc
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Changes from 0.62.1:
TimerQueueManager protocol class which BaseDisplay now inherits from.
- BTimer now defaults to NOT recurring. Most of the timers in blackbox were
one shots so I saw little benefit in defaulting to repeating timers.
- added emacs local variables to each file that prevent the addition of tabs
- added emacs local variables that prevent the addition of tabs to each file
- XGetInputFocus() is void yet we were using it in a if() test.
- update transient handling, should solve issues with apps like acroread.
added a getTransientInfo() method of the BlackboxWindow class which handles
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CPPFLAGS= @CPPFLAGS@ @SHAPE@ @INTERLACE@ @ORDEREDPSEUDO@ \
@DEBUG@ @NLS@ @TIMEDCACHE@ \
-DLOCALEPATH=\"$(pkgdatadir)/nls\" \
-DDEFAULTMENU=\"$(DEFAULT_MENU)\" \
-DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\" -Wall -W -pedantic -fno-exceptions
-DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\"

bin_PROGRAMS= blackbox

Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ regex_cmd = @regex_cmd@
DEFAULT_MENU = $(pkgdatadir)/menu
DEFAULT_STYLE = $(pkgdatadir)/styles/Results

CPPFLAGS = @CPPFLAGS@ @SHAPE@ @INTERLACE@ @ORDEREDPSEUDO@ @DEBUG@ @NLS@ @TIMEDCACHE@ -DLOCALEPATH=\"$(pkgdatadir)/nls\" -DDEFAULTMENU=\"$(DEFAULT_MENU)\" -DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\" -Wall -W -pedantic -fno-exceptions
CPPFLAGS = @CPPFLAGS@ @SHAPE@ @INTERLACE@ @ORDEREDPSEUDO@ @DEBUG@ @NLS@ @TIMEDCACHE@ -DLOCALEPATH=\"$(pkgdatadir)/nls\" -DDEFAULTMENU=\"$(DEFAULT_MENU)\" -DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\"


bin_PROGRAMS = blackbox
Expand Down
22 changes: 10 additions & 12 deletions src/Screen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ BScreen::BScreen(Blackbox *bb, int scrn) : ScreenInfo(bb, scrn) {

workspaceNames = new LinkedList<char>;
workspacesList = new LinkedList<Workspace>;
rootmenuList = new LinkedList<Rootmenu>;
netizenList = new LinkedList<Netizen>;
iconList = new LinkedList<BlackboxWindow>;
strutList = new LinkedList<NETStrut>;
Expand Down Expand Up @@ -513,8 +512,7 @@ BScreen::~BScreen(void) {
while (workspacesList->count())
delete workspacesList->remove(0);

while (rootmenuList->count())
rootmenuList->remove(0);
std::for_each(rootmenuList.begin(), rootmenuList.end(), PointerAssassin);

while (iconList->count())
delete iconList->remove(0);
Expand All @@ -537,7 +535,6 @@ BScreen::~BScreen(void) {

delete workspacesList;
delete workspaceNames;
delete rootmenuList;
delete iconList;
delete netizenList;
delete strutList;
Expand Down Expand Up @@ -1524,8 +1521,9 @@ void BScreen::updateNetizenConfigNotify(XEvent *e) {


void BScreen::raiseWindows(Window *workspace_stack, int num) {
/* FIXME: why 13?? */
Window *session_stack = new
Window[(num + workspacesList->count() + rootmenuList->count() + 13)];
Window[(num + workspacesList->count() + rootmenuList.size() + 13)];
int i = 0, k = num;

XRaiseWindow(getBaseDisplay()->getXDisplay(), iconmenu->getWindowID());
Expand All @@ -1549,9 +1547,9 @@ void BScreen::raiseWindows(Window *workspace_stack, int num) {
toolbar->getMenu()->getPlacementmenu()->getWindowID();
*(session_stack + i++) = toolbar->getMenu()->getWindowID();

LinkedListIterator<Rootmenu> rit(rootmenuList);
for (Rootmenu *tmp = rit.current(); tmp; rit++, tmp = rit.current())
*(session_stack + i++) = tmp->getWindowID();
RootmenuList::iterator rit = rootmenuList.begin();
for (; rit != rootmenuList.end(); ++rit)
*(session_stack + i++) = (*rit)->getWindowID();
*(session_stack + i++) = rootmenu->getWindowID();

if (toolbar->isOnTop())
Expand Down Expand Up @@ -1704,8 +1702,8 @@ void BScreen::raiseFocus(void) {

void BScreen::InitMenu(void) {
if (rootmenu) {
while (rootmenuList->count())
rootmenuList->remove(0);
for_each(rootmenuList.begin(), rootmenuList.end(), PointerAssassin);
rootmenuList.clear();

while (rootmenu->getCount())
rootmenu->remove(0);
Expand Down Expand Up @@ -1973,7 +1971,7 @@ Bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) {
parseMenuFile(file, submenu);
submenu->update();
menu->insert(label, submenu);
rootmenuList->insert(submenu);
rootmenuList.push_back(submenu);
}

break;
Expand Down Expand Up @@ -2079,7 +2077,7 @@ Bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) {
if (newmenu) {
stylesmenu->setLabel(label);
menu->insert(label, stylesmenu);
rootmenuList->insert(stylesmenu);
rootmenuList.push_back(stylesmenu);
}

blackbox->saveMenuFilename(stylesdir);
Expand Down
7 changes: 5 additions & 2 deletions src/Screen.hh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@
# endif // HAVE_SYS_TIME_H
#endif // TIME_WITH_SYS_TIME

#include <list>

#include "BaseDisplay.hh"
#include "Configmenu.hh"
#include "Iconmenu.hh"
#include "LinkedList.hh"
#include "Netizen.hh"
#include "Rootmenu.hh"
#include "Timer.hh"
Expand Down Expand Up @@ -111,7 +112,9 @@ private:
Iconmenu *iconmenu;
Rootmenu *rootmenu;

LinkedList<Rootmenu> *rootmenuList;
typedef std::list<Rootmenu*> RootmenuList;
RootmenuList rootmenuList;

LinkedList<Netizen> *netizenList;
LinkedList<BlackboxWindow> *iconList;

Expand Down
3 changes: 1 addition & 2 deletions src/Util.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ struct timeval; // forward declare to avoid the header
timeval normalizeTimeval(const timeval &tm);

template<class T>
class PointerAssassin {
public:
struct PointerAssassin {
void operator()(T ptr) const {
delete ptr;
ptr = 0;
Expand Down
2 changes: 1 addition & 1 deletion util/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# util/Makefile.am for Blackbox - an X11 Window manager

CPPFLAGS= @CPPFLAGS@ @DEBUG@ @NLS@ @TIMEDCACHE@ @INTERLACE@ \
@ORDEREDPSEUDO@ -Wall -pedantic -W -fno-exceptions
@ORDEREDPSEUDO@

bin_SCRIPTS = bsetbg
bin_PROGRAMS = bsetroot
Expand Down
2 changes: 1 addition & 1 deletion util/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ VERSION = @VERSION@
gencat_cmd = @gencat_cmd@
regex_cmd = @regex_cmd@

CPPFLAGS = @CPPFLAGS@ @DEBUG@ @NLS@ @TIMEDCACHE@ @INTERLACE@ @ORDEREDPSEUDO@ -Wall -pedantic -W -fno-exceptions
CPPFLAGS = @CPPFLAGS@ @DEBUG@ @NLS@ @TIMEDCACHE@ @INTERLACE@ @ORDEREDPSEUDO@


bin_SCRIPTS = bsetbg
Expand Down

0 comments on commit 6047ecc

Please sign in to comment.