33
34
decl {\#include <libintl.h>} {public global
36
decl {\#include "../include/ui.hpp"} {public global
39
decl {\#include "../include/common.hpp"} {public global
42
decl {\#include "../data/icons/jwm-settings-manager.xpm"} {public global
45
class SettingsUI {open : {public FLTK_FUNCTIONS}
37
decl {\#include "../include/flDesktop.h"} {public global
40
decl {\#include "../include/flPanel.h"} {public global
43
decl {\#include "../include/flWindow.h"} {public global
46
decl {\#include "../include/flFont.h"} {public global
49
decl {\#include "../include/flAutostart.h"} {public global
52
decl {\#include "../include/flKeyboard.h"} {public global
55
decl {\#include "../include/flMouse.h"} {public global
58
decl {\#include "../include/flThemes.h"} {public global
61
decl {\#include "../include/flIcons.h"} {selected public global
64
decl {\#include "../include/ui.h"} {public global
67
decl {\#include "../include/tinyxml2.h"} {public global
70
class SettingsUI {open
47
decl {JSM_UI ui;} {private local
49
72
Function {make_window()} {open
51
code {printf("Hello, World!\\n");} {}
52
Fl_Window settings_window {
53
75
label {Settings Manager} open
54
xywh {948 119 260 345} type Double color 45 labelcolor 7 hide
55
code1 {startup(o,jwm_settings_manager);} xclass {jwm-settings-manager}
76
xywh {641 139 395 375} type Double color 45 labelcolor 7 visible
79
label {Settings Manager}
80
xywh {80 10 245 40} labelfont 1 labelsize 24 labelcolor 35
59
callback {settings_window->hide();
61
image {../data/img/jsm-panel.png} xywh {5 5 80 80} box FLAT_BOX color 23
84
callback {UI ui;ui.showPanel();}
85
image {../data/img/jsm-panel.png} xywh {30 65 95 85} box GTK_UP_BOX color 39 labelcolor 55
65
callback {settings_window->hide();
67
image {../data/img/jsm-keyboard.png} xywh {90 5 80 80} box FLAT_BOX color 23
71
callback {settings_window->hide();
73
image {../data/img/jsm-icons.png} xywh {175 5 80 80} box FLAT_BOX color 23
89
callback {UI ui;ui.showKeyboard();}
90
image {../data/img/jsm-keyboard.png} xywh {147 65 95 85} box GTK_UP_BOX color 39 labelcolor 55
77
callback {settings_window->hide();
79
image {../data/img/jsm-desktop.png} xywh {5 90 80 80} box FLAT_BOX color 23
83
callback {settings_window->hide();
85
image {../data/img/jsm-mouse.png} xywh {90 90 80 80} box FLAT_BOX color 23
89
callback {settings_window->hide();
91
image {../data/img/jsm-fonts.png} xywh {175 90 80 80} box FLAT_BOX color 23
94
callback {UI ui;ui.showDesktop();}
95
image {../data/img/jsm-desktop.png} xywh {30 165 95 85} box GTK_UP_BOX color 39 labelcolor 55
99
callback {UI ui;ui.showMouse();}
100
image {../data/img/jsm-mouse.png} xywh {147 165 95 85} box GTK_UP_BOX color 39 labelcolor 55
95
callback {settings_window->hide();
97
image {../data/img/jsm-windows.png} xywh {5 175 80 80} box FLAT_BOX color 23
104
callback {UI ui;ui.showWindow();}
105
image {../data/img/jsm-windows.png} xywh {30 265 95 85} box GTK_UP_BOX color 39 labelcolor 55
101
callback {settings_window->hide();
102
ui.showThemes();} selected
103
tooltip {This is for Predefined Themes} image {../data/img/jsm-theme.png} xywh {90 175 80 80} box FLAT_BOX color 23
109
callback {UI ui;ui.showThemes();}
110
tooltip {This is for Predefined Thems} image {../data/img/jsm-theme.png} xywh {147 265 95 85} box GTK_UP_BOX color 39 labelcolor 55
114
callback {UI ui;ui.showIcons();}
115
image {../data/img/jsm-icons.png} xywh {265 65 95 85} box GTK_UP_BOX color 39 labelcolor 55
119
callback {UI ui;ui.showFonts();}
120
image {../data/img/jsm-fonts.png} xywh {265 165 95 85} box GTK_UP_BOX color 39 labelcolor 55
107
callback {settings_window->hide();
109
image {../data/img/jsm-autostart.png} xywh {175 175 80 80} box FLAT_BOX color 23
112
label {Users and Groups}
113
callback {adduser();}
114
xywh {5 260 80 80} box FLAT_BOX color 23 align 128
115
code0 {if(isAdduser(o))makeWidgetIcon("config-users",o,48);}
118
label {System Details}
119
callback {addinfo();}
120
xywh {90 260 80 80} box FLAT_BOX color 23 align 128
121
code0 {if(isInfo(o))makeWidgetIcon("help-browser",o,48);}
125
callback {settings_window->hide();
127
xywh {175 260 80 80} box FLAT_BOX color 23 align 128
128
code0 {makeWidgetIcon("preferences-system-notifications",o,48);}
124
callback {UI ui;ui.showAutostart();}
125
image {../data/img/jsm-autostart.png} xywh {265 265 95 85} box GTK_UP_BOX color 39 labelcolor 55
132
Function {isAdduser(Fl_Button *o)} {open return_type bool
134
code {bool isfladduser = testExec("fladduser");
135
if(isfladduser){o->activate();}
136
else{o->deactivate();}
137
return isfladduser;} {}
139
Function {adduser()} {open
141
code {settings_window->hide();
142
int retval = linuxcommon::run_a_program_in_background("fladduser");
143
if(retval !=0){errorOUT("Could not run the user adding program");}} {}
145
Function {isInfo(Fl_Button *o)} {open return_type bool
147
code {bool isexec = testExec("torios-info");
156
Function {addinfo()} {open
158
code {settings_window->hide();
159
int retval = linuxcommon::run_a_program_in_background("torios-info");
161
std::cerr<<"system(\\"bash -c 'torios-info &disown'\\") did not return 0"<<std::endl;
164
Function {showSettings()} {open return_type int
166
code {make_window()->show();
167
return Fl::run();} {}