summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO1
-rw-r--r--src/modules/music-control/e_mod_main.c20
-rw-r--r--src/modules/music-control/private.h1
-rw-r--r--src/modules/music-control/ui.c1
4 files changed, 22 insertions, 1 deletions
diff --git a/TODO b/TODO
index 34e709a02..2a6fe90f2 100644
--- a/TODO
+++ b/TODO
@@ -144,7 +144,6 @@ TODO:
144* start: start menu could do with more featured content 144* start: start menu could do with more featured content
145 * like you see on windows for example (search and multiple columns etc.) 145 * like you see on windows for example (search and multiple columns etc.)
146 * a touch screen android-style scrolling fullscreen app icon style 146 * a touch screen android-style scrolling fullscreen app icon style
147* music-control: offer launching from the control if mpris app not there
148* music-control: auto search for known mpris services 147* music-control: auto search for known mpris services
149* music-control: allow manual addition of new named mpris services 148* music-control: allow manual addition of new named mpris services
150* wireless: fix on connman to work properly 149* wireless: fix on connman to work properly
diff --git a/src/modules/music-control/e_mod_main.c b/src/modules/music-control/e_mod_main.c
index 74682ea2c..fe8c0fd92 100644
--- a/src/modules/music-control/e_mod_main.c
+++ b/src/modules/music-control/e_mod_main.c
@@ -5,6 +5,7 @@
5static E_Module *music_control_mod = NULL; 5static E_Module *music_control_mod = NULL;
6static Eina_Bool was_playing_before_lock = EINA_FALSE; 6static Eina_Bool was_playing_before_lock = EINA_FALSE;
7static const char _e_music_control_Name[] = N_("Music controller"); 7static const char _e_music_control_Name[] = N_("Music controller");
8static Eina_Bool have_player = EINA_FALSE;
8 9
9const Player music_player_players[] = 10const Player music_player_players[] =
10{ 11{
@@ -332,6 +333,25 @@ cb_name_owner_has(void *data, const Eldbus_Message *msg,
332 media_player2_player_metadata_propget 333 media_player2_player_metadata_propget
333 (ctxt->mpris2_player, cb_metadata_get, ctxt); 334 (ctxt->mpris2_player, cb_metadata_get, ctxt);
334 } 335 }
336 have_player = owner_exists;
337}
338
339void
340music_control_launch(void)
341{
342 E_Music_Control_Module_Context *ctxt;
343
344 if (!music_control_mod) return;
345 ctxt = music_control_mod->data;
346 if (have_player) return;
347 if (ctxt->config->player_selected < 0)
348 {
349 }
350 else if (ctxt->config->player_selected < PLAYER_COUNT)
351 {
352 ecore_exe_run
353 (music_player_players[ctxt->config->player_selected].command, NULL);
354 }
335} 355}
336 356
337Eina_Bool 357Eina_Bool
diff --git a/src/modules/music-control/private.h b/src/modules/music-control/private.h
index ef2dd6d70..6f288f149 100644
--- a/src/modules/music-control/private.h
+++ b/src/modules/music-control/private.h
@@ -38,6 +38,7 @@ typedef struct _E_Music_Control_Instance
38 Evas_Object *content_popup; 38 Evas_Object *content_popup;
39} E_Music_Control_Instance; 39} E_Music_Control_Instance;
40 40
41void music_control_launch(void);
41void music_control_mouse_down_cb(void *data, Evas *evas, Evas_Object *obj, void *event); 42void music_control_mouse_down_cb(void *data, Evas *evas, Evas_Object *obj, void *event);
42const char *music_control_edj_path_get(void); 43const char *music_control_edj_path_get(void);
43void music_control_popup_del(E_Music_Control_Instance *inst); 44void music_control_popup_del(E_Music_Control_Instance *inst);
diff --git a/src/modules/music-control/ui.c b/src/modules/music-control/ui.c
index 1373861f3..4c08ce5de 100644
--- a/src/modules/music-control/ui.c
+++ b/src/modules/music-control/ui.c
@@ -92,6 +92,7 @@ _label_clicked(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EI
92{ 92{
93 E_Music_Control_Instance *inst = data; 93 E_Music_Control_Instance *inst = data;
94 music_control_popup_del(inst); 94 music_control_popup_del(inst);
95 music_control_launch();
95 mpris_media_player2_raise_call(inst->ctxt->mrpis2); 96 mpris_media_player2_raise_call(inst->ctxt->mrpis2);
96} 97}
97 98