From 96ac239a6d56704d5d3e2b903b31c3907099cb20 Mon Sep 17 00:00:00 2001 From: titan Date: Sat, 19 May 2007 16:59:09 +0000 Subject: [PATCH] Cleanup SVN revision: 30033 --- src/bin/ephoto.h | 16 ++++++++-------- src/bin/ephoto_gui.c | 18 +++++++++--------- src/bin/ephoto_main.c | 7 +++---- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h index de2e025..5ce732c 100644 --- a/src/bin/ephoto.h +++ b/src/bin/ephoto.h @@ -66,17 +66,17 @@ void ephoto_db_close(sqlite3 *db); /* Ephoto Gui */ Ewl_Widget *add_box(Ewl_Widget *c, Ewl_Orientation orientation, int spacing); -Ewl_Widget *add_button(Ewl_Widget *c, const char *txt, const char *img, void *cb, void *data); -Ewl_Widget *add_entry(Ewl_Widget *c, const char *txt, void *cb, void *data); -Ewl_Widget *add_icon(Ewl_Widget *c, const char *lbl, const char *img, int thumbnail, void *cb, void *data); +Ewl_Widget *add_button(Ewl_Widget *c, char *lbl, const char *img, void *cb, void *data); +Ewl_Widget *add_entry(Ewl_Widget *c, char *txt, void *cb, void *data); +Ewl_Widget *add_icon(Ewl_Widget *c, char *lbl, const char *img, int thumbnail, void *cb, void *data); Ewl_Widget *add_image(Ewl_Widget *c, const char *img, int thumbnail, void *cb, void *data); -Ewl_Widget *add_label(Ewl_Widget *c, const char *lbl); +Ewl_Widget *add_label(Ewl_Widget *c, char *lbl); Ewl_Widget *add_menubar(Ewl_Widget *c); -Ewl_Widget *add_menu(Ewl_Widget *c, const char *lbl); -Ewl_Widget *add_menu_item(Ewl_Widget *c, const char *lbl, const char *img, void *cb, void *data); -Ewl_Widget *add_text(Ewl_Widget *c, const char *text); +Ewl_Widget *add_menu(Ewl_Widget *c, char *lbl); +Ewl_Widget *add_menu_item(Ewl_Widget *c, char *lbl, const char *img, void *cb, void *data); +Ewl_Widget *add_text(Ewl_Widget *c, char *text); Ewl_Widget *add_shadow(Ewl_Widget *c); -Ewl_Widget *add_window(const char *name, int width, int height, void *cb, void *data); +Ewl_Widget *add_window(char *name, int width, int height, void *cb, void *data); /* Ephoto Imaging */ unsigned int *flip_horizontal(Ewl_Widget *image); diff --git a/src/bin/ephoto_gui.c b/src/bin/ephoto_gui.c index 10d804e..610c04a 100644 --- a/src/bin/ephoto_gui.c +++ b/src/bin/ephoto_gui.c @@ -15,13 +15,13 @@ Ewl_Widget *add_box(Ewl_Widget *c, Ewl_Orientation orientation, int spacing) } /*Create and Add a Button to the Container c*/ -Ewl_Widget *add_button(Ewl_Widget *c, const char *txt, const char *img, void *cb, void *data) +Ewl_Widget *add_button(Ewl_Widget *c, char *lbl, const char *img, void *cb, void *data) { Ewl_Widget *button; button = ewl_button_new(); if(img) ewl_button_image_set(EWL_BUTTON(button), img, NULL); - if(txt) ewl_button_label_set(EWL_BUTTON(button), _(txt)); + if(lbl) ewl_button_label_set(EWL_BUTTON(button), _(lbl)); ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_CENTER); ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_SHRINK); if(c) ewl_container_child_append(EWL_CONTAINER(c), button); @@ -32,7 +32,7 @@ Ewl_Widget *add_button(Ewl_Widget *c, const char *txt, const char *img, void *cb } /*Create and Add an Entry to Container c With Text txt and the Callback cb*/ -Ewl_Widget *add_entry(Ewl_Widget *c, const char *txt, void *cb, void *data) +Ewl_Widget *add_entry(Ewl_Widget *c, char *txt, void *cb, void *data) { Ewl_Widget *entry; @@ -46,7 +46,7 @@ Ewl_Widget *add_entry(Ewl_Widget *c, const char *txt, void *cb, void *data) } /*Create and add an icon to the container c*/ -Ewl_Widget *add_icon(Ewl_Widget *c, const char *lbl, const char *img, int thumbnail, void *cb, void *data) +Ewl_Widget *add_icon(Ewl_Widget *c, char *lbl, const char *img, int thumbnail, void *cb, void *data) { Ewl_Widget *icon; @@ -99,7 +99,7 @@ Ewl_Widget *add_image(Ewl_Widget *c, const char *img, int thumbnail, void *cb, v } /*Create and Add a Label to the Container c, With the Text lbl*/ -Ewl_Widget *add_label(Ewl_Widget *c, const char *lbl) +Ewl_Widget *add_label(Ewl_Widget *c, char *lbl) { Ewl_Widget *label; @@ -127,7 +127,7 @@ Ewl_Widget *add_menubar(Ewl_Widget *c) } /*Create and Add a Menu to the Container c*/ -Ewl_Widget *add_menu(Ewl_Widget *c, const char *lbl) +Ewl_Widget *add_menu(Ewl_Widget *c, char *lbl) { Ewl_Widget *menu; @@ -141,7 +141,7 @@ Ewl_Widget *add_menu(Ewl_Widget *c, const char *lbl) } /*Create and Add a Menu Item to the Container c*/ -Ewl_Widget *add_menu_item(Ewl_Widget *c, const char *lbl, const char *img, void *cb, void *data) +Ewl_Widget *add_menu_item(Ewl_Widget *c, char *lbl, const char *img, void *cb, void *data) { Ewl_Widget *mi; @@ -170,7 +170,7 @@ Ewl_Widget *add_shadow(Ewl_Widget *c) } /*Create and Add a Text Widget to the Container c*/ -Ewl_Widget *add_text(Ewl_Widget *c, const char *txt) +Ewl_Widget *add_text(Ewl_Widget *c, char *txt) { Ewl_Widget *text; @@ -185,7 +185,7 @@ Ewl_Widget *add_text(Ewl_Widget *c, const char *txt) } /*Create and Add a Window*/ -Ewl_Widget *add_window(const char *name, int width, int height, void *cb, void *data) +Ewl_Widget *add_window(char *name, int width, int height, void *cb, void *data) { Ewl_Widget *win; diff --git a/src/bin/ephoto_main.c b/src/bin/ephoto_main.c index 0390748..5dcb949 100644 --- a/src/bin/ephoto_main.c +++ b/src/bin/ephoto_main.c @@ -507,7 +507,7 @@ static Ewl_Widget *add_dtree(Ewl_Widget *c) /* The view of the users albums */ static Ewl_Widget *album_view_new(void *data, unsigned int row, unsigned int column) { - const char *album; + char *album; Ewl_Widget *icon; album = data; @@ -527,8 +527,7 @@ static Ewl_Widget *album_view_new(void *data, unsigned int row, unsigned int col /* The view of the users directories */ static Ewl_Widget *directory_view_new(void *data, unsigned int row, unsigned int column) { - char *current_directory; - const char *directory; + char *current_directory, *directory; int len; Ewl_Widget *icon; @@ -537,7 +536,7 @@ static Ewl_Widget *directory_view_new(void *data, unsigned int row, unsigned int strcpy(current_directory, em->current_directory); directory = data; - icon = add_icon(NULL, basename((char *)directory), + icon = add_icon(NULL, basename(directory), PACKAGE_DATA_DIR "/images/folder.png", 0, populate_directories, NULL);