From 08bfebcf6dbf375b39df79971c709b838dac90ed Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Sun, 14 Jun 2020 22:19:21 +0200 Subject: [PATCH] mv options_helpers.{c,h} options_mouse.{c,h} --- DESIGN.md | 2 +- src/bin/meson.build | 2 +- src/bin/options.c | 24 +++++++++---------- src/bin/options_helpers.h | 6 ----- .../{options_helpers.c => options_mouse.c} | 6 ++--- src/bin/options_mouse.h | 6 +++++ 6 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 src/bin/options_helpers.h rename src/bin/{options_helpers.c => options_mouse.c} (99%) create mode 100644 src/bin/options_mouse.h diff --git a/DESIGN.md b/DESIGN.md index e277a67e..c0345ff6 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -18,7 +18,7 @@ A simple documentation to navige through the C files: * `src/bin/options_colors.c`: the settings panel about colors in the terminal * `src/bin/options_elm.c`: the settings panel to configure Elementary * `src/bin/options_font.c`: the settings panel to choose the Font -* `src/bin/options_helpers.c`: the settings panel on Helpers +* `src/bin/options_mouse.c`: the settings panel on mouse interactions * `src/bin/options_keys.c`: the settings panel to configure key bindings * `src/bin/options_theme.c`: the settings panel to choose a theme * `src/bin/options_themepv.c`: the widget that handles theme previews diff --git a/src/bin/meson.build b/src/bin/meson.build index 50a537fe..ef8158de 100644 --- a/src/bin/meson.build +++ b/src/bin/meson.build @@ -15,7 +15,7 @@ terminology_sources = ['private.h', 'options_colors.c', 'options_colors.h', 'options_behavior.c', 'options_behavior.h', 'options_keys.c', 'options_keys.h', - 'options_helpers.c', 'options_helpers.h', + 'options_mouse.c', 'options_mouse.h', 'options_elm.c', 'options_elm.h', 'sel.c', 'sel.h', 'miniview.c', 'miniview.h', diff --git a/src/bin/options.c b/src/bin/options.c index c88647b6..b2bc48e2 100644 --- a/src/bin/options.c +++ b/src/bin/options.c @@ -9,7 +9,7 @@ #include "options_colors.h" #include "options_behavior.h" #include "options_keys.h" -#include "options_helpers.h" +#include "options_mouse.h" #include "options_elm.h" #include "config.h" #include "termio.h" @@ -23,7 +23,7 @@ enum option_mode { OPTION_BACKGROUND, OPTION_COLORS, OPTION_KEYS, - OPTION_HELPERS, + OPTION_MOUSE, OPTION_ELM, OPTIONS_MODE_NB @@ -82,16 +82,16 @@ _cb_opdt_hide_done(void *data, elm_box_clear(ctx->opbox); switch (ctx->mode) { - case OPTION_NONE: break; - case OPTION_BEHAVIOR: options_behavior(ctx->opbox, ctx->term); break; - case OPTION_FONT: options_font(ctx->opbox, ctx->term); break; - case OPTION_THEME: options_theme(ctx->opbox, ctx->term); break; + case OPTION_NONE: break; + case OPTION_BEHAVIOR: options_behavior(ctx->opbox, ctx->term); break; + case OPTION_FONT: options_font(ctx->opbox, ctx->term); break; + case OPTION_THEME: options_theme(ctx->opbox, ctx->term); break; case OPTION_BACKGROUND: options_background(ctx->opbox, ctx->term); break; - case OPTION_COLORS: options_colors(ctx->opbox, ctx->term, ctx->bg); break; - case OPTION_KEYS: options_keys(ctx->opbox, ctx->term); break; - case OPTION_HELPERS: options_helpers(ctx->opbox, ctx->term); break; - case OPTION_ELM: options_elm(ctx->opbox, ctx->term); break; - case OPTIONS_MODE_NB: assert(0 && "should not occur"); + case OPTION_COLORS: options_colors(ctx->opbox, ctx->term, ctx->bg); break; + case OPTION_KEYS: options_keys(ctx->opbox, ctx->term); break; + case OPTION_MOUSE: options_mouse(ctx->opbox, ctx->term); break; + case OPTION_ELM: options_elm(ctx->opbox, ctx->term); break; + case OPTIONS_MODE_NB: assert(0 && "should not occur"); } elm_layout_signal_emit(ctx->base, "optdetails,show", "terminology"); } @@ -215,12 +215,12 @@ options_show(Evas_Object *win, Evas_Object *base, Evas_Object *bg, Evas_Object * (void*) &ctx->modes[OPTION_##_option_mode]) it_fn = ITEM_APPEND("preferences-system", _("Behavior"), BEHAVIOR); + ITEM_APPEND("input-mouse", _("Mouse"), MOUSE); ITEM_APPEND("preferences-desktop-font", _("Font"), FONT); ITEM_APPEND("preferences-desktop-theme", _("Theme"), THEME); ITEM_APPEND("preferences-desktop-wallpaper", _("Background"), BACKGROUND); ITEM_APPEND("preferences-color", _("Colors"), COLORS); ITEM_APPEND("preferences-desktop-keyboard", _("Keys"), KEYS); - ITEM_APPEND("system-run", _("Helpers"), HELPERS); ITEM_APPEND("preferences-desktop", _("Toolkit"), ELM); #undef ITEM_APPEND diff --git a/src/bin/options_helpers.h b/src/bin/options_helpers.h deleted file mode 100644 index 41b5f65e..00000000 --- a/src/bin/options_helpers.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _OPTIONS_HELPERS_H__ -#define _OPTIONS_HELPERS_H__ 1 - -void options_helpers(Evas_Object *opbox, Evas_Object *term); - -#endif diff --git a/src/bin/options_helpers.c b/src/bin/options_mouse.c similarity index 99% rename from src/bin/options_helpers.c rename to src/bin/options_mouse.c index c33e3681..033abdcf 100644 --- a/src/bin/options_helpers.c +++ b/src/bin/options_mouse.c @@ -4,7 +4,7 @@ #include "config.h" #include "termio.h" #include "options.h" -#include "options_helpers.h" +#include "options_mouse.h" #include "main.h" static void @@ -180,7 +180,7 @@ _cb_op_helper_local_general_chg(void *data, } void -options_helpers(Evas_Object *opbox, Evas_Object *term) +options_mouse(Evas_Object *opbox, Evas_Object *term) { Config *config = termio_config_get(term); Evas_Object *o, *tb, *sc, *fr, *bx; @@ -190,7 +190,7 @@ options_helpers(Evas_Object *opbox, Evas_Object *term) fr = o = elm_frame_add(opbox); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_object_text_set(o, _("Helpers")); + elm_object_text_set(o, _("Mouse")); elm_box_pack_end(opbox, o); evas_object_show(o); diff --git a/src/bin/options_mouse.h b/src/bin/options_mouse.h new file mode 100644 index 00000000..480887f6 --- /dev/null +++ b/src/bin/options_mouse.h @@ -0,0 +1,6 @@ +#ifndef _OPTIONS_MOUSE_H__ +#define _OPTIONS_MOUSE_H__ 1 + +void options_mouse(Evas_Object *opbox, Evas_Object *term); + +#endif