Enlightenment CVS committal

Author  : titan
Project : e17
Module  : apps/ephoto

Dir     : e17/apps/ephoto/src/bin


Modified Files:
        ephoto.h ephoto_exif.c ephoto_gui.c ephoto_list_view.c 
        ephoto_normal_view.c 


Log Message:
Some cleanup and preparation for additions of dialogs, and text styles.

===================================================================
RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ephoto.h    22 Feb 2007 04:06:30 -0000      1.5
+++ ephoto.h    25 Feb 2007 04:30:57 -0000      1.6
@@ -62,7 +62,8 @@
 /* Ephoto Gui */
 Ewl_Widget *add_button(Ewl_Widget *c, const char *txt, const char *img, void 
*cb, void *data);
 Ewl_Widget *add_image(Ewl_Widget *c, const char *img, int thumbnail, void *cb, 
void *data);
-Ewl_Widget *add_label(Ewl_Widget *c, const char *lbl, int blue);
+Ewl_Widget *add_label(Ewl_Widget *c, const char *lbl);
+Ewl_Widget *add_text(Ewl_Widget *c, const char *text);
 Ewl_Widget *add_shadow(Ewl_Widget *c);
 
 /* Ephoto Imaging */
===================================================================
RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_exif.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ephoto_exif.c       24 Feb 2007 23:30:49 -0000      1.8
+++ ephoto_exif.c       25 Feb 2007 04:30:57 -0000      1.9
@@ -136,7 +136,7 @@
 void display_exif_dialog(Ewl_Widget *w, void *event, void *data)
 {
        const char *img;
-       Ewl_Widget *win, *vbox, *image, *sp, *list, *label;
+       Ewl_Widget *win, *vbox, *image, *sp, *list, *text;
        Ewl_Model *model;
        Ewl_View *view;
        
@@ -159,14 +159,14 @@
        ewl_container_child_append(EWL_CONTAINER(win), vbox);
        ewl_widget_show(vbox);
 
-       label = add_label(vbox, "Preview", 0);
+       text = add_text(vbox, "Preview");
 
        image = add_image(vbox, img, 1, NULL, NULL);
        ewl_image_constrain_set(EWL_IMAGE(image), 120);
        ewl_object_alignment_set(EWL_OBJECT(image), EWL_FLAG_ALIGN_CENTER);
        ewl_object_fill_policy_set(EWL_OBJECT(image), EWL_FLAG_FILL_SHRINK);
 
-       label = add_label(vbox, "Image Information", 0);
+       text = add_text(vbox, "Image Information");
 
        sp = ewl_scrollpane_new();
        ewl_object_fill_policy_set(EWL_OBJECT(sp), EWL_FLAG_FILL_ALL);
===================================================================
RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_gui.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ephoto_gui.c        24 Feb 2007 22:57:09 -0000      1.4
+++ ephoto_gui.c        25 Feb 2007 04:30:57 -0000      1.5
@@ -76,22 +76,33 @@
 }
 
 /*Add a label to the container c, with the text lbl, and whether you want it 
blue*/
-Ewl_Widget *add_label(Ewl_Widget *c, const char *lbl, int blue)
+Ewl_Widget *add_label(Ewl_Widget *c, const char *lbl)
 {
        Ewl_Widget *label;
 
        label = ewl_label_new();
        ewl_label_text_set(EWL_LABEL(label), lbl);
        ewl_object_alignment_set(EWL_OBJECT(label), EWL_FLAG_ALIGN_CENTER);
-       ewl_object_fill_policy_set(EWL_OBJECT(label), EWL_FLAG_FILL_HFILL);
+       ewl_object_fill_policy_set(EWL_OBJECT(label), EWL_FLAG_FILL_SHRINK);
        ewl_container_child_append(EWL_CONTAINER(c), label);
-       if(blue)
-       {
-               ewl_widget_state_set(label, "blue", EWL_STATE_PERSISTENT);
-       }
        ewl_widget_show(label);
 
        return label;
+}
+
+/*Add a text widget to the container c*/
+Ewl_Widget *add_text(Ewl_Widget *c, const char *txt)
+{
+       Ewl_Widget *text;
+       
+       text = ewl_text_new();
+       ewl_text_text_set(EWL_TEXT(text), txt);
+        ewl_object_alignment_set(EWL_OBJECT(text), EWL_FLAG_ALIGN_CENTER);
+        ewl_object_fill_policy_set(EWL_OBJECT(text), EWL_FLAG_FILL_SHRINK);
+        ewl_container_child_append(EWL_CONTAINER(c), text);
+        ewl_widget_show(text);
+
+        return text;
 }
 
 /*Add a shadow to the container c*/
===================================================================
RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_list_view.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ephoto_list_view.c  24 Feb 2007 23:30:49 -0000      1.8
+++ ephoto_list_view.c  25 Feb 2007 04:30:57 -0000      1.9
@@ -110,13 +110,10 @@
                                                 image_pixels_string_get(image),
                                                 file_size_get(size));
        
-       text = ewl_text_new();
-       ewl_text_text_set(EWL_TEXT(text), info);
-       ewl_container_child_append(EWL_CONTAINER(w), text);
+       text = add_text(w, info);
        ewl_object_fill_policy_set(EWL_OBJECT(text), EWL_FLAG_FILL_SHRINK);
        ewl_object_alignment_set(EWL_OBJECT(text), EWL_FLAG_ALIGN_LEFT);
-       ewl_widget_show(text);
-
+       
        return;
 }      
 
===================================================================
RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_normal_view.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ephoto_normal_view.c        22 Feb 2007 04:06:31 -0000      1.5
+++ ephoto_normal_view.c        25 Feb 2007 04:30:57 -0000      1.6
@@ -21,7 +21,7 @@
         ewl_container_child_append(EWL_CONTAINER(sp), em->fbox);
         ewl_widget_show(em->fbox);
 
-       em->ilabel = add_label(em->fbox_vbox, "Image Information", 1);
+       em->ilabel = add_label(em->fbox_vbox, "Image Information");
 
        return em->fbox_vbox;
 }



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to