|
@@ -58,14 +58,12 @@ Panel::Panel(Display* dpy, int scr, Window root, Cfg* config,
|
|
|
cfg->getOption("session_shadow_color").c_str(), &sessionshadowcolor);
|
|
|
|
|
|
// Load properties from config / theme
|
|
|
- input_name_x = Cfg::string2int(cfg->getOption("input_name_x").c_str());
|
|
|
- input_name_y = Cfg::string2int(cfg->getOption("input_name_y").c_str());
|
|
|
- input_pass_x = Cfg::string2int(cfg->getOption("input_pass_x").c_str());
|
|
|
- input_pass_y = Cfg::string2int(cfg->getOption("input_pass_y").c_str());
|
|
|
- inputShadowXOffset =
|
|
|
- Cfg::string2int(cfg->getOption("input_shadow_xoffset").c_str());
|
|
|
- inputShadowYOffset =
|
|
|
- Cfg::string2int(cfg->getOption("input_shadow_yoffset").c_str());
|
|
|
+ input_name_x = cfg->getIntOption("input_name_x");
|
|
|
+ input_name_y = cfg->getIntOption("input_name_y");
|
|
|
+ input_pass_x = cfg->getIntOption("input_pass_x");
|
|
|
+ input_pass_y = cfg->getIntOption("input_pass_y");
|
|
|
+ inputShadowXOffset = cfg->getIntOption("input_shadow_xoffset");
|
|
|
+ inputShadowYOffset = cfg->getIntOption("input_shadow_yoffset");
|
|
|
|
|
|
if (input_pass_x < 0 || input_pass_y < 0){ // single inputbox mode
|
|
|
input_pass_x = input_name_x;
|
|
@@ -206,11 +204,8 @@ void Panel::Message(const string& text) {
|
|
|
text.length(), &extents);
|
|
|
cfgX = cfg->getOption("msg_x");
|
|
|
cfgY = cfg->getOption("msg_y");
|
|
|
- int shadowXOffset =
|
|
|
- Cfg::string2int(cfg->getOption("msg_shadow_xoffset").c_str());
|
|
|
- int shadowYOffset =
|
|
|
- Cfg::string2int(cfg->getOption("msg_shadow_yoffset").c_str());
|
|
|
-
|
|
|
+ int shadowXOffset = cfg->getIntOption("msg_shadow_xoffset");
|
|
|
+ int shadowYOffset = cfg->getIntOption("msg_shadow_yoffset");
|
|
|
int msg_x = Cfg::absolutepos(cfgX, XWidthOfScreen(ScreenOfDisplay(Dpy, Scr)), extents.width);
|
|
|
int msg_y = Cfg::absolutepos(cfgY, XHeightOfScreen(ScreenOfDisplay(Dpy, Scr)), extents.height);
|
|
|
|
|
@@ -515,10 +510,9 @@ void Panel::ShowText(){
|
|
|
strlen(welcome_message.c_str()), &extents);
|
|
|
cfgX = cfg->getOption("welcome_x");
|
|
|
cfgY = cfg->getOption("welcome_y");
|
|
|
- int shadowXOffset =
|
|
|
- Cfg::string2int(cfg->getOption("welcome_shadow_xoffset").c_str());
|
|
|
- int shadowYOffset =
|
|
|
- Cfg::string2int(cfg->getOption("welcome_shadow_yoffset").c_str());
|
|
|
+ int shadowXOffset = cfg->getIntOption("welcome_shadow_xoffset");
|
|
|
+ int shadowYOffset = cfg->getIntOption("welcome_shadow_yoffset");
|
|
|
+
|
|
|
welcome_x = Cfg::absolutepos(cfgX, image->Width(), extents.width);
|
|
|
welcome_y = Cfg::absolutepos(cfgY, image->Height(), extents.height);
|
|
|
if (welcome_x >= 0 && welcome_y >= 0) {
|
|
@@ -536,10 +530,8 @@ void Panel::ShowText(){
|
|
|
strlen(msg.c_str()), &extents);
|
|
|
cfgX = cfg->getOption("password_x");
|
|
|
cfgY = cfg->getOption("password_y");
|
|
|
- int shadowXOffset =
|
|
|
- Cfg::string2int(cfg->getOption("username_shadow_xoffset").c_str());
|
|
|
- int shadowYOffset =
|
|
|
- Cfg::string2int(cfg->getOption("username_shadow_yoffset").c_str());
|
|
|
+ int shadowXOffset = cfg->getIntOption("username_shadow_xoffset");
|
|
|
+ int shadowYOffset = cfg->getIntOption("username_shadow_yoffset");
|
|
|
password_x = Cfg::absolutepos(cfgX, image->Width(), extents.width);
|
|
|
password_y = Cfg::absolutepos(cfgY, image->Height(), extents.height);
|
|
|
if (password_x >= 0 && password_y >= 0){
|
|
@@ -553,10 +545,8 @@ void Panel::ShowText(){
|
|
|
strlen(msg.c_str()), &extents);
|
|
|
cfgX = cfg->getOption("username_x");
|
|
|
cfgY = cfg->getOption("username_y");
|
|
|
- int shadowXOffset =
|
|
|
- Cfg::string2int(cfg->getOption("username_shadow_xoffset").c_str());
|
|
|
- int shadowYOffset =
|
|
|
- Cfg::string2int(cfg->getOption("username_shadow_yoffset").c_str());
|
|
|
+ int shadowXOffset = cfg->getIntOption("username_shadow_xoffset");
|
|
|
+ int shadowYOffset = cfg->getIntOption("username_shadow_yoffset");
|
|
|
username_x = Cfg::absolutepos(cfgX, image->Width(), extents.width);
|
|
|
username_y = Cfg::absolutepos(cfgY, image->Height(), extents.height);
|
|
|
if (username_x >= 0 && username_y >= 0){
|
|
@@ -596,10 +586,8 @@ void Panel::ShowSession() {
|
|
|
msg_y = cfg->getOption("session_y");
|
|
|
int x = Cfg::absolutepos(msg_x, XWidthOfScreen(ScreenOfDisplay(Dpy, Scr)), extents.width);
|
|
|
int y = Cfg::absolutepos(msg_y, XHeightOfScreen(ScreenOfDisplay(Dpy, Scr)), extents.height);
|
|
|
- int shadowXOffset =
|
|
|
- Cfg::string2int(cfg->getOption("session_shadow_xoffset").c_str());
|
|
|
- int shadowYOffset =
|
|
|
- Cfg::string2int(cfg->getOption("session_shadow_yoffset").c_str());
|
|
|
+ int shadowXOffset = cfg->getIntOption("session_shadow_xoffset");
|
|
|
+ int shadowYOffset = cfg->getIntOption("session_shadow_yoffset");
|
|
|
|
|
|
SlimDrawString8(draw, &sessioncolor, sessionfont, x, y,
|
|
|
currsession,
|