Enlightenment CVS committal

Author  : titan
Project : e17
Module  : proto

Dir     : e17/proto/ephoto/src


Modified Files:
        ephoto_callbacks.c 


Log Message:
More work on adding an album

===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto_callbacks.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -3 -r1.35 -r1.36
--- ephoto_callbacks.c  24 Oct 2006 15:34:27 -0000      1.35
+++ ephoto_callbacks.c  24 Oct 2006 16:07:00 -0000      1.36
@@ -169,7 +169,7 @@
 void save_album(Ewl_Widget *w, void *event, void *data)
 {
  char *title, *description;
- Ewl_Widget *win;
+ Ewl_Widget *win, *hbox, *image, *text, *children[2], *row;
  sqlite3 *db;
 
  title = ewl_text_text_get(EWL_TEXT(entry_t));
@@ -178,9 +178,34 @@
  db = ephoto_db_init();
  ephoto_db_add_album(db, title, description);
  ephoto_db_close(db);
+  
+ hbox = ewl_hbox_new();
+ ewl_object_alignment_set(EWL_OBJECT(hbox), EWL_FLAG_ALIGN_CENTER);
+ ewl_object_fill_policy_set(EWL_OBJECT(hbox), EWL_FLAG_FILL_ALL);
+ ewl_box_spacing_set(EWL_BOX(hbox), 5);
+ ewl_widget_show(hbox);
+
+ image = ewl_image_new();
+ ewl_image_file_set(EWL_IMAGE(image),
+                PACKAGE_DATA_DIR "/images/image.png", NULL);
+ ewl_container_child_append(EWL_CONTAINER(hbox), image);
+ ewl_widget_show(image);
+
+ text = ewl_text_new();
+ ewl_text_text_set(EWL_TEXT(text), title);
+ 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(hbox), text);
+ ewl_widget_show(text);
+
+ children[0] = hbox;
+ children[1] = NULL;
+
+ row = ewl_tree_row_add(EWL_TREE(m->albums), NULL, children);
 
  win = data;
  ewl_widget_destroy(win);
+ ewl_widget_configure(m->albums);
 
  return;
 }
@@ -192,7 +217,7 @@
  win = ewl_window_new();
  ewl_window_title_set(EWL_WINDOW(win), _("Add an Album"));
  ewl_window_name_set(EWL_WINDOW(win), "Add an Album");
- ewl_object_size_request(EWL_OBJECT(win), 215, 150);
+ ewl_object_size_request(EWL_OBJECT(win), 216, 120);
  ewl_callback_append(win, EWL_CALLBACK_DELETE_WINDOW, destroy_album_win, win);
  ewl_widget_show(win);
 
@@ -205,6 +230,7 @@
  text = ewl_text_new();
  ewl_text_text_set(EWL_TEXT(text), _("Enter the new album name:"));
  ewl_container_child_append(EWL_CONTAINER(vbox), text);
+ ewl_object_fill_policy_set(EWL_OBJECT(text), EWL_FLAG_FILL_SHRINK);
  ewl_object_alignment_set(EWL_OBJECT(text), EWL_FLAG_ALIGN_CENTER);
  ewl_widget_show(text);
 
@@ -217,6 +243,7 @@
  ewl_text_text_set(EWL_TEXT(text), _("Enter the new album description:"));
  ewl_container_child_append(EWL_CONTAINER(vbox), text);
  ewl_object_alignment_set(EWL_OBJECT(text), EWL_FLAG_ALIGN_CENTER);
+ ewl_object_fill_policy_set(EWL_OBJECT(text), EWL_FLAG_FILL_SHRINK);
  ewl_widget_show(text);
 
  entry_d = ewl_entry_new();



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to