summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Volz <andreas.volz@tux-style.com>2016-03-26 14:11:14 +0100
committerAndreas Volz <andreas.volz@tux-style.com>2016-03-26 14:11:14 +0100
commit429212c67ef9439d4897879c235f9b29973f217f (patch)
treec5359b387de28f6905b5b8d9a6ebe242d8b3bb3b
parent3d0cb4e5356f21788c4bc299d41479441159f508 (diff)
change List reference parameter to pointer
-rw-r--r--elementaryxx/include/elementaryxx/List.h2
-rw-r--r--elementaryxx/src/List.cpp4
-rw-r--r--evasxx/src/Object.cpp8
3 files changed, 8 insertions, 6 deletions
diff --git a/elementaryxx/include/elementaryxx/List.h b/elementaryxx/include/elementaryxx/List.h
index 290234f..ffb335b 100644
--- a/elementaryxx/include/elementaryxx/List.h
+++ b/elementaryxx/include/elementaryxx/List.h
@@ -41,7 +41,7 @@ public:
41 41
42 Elm_Object_Item *append (const std::string &label, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data); 42 Elm_Object_Item *append (const std::string &label, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data);
43 43
44 Elm_Object_Item *append (const std::string &label, const Evasxx::Object &icon, const Evasxx::Object &end, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data); 44 Elm_Object_Item *append (const std::string &label, const Evasxx::Object *icon, const Evasxx::Object *end, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data);
45 45
46protected: 46protected:
47 // allow only construction for child classes 47 // allow only construction for child classes
diff --git a/elementaryxx/src/List.cpp b/elementaryxx/src/List.cpp
index 243ec8c..95192fa 100644
--- a/elementaryxx/src/List.cpp
+++ b/elementaryxx/src/List.cpp
@@ -67,9 +67,9 @@ Elm_Object_Item *List::append (const std::string &label, void (*func) (void *dat
67 return elm_list_item_append (o, label.c_str (), NULL, NULL, func, data); 67 return elm_list_item_append (o, label.c_str (), NULL, NULL, func, data);
68} 68}
69 69
70Elm_Object_Item *List::append (const std::string &label, const Evasxx::Object &icon, const Evasxx::Object &end, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data) 70Elm_Object_Item *List::append (const std::string &label, const Evasxx::Object *icon, const Evasxx::Object *end, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data)
71{ 71{
72 return elm_list_item_append (o, label.c_str (), icon.obj (), end.obj (), func, data); 72 return elm_list_item_append (o, label.c_str (), icon ? icon->obj() : NULL, end ? end->obj() : NULL, func, data);
73} 73}
74 74
75} // end namespace Elmxx 75} // end namespace Elmxx
diff --git a/evasxx/src/Object.cpp b/evasxx/src/Object.cpp
index ea4b131..d46d3f3 100644
--- a/evasxx/src/Object.cpp
+++ b/evasxx/src/Object.cpp
@@ -44,14 +44,16 @@ void Object::init ()
44} 44}
45 45
46Object::~Object() 46Object::~Object()
47{ 47{
48 Dout( dc::notice, *this << " Object::~Object" ); 48 //cout << " Object::~Object: " << getName() << endl;
49
49 unregisterCallbacks (); 50 unregisterCallbacks ();
50} 51}
51 52
52const std::string Object::getName() const 53const std::string Object::getName() const
53{ 54{
54 return evas_object_name_get( o ); 55 const char *name = evas_object_name_get( o );
56 return name ? name : "<unknown>";
55} 57}
56 58
57void Object::setName( const std::string& name ) 59void Object::setName( const std::string& name )