X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fesmart_file_dialog%2Frb_esmart_file_dialog.c;h=f188d804f2dd487573513775923e553e3ae82051;hb=1969f6740e354d24f5a05436d0d3ffa63f9dbae9;hp=4c60feccdbf2b1d1e4cf6bfd5f7ca0bbf66ab390;hpb=f48bba2d3cf64903ab176f6f957589a0a9ffa660;p=ruby-esmart.git diff --git a/src/esmart_file_dialog/rb_esmart_file_dialog.c b/src/esmart_file_dialog/rb_esmart_file_dialog.c index 4c60fec..f188d80 100644 --- a/src/esmart_file_dialog/rb_esmart_file_dialog.c +++ b/src/esmart_file_dialog/rb_esmart_file_dialog.c @@ -1,6 +1,4 @@ /* - * $Id: rb_esmart_file_dialog.c 356 2006-02-10 18:27:31Z tilman $ - * * Copyright (C) 2005 Tilman Sauerbeck (tilman at code-monkey de) * * This library is free software; you can redistribute it and/or @@ -35,6 +33,8 @@ typedef struct { static void on_action (void *data, Evas_Object *edje, Esmart_File_Dialog_Op op); +static VALUE cEdje; + static void c_mark (RbFileDialog *e) { c_evas_object_mark (&e->real); @@ -122,20 +122,12 @@ static void on_action (void *data, Evas_Object *edje, static VALUE c_edje_get (VALUE self) { Evas_Object *e; - VALUE mEdje, cEdje, s; - ID const_get; GET_OBJ (self, RbFileDialog, fd); if (!NIL_P (fd->edje)) return fd->edje; - const_get = rb_intern ("const_get"); - s = rb_str_new2 ("Edje"); - - mEdje = rb_funcall (rb_cModule, const_get, 1, s); - cEdje = rb_funcall (mEdje, const_get, 1, s); - e = esmart_file_dialog_edje_get (fd->real.real); fd->edje = rb_funcall (cEdje, rb_intern ("new_from_pointer"), 2, TO_EVAS (self, evas_object_evas_get (e)), @@ -176,9 +168,13 @@ static VALUE c_current_directory_get (VALUE self) void Init_esmart_file_dialog (void) { - VALUE c; + VALUE m, c; rb_require ("esmart"); + rb_require ("edje"); + + m = rb_const_get (rb_cModule, rb_intern ("Edje")); + cEdje = rb_const_get (m, rb_intern ("Edje")); c = rb_define_class_under (mEsmart, "FileDialog", cEvasObject);