Subversion Repositories tpanel

Rev

Rev 481 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 481 Rev 482
Line 8062... Line 8062...
8062
        case ORI_CENTER_MIDDLE: return "CENTER/MIDDLE";
8062
        case ORI_CENTER_MIDDLE: return "CENTER/MIDDLE";
8063
        case ORI_CENTER_RIGHT:  return "CENTER/RIGHT";
8063
        case ORI_CENTER_RIGHT:  return "CENTER/RIGHT";
8064
        case ORI_TOP_LEFT:      return "TOP/LEFT";
8064
        case ORI_TOP_LEFT:      return "TOP/LEFT";
8065
        case ORI_TOP_MIDDLE:    return "TOP/MIDDLE";
8065
        case ORI_TOP_MIDDLE:    return "TOP/MIDDLE";
8066
        case ORI_TOP_RIGHT:     return "TOP/RIGHT";
8066
        case ORI_TOP_RIGHT:     return "TOP/RIGHT";
-
 
8067
        case ORI_SCALE_FIT:     return "SCALE/FIT";
-
 
8068
        case ORI_SCALE_ASPECT:  return "SCALE/ASPECT";
8067
    }
8069
    }
8068
 
8070
 
8069
    return "UNKNOWN";   // Should not happen!
8071
    return "UNKNOWN";   // Should not happen!
8070
}
8072
}
8071
 
8073
 
Line 9127... Line 9129...
9127
    // Handle system buttons. Here the system keyboard buttons are handled.
9129
    // Handle system buttons. Here the system keyboard buttons are handled.
9128
    if (_buttonPress && mActInstance >= 0 && static_cast<size_t>(mActInstance) < sr.size() && cp == 0 && ch > 0)
9130
    if (_buttonPress && mActInstance >= 0 && static_cast<size_t>(mActInstance) < sr.size() && cp == 0 && ch > 0)
9129
    {
9131
    {
9130
        // Handling the keyboard buttons is very expensive. To not block too
9132
        // Handling the keyboard buttons is very expensive. To not block too
9131
        // long, we let it run in a separate thread.
9133
        // long, we let it run in a separate thread.
9132
        std::thread thr = std::thread([=] { _buttonPress(ch, mHandle, pressed); });
9134
        std::thread thr = std::thread([=] { _buttonPress(ch, static_cast<uint>(mHandle), pressed); });
9133
        thr.detach();
9135
        thr.detach();
9134
    }
9136
    }
9135
 
9137
 
9136
    // If the button is marked as password protected, then we must display
9138
    // If the button is marked as password protected, then we must display
9137
    // a window with an input line to get the password from the user. Only if
9139
    // a window with an input line to get the password from the user. Only if
Line 11204... Line 11206...
11204
        {
11206
        {
11205
            MSG_ERROR("There exists no image resource!");
11207
            MSG_ERROR("There exists no image resource!");
11206
            return false;
11208
            return false;
11207
        }
11209
        }
11208
 
11210
 
11209
        RESOURCE_T resource = gPrjResources->findResource(idx, source);
11211
        RESOURCE_T resource = gPrjResources->findResource(static_cast<int>(idx), source);
11210
 
11212
 
11211
        if (resource.protocol.empty())
11213
        if (resource.protocol.empty())
11212
        {
11214
        {
11213
            MSG_WARNING("Resource " << source << " not found!");
11215
            MSG_WARNING("Resource " << source << " not found!");
11214
            return false;
11216
            return false;