diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b52f53..0a9beb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,3 +5,5 @@ project( add_subdirectory(mdm) add_subdirectory(milkwm) + +configure_file(include/config.h.in config.h) diff --git a/include/config.h.in b/include/config.h.in new file mode 100644 index 0000000..5e7ea24 --- /dev/null +++ b/include/config.h.in @@ -0,0 +1,6 @@ +#ifndef __CONFIG_H__ +#define __CONFIG_H__ + +#define PREFIX "@CMAKE_INSTALL_PREFIX@" + +#endif diff --git a/mdm/login.c b/mdm/login.c index c09a2fd..c2fde99 100644 --- a/mdm/login.c +++ b/mdm/login.c @@ -3,27 +3,46 @@ #include void make_login_window(void){ - MwWidget w, pic, userlabel, usercombo, passlabel, passentry; + MwWidget window, pic, userlabel, usercombo, passlabel, passentry, mainsep, sesslabel, sesscombo, fieldsep, shutdown, reboot, ok; MwLibraryInit(); - w = MwVaCreateWidget(MwWindowClass, "login", NULL, (x_width() - 366) / 2, (x_height() - 183) / 2, 366, 183, + window = MwVaCreateWidget(MwWindowClass, "login", NULL, (x_width() - 366) / 2, (x_height() - 183) / 2, 366, 183, MwNhasBorder, 1, MwNinverted, 0, NULL); - pic = MwVaCreateWidget(MwImageClass, "image", w, 10, 10, 80, 137, + pic = MwVaCreateWidget(MwImageClass, "image", window, 10, 10, 80, 137, MwNhasBorder, 1, NULL); - userlabel = MwVaCreateWidget(MwLabelClass, "userlabel", w, 95, 10, MwTextWidth(w, "User:"), 16, + userlabel = MwVaCreateWidget(MwLabelClass, "userlabel", window, 95, 10, MwTextWidth(window, "User:"), 16, MwNtext, "User:", NULL); - usercombo = MwCreateWidget(MwComboBoxClass, "usercombo", w, 95, 10+16+5, 265, 18); - passlabel = MwVaCreateWidget(MwLabelClass, "passlabel", w, 95, 10+16+5+18+5, MwTextWidth(w, "Password:"), 16, + usercombo = MwCreateWidget(MwComboBoxClass, "usercombo", window, 95, 10+16+5, 265, 18); + passlabel = MwVaCreateWidget(MwLabelClass, "passlabel", window, 95, 10+16+5+18+5, MwTextWidth(window, "Password:"), 16, MwNtext, "Password:", NULL); - passentry = MwVaCreateWidget(MwEntryClass, "passentry", w, 95, 10+16+5+18+5+16+5, 265, 18, + passentry = MwVaCreateWidget(MwEntryClass, "passentry", window, 95, 10+16+5+18+5+16+5, 265, 18, MwNhideInput, 1, NULL); + mainsep = MwVaCreateWidget(MwSeparatorClass, "mainsep", window, 95, 10+16+5+18+5+16+5+18, 265, 10, + MwNorientation, MwHORIZONTAL, + NULL); + sesslabel = MwVaCreateWidget(MwLabelClass, "sesslabel", window, 95, 10+16+5+18+5+16+5+18+10, MwTextWidth(window, "Session Type:"), 16, + MwNtext, "Session Type:", + NULL); + sesscombo = MwCreateWidget(MwComboBoxClass, "sesscombo", window, 95, 10+16+5+18+5+16+5+18+10+16+5, 265, 18); + fieldsep = MwVaCreateWidget(MwSeparatorClass, "fieldsep", window, (366 - 362) / 2, 10+137, 362, 10, + MwNorientation, MwHORIZONTAL, + NULL); + shutdown = MwVaCreateWidget(MwButtonClass, "shutdown", window, 10, 10+137+10, 80, 18, + MwNtext, "Shutdown", + NULL); + reboot = MwVaCreateWidget(MwButtonClass, "reboot", window, 10+80+5, 10+137+10, 70, 18, + MwNtext, "Reboot", + NULL); + ok = MwVaCreateWidget(MwButtonClass, "ok", window, 366 - 10 - 60, 10+137+10, 60, 18, + MwNtext, "OK", + NULL); - MwLoop(w); + MwLoop(window); }