Enlightenment CVS committal Author : titan Project : e17 Module : apps/ephoto
Dir : e17/apps/ephoto/src/bin Modified Files: ephoto_edit_view.c ephoto_exif.c ephoto_gui.c ephoto_imaging.c ephoto_list_view.c ephoto_main.c ephoto_single_view.c Log Message: Clean it up for translators. =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_edit_view.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- ephoto_edit_view.c 11 May 2007 22:49:31 -0000 1.19 +++ ephoto_edit_view.c 14 May 2007 17:05:29 -0000 1.20 @@ -5,6 +5,9 @@ static void add_advanced_edit_tools(Ewl_Widget *c); static void previous_image(Ewl_Widget *w, void *event, void *data); static void next_image(Ewl_Widget *w, void *event, void *data); +static void zoom_in(Ewl_Widget *w, void *event, void *data); +static void zoom_out(Ewl_Widget *w, void *event, void *data); +//static void zoom_full(Ewl_Widget *w, void *event, void *data); static void flip_image_horizontal(Ewl_Widget *w, void *event, void *data); static void flip_image_vertical(Ewl_Widget *w, void *event, void *data); static void rotate_image_left(Ewl_Widget *w, void *event, void *data); @@ -30,7 +33,7 @@ ewl_object_maximum_w_set(EWL_OBJECT(standard), 172); ewl_object_minimum_w_set(EWL_OBJECT(standard), 172); ewl_object_fill_policy_set(EWL_OBJECT(standard), EWL_FLAG_FILL_VFILL); - ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(nb), standard, "Standard Tools"); + ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(nb), standard, _("Standard Tools")); add_standard_edit_tools(standard); @@ -38,7 +41,7 @@ ewl_object_maximum_w_set(EWL_OBJECT(advanced), 172); ewl_object_minimum_w_set(EWL_OBJECT(advanced), 172); ewl_object_fill_policy_set(EWL_OBJECT(advanced), EWL_FLAG_FILL_VFILL); - ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(nb), advanced, "Advanced Tools"); + ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(nb), advanced, _("Advanced Tools")); add_advanced_edit_tools(advanced); @@ -60,11 +63,11 @@ button = add_button(bhbox, NULL, PACKAGE_DATA_DIR "/images/media-seek-backward.png", previous_image, NULL); ewl_button_image_size_set(EWL_BUTTON(button), 25, 25); - ewl_attach_tooltip_text_set(button, "Previous Image"); + ewl_attach_tooltip_text_set(button, _("Previous Image")); button = add_button(bhbox, NULL, PACKAGE_DATA_DIR "/images/media-seek-forward.png", next_image, NULL); ewl_button_image_size_set(EWL_BUTTON(button), 25, 25); - ewl_attach_tooltip_text_set(button, "Next Image"); + ewl_attach_tooltip_text_set(button, _("Next Image")); return hbox; } @@ -83,6 +86,21 @@ { Ewl_Widget *button; + button = add_button(c, "Zoom In", PACKAGE_DATA_DIR "/images/search.png", zoom_in, NULL); + ewl_button_image_size_set(EWL_BUTTON(button), 30, 30); + ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_LEFT); + ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_HFILL); + + button = add_button(c, "Zoom Out", PACKAGE_DATA_DIR "/images/search.png", zoom_out, NULL); + ewl_button_image_size_set(EWL_BUTTON(button), 30, 30); + ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_LEFT); + ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_HFILL); + + //button = add_button(c, "Zoom 1:1", PACKAGE_DATA_DIR "/images/search.png", zoom_full, NULL); + ewl_button_image_size_set(EWL_BUTTON(button), 30, 30); + ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_LEFT); + ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_HFILL); + button = add_button(c, "Rotate Left", PACKAGE_DATA_DIR "/images/undo.png", rotate_image_left, NULL); ewl_button_image_size_set(EWL_BUTTON(button), 30, 30); ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_LEFT); @@ -142,7 +160,6 @@ return; } - /*Go to the next image*/ static void next_image(Ewl_Widget *w, void *event, void *data) { @@ -160,6 +177,33 @@ return; } + +/*Zoom in on the image*/ +static void zoom_in(Ewl_Widget *w, void *event, void *data) +{ + int ow, oh; + + ewl_object_current_size_get(EWL_OBJECT(em->eimage), &ow, &oh); + + ewl_image_size_set(EWL_IMAGE(em->eimage), ow*2, oh*2); + ewl_widget_configure(em->eimage->parent); + + return; +} + +/*Zoom out the image*/ +static void zoom_out(Ewl_Widget *w, void *event, void *data) +{ + int ow, oh; + + ewl_object_current_size_get(EWL_OBJECT(em->eimage), &ow, &oh); + + ewl_image_size_set(EWL_IMAGE(em->eimage), ow/2, oh/2); + ewl_widget_configure(em->eimage->parent); + + return; +} + /*Flip the image 180 degrees horizontally*/ static void flip_image_horizontal(Ewl_Widget *w, void *event, void *data) =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_exif.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- ephoto_exif.c 28 Apr 2007 18:24:45 -0000 1.16 +++ ephoto_exif.c 14 May 2007 17:05:29 -0000 1.17 @@ -99,7 +99,7 @@ if(ecore_hash_count(exif_info) == 0) { - ecore_list_append(values, strdup("No Exif Data Exists")); + ecore_list_append(values, strdup(_("No Exif Data Exists"))); } else { =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_gui.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- ephoto_gui.c 19 Apr 2007 03:17:11 -0000 1.8 +++ ephoto_gui.c 14 May 2007 17:05:29 -0000 1.9 @@ -37,7 +37,7 @@ Ewl_Widget *entry; entry = ewl_entry_new(); - if(txt) ewl_text_text_set(EWL_TEXT(entry), txt); + if(txt) ewl_text_text_set(EWL_TEXT(entry), _(txt)); if(c) ewl_container_child_append(EWL_CONTAINER(c), entry); if(cb) ewl_callback_append(entry, EWL_CALLBACK_VALUE_CHANGED, cb, data); ewl_widget_show(entry); @@ -52,7 +52,7 @@ icon = ewl_icon_new(); if(!thumbnail) ewl_icon_thumbnailing_set(EWL_ICON(icon), FALSE); - if (lbl) ewl_icon_label_set(EWL_ICON(icon), lbl); + if (lbl) ewl_icon_label_set(EWL_ICON(icon), _(lbl)); if (img) ewl_icon_image_set(EWL_ICON(icon), img, NULL); if (c) ewl_container_child_append(EWL_CONTAINER(c), icon); if (cb) ewl_callback_append(icon, EWL_CALLBACK_CLICKED, cb, data); @@ -103,7 +103,7 @@ Ewl_Widget *label; label = ewl_label_new(); - if(lbl) ewl_label_text_set(EWL_LABEL(label), lbl); + if(lbl) ewl_label_text_set(EWL_LABEL(label), _(lbl)); ewl_object_alignment_set(EWL_OBJECT(label), EWL_FLAG_ALIGN_CENTER); ewl_object_fill_policy_set(EWL_OBJECT(label), EWL_FLAG_FILL_SHRINK); if(c) ewl_container_child_append(EWL_CONTAINER(c), label); @@ -131,7 +131,7 @@ Ewl_Widget *menu; menu = ewl_menu_new(); - if(lbl) ewl_button_label_set(EWL_BUTTON(menu), lbl); + if(lbl) ewl_button_label_set(EWL_BUTTON(menu), _(lbl)); ewl_object_fill_policy_set(EWL_OBJECT(menu), EWL_FLAG_FILL_NONE); if(c) ewl_container_child_append(EWL_CONTAINER(c), menu); ewl_widget_show(menu); @@ -146,7 +146,7 @@ mi = ewl_menu_item_new(); if(img) ewl_button_image_set(EWL_BUTTON(mi), img, NULL); - if(lbl) ewl_button_label_set(EWL_BUTTON(mi), lbl); + if(lbl) ewl_button_label_set(EWL_BUTTON(mi), _(lbl)); ewl_object_alignment_set(EWL_OBJECT(mi), EWL_FLAG_ALIGN_CENTER); ewl_object_fill_policy_set(EWL_OBJECT(mi), EWL_FLAG_FILL_ALL); if(c) ewl_container_child_append(EWL_CONTAINER(c), mi); @@ -174,7 +174,7 @@ Ewl_Widget *text; text = ewl_text_new(); - if(txt) ewl_text_text_set(EWL_TEXT(text), txt); + if(txt) ewl_text_text_set(EWL_TEXT(text), _(txt)); ewl_object_alignment_set(EWL_OBJECT(text), EWL_FLAG_ALIGN_CENTER); ewl_object_fill_policy_set(EWL_OBJECT(text), EWL_FLAG_FILL_SHRINK); if(c) ewl_container_child_append(EWL_CONTAINER(c), text); @@ -191,8 +191,8 @@ win = ewl_window_new(); if(name) { - ewl_window_title_set(EWL_WINDOW(win), name); - ewl_window_name_set(EWL_WINDOW(win), name); + ewl_window_title_set(EWL_WINDOW(win), _(name)); + ewl_window_name_set(EWL_WINDOW(win), _(name)); } if(width && height) ewl_object_size_request(EWL_OBJECT(win), width, height); if(cb) ewl_callback_append(win, EWL_CALLBACK_DELETE_WINDOW, cb, data); =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_imaging.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- ephoto_imaging.c 11 May 2007 22:49:31 -0000 1.5 +++ ephoto_imaging.c 14 May 2007 17:05:29 -0000 1.6 @@ -305,8 +305,8 @@ pid_t pid; file = ewl_text_text_get(EWL_TEXT(data)); - snprintf(flags, PATH_MAX, "quality=%f compress=%f", ewl_range_value_get(EWL_RANGE(qseek)), - ewl_range_value_get(EWL_RANGE(cseek))); + snprintf(flags, PATH_MAX, "quality=%i compress=%i", (int)ewl_range_value_get(EWL_RANGE(qseek)), + (int)ewl_range_value_get(EWL_RANGE(cseek))); if(!file) return; =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_list_view.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- ephoto_list_view.c 22 Apr 2007 19:09:02 -0000 1.20 +++ ephoto_list_view.c 14 May 2007 17:05:29 -0000 1.21 @@ -73,7 +73,7 @@ ewl_tree2_column_count_set(EWL_TREE2(tree), 1); ewl_mvc_model_set(EWL_MVC(tree), model); ewl_mvc_view_set(EWL_MVC(tree), view); - ewl_mvc_selection_mode_set(EWL_MVC(tree), EWL_SELECTION_MODE_SINGLE); + ewl_mvc_selection_mode_set(EWL_MVC(tree), EWL_SELECTION_MODE_NONE); ewl_object_fill_policy_set(EWL_OBJECT(tree), EWL_FLAG_FILL_ALL); ewl_container_child_append(EWL_CONTAINER(c), tree); ewl_widget_show(tree); @@ -93,10 +93,13 @@ image = data; image_pixels_int_get(image, &width, &height); size = ecore_file_size(image); - snprintf(info, PATH_MAX, "Name: %s\nPixels: %s\nSize: %s\n", + snprintf(info, PATH_MAX, "%s: %s\n%s: %s\n%s: %s\n", + _("Name"), basename((char *)image), - image_pixels_string_get(image), - file_size_get(size)); + _("Pixels"), + image_pixels_string_get(image), + _("Size"), + file_size_get(size)); hbox = add_box(NULL, EWL_ORIENTATION_HORIZONTAL, 10); ewl_object_fill_policy_set(EWL_OBJECT(hbox), EWL_FLAG_FILL_HFILL); =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_main.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -3 -r1.31 -r1.32 --- ephoto_main.c 7 May 2007 02:12:27 -0000 1.31 +++ ephoto_main.c 14 May 2007 17:05:29 -0000 1.32 @@ -201,12 +201,12 @@ em->atree = add_atree(em->browser); ewl_object_maximum_w_set(EWL_OBJECT(em->atree), 200); ewl_widget_name_set(em->atree, "Albums"); - ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(em->browser), em->atree, "Albums"); + ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(em->browser), em->atree, _("Albums")); em->dtree = add_dtree(em->browser); ewl_object_maximum_w_set(EWL_OBJECT(em->dtree), 200); ewl_widget_name_set(em->dtree, "File System"); - ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(em->browser), em->dtree, "File System"); + ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(em->browser), em->dtree, _("File System")); em->view_box = ewl_notebook_new(); ewl_notebook_tabbar_visible_set(EWL_NOTEBOOK(em->view_box), 0); @@ -229,19 +229,19 @@ button = add_button(em->toolbar, NULL, PACKAGE_DATA_DIR "/images/normal_view.png", show_normal_view, NULL); ewl_button_image_size_set(EWL_BUTTON(button), 30, 30); - ewl_attach_tooltip_text_set(button, "Normal View"); + ewl_attach_tooltip_text_set(button, _("Normal View")); ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_SHRINK); ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_CENTER); button = add_button(em->toolbar, NULL, PACKAGE_DATA_DIR "/images/list_view.png", show_list_view, NULL); ewl_button_image_size_set(EWL_BUTTON(button), 30, 30); - ewl_attach_tooltip_text_set(button, "List View"); + ewl_attach_tooltip_text_set(button, _("List View")); ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_SHRINK); ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_CENTER); button = add_button(em->toolbar, NULL, PACKAGE_DATA_DIR "/images/image.png", show_single_view, NULL); ewl_button_image_size_set(EWL_BUTTON(button), 30, 30); - ewl_attach_tooltip_text_set(button, "Single View"); + ewl_attach_tooltip_text_set(button, _("Single View")); ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_SHRINK); ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_CENTER); @@ -251,23 +251,23 @@ button = add_button(em->toolbar, NULL, PACKAGE_DATA_DIR "/images/get_exif.png", NULL, NULL); ewl_button_image_size_set(EWL_BUTTON(button), 30, 30); - ewl_attach_tooltip_text_set(button, "You do not have libexif 0.6.13"); + ewl_attach_tooltip_text_set(button, _("You do not have libexif 0.6.13")); ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_LEFT); ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_HFILL); #ifdef BUILD_EXIF_SUPPORT ewl_callback_append(button, EWL_CALLBACK_CLICKED, display_exif_dialog, NULL); - ewl_attach_tooltip_text_set(button, "View Exif Data"); + ewl_attach_tooltip_text_set(button, _("View Exif Data")); #endif button = add_button(em->toolbar, NULL, PACKAGE_DATA_DIR "/images/stock_fullscreen.png", window_fullscreen, NULL); ewl_button_image_size_set(EWL_BUTTON(button), 30, 30); - ewl_attach_tooltip_text_set(button, "Toggle Fullscreen"); + ewl_attach_tooltip_text_set(button, _("Toggle Fullscreen")); ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_SHRINK); ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_CENTER); button = add_button(em->toolbar, NULL, PACKAGE_DATA_DIR "/images/x-office-presentation.png", start_slideshow, NULL); ewl_button_image_size_set(EWL_BUTTON(button), 30, 30); - ewl_attach_tooltip_text_set(button, "Start a Slideshow"); + ewl_attach_tooltip_text_set(button, _("Start a Slideshow")); ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_SHRINK); ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_CENTER); @@ -277,13 +277,13 @@ button = add_button(em->toolbar, NULL, PACKAGE_DATA_DIR "/images/edit_view.png", show_edit_view, NULL); ewl_button_image_size_set(EWL_BUTTON(button), 30, 30); - ewl_attach_tooltip_text_set(button, "Move to edit view"); + ewl_attach_tooltip_text_set(button, _("Move to edit view")); ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_SHRINK); ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_CENTER); em->db = ephoto_db_init(); - em->current_album = strdup("Complete Library"); + em->current_album = strdup(_("Complete Library")); em->current_directory = strdup(getenv("HOME")); populate_albums(NULL, NULL, NULL); @@ -335,9 +335,9 @@ ewl_object_alignment_set(EWL_OBJECT(thumb), EWL_FLAG_ALIGN_CENTER); ewl_widget_name_set(thumb, imagef); } - ecore_dlist_next(em->images); } + ewl_widget_reparent(em->fbox); ecore_dlist_goto_first(em->images); if(ecore_dlist_current(em->images)) { @@ -398,6 +398,7 @@ } ecore_dlist_next(em->images); } + ewl_widget_reparent(em->fbox); ecore_dlist_goto_first(em->images); if(ecore_dlist_current(em->images)) { @@ -459,6 +460,7 @@ ewl_tree2_column_count_set(EWL_TREE2(tree), 1); ewl_mvc_model_set(EWL_MVC(tree), model); ewl_mvc_view_set(EWL_MVC(tree), view); + ewl_mvc_selection_mode_set(EWL_MVC(tree), EWL_SELECTION_MODE_NONE); ewl_object_fill_policy_set(EWL_OBJECT(tree), EWL_FLAG_FILL_ALL); ewl_container_child_append(EWL_CONTAINER(c), tree); ewl_widget_show(tree); =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_single_view.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- ephoto_single_view.c 28 Apr 2007 04:12:24 -0000 1.6 +++ ephoto_single_view.c 14 May 2007 17:05:29 -0000 1.7 @@ -28,11 +28,11 @@ button = add_button(hbox, NULL, PACKAGE_DATA_DIR "/images/media-seek-backward.png", previous_image, NULL); ewl_button_image_size_set(EWL_BUTTON(button), 25, 25); - ewl_attach_tooltip_text_set(button, "Previous Image"); + ewl_attach_tooltip_text_set(button, _("Previous Image")); button = add_button(hbox, NULL, PACKAGE_DATA_DIR "/images/media-seek-forward.png", next_image, NULL); ewl_button_image_size_set(EWL_BUTTON(button), 25, 25); - ewl_attach_tooltip_text_set(button, "Next Image"); + ewl_attach_tooltip_text_set(button, _("Next Image")); return em->single_vbox; } ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs