autocomp: fix the resoucre directory path

auto_comp data is the library resource rather than application.
use the eina prefix rather then app data path.
This commit is contained in:
ChunEon Park 2015-06-09 15:40:30 +09:00
parent 2ceb0a2b3c
commit 2d9f86a30d
4 changed files with 10 additions and 6 deletions

View File

@ -1,2 +1,3 @@
extern const char *DEFAULT_EDC_FORMAT;
extern char EDJE_PATH[PATH_MAX];
extern Eina_Prefix *PREFIX;

View File

@ -61,7 +61,9 @@ static void
autocomp_load(autocomp_data *ad)
{
char buf[PATH_MAX];
snprintf(buf, sizeof(buf), "%s/autocomp/autocomp.eet", elm_app_data_dir_get());
snprintf(buf, sizeof(buf), "%s/autocomp/autocomp.eet",
eina_prefix_data_get(PREFIX));
if (ad->source_file)
{
if (lex_desc)

View File

@ -7,6 +7,7 @@
#include "enventor_private.h"
char EDJE_PATH[PATH_MAX];
Eina_Prefix *PREFIX = NULL;
const char SIG_CURSOR_LINE_CHANGED[] = "cursor,line,changed";
const char SIG_CURSOR_GROUP_CHANGED[]= "cursor,group,changed";
const char SIG_LIVE_VIEW_LOADED[] = "live_view,loaded";
@ -23,7 +24,6 @@ const char SIG_FOCUSED[] = "focused";
static int _enventor_init_count = 0;
static int _enventor_log_dom = -1;
static Ecore_Event_Handler *_key_down_handler = NULL;
static Eina_Prefix *pfx = NULL;
static Eina_Bool
key_down_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *ev)
@ -95,12 +95,12 @@ enventor_init(int argc, char **argv)
_enventor_log_dom = EINA_LOG_DOMAIN_GLOBAL;
}
pfx = eina_prefix_new(NULL, enventor_init, "ENVENTOR", "enventor", NULL,
PREFIX = eina_prefix_new(NULL, enventor_init, "ENVENTOR", "enventor", NULL,
PACKAGE_BIN_DIR, PACKAGE_LIB_DIR,
PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
snprintf(EDJE_PATH, sizeof(EDJE_PATH), "%s/themes/enventor.edj",
eina_prefix_data_get(pfx));
eina_prefix_data_get(PREFIX));
srand(time(NULL));
_key_down_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
@ -128,7 +128,7 @@ enventor_shutdown(void)
eina_log_domain_unregister(_enventor_log_dom);
_enventor_log_dom = -1;
}
eina_prefix_free(pfx);
eina_prefix_free(PREFIX);
elm_shutdown();
eio_shutdown();

View File

@ -1,6 +1,8 @@
#ifndef __ENVENTOR_PRIVATE_H__
#define __ENVENTOR_PRIVATE_H__
#include "common.h"
#define QUOT """
#define QUOT_LEN 6
#define QUOT_UTF8 "\""
@ -17,7 +19,6 @@
#define VIEW_DATA edj_mgr_view_get(NULL)
#define ATTR_VALUE_MAX_CNT 4
extern char EDJE_PATH[PATH_MAX];
extern const char SIG_CURSOR_LINE_CHANGED[];
extern const char SIG_CURSOR_GROUP_CHANGED[];
extern const char SIG_MAX_LINE_CHANGED[];