Nice little filelist
This commit is contained in:
parent
4ea1ffce5d
commit
deeb4a33bc
@ -1,3 +1,5 @@
|
||||
-> Detect if the media in a drive has changed and update the drive info (dbus?).
|
||||
-> Make gstreamer dependancy optional DONE
|
||||
-> more graceful handling of errors
|
||||
-> ffmpeg instead of gstreamer
|
||||
-> finish interface
|
||||
|
@ -24,5 +24,25 @@ group {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
part {
|
||||
name: "filelist";
|
||||
type: SWALLOW;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
min: 245 245;
|
||||
max: 99999 350;
|
||||
align: 0.0 0.0;
|
||||
|
||||
rel1 {
|
||||
to: "background";
|
||||
offset: 5 5;
|
||||
}
|
||||
|
||||
rel2 {
|
||||
offset: -5 -5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,15 +13,13 @@ main(int argc, char **argv)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
/* Do I really need all of these? */
|
||||
if (!ecore_init())
|
||||
{
|
||||
printf("Cannot initialize Ecore!\n");
|
||||
ret = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
ecore_app_args_set(argc, (const char **)argv);
|
||||
|
||||
if (!ecore_string_init())
|
||||
{
|
||||
printf("Cannot initialize Ecore_String!\n");
|
||||
@ -50,6 +48,13 @@ main(int argc, char **argv)
|
||||
goto SHUTDOWN;
|
||||
}
|
||||
|
||||
if (!ewl_init(&argc, argv))
|
||||
{
|
||||
printf("Connot initialize Ewl!\n");
|
||||
ret = 1;
|
||||
goto SHUTDOWN;
|
||||
}
|
||||
|
||||
if (!ecdb_image_init())
|
||||
{
|
||||
printf("Cannot initialize libisofs!\n");
|
||||
@ -123,7 +128,7 @@ main(int argc, char **argv)
|
||||
|
||||
*/
|
||||
|
||||
ecore_main_loop_begin();
|
||||
ewl_main();
|
||||
|
||||
/* End testing */
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <Ecore_Evas.h>
|
||||
#include <Efreet_Mime.h>
|
||||
#include <Efreet.h>
|
||||
#include <Ewl.h>
|
||||
#include <libburn/libburn.h>
|
||||
#include <libisofs/libisofs.h>
|
||||
|
||||
|
@ -31,6 +31,9 @@ int
|
||||
ecdb_create_main_gui(void)
|
||||
{
|
||||
Evas_Object *gui;
|
||||
Evas_Object *swallow;
|
||||
Ewl_Widget *embed, *filelist;
|
||||
Evas_Coord x, y, w, h;
|
||||
|
||||
em->main_win_ee = ecore_evas_software_x11_new(0, 0, 0, 0, 255, 255);
|
||||
|
||||
@ -61,6 +64,27 @@ ecdb_create_main_gui(void)
|
||||
|
||||
ecdb_set_main_theme(NULL, "ecdb/window");
|
||||
|
||||
/* Set up the filelist swallow */
|
||||
embed = ewl_embed_new();
|
||||
ewl_object_fill_policy_set(EWL_OBJECT(embed), EWL_FLAG_FILL_ALL);
|
||||
swallow = ewl_embed_canvas_set(EWL_EMBED(embed),
|
||||
ecore_evas_get(em->main_win_ee),
|
||||
(void *)(long) ecore_evas_software_x11_window_get
|
||||
(em->main_win_ee));
|
||||
ewl_embed_focus_set(EWL_EMBED(embed), TRUE);
|
||||
ewl_widget_show(embed);
|
||||
|
||||
filelist = ewl_filelist_new();
|
||||
ewl_container_child_append(EWL_CONTAINER(embed), filelist);
|
||||
ewl_filelist_directory_set(EWL_FILELIST(filelist), getenv("HOME"));
|
||||
ewl_widget_show(filelist);
|
||||
|
||||
edje_object_part_geometry_get(gui, "filelist", &x, &y, &w, &h);
|
||||
evas_object_move(swallow, x, y);
|
||||
evas_object_resize(swallow, x, y);
|
||||
edje_object_part_swallow(gui, "filelist", swallow);
|
||||
evas_object_show(swallow);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ ecdb_shutdown(void *data, int type, void *event)
|
||||
|
||||
if (!ecore_file_recursive_rm("/tmp/ecdb"))
|
||||
printf("Removal of temporary directory failed!\n");
|
||||
ecore_main_loop_quit();
|
||||
ewl_main_quit();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user