Enlightenment CVS committal

Author  : titan
Project : e17
Module  : proto

Dir     : e17/proto/ephoto/src/bin


Modified Files:
        ephoto.c ephoto.h ephoto_browsing.c ephoto_gui.c ephoto_nls.c 


Log Message:
Cleanup and add comments

===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/bin/ephoto.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ephoto.c    4 Dec 2006 23:16:35 -0000       1.5
+++ ephoto.c    22 Dec 2006 03:33:18 -0000      1.6
@@ -2,6 +2,7 @@
 
 int main(int argc, char **argv)
 {
+       /*Check to make sure EWL is accessible*/
         if (!ewl_init(&argc, argv))
         {
                 printf("Ewl is not usable, please check your installation!\n");
@@ -16,6 +17,7 @@
        textdomain(PACKAGE);
 #endif
        //ewl_theme_theme_set(PACKAGE_DATA_DIR "/themes/ephoto.edj");
+       /*Start the GUI*/
        init_gui();
 
        return 0;
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/bin/ephoto.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ephoto.h    5 Dec 2006 03:04:15 -0000       1.4
+++ ephoto.h    22 Dec 2006 03:33:18 -0000      1.5
@@ -16,7 +16,7 @@
 /* Main gui callbacks */
 void init_gui(void);
 
-/* Ephoto Utilities */
+/* Ephoto Browsing */
 Ecore_List *get_directories(char *directory);
 Ecore_List *get_images(char *directory);
 
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/bin/ephoto_browsing.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ephoto_browsing.c   18 Dec 2006 19:02:44 -0000      1.1
+++ ephoto_browsing.c   22 Dec 2006 03:33:18 -0000      1.2
@@ -1,5 +1,6 @@
 #include "ephoto.h"
 
+/*Populate a List of Sub Directories Inside of Directory.*/
 Ecore_List *get_directories(char *directory)
 {
        Ecore_List *ls, *files;
@@ -45,6 +46,7 @@
        return files;
 }
 
+/*Populate a List of Images Inside of Directory*/
 Ecore_List *get_images(char *directory)
 {
         Ecore_List *ls, *files;
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/bin/ephoto_gui.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ephoto_gui.c        19 Dec 2006 06:26:43 -0000      1.12
+++ ephoto_gui.c        22 Dec 2006 03:33:18 -0000      1.13
@@ -1,19 +1,26 @@
 #include "ephoto.h"
 
+/*Destroy Boot/Create Main Window*/
+static int destroy_boot(void *data);
+static void create_main_gui(void);
+
+/*Ewl Callbacks*/
 static void destroy(Ewl_Widget *w, void *event, void *data);
-static void view_image(Ewl_Widget *w, void *event, void *data);
 static void view_catalog(Ewl_Widget *w, void *event, void *data);
-static void add_menu_item(Ewl_Widget *c, char *txt, char *img, void *cb);
+static void view_image(Ewl_Widget *w, void *event, void *data);
+
+/*Ephoto Widget Creation Callbacks*/
 static void add_button(Ewl_Widget *c, char *txt, char *img, void *cb);
-static void populate_files(char *cdir);
-static void create_main_gui(void);
-static int destroy_boot(void *data);
 static Ewl_Widget *add_menu(Ewl_Widget *c, char *txt);
+static void add_menu_item(Ewl_Widget *c, char *txt, char *img, void *cb);
 static Ewl_Widget *add_tree(Ewl_Widget *c);
+static void populate_files(char *cdir);
+
+/*Ephoto Global Variables*/
 static Ewl_Widget *ftree, *atree, *fbox, *vnb, *cvbox, *ivbox, *vimage, 
*progress;
 static Ecore_Timer *timer;
 
-/*Boot Splash*/
+/*Destroy Boot Splash*/
 int destroy_boot(void *data)
 {
        Ewl_Widget *win;
@@ -32,6 +39,7 @@
        }
 }
 
+/*Create the Boot Splash and Start its Timer*/
 void init_gui(void)
 {
        Ewl_Widget *win, *vbox, *image, *text;
@@ -84,13 +92,40 @@
        ewl_main();
 }
 
-/*Main Window Calls*/
+/*Destroy the Main Window*/
 static void destroy(Ewl_Widget *w, void *event, void *data)
 {
         ewl_widget_destroy(w);
         ewl_main_quit();
 }
 
+/*Create and Add a Button the Container c*/
+static void add_button(Ewl_Widget *c, char *txt, char *img, void *cb)
+{
+       Ewl_Widget *button;
+
+       button = ewl_button_new();
+       if (img)
+       {
+               ewl_button_image_set(EWL_BUTTON(button), img, NULL);
+       }
+       if (txt)
+       {
+               ewl_button_label_set(EWL_BUTTON(button), _(txt));
+       }
+       ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_CENTER);
+       ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_SHRINK);
+       ewl_container_child_append(EWL_CONTAINER(c), button);
+       if (cb)
+       {
+               ewl_callback_append(button, EWL_CALLBACK_CLICKED, cb, NULL);
+       }
+       ewl_widget_show(button);
+
+       return;
+}
+
+/*Create and Add a Menu to the Container c.*/
 static Ewl_Widget *add_menu(Ewl_Widget *c, char *txt)
 {
        Ewl_Widget *menu;
@@ -107,6 +142,7 @@
        return menu;
 }
 
+/*Create and Add a Menu Item to the Menu c*/
 static void add_menu_item(Ewl_Widget *c, char *txt, char *img, void *cb)
 {
        Ewl_Widget *menu_item;
@@ -132,31 +168,7 @@
        return;
 }
 
-static void add_button(Ewl_Widget *c, char *txt, char *img, void *cb)
-{
-       Ewl_Widget *button;
-
-       button = ewl_button_new();
-       if (img)
-       {
-               ewl_button_image_set(EWL_BUTTON(button), img, NULL);
-       }
-       if (txt)
-       {
-               ewl_button_label_set(EWL_BUTTON(button), _(txt));
-       }
-       ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_CENTER);
-       ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_SHRINK);
-       ewl_container_child_append(EWL_CONTAINER(c), button);
-       if (cb)
-       {
-               ewl_callback_append(button, EWL_CALLBACK_CLICKED, cb, NULL);
-       }
-       ewl_widget_show(button);
-
-       return;
-}
-
+/*Create and Add a Tree to the Container c*/
 static Ewl_Widget *add_tree(Ewl_Widget *c)
 {
        Ewl_Widget *tree;
@@ -171,6 +183,13 @@
        return tree;
 }
 
+/*Switch to the Image List*/
+static void view_catalog(Ewl_Widget *w, void *event, void *data)
+{
+       ewl_notebook_visible_page_set(EWL_NOTEBOOK(vnb), cvbox);
+}
+
+/*Switch to the Image Viewer*/
 static void view_image(Ewl_Widget *w, void *event, void *data)
 {
        char *file;
@@ -180,11 +199,7 @@
        ewl_notebook_visible_page_set(EWL_NOTEBOOK(vnb), ivbox);
 }
 
-static void view_catalog(Ewl_Widget *w, void *event, void *data)
-{
-       ewl_notebook_visible_page_set(EWL_NOTEBOOK(vnb), cvbox);
-}
-
+/*Update the Directory Listing and Image List*/
 static void populate_files(char *cdir)
 {
        char *dir, *imagef;
@@ -243,6 +258,7 @@
        ecore_list_destroy(images);
 }
 
+/*Create the Main Ephoto Window*/
 static void create_main_gui(void)
 {
        Ewl_Widget *win, *vbox, *menu_bar, *menu, *nb, *paned;
@@ -354,4 +370,3 @@
 
        return;
 }
-
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/bin/ephoto_nls.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ephoto_nls.c        30 Nov 2006 00:03:14 -0000      1.1
+++ ephoto_nls.c        22 Dec 2006 03:33:18 -0000      1.2
@@ -1,6 +1,7 @@
 #include "ephoto.h"
 #include <string.h>
 
+/*NLS Translator*/
 char *sgettext(const char *msgid)
 {
        char *msgval = gettext(msgid);



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