summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/lib/emotion_smart.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2009-03-13 10:42:04 +0000
committerCarsten Haitzler <raster@rasterman.com>2009-03-13 10:42:04 +0000
commit5e925c916e9229e1863b2e56b3c12d027e97ccf4 (patch)
tree209bb8c3ea5e13be02264a04e7d3da000918b2f8 /legacy/emotion/src/lib/emotion_smart.c
parent691aa040b93002cb58b27ddf0e8cf06d6eec447a (diff)
patch from Gustavo F. Padovan - minor code cleanups (effectually cosmetic) :)
SVN revision: 39463
Diffstat (limited to 'legacy/emotion/src/lib/emotion_smart.c')
-rw-r--r--legacy/emotion/src/lib/emotion_smart.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c
index 789dc8bb1a..9cd682d0be 100644
--- a/legacy/emotion/src/lib/emotion_smart.c
+++ b/legacy/emotion/src/lib/emotion_smart.c
@@ -122,7 +122,7 @@ _emotion_module_open(const char *name, Evas_Object *obj, Emotion_Video_Module **
122 ecore_plugin_unload(plugin); 122 ecore_plugin_unload(plugin);
123 } 123 }
124 else 124 else
125 printf ("Unable to load module %s\n", name); 125 fprintf (stderr, "Unable to load module %s\n", name);
126 126
127 if (path_group) 127 if (path_group)
128 { 128 {
@@ -195,14 +195,14 @@ emotion_object_init(Evas_Object *obj, const char *module_filename)
195 195
196 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0); 196 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
197 197
198 if (sd->file) free(sd->file); 198 free(sd->file);
199 sd->file = NULL; 199 sd->file = NULL;
200 if (sd->title) free(sd->title); 200 free(sd->title);
201 sd->title = NULL; 201 sd->title = NULL;
202 if (sd->progress.info) free(sd->progress.info); 202 free(sd->progress.info);
203 sd->progress.info = NULL; 203 sd->progress.info = NULL;
204 sd->progress.stat = 0.0; 204 sd->progress.stat = 0.0;
205 if (sd->ref.file) free(sd->ref.file); 205 free(sd->ref.file);
206 sd->ref.file = NULL; 206 sd->ref.file = NULL;
207 sd->ref.num = 0; 207 sd->ref.num = 0;
208 sd->spu.button_num = 0; 208 sd->spu.button_num = 0;
@@ -238,7 +238,7 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
238 { 238 {
239 int w, h; 239 int w, h;
240 240
241 if (sd->file) free(sd->file); 241 free(sd->file);
242 sd->file = strdup(file); 242 sd->file = strdup(file);
243 sd->module->file_close(sd->video); 243 sd->module->file_close(sd->video);
244 evas_object_image_size_set(sd->obj, 0, 0); 244 evas_object_image_size_set(sd->obj, 0, 0);
@@ -257,7 +257,7 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
257 sd->module->file_close(sd->video); 257 sd->module->file_close(sd->video);
258 evas_object_image_size_set(sd->obj, 0, 0); 258 evas_object_image_size_set(sd->obj, 0, 0);
259 } 259 }
260 if (sd->file) free(sd->file); 260 free(sd->file);
261 sd->file = NULL; 261 sd->file = NULL;
262 } 262 }
263} 263}
@@ -277,7 +277,7 @@ emotion_object_play_set(Evas_Object *obj, Evas_Bool play)
277 Smart_Data *sd; 277 Smart_Data *sd;
278 278
279 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 279 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
280 if (((play) && (sd->play)) || ((!play) && (!sd->play))) return; 280 if (play == sd->play) return;
281 if (!sd->module) return; 281 if (!sd->module) return;
282 if (!sd->video) return; 282 if (!sd->video) return;
283 sd->play = play; 283 sd->play = play;
@@ -958,7 +958,7 @@ _emotion_title_set(Evas_Object *obj, char *title)
958 Smart_Data *sd; 958 Smart_Data *sd;
959 959
960 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 960 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
961 if (sd->title) free(sd->title); 961 free(sd->title);
962 sd->title = strdup(title); 962 sd->title = strdup(title);
963 evas_object_smart_callback_call(obj, "title_change", NULL); 963 evas_object_smart_callback_call(obj, "title_change", NULL);
964} 964}
@@ -969,7 +969,7 @@ _emotion_progress_set(Evas_Object *obj, char *info, double stat)
969 Smart_Data *sd; 969 Smart_Data *sd;
970 970
971 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 971 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
972 if (sd->progress.info) free(sd->progress.info); 972 free(sd->progress.info);
973 sd->progress.info = strdup(info); 973 sd->progress.info = strdup(info);
974 sd->progress.stat = stat; 974 sd->progress.stat = stat;
975 evas_object_smart_callback_call(obj, "progress_change", NULL); 975 evas_object_smart_callback_call(obj, "progress_change", NULL);
@@ -981,7 +981,7 @@ _emotion_file_ref_set(Evas_Object *obj, char *file, int num)
981 Smart_Data *sd; 981 Smart_Data *sd;
982 982
983 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 983 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
984 if (sd->ref.file) free(sd->ref.file); 984 free(sd->ref.file);
985 sd->ref.file = strdup(file); 985 sd->ref.file = strdup(file);
986 sd->ref.num = num; 986 sd->ref.num = num;
987 evas_object_smart_callback_call(obj, "ref_change", NULL); 987 evas_object_smart_callback_call(obj, "ref_change", NULL);
@@ -1243,10 +1243,10 @@ _smart_del(Evas_Object * obj)
1243 if (sd->video) sd->module->file_close(sd->video); 1243 if (sd->video) sd->module->file_close(sd->video);
1244 _emotion_module_close(sd->module, sd->video); 1244 _emotion_module_close(sd->module, sd->video);
1245 evas_object_del(sd->obj); 1245 evas_object_del(sd->obj);
1246 if (sd->file) free(sd->file); 1246 free(sd->file);
1247 if (sd->job) ecore_job_del(sd->job); 1247 if (sd->job) ecore_job_del(sd->job);
1248 if (sd->progress.info) free(sd->progress.info); 1248 free(sd->progress.info);
1249 if (sd->ref.file) free(sd->ref.file); 1249 free(sd->ref.file);
1250 free(sd); 1250 free(sd);
1251 1251
1252 ecore_job_shutdown(); 1252 ecore_job_shutdown();