Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : proto

Dir     : e17/proto/entropy/src/dialogs


Modified Files:
        etk_interaction_dialog.c ewl_interaction_dialog.c 


Log Message:
* More interaction dialog work - now includes string reference (e.g. filename 
to overwrite)

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/entropy/src/dialogs/etk_interaction_dialog.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- etk_interaction_dialog.c    2 Mar 2006 02:44:19 -0000       1.1
+++ etk_interaction_dialog.c    2 Mar 2006 06:10:55 -0000       1.2
@@ -20,27 +20,31 @@
        etk_object_destroy(ETK_OBJECT(window));
 }
 
-void entropy_etk_user_interaction_dialog_new(long operation_id) 
+void entropy_etk_user_interaction_dialog_new(entropy_file_operation* interact) 
 {
 
-               char buf[PATH_MAX];
+               const char buf[PATH_MAX];
                Etk_Widget* window = etk_window_new();
                Etk_Widget* vbox= etk_vbox_new(ETK_TRUE,5);
                Etk_Widget* hbox = etk_hbox_new(ETK_TRUE,5);
                Etk_Widget* button;
-
-               snprintf(buf, PATH_MAX, "Conrifm overwrite for operation ID 
%ld? ", operation_id);
+               Etk_Widget* label;
+               
+               snprintf(buf, PATH_MAX, "Confirm overwrite for '%s'? ", 
interact->file);
                
                etk_window_title_set(ETK_WINDOW(window), buf);
                
                etk_container_add(ETK_CONTAINER(window), vbox);
-               etk_container_add(ETK_CONTAINER(vbox), hbox);
+
+               label = etk_label_new(buf);
+               etk_box_pack_start(ETK_BOX(vbox), label, ETK_TRUE, ETK_TRUE, 5);
+               etk_box_pack_start(ETK_BOX(vbox), hbox, ETK_FALSE, ETK_FALSE, 
5);
 
                button = etk_button_new_with_label("Yes");
                etk_container_add(ETK_CONTAINER(hbox), button);
                
                etk_object_data_set(ETK_OBJECT(button), "window", window);
-               etk_object_data_set(ETK_OBJECT(button), "operation", 
(long*)operation_id);
+               etk_object_data_set(ETK_OBJECT(button), "operation", 
(long*)interact->id);
 
                etk_signal_connect("pressed", ETK_OBJECT(button), 
ETK_CALLBACK(etk_entropy_user_interaction_dialog_cb), 
                                (int*)ENTROPY_USER_INTERACTION_RESPONSE_YES );
@@ -51,7 +55,7 @@
                etk_container_add(ETK_CONTAINER(hbox), button);
                
                etk_object_data_set(ETK_OBJECT(button), "window", window);
-               etk_object_data_set(ETK_OBJECT(button), "operation", 
(long*)operation_id);
+               etk_object_data_set(ETK_OBJECT(button), "operation", 
(long*)interact->id);
                
                etk_signal_connect("pressed", ETK_OBJECT(button), 
ETK_CALLBACK(etk_entropy_user_interaction_dialog_cb), 
                                (int*)ENTROPY_USER_INTERACTION_RESPONSE_NO );
@@ -62,7 +66,7 @@
                etk_button_label_set(ETK_BUTTON(button), "Abort");
                etk_container_add(ETK_CONTAINER(hbox), button);
                etk_object_data_set(ETK_OBJECT(button), "window", window);
-               etk_object_data_set(ETK_OBJECT(button), "operation", 
(long*)operation_id);
+               etk_object_data_set(ETK_OBJECT(button), "operation", 
(long*)interact->id);
        
                etk_signal_connect("pressed", ETK_OBJECT(button), 
ETK_CALLBACK(etk_entropy_user_interaction_dialog_cb), 
                                (int*)ENTROPY_USER_INTERACTION_RESPONSE_ABORT );
@@ -70,7 +74,8 @@
                etk_widget_show(button);
 
 
-               etk_widget_show(window);
+               etk_widget_show_all(window);
+
                etk_widget_show(vbox);
                etk_widget_show(hbox);
 }
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/entropy/src/dialogs/ewl_interaction_dialog.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ewl_interaction_dialog.c    24 Feb 2006 06:30:16 -0000      1.3
+++ ewl_interaction_dialog.c    2 Mar 2006 06:10:55 -0000       1.4
@@ -21,7 +21,7 @@
        ewl_widget_destroy(window);
 }
 
-void entropy_ewl_user_interaction_dialog_new(long operation_id) 
+void entropy_ewl_user_interaction_dialog_new(entropy_file_operation* op) 
 {
 
                char buf[PATH_MAX];
@@ -30,7 +30,7 @@
                Ewl_Widget* hbox = ewl_hbox_new();
                Ewl_Widget* button;
 
-               snprintf(buf, PATH_MAX, "Conrifm overwrite for operation ID 
%ld? ", operation_id);
+               snprintf(buf, PATH_MAX, "Conrifm overwrite for operation ID 
%ld? ", op->id);
                
                ewl_object_minimum_w_set(EWL_OBJECT(window), 300);
                
@@ -44,7 +44,7 @@
                ewl_button_label_set(EWL_BUTTON(button), "Yes");
                ewl_container_child_append(EWL_CONTAINER(hbox), button);
                ewl_widget_data_set(button, "window", window);
-               ewl_widget_data_set(button, "operation", (long*)operation_id);
+               ewl_widget_data_set(button, "operation", (long*)op->id);
                ewl_callback_append(button, EWL_CALLBACK_CLICKED, 
                        ewl_entropy_user_interaction_dialog_cb, 
(int*)ENTROPY_USER_INTERACTION_RESPONSE_YES);
                ewl_widget_show(button);
@@ -53,7 +53,7 @@
                ewl_button_label_set(EWL_BUTTON(button), "No");
                ewl_container_child_append(EWL_CONTAINER(hbox), button);
                ewl_widget_data_set(button, "window", window);
-               ewl_widget_data_set(button, "operation", (long*)operation_id);
+               ewl_widget_data_set(button, "operation", (long*)op->id);
                ewl_callback_append(button, EWL_CALLBACK_CLICKED, 
                        ewl_entropy_user_interaction_dialog_cb, 
(int*)ENTROPY_USER_INTERACTION_RESPONSE_NO);
                ewl_widget_show(button);
@@ -62,7 +62,7 @@
                ewl_button_label_set(EWL_BUTTON(button), "Abort");
                ewl_container_child_append(EWL_CONTAINER(hbox), button);
                ewl_widget_data_set(button, "window", window);
-               ewl_widget_data_set(button, "operation", (long*)operation_id);
+               ewl_widget_data_set(button, "operation", (long*)op->id);
                ewl_callback_append(button, EWL_CALLBACK_CLICKED, 
                        ewl_entropy_user_interaction_dialog_cb, 
(int*)ENTROPY_USER_INTERACTION_RESPONSE_ABORT);
                ewl_widget_show(button);




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to