summaryrefslogtreecommitdiff
path: root/src/bin/e_bg.c
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2009-12-17 21:59:23 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2009-12-17 21:59:23 +0000
commit9710ec6536b0df66d6b0748ead00b542aa3ed4a6 (patch)
treed18c5a0a93731e62e16ff2a1cda0fd6d6197c18f /src/bin/e_bg.c
parent79e6a724e78801b81ce240e9d0eaed0515eed1b5 (diff)
e_bg: delete trailing whitespace.
SVN revision: 44526
Diffstat (limited to 'src/bin/e_bg.c')
-rw-r--r--src/bin/e_bg.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/bin/e_bg.c b/src/bin/e_bg.c
index 751343f..28c7cb7 100644
--- a/src/bin/e_bg.c
+++ b/src/bin/e_bg.c
@@ -13,7 +13,7 @@ EAPI int E_EVENT_BG_UPDATE = 0;
13static E_Fm2_Mime_Handler *bg_hdl = NULL; 13static E_Fm2_Mime_Handler *bg_hdl = NULL;
14 14
15typedef struct _E_Bg_Anim_Params E_Bg_Anim_Params; 15typedef struct _E_Bg_Anim_Params E_Bg_Anim_Params;
16struct _E_Bg_Anim_Params 16struct _E_Bg_Anim_Params
17{ 17{
18 E_Zone *zone; 18 E_Zone *zone;
19 double start_time; 19 double start_time;
@@ -23,46 +23,46 @@ struct _E_Bg_Anim_Params
23 int end_y; 23 int end_y;
24 24
25 struct { 25 struct {
26 Eina_Bool x, y; 26 Eina_Bool x, y;
27 } freedom; 27 } freedom;
28}; 28};
29 29
30/* externally accessible functions */ 30/* externally accessible functions */
31EAPI int 31EAPI int
32e_bg_init(void) 32e_bg_init(void)
33{ 33{
34 Eina_List *l = NULL; 34 Eina_List *l = NULL;
35 E_Config_Desktop_Background *cfbg = NULL; 35 E_Config_Desktop_Background *cfbg = NULL;
36 36
37 /* Register mime handler */ 37 /* Register mime handler */
38 bg_hdl = e_fm2_mime_handler_new(_("Set As Background"), 38 bg_hdl = e_fm2_mime_handler_new(_("Set As Background"),
39 "preferences-desktop-wallpaper", 39 "preferences-desktop-wallpaper",
40 e_bg_handler_set, NULL, 40 e_bg_handler_set, NULL,
41 e_bg_handler_test, NULL); 41 e_bg_handler_test, NULL);
42 if (bg_hdl) e_fm2_mime_handler_glob_add(bg_hdl, "*.edj"); 42 if (bg_hdl) e_fm2_mime_handler_glob_add(bg_hdl, "*.edj");
43 43
44 /* Register files in use */ 44 /* Register files in use */
45 if (e_config->desktop_default_background) 45 if (e_config->desktop_default_background)
46 e_filereg_register(e_config->desktop_default_background); 46 e_filereg_register(e_config->desktop_default_background);
47 47
48 EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg) 48 EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg)
49 { 49 {
50 if (!cfbg) continue; 50 if (!cfbg) continue;
51 e_filereg_register(cfbg->file); 51 e_filereg_register(cfbg->file);
52 } 52 }
53 53
54 E_EVENT_BG_UPDATE = ecore_event_type_new(); 54 E_EVENT_BG_UPDATE = ecore_event_type_new();
55 return 1; 55 return 1;
56} 56}
57 57
58EAPI int 58EAPI int
59e_bg_shutdown(void) 59e_bg_shutdown(void)
60{ 60{
61 Eina_List *l = NULL; 61 Eina_List *l = NULL;
62 E_Config_Desktop_Background *cfbg = NULL; 62 E_Config_Desktop_Background *cfbg = NULL;
63 63
64 /* Deregister mime handler */ 64 /* Deregister mime handler */
65 if (bg_hdl) 65 if (bg_hdl)
66 { 66 {
67 e_fm2_mime_handler_glob_del(bg_hdl, "*.edj"); 67 e_fm2_mime_handler_glob_del(bg_hdl, "*.edj");
68 e_fm2_mime_handler_free(bg_hdl); 68 e_fm2_mime_handler_free(bg_hdl);
@@ -70,7 +70,7 @@ e_bg_shutdown(void)
70 70
71 /* Deregister files in use */ 71 /* Deregister files in use */
72 if (e_config->desktop_default_background) 72 if (e_config->desktop_default_background)
73 e_filereg_deregister(e_config->desktop_default_background); 73 e_filereg_deregister(e_config->desktop_default_background);
74 74
75 EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg) 75 EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg)
76 { 76 {
@@ -120,7 +120,7 @@ e_bg_config_get(int container_num, int zone_num, int desk_x, int desk_y)
120 if (bgfile[0] != '/') 120 if (bgfile[0] != '/')
121 { 121 {
122 const char *bf; 122 const char *bf;
123 123
124 bf = e_path_find(path_backgrounds, bgfile); 124 bf = e_path_find(path_backgrounds, bgfile);
125 if (bf) bgfile = bf; 125 if (bf) bgfile = bf;
126 } 126 }
@@ -163,7 +163,7 @@ e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y)
163 if (bgfile[0] != '/') 163 if (bgfile[0] != '/')
164 { 164 {
165 const char *bf; 165 const char *bf;
166 166
167 bf = e_path_find(path_backgrounds, bgfile); 167 bf = e_path_find(path_backgrounds, bgfile);
168 if (bf) bgfile = bf; 168 if (bf) bgfile = bf;
169 } 169 }
@@ -177,7 +177,7 @@ e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y)
177 if (bgfile[0] != '/') 177 if (bgfile[0] != '/')
178 { 178 {
179 const char *bf; 179 const char *bf;
180 180
181 bf = e_path_find(path_backgrounds, bgfile); 181 bf = e_path_find(path_backgrounds, bgfile);
182 if (bf) bgfile = bf; 182 if (bf) bgfile = bf;
183 } 183 }
@@ -196,7 +196,7 @@ e_bg_file_get(int container_num, int zone_num, int desk_x, int desk_y)
196 edje_file_collection_list_free(entries); 196 edje_file_collection_list_free(entries);
197 } 197 }
198 if (!ok) 198 if (!ok)
199 bgfile = e_theme_edje_file_get("base/theme/background", 199 bgfile = e_theme_edje_file_get("base/theme/background",
200 "e/desktop/background"); 200 "e/desktop/background");
201 } 201 }
202 202
@@ -210,7 +210,7 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
210 const char *bgfile = ""; 210 const char *bgfile = "";
211 const char *trans = ""; 211 const char *trans = "";
212 E_Desk *desk; 212 E_Desk *desk;
213 213
214 if (transition == E_BG_TRANSITION_START) trans = e_config->transition_start; 214 if (transition == E_BG_TRANSITION_START) trans = e_config->transition_start;
215 else if (transition == E_BG_TRANSITION_DESK) trans = e_config->transition_desk; 215 else if (transition == E_BG_TRANSITION_DESK) trans = e_config->transition_desk;
216 else if (transition == E_BG_TRANSITION_CHANGE) trans = e_config->transition_change; 216 else if (transition == E_BG_TRANSITION_CHANGE) trans = e_config->transition_change;
@@ -226,11 +226,11 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
226 if (zone->bg_object) 226 if (zone->bg_object)
227 { 227 {
228 const char *pfile = ""; 228 const char *pfile = "";
229 229
230 edje_object_file_get(zone->bg_object, &pfile, NULL); 230 edje_object_file_get(zone->bg_object, &pfile, NULL);
231 if ((!e_util_strcmp(pfile, bgfile)) && !e_config->desk_flip_pan_bg) return; 231 if ((!e_util_strcmp(pfile, bgfile)) && !e_config->desk_flip_pan_bg) return;
232 } 232 }
233 233
234 if (transition == E_BG_TRANSITION_NONE) 234 if (transition == E_BG_TRANSITION_NONE)
235 { 235 {
236 if (zone->bg_object) 236 if (zone->bg_object)
@@ -242,7 +242,7 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
242 else 242 else
243 { 243 {
244 char buf[4096]; 244 char buf[4096];
245 245
246 if (zone->bg_object) 246 if (zone->bg_object)
247 { 247 {
248 if (zone->prev_bg_object) 248 if (zone->prev_bg_object)
@@ -302,7 +302,7 @@ e_bg_zone_update(E_Zone *zone, E_Bg_Transition transition)
302 e_bg_zone_slide(zone, x, y); 302 e_bg_zone_slide(zone, x, y);
303 return; 303 return;
304 } 304 }
305 305
306 if (transition != E_BG_TRANSITION_NONE) 306 if (transition != E_BG_TRANSITION_NONE)
307 { 307 {
308 edje_extern_object_max_size_set(zone->prev_bg_object, 65536, 65536); 308 edje_extern_object_max_size_set(zone->prev_bg_object, 65536, 65536);
@@ -328,7 +328,7 @@ e_bg_zone_slide(E_Zone *zone, int prev_x, int prev_y)
328 Evas_Coord vw, vh, px, py; 328 Evas_Coord vw, vh, px, py;
329 int fx, fy; 329 int fx, fy;
330 const void *data; 330 const void *data;
331 331
332 desk = e_desk_current_get(zone); 332 desk = e_desk_current_get(zone);
333 edje_object_size_max_get(zone->bg_object, &w, &h); 333 edje_object_size_max_get(zone->bg_object, &w, &h);
334 maxw = zone->w * zone->desk_x_count; 334 maxw = zone->w * zone->desk_x_count;
@@ -414,7 +414,7 @@ e_bg_add(int container, int zone, int desk_x, int desk_y, char *file)
414{ 414{
415 E_Config_Desktop_Background *cfbg; 415 E_Config_Desktop_Background *cfbg;
416 E_Event_Bg_Update *ev; 416 E_Event_Bg_Update *ev;
417 417
418 e_bg_del(container, zone, desk_x, desk_y); 418 e_bg_del(container, zone, desk_x, desk_y);
419 cfbg = E_NEW(E_Config_Desktop_Background, 1); 419 cfbg = E_NEW(E_Config_Desktop_Background, 1);
420 cfbg->container = container; 420 cfbg->container = container;
@@ -423,7 +423,7 @@ e_bg_add(int container, int zone, int desk_x, int desk_y, char *file)
423 cfbg->desk_y = desk_y; 423 cfbg->desk_y = desk_y;
424 cfbg->file = eina_stringshare_add(file); 424 cfbg->file = eina_stringshare_add(file);
425 e_config->desktop_backgrounds = eina_list_append(e_config->desktop_backgrounds, cfbg); 425 e_config->desktop_backgrounds = eina_list_append(e_config->desktop_backgrounds, cfbg);
426 426
427 e_filereg_register(cfbg->file); 427 e_filereg_register(cfbg->file);
428 428
429 ev = E_NEW(E_Event_Bg_Update, 1); 429 ev = E_NEW(E_Event_Bg_Update, 1);
@@ -440,8 +440,8 @@ e_bg_del(int container, int zone, int desk_x, int desk_y)
440 Eina_List *l = NULL; 440 Eina_List *l = NULL;
441 E_Config_Desktop_Background *cfbg = NULL; 441 E_Config_Desktop_Background *cfbg = NULL;
442 E_Event_Bg_Update *ev; 442 E_Event_Bg_Update *ev;
443 443
444 EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg) 444 EINA_LIST_FOREACH(e_config->desktop_backgrounds, l, cfbg)
445 { 445 {
446 if (!cfbg) continue; 446 if (!cfbg) continue;
447 if ((cfbg->container == container) && (cfbg->zone == zone) && 447 if ((cfbg->container == container) && (cfbg->zone == zone) &&
@@ -483,13 +483,13 @@ e_bg_update(void)
483 } 483 }
484} 484}
485 485
486EAPI void 486EAPI void
487e_bg_handler_set(Evas_Object *obj, const char *path, void *data) 487e_bg_handler_set(Evas_Object *obj, const char *path, void *data)
488{ 488{
489 E_Container *con; 489 E_Container *con;
490 E_Zone *zone; 490 E_Zone *zone;
491 E_Desk *desk; 491 E_Desk *desk;
492 492
493 if (!path) return; 493 if (!path) return;
494 con = e_container_current_get(e_manager_current_get()); 494 con = e_container_current_get(e_manager_current_get());
495 zone = e_zone_current_get(con); 495 zone = e_zone_current_get(con);
@@ -500,8 +500,8 @@ e_bg_handler_set(Evas_Object *obj, const char *path, void *data)
500 e_config_save_queue(); 500 e_config_save_queue();
501} 501}
502 502
503EAPI int 503EAPI int
504e_bg_handler_test(Evas_Object *obj, const char *path, void *data) 504e_bg_handler_test(Evas_Object *obj, const char *path, void *data)
505{ 505{
506 if (!path) return 0; 506 if (!path) return 0;
507 if (edje_file_group_exists(path, "e/desktop/background")) return 1; 507 if (edje_file_group_exists(path, "e/desktop/background")) return 1;
@@ -513,7 +513,7 @@ static void
513_e_bg_signal(void *data, Evas_Object *obj, const char *emission, const char *source) 513_e_bg_signal(void *data, Evas_Object *obj, const char *emission, const char *source)
514{ 514{
515 E_Zone *zone; 515 E_Zone *zone;
516 516
517 zone = data; 517 zone = data;
518 if (zone->prev_bg_object) 518 if (zone->prev_bg_object)
519 { 519 {