Enlightenment CVS committal

Author  : titan
Project : e17
Module  : proto

Dir     : e17/proto/ephoto/src


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


Log Message:
Bring the icons into ephoto so that you don't have to have a theme installed. 
Adjust the code to use these icons.. also change the initial size of the image 
viewer.

===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -3 -r1.81 -r1.82
--- ephoto.c    16 Sep 2006 02:53:33 -0000      1.81
+++ ephoto.c    23 Sep 2006 14:19:02 -0000      1.82
@@ -7,7 +7,6 @@
 int
 main(int argc, char **argv)
 {
- const char *icon_theme_path;
  Ewl_Widget *vbox, *hbox, *border, *menubar, *menu, *menu_item;
  Ewl_Widget *hseparator, *vseparator, *image, *text;
  
@@ -47,7 +46,9 @@
  ewl_widget_show(menu);
 
  menu_item = ewl_menu_item_new();
- ewl_button_stock_type_set(EWL_BUTTON(menu_item), EWL_STOCK_QUIT);
+ ewl_button_image_set(EWL_BUTTON(menu_item), 
+                     PACKAGE_DATA_DIR "/images/exit.png", NULL);
+ ewl_button_label_set(EWL_BUTTON(menu_item), "Exit");
  ewl_object_alignment_set(EWL_OBJECT(menu_item), EWL_FLAG_ALIGN_CENTER);
  ewl_container_child_append(EWL_CONTAINER(menu), menu_item);
  ewl_callback_append(menu_item, EWL_CALLBACK_CLICKED, destroy_cb, NULL);
@@ -75,8 +76,7 @@
 
  menu_item = ewl_menu_item_new();
  ewl_button_image_set(EWL_BUTTON(menu_item), 
-                     ewl_icon_theme_icon_path_get(EWL_ICON_PREFERENCES_SYSTEM, 
-                     EWL_ICON_SIZE_MEDIUM), EWL_ICON_PREFERENCES_SYSTEM);
+                     PACKAGE_DATA_DIR "/images/preferences-system.png", NULL);
  ewl_button_label_set(EWL_BUTTON(menu_item), "Configure Slideshow");
  ewl_object_alignment_set(EWL_OBJECT(menu_item), EWL_FLAG_ALIGN_CENTER);
  ewl_container_child_append(EWL_CONTAINER(menu), menu_item);
@@ -87,9 +87,7 @@
  
  menu_item = ewl_menu_item_new();
  ewl_button_image_set(EWL_BUTTON(menu_item), 
-                     
ewl_icon_theme_icon_path_get(EWL_ICON_X_OFFICE_PRESENTATION, 
-                                                  EWL_ICON_SIZE_MEDIUM), 
-                     EWL_ICON_X_OFFICE_PRESENTATION);
+                     PACKAGE_DATA_DIR "/images/x-office-presentation.png", 
NULL);
  ewl_button_label_set(EWL_BUTTON(menu_item), "Start Slideshow");
  ewl_object_alignment_set(EWL_OBJECT(menu_item), EWL_FLAG_ALIGN_CENTER);
  ewl_container_child_append(EWL_CONTAINER(menu), menu_item);
@@ -112,26 +110,22 @@
 
  image = ewl_image_new();
  ewl_container_child_append(EWL_CONTAINER(hbox), image);
- icon_theme_path = ewl_icon_theme_icon_path_get(EWL_ICON_GO_UP, 
-                                               EWL_ICON_SIZE_MEDIUM);
- ewl_image_file_set(EWL_IMAGE(image), icon_theme_path, EWL_ICON_GO_UP);
+ ewl_image_file_set(EWL_IMAGE(image), 
+                   PACKAGE_DATA_DIR "/images/go-up.png", NULL);
  ewl_callback_append(image, EWL_CALLBACK_CLICKED, go_up, NULL);
  ewl_widget_show(image);
 
  image = ewl_image_new();
  ewl_container_child_append(EWL_CONTAINER(hbox), image);
- icon_theme_path = ewl_icon_theme_icon_path_get(EWL_ICON_GO_HOME,
-                                                EWL_ICON_SIZE_MEDIUM);
- ewl_image_file_set(EWL_IMAGE(image), icon_theme_path, EWL_ICON_GO_HOME);
+ ewl_image_file_set(EWL_IMAGE(image), 
+                   PACKAGE_DATA_DIR "/images/go-home.png", NULL);
  ewl_callback_append(image, EWL_CALLBACK_CLICKED, go_home, NULL);
  ewl_widget_show(image);
 
  image = ewl_image_new();
  ewl_container_child_append(EWL_CONTAINER(hbox), image);
- icon_theme_path = ewl_icon_theme_icon_path_get(EWL_ICON_EMBLEM_FAVORITE,
-                                                EWL_ICON_SIZE_MEDIUM);
- ewl_image_file_set(EWL_IMAGE(image), icon_theme_path, 
-                                               EWL_ICON_EMBLEM_FAVORITE);
+ ewl_image_file_set(EWL_IMAGE(image), 
+                   PACKAGE_DATA_DIR "/images/emblem-favorite.png", NULL);
  ewl_widget_show(image);
       
  text = ewl_text_new();
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- ephoto.h    23 Sep 2006 02:53:37 -0000      1.40
+++ ephoto.h    23 Sep 2006 14:19:02 -0000      1.41
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "config.h"
 
 void destroy_cb(Ewl_Widget *w, void *event, void *data);
 void populate_browser(Ewl_Widget *w, void *event, void *data);
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto_callbacks.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- ephoto_callbacks.c  23 Sep 2006 02:53:37 -0000      1.25
+++ ephoto_callbacks.c  23 Sep 2006 14:19:02 -0000      1.26
@@ -18,7 +18,6 @@
  char *home;
  char path[PATH_MAX];
  char full_path[PATH_MAX];
- const char *image_path;
  Ecore_List *albums;
  Ewl_Widget *hbox;
  Ewl_Widget *image;
@@ -45,10 +44,9 @@
   ewl_box_spacing_set(EWL_BOX(hbox), 5);
   ewl_widget_show(hbox);
 
-  image_path = ewl_icon_theme_icon_path_get(EWL_ICON_IMAGE_X_GENERIC,
-                                            EWL_ICON_SIZE_LARGE);  
   image = ewl_image_new();
-  ewl_image_file_set(EWL_IMAGE(image), image_path, EWL_ICON_IMAGE_X_GENERIC);
+  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);
   
@@ -73,7 +71,6 @@
  char *directory;
  char *file;
  char full_path[PATH_MAX];
- const char *image_path;
  Ecore_List *ls;
  Ecore_List *directories;
  Ewl_Widget *hbox;
@@ -112,10 +109,9 @@
   ewl_box_spacing_set(EWL_BOX(hbox), 5);
   ewl_widget_show(hbox);
 
-  image_path = ewl_icon_theme_icon_path_get(EWL_ICON_FOLDER, 
-                                           EWL_ICON_SIZE_LARGE);
   image = ewl_image_new();
-  ewl_image_file_set(EWL_IMAGE(image), image_path, EWL_ICON_FOLDER);
+  ewl_image_file_set(EWL_IMAGE(image), 
+                    PACKAGE_DATA_DIR "/images/folder.png", NULL);
   ewl_container_child_append(EWL_CONTAINER(hbox), image);
   ewl_widget_show(image);
 
===================================================================
RCS file: /cvs/e/e17/proto/ephoto/src/ephoto_viewer.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ephoto_viewer.c     23 Sep 2006 02:53:37 -0000      1.1
+++ ephoto_viewer.c     23 Sep 2006 14:19:02 -0000      1.2
@@ -49,7 +49,7 @@
  vwin = ewl_window_new();
  ewl_window_title_set(EWL_WINDOW(vwin), "Ephoto Image Viewer");
  ewl_window_name_set(EWL_WINDOW(vwin), "Ephoto Image Viewer");
- ewl_object_size_request(EWL_OBJECT(vwin), 640, 480);
+ ewl_object_size_request(EWL_OBJECT(vwin), 480, 480);
  ewl_callback_append(vwin, EWL_CALLBACK_DELETE_WINDOW, destroy_vwin, NULL);
  ewl_widget_show(vwin);
 



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