예제 #1
0
void WindowSelectComboBox::showPopup()
{
    if (lineEdit()->isReadOnly()) {
        return;
    }

    refreshWindowList();

    QComboBox::showPopup();
}
예제 #2
0
파일: tihos.c 프로젝트: dforsi/tihos
/* Main program and UI creation */
int main (int argc, char *argv[]) {
    g_type_init();
    gtk_init(&argc, &argv);

    bindtextdomain("tihos", PACKAGE_LOCALE_DIR);
    bind_textdomain_codeset("tihos", "UTF-8");
    textdomain("tihos");

    createUI();
    updateBattery();
    refreshWindowList();

    /* Check if to start with screen lock */
    if (argc > 1) {
        if (strcmp(argv[1], "--lock") == 0) {
            lockScreen(NULL, NULL);
        }
    }
 
    /* Key grabbing and looping depending on where we are */
    while (1) {
        if (isLocked()) {
            while (gtk_events_pending()) {
                gtk_main_iteration();
            }
            handleX();
        }
        else if (isMainVisible()) {
            while (gtk_events_pending()) {
                gtk_main_iteration();
            }
        }
        else {
            handleX();
        }
    }
}