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");
if(tmp && !a_strncmp(tmp, "off", 6))
awesomeconf->statusbar_default_position = BarOff;
awesomeconf->statusbar.dposition = BarOff;
else if(tmp && !a_strncmp(tmp, "bottom", 6))
awesomeconf->statusbar_default_position = BarBot;
awesomeconf->statusbar.dposition = BarBot;
else
awesomeconf->statusbar_default_position = BarTop;
awesomeconf->statusbar.dposition = BarTop;
awesomeconf->statusbar.position = awesomeconf->statusbar_default_position;
awesomeconf->statusbar.position = awesomeconf->statusbar.dposition;
/* Layouts */

View File

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

View File

@ -230,7 +230,7 @@ uicb_togglebar(awesome_config *awesomeconf,
const char *arg __attribute__ ((unused)))
{
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
awesomeconf->statusbar.position = BarOff;
updatebarpos(awesomeconf->display, awesomeconf->statusbar);