int i, pos;
elm_list_clear(ad->txtlist);
- for (i = 0; i < HISTORY_QUEUE_NUMBER; i++)
+ for (i = 0; i < HISTORY_QUEUE_MAX_TXT_ITEMS; i++)
{
pos = get_current_history_position()+i;
- if (pos > HISTORY_QUEUE_NUMBER-1)
- pos = pos-HISTORY_QUEUE_NUMBER;
+ if (pos > HISTORY_QUEUE_MAX_TXT_ITEMS-1)
+ pos = pos-HISTORY_QUEUE_MAX_TXT_ITEMS;
if (get_item_contents_by_pos(pos) != NULL && strlen(get_item_contents_by_pos(pos)) > 0)
{
elm_list_item_append(ad->txtlist, get_item_contents_by_pos(pos), NULL, NULL, NULL, ad);
igl = elm_gengrid_items_get(ad->imggrid);
igl_counter = eina_list_count(igl);
- if (igl_counter >= 10)
+ if (igl_counter >= HISTORY_QUEUE_MAX_IMG_ITEMS)
{
elm_gengrid_item_del(eina_list_nth(igl, 0));
}
int increment_current_history_position()
{
int pos = g_history_pos+1;
- if (pos >= HISTORY_QUEUE_NUMBER)
+ if (pos >= HISTORY_QUEUE_MAX_TXT_ITEMS)
pos = 0;
g_history_pos = pos;
return pos;
{
int pos = g_history_pos-1;
if (pos < 0)
- pos = HISTORY_QUEUE_NUMBER;
+ pos = HISTORY_QUEUE_MAX_TXT_ITEMS;
return pos;
}
if (g_lastest_content == NULL)
g_lastest_content = malloc(sizeof(char)*(4*1024));
- if (g_history_pos >= HISTORY_QUEUE_NUMBER)
+ if (g_history_pos >= HISTORY_QUEUE_MAX_TXT_ITEMS)
g_history_pos = 0;
// FIXME: remove g_lasteset_content
{
int pos;
int i = 0;
- for (i = 0; i < HISTORY_QUEUE_NUMBER; i++)
+ for (i = 0; i < HISTORY_QUEUE_MAX_TXT_ITEMS; i++)
{
pos = get_current_history_position()+i;
- if (pos > HISTORY_QUEUE_NUMBER-1)
- pos = pos-HISTORY_QUEUE_NUMBER;
+ if (pos > HISTORY_QUEUE_MAX_TXT_ITEMS-1)
+ pos = pos-HISTORY_QUEUE_MAX_TXT_ITEMS;
DTRACE("%d: %s\n", i, get_item_contents_by_pos(pos) != NULL ? get_item_contents_by_pos(pos) : "NULL");
}
}
Atom atomCBHM_MSG = XInternAtom(g_disp, "CBHM_MSG", False);
Atom atomCBHM_cRAW = XInternAtom(g_disp, "CBHM_cRAW", False);
char atomname[10];
- Atom cbhm_atoms[HISTORY_QUEUE_NUMBER];
+ Atom cbhm_atoms[HISTORY_QUEUE_MAX_TXT_ITEMS];
Ecore_X_Window reqwin = ev->win;
int i, pos;
int num = ev->data.b[5] - '0';
int cur = get_current_history_position();
num = cur + num - 1;
- if (num > HISTORY_QUEUE_NUMBER-1)
- num = num-HISTORY_QUEUE_NUMBER;
+ if (num > HISTORY_QUEUE_MAX_TXT_ITEMS-1)
+ num = num-HISTORY_QUEUE_MAX_TXT_ITEMS;
- if (num >= 0 && num < HISTORY_QUEUE_NUMBER)
+ if (num >= 0 && num < HISTORY_QUEUE_MAX_TXT_ITEMS)
{
DTRACE("## pos : #%d\n", num);
// FIXME : handle with correct atom
}
pos--;
if (pos < 0)
- pos = HISTORY_QUEUE_NUMBER-1;
+ pos = HISTORY_QUEUE_MAX_TXT_ITEMS-1;
}
}
else if (strcmp("get raw", ev->data.b) == 0)