Enlightenment CVS committal

Author  : titan
Project : e17
Module  : proto

Dir     : e17/proto/ephoto/src


Modified Files:
        ephoto.c ephoto.h ephoto_callbacks.c 


Log Message:
Updates. Almost have a functional list :)

===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- ephoto.c    22 Jul 2006 07:50:27 -0000      1.65
+++ ephoto.c    27 Jul 2006 08:02:17 -0000      1.66
@@ -107,6 +107,7 @@
 
  m->menu_item = ewl_menu_item_new();
  ewl_button_label_set(EWL_BUTTON(m->menu_item), "Add images to album");
+ ewl_callback_append(m->menu_item, EWL_CALLBACK_CLICKED, add_album_image_cb, 
NULL);
  ewl_container_child_append(EWL_CONTAINER(m->menu), m->menu_item);
  ewl_object_fill_policy_set(EWL_OBJECT(m->menu_item), EWL_FLAG_FILL_ALL);
  ewl_widget_show(m->menu_item);
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- ephoto.h    22 Jul 2006 07:50:27 -0000      1.29
+++ ephoto.h    27 Jul 2006 08:02:17 -0000      1.30
@@ -10,7 +10,9 @@
 
 void destroy_cb(Ewl_Widget *w, void *event, void *data);
 void add_album_cb(Ewl_Widget *w, void *event, void *data);
+void add_album_image_cb(Ewl_Widget *w, void *event, void *data);
 void add_slideshow_cb(Ewl_Widget *w, void *event, void *data);
+void add_slideshow_image_cb(Ewl_Widget *w, void *event, void *data);
 void album_clicked_cb(Ewl_Widget *w, void *event, void *data);
 void slideshow_clicked_cb(Ewl_Widget *w, void *event, void *data);
 int populate_album_cb(void *NotUsed, int argc, char **argv, char **ColName);
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto_callbacks.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ephoto_callbacks.c  22 Jul 2006 07:50:27 -0000      1.7
+++ ephoto_callbacks.c  27 Jul 2006 08:02:17 -0000      1.8
@@ -193,6 +193,67 @@
  return;
 }
 
+void album_fd_cb(Ewl_Widget *w, void *event, void *data)
+{
+ char full_name[PATH_MAX];
+ Ewl_Dialog_Event *e;
+ e = event;
+ 
+ if (e->response == EWL_STOCK_CANCEL)
+ {
+  cancel(w, NULL, w);
+  w = NULL;
+  event = NULL;
+  data = NULL;
+  return;
+ }
+
+ if (e->response == EWL_STOCK_OK)
+ {
+  snprintf(full_name, PATH_MAX, "%s/%s", 
ewl_filedialog_directory_get(EWL_FILEDIALOG(w)), 
+                                        
ewl_filedialog_selected_file_get(EWL_FILEDIALOG(w)));
+
+  m->icon = ewl_icon_new();
+  ewl_icon_label_set(EWL_ICON(m->icon), 
ewl_filedialog_selected_file_get(EWL_FILEDIALOG(w)));
+  ewl_icon_image_set(EWL_ICON(m->icon), full_name, NULL);
+  ewl_icon_constrain_set(EWL_ICON(m->icon), 64);
+  ewl_object_alignment_set(EWL_OBJECT(m->icon), EWL_FLAG_ALIGN_CENTER);
+  ewl_container_child_append(EWL_CONTAINER(m->viewer_freebox), m->icon);
+  ewl_widget_show(m->icon); 
+ 
+  cancel(w, NULL, w);
+  w = NULL;
+  event = NULL;
+  data = NULL;
+  return;
+ }
+
+ w = NULL;
+ event = NULL;
+ data = NULL;
+ return;
+}
+
+void add_album_image_cb(Ewl_Widget *w, void *event, void *data)
+{
+ Ewl_Widget *fd;
+ 
+ fd = ewl_filedialog_new();
+ ewl_filedialog_filter_add(EWL_FILEDIALOG(fd), "png files", ".png");
+ ewl_filedialog_filter_add(EWL_FILEDIALOG(fd), "jpg files", ".jpg");
+ ewl_filedialog_filter_add(EWL_FILEDIALOG(fd), "jpeg files", ".jpeg");
+ ewl_callback_append(fd, EWL_CALLBACK_DELETE_WINDOW, cancel, fd);
+ ewl_callback_append(fd, EWL_CALLBACK_VALUE_CHANGED, album_fd_cb, NULL);
+ ewl_object_size_request(EWL_OBJECT(fd), 400, 200);
+ ewl_filedialog_list_view_set(EWL_FILEDIALOG(fd), 
ewl_filelist_icon_view_get());
+ ewl_widget_show(fd);
+
+ w = NULL;
+ event = NULL;
+ data = NULL;
+ return;
+}
+
 void add_slideshow_cb(Ewl_Widget *w, void *event, void *data)
 {
  Ewl_Widget *win;



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