Changeset 3583ffb in mainline for uspace/lib/ui/src/wdecor.c


Ignore:
Timestamp:
2020-11-08T19:51:04Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f93e4e3
Parents:
8c772c4
Message:

Revert "Create UI controls based on UI object…"

This was a mistake. Controls need ui_resource object, which must be
(at least currently) specific to a window and cannot be obtained from
ui_t.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/wdecor.c

    r8c772c4 r3583ffb  
    4646#include <ui/wdecor.h>
    4747#include "../private/resource.h"
    48 #include "../private/ui.h"
    4948#include "../private/wdecor.h"
    5049
     
    6261 * @return EOK on success, ENOMEM if out of memory
    6362 */
    64 errno_t ui_wdecor_create(ui_t *ui, const char *caption,
     63errno_t ui_wdecor_create(ui_resource_t *resource, const char *caption,
    6564    ui_wdecor_t **rwdecor)
    6665{
     
    7877        }
    7978
    80         rc = ui_pbutton_create(ui, "X", &wdecor->btn_close);
     79        rc = ui_pbutton_create(resource, "X", &wdecor->btn_close);
    8180        if (rc != EOK) {
    8281                free(wdecor->caption);
     
    8887            (void *)wdecor);
    8988
    90         wdecor->res = ui->resource;
     89        wdecor->res = resource;
    9190        wdecor->active = true;
    9291        *rwdecor = wdecor;
Note: See TracChangeset for help on using the changeset viewer.