mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
view: add view_get_string_prop()
This commit is contained in:
parent
40bd8f56d4
commit
806fdb08bd
5 changed files with 26 additions and 15 deletions
12
src/view.c
12
src/view.c
|
|
@ -398,10 +398,18 @@ view_snap_to_edge(struct view *view, const char *direction)
|
|||
view_move_resize(view, dst);
|
||||
}
|
||||
|
||||
const char *
|
||||
view_get_string_prop(struct view *view, const char *prop)
|
||||
{
|
||||
if (view->impl->get_string_prop) {
|
||||
return view->impl->get_string_prop(view, "title");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
view_update_title(struct view *view)
|
||||
{
|
||||
const char *title = view->impl->get_string_prop(view, "title");
|
||||
const char *title = view_get_string_prop(view, "title");
|
||||
if (!view->toplevel_handle || !title) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -412,7 +420,7 @@ view_update_title(struct view *view)
|
|||
void
|
||||
view_update_app_id(struct view *view)
|
||||
{
|
||||
const char *app_id = view->impl->get_string_prop(view, "app_id");
|
||||
const char *app_id = view_get_string_prop(view, "app_id");
|
||||
if (!view->toplevel_handle || !app_id) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue