billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=2259519d10dad537d1dd9725fb196f3f1e39ca38

commit 2259519d10dad537d1dd9725fb196f3f1e39ca38
Author: Boris Faure <[email protected]>
Date:   Sun Apr 12 16:59:43 2020 +0200

    video: no need to force emotion engine anymore
---
 man/terminology.1       |   7 +-
 src/bin/config.c        |   7 +-
 src/bin/config.h        |   2 +-
 src/bin/main.c          |  26 --------
 src/bin/media.c         |  19 ------
 src/bin/meson.build     |   1 -
 src/bin/options.c       |   4 --
 src/bin/options_video.c | 165 ------------------------------------------------
 src/bin/options_video.h |   6 --
 src/bin/termio.c        |  15 +----
 src/bin/termpty.c       |   9 +--
 src/bin/termpty.h       |   4 +-
 12 files changed, 9 insertions(+), 256 deletions(-)

diff --git a/man/terminology.1 b/man/terminology.1
index 6617a5e..92f567f 100644
--- a/man/terminology.1
+++ b/man/terminology.1
@@ -1,5 +1,5 @@
 .\" Manpage for Terminology
-.TH TERMINOLOGY 1 "Feb 15, 2020" "1.7.0" "Terminology man page"
+.TH TERMINOLOGY 1 "Apr 12, 2020" "1.7.0" "Terminology man page"
 .SH NAME
 Terminology \- Terminal Emulator written with EFL (Enlightenment Foundation 
Libraries).
 .SH SYNOPSIS
@@ -96,11 +96,6 @@ Set font (NAME/SIZE for scalable, NAME for bitmap.
 Type: STR.
 .
 .TP
-.B \-v=VIDEO\-MODULE, \-\-video-module=VIDEO\-MODULE
-Set emotion module to use. Choices are: \fBauto\fP, \fBgstreamer\fP,
-\fBxine\fP, \fBgeneric\fP.
-.
-.TP
 .B \-l=LOGIN, \-\-login=LOGIN
 Run the shell as a login shell.
 Type: BOOL.
diff --git a/src/bin/config.c b/src/bin/config.c
index 78d9d27..c4449c4 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -110,7 +110,7 @@ config_init(void)
    EET_DATA_DESCRIPTOR_ADD_BASIC
      (edd_base, Config, "tab_zoom", tab_zoom, EET_T_DOUBLE);
    EET_DATA_DESCRIPTOR_ADD_BASIC
-     (edd_base, Config, "vidmod", vidmod, EET_T_INT);
+     (edd_base, Config, "vidmod", _vidmod, EET_T_INT); /* DEPRECATED */
    EET_DATA_DESCRIPTOR_ADD_BASIC
      (edd_base, Config, "jump_on_change", jump_on_change, EET_T_UCHAR);
    EET_DATA_DESCRIPTOR_ADD_BASIC
@@ -283,7 +283,6 @@ config_sync(const Config *config_src, Config *config)
    config->scrollback = config_src->scrollback;
    config->tab_zoom = config_src->tab_zoom;
    config->hide_cursor = config_src->hide_cursor;
-   config->vidmod = config_src->vidmod;
    config->jump_on_keypress = config_src->jump_on_keypress;
    config->jump_on_change = config_src->jump_on_change;
    config->flicker_on_key = config_src->flicker_on_key;
@@ -547,7 +546,6 @@ config_new(void)
         config->theme = eina_stringshare_add("default.edj");
         config->background = NULL;
         config->tab_zoom = 0.5;
-        config->vidmod = 0;
         config->opacity = 50;
         config->cg_width = 80;
         config->cg_height = 24;
@@ -633,7 +631,7 @@ config_load(void)
                   LIM(config->font.size, 3, 400);
                   LIM(config->scrollback, 0, 131072);
                   LIM(config->tab_zoom, 0.0, 1.0);
-                  LIM(config->vidmod, 0, 4)
+                  LIM(config->_vidmod, 0, 4)
 
                   /* upgrade to v3 */
                   config->active_links = EINA_TRUE;
@@ -798,7 +796,6 @@ config_fork(const Config *config)
    CPY(scrollback);
    CPY(tab_zoom);
    CPY(hide_cursor);
-   CPY(vidmod);
    CPY(jump_on_change);
    CPY(jump_on_keypress);
    CPY(flicker_on_key);
diff --git a/src/bin/config.h b/src/bin/config.h
index aa3027b..3f12cd8 100644
--- a/src/bin/config.h
+++ b/src/bin/config.h
@@ -58,7 +58,7 @@ struct _Config
    const char       *background;
    double            tab_zoom;
    double            hide_cursor;
-   int               vidmod;
+   int               _vidmod; /* DEPRECATED */
    int               opacity;
    int               shine;
    int               cg_width;
diff --git a/src/bin/main.c b/src/bin/main.c
index 59092b2..8633526 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -434,11 +434,6 @@ main_ipc_new(Ipc_Instance *inst)
    unsetenv("DESKTOP_STARTUP_ID");
 }
 
-static const char *emotion_choices[] = {
-  "auto", "gstreamer", "xine", "generic", "gstreamer1",
-  NULL
-};
-
 static Ecore_Getopt options = {
    PACKAGE_NAME,
    "%prog [options]",
@@ -473,9 +468,6 @@ static Ecore_Getopt options = {
                               " 'v' for vertical and 'h' for horizontal."
                               " Can be used multiple times. eg -S vhvv or 
--split hv"
                               " More description available on the man page.")),
-      ECORE_GETOPT_CHOICE    ('v', "video-module",
-                              gettext_noop("Set emotion module to use."), 
emotion_choices),
-
       ECORE_GETOPT_STORE_BOOL('l', "login",
                               gettext_noop("Run the shell as a login shell.")),
       ECORE_GETOPT_STORE_BOOL('m', "video-mute",
@@ -796,7 +788,6 @@ EAPI_MAIN int
 elm_main(int argc, char **argv)
 {
    char *geometry = NULL;
-   char *video_module = NULL;
    Eina_Bool quit_option = EINA_FALSE;
    Eina_Bool single = EINA_FALSE;
    Eina_Bool no_wizard = EINA_FALSE;
@@ -824,7 +815,6 @@ elm_main(int argc, char **argv)
      ECORE_GETOPT_VALUE_STR(instance.icon_name),
      ECORE_GETOPT_VALUE_STR(instance.font),
      ECORE_GETOPT_VALUE_STR(instance.startup_split),
-     ECORE_GETOPT_VALUE_STR(video_module),
 
      ECORE_GETOPT_VALUE_BOOL(instance.login_shell),
      ECORE_GETOPT_VALUE_BOOL(instance.video_mute),
@@ -963,22 +953,6 @@ elm_main(int argc, char **argv)
    _configure_instance(&instance);
 
 
-   if (video_module)
-     {
-        int i;
-        for (i = 0; i < (int)EINA_C_ARRAY_LENGTH(emotion_choices); i++)
-          {
-             if (video_module == emotion_choices[i])
-               break;
-          }
-
-        if (i == EINA_C_ARRAY_LENGTH(emotion_choices))
-          i = 0; /* ecore getopt shouldn't let this happen, but... */
-        instance.config->vidmod = i;
-        instance.config->temporary = EINA_TRUE;
-     }
-
-
    if (geometry)
      {
         if (sscanf(geometry,"%ix%i+%i+%i", &instance.w, &instance.h,
diff --git a/src/bin/media.c b/src/bin/media.c
index 6240445..75936a1 100644
--- a/src/bin/media.c
+++ b/src/bin/media.c
@@ -785,31 +785,12 @@ _type_mov_init(Evas_Object *obj)
 {
    Evas_Object *o;
    double vol;
-   char *modules[] =
-     {
-        NULL,
-        "gstreamer",
-        "xine",
-        "vlc",
-        "gstreamer1"
-    };
-   char *mod = NULL;
    Media *sd = evas_object_smart_data_get(obj);
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(sd, -1);
 
    emotion_init();
    o = sd->o_img = emotion_object_add(evas_object_evas_get(obj));
-   if ((sd->config->vidmod >= 0) &&
-       (sd->config->vidmod < (int)EINA_C_ARRAY_LENGTH(modules)))
-     mod = modules[sd->config->vidmod];
-   if (!emotion_object_init(o, mod))
-     {
-        ERR(_("Could not Initialize the emotion module '%s'"), mod);
-        evas_object_del(sd->o_img);
-        sd->o_img = NULL;
-        return -1;
-     }
    evas_object_smart_callback_add(o, "frame_decode",
                                   _cb_mov_frame_decode, obj);
    evas_object_smart_callback_add(o, "frame_resize",
diff --git a/src/bin/meson.build b/src/bin/meson.build
index 6de1d17..2910f06 100644
--- a/src/bin/meson.build
+++ b/src/bin/meson.build
@@ -16,7 +16,6 @@ terminology_sources = ['private.h',
                        'options_behavior.c', 'options_behavior.h',
                        'options_keys.c', 'options_keys.h',
                        'options_helpers.c', 'options_helpers.h',
-                       'options_video.c', 'options_video.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 fec118c..6b253f5 100644
--- a/src/bin/options.c
+++ b/src/bin/options.c
@@ -7,7 +7,6 @@
 #include "options_theme.h"
 #include "options_background.h"
 #include "options_colors.h"
-#include "options_video.h"
 #include "options_behavior.h"
 #include "options_keys.h"
 #include "options_helpers.h"
@@ -23,7 +22,6 @@ enum option_mode {
      OPTION_THEME,
      OPTION_BACKGROUND,
      OPTION_COLORS,
-     OPTION_VIDEO,
      OPTION_KEYS,
      OPTION_HELPERS,
      OPTION_ELM,
@@ -90,7 +88,6 @@ _cb_opdt_hide_done(void *data,
       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_VIDEO:     options_video(ctx->opbox, ctx->term); 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;
@@ -222,7 +219,6 @@ options_show(Evas_Object *win, Evas_Object *base, 
Evas_Object *bg, Evas_Object *
    ITEM_APPEND("preferences-desktop-theme", _("Theme"), THEME);
    ITEM_APPEND("background", _("Background"), BACKGROUND);
    ITEM_APPEND("preferences-desktop-theme", _("Colors"), COLORS);
-   ITEM_APPEND("video-display", _("Video"), VIDEO);
    ITEM_APPEND("preferences-desktop-keyboard-shortcuts", _("Keys"), KEYS);
    ITEM_APPEND("system-run", _("Helpers"), HELPERS);
    ITEM_APPEND("preferences-color", _("Toolkit"), ELM);
diff --git a/src/bin/options_video.c b/src/bin/options_video.c
deleted file mode 100644
index c243a2c..0000000
--- a/src/bin/options_video.c
+++ /dev/null
@@ -1,165 +0,0 @@
-#include "private.h"
-
-#include <Elementary.h>
-#include "config.h"
-#include "termio.h"
-#include "options.h"
-#include "options_video.h"
-#include "main.h"
-
-
-static void
-_cb_op_video_mute_chg(void *data,
-                      Evas_Object *obj,
-                      void *_event EINA_UNUSED)
-{
-   Evas_Object *term = data;
-   Config *config = termio_config_get(term);
-   config->mute = elm_check_state_get(obj);
-   main_media_mute_update(config);
-   config_save(config);
-}
-
-static void
-_cb_op_video_visualize_chg(void *data,
-                           Evas_Object *obj,
-                           void *_event EINA_UNUSED)
-{
-   Evas_Object *term = data;
-   Config *config = termio_config_get(term);
-   config->visualize = elm_check_state_get(obj);
-   main_media_visualize_update(config);
-   config_save(config);
-}
-
-static void
-_cb_op_video_vidmod_chg(void *data,
-                        Evas_Object *obj,
-                        void *_event EINA_UNUSED)
-{
-   Evas_Object *term = data;
-   Config *config = termio_config_get(term);
-   int v = elm_radio_value_get(obj);
-   if (v == config->vidmod) return;
-   config->vidmod = v;
-   main_media_update(config);
-   config_save(config);
-}
-
-void
-options_video(Evas_Object *opbox, Evas_Object *term)
-{
-   Evas_Object *o, *fr, *bx0, *op_vidmod;
-   Config *config = termio_config_get(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, _("Video"));
-   elm_box_pack_end(opbox, o);
-   evas_object_show(o);
-
-   bx0 = o = elm_box_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_content_set(fr, o);
-   evas_object_show(o);
-
-
-   o = elm_check_add(opbox);
-   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
-   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
-   elm_object_text_set(o, _("Audio muted"));
-   elm_check_state_set(o, config->mute);
-   elm_box_pack_end(bx0, o);
-   evas_object_show(o);
-   evas_object_smart_callback_add(o, "changed",
-                                  _cb_op_video_mute_chg, term);
-
-   /*
-    * TODO: visualizing type configuration
-    */
-   o = elm_check_add(opbox);
-   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
-   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
-   elm_object_text_set(o, _("Audio visualized"));
-   elm_check_state_set(o, config->visualize);
-   elm_box_pack_end(bx0, o);
-   evas_object_show(o);
-   evas_object_smart_callback_add(o, "changed",
-                                  _cb_op_video_visualize_chg, term);
-
-   o = elm_separator_add(opbox);
-   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
-   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
-   elm_separator_horizontal_set(o, EINA_TRUE);
-   elm_box_pack_end(bx0, o);
-   evas_object_show(o);
-
-   o = elm_label_add(opbox);
-   evas_object_size_hint_weight_set(o, 0.0, 0.0);
-   evas_object_size_hint_align_set(o, 0.0, 0.5);
-   elm_object_text_set(o, _("Video Engine:"));
-   elm_box_pack_end(bx0, o);
-   evas_object_show(o);
-
-   op_vidmod = o = elm_radio_add(opbox);
-   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
-   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
-   elm_object_text_set(o, _("Automatic"));
-   elm_radio_state_value_set(o, 0);
-   elm_box_pack_end(bx0, o);
-   evas_object_show(o);
-   evas_object_smart_callback_add(o, "changed",
-                                  _cb_op_video_vidmod_chg, term);
-
-   o = elm_radio_add(opbox);
-   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
-   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
-   elm_object_text_set(o, "Gstreamer");
-   elm_radio_state_value_set(o, 1);
-   elm_radio_group_add(o, op_vidmod);
-   elm_box_pack_end(bx0, o);
-   evas_object_show(o);
-   evas_object_smart_callback_add(o, "changed",
-                                  _cb_op_video_vidmod_chg, term);
-
-   o = elm_radio_add(opbox);
-   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
-   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
-   elm_object_text_set(o, "Xine");
-   elm_radio_state_value_set(o, 2);
-   elm_radio_group_add(o, op_vidmod);
-   elm_box_pack_end(bx0, o);
-   evas_object_show(o);
-   evas_object_smart_callback_add(o, "changed",
-                                  _cb_op_video_vidmod_chg, term);
-
-   o = elm_radio_add(opbox);
-   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
-   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
-   elm_object_text_set(o, "VLC");
-   elm_radio_state_value_set(o, 3);
-   elm_radio_group_add(o, op_vidmod);
-   elm_box_pack_end(bx0, o);
-   evas_object_show(o);
-   evas_object_smart_callback_add(o, "changed",
-                                  _cb_op_video_vidmod_chg, term);
-
-   o = elm_radio_add(opbox);
-   evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
-   evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
-   elm_object_text_set(o, "Gstreamer 1.X");
-   elm_radio_state_value_set(o, 4);
-   elm_radio_group_add(o, op_vidmod);
-   elm_box_pack_end(bx0, o);
-   evas_object_show(o);
-   evas_object_smart_callback_add(o, "changed",
-                                  _cb_op_video_vidmod_chg, term);
-
-   elm_radio_value_set(o, config->vidmod);
-
-   evas_object_size_hint_weight_set(opbox, EVAS_HINT_EXPAND, 0.0);
-   evas_object_size_hint_align_set(opbox, EVAS_HINT_FILL, 0.0);
-   evas_object_show(o);
-}
diff --git a/src/bin/options_video.h b/src/bin/options_video.h
deleted file mode 100644
index b1c373f..0000000
--- a/src/bin/options_video.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _OPTIONS_VIDEO_H__
-#define _OPTIONS_VIDEO_H__ 1
-
-void options_video(Evas_Object *opbox, Evas_Object *term);
-
-#endif
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 2d86ea7..d52e2fe 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -3909,15 +3909,6 @@ termio_add(Evas_Object *win, Config *config,
    Evas *e;
    Evas_Object *obj, *g;
    Termio *sd;
-   char *modules[] =
-     {
-        NULL,
-        "gstreamer",
-        "xine",
-        "vlc",
-        "gstreamer1"
-     };
-   char *mod = NULL;
    Ecore_Window window_id;
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(win, NULL);
@@ -3929,10 +3920,6 @@ termio_add(Evas_Object *win, Config *config,
    sd = evas_object_smart_data_get(obj);
    EINA_SAFETY_ON_NULL_RETURN_VAL(sd, obj);
 
-   if ((config->vidmod >= 0) &&
-       (config->vidmod < (int)EINA_C_ARRAY_LENGTH(modules)))
-     mod = modules[config->vidmod];
-
    sd->cursor.shape = config->cursor_shape;
    termio_config_set(obj, config);
    sd->term = term;
@@ -3968,7 +3955,7 @@ termio_add(Evas_Object *win, Config *config,
                        _smart_cb_drop, obj);
 
    window_id = elm_win_window_id_get(win);
-   sd->pty = termpty_new(cmd, login_shell, cd, w, h, config, mod, title,
+   sd->pty = termpty_new(cmd, login_shell, cd, w, h, config, title,
                          window_id);
    if (!sd->pty)
      {
diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index fa402de..fdb5869 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -531,8 +531,8 @@ _is_shell_valid(const char *cmd)
 
 Termpty *
 termpty_new(const char *cmd, Eina_Bool login_shell, const char *cd,
-            int w, int h, Config *config, const char *emotion_mod,
-            const char *title, Ecore_Window window_id)
+            int w, int h, Config *config, const char *title,
+            Ecore_Window window_id)
 {
    Termpty *ty;
    const char *pty;
@@ -770,11 +770,6 @@ termpty_new(const char *cmd, Eina_Bool login_shell, const 
char *cd,
              putenv("TERM=xterm");
           }
         putenv("XTERM_256_COLORS=1");
-        if (emotion_mod)
-          {
-             snprintf(buf, sizeof(buf), "EMOTION_ENGINE=%s", emotion_mod);
-             putenv(buf);
-          }
         if (window_id)
           {
              snprintf(buf, sizeof(buf), "WINDOWID=%lu", window_id);
diff --git a/src/bin/termpty.h b/src/bin/termpty.h
index faeaa6d..626439c 100644
--- a/src/bin/termpty.h
+++ b/src/bin/termpty.h
@@ -273,8 +273,8 @@ void       termpty_init(void);
 void       termpty_shutdown(void);
 
 Termpty   *termpty_new(const char *cmd, Eina_Bool login_shell, const char *cd,
-                       int w, int h, Config *config, const char *emotion_mod,
-                       const char *title, Ecore_Window window_id);
+                       int w, int h, Config *config, const char *title,
+                       Ecore_Window window_id);
 void       termpty_free(Termpty *ty);
 void       termpty_config_update(Termpty *ty, Config *config);
 

-- 


Reply via email to