Eliminate Workspaces menu magic numbers.
commit9b27217b53d9689d624524ec49525df8ac34d49e
authorIain Patterson <wm@iain.cx>
Wed, 27 Mar 2013 13:05:03 +0000 (27 13:05 +0000)
committerCarlos R. Mafra <crmafra@gmail.com>
Thu, 28 Mar 2013 18:50:15 +0000 (28 18:50 +0000)
tree1fb833ffcf082e57b7b19a5d0580f693394468bf
parentcd5382cedf1a48a5d9e5a147fb48d892a4ff44fc
Eliminate Workspaces menu magic numbers.

A number of functions relating to the Workspaces menu assume that the
menu contains at least three entries: New, Destroy Last and Workspace1.
Because it is assumed that index 1 contains the Destroy Last entry and
index 2 contains the first workspace entry there are several occurrences
throughout workspace.c of magic numbers relating to those indices.

Replace the magic numbers with some #defines, making the code more
readable and allowing the menu to be expanded later.
src/workspace.c