Enlightenment CVS committal Author : lordchaos Project : e17 Module : proto
Dir : e17/proto/entropy/src/plugins Modified Files: Makefile.am ewl_icon_local_viewer.c Added Files: ewl_properties_dialog.c Log Message: * Code separation =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/plugins/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- Makefile.am 24 Nov 2005 04:03:13 -0000 1.7 +++ Makefile.am 28 Nov 2005 08:34:41 -0000 1.8 @@ -23,7 +23,7 @@ pkg_LTLIBRARIES = $(MIME_L) $(THUMBNAILER_L) $(POSIX_L) $(LAYOUT_L) $(EWL_LOCAL_ICON_L) $(STRUCTURE_VIEWER_L) $(SYSTEM_THUMBNAILER_L) $(ACTION_SIMPLE_L) $(LAYOUT_ETK_L) -ewl_local_icon_la_SOURCES = ewl_icon_local_viewer.c $(top_srcdir)/src/entropy_debug.c +ewl_local_icon_la_SOURCES = ewl_icon_local_viewer.c ewl_properties_dialog.c $(top_srcdir)/src/entropy_debug.c ewl_local_icon_la_CFLAGS = @EWL_CFLAGS@ ewl_local_icon_la_LDFLAGS = -module -avoid-version ewl_local_icon_la_LIBADD = @EWL_LIBS@ =================================================================== RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/plugins/ewl_icon_local_viewer.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -3 -r1.31 -r1.32 --- ewl_icon_local_viewer.c 26 Nov 2005 11:50:42 -0000 1.31 +++ ewl_icon_local_viewer.c 28 Nov 2005 08:34:41 -0000 1.32 @@ -2,6 +2,7 @@ #include "entropy.h" #include "entropy_gui.h" #include "entropy_config.h" +#include "ewl_properties_dialog.h" #include <dlfcn.h> #include <time.h> @@ -77,11 +78,7 @@ -void - __destroy_properties_dialog(Ewl_Widget *dialog, void *ev_data, void *user_data) - { - ewl_widget_destroy(EWL_WIDGET(user_data)); -} + void progress_window_create(entropy_file_progress_window* progress) { @@ -111,185 +108,6 @@ } -void ewl_icon_local_viewer_show_stat(entropy_file_stat* file_stat) { - Ewl_Widget* window; - Ewl_Widget* vbox; - Ewl_Widget* image; - Ewl_Widget* hbox; - Ewl_Widget* text; - Ewl_Widget* button; - char itext[100]; - time_t stime; - - - window = ewl_window_new(); - ewl_window_title_set(EWL_WINDOW(window), "File Properties"); - ewl_object_custom_size_set(EWL_OBJECT(window), 300, 400); - - vbox = ewl_vbox_new(); - ewl_container_child_append(EWL_CONTAINER(window), vbox); - ewl_widget_show(vbox); - - - /*----------------------------*/ - /*The icon*/ - if (file_stat->file->thumbnail) { - hbox = ewl_hbox_new(); - ewl_container_child_append(EWL_CONTAINER(vbox), hbox); - ewl_widget_show(hbox); - - image = ewl_image_new(); - ewl_image_constrain_set(EWL_IMAGE(image), 64); - ewl_image_file_set(EWL_IMAGE(image), file_stat->file->thumbnail->thumbnail_filename, NULL); - ewl_container_child_append(EWL_CONTAINER(hbox), image); - ewl_widget_show(image); - - text = ewl_text_new(); - ewl_text_text_set(EWL_TEXT(text), file_stat->file->filename); - ewl_container_child_append(EWL_CONTAINER(hbox), text); - ewl_widget_show(text); - - - } - - - - /*---------------------------*/ - hbox = ewl_hbox_new(); - ewl_container_child_append(EWL_CONTAINER(vbox), hbox); - ewl_widget_show(hbox); - - - - text = ewl_text_new(); - ewl_text_text_set(EWL_TEXT(text), "Location"); - ewl_container_child_append(EWL_CONTAINER(hbox), text); - ewl_widget_show(text); - - text = ewl_text_new(); - ewl_text_text_set(EWL_TEXT(text), file_stat->file->path); - ewl_container_child_append(EWL_CONTAINER(hbox), text); - ewl_widget_show(text); - - /*--------------------------*/ - - - - /*----------------------------------------*/ - /*hbox = ewl_hbox_new(); - ewl_container_child_append(EWL_CONTAINER(vbox), hbox); - ewl_widget_show(hbox); - - text = ewl_text_new(); - ewl_text_text_set(EWL_TEXT(text), "Filename"); - ewl_container_child_append(EWL_CONTAINER(hbox), text); - ewl_widget_show(text);*/ - - - - - hbox = ewl_hbox_new(); - ewl_container_child_append(EWL_CONTAINER(vbox), hbox); - ewl_widget_show(hbox); - - text = ewl_text_new(); - ewl_text_text_set(EWL_TEXT(text), "Type: "); - ewl_container_child_append(EWL_CONTAINER(hbox), text); - ewl_widget_show(text); - - - - text = ewl_text_new(); - if (strlen(file_stat->file->mime_type)) { - ewl_text_text_set(EWL_TEXT(text), file_stat->file->mime_type); - } else { - ewl_text_text_set(EWL_TEXT(text), "object/unknown"); - } - - ewl_container_child_append(EWL_CONTAINER(hbox), text); - ewl_widget_show(text); - /*--------------------------------*/ - - - - /*----------------------------------*/ - hbox = ewl_hbox_new(); - ewl_container_child_append(EWL_CONTAINER(vbox), hbox); - ewl_widget_show(hbox); - - text = ewl_text_new(); - ewl_text_text_set(EWL_TEXT(text), "Plugin URI"); - ewl_container_child_append(EWL_CONTAINER(hbox), text); - ewl_widget_show(text); - - - - text = ewl_text_new(); - ewl_text_text_set(EWL_TEXT(text), file_stat->file->uri_base); - ewl_container_child_append(EWL_CONTAINER(hbox), text); - ewl_widget_show(text); - - - - - /*---------------------------------*/ - hbox = ewl_hbox_new(); - ewl_container_child_append(EWL_CONTAINER(vbox), hbox); - ewl_widget_show(hbox); - - text = ewl_text_new(); - ewl_text_text_set(EWL_TEXT(text), "Size: "); - ewl_container_child_append(EWL_CONTAINER(hbox), text); - ewl_widget_show(text); - - text = ewl_text_new(); - snprintf(itext, 100, "%d kb", (int)(file_stat->stat_obj->st_size / 1024)); - ewl_text_text_set(EWL_TEXT(text), itext); - ewl_container_child_append(EWL_CONTAINER(hbox), text); - ewl_widget_show(text); - /*-------------------------------------*/ - - /*---------------------------------*/ - hbox = ewl_hbox_new(); - ewl_container_child_append(EWL_CONTAINER(vbox), hbox); - ewl_widget_show(hbox); - - text = ewl_text_new(); - ewl_text_text_set(EWL_TEXT(text), "Modified Time"); - ewl_container_child_append(EWL_CONTAINER(hbox), text); - ewl_widget_show(text); - - text = ewl_text_new(); - stime = file_stat->stat_obj->st_mtime; - ewl_text_text_set(EWL_TEXT(text), ctime(&stime)); - ewl_container_child_append(EWL_CONTAINER(hbox), text); - ewl_widget_show(text); - /*-------------------------------------*/ - - - - - button = ewl_button_new(); - ewl_button_label_set(EWL_BUTTON(button), "OK"); - ewl_container_child_append(EWL_CONTAINER(vbox), button); - ewl_object_maximum_h_set(EWL_OBJECT(button), 15); - ewl_widget_show(button); - ewl_callback_append(EWL_WIDGET(button), EWL_CALLBACK_CLICKED, __destroy_properties_dialog, window); - - - - - /*printf("Got a 'stat available' object\n"); - printf("File size: %d\n", file_stat->stat_obj->st_size); - printf("File inode: %d\n", file_stat->stat_obj->st_ino); - printf("File uid: %d\n", file_stat->stat_obj->st_uid); - printf("File gid: %d\n", file_stat->stat_obj->st_gid); - printf("Last access: %d\n", file_stat->stat_obj->st_atime); - printf("Last modify : %d\n", file_stat->stat_obj->st_mtime);*/ - - - ewl_widget_show(window); -} /*---------------------------*/ ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs