Changeset e0e612b in mainline for uspace/app/taskbar/taskbar.c
- Timestamp:
- 2022-10-07T08:38:50Z (3 years ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0761448
- Parents:
- c77cfd8
- git-author:
- Jiri Svoboda <jiri@…> (2022-10-06 18:38:37)
- git-committer:
- Jiri Svoboda <jiri@…> (2022-10-07 08:38:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/taskbar/taskbar.c
rc77cfd8 re0e612b 44 44 #include "clock.h" 45 45 #include "taskbar.h" 46 #include "wndlist.h" 46 47 47 48 static void wnd_close(ui_window_t *, void *); … … 135 136 } 136 137 137 rc = ui_label_create(ui_res, " Task bar!", &taskbar->label);138 rc = ui_label_create(ui_res, "HelenOS", &taskbar->label); 138 139 if (rc != EOK) { 139 140 printf("Error creating label.\n"); … … 142 143 143 144 ui_window_get_app_rect(taskbar->window, &rect); 145 if (ui_is_textmode(taskbar->ui)) { 146 rect.p0.x += 1; 147 } else { 148 rect.p0.x += 10; 149 } 144 150 ui_label_set_rect(taskbar->label, &rect); 145 ui_label_set_halign(taskbar->label, gfx_halign_ center);151 ui_label_set_halign(taskbar->label, gfx_halign_left); 146 152 ui_label_set_valign(taskbar->label, gfx_valign_center); 147 153 … … 150 156 printf("Error adding control to layout.\n"); 151 157 ui_label_destroy(taskbar->label); 158 goto error; 159 } 160 161 rc = wndlist_create(ui_res, taskbar->fixed, &taskbar->wndlist); 162 if (rc != EOK) { 163 printf("Error creating window list.\n"); 164 goto error; 165 } 166 167 rc = wndlist_append(taskbar->wndlist, "Text Editor"); 168 if (rc != EOK) { 169 printf("Error adding window list entry.\n"); 152 170 goto error; 153 171 } … … 191 209 if (taskbar->clock != NULL) 192 210 taskbar_clock_destroy(taskbar->clock); 211 if (taskbar->wndlist != NULL) 212 wndlist_destroy(taskbar->wndlist); 193 213 if (taskbar->window != NULL) 194 214 ui_window_destroy(taskbar->window);
Note:
See TracChangeset
for help on using the changeset viewer.