e_client_name_get() -> e_client_util_name_get()

this should be inlined
devs/discomfitor/eo
Mike Blumenkrantz 9 years ago
parent eba912cf6a
commit 8d71213839
  1. 16
      src/bin/e_client.c
  2. 1
      src/bin/e_client.h
  3. 11
      src/bin/e_client.x
  4. 4
      src/bin/e_comp_x.c
  5. 4
      src/bin/e_deskmirror.c
  6. 2
      src/bin/e_desktop_editor.c
  7. 4
      src/bin/e_int_client_remember.c
  8. 8
      src/bin/e_int_menus.c
  9. 2
      src/bin/e_remember.c
  10. 2
      src/modules/everything/evry_plug_windows.c
  11. 2
      src/modules/ibar/e_mod_main.c
  12. 2
      src/modules/ibox/e_mod_main.c
  13. 8
      src/modules/illume2/e_illume.c
  14. 2
      src/modules/illume2/e_mod_select_window.c
  15. 6
      src/modules/illume2/policies/tablet/policy.c
  16. 2
      src/modules/notification/e_mod_popup.c
  17. 2
      src/modules/tasks/e_mod_main.c
  18. 4
      src/modules/winlist/e_winlist.c

@ -2065,9 +2065,9 @@ e_client_idler_before(void)
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_FETCH, ec)) continue;
/* FETCH is hooked by the compositor to get client hints */
title = e_client_name_get(ec);
title = e_client_util_name_get(ec);
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_FETCH, ec)) continue;
if (title != e_client_name_get(ec))
if (title != e_client_util_name_get(ec))
_e_client_event_property(ec, E_CLIENT_PROPERTY_TITLE);
/* PRE_POST_FETCH calls e_remember apply for new client */
if (!_e_client_hook_call(E_CLIENT_HOOK_EVAL_PRE_POST_FETCH, ec)) continue;
@ -4457,18 +4457,6 @@ e_client_redirected_set(E_Client *ec, Eina_Bool set)
////////////////////////////////////////////
EAPI Eina_Stringshare *
e_client_name_get(const E_Client *ec)
{
E_OBJECT_CHECK_RETURN(ec, NULL);
E_OBJECT_TYPE_CHECK_RETURN(ec, E_CLIENT_TYPE, NULL);
if (ec->netwm.name)
return ec->netwm.name;
else if (ec->icccm.title)
return ec->icccm.title;
return NULL;
}
EAPI Eina_Bool
e_client_util_is_stacking(const E_Client *ec)
{

@ -798,7 +798,6 @@ EAPI E_Client *e_client_under_pointer_get(E_Desk *desk, E_Client *exclude);
EAPI int e_client_pointer_warp_to_center_now(E_Client *ec);
EAPI int e_client_pointer_warp_to_center(E_Client *ec);
EAPI void e_client_redirected_set(E_Client *ec, Eina_Bool set);
EAPI Eina_Stringshare *e_client_name_get(const E_Client *ec);
EAPI Eina_Bool e_client_util_is_stacking(const E_Client *ec);
#include "e_client.x"
#endif

@ -121,3 +121,14 @@ e_client_util_shadow_state_get(const E_Client *ec)
on = !ec->fullscreen;
return on;
}
static inline Eina_Stringshare *
e_client_util_name_get(const E_Client *ec)
{
if (!ec) return NULL;
if (ec->netwm.name)
return ec->netwm.name;
else if (ec->icccm.title)
return ec->icccm.title;
return NULL;
}

@ -679,7 +679,7 @@ _e_comp_x_client_pri_raise(E_Client *ec)
// EINA_TRUE, EINA_TRUE);
EINA_TRUE, EINA_FALSE);
// printf("WIN: pid %i, title %s (HI!!!!!!!!!!!!!!!!!!)\n",
// ec->netwm.pid, e_client_name_get(ec));
// ec->netwm.pid, e_client_util_name_get(ec));
}
static void
@ -692,7 +692,7 @@ _e_comp_x_client_pri_norm(E_Client *ec)
// EINA_TRUE, EINA_TRUE);
EINA_TRUE, EINA_FALSE);
// printf("WIN: pid %i, title %s (NORMAL)\n",
// ec->netwm.pid, e_client_name_get(ec));
// ec->netwm.pid, e_client_util_name_get(ec));
}
static void

@ -464,7 +464,7 @@ _mirror_client_new(Mirror *m)
evas_object_smart_member_add(mb->frame, o);
evas_object_name_set(mb->mirror, "mirror");
edje_object_part_swallow(mb->frame, "e.swallow.client", m->mirror);
edje_object_part_text_set(mb->frame, "e.text.title", e_client_name_get(m->ec));
edje_object_part_text_set(mb->frame, "e.text.title", e_client_util_name_get(m->ec));
return o;
}
@ -782,7 +782,7 @@ e_deskmirror_mirror_copy(Evas_Object *obj)
oo = e_comp_object_util_mirror_add(mb->m->comp_object);
edje_object_part_swallow(o, "e.swallow.client", oo);
edje_object_part_text_set(o, "e.text.title", e_client_name_get(mb->m->ec));
edje_object_part_text_set(o, "e.text.title", e_client_util_name_get(mb->m->ec));
e_comp_object_util_del_list_append(o, oo);
return o;
}

@ -107,7 +107,7 @@ e_desktop_client_create(E_Client *ec)
if ((bname) && (bname[0] == 0)) bname = NULL;
bclass = ec->icccm.class;
if ((bclass) && (bclass[0] == 0)) bclass = NULL;
btitle = e_client_name_get(ec);
btitle = e_client_util_name_get(ec);
desktop_dir = e_user_desktop_dir_get();

@ -174,7 +174,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata->role = strdup(ec->icccm.window_role);
if (!cfdata->title)
{
const char *title = e_client_name_get(ec);
const char *title = e_client_util_name_get(ec);
if (title && title[0])
cfdata->title = strdup(title);
}
@ -368,7 +368,7 @@ _check_matches(E_Remember *rem, int update)
EINA_LIST_FOREACH(c->clients, ll, ec)
{
int match = rem->match;
title = e_client_name_get(ec);
title = e_client_util_name_get(ec);
if ((match & E_REMEMBER_MATCH_NAME) &&
(e_util_glob_match(ec->icccm.name, rem->name)))

@ -1203,8 +1203,8 @@ _e_int_menus_clients_sort_alpha_cb(const void *d1, const void *d2)
ec1 = d1;
ec2 = d2;
name1 = e_client_name_get(ec1);
name2 = e_client_name_get(ec2);
name1 = e_client_util_name_get(ec1);
name2 = e_client_util_name_get(ec2);
if (strcasecmp(name1, name2) > 0) return 1;
if (strcasecmp(name1, name2) < 0) return -1;
@ -1526,7 +1526,7 @@ _e_int_menus_clients_item_create(E_Client *ec, E_Menu *m)
E_Menu_Item *mi;
const char *title;
title = _e_int_menus_clients_title_abbrv(e_client_name_get(ec));
title = _e_int_menus_clients_title_abbrv(e_client_util_name_get(ec));
mi = e_menu_item_new(m);
e_menu_item_check_set(mi, 1);
if ((title) && (title[0]))
@ -1625,7 +1625,7 @@ _e_int_menus_lost_clients_pre_cb(void *data __UNUSED__, E_Menu *m)
{
const char *title = "";
title = e_client_name_get(ec);
title = e_client_util_name_get(ec);
mi = e_menu_item_new(m);
if ((title) && (title[0]))
e_menu_item_label_set(mi, title);

@ -347,7 +347,7 @@ e_remember_default_match_set(E_Remember *rem, E_Client *ec)
rem->name = eina_stringshare_ref(name);
rem->class = eina_stringshare_ref(clasz);
}
else if ((title = e_client_name_get(ec)) && title[0])
else if ((title = e_client_util_name_get(ec)) && title[0])
{
match |= E_REMEMBER_MATCH_TITLE;
rem->title = eina_stringshare_ref(title);

@ -58,7 +58,7 @@ _client_item_add(Plugin *p, E_Client *ec)
if (e_client_util_ignored_get(ec))
return 0;
bi = EVRY_ITEM_NEW(Client_Item, p, e_client_name_get(ec),
bi = EVRY_ITEM_NEW(Client_Item, p, e_client_util_name_get(ec),
_icon_get, _client_item_free);
snprintf(buf, sizeof(buf), "%d:%d %s",

@ -1212,7 +1212,7 @@ _ibar_icon_menu_client_add(IBar_Icon *ic, E_Client *ec)
img = e_comp_object_util_mirror_add(ec->frame);
evas_object_event_callback_add(img, EVAS_CALLBACK_DEL,
_ibar_cb_icon_menu_img_del, it);
txt = e_client_name_get(ec);
txt = e_client_util_name_get(ec);
w = ec->client.w;
h = ec->client.h;
e_comp_object_util_del_list_append(ic->menu->comp_object, img);

@ -619,7 +619,7 @@ _ibox_icon_fill_label(IBox_Icon *ic)
break;
case 4:
label = e_client_name_get(ic->client);
label = e_client_util_name_get(ic->client);
break;
}

@ -100,7 +100,7 @@ e_illume_client_is_indicator(E_Client *ec)
{
const char *title;
if ((title = e_client_name_get(ec)))
if ((title = e_client_util_name_get(ec)))
if (!strcmp(title, _e_illume_cfg->policy.indicator.title))
return EINA_TRUE;
}
@ -159,7 +159,7 @@ e_illume_client_is_softkey(E_Client *ec)
{
const char *title;
if ((title = e_client_name_get(ec)))
if ((title = e_client_util_name_get(ec)))
if (!strcmp(title, _e_illume_cfg->policy.softkey.title))
return EINA_TRUE;
}
@ -217,7 +217,7 @@ e_illume_client_is_keyboard(E_Client *ec)
{
const char *title;
if ((title = e_client_name_get(ec)))
if ((title = e_client_util_name_get(ec)))
if (!strcmp(title, _e_illume_cfg->policy.vkbd.title))
return EINA_TRUE;
}
@ -271,7 +271,7 @@ e_illume_client_is_home(E_Client *ec)
{
const char *title;
if ((title = e_client_name_get(ec)))
if ((title = e_client_util_name_get(ec)))
if (!strcmp(title, _e_illume_cfg->policy.home.title))
return EINA_TRUE;
}

@ -81,7 +81,7 @@ _e_mod_illume_config_select_window_create(E_Config_Dialog *cfd __UNUSED__, Evas
if (e_client_util_ignored_get(ec)) continue;
if (ec->zone != zone) continue;
if (e_object_is_del(E_OBJECT(ec))) continue;
if (!(name = e_client_name_get(ec))) continue;
if (!(name = e_client_util_name_get(ec))) continue;
if (_e_mod_illume_config_select_window_match(ec)) sel = i;
e_widget_ilist_append(ow, NULL, name,
_e_mod_illume_config_select_window_list_changed,

@ -34,7 +34,7 @@ static void
_policy_border_set_focus(E_Client *ec)
{
if (!ec) return;
/* printf("_policy_border_set_focus %s\n", e_client_name_get(ec)); */
/* printf("_policy_border_set_focus %s\n", e_client_util_name_get(ec)); */
/* if focus is locked out then get out */
if (ec->lock_focus_out) return;
@ -161,7 +161,7 @@ _policy_border_show_below(E_Client *ec)
// ec->icccm.class, ec->x, ec->y);
if (!ec) return;
/* printf("_policy_border_show_below %s\n", e_client_name_get(ec)); */
/* printf("_policy_border_show_below %s\n", e_client_util_name_get(ec)); */
if (ec->icccm.transient_for)
{
if ((prev = e_pixmap_find_client(E_PIXMAP_TYPE_X, ec->icccm.transient_for)))
@ -1024,7 +1024,7 @@ _policy_border_show(E_Client *ec)
{
if (!ec) return;
/* printf("_policy_border_show %s\n", e_client_name_get(ec)); */
/* printf("_policy_border_show %s\n", e_client_util_name_get(ec)); */
if (!ec->icccm.name) return;

@ -139,7 +139,7 @@ _notification_theme_cb_find(Popup_Data *popup,
if (e_client_util_ignored_get(ec)) continue;
len = strlen(popup->app_name);
name = e_client_name_get(ec);
name = e_client_util_name_get(ec);
if (!name) continue;
test = eina_strlen_bounded(name, len + 1);

@ -646,7 +646,7 @@ _tasks_item_fill(Tasks_Item *item)
if (item->tasks->config->icon_only)
label = "";
else
label = e_client_name_get(item->client);
label = e_client_util_name_get(item->client);
edje_object_part_text_set(item->o_item, "e.text.label", label);
if (item->client->iconic)

@ -819,7 +819,7 @@ _e_winlist_client_add(E_Client *ec, E_Zone *zone, E_Desk *desk)
ww->bg_object = o;
e_theme_edje_object_set(o, "base/theme/winlist",
"e/widgets/winlist/item");
edje_object_part_text_set(o, "e.text.label", e_client_name_get(ww->client));
edje_object_part_text_set(o, "e.text.label", e_client_util_name_get(ww->client));
evas_object_show(o);
if (edje_object_part_exists(ww->bg_object, "e.swallow.icon"))
{
@ -972,7 +972,7 @@ _e_winlist_activate(void)
}
}
edje_object_part_text_set(_bg_object, "e.text.label",
e_client_name_get(ww->client));
e_client_util_name_get(ww->client));
if (_icon_object)
{
e_comp_object_util_del_list_remove(_winlist, _icon_object);

Loading…
Cancel
Save