projects
/
ruby-esmart.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Sanitized Edje::Edje reference lookup.
[ruby-esmart.git]
/
src
/
esmart_file_dialog
/
rb_esmart_file_dialog.c
diff --git
a/src/esmart_file_dialog/rb_esmart_file_dialog.c
b/src/esmart_file_dialog/rb_esmart_file_dialog.c
index 4c60feccdbf2b1d1e4cf6bfd5f7ca0bbf66ab390..ba62e24992fbb3b39d45e227b582b6f488e80325 100644
(file)
--- a/
src/esmart_file_dialog/rb_esmart_file_dialog.c
+++ b/
src/esmart_file_dialog/rb_esmart_file_dialog.c
@@
-1,5
+1,5
@@
/*
/*
- * $Id: rb_esmart_file_dialog.c 3
56 2006-02-10 18:27:31
Z tilman $
+ * $Id: rb_esmart_file_dialog.c 3
91 2006-11-11 12:14:24
Z tilman $
*
* Copyright (C) 2005 Tilman Sauerbeck (tilman at code-monkey de)
*
*
* Copyright (C) 2005 Tilman Sauerbeck (tilman at code-monkey de)
*
@@
-35,6
+35,8
@@
typedef struct {
static void on_action (void *data, Evas_Object *edje,
Esmart_File_Dialog_Op op);
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);
static void c_mark (RbFileDialog *e)
{
c_evas_object_mark (&e->real);
@@
-122,20
+124,12
@@
static void on_action (void *data, Evas_Object *edje,
static VALUE c_edje_get (VALUE self)
{
Evas_Object *e;
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;
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)),
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
+170,13
@@
static VALUE c_current_directory_get (VALUE self)
void Init_esmart_file_dialog (void)
{
void Init_esmart_file_dialog (void)
{
- VALUE c;
+ VALUE
m,
c;
rb_require ("esmart");
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);
c = rb_define_class_under (mEsmart, "FileDialog", cEvasObject);