From 0bc4b0d50369c493d5f994bf463931554ebb3c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 21 Aug 2011 10:40:41 +0200 Subject: remove Efl::PREFIX, Efl::PACKAGE_* --- lib/efl.rb | 8 -------- test/test_elementary.rb | 11 +++++++---- test/tests/test_bg.rb | 6 +++--- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/lib/efl.rb b/lib/efl.rb index cf946b3..b9d8170 100644 --- a/lib/efl.rb +++ b/lib/efl.rb @@ -6,14 +6,6 @@ module Efl # VERSION = '0.0.8' # - PREFIX=`pkg-config --variable=exec_prefix ecore`.strip - if PREFIX.empty? - puts "unable to determine Efl::PREFIX using pkg-config" - end - PACKAGE_BIN_DIR = File.join PREFIX, 'bin' - PACKAGE_LIB_DIR = File.join PREFIX, 'lib' - PACKAGE_DATA_DIR = File.join PREFIX, 'share' - # autoload :EcoreEvas, './lib/efl/ecore_evas.rb' autoload :EcoreGetopt, './lib/efl/ecore_getopt.rb' autoload :EcoreInput, './lib/efl/ecore_input.rb' diff --git a/test/test_elementary.rb b/test/test_elementary.rb index ffe542c..62cc2a1 100644 --- a/test/test_elementary.rb +++ b/test/test_elementary.rb @@ -5,6 +5,12 @@ require 'efl/elementary' require 'efl/edje' require 'efl' # +PREFIX=`pkg-config --variable=prefix ecore`.strip +if PREFIX.empty? + puts "unable to determine Efl::PREFIX using pkg-config, images will not be available" +end +PACKAGE_DATA_DIR = File.join PREFIX, 'share', 'elementary' + Dir.glob( File.join File.dirname(__FILE__), 'tests', '*.rb').each do |f| load f end @@ -207,7 +213,7 @@ class TestWin < Elm::ElmWin if Tests.respond_to? m # TODO dosen't work ????? icon = Elm::ElmIcon.new self - icon.file = "#{Efl::PACKAGE_DATA_DIR}/elementary/images/icon_00.png", nil + icon.file = "#{PACKAGE_DATA_DIR}/images/icon_00.png", nil icon.scale = true, true end it = @li.item_append l, nil, icon, method(:try_test), FFI::MemoryPointer.from_string(m.to_s) @@ -257,9 +263,6 @@ end # Elm.init # -#Native.elm_app_compile_bin_dir_set PACKAGE_BIN_DIR -#Native.elm_app_compile_lib_dir_set PACKAGE_LIB_DIR -#Native.elm_app_compile_data_dir_set PACKAGE_DATA_DIR Native.elm_app_info_set elm_main, 'elementary', 'images/logo.png' # Elm.run diff --git a/test/tests/test_bg.rb b/test/tests/test_bg.rb index 7f613eb..0591511 100644 --- a/test/tests/test_bg.rb +++ b/test/tests/test_bg.rb @@ -23,7 +23,7 @@ module Tests end def image_bg @bg = Elm::ElmBg.new self do |bg| - bg.file = "#{Efl::PACKAGE_DATA_DIR}/elementary/images/plant_01.jpg", nil + bg.file = "#{PACKAGE_DATA_DIR}/images/plant_01.jpg", nil bg.size_hint_weight_expand self.resize_object_add bg bg.show @@ -37,7 +37,7 @@ module Tests bx.show end @o_bg = Elm::ElmBg.new self do |bg| - bg.file = "#{Efl::PACKAGE_DATA_DIR}/elementary/images/plant_01.jpg", nil + bg.file = "#{PACKAGE_DATA_DIR}/images/plant_01.jpg", nil bg.size_hint_weight_expand bg.size_hint_align_fill @bx.pack_end bg @@ -115,7 +115,7 @@ module Tests def cb_overlay_changed data, evas_obj, event_info if Elm::ElmCheck.new(evas_obj).state over = @o_bg.parent_widget.evas.edje_object_add - over.file = File.join(Efl::PACKAGE_DATA_DIR,'elementary/objects/test.edj'), "bg_overlay" + over.file = "#{PACKAGE_DATA_DIR}/objects/test.edj", "bg_overlay" @o_bg.overlay = over else @o_bg.overlay = FFI::Pointer::NULL -- cgit v1.1-2-g2b99