aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJihoon Kim <jihoon48.kim@samsung.com>2016-02-04 08:44:14 +0900
committerJihoon Kim <jihoon48.kim@samsung.com>2016-02-04 08:44:49 +0900
commit478433f0cf2da46f49103c141aa324d269d608df (patch)
treedb0e529788dfce34417c711640125901fb58e0b6
parentedje: fix edje_file_data_get() when no collections are present (diff)
downloadefl-478433f0cf2da46f49103c141aa324d269d608df.tar.gz
ecore_imf/ibus: fix indentation
-rw-r--r--src/modules/ecore_imf/ibus/ibus_imcontext.c92
-rw-r--r--src/modules/ecore_imf/ibus/ibus_module.c42
2 files changed, 67 insertions, 67 deletions
diff --git a/src/modules/ecore_imf/ibus/ibus_imcontext.c b/src/modules/ecore_imf/ibus/ibus_imcontext.c
index 0203b3e305..4bfe62721f 100644
--- a/src/modules/ecore_imf/ibus/ibus_imcontext.c
+++ b/src/modules/ecore_imf/ibus/ibus_imcontext.c
@@ -80,16 +80,16 @@ utf8_offset_to_index(const char *str, int offset)
static int
sort_cb(const void *d1, const void *d2)
{
- const Ecore_IMF_Preedit_Attr *attr1 = d1;
- const Ecore_IMF_Preedit_Attr *attr2 = d2;
+ const Ecore_IMF_Preedit_Attr *attr1 = d1;
+ const Ecore_IMF_Preedit_Attr *attr2 = d2;
- if (!attr1) return 1;
- if (!attr2) return -1;
+ if (!attr1) return 1;
+ if (!attr2) return -1;
- if (attr1->start_index < attr2->start_index)
- return -1;
- else
- return 1;
+ if (attr1->start_index < attr2->start_index)
+ return -1;
+ else
+ return 1;
}
static void
@@ -233,44 +233,44 @@ _request_surrounding_text(IBusIMContext *ibusimcontext)
EINA_SAFETY_ON_NULL_RETURN(ibusimcontext->ibuscontext);
EINA_SAFETY_ON_NULL_RETURN(ibusimcontext->ctx);
- if ((ibusimcontext->caps & IBUS_CAP_SURROUNDING_TEXT) != 0 &&
- ibus_input_context_needs_surrounding_text(ibusimcontext->ibuscontext))
- {
- char *surrounding = NULL;
- int cursor_pos;
- IBusText *ibustext;
-
- EINA_LOG_DBG ("requesting surrounding text...\n");
-
- if (ecore_imf_context_surrounding_get(ibusimcontext->ctx,
- &surrounding,
- &cursor_pos))
- {
- if (!surrounding)
- return;
-
- if (cursor_pos < 0)
- {
- free(surrounding);
- return;
- }
-
- ibustext = ibus_text_new_from_string(surrounding);
-
- ibus_input_context_set_surrounding_text(ibusimcontext->ibuscontext,
- ibustext,
- cursor_pos,
- cursor_pos);
-
- free(surrounding);
- }
- else
- {
- ibusimcontext->caps &= ~IBUS_CAP_SURROUNDING_TEXT;
- ibus_input_context_set_capabilities(ibusimcontext->ibuscontext,
- ibusimcontext->caps);
- }
- }
+ if ((ibusimcontext->caps & IBUS_CAP_SURROUNDING_TEXT) != 0 &&
+ ibus_input_context_needs_surrounding_text(ibusimcontext->ibuscontext))
+ {
+ char *surrounding = NULL;
+ int cursor_pos;
+ IBusText *ibustext;
+
+ EINA_LOG_DBG ("requesting surrounding text...\n");
+
+ if (ecore_imf_context_surrounding_get(ibusimcontext->ctx,
+ &surrounding,
+ &cursor_pos))
+ {
+ if (!surrounding)
+ return;
+
+ if (cursor_pos < 0)
+ {
+ free(surrounding);
+ return;
+ }
+
+ ibustext = ibus_text_new_from_string(surrounding);
+
+ ibus_input_context_set_surrounding_text(ibusimcontext->ibuscontext,
+ ibustext,
+ cursor_pos,
+ cursor_pos);
+
+ free(surrounding);
+ }
+ else
+ {
+ ibusimcontext->caps &= ~IBUS_CAP_SURROUNDING_TEXT;
+ ibus_input_context_set_capabilities(ibusimcontext->ibuscontext,
+ ibusimcontext->caps);
+ }
+ }
}
IBusIMContext *
diff --git a/src/modules/ecore_imf/ibus/ibus_module.c b/src/modules/ecore_imf/ibus/ibus_module.c
index ba44fdbd15..63240f1908 100644
--- a/src/modules/ecore_imf/ibus/ibus_module.c
+++ b/src/modules/ecore_imf/ibus/ibus_module.c
@@ -59,8 +59,8 @@ static Ecore_IMF_Context_Class ibus_imf_class = {
NULL
};
-static Ecore_IMF_Context *im_module_create (void);
-static Ecore_IMF_Context *im_module_exit (void);
+static Ecore_IMF_Context *im_module_create(void);
+static Ecore_IMF_Context *im_module_exit(void);
static Eina_Bool
im_module_init(void)
@@ -73,10 +73,10 @@ im_module_init(void)
if (strcmp(s, "x11")) return EINA_FALSE;
}
ecore_main_loop_glib_integrate();
- ibus_init();
- ecore_imf_module_register(&ibus_im_info, im_module_create, im_module_exit);
+ ibus_init();
+ ecore_imf_module_register(&ibus_im_info, im_module_create, im_module_exit);
- return EINA_TRUE;
+ return EINA_TRUE;
}
static void im_module_shutdown(void)
@@ -86,31 +86,31 @@ static void im_module_shutdown(void)
static Ecore_IMF_Context *
im_module_exit(void)
{
- return NULL;
+ return NULL;
}
static Ecore_IMF_Context *
im_module_create(void)
{
- Ecore_IMF_Context *ctx = NULL;
- IBusIMContext *ctxd = NULL;
+ Ecore_IMF_Context *ctx = NULL;
+ IBusIMContext *ctxd = NULL;
- ctxd = ecore_imf_context_ibus_new();
- if (!ctxd)
- {
- return NULL;
- }
+ ctxd = ecore_imf_context_ibus_new();
+ if (!ctxd)
+ {
+ return NULL;
+ }
- ctx = ecore_imf_context_new(&ibus_imf_class);
- if (!ctx)
- {
- free(ctxd);
- return NULL;
- }
+ ctx = ecore_imf_context_new(&ibus_imf_class);
+ if (!ctx)
+ {
+ free(ctxd);
+ return NULL;
+ }
- ecore_imf_context_data_set(ctx, ctxd);
+ ecore_imf_context_data_set(ctx, ctxd);
- return ctx;
+ return ctx;
}
EINA_MODULE_INIT(im_module_init);