forked from enlightenment/enlightenment
E Wallpaper 2: Patch from thomasg <thomas@gstaedtnet.net> for adding
Apply and Close buttons to the Wallpaper2 dialog, and remove trailing whitespaces. SVN revision: 74773
This commit is contained in:
parent
9a35b4779b
commit
68c52f7f10
|
@ -979,7 +979,7 @@ _bg_clicked(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUS
|
|||
}
|
||||
|
||||
static void
|
||||
_ok(void *data, void *data2 __UNUSED__)
|
||||
_apply(void *data, void *data2 __UNUSED__)
|
||||
{
|
||||
Info *info = data;
|
||||
|
||||
|
@ -1022,9 +1022,21 @@ _ok(void *data, void *data2 __UNUSED__)
|
|||
}
|
||||
e_bg_update();
|
||||
e_config_save_queue();
|
||||
}
|
||||
|
||||
static void
|
||||
_close(void *data __UNUSED__, void *data2 __UNUSED__)
|
||||
{
|
||||
wp_conf_hide();
|
||||
}
|
||||
|
||||
static void
|
||||
_ok(void *data, void *data2 __UNUSED__)
|
||||
{
|
||||
_apply(data, data2);
|
||||
wp_conf_hide();
|
||||
}
|
||||
|
||||
static void
|
||||
_wp_add(void *data, void *data2 __UNUSED__)
|
||||
{
|
||||
|
@ -1174,14 +1186,26 @@ wp_browser_new(E_Container *con)
|
|||
edje_object_signal_callback_add(info->bg, "e,action,click", "e",
|
||||
_bg_clicked, info);
|
||||
|
||||
// ok button
|
||||
info->box = e_widget_list_add(info->win->evas, 1, 1);
|
||||
|
||||
// ok button
|
||||
info->button = e_widget_button_add(info->win->evas, _("OK"), NULL,
|
||||
_ok, info, NULL);
|
||||
evas_object_show(info->button);
|
||||
e_widget_list_object_append(info->box, info->button, 1, 0, 0.5);
|
||||
|
||||
// apply button
|
||||
info->button = e_widget_button_add(info->win->evas, _("Apply"), NULL,
|
||||
_apply, info, NULL);
|
||||
evas_object_show(info->button);
|
||||
e_widget_list_object_append(info->box, info->button, 1, 0, 0.5);
|
||||
|
||||
// close button
|
||||
info->button = e_widget_button_add(info->win->evas, _("Close"), NULL,
|
||||
_close, info, NULL);
|
||||
evas_object_show(info->button);
|
||||
e_widget_list_object_append(info->box, info->button, 1, 0, 0.5);
|
||||
|
||||
e_widget_size_min_get(info->box, &mw, &mh);
|
||||
edje_extern_object_min_size_set(info->box, mw, mh);
|
||||
edje_object_part_swallow(info->bg, "e.swallow.buttons", info->box);
|
||||
|
|
Loading…
Reference in New Issue