Enlightenment CVS committal Author : davemds Project : e17 Module : proto/edje_editor
Dir : e17/proto/edje_editor/src/bin Modified Files: callbacks.c interface.c interface.h main.h Log Message: * disable debug code * initial work on image and font browser (disabled) =================================================================== RCS file: /cvs/e/e17/proto/edje_editor/src/bin/callbacks.c,v retrieving revision 1.69 retrieving revision 1.70 diff -u -3 -r1.69 -r1.70 --- callbacks.c 21 Jun 2008 21:40:27 -0000 1.69 +++ callbacks.c 22 Jun 2008 15:55:17 -0000 1.70 @@ -170,7 +170,12 @@ if (edje_edit_part_type_get(edje_o, Cur.part->string) == EDJE_PART_TYPE_GROUP) ReloadEdje(); break; - + case TOOLBAR_IMAGE_BROWSER: + ShowImageBrowser(); + break; + case TOOLBAR_FONT_BROWSER: + ShowAlert("Font Browser"); + break; case TOOLBAR_IMAGE_FILE_ADD: ShowFilechooser(FILECHOOSER_IMAGE); break; =================================================================== RCS file: /cvs/e/e17/proto/edje_editor/src/bin/interface.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -3 -r1.71 -r1.72 --- interface.c 21 Jun 2008 21:40:27 -0000 1.71 +++ interface.c 22 Jun 2008 15:55:18 -0000 1.72 @@ -109,6 +109,73 @@ break; } } +void +ShowImageBrowser(void) +{ + Etk_Widget *win; + Etk_Widget *iconbox; + Etk_Widget *hbox, *vbox; + Etk_Widget *button; + Evas_List *l, *images; + char buf[4096]; + + win = etk_window_new(); + etk_window_title_set(ETK_WINDOW(win), "Image Browser"); + etk_container_border_width_set(ETK_CONTAINER(win), 5); + //etk_signal_connect_swapped_by_code(ETK_OBJECT_DESTROYED_SIGNAL, ETK_OBJECT(win), + // ETK_CALLBACK(_main_quit_cb), NULL); + + hbox = etk_hbox_new(ETK_FALSE, 0); + etk_container_add (ETK_CONTAINER(win), hbox); + + iconbox = etk_iconbox_new(); + etk_box_append (hbox, iconbox, 0, ETK_BOX_EXPAND_FILL, 0); + + vbox = etk_vbox_new(ETK_TRUE, 0); + etk_box_append (hbox, vbox, 0, ETK_BOX_NONE, 5); + + + //AddImageButton + button = etk_button_new_from_stock(ETK_STOCK_DOCUMENT_OPEN); + etk_object_properties_set(ETK_OBJECT(button), "label","Import image",NULL); + etk_button_style_set(button, ETK_BUTTON_BOTH_VERT); + etk_box_append(vbox, button, 0, ETK_BOX_NONE, 0); + + //DeleteImageButton + button = etk_button_new_from_stock(ETK_STOCK_EDIT_DELETE); + etk_object_properties_set(ETK_OBJECT(button), "label","Delete image",NULL); + etk_button_style_set(button, ETK_BUTTON_BOTH_VERT); + etk_box_append(vbox, button, 0, ETK_BOX_NONE, 0); + + //EditImageButton + button = etk_button_new_with_label("Edit Image"); + Etk_Image *image = etk_image_new_from_edje(EdjeFile, "GIMP.PNG"); + etk_button_image_set(button, image); + etk_button_style_set(button, ETK_BUTTON_BOTH_VERT); + etk_box_append(vbox, button, 0, ETK_BOX_NONE, 0); + + + /* populate icon list */ + etk_iconbox_freeze(iconbox); + images = l = edje_edit_images_list_get(edje_o); + while (l) + { + snprintf(buf,4096,"images/%d",edje_edit_image_id_get(edje_o, (char*)l->data)); + printf("IMAGE %s\n", buf); + //~ ComboItem = etk_combobox_item_append(ETK_COMBOBOX(UI_ImageComboBox), + //~ etk_image_new_from_file (Cur.edj_temp_name->string, buf), + //~ (char*)l->data); + Etk_Iconbox_Icon * icon; + icon = etk_iconbox_append(iconbox,Cur.edj_temp_name->string, buf, (char*)l->data); + etk_iconbox_icon_file_set(icon, Cur.edj_temp_name->string, buf); + l = l->next; + } + edje_edit_string_list_free(images); + etk_iconbox_thaw(iconbox); + + etk_widget_show_all(win); + +} /*********************************** * * functions to update interface @@ -1611,6 +1678,25 @@ sep = etk_vseparator_new(); etk_toolbar_append(ETK_TOOLBAR(UI_Toolbar), sep, ETK_BOX_START); +#if DEBUG_MODE + //Images Browser Button + button = etk_tool_button_new_from_stock( ETK_STOCK_IMAGE_X_GENERIC); + etk_object_properties_set(ETK_OBJECT(button),"label","Images",NULL); + etk_signal_connect("clicked", ETK_OBJECT(button), + ETK_CALLBACK(on_AllButton_click), (void*)TOOLBAR_IMAGE_BROWSER); + etk_toolbar_append(ETK_TOOLBAR(UI_Toolbar), button, ETK_BOX_START); + + //Font Browser Button + button = etk_tool_button_new_from_stock( ETK_STOCK_PREFERENCES_DESKTOP_FONT); + etk_object_properties_set(ETK_OBJECT(button),"label","Fonts",NULL); + etk_signal_connect("clicked", ETK_OBJECT(button), + ETK_CALLBACK(on_AllButton_click), (void*)TOOLBAR_FONT_BROWSER); + etk_toolbar_append(ETK_TOOLBAR(UI_Toolbar), button, ETK_BOX_START); + + sep = etk_vseparator_new(); + etk_toolbar_append(ETK_TOOLBAR(UI_Toolbar), sep, ETK_BOX_START); +#endif + //OptionsButton button = etk_tool_button_new_from_stock(ETK_STOCK_PREFERENCES_SYSTEM); etk_object_properties_set(ETK_OBJECT(button),"label","Options",NULL); =================================================================== RCS file: /cvs/e/e17/proto/edje_editor/src/bin/interface.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -3 -r1.36 -r1.37 --- interface.h 21 Jun 2008 21:40:27 -0000 1.36 +++ interface.h 22 Jun 2008 15:55:18 -0000 1.37 @@ -181,6 +181,7 @@ void ShowFilechooser(int FileChooserType); void ShowAlert(char* text); +void ShowImageBrowser(void); void ConsolleLog(char *text); void ConsolleClear(void); void TogglePlayButton(int set); =================================================================== RCS file: /cvs/e/e17/proto/edje_editor/src/bin/main.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -3 -r1.33 -r1.34 --- main.h 21 Jun 2008 21:40:27 -0000 1.33 +++ main.h 22 Jun 2008 15:55:18 -0000 1.34 @@ -13,7 +13,7 @@ #define FAKEWIN_BORDER_BOTTOM 4 #define USE_GL_ENGINE 0 -#define DEBUG_MODE 1 +#define DEBUG_MODE 0 #if DEBUG_MODE #define TREE_WIDTH 365 @@ -55,6 +55,8 @@ TOOLBAR_PAUSE, TOOLBAR_MOVE_UP, TOOLBAR_MOVE_DOWN, + TOOLBAR_IMAGE_BROWSER, + TOOLBAR_FONT_BROWSER, TOOLBAR_OPTION_BG1, TOOLBAR_OPTION_BG2, TOOLBAR_OPTION_BG3, ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs