move statusbar_default_position in Statusbar struct

This commit is contained in:
Julien Danjou 2007-11-10 10:17:54 +01:00
parent 101e1783d8
commit 602d92d8b2
3 changed files with 7 additions and 7 deletions

View File

@ -319,13 +319,13 @@ parse_config(const char *confpatharg, awesome_config *awesomeconf)
tmp = cfg_getstr(cfg_statusbar, "position"); tmp = cfg_getstr(cfg_statusbar, "position");
if(tmp && !a_strncmp(tmp, "off", 6)) if(tmp && !a_strncmp(tmp, "off", 6))
awesomeconf->statusbar_default_position = BarOff; awesomeconf->statusbar.dposition = BarOff;
else if(tmp && !a_strncmp(tmp, "bottom", 6)) else if(tmp && !a_strncmp(tmp, "bottom", 6))
awesomeconf->statusbar_default_position = BarBot; awesomeconf->statusbar.dposition = BarBot;
else else
awesomeconf->statusbar_default_position = BarTop; awesomeconf->statusbar.dposition = BarTop;
awesomeconf->statusbar.position = awesomeconf->statusbar_default_position; awesomeconf->statusbar.position = awesomeconf->statusbar.dposition;
/* Layouts */ /* Layouts */

View File

@ -70,6 +70,8 @@ typedef struct
int height; int height;
/** Layout txt width */ /** Layout txt width */
int txtlayoutwidth; int txtlayoutwidth;
/** Default position */
int dposition;
/** Bar position */ /** Bar position */
int position; int position;
/** Window */ /** Window */
@ -172,8 +174,6 @@ struct awesome_config
KeySym modkey; KeySym modkey;
/** Numlock mask */ /** Numlock mask */
unsigned int numlockmask; unsigned int numlockmask;
/** Default status bar position */
int statusbar_default_position;
/** Border size */ /** Border size */
int borderpx; int borderpx;
/** Master width factor */ /** Master width factor */

View File

@ -230,7 +230,7 @@ uicb_togglebar(awesome_config *awesomeconf,
const char *arg __attribute__ ((unused))) const char *arg __attribute__ ((unused)))
{ {
if(awesomeconf->statusbar.position == BarOff) if(awesomeconf->statusbar.position == BarOff)
awesomeconf->statusbar.position = (awesomeconf->statusbar_default_position == BarOff) ? BarTop : awesomeconf->statusbar_default_position; awesomeconf->statusbar.position = (awesomeconf->statusbar.dposition == BarOff) ? BarTop : awesomeconf->statusbar.dposition;
else else
awesomeconf->statusbar.position = BarOff; awesomeconf->statusbar.position = BarOff;
updatebarpos(awesomeconf->display, awesomeconf->statusbar); updatebarpos(awesomeconf->display, awesomeconf->statusbar);