Enlightenment CVS committal
Author : englebass
Project : misc
Module : gevas2
Dir : misc/gevas2/src
Modified Files:
gevas.c gevasedje.c gevasevh_throb.c gevasimage.c gevasobj.c
gevastext.c gevastext.h gevastwin.c
Log Message:
Clean some compiler warnings.
===================================================================
RCS file: /cvs/e/misc/gevas2/src/gevas.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- gevas.c 15 Aug 2007 05:51:16 -0000 1.18
+++ gevas.c 15 Aug 2007 18:02:18 -0000 1.19
@@ -402,20 +402,11 @@
guint info,
guint32 time)
{
-/* char *image_file_name, *image_file_uri;*/
-/* gboolean is_reset;*/
- GtkgEvas* gevas = GTK_GEVAS(widget);
+ GtkgEvas* gevas = GTK_GEVAS(widget);
-
g_return_if_fail (widget != NULL);
g_return_if_fail (context != NULL);
-
-
-/* printf("gevas_drag_data_get() \n");*/
-
-
-/*
switch (info) {
case PROPERTY_TYPE:
/* formulate the drag data based on the drag type. Eventually,
we will*/
@@ -477,8 +468,6 @@
default:
g_assert_not_reached ();
}
-*/
-
}
#endif
@@ -1003,11 +992,11 @@
gdk_vis = gdkx_visual_get(XVisualIDFromVisual(vis));
gdk_cmap = (GdkColormap *)gdkx_colormap_get(cmap);
- attributes.visual = gdk_vis; /*gtk_widget_get_visual (widget); */
+ attributes.visual = gdk_vis; /*gtk_widget_get_visual (widget); */
attributes.colormap = gdk_cmap; /*gtk_widget_get_colormap (widget); */
#else
- attributes.visual = gtk_widget_get_visual (widget);
- attributes.colormap = gtk_widget_get_colormap (widget);
+ attributes.visual = gtk_widget_get_visual (widget);
+ attributes.colormap = gtk_widget_get_colormap (widget);
#endif
/* Evas window */
@@ -1362,13 +1351,13 @@
if( gevas->scrolledwindow )
{
- if( a = gtk_scrolled_window_get_hadjustment( swin ))
+ if( (a = gtk_scrolled_window_get_hadjustment( swin )))
{
*x = a->value;
*w = a->page_size;
}
- if( a = gtk_scrolled_window_get_vadjustment( swin ))
+ if( (a = gtk_scrolled_window_get_vadjustment( swin )))
{
*y = a->value;
*h = a->page_size;
@@ -1389,8 +1378,6 @@
{
GtkgEvas* gevas = GTK_GEVAS( data );
GtkgEvas* ev = gevas;
- GdkRectangle* area = &ev->evas_r;
- GdkRectangle rect;
/* prevent evas from breaking if window isn't mapped */
if(!GTK_WIDGET_MAPPED(ev))
@@ -1438,8 +1425,8 @@
return 1;
GtkgEvas *ev;
- g_return_if_fail(data != NULL);
- g_return_if_fail(GTK_IS_GEVAS(data));
+ g_return_val_if_fail(data != NULL, 1);
+ g_return_val_if_fail(GTK_IS_GEVAS(data), 1);
ev = GTK_GEVAS(data);
if( ev->evas )
@@ -1563,10 +1550,6 @@
void gevas_new_gtkscrolledwindow(GtkgEvas** gevas , GtkWidget** scrolledwindow
)
{
-
- GtkBin *bin;
-
-
*scrolledwindow = gtk_scrolled_window_new(NULL, NULL);
*gevas = GTK_GEVAS(gevas_new());
@@ -1789,7 +1772,7 @@
if(!strlen(p))
return;
- if(t = g_list_find(*li, (gpointer)p))
+ if((t = g_list_find(*li, (gpointer)p)))
{
g_free(t->data);
*li = g_list_remove_link(*li, t);
@@ -1812,8 +1795,6 @@
void gevas_remove_metadata_prefix ( GtkgEvas * ev, const char* p )
{
- GList *li = 0;
-
g_return_if_fail(ev != NULL);
g_return_if_fail(p != NULL);
g_return_if_fail(GTK_IS_GEVAS(ev));
@@ -1853,16 +1834,16 @@
GList* gevas_get_metadata_prefix_list( GtkgEvas *ev )
{
- g_return_if_fail(ev != NULL);
- g_return_if_fail(GTK_IS_GEVAS(ev));
+ g_return_val_if_fail(ev != NULL, NULL);
+ g_return_val_if_fail(GTK_IS_GEVAS(ev), NULL);
return ev->metadata_prefix_list;
}
GList* gevas_get_image_prefix_list ( GtkgEvas *ev )
{
- g_return_if_fail(ev != NULL);
- g_return_if_fail(GTK_IS_GEVAS(ev));
+ g_return_val_if_fail(ev != NULL, NULL);
+ g_return_val_if_fail(GTK_IS_GEVAS(ev), NULL);
return ev->image_prefix_list;
}
@@ -1881,7 +1862,6 @@
gboolean
gevas_file_exists(const char* fmt, ... )
{
- gchar *full_filename;
struct stat s;
gint status;
va_list args;
===================================================================
RCS file: /cvs/e/misc/gevas2/src/gevasedje.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- gevasedje.c 22 Apr 2006 10:05:56 -0000 1.4
+++ gevasedje.c 15 Aug 2007 18:02:18 -0000 1.5
@@ -194,7 +194,6 @@
static void gevasedje_set_arg(GtkObject * object, GtkArg * arg, guint arg_id)
{
GtkgEvasEdje *ev;
- gchar *gstr;
g_return_if_fail(object != NULL);
g_return_if_fail(GTK_IS_GEVASEDJE(object));
===================================================================
RCS file: /cvs/e/misc/gevas2/src/gevasevh_throb.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- gevasevh_throb.c 15 Nov 2004 16:41:22 -0000 1.4
+++ gevasevh_throb.c 15 Aug 2007 18:02:18 -0000 1.5
@@ -146,20 +146,20 @@
#if 0
-/* gevasobj_get_geometry( go, &x, &y, &w, &h); */
-/* iw = w * (1.0 + (ev->t * 1)); */
-/* ih = h * (1.0 + (ev->t * 1)); */
-/* ix = x + ((w - iw) / 2); */
-/* iy = y + ((h - ih) / 2); */
+ gevasobj_get_geometry( go, &x, &y, &w, &h);
+ iw = w * (1.0 + (ev->t * 1));
+ ih = h * (1.0 + (ev->t * 1));
+ ix = x + ((w - iw) / 2);
+ iy = y + ((h - ih) / 2);
-/* if( ix != ev->x || iy != ev->y ) */
-/* { */
-/* x = ix - ((w - iw) / 2); */
-/* y = iy - ((h - ih) / 2); */
-/* printf("x:%f evx:%f y:%f evy:%f\n", x, ev->x, y, ev->y ); */
-/* /* ev->x = x; */ */
-/* /* ev->y = y; */ */
-/* } */
+ if( ix != ev->x || iy != ev->y )
+ { */
+ x = ix - ((w - iw) / 2);
+ y = iy - ((h - ih) / 2);
+ printf("x:%f evx:%f y:%f evy:%f\n", x, ev->x, y, ev->y );
+/* ev->x = x; */
+/* ev->y = y; */
+ }
#endif
}
@@ -217,12 +217,9 @@
gevasev_throb_mouse_in(GtkObject * object, GtkObject * gevasobj, int _b,
int _x, int _y)
{
- Evas_Coord x = 0, y = 0, w = 0, h = 0;
- double sw = 0, sh = 0;
GtkgEvasEvH* evh;
GtkgEvasObj* go;
GtkgEvasEvHThrob *ev;
- GtkgEvasObj *ggobj = GTK_GEVASOBJ(gevasobj);
g_return_val_if_fail(object != NULL, GEVASEV_HANDLER_RET_NEXT);
g_return_val_if_fail(GTK_IS_GEVASEVH_THROB(object),
GEVASEV_HANDLER_RET_NEXT);
@@ -249,9 +246,7 @@
gevasev_throb_mouse_out(GtkObject * object, GtkObject * gevasobj, int _b,
int _x, int _y)
{
- double x = 0, y = 0, w = 0, h = 0;
GtkgEvasEvHThrob *ev;
- GtkgEvasObj *ggobj = GTK_GEVASOBJ(gevasobj);
g_return_val_if_fail(object != NULL, GEVASEV_HANDLER_RET_NEXT);
g_return_val_if_fail(GTK_IS_GEVASEVH_THROB(object),
GEVASEV_HANDLER_RET_NEXT);
===================================================================
RCS file: /cvs/e/misc/gevas2/src/gevasimage.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- gevasimage.c 4 May 2005 02:28:44 -0000 1.12
+++ gevasimage.c 15 Aug 2007 18:02:18 -0000 1.13
@@ -50,6 +50,7 @@
#endif
#include <stdio.h>
+#include <string.h>
/* Always disable NLS, since we have no config.h;
* a real app would not do this of course.
@@ -496,11 +497,9 @@
GtkgEvasImage* ev = user_data;
char* full_buffer;
const char* filen;
- char* edb_prefix = 0;
char* p = 0;
GHashTable* hash_args = 0;
/* E_DB_File* edb = 0; */
- gboolean failed=1;
g_return_if_fail(ev != NULL);
g_return_if_fail(fully_qualified_prefix!= NULL);
@@ -515,7 +514,7 @@
if( strlen( fully_qualified_prefix ))
{
full_buffer = g_strconcat( fully_qualified_prefix,
- "/", ev->metadata_load_postfix,0 );
+ "/", ev->metadata_load_postfix, NULL);
}
else
{
@@ -629,7 +628,6 @@
{
int w=0, h=0;
double ratio = MaxDesiredWidthOrHeight;
- GtkRequisition requisition;
GtkgEvasObj* go = GTK_GEVASOBJ( gi );
gevasimage_get_image_size(go, &w, &h);
===================================================================
RCS file: /cvs/e/misc/gevas2/src/gevasobj.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- gevasobj.c 15 Aug 2007 05:51:16 -0000 1.12
+++ gevasobj.c 15 Aug 2007 18:02:18 -0000 1.13
@@ -38,6 +38,7 @@
#include <gevasobj.h>
#include <stdio.h>
+#include <string.h>
#include "project.h"
#include "gevas_sprite.h"
@@ -739,7 +740,6 @@
void gevasobj_move_relative( GtkgEvasObj * object, double dx, double dy)
{
Evas_Coord lx=0, ly=0;
- gint32 x, y;
gevasobj_get_location( object, &lx, &ly );
===================================================================
RCS file: /cvs/e/misc/gevas2/src/gevastext.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- gevastext.c 15 Nov 2004 16:41:22 -0000 1.2
+++ gevastext.c 15 Aug 2007 18:02:18 -0000 1.3
@@ -109,18 +109,18 @@
return (gchar*)evas_object_text_text_get( EVASO(object));
}
-gchar *gevastext_get_font(GtkgEvasObj * object)
+const gchar *gevastext_get_font(GtkgEvasObj * object)
{
- char* font = 0;
+ const char* font = 0;
Evas_Font_Size sz = 0;
evas_object_text_font_get( EVASO(object), &font, &sz );
- return (gchar*)font;
+ return font;
}
int gevastext_get_text_size(GtkgEvasObj * object)
{
- char* font = 0;
+ const char* font = 0;
Evas_Font_Size sz = 0;
evas_object_text_font_get( EVASO(object), &font, &sz );
===================================================================
RCS file: /cvs/e/misc/gevas2/src/gevastext.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- gevastext.h 15 Aug 2002 02:38:06 -0000 1.1
+++ gevastext.h 15 Aug 2007 18:02:18 -0000 1.2
@@ -66,7 +66,7 @@
/** public members **/
gchar *gevastext_get_string(GtkgEvasObj * object);
- gchar *gevastext_get_font(GtkgEvasObj * object);
+ const gchar *gevastext_get_font(GtkgEvasObj * object);
int gevastext_get_text_size(GtkgEvasObj * object);
void gevastext_get_ascent_descent(GtkgEvasObj * object, double *ascent,
double *descent);
===================================================================
RCS file: /cvs/e/misc/gevas2/src/gevastwin.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- gevastwin.c 4 Aug 2005 04:12:16 -0000 1.9
+++ gevastwin.c 15 Aug 2007 18:02:18 -0000 1.10
@@ -119,7 +119,6 @@
static void gevastwin_class_init(GtkgEvasTwinClass * klass)
{
GtkObjectClass *object_class;
- GtkgEvasObjClass *gobj = (GtkgEvasObjClass *) klass;
object_class = (GtkObjectClass *) klass;
parent_class = gtk_type_class(gtk_object_get_type());
@@ -258,13 +257,13 @@
/* ev->mainobj, ev->auxobj, object ); */
if (ev->mainobj == object) {
- printf("gevastwin_move_xxx(MO) extra object. main:%lp aux:%lp
obj:%lp\n",
+ printf("gevastwin_move_xxx(MO) extra object. main:%p aux:%p
obj:%p\n",
ev->mainobj, ev->auxobj, object );
ev->main_obj_move(object, x, y);
_gevastwin_sync_obj(ev, ev->auxobj);
}
else if (ev->auxobj == object) {
- printf("gevastwin_move_xxx(AO) extra object. main:%lp aux:%lp
obj:%lp\n",
+ printf("gevastwin_move_xxx(AO) extra object. main:%p aux:%p
obj:%p\n",
ev->mainobj, ev->auxobj, object );
ev->aux_obj_move(object, x, y);
_gevastwin_sync_obj(ev, ev->mainobj);
@@ -432,7 +431,6 @@
static void gevastwin_set_arg(GtkObject * object, GtkArg * arg, guint arg_id)
{
GtkgEvasTwin *ev;
- gchar *gstr;
g_return_if_fail(object != NULL);
g_return_if_fail(GTK_IS_GEVASTWIN(object));
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs