config: turn "notabs" into "show_tabs"
This commit is contained in:
parent
5996e5eb2c
commit
dc1ddf7e40
|
@ -7,7 +7,7 @@
|
|||
#include "col.h"
|
||||
#include "utils.h"
|
||||
|
||||
#define CONF_VER 22
|
||||
#define CONF_VER 23
|
||||
#define CONFIG_KEY "config"
|
||||
|
||||
#define LIM(v, min, max) {if (v >= max) v = max; else if (v <= min) v = min;}
|
||||
|
@ -175,8 +175,10 @@ config_init(void)
|
|||
(edd_base, Config, "keys", keys, edd_keys);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(edd_base, Config, "gravatar", gravatar, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC /* DEPRECATED, NO LONGER USED */
|
||||
(edd_base, Config, "notabs", notabs, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(edd_base, Config, "show_tabs", show_tabs, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
(edd_base, Config, "mv_always_show", mv_always_show, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC
|
||||
|
@ -292,7 +294,7 @@ config_sync(const Config *config_src, Config *config)
|
|||
config->disable_focus_visuals = config_src->disable_focus_visuals;
|
||||
/* TODO: config->keys */
|
||||
config->gravatar = config_src->gravatar;
|
||||
config->notabs = config_src->notabs;
|
||||
config->show_tabs = config_src->show_tabs;
|
||||
config->mv_always_show = config_src->mv_always_show;
|
||||
config->ty_escapes = config_src->ty_escapes;
|
||||
config->changedir_to_current = config_src->changedir_to_current;
|
||||
|
@ -554,7 +556,7 @@ config_new(void)
|
|||
config->disable_focus_visuals = EINA_FALSE;
|
||||
config->colors_use = EINA_FALSE;
|
||||
config->gravatar = EINA_TRUE;
|
||||
config->notabs = EINA_FALSE;
|
||||
config->show_tabs = EINA_TRUE;
|
||||
config->mv_always_show = EINA_FALSE;
|
||||
config->ty_escapes = EINA_TRUE;
|
||||
config->changedir_to_current = EINA_TRUE;
|
||||
|
@ -705,7 +707,11 @@ config_load(void)
|
|||
config->hide_cursor = 5.0;
|
||||
EINA_FALLTHROUGH;
|
||||
/*pass through*/
|
||||
case CONF_VER: /* 22 */
|
||||
case 22:
|
||||
config->show_tabs = !config->notabs;
|
||||
EINA_FALLTHROUGH;
|
||||
/*pass through*/
|
||||
case CONF_VER: /* 23 */
|
||||
config->version = CONF_VER;
|
||||
break;
|
||||
default:
|
||||
|
@ -801,7 +807,7 @@ config_fork(const Config *config)
|
|||
CPY(temporary);
|
||||
CPY(font_set);
|
||||
CPY(gravatar);
|
||||
CPY(notabs);
|
||||
CPY(show_tabs);
|
||||
CPY(mv_always_show);
|
||||
CPY(ty_escapes);
|
||||
CPY(changedir_to_current);
|
||||
|
|
|
@ -89,7 +89,8 @@ struct _Config
|
|||
Eina_Bool disable_focus_visuals;
|
||||
Eina_Bool colors_use;
|
||||
Eina_Bool gravatar;
|
||||
Eina_Bool notabs;
|
||||
Eina_Bool notabs; /* DEPRECATED */
|
||||
Eina_Bool show_tabs;
|
||||
Eina_Bool mv_always_show;
|
||||
Eina_Bool ty_escapes;
|
||||
Eina_Bool changedir_to_current;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "private.h"
|
||||
|
||||
|
||||
#include <math.h>
|
||||
#include <Elementary.h>
|
||||
#include <assert.h>
|
||||
|
@ -55,7 +56,7 @@ CB(login_shell, 0);
|
|||
CB(mouse_over_focus, 0);
|
||||
CB(disable_focus_visuals, 1);
|
||||
CB(gravatar, 0);
|
||||
CB(notabs, 1);
|
||||
CB(show_tabs, 0);
|
||||
CB(mv_always_show, 0);
|
||||
CB(ty_escapes, 0);
|
||||
CB(changedir_to_current, 0);
|
||||
|
@ -482,7 +483,7 @@ options_behavior(Evas_Object *opbox, Evas_Object *term)
|
|||
CX(_("Focus split under the Mouse"), mouse_over_focus, 0);
|
||||
CX(_("Focus-related visuals"), disable_focus_visuals, 1);
|
||||
CX(_("Gravatar integration"), gravatar, 0);
|
||||
CX(_("Show tabs"), notabs, 1);
|
||||
CX(_("Show tabs"), show_tabs, 0);
|
||||
CX(_("Always show miniview"), mv_always_show, 0);
|
||||
CX(_("Enable special Terminology escape codes"), ty_escapes, 0);
|
||||
CX(_("Open new terminals in current working directory"), changedir_to_current, 0);
|
||||
|
|
|
@ -517,7 +517,7 @@ _solo_set_title(Term_Container *tc,
|
|||
|
||||
eina_stringshare_del(tc->title);
|
||||
tc->title = eina_stringshare_add(title);
|
||||
if (!term->config->notabs)
|
||||
if (term->config->show_tabs)
|
||||
{
|
||||
edje_object_part_text_set(term->bg, "terminology.tab.title",
|
||||
title);
|
||||
|
@ -1164,7 +1164,7 @@ _win_swallow(Term_Container *tc, Term_Container *orig,
|
|||
elm_layout_content_set(wn->base, "terminology.content", o);
|
||||
|
||||
if ((new_child->type == TERM_CONTAINER_TYPE_SOLO
|
||||
&& (!wn->config->notabs)))
|
||||
&& (wn->config->show_tabs)))
|
||||
{
|
||||
_solo_title_hide(new_child);
|
||||
}
|
||||
|
@ -1343,7 +1343,7 @@ _win_split(Term_Container *tc, Term_Container *child,
|
|||
elm_layout_content_unset(wn->base, "terminology.content");
|
||||
|
||||
tc_split = _split_new(child, tc_solo_new, is_horizontal);
|
||||
if (!wn->config->notabs)
|
||||
if (wn->config->show_tabs)
|
||||
{
|
||||
if (child->type == TERM_CONTAINER_TYPE_SOLO)
|
||||
{
|
||||
|
@ -2590,7 +2590,7 @@ _split_split(Term_Container *tc, Term_Container *child,
|
|||
tc_split->is_focused = tc->is_focused;
|
||||
tc->swallow(tc, child, tc_split);
|
||||
|
||||
if (!wn->config->notabs)
|
||||
if (wn->config->show_tabs)
|
||||
{
|
||||
_solo_title_show(tc_solo_new);
|
||||
}
|
||||
|
@ -3252,7 +3252,7 @@ _tabs_size_eval(Term_Container *container, Sizeinfo *info)
|
|||
config = tc->wn->config;
|
||||
tc->size_eval(tc, info);
|
||||
/* Current sizing code does not take the tab area correctly into account */
|
||||
if (!config->notabs)
|
||||
if (config->show_tabs)
|
||||
{
|
||||
info->step_x = 1;
|
||||
info->step_y = 1;
|
||||
|
@ -3322,12 +3322,12 @@ _tabs_close(Term_Container *tc, Term_Container *child)
|
|||
config = next_term->config;
|
||||
|
||||
edje_object_signal_emit(next_term->bg, "tabcount,off", "terminology");
|
||||
if (next_term->tabcount_spacer && config->notabs)
|
||||
if (next_term->tabcount_spacer && !config->show_tabs)
|
||||
{
|
||||
evas_object_del(next_term->tabcount_spacer);
|
||||
next_term->tabcount_spacer = NULL;
|
||||
}
|
||||
if (!config->notabs)
|
||||
if (config->show_tabs)
|
||||
_solo_title_show(next_child);
|
||||
|
||||
if (tabs->selector)
|
||||
|
@ -3685,7 +3685,7 @@ _tabs_focus(Term_Container *tc, Term_Container *relative)
|
|||
Config *config = tc->wn->config;
|
||||
tabs->current->tc->unfocus(tabs->current->tc, tc);
|
||||
|
||||
if (config->tab_zoom >= 0.01 && config->notabs)
|
||||
if (config->tab_zoom >= 0.01 && !config->show_tabs)
|
||||
{
|
||||
_cb_tab_selector_show(tabs, tab_item);
|
||||
return;
|
||||
|
@ -3784,7 +3784,7 @@ _tabs_set_title(Term_Container *tc, Term_Container *child,
|
|||
solo = (Solo*)tab_item->tc;
|
||||
term = solo->term;
|
||||
|
||||
if (!term->config->notabs)
|
||||
if (term->config->show_tabs)
|
||||
{
|
||||
edje_object_part_text_set(term->bg, "terminology.tab.title",
|
||||
title);
|
||||
|
@ -3854,7 +3854,7 @@ _tabs_refresh(Tabs *tabs)
|
|||
edje_object_part_text_set(term->bg, "terminology.tabmissed.label", bufmissed);
|
||||
edje_object_signal_emit(term->bg, "tabcount,on", "terminology");
|
||||
// this is all below just for tab bar at the top
|
||||
if (!term->config->notabs)
|
||||
if (term->config->show_tabs)
|
||||
{
|
||||
double v1, v2;
|
||||
|
||||
|
|
Loading…
Reference in New Issue