summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-02-25 23:31:43 +0100
committerFlavio Ceolin <flavio.ceolin@gmail.com>2015-03-07 18:51:03 -0300
commit097db9786fb7e94b4fb75a854ba8dd3c1382c975 (patch)
tree9a89f5235d561e1073ca6c6956159fd284955637
parentf6fd0f0e37e9d53ce6c0f8d7a90a27caf3b43620 (diff)
gadget: The context should be created before we create emix
At the point where we call emix_backend_set we can get event calls, so the context should be ready.
-rw-r--r--src/module/e_mod_main.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/module/e_mod_main.c b/src/module/e_mod_main.c
index d01d48f..b137039 100644
--- a/src/module/e_mod_main.c
+++ b/src/module/e_mod_main.c
@@ -749,6 +749,19 @@ e_modapi_init(E_Module *m)
749 749
750 _e_emix_log_domain = eina_log_domain_register("emix_module", EINA_COLOR_RED); 750 _e_emix_log_domain = eina_log_domain_register("emix_module", EINA_COLOR_RED);
751 751
752 if (!mixer_context)
753 {
754 mixer_context = E_NEW(Context, 1);
755
756 mixer_context->desklock_handler =
757 ecore_event_handler_add(E_EVENT_DESKLOCK, _desklock_cb, NULL);
758 mixer_context->module = m;
759 snprintf(buf, sizeof(buf), "%s/mixer.edj",
760 e_module_dir_get(mixer_context->module));
761 mixer_context->theme = strdup(buf);
762 }
763
764
752 EINA_SAFETY_ON_FALSE_RETURN_VAL(emix_init(), NULL); 765 EINA_SAFETY_ON_FALSE_RETURN_VAL(emix_init(), NULL);
753 emix_config_init(_backend_changed, NULL); 766 emix_config_init(_backend_changed, NULL);
754 emix_event_callback_add(_events_cb, NULL); 767 emix_event_callback_add(_events_cb, NULL);
@@ -776,18 +789,6 @@ e_modapi_init(E_Module *m)
776 if (backend_loaded == EINA_FALSE) 789 if (backend_loaded == EINA_FALSE)
777 goto err; 790 goto err;
778 791
779 if (!mixer_context)
780 {
781 mixer_context = E_NEW(Context, 1);
782
783 mixer_context->desklock_handler =
784 ecore_event_handler_add(E_EVENT_DESKLOCK, _desklock_cb, NULL);
785 mixer_context->module = m;
786 snprintf(buf, sizeof(buf), "%s/mixer.edj",
787 e_module_dir_get(mixer_context->module));
788 mixer_context->theme = strdup(buf);
789 }
790
791 e_configure_registry_item_add("extensions/emix", 150, "Emix", NULL, 792 e_configure_registry_item_add("extensions/emix", 150, "Emix", NULL,
792 NULL, emix_config_popup_new); 793 NULL, emix_config_popup_new);
793 794