More work on the buttons
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#include "ecdb.h"
|
||||
|
||||
static void ecdb_handle_typebuf(Evas_Object *gui);
|
||||
static void ecdb_cb_welcome_page(void *data, Evas_Object *o,
|
||||
const char *emission, const char *source);
|
||||
|
||||
static void
|
||||
ecdb_cb_enter(Ecore_Evas *ee)
|
||||
@@ -213,13 +215,13 @@ ecdb_create_main_gui(void)
|
||||
|
||||
welcome_page = edje_object_add(ecore_evas_get(em->main_win_ee));
|
||||
evas_object_name_set(welcome_page, "welcome_page");
|
||||
// XXX Don't hardcode this
|
||||
edje_object_file_set(welcome_page, PACKAGE_DATA_DIR
|
||||
"/themes/default.edj", "ecdb/welcome_page");
|
||||
edje_object_file_set(welcome_page, em->theme_path, "ecdb/welcome_page");
|
||||
edje_object_part_geometry_get(gui, "active_area", &x, &y, &w, &h);
|
||||
evas_object_move(welcome_page, x, y);
|
||||
evas_object_resize(welcome_page, w, h);
|
||||
edje_object_part_swallow(gui, "action_area", welcome_page);
|
||||
edje_object_signal_callback_add(welcome_page, "selected", "b*",
|
||||
ecdb_cb_welcome_page, NULL);
|
||||
evas_object_show(welcome_page);
|
||||
|
||||
/* Buttons next, do properly next */
|
||||
@@ -234,8 +236,7 @@ ecdb_create_main_gui(void)
|
||||
{
|
||||
b = edje_object_add(ecore_evas_get(em->main_win_ee));
|
||||
evas_object_name_set(b, names[i]);
|
||||
edje_object_file_set(b, PACKAGE_DATA_DIR
|
||||
"/themes/default.edj", "ecdb/button");
|
||||
edje_object_file_set(b, em->theme_path, "ecdb/button");
|
||||
edje_object_part_geometry_get(welcome_page, names[i],
|
||||
&x, &y, &w, &h);
|
||||
edje_object_part_text_set(b, "label", labels[i]);
|
||||
@@ -274,11 +275,12 @@ ecdb_set_main_theme(const char *theme_name, const char *group)
|
||||
|
||||
if (!theme_name)
|
||||
{
|
||||
if (!edje_object_file_set(gui, PACKAGE_DATA_DIR
|
||||
"/themes/default.edj", group))
|
||||
snprintf(em->theme_path, PATH_MAX, "%s/%s", PACKAGE_DATA_DIR,
|
||||
"themes/default.edj");
|
||||
if (!edje_object_file_set(gui, em->theme_path, group))
|
||||
{
|
||||
printf("Error setting default theme: %s\n",
|
||||
PACKAGE_DATA_DIR"/themes/default.edj");
|
||||
em->theme_path);
|
||||
return;
|
||||
}
|
||||
evas_font_path_append(ecore_evas_get(em->main_win_ee),
|
||||
@@ -386,3 +388,11 @@ ecdb_handle_typebuf(Evas_Object *gui)
|
||||
edje_object_part_text_set(gui, "filelist_overlay_text", NULL);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ecdb_cb_welcome_page(void *data, Evas_Object *o, const char *emission,
|
||||
const char *source)
|
||||
{
|
||||
printf("callback from %s\n", source);
|
||||
printf("callback %s\n", emission);
|
||||
}
|
||||
|
Reference in New Issue
Block a user