Changeset View
Changeset View
Standalone View
Standalone View
src/bin/edje/edje_external_inspector.c
Show First 20 Lines • Show All 608 Lines • ▼ Show 20 Line(s) | 601 | Ecore_Getopt_Value values[] = { | |||
---|---|---|---|---|---|
609 | ECORE_GETOPT_VALUE_BOOL(quit_option), | 609 | ECORE_GETOPT_VALUE_BOOL(quit_option), | ||
610 | ECORE_GETOPT_VALUE_NONE | 610 | ECORE_GETOPT_VALUE_NONE | ||
611 | }; | 611 | }; | ||
612 | 612 | | |||
613 | setlocale(LC_NUMERIC, "C"); | 613 | setlocale(LC_NUMERIC, "C"); | ||
614 | 614 | | |||
615 | ecore_app_no_system_modules(); | 615 | ecore_app_no_system_modules(); | ||
616 | 616 | | |||
617 | ecore_init(); | 617 | if (!eina_init()) | ||
618 | eina_init(); | 618 | { | ||
619 | edje_init(); | 619 | fprintf(stderr, "Eina init failed\n"); | ||
620 | ret = 1; | ||||
621 | goto error_eina; | ||||
622 | } | ||||
620 | 623 | | |||
621 | _log_dom = eina_log_domain_register | 624 | _log_dom = eina_log_domain_register | ||
622 | ("edje_external_inspector", EINA_COLOR_YELLOW); | 625 | ("edje_external_inspector", EINA_COLOR_YELLOW); | ||
623 | if (_log_dom < 0) | 626 | if (_log_dom < 0) | ||
624 | { | 627 | { | ||
625 | EINA_LOG_CRIT | 628 | EINA_LOG_CRIT | ||
626 | ("could not register log domain 'edje_external_inspector'"); | 629 | ("could not register log domain 'edje_external_inspector'"); | ||
627 | ret = 1; | 630 | ret = 1; | ||
628 | goto error_log; | 631 | goto error_log; | ||
629 | } | 632 | } | ||
630 | 633 | | |||
634 | if (!ecore_init()) | ||||
635 | { | ||||
636 | ERR("Ecore init failed"); | ||||
637 | ret = 1; | ||||
638 | goto error_ecore; | ||||
639 | } | ||||
640 | | ||||
631 | arg_index = ecore_getopt_parse(&optdesc, values, argc, argv); | 641 | arg_index = ecore_getopt_parse(&optdesc, values, argc, argv); | ||
632 | if (arg_index < 0) | 642 | if (arg_index < 0) | ||
633 | { | 643 | { | ||
634 | ERR("could not parse arguments."); | 644 | ERR("could not parse arguments."); | ||
635 | ret = 1; | 645 | ret = 1; | ||
636 | goto error_getopt; | 646 | goto error_getopt; | ||
637 | } | 647 | } | ||
638 | else if (quit_option) | 648 | else if (quit_option) | ||
639 | goto error_getopt; | 649 | goto error_getopt; | ||
640 | 650 | | |||
651 | if (!edje_init()) | ||||
652 | { | ||||
653 | ERR("Edje init failed"); | ||||
654 | ret = 1; | ||||
655 | goto error_getopt; | ||||
656 | } | ||||
657 | | ||||
641 | if (!mode) mode = (char *)mode_choices[0]; | 658 | if (!mode) mode = (char *)mode_choices[0]; | ||
642 | 659 | | |||
643 | if (detail_name) | 660 | if (detail_name) | ||
644 | { | 661 | { | ||
645 | if (!strcmp(detail_name, "none")) detail = 0; | 662 | if (!strcmp(detail_name, "none")) detail = 0; | ||
646 | else if (!strcmp(detail_name, "terse")) | 663 | else if (!strcmp(detail_name, "terse")) | ||
647 | detail = 1; | 664 | detail = 1; | ||
648 | else if (!strcmp(detail_name, "all")) | 665 | else if (!strcmp(detail_name, "all")) | ||
Show All 15 Lines | |||||
664 | else | 681 | else | ||
665 | { | 682 | { | ||
666 | ERR("Unknown mode: %s", mode); | 683 | ERR("Unknown mode: %s", mode); | ||
667 | ret = 1; | 684 | ret = 1; | ||
668 | } | 685 | } | ||
669 | 686 | | |||
670 | free(module_patterns_str); | 687 | free(module_patterns_str); | ||
671 | 688 | | |||
689 | edje_shutdown(); | ||||
672 | error_getopt: | 690 | error_getopt: | ||
691 | ecore_shutdown(); | ||||
692 | error_ecore: | ||||
673 | eina_log_domain_unregister(_log_dom); | 693 | eina_log_domain_unregister(_log_dom); | ||
674 | error_log: | 694 | error_log: | ||
675 | edje_shutdown(); | | |||
676 | ecore_shutdown(); | | |||
677 | eina_shutdown(); | 695 | eina_shutdown(); | ||
696 | error_eina: | ||||
678 | 697 | | |||
679 | return ret; | 698 | return ret; | ||
680 | } | 699 | } | ||
681 | 700 | |