Merge branch 'multi'
This commit is contained in:
commit
e21be6619b
|
@ -1,6 +1,7 @@
|
||||||
#include "private.h"
|
#include "private.h"
|
||||||
|
|
||||||
#include <Ecore.h>
|
#include <Ecore.h>
|
||||||
|
#include <Ecore_Con.h>
|
||||||
#include <Ecore_Ipc.h>
|
#include <Ecore_Ipc.h>
|
||||||
#include <Eet.h>
|
#include <Eet.h>
|
||||||
#include "ipc.h"
|
#include "ipc.h"
|
||||||
|
@ -92,6 +93,8 @@ ipc_init(void)
|
||||||
"background", background, EET_T_STRING);
|
"background", background, EET_T_STRING);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
|
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
|
||||||
"name", name, EET_T_STRING);
|
"name", name, EET_T_STRING);
|
||||||
|
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
|
||||||
|
"theme", theme, EET_T_STRING);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
|
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
|
||||||
"role", role, EET_T_STRING);
|
"role", role, EET_T_STRING);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
|
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
|
||||||
|
@ -128,6 +131,16 @@ ipc_init(void)
|
||||||
"hold", hold, EET_T_INT);
|
"hold", hold, EET_T_INT);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
|
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
|
||||||
"nowm", nowm, EET_T_INT);
|
"nowm", nowm, EET_T_INT);
|
||||||
|
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
|
||||||
|
"xterm_256color", xterm_256color, EET_T_INT);
|
||||||
|
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
|
||||||
|
"active_links", active_links, EET_T_INT);
|
||||||
|
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
|
||||||
|
"video_mute", active_links, EET_T_INT);
|
||||||
|
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
|
||||||
|
"cursor_blink", active_links, EET_T_INT);
|
||||||
|
EET_DATA_DESCRIPTOR_ADD_BASIC(new_inst_edd, Ipc_Instance,
|
||||||
|
"visual_bell", active_links, EET_T_INT);
|
||||||
}
|
}
|
||||||
|
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
|
@ -171,6 +184,19 @@ ipc_instance_new_func_set(void (*func) (Ipc_Instance *inst))
|
||||||
func_new_inst = func;
|
func_new_inst = func;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ipc_instance_conn_free(void)
|
||||||
|
{
|
||||||
|
char *hash = _ipc_hash_get();
|
||||||
|
char *address = ecore_con_local_path_new(EINA_FALSE,
|
||||||
|
hash,
|
||||||
|
0);
|
||||||
|
errno = 0;
|
||||||
|
unlink(address);
|
||||||
|
ERR("unlinking: '%s': %s", address, strerror(errno));
|
||||||
|
free(address);
|
||||||
|
}
|
||||||
|
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
ipc_instance_add(Ipc_Instance *inst)
|
ipc_instance_add(Ipc_Instance *inst)
|
||||||
{
|
{
|
||||||
|
@ -178,7 +204,7 @@ ipc_instance_add(Ipc_Instance *inst)
|
||||||
void *data;
|
void *data;
|
||||||
char *hash = _ipc_hash_get();
|
char *hash = _ipc_hash_get();
|
||||||
Ecore_Ipc_Server *ipcsrv;
|
Ecore_Ipc_Server *ipcsrv;
|
||||||
|
|
||||||
if (!hash) return EINA_FALSE;
|
if (!hash) return EINA_FALSE;
|
||||||
data = eet_data_descriptor_encode(new_inst_edd, inst, &size);
|
data = eet_data_descriptor_encode(new_inst_edd, inst, &size);
|
||||||
if (!data)
|
if (!data)
|
||||||
|
@ -186,6 +212,7 @@ ipc_instance_add(Ipc_Instance *inst)
|
||||||
free(hash);
|
free(hash);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ipcsrv = ecore_ipc_server_connect(ECORE_IPC_LOCAL_USER, hash, 0, NULL);
|
ipcsrv = ecore_ipc_server_connect(ECORE_IPC_LOCAL_USER, hash, 0, NULL);
|
||||||
if (ipcsrv)
|
if (ipcsrv)
|
||||||
{
|
{
|
||||||
|
@ -196,6 +223,10 @@ ipc_instance_add(Ipc_Instance *inst)
|
||||||
ecore_ipc_server_del(ipcsrv);
|
ecore_ipc_server_del(ipcsrv);
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DBG("connect failed");
|
||||||
|
}
|
||||||
free(data);
|
free(data);
|
||||||
free(hash);
|
free(hash);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
|
|
@ -7,28 +7,33 @@ typedef struct _Ipc_Instance Ipc_Instance;
|
||||||
|
|
||||||
struct _Ipc_Instance
|
struct _Ipc_Instance
|
||||||
{
|
{
|
||||||
const char *cmd;
|
char *cmd;
|
||||||
const char *cd;
|
char *cd;
|
||||||
const char *background;
|
char *background;
|
||||||
const char *name;
|
char *name;
|
||||||
const char *role;
|
char *theme;
|
||||||
const char *title;
|
char *role;
|
||||||
const char *icon_name;
|
char *title;
|
||||||
const char *font;
|
char *icon_name;
|
||||||
const char *startup_id;
|
char *font;
|
||||||
const char *startup_split;
|
char *startup_id;
|
||||||
|
char *startup_split;
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
int pos;
|
Eina_Bool pos;
|
||||||
int login_shell;
|
Eina_Bool login_shell;
|
||||||
int fullscreen;
|
Eina_Bool fullscreen;
|
||||||
int iconic;
|
Eina_Bool iconic;
|
||||||
int borderless;
|
Eina_Bool borderless;
|
||||||
int override;
|
Eina_Bool override;
|
||||||
int maximized;
|
Eina_Bool maximized;
|
||||||
int hold;
|
Eina_Bool hold;
|
||||||
int nowm;
|
Eina_Bool nowm;
|
||||||
int xterm_256color;
|
Eina_Bool xterm_256color;
|
||||||
int active_links;
|
Eina_Bool video_mute;
|
||||||
|
Eina_Bool active_links;
|
||||||
|
Eina_Bool cursor_blink;
|
||||||
|
Eina_Bool visual_bell;
|
||||||
|
Config *config;
|
||||||
};
|
};
|
||||||
|
|
||||||
void ipc_init(void);
|
void ipc_init(void);
|
||||||
|
@ -36,5 +41,6 @@ void ipc_shutdown(void);
|
||||||
Eina_Bool ipc_serve(void);
|
Eina_Bool ipc_serve(void);
|
||||||
void ipc_instance_new_func_set(void (*func) (Ipc_Instance *inst));
|
void ipc_instance_new_func_set(void (*func) (Ipc_Instance *inst));
|
||||||
Eina_Bool ipc_instance_add(Ipc_Instance *inst);
|
Eina_Bool ipc_instance_add(Ipc_Instance *inst);
|
||||||
|
void ipc_instance_conn_free(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
870
src/bin/main.c
870
src/bin/main.c
File diff suppressed because it is too large
Load Diff
|
@ -1248,7 +1248,6 @@ media_add(Evas_Object *parent, const char *src, const Config *config, int mode,
|
||||||
if (!_smart) _smart_init();
|
if (!_smart) _smart_init();
|
||||||
obj = evas_object_smart_add(e, _smart);
|
obj = evas_object_smart_add(e, _smart);
|
||||||
sd = evas_object_smart_data_get(obj);
|
sd = evas_object_smart_data_get(obj);
|
||||||
if (!sd) return obj;
|
|
||||||
|
|
||||||
sd->src = eina_stringshare_add(src);
|
sd->src = eina_stringshare_add(src);
|
||||||
sd->config = config;
|
sd->config = config;
|
||||||
|
|
|
@ -3324,6 +3324,7 @@ _tabs_close(Term_Container *tc, Term_Container *child)
|
||||||
|
|
||||||
l = _tab_item_find(tabs, child);
|
l = _tab_item_find(tabs, child);
|
||||||
item = l->data;
|
item = l->data;
|
||||||
|
tabs->tabs = eina_list_remove_list(tabs->tabs, l);
|
||||||
|
|
||||||
next = eina_list_next(l);
|
next = eina_list_next(l);
|
||||||
if (!next)
|
if (!next)
|
||||||
|
@ -3331,7 +3332,6 @@ _tabs_close(Term_Container *tc, Term_Container *child)
|
||||||
next_item = next->data;
|
next_item = next->data;
|
||||||
next_child = next_item->tc;
|
next_child = next_item->tc;
|
||||||
assert (next_child->type == TERM_CONTAINER_TYPE_SOLO);
|
assert (next_child->type == TERM_CONTAINER_TYPE_SOLO);
|
||||||
tabs->tabs = eina_list_remove_list(tabs->tabs, l);
|
|
||||||
|
|
||||||
assert (child->type == TERM_CONTAINER_TYPE_SOLO);
|
assert (child->type == TERM_CONTAINER_TYPE_SOLO);
|
||||||
solo = (Solo*)child;
|
solo = (Solo*)child;
|
||||||
|
@ -6060,11 +6060,11 @@ win_font_update(Term *term)
|
||||||
void
|
void
|
||||||
windows_free(void)
|
windows_free(void)
|
||||||
{
|
{
|
||||||
|
Eina_List *l, *l_next;
|
||||||
Win *wn;
|
Win *wn;
|
||||||
|
|
||||||
while (wins)
|
EINA_LIST_FOREACH_SAFE(wins, l, l_next, wn)
|
||||||
{
|
{
|
||||||
wn = eina_list_data_get(wins);
|
|
||||||
win_free(wn);
|
win_free(wn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue