Enlightenment CVS committal

Author  : titan
Project : e17
Module  : apps/ephoto

Dir     : e17/apps/ephoto/src/bin


Modified Files:
        ephoto.h ephoto_edit_view.c ephoto_exif.c ephoto_list_view.c 
        ephoto_main.c ephoto_normal_view.c 


Log Message:
Miscellaneous cleanups, add tooltips, add selecting for list view.

===================================================================
RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ephoto.h    20 Feb 2007 03:45:58 -0000      1.3
+++ ephoto.h    21 Feb 2007 07:06:54 -0000      1.4
@@ -88,7 +88,7 @@
        Ewl_Widget *atree; 
        Ewl_Widget *currenta;
        Ewl_Widget *currentf;
-       Ewl_Widget *currenti;
+       Ewl_Widget *currentl;
        Ewl_Widget *edit_tools;
        Ewl_Widget *edit_vbox;
        Ewl_Widget *eimage;
===================================================================
RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_edit_view.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ephoto_edit_view.c  20 Feb 2007 03:45:58 -0000      1.4
+++ ephoto_edit_view.c  21 Feb 2007 07:06:54 -0000      1.5
@@ -29,11 +29,10 @@
 {
         ewl_notebook_visible_page_set(EWL_NOTEBOOK(em->view_box), 
em->edit_vbox);
        ecore_dlist_goto_first(em->images);
-       ewl_widget_show(em->edit_tools);
+       ewl_widget_enable(em->edit_tools);
         ewl_widget_hide(em->atree);
         ewl_widget_hide(em->tbar);
         ewl_widget_hide(em->ilabel);
-        ewl_widget_reparent(em->eimage);
 }
 
 /*Add edit tools to container c*/
@@ -43,15 +42,19 @@
 
        image = add_image(c, PACKAGE_DATA_DIR "/images/undo.png", 0, 
rotate_image_left, NULL);
        ewl_image_constrain_set(EWL_IMAGE(image), 30);
+       ewl_attach_tooltip_text_set(image, "Rotate Image Left");
 
         image = add_image(c, PACKAGE_DATA_DIR "/images/redo.png", 0, 
rotate_image_right, NULL);
         ewl_image_constrain_set(EWL_IMAGE(image), 30);
+       ewl_attach_tooltip_text_set(image, "Rotate Image Right");
 
         image = add_image(c, PACKAGE_DATA_DIR "/images/go-next.png", 0, 
flip_image_horizontal, NULL);
         ewl_image_constrain_set(EWL_IMAGE(image), 30);
+       ewl_attach_tooltip_text_set(image, "Flip Image Horizontally");
 
         image = add_image(c, PACKAGE_DATA_DIR "/images/go-down.png", 0, 
flip_image_vertical, NULL);
         ewl_image_constrain_set(EWL_IMAGE(image), 30);
+       ewl_attach_tooltip_text_set(image, "Flip Image Vertically");
 
        sep = ewl_vseparator_new();
        ewl_container_child_append(EWL_CONTAINER(c), sep);
@@ -60,10 +63,12 @@
         image = add_image(c, PACKAGE_DATA_DIR 
"/images/media-seek-backward.png", 0, previous_image, NULL);
         ewl_image_constrain_set(EWL_IMAGE(image), 30);
        ewl_object_alignment_set(EWL_OBJECT(image), EWL_FLAG_ALIGN_RIGHT);
+       ewl_attach_tooltip_text_set(image, "Previous Image");
 
         image = add_image(c, PACKAGE_DATA_DIR 
"/images/media-seek-forward.png", 0, next_image, NULL);
         ewl_image_constrain_set(EWL_IMAGE(image), 30);
        ewl_object_alignment_set(EWL_OBJECT(image), EWL_FLAG_ALIGN_RIGHT);
+       ewl_attach_tooltip_text_set(image, "Next Image");
 
        return;
 }
===================================================================
RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_exif.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ephoto_exif.c       20 Feb 2007 03:45:58 -0000      1.4
+++ ephoto_exif.c       21 Feb 2007 07:06:54 -0000      1.5
@@ -58,19 +58,22 @@
 {
        const char *img;
 
-        if (VISIBLE(em->fbox_vbox))
+        if (VISIBLE(em->fbox_vbox) && em->currentf)
         {
                 img = ewl_widget_name_get(em->currentf);
         }
-        else if (VISIBLE(em->list_vbox))
+        else if (VISIBLE(em->list_vbox) && em->currentl)
         {
-                img = ewl_widget_name_get(em->currenti);
+                img = ewl_widget_name_get(em->currentl);
         }
         else if (VISIBLE(em->edit_vbox))
         {
                 img = ewl_image_file_path_get(EWL_IMAGE(em->eimage));
         }
-
+       else
+       {
+               return NULL;
+       }
        return strdup(img);
 }
 
@@ -138,6 +141,10 @@
        Ewl_View *view;
        
        img = get_image();
+       if(!img)
+       {
+               return;
+       }
 
        win = ewl_window_new();
         ewl_window_title_set(EWL_WINDOW(win), "Ephoto Exif Info");
===================================================================
RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_list_view.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ephoto_list_view.c  21 Feb 2007 04:49:09 -0000      1.4
+++ ephoto_list_view.c  21 Feb 2007 07:06:54 -0000      1.5
@@ -5,6 +5,7 @@
 static Ewl_Widget *list_header_fetch(void *data, int column);
 static void *list_data_fetch(void *data, unsigned int row, unsigned int 
column);
 static int list_data_count(void *data);
+static void set_active_list_view(Ewl_Widget *w, void *event, void *data);
 
 /*Add the list view*/
 Ewl_Widget *add_list_view(Ewl_Widget *c)
@@ -25,10 +26,22 @@
 {
         ewl_notebook_visible_page_set(EWL_NOTEBOOK(em->view_box), 
em->list_vbox);
         ewl_mvc_dirty_set(EWL_MVC(em->ltree), 1);
-        ewl_widget_hide(em->edit_tools);
-       ewl_widget_hide(em->ilabel);
+       ewl_widget_disable(em->edit_tools);
         ewl_widget_show(em->atree);
         ewl_widget_show(em->tbar);
+       ewl_widget_hide(em->ilabel);
+}
+
+static void set_active_list_view(Ewl_Widget *w, void *event, void *data)
+{
+       if (em->currentl)
+       {
+               ewl_widget_state_set(em->currentl, "unselected", 
EWL_STATE_PERSISTENT);
+       }
+       em->currentl = w;
+       ewl_widget_state_set(em->currentl, "selected", EWL_STATE_PERSISTENT);
+
+       return;
 }
 
 /*Create and Add a Tree to the Container c*/
@@ -68,6 +81,7 @@
        hbox = ewl_hbox_new();
        ewl_box_spacing_set(EWL_BOX(hbox), 10);
        ewl_object_fill_policy_set(EWL_OBJECT(hbox), EWL_FLAG_FILL_HFILL);
+       ewl_callback_append(hbox, EWL_CALLBACK_CLICKED, set_active_list_view, 
NULL);
        ewl_widget_show(hbox);
 
        return hbox;
===================================================================
RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_main.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ephoto_main.c       21 Feb 2007 04:49:09 -0000      1.5
+++ ephoto_main.c       21 Feb 2007 07:06:54 -0000      1.6
@@ -137,13 +137,15 @@
 
         image = add_image(em->toolbar, PACKAGE_DATA_DIR 
"/images/normal_view.png", 0, show_normal_view, NULL);
         ewl_image_constrain_set(EWL_IMAGE(image), 30);
+       ewl_attach_tooltip_text_set(image, "Normal View");
 
         vsep = ewl_vseparator_new();
         ewl_container_child_append(EWL_CONTAINER(em->toolbar), vsep);
         ewl_widget_show(vsep);
 
         image = add_image(em->toolbar, PACKAGE_DATA_DIR 
"/images/list_view.png", 0, show_list_view, NULL);
-        ewl_image_constrain_set(EWL_IMAGE(image), 30);        
+        ewl_image_constrain_set(EWL_IMAGE(image), 30);
+       ewl_attach_tooltip_text_set(image, "List View");      
 
         vsep = ewl_vseparator_new();
         ewl_container_child_append(EWL_CONTAINER(em->toolbar), vsep);
@@ -151,6 +153,7 @@
 
        image = add_image(em->toolbar, PACKAGE_DATA_DIR 
"/images/edit_view.png", 0, show_edit_view, NULL);
         ewl_image_constrain_set(EWL_IMAGE(image), 30);
+       ewl_attach_tooltip_text_set(image, "Edit View");
 
        vsep = ewl_vseparator_new();
        ewl_container_child_append(EWL_CONTAINER(em->toolbar), vsep);
@@ -158,6 +161,7 @@
 
         image = add_image(em->toolbar, PACKAGE_DATA_DIR 
"/images/get_exif.png", 0, display_exif_dialog, NULL);
         ewl_image_constrain_set(EWL_IMAGE(image), 30);
+       ewl_attach_tooltip_text_set(image, "View Exif");
 
         vsep = ewl_vseparator_new();
         ewl_container_child_append(EWL_CONTAINER(em->toolbar), vsep);
@@ -165,6 +169,7 @@
 
         image = add_image(em->toolbar, PACKAGE_DATA_DIR 
"/images/stock_fullscreen.png", 0, window_fullscreen, NULL);
         ewl_image_constrain_set(EWL_IMAGE(image), 30);
+       ewl_attach_tooltip_text_set(image, "Fullscreen");
 
         vsep = ewl_vseparator_new();
         ewl_container_child_append(EWL_CONTAINER(em->toolbar), vsep);
@@ -172,6 +177,7 @@
 
         image = add_image(em->toolbar, PACKAGE_DATA_DIR 
"/images/x-office-presentation.png", 0, NULL, NULL);
         ewl_image_constrain_set(EWL_IMAGE(image), 30);
+       ewl_attach_tooltip_text_set(image, "Slideshow");
 
         vsep = ewl_vseparator_new();
         ewl_container_child_append(EWL_CONTAINER(em->toolbar), vsep);
@@ -183,8 +189,8 @@
        ewl_widget_show(em->edit_tools);
 
        add_edit_tools(em->edit_tools);
-       ewl_widget_hide(em->edit_tools);
-
+       ewl_widget_disable(em->edit_tools);
+       
        em->albums = ecore_list_new();
        em->db = ephoto_db_init();
        em->albums = ephoto_db_list_albums(em->db);
===================================================================
RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_normal_view.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ephoto_normal_view.c        20 Feb 2007 03:45:58 -0000      1.3
+++ ephoto_normal_view.c        21 Feb 2007 07:06:54 -0000      1.4
@@ -30,11 +30,10 @@
 void show_normal_view(Ewl_Widget *w, void *event, void *data)
 {
        ewl_notebook_visible_page_set(EWL_NOTEBOOK(em->view_box), 
em->fbox_vbox);
+       ewl_widget_disable(em->edit_tools);
         ewl_widget_show(em->atree);
         ewl_widget_show(em->tbar);
         ewl_widget_show(em->ilabel);
-       ewl_widget_hide(em->edit_tools);
-        ewl_widget_configure(em->fbox);
 }
 
 /*Set the info that is in the info label on normal view*/



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