aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/extantz/extantz.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-20 23:34:25 +1000
committerDavid Walter Seikel2014-05-20 23:34:25 +1000
commit909fd6e2c4369020707782e20656069fbb3030d1 (patch)
tree15590f94950be42916fff1b3ba00124bce157751 /src/extantz/extantz.c
parentThe results of a session with valgrind. (diff)
downloadSledjHamr-909fd6e2c4369020707782e20656069fbb3030d1.zip
SledjHamr-909fd6e2c4369020707782e20656069fbb3030d1.tar.gz
SledjHamr-909fd6e2c4369020707782e20656069fbb3030d1.tar.bz2
SledjHamr-909fd6e2c4369020707782e20656069fbb3030d1.tar.xz
Found a way to deal with the PACKAGE_* stuff outside of Elm. It's undocumented.
Diffstat (limited to 'src/extantz/extantz.c')
-rw-r--r--src/extantz/extantz.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c
index fa38251..a27118b 100644
--- a/src/extantz/extantz.c
+++ b/src/extantz/extantz.c
@@ -2,14 +2,13 @@
2 2
3#include "extantz.h" 3#include "extantz.h"
4#include "SledjHamr.h" 4#include "SledjHamr.h"
5#include "LumbrJack.h"
6 5
7 6
8static void _onWorldClick(void *data, Evas *e EINA_UNUSED, Evas_Object *o, void *einfo); 7static void _onWorldClick(void *data, Evas *e EINA_UNUSED, Evas_Object *o, void *einfo);
9static void on_pixels(void *data, Evas_Object *obj); 8static void on_pixels(void *data, Evas_Object *obj);
10 9
11 10
12static int logDom; // Our logging domain. 11int logDom = -1; // Our logging domain.
13globals ourGlobals; 12globals ourGlobals;
14static Eina_Strbuf *serverStream; 13static Eina_Strbuf *serverStream;
15 14
@@ -120,7 +119,7 @@ static Eina_Bool _del(void *data, int type, Ecore_Con_Event_Server_Del *ev)
120 PW("Failed to connect to a world server, starting our own."); 119 PW("Failed to connect to a world server, starting our own.");
121 120
122 // TODO - Should use Ecore_Exe for this sort of thing. 121 // TODO - Should use Ecore_Exe for this sort of thing.
123 sprintf(buf, "%s/love &", elm_app_bin_dir_get()); 122 sprintf(buf, "%s/love &", prefix_bin_get());
124 system(buf); 123 system(buf);
125 count = 0; 124 count = 0;
126 } 125 }
@@ -555,6 +554,8 @@ EAPI_MAIN int elm_main(int argc, char **argv)
555 char buf[PATH_MAX * 2]; 554 char buf[PATH_MAX * 2];
556// Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't. 555// Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't.
557 556
557 logDom = HamrTime(argv[0], elm_main, logDom);
558
558 /* Set the locale according to the system pref. 559 /* Set the locale according to the system pref.
559 * If you don't do so the file selector will order the files list in 560 * If you don't do so the file selector will order the files list in
560 * a case sensitive manner 561 * a case sensitive manner
@@ -564,13 +565,6 @@ EAPI_MAIN int elm_main(int argc, char **argv)
564 elm_need_ethumb(); 565 elm_need_ethumb();
565 elm_need_efreet(); 566 elm_need_efreet();
566 567
567 HamrTime(elm_main, "extantz");
568 fprintf(stdout, "prefix was set to: %s\n", elm_app_prefix_dir_get());
569 fprintf(stdout, "data directory is: %s\n", elm_app_data_dir_get());
570 fprintf(stdout, "library directory is: %s\n", elm_app_lib_dir_get());
571 fprintf(stdout, "locale directory is: %s\n", elm_app_locale_dir_get());
572
573 logDom = loggingStartup("extantz", logDom);
574 ourGlobals.running = 1; 568 ourGlobals.running = 1;
575 569
576 570
@@ -643,7 +637,7 @@ EAPI_MAIN int elm_main(int argc, char **argv)
643 637
644 // Override the background image 638 // Override the background image
645#if 1 639#if 1
646 snprintf(buf, sizeof(buf), "%s/sky_03.jpg", elm_app_data_dir_get()); 640 snprintf(buf, sizeof(buf), "%s/sky_03.jpg", prefix_data_get());
647 ourGlobals.mainWindow->bg = eo_add(ELM_OBJ_IMAGE_CLASS, ourGlobals.mainWindow->win, 641 ourGlobals.mainWindow->bg = eo_add(ELM_OBJ_IMAGE_CLASS, ourGlobals.mainWindow->win,
648 evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), 642 evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
649 elm_obj_image_fill_outside_set(EINA_TRUE), 643 elm_obj_image_fill_outside_set(EINA_TRUE),
@@ -652,7 +646,7 @@ EAPI_MAIN int elm_main(int argc, char **argv)
652 ); 646 );
653 elm_win_resize_object_add(ourGlobals.mainWindow->win, ourGlobals.mainWindow->bg); 647 elm_win_resize_object_add(ourGlobals.mainWindow->win, ourGlobals.mainWindow->bg);
654#else 648#else
655 snprintf(buf, sizeof(buf), "%s/sky_03.jpg", elm_app_data_dir_get()); 649 snprintf(buf, sizeof(buf), "%s/sky_03.jpg", prefix_data_get());
656 eo_do(ourGlobals.mainWindow->bg, 650 eo_do(ourGlobals.mainWindow->bg,
657 elm_obj_image_file_set(buf, NULL), 651 elm_obj_image_file_set(buf, NULL),
658 evas_obj_color_set(255, 255, 255, 255) 652 evas_obj_color_set(255, 255, 255, 255)
@@ -673,7 +667,7 @@ EAPI_MAIN int elm_main(int argc, char **argv)
673 woMan_add(&ourGlobals); 667 woMan_add(&ourGlobals);
674 ourGlobals.purkle = GuiLuaLoad("purkle", ourGlobals.mainWindow, ourGlobals.world); 668 ourGlobals.purkle = GuiLuaLoad("purkle", ourGlobals.mainWindow, ourGlobals.world);
675 ourGlobals.LSLGuiMess = GuiLuaLoad("LSLGuiMess", ourGlobals.mainWindow, ourGlobals.world); 669 ourGlobals.LSLGuiMess = GuiLuaLoad("LSLGuiMess", ourGlobals.mainWindow, ourGlobals.world);
676 ourGlobals.files = filesAdd(&ourGlobals, (char *) elm_app_data_dir_get(), EINA_TRUE, EINA_FALSE); 670 ourGlobals.files = filesAdd(&ourGlobals, (char *) prefix_data_get(), EINA_TRUE, EINA_FALSE);
677 671
678 // Try to connect to the love server we started before. 672 // Try to connect to the love server we started before.
679 serverStream = eina_strbuf_new(); 673 serverStream = eina_strbuf_new();
@@ -701,11 +695,8 @@ EAPI_MAIN int elm_main(int argc, char **argv)
701 winFangDel(ourGlobals.mainWindow); 695 winFangDel(ourGlobals.mainWindow);
702 } 696 }
703 697
704 if (logDom >= 0) 698 pantsOff(logDom);
705 { 699 logDom = -1;
706 eina_log_domain_unregister(logDom);
707 logDom = -1;
708 }
709 700
710 elm_shutdown(); 701 elm_shutdown();
711 702