Enlightenment CVS committal
Author : doursse
Project : e17
Module : apps/edje_viewer
Dir : e17/apps/edje_viewer/src/bin
Modified Files:
Makefile.am conf.c conf.h edje_etk.c etk_gui.c main.c
Removed Files:
edje_viewer.h
Log Message:
* autotools improvements
* make conf.* files etk-independent (Etk_Bool -> unsigned char)
* fix warnings
===================================================================
RCS file: /cvs/e/e17/apps/edje_viewer/src/bin/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- Makefile.am 24 Mar 2007 12:16:56 -0000 1.4
+++ Makefile.am 6 May 2008 06:36:06 -0000 1.5
@@ -1,14 +1,22 @@
-## Process this file with automake to produce Makefile.in
-INCLUDES = @evas_CFLAGS@ @ecore_CFLAGS@ @edje_CFLAGS@ @etk_CFLAGS@
+MAINTAINERCLEANFILES = Makefile.in
-bin_PROGRAMS = edje_viewer
+AM_CPPFLAGS = \
+-I$(top_srcdir)/src/lib \
+-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
[EMAIL PROTECTED]@
-edje_viewer_INCLUDES = \
-edje_viewer.h edje_etk.h etk_gui.h conf.h
+bin_PROGRAMS = edje_viewer
edje_viewer_SOURCES = \
-edje_etk.c etk_gui.c main.c conf.c \
-$(edje_viewer_INCLUDES)
+conf.c \
+edje_etk.c \
+etk_gui.c \
+main.c
+
+edje_viewer_LDADD = @EDJE_VIEWER_LIBS@
-edje_viewer_LDADD = @evas_LIBS@ @ecore_LIBS@ @edje_LIBS@ @etk_LIBS@
+EXTRA_DIST = \
+conf.h \
+edje_etk.h \
+etk_gui.h
===================================================================
RCS file: /cvs/e/e17/apps/edje_viewer/src/bin/conf.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- conf.c 30 Sep 2007 02:16:55 -0000 1.5
+++ conf.c 6 May 2008 06:36:06 -0000 1.6
@@ -2,7 +2,19 @@
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
-#include "edje_viewer.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include <Ecore_Config.h>
+
+#include "conf.h"
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+#define FREE(ptr) do { if(ptr) { free(ptr); ptr = NULL; }} while (0);
void edje_viewer_config_init(void)
{
@@ -54,8 +66,8 @@
void edje_viewer_config_recent_set(const char *path)
{
- int count, key_length, i;
- char key[sizeof("/recent/") + 8], *key_v, *val, *cwd;
+ int count, i;
+ char key[sizeof("/recent/") + 8], *key_v, *val;
char new_path[PATH_MAX];
if (!path) return;
@@ -105,28 +117,28 @@
ecore_config_string_set("/recent/last", new_path);
}
-Etk_Bool edje_viewer_config_open_last_get(void)
+unsigned char edje_viewer_config_open_last_get(void)
{
- Etk_Bool check;
+ unsigned char check;
check = ecore_config_int_get("/startup/open_last");
return check;
}
-void edje_viewer_config_open_last_set(Etk_Bool check)
+void edje_viewer_config_open_last_set(unsigned char check)
{
ecore_config_int_set("/startup/open_last", check);
}
-Etk_Bool edje_viewer_config_sort_parts_get(void)
+unsigned char edje_viewer_config_sort_parts_get(void)
{
- Etk_Bool check;
+ unsigned char check;
check = ecore_config_int_get("/startup/sort_parts");
return check;
}
-void edje_viewer_config_sort_parts_set(Etk_Bool check)
+void edje_viewer_config_sort_parts_set(unsigned char check)
{
ecore_config_int_set("/startup/sort_parts", check);
}
===================================================================
RCS file: /cvs/e/e17/apps/edje_viewer/src/bin/conf.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- conf.h 8 Jul 2006 23:32:00 -0000 1.3
+++ conf.h 6 May 2008 06:36:07 -0000 1.4
@@ -11,7 +11,7 @@
char *edje_viewer_config_last_get(void);
void edje_viewer_config_last_set(const char *path);
-Etk_Bool edje_viewer_config_open_last_get(void);
-void edje_viewer_config_open_last_set(Etk_Bool check);
-Etk_Bool edje_viewer_config_sort_parts_get(void);
-void edje_viewer_config_sort_parts_set(Etk_Bool check);
+unsigned char edje_viewer_config_open_last_get(void);
+void edje_viewer_config_open_last_set(unsigned char check);
+unsigned char edje_viewer_config_sort_parts_get(void);
+void edje_viewer_config_sort_parts_set(unsigned char check);
===================================================================
RCS file: /cvs/e/e17/apps/edje_viewer/src/bin/edje_etk.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- edje_etk.c 3 Feb 2007 17:25:52 -0000 1.15
+++ edje_etk.c 6 May 2008 06:36:07 -0000 1.16
@@ -2,7 +2,28 @@
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
-#include "edje_viewer.h"
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#include <Edje.h>
+#include <Etk.h>
+
+#include "edje_etk.h"
+#include "etk_gui.h"
+#include "conf.h"
+
+#if HAVE___ATTRIBUTE__
+#define __UNUSED__ __attribute__((unused))
+#else
+#define __UNUSED__
+#endif
+
+#define DAT PACKAGE_DATA_DIR"/"
+
+#define FREE(ptr) do { if(ptr) { free(ptr); ptr = NULL; }} while (0);
static void edje_move_resize(Demo_Edje *de, Evas_Coord xx, Evas_Coord yy,
Evas_Coord ww, Evas_Coord hh);
@@ -71,7 +92,7 @@
etk_canvas_object_add(canvas, o);
}
-void canvas_resize_cb(Etk_Object *canvas, const char *property_name, void
*data)
+void canvas_resize_cb(Etk_Object *canvas, const char *property_name
__UNUSED__, void *data __UNUSED__)
{
Evas *evas;
Evas_Coord x, y, w, h;
@@ -94,7 +115,7 @@
}
void list_entries(const char *file, Etk_Tree *tree,
- Etk_Canvas *canvas)
+ Etk_Canvas *canvas __UNUSED__)
{
Evas_List *entries;
Evas_List *collections = NULL;
@@ -370,7 +391,7 @@
}
static void bottom_down_cb
-(void *data, Evas *e, Evas_Object *obj, void *event_info)
+(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
Demo_Edje *de;
Evas_Event_Mouse_Down *ev;
@@ -393,7 +414,7 @@
de->vdir = vdir;
}
-static void top_down_cb(void *data, Evas *e, Evas_Object *obj, void
*event_info)
+static void top_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj
__UNUSED__, void *event_info __UNUSED__)
{
Demo_Edje *de;
@@ -409,7 +430,7 @@
evas_object_raise(de->edje);
}
-static void top_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+static void top_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj
__UNUSED__, void *event_info __UNUSED__)
{
Demo_Edje *de;
@@ -417,7 +438,7 @@
de->down_top = 0;
}
-static void top_move_cb(void *data, Evas *e, Evas_Object *obj, void
*event_info)
+static void top_move_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj
__UNUSED__, void *event_info)
{
Demo_Edje *de;
Evas_Event_Mouse_Move *ev;
@@ -464,7 +485,7 @@
}
static void bottom_up_cb
-(void *data, Evas *e, Evas_Object *obj, void *event_info)
+(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
__UNUSED__)
{
Demo_Edje *de;
@@ -473,7 +494,7 @@
}
static void bottom_move_cb
-(void *data, Evas *e, Evas_Object *obj, void *event_info)
+(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
{
Demo_Edje *de;
Evas_Event_Mouse_Move *ev;
===================================================================
RCS file: /cvs/e/e17/apps/edje_viewer/src/bin/etk_gui.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- etk_gui.c 23 Nov 2007 19:01:33 -0000 1.24
+++ etk_gui.c 6 May 2008 06:36:07 -0000 1.25
@@ -2,7 +2,27 @@
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
-#include "edje_viewer.h"
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+#include <unistd.h>
+
+#include <Edje.h>
+#include <Etk.h>
+
+#include <conf.h>
+#include <edje_etk.h>
+#include <etk_gui.h>
+
+#if HAVE___ATTRIBUTE__
+#define __UNUSED__ __attribute__((unused))
+#else
+#define __UNUSED__
+#endif
+
+#define FREE(ptr) do { if(ptr) { free(ptr); ptr = NULL; }} while (0);
static Etk_Widget *_gui_menubar_item_new(Gui *gui, const char *label,
Etk_Menu_Shell *menu_shell);
@@ -229,7 +249,7 @@
gui);
}
-static Etk_Widget *_gui_menubar_item_new (Gui *gui, const char *label,
+static Etk_Widget *_gui_menubar_item_new (Gui *gui __UNUSED__, const char
*label,
Etk_Menu_Shell *menu_shell)
{
Etk_Widget *menu_item = NULL;
@@ -263,7 +283,7 @@
}
-static Etk_Widget *_gui_menu_item_new(Gui *gui, const char *label,
+static Etk_Widget *_gui_menu_item_new(Gui *gui __UNUSED__, const char *label,
Etk_Menu_Shell *menu_shell)
{
Etk_Widget *menu_item;
@@ -361,7 +381,7 @@
return ETK_TRUE;
}
-static Etk_Bool _gui_tree_key_down_cb(Etk_Object *object, Etk_Event_Key_Down
*event, void *data)
+static Etk_Bool _gui_tree_key_down_cb(Etk_Object *object __UNUSED__,
Etk_Event_Key_Down *event, void *data)
{
Gui *gui;
int wx, wy, x, y, w, h;
@@ -397,7 +417,7 @@
return ETK_TRUE;
}
-static Etk_Bool _gui_search_entry_key_down_cb(Etk_Object *object,
Etk_Event_Key_Down *event, void *data)
+static Etk_Bool _gui_search_entry_key_down_cb(Etk_Object *object __UNUSED__,
Etk_Event_Key_Down *event, void *data)
{
Gui *gui;
@@ -437,7 +457,7 @@
return ETK_TRUE;
}
-static Etk_Bool _gui_search_entry_text_changed_cb(Etk_Entry *entry, void *data)
+static Etk_Bool _gui_search_entry_text_changed_cb(Etk_Entry *entry __UNUSED__,
void *data)
{
Gui *gui;
Evas_Object *editable;
@@ -456,13 +476,13 @@
return ETK_TRUE;
}
-static Etk_Bool _gui_main_window_deleted_cb(Etk_Window *obj, Gui *gui)
+static Etk_Bool _gui_main_window_deleted_cb(Etk_Window *obj __UNUSED__, Gui
*gui __UNUSED__)
{
etk_main_quit();
return ETK_TRUE;
}
-static Etk_Bool _gui_menu_item_reload_cb(Etk_Menu_Item *item, Gui *gui)
+static Etk_Bool _gui_menu_item_reload_cb(Etk_Menu_Item *item __UNUSED__, Gui
*gui)
{
eet_clearcache();
edje_file_cache_flush();
@@ -470,7 +490,7 @@
return ETK_TRUE;
}
-static Etk_Bool _gui_menu_item_quit_cb(Etk_Menu_Item *item, Gui *gui)
+static Etk_Bool _gui_menu_item_quit_cb(Etk_Menu_Item *item __UNUSED__, Gui
*gui __UNUSED__)
{
etk_main_quit();
return ETK_TRUE;
@@ -485,7 +505,7 @@
return ETK_TRUE;
}
-static Etk_Bool _gui_menu_item_open_edje_file_cb(Etk_Menu_Item *item, Gui *gui)
+static Etk_Bool _gui_menu_item_open_edje_file_cb(Etk_Menu_Item *item
__UNUSED__, Gui *gui)
{
Etk_Widget *button;
char *cwd;
@@ -527,7 +547,7 @@
return ETK_TRUE;
}
-static Etk_Bool _gui_fm_ok_clicked_cb(Etk_Button *btn, Gui *gui)
+static Etk_Bool _gui_fm_ok_clicked_cb(Etk_Button *btn __UNUSED__, Gui *gui)
{
Etk_Filechooser_Widget *fm_chooser;
const char *file;
@@ -557,7 +577,7 @@
return ETK_TRUE;
}
-static Etk_Bool _gui_fm_cancel_clicked_cb(Etk_Button *btn, Gui *gui)
+static Etk_Bool _gui_fm_cancel_clicked_cb(Etk_Button *btn __UNUSED__, Gui *gui)
{
etk_widget_hide(gui->fm_dialog);
return ETK_TRUE;
@@ -589,7 +609,7 @@
return ETK_TRUE;
}
-static Etk_Bool _gui_emit_signal_cb(Etk_Object *obj, void *data)
+static Etk_Bool _gui_emit_signal_cb(Etk_Object *obj __UNUSED__, void *data)
{
Gui * gui;
Evas_List *l;
@@ -614,7 +634,7 @@
}
int gui_part_col_sort_cb
-(Etk_Tree_Col *col, Etk_Tree_Row *row1, Etk_Tree_Row *row2, void *data)
+(Etk_Tree_Col *col, Etk_Tree_Row *row1, Etk_Tree_Row *row2, void *data
__UNUSED__)
{
char *row1_value, *row2_value;
@@ -633,7 +653,7 @@
}
static int gui_visibility_col_sort_cb
-(Etk_Tree_Col *col, Etk_Tree_Row *row1, Etk_Tree_Row *row2, void *data)
+(Etk_Tree_Col *col, Etk_Tree_Row *row1, Etk_Tree_Row *row2, void *data
__UNUSED__)
{
Etk_Bool row1_value, row2_value;
===================================================================
RCS file: /cvs/e/e17/apps/edje_viewer/src/bin/main.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- main.c 14 Oct 2007 20:49:20 -0000 1.5
+++ main.c 6 May 2008 06:36:07 -0000 1.6
@@ -2,7 +2,10 @@
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
-#include "edje_viewer.h"
+#include <Etk.h>
+
+#include "conf.h"
+#include "etk_gui.h"
int main(int argc, char **argv)
{
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs