Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : proto

Dir     : e17/proto/entropy/src/plugins


Modified Files:
        ewl_icon_local_viewer.c ewl_properties_dialog.c ewl_tip.c 
        layout_ewl_simple.c mime.c 


Log Message:
* Cleanups

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/ewl_icon_local_viewer.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -r1.49 -r1.50
--- ewl_icon_local_viewer.c     9 Jan 2006 06:02:24 -0000       1.49
+++ ewl_icon_local_viewer.c     11 Jan 2006 04:56:19 -0000      1.50
@@ -129,8 +129,6 @@
 void icon_hover_properties_show_cb(Ewl_Widget *w , void *ev_data , void 
*user_data ) {
        entropy_gui_component_instance* instance = user_data;
        entropy_icon_viewer* viewer = instance->data;
-
-       printf("Showing prperties!\n");
 }
 /*-----------------------------*/
 
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/ewl_properties_dialog.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_properties_dialog.c     4 Dec 2005 16:56:48 -0000       1.5
+++ ewl_properties_dialog.c     11 Jan 2006 04:56:19 -0000      1.6
@@ -74,26 +74,25 @@
 
        /*----------------------------*/
        /*The icon*/
-       if (file_stat->file->thumbnail) {
-               hbox = ewl_hbox_new();
-               ewl_container_child_append(EWL_CONTAINER(vbox), hbox);
-               ewl_widget_show(hbox);
+       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);
+       image = ewl_image_new();
+       ewl_image_constrain_set(EWL_IMAGE(image), 64);
+       if (file_stat->file->thumbnail) {
                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);
-
-
+       } else {
+               ewl_image_file_set(EWL_IMAGE(image), PACKAGE_DATA_DIR 
"/icons/default.png", 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();
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/plugins/ewl_tip.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ewl_tip.c   6 Dec 2005 09:56:11 -0000       1.1
+++ ewl_tip.c   11 Jan 2006 04:56:19 -0000      1.2
@@ -5,8 +5,18 @@
 #include <dlfcn.h>
 #include <time.h>
 
-void ewl_entropy_tip_window_display() {
+void ewl_entropy_tip_window_destroy_cb(Ewl_Widget* w, void* ev_data, void* 
user_data);
+
+void ewl_entropy_tip_window_destroy_cb(Ewl_Widget* w, void* ev_data, void* 
user_data) 
+{
+       ewl_widget_destroy(w);
+}
+
+
+void ewl_entropy_tip_window_display() 
+{
        Ewl_Widget* tip_window = ewl_window_new();
        ewl_object_custom_size_set(EWL_OBJECT(tip_window), 300, 150);
+       ewl_callback_append(tip_window, EWL_CALLBACK_DELETE_WINDOW, 
ewl_entropy_tip_window_destroy_cb, NULL);
        ewl_widget_show(tip_window);
 }
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/layout_ewl_simple.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- layout_ewl_simple.c 8 Jan 2006 22:34:58 -0000       1.29
+++ layout_ewl_simple.c 11 Jan 2006 04:56:19 -0000      1.30
@@ -10,9 +10,28 @@
 #define HEADER_CONFIG_MAX 2048
 
 static Ewl_Widget* win;
+
+int entropy_plugin_type_get();
+char* entropy_plugin_identify();
+void location_add_execute_cb(Ewl_Widget *item, void *ev_data, void *user_data);
+void location_add_cancel_cb(Ewl_Widget *item, void *ev_data, void *user_data);
+void mime_cb(Ewl_Widget *main_win, void *ev_data, void *user_data);
+void entropy_ewl_layout_simple_tooltip_window();
+void location_menu_popup_delete_cb(Ewl_Widget *label, void *ev_data, void 
*user_data);
+void location_menu_popup_cb(Ewl_Widget *label, void *ev_data, void *user_data);
+void location_add_cb(Ewl_Widget *main_win, void *ev_data, void *user_data);
 void layout_ewl_simple_config_create(entropy_core* core);
 void layout_ewl_simple_add_header(entropy_gui_component_instance* instance, 
char* name, char* uri);
 void layout_ewl_simple_add_config_location(entropy_gui_component_instance* 
instance, char* name, char* uri);
+Ecore_Hash* layout_ewl_simple_parse_config(entropy_gui_component_instance* 
instance, char* config);
+void __destroy_main_window(Ewl_Widget *main_win, void *ev_data, void 
*user_data);
+void contract_cb(Ewl_Widget *main_win, void *ev_data, void *user_data);
+void layout_ewl_simple_local_view_cb (Ewl_Widget *main_win, void *ev_data, 
void *user_data);
+void entropy_plugin_layout_main();
+void entropy_plugin_destroy(entropy_gui_component_instance* comp);
+void entropy_plugin_init(entropy_core* core);
+void entropy_delete_current_folder(Ecore_List* el);
+entropy_gui_component_instance* entropy_plugin_layout_create(entropy_core* 
core);
 
 typedef struct entropy_ewl_layout_header_uri entropy_ewl_layout_header_uri;
 struct entropy_ewl_layout_header_uri {
@@ -53,11 +72,13 @@
 };
 
 
-int entropy_plugin_type_get() {
+int entropy_plugin_type_get() 
+{
        return ENTROPY_PLUGIN_GUI_LAYOUT;
 }
 
-char* entropy_plugin_identify() {
+char* entropy_plugin_identify() 
+{
                return (char*)"Simple EWL layout container";
 }
 
@@ -65,7 +86,8 @@
 
 
 /*TODO/FIXME - This needs a rewrite, to be dynamic, and wizard-based*/
-void location_add_execute_cb(Ewl_Widget *item, void *ev_data, void *user_data) 
{
+void location_add_execute_cb(Ewl_Widget *item, void *ev_data, void *user_data) 
+{
        entropy_gui_component_instance* instance = user_data;
        entropy_layout_gui* viewer = instance->data;
 
@@ -117,23 +139,27 @@
 }
 
 
-void location_add_cancel_cb(Ewl_Widget *item, void *ev_data, void *user_data) {
+void location_add_cancel_cb(Ewl_Widget *item, void *ev_data, void *user_data) 
+{
        ewl_widget_destroy(EWL_WIDGET(user_data));
 }
 
-void mime_cb(Ewl_Widget *main_win, void *ev_data, void *user_data) {
+void mime_cb(Ewl_Widget *main_win, void *ev_data, void *user_data) 
+{
        entropy_ewl_mime_dialog_display();
 }
 
 
-void entropy_ewl_layout_simple_tooltip_window() {
+void entropy_ewl_layout_simple_tooltip_window() 
+{
        int status = entropy_core_tooltip_status_get();
 
 }
 
 
 /*Header context menu*/
-void location_menu_popup_delete_cb(Ewl_Widget *label, void *ev_data, void 
*user_data) {
+void location_menu_popup_delete_cb(Ewl_Widget *label, void *ev_data, void 
*user_data) 
+{
        entropy_gui_component_instance* instance = user_data;
        entropy_layout_gui* layout = instance->data;
 
@@ -143,7 +169,8 @@
        ecore_hash_remove(layout->headers, layout->active_header->visual);
 }
 
-void location_menu_popup_cb(Ewl_Widget *label, void *ev_data, void *user_data) 
{
+void location_menu_popup_cb(Ewl_Widget *label, void *ev_data, void *user_data) 
+{
        Ewl_Event_Mouse_Down *ev = ev_data;
        entropy_ewl_layout_header_uri* header = user_data;
        
@@ -161,7 +188,8 @@
 
 
 
-void location_add_cb(Ewl_Widget *main_win, void *ev_data, void *user_data) {
+void location_add_cb(Ewl_Widget *main_win, void *ev_data, void *user_data) 
+{
        entropy_gui_component_instance* instance = 
(entropy_gui_component_instance*)user_data;
 
        Ewl_Widget* window;
@@ -316,7 +344,8 @@
 }
 
 
-void layout_ewl_simple_add_config_location(entropy_gui_component_instance* 
instance, char* name, char* uri) {
+void layout_ewl_simple_add_config_location(entropy_gui_component_instance* 
instance, char* name, char* uri) 
+{
        char* current_uri = entropy_config_str_get("layout_ewl_simple", 
"structure_bar");
        char new_uri[HEADER_CONFIG_MAX];
 
@@ -327,7 +356,8 @@
 }
 
 
-void layout_ewl_simple_config_create(entropy_core* core) {
+void layout_ewl_simple_config_create(entropy_core* core) 
+{
        char* eg = calloc(HEADER_CONFIG_MAX, sizeof(char)) ;
 
        snprintf(eg, HEADER_CONFIG_MAX, 
"Computer;posix:///|Home;posix://%s|Samba Example (Don't 
use!);smb://username:password@/test/machine/folder", 
@@ -340,7 +370,8 @@
 }
 
 
-void layout_ewl_simple_add_header(entropy_gui_component_instance* instance, 
char* name, char* uri) {
+void layout_ewl_simple_add_header(entropy_gui_component_instance* instance, 
char* name, char* uri) 
+{
 
        Ewl_Widget* hbox;
        entropy_plugin* structure;
@@ -393,7 +424,8 @@
        }
 }
 
-Ecore_Hash* layout_ewl_simple_parse_config(entropy_gui_component_instance* 
instance, char* config) {
+Ecore_Hash* layout_ewl_simple_parse_config(entropy_gui_component_instance* 
instance, char* config) 
+{
        Ecore_Hash* ret = ecore_hash_new(ecore_str_hash, ecore_str_compare);
 
        if (!strstr(config, "|")) {
@@ -445,8 +477,8 @@
 }
 
 
-void
-__destroy_main_window(Ewl_Widget *main_win, void *ev_data, void *user_data) {
+void __destroy_main_window(Ewl_Widget *main_win, void *ev_data, void 
*user_data) 
+{
        entropy_core* core = (entropy_core*)user_data;
        ewl_widget_destroy(main_win);
 
@@ -456,17 +488,16 @@
        exit(0);
 }
 
-void
-contract_cb(Ewl_Widget *main_win, void *ev_data, void *user_data) {
+void contract_cb(Ewl_Widget *main_win, void *ev_data, void *user_data) 
+{
        Ewl_Box* box = EWL_BOX(user_data);
 
        ewl_object_maximum_w_set(EWL_OBJECT(box), 15);
 }
 
 
-void
-layout_ewl_simple_local_view_cb
-(Ewl_Widget *main_win, void *ev_data, void *user_data) {
+void layout_ewl_simple_local_view_cb (Ewl_Widget *main_win, void *ev_data, 
void *user_data) 
+{
        
        entropy_gui_component_instance* instance = user_data;
        entropy_layout_gui* layout = instance->layout_parent->data;
@@ -499,13 +530,15 @@
 
 
 
-void entropy_plugin_layout_main() {
+void entropy_plugin_layout_main() 
+{      
        ewl_widget_show(win);
        ewl_main();
 }
 
 
-void entropy_plugin_destroy(entropy_gui_component_instance* comp) {
+void entropy_plugin_destroy(entropy_gui_component_instance* comp) 
+{
        entropy_layout_gui* gui = comp->data;
        Ecore_List* keys;
        void* key;
@@ -533,19 +566,22 @@
 }
 
 
-void entropy_plugin_init(entropy_core* core) {
+void entropy_plugin_init(entropy_core* core) 
+{
        int i =0;
        char **c = NULL;
        /*Init ewl*/
        ewl_init(&i, c);
 }
 
-void entropy_delete_current_folder(Ecore_List* el) {
+void entropy_delete_current_folder(Ecore_List* el) 
+{
        ecore_list_destroy(el);
 }
 
 
-entropy_gui_component_instance* entropy_plugin_layout_create(entropy_core* 
core) {
+entropy_gui_component_instance* entropy_plugin_layout_create(entropy_core* 
core) 
+{
        entropy_gui_component_instance* layout;
        entropy_layout_gui* gui;
        char* tmp = NULL;
@@ -708,7 +744,7 @@
        item = ewl_menu_item_new();
        ewl_menu_item_text_set(EWL_MENU_ITEM(item), "Tip Of The Day..");
        ewl_container_child_append(EWL_CONTAINER(menu), item);
-       ewl_callback_append(EWL_WIDGET(item), EWL_CALLBACK_CLICKED, 
location_add_cb, layout);
+       ewl_callback_append(EWL_WIDGET(item), EWL_CALLBACK_CLICKED, , layout);
        ewl_widget_show(item);
 
        item = ewl_menu_item_new();
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/entropy/src/plugins/mime.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- mime.c      29 Nov 2005 08:27:16 -0000      1.7
+++ mime.c      11 Jan 2006 04:56:19 -0000      1.8
@@ -32,6 +32,7 @@
        ecore_hash_set(mime_hash, ".htm", "text/html");
        ecore_hash_set(mime_hash, ".html", "text/html");
        ecore_hash_set(mime_hash, ".c", "text/csrc");
+       ecore_hash_set(mime_hash, ".cpp", "text/x-c++src");
        ecore_hash_set(mime_hash, ".mpg", "video/mpeg");
        ecore_hash_set(mime_hash, ".mpe", "video/mpeg");
        ecore_hash_set(mime_hash, ".mpeg", "video/mpeg");




-------------------------------------------------------
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

Reply via email to