forked from enlightenment/terminology
more options sections -> translucent moved to video and now u can
select video engine and mute state in the gui. SVN revision: 72282
This commit is contained in:
parent
e5570a7a9f
commit
28be56ac42
|
@ -85,7 +85,7 @@ collections {
|
||||||
part { name: "terminology.options"; type: SWALLOW;
|
part { name: "terminology.options"; type: SWALLOW;
|
||||||
description { state: "default" 0.0;
|
description { state: "default" 0.0;
|
||||||
fixed: 1 1;
|
fixed: 1 1;
|
||||||
min: 120 120;
|
min: 80 80;
|
||||||
align: 0.0 0.5;
|
align: 0.0 0.5;
|
||||||
rel1 {
|
rel1 {
|
||||||
relative: 1.0 0.02;
|
relative: 1.0 0.02;
|
||||||
|
|
|
@ -17,6 +17,7 @@ media.c media.h \
|
||||||
options.c options.h \
|
options.c options.h \
|
||||||
options_behavior.c options_behavior.h \
|
options_behavior.c options_behavior.h \
|
||||||
options_font.c options_font.h \
|
options_font.c options_font.h \
|
||||||
|
options_video.c options_video.h \
|
||||||
termio.c termio.h \
|
termio.c termio.h \
|
||||||
termpty.c termpty.h \
|
termpty.c termpty.h \
|
||||||
utf8.c utf8.h \
|
utf8.c utf8.h \
|
||||||
|
|
|
@ -112,6 +112,12 @@ main_media_update(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
main_media_mute_update(void)
|
||||||
|
{
|
||||||
|
if (media) media_mute_set(media, config->mute);
|
||||||
|
}
|
||||||
|
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
void main_trans_update(void);
|
void main_trans_update(void);
|
||||||
|
void main_media_update(void);
|
||||||
|
void main_media_mute_update(void);
|
||||||
|
|
|
@ -560,3 +560,12 @@ media_add(Evas_Object *parent, const char *src, int mode, int *type)
|
||||||
else if (_is_fmt(src, extn_mov)) _type_mov_init(obj);
|
else if (_is_fmt(src, extn_mov)) _type_mov_init(obj);
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
media_mute_set(Evas_Object *obj, Eina_Bool mute)
|
||||||
|
{
|
||||||
|
Media *sd = evas_object_smart_data_get(obj);
|
||||||
|
if (!sd) return;
|
||||||
|
if (sd->type != TYPE_MOV) return;
|
||||||
|
emotion_object_audio_mute_set(sd->o_img, mute);
|
||||||
|
}
|
||||||
|
|
|
@ -6,3 +6,4 @@
|
||||||
#define TYPE_MOV 3
|
#define TYPE_MOV 3
|
||||||
|
|
||||||
Evas_Object *media_add(Evas_Object *parent, const char *src, int mode, int *type);
|
Evas_Object *media_add(Evas_Object *parent, const char *src, int mode, int *type);
|
||||||
|
void media_mute_set(Evas_Object *obj, Eina_Bool mute);
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "options_font.h"
|
#include "options_font.h"
|
||||||
#include "options_behavior.h"
|
#include "options_behavior.h"
|
||||||
|
#include "options_video.h"
|
||||||
|
|
||||||
static Evas_Object *op_frame, *op_box = NULL, *op_toolbar = NULL, *op_opbox = NULL;
|
static Evas_Object *op_frame, *op_box = NULL, *op_toolbar = NULL, *op_opbox = NULL;
|
||||||
static Eina_Bool op_out = EINA_FALSE;
|
static Eina_Bool op_out = EINA_FALSE;
|
||||||
|
@ -27,6 +28,13 @@ _cb_op_wallpaper(void *data, Evas_Object *obj, void *event)
|
||||||
// XXX: not done yet
|
// XXX: not done yet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_cb_op_video(void *data, Evas_Object *obj, void *event)
|
||||||
|
{
|
||||||
|
elm_box_clear(op_opbox);
|
||||||
|
options_video(op_opbox, data);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_cb_op_behavior(void *data, Evas_Object *obj, void *event)
|
_cb_op_behavior(void *data, Evas_Object *obj, void *event)
|
||||||
{
|
{
|
||||||
|
@ -53,6 +61,12 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
|
||||||
elm_object_content_set(op_frame, o);
|
elm_object_content_set(op_frame, o);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
||||||
|
op_opbox = o = elm_box_add(win);
|
||||||
|
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_box_pack_end(op_box, o);
|
||||||
|
evas_object_show(o);
|
||||||
|
|
||||||
op_toolbar = o = elm_toolbar_add(win);
|
op_toolbar = o = elm_toolbar_add(win);
|
||||||
elm_toolbar_horizontal_set(o, EINA_FALSE);
|
elm_toolbar_horizontal_set(o, EINA_FALSE);
|
||||||
elm_object_style_set(o, "item_horizontal");
|
elm_object_style_set(o, "item_horizontal");
|
||||||
|
@ -64,24 +78,20 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
|
||||||
elm_toolbar_menu_parent_set(o, win);
|
elm_toolbar_menu_parent_set(o, win);
|
||||||
elm_toolbar_homogeneous_set(o, EINA_FALSE);
|
elm_toolbar_homogeneous_set(o, EINA_FALSE);
|
||||||
|
|
||||||
it_fn = elm_toolbar_item_append(o, "preferences-desktop-font", "Font",
|
it_fn = elm_toolbar_item_append(o, "preferences-desktop-font",
|
||||||
_cb_op_font, term);
|
"Font", _cb_op_font, term);
|
||||||
it_th = elm_toolbar_item_append(o, "preferences-desktop-theme", "Theme",
|
it_th = elm_toolbar_item_append(o, "preferences-desktop-theme",
|
||||||
_cb_op_theme, NULL);
|
"Theme", _cb_op_theme, NULL);
|
||||||
it_wp = elm_toolbar_item_append(o, "video-display", "Wallpaper",
|
it_wp = elm_toolbar_item_append(o, "preferences-desktop-wallpaper",
|
||||||
_cb_op_wallpaper, NULL);
|
"Wallpaper", _cb_op_wallpaper, NULL);
|
||||||
it_bh = elm_toolbar_item_append(o, "system-run", "Behavior",
|
it_wp = elm_toolbar_item_append(o, "preferences-desktop-multimedia",
|
||||||
_cb_op_behavior, term);
|
"Video", _cb_op_video, NULL);
|
||||||
|
it_bh = elm_toolbar_item_append(o, "system-run",
|
||||||
|
"Behavior", _cb_op_behavior, term);
|
||||||
|
|
||||||
elm_box_pack_end(op_box, o);
|
elm_box_pack_end(op_box, o);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
||||||
op_opbox = o = elm_box_add(win);
|
|
||||||
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_box_pack_end(op_box, o);
|
|
||||||
evas_object_show(o);
|
|
||||||
|
|
||||||
elm_toolbar_item_selected_set(it_fn, EINA_TRUE);
|
elm_toolbar_item_selected_set(it_fn, EINA_TRUE);
|
||||||
|
|
||||||
evas_smart_objects_calculate(evas_object_evas_get(win));
|
evas_smart_objects_calculate(evas_object_evas_get(win));
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "termio.h"
|
#include "termio.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "options_font.h"
|
#include "options_behavior.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
static Evas_Object *op_sbslider, *op_jumpcheck, *op_trans, *op_wordsep;
|
static Evas_Object *op_sbslider, *op_jumpcheck, *op_wordsep;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_cb_op_behavior_jump_chg(void *data, Evas_Object *obj, void *event)
|
_cb_op_behavior_jump_chg(void *data, Evas_Object *obj, void *event)
|
||||||
|
@ -15,14 +15,6 @@ _cb_op_behavior_jump_chg(void *data, Evas_Object *obj, void *event)
|
||||||
config_save();
|
config_save();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_cb_op_behavior_trans_chg(void *data, Evas_Object *obj, void *event)
|
|
||||||
{
|
|
||||||
config->translucent = elm_check_state_get(obj);
|
|
||||||
main_trans_update();
|
|
||||||
config_save();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_cb_op_behavior_wsep_chg(void *data, Evas_Object *obj, void *event)
|
_cb_op_behavior_wsep_chg(void *data, Evas_Object *obj, void *event)
|
||||||
{
|
{
|
||||||
|
@ -67,16 +59,13 @@ options_behavior(Evas_Object *opbox, Evas_Object *term)
|
||||||
evas_object_smart_callback_add(o, "changed",
|
evas_object_smart_callback_add(o, "changed",
|
||||||
_cb_op_behavior_jump_chg, term);
|
_cb_op_behavior_jump_chg, term);
|
||||||
|
|
||||||
op_jumpcheck = o = elm_check_add(opbox);
|
o = elm_separator_add(opbox);
|
||||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
|
||||||
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
|
||||||
elm_object_text_set(o, "Translucent");
|
elm_separator_horizontal_set(o, EINA_TRUE);
|
||||||
elm_check_state_set(o, config->translucent);
|
|
||||||
elm_box_pack_end(opbox, o);
|
elm_box_pack_end(opbox, o);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
evas_object_smart_callback_add(o, "changed",
|
|
||||||
_cb_op_behavior_trans_chg, NULL);
|
|
||||||
|
|
||||||
o = elm_label_add(opbox);
|
o = elm_label_add(opbox);
|
||||||
evas_object_size_hint_weight_set(o, 0.0, 0.0);
|
evas_object_size_hint_weight_set(o, 0.0, 0.0);
|
||||||
evas_object_size_hint_align_set(o, 0.0, 0.5);
|
evas_object_size_hint_align_set(o, 0.0, 0.5);
|
||||||
|
@ -101,6 +90,13 @@ options_behavior(Evas_Object *opbox, Evas_Object *term)
|
||||||
evas_object_smart_callback_add(o, "changed",
|
evas_object_smart_callback_add(o, "changed",
|
||||||
_cb_op_behavior_wsep_chg, term);
|
_cb_op_behavior_wsep_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(opbox, o);
|
||||||
|
evas_object_show(o);
|
||||||
|
|
||||||
o = elm_label_add(opbox);
|
o = elm_label_add(opbox);
|
||||||
evas_object_size_hint_weight_set(o, 0.0, 0.0);
|
evas_object_size_hint_weight_set(o, 0.0, 0.0);
|
||||||
evas_object_size_hint_align_set(o, 0.0, 0.5);
|
evas_object_size_hint_align_set(o, 0.0, 0.5);
|
||||||
|
@ -121,7 +117,6 @@ options_behavior(Evas_Object *opbox, Evas_Object *term)
|
||||||
evas_object_smart_callback_add(o, "delay,changed",
|
evas_object_smart_callback_add(o, "delay,changed",
|
||||||
_cb_op_behavior_sback_chg, term);
|
_cb_op_behavior_sback_chg, term);
|
||||||
|
|
||||||
elm_box_pack_end(opbox, o);
|
|
||||||
evas_object_size_hint_weight_set(opbox, EVAS_HINT_EXPAND, 0.0);
|
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_size_hint_align_set(opbox, EVAS_HINT_FILL, 0.0);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
|
@ -0,0 +1,130 @@
|
||||||
|
#include <Elementary.h>
|
||||||
|
#include "config.h"
|
||||||
|
#include "termio.h"
|
||||||
|
#include "options.h"
|
||||||
|
#include "options_video.h"
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
static Evas_Object *op_trans, *op_mute, *op_vidmod;
|
||||||
|
|
||||||
|
static void
|
||||||
|
_cb_op_video_trans_chg(void *data, Evas_Object *obj, void *event)
|
||||||
|
{
|
||||||
|
config->translucent = elm_check_state_get(obj);
|
||||||
|
main_trans_update();
|
||||||
|
config_save();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_cb_op_video_mute_chg(void *data, Evas_Object *obj, void *event)
|
||||||
|
{
|
||||||
|
config->mute = elm_check_state_get(obj);
|
||||||
|
main_media_mute_update();
|
||||||
|
config_save();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_cb_op_video_vidmod_chg(void *data, Evas_Object *obj, void *event)
|
||||||
|
{
|
||||||
|
int v = elm_radio_value_get(obj);
|
||||||
|
if (v == config->vidmod) return;
|
||||||
|
config->vidmod = v;
|
||||||
|
main_media_update();
|
||||||
|
config_save();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
options_video(Evas_Object *opbox, Evas_Object *term)
|
||||||
|
{
|
||||||
|
Evas_Object *o;
|
||||||
|
char *txt;
|
||||||
|
|
||||||
|
op_trans = 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, "Translucent");
|
||||||
|
elm_check_state_set(o, config->translucent);
|
||||||
|
elm_box_pack_end(opbox, o);
|
||||||
|
evas_object_show(o);
|
||||||
|
evas_object_smart_callback_add(o, "changed",
|
||||||
|
_cb_op_video_trans_chg, NULL);
|
||||||
|
|
||||||
|
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(opbox, o);
|
||||||
|
evas_object_show(o);
|
||||||
|
|
||||||
|
op_mute = 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, "Audo muted");
|
||||||
|
elm_check_state_set(o, config->mute);
|
||||||
|
elm_box_pack_end(opbox, o);
|
||||||
|
evas_object_show(o);
|
||||||
|
evas_object_smart_callback_add(o, "changed",
|
||||||
|
_cb_op_video_mute_chg, NULL);
|
||||||
|
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(opbox, 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(opbox, 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(opbox, o);
|
||||||
|
evas_object_show(o);
|
||||||
|
evas_object_smart_callback_add(o, "changed",
|
||||||
|
_cb_op_video_vidmod_chg, NULL);
|
||||||
|
|
||||||
|
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(opbox, o);
|
||||||
|
evas_object_show(o);
|
||||||
|
evas_object_smart_callback_add(o, "changed",
|
||||||
|
_cb_op_video_vidmod_chg, NULL);
|
||||||
|
|
||||||
|
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(opbox, o);
|
||||||
|
evas_object_show(o);
|
||||||
|
evas_object_smart_callback_add(o, "changed",
|
||||||
|
_cb_op_video_vidmod_chg, NULL);
|
||||||
|
|
||||||
|
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, "Generic (VLC)");
|
||||||
|
elm_radio_state_value_set(o, 3);
|
||||||
|
elm_radio_group_add(o, op_vidmod);
|
||||||
|
elm_box_pack_end(opbox, o);
|
||||||
|
evas_object_show(o);
|
||||||
|
evas_object_smart_callback_add(o, "changed",
|
||||||
|
_cb_op_video_vidmod_chg, NULL);
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
void options_video(Evas_Object *opbox, Evas_Object *term);
|
Loading…
Reference in New Issue