summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/edje_externals/elm_fileselector_button.c
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2012-01-09 08:06:43 +0000
committerChunEon Park <hermet@hermet.pe.kr>2012-01-09 08:06:43 +0000
commite75c2a8333658acdab719ef64498e31cb60992cd (patch)
tree9bfa872841c3f4e2f66ed2db611deed981824be3 /legacy/elementary/src/edje_externals/elm_fileselector_button.c
parent923fe0cef6e1ea9bc1e6f268cb53ef83e757bb8f (diff)
elementary/fileselector_button, fileselector_entry - deprecated APIs.
elm_fileselector_button_icon_set elm_fileselector_button_icon_get elm_fileselector_button_icon_unset elm_fileselector_entry_button_icon_set elm_fileselector_entry_button_icon_get elm_fileselector_entry_button_icon_unset SVN revision: 66988
Diffstat (limited to 'legacy/elementary/src/edje_externals/elm_fileselector_button.c')
-rw-r--r--legacy/elementary/src/edje_externals/elm_fileselector_button.c195
1 files changed, 97 insertions, 98 deletions
diff --git a/legacy/elementary/src/edje_externals/elm_fileselector_button.c b/legacy/elementary/src/edje_externals/elm_fileselector_button.c
index 87e22c7..53aad85 100644
--- a/legacy/elementary/src/edje_externals/elm_fileselector_button.c
+++ b/legacy/elementary/src/edje_externals/elm_fileselector_button.c
@@ -30,7 +30,7 @@ external_fileselector_button_state_set(void *data __UNUSED__, Evas_Object *obj,
30 30
31 if (p->label) 31 if (p->label)
32 elm_object_text_set(obj, p->label); 32 elm_object_text_set(obj, p->label);
33 if (p->icon) elm_fileselector_button_icon_set(obj, p->icon); 33 if (p->icon) elm_object_part_content_set(obj, "icon", p->icon);
34 if (p->fs.path) elm_fileselector_button_path_set(obj, p->fs.path); 34 if (p->fs.path) elm_fileselector_button_path_set(obj, p->fs.path);
35 if (p->fs.is_save_set) 35 if (p->fs.is_save_set)
36 elm_fileselector_button_is_save_set(obj, p->fs.is_save); 36 elm_fileselector_button_is_save_set(obj, p->fs.is_save);
@@ -47,61 +47,61 @@ external_fileselector_button_param_set(void *data __UNUSED__, Evas_Object *obj,
47{ 47{
48 if (!strcmp(param->name, "label")) 48 if (!strcmp(param->name, "label"))
49 { 49 {
50 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) 50 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
51 { 51 {
52 elm_object_text_set(obj, param->s); 52 elm_object_text_set(obj, param->s);
53 return EINA_TRUE; 53 return EINA_TRUE;
54 } 54 }
55 } 55 }
56 else if (!strcmp(param->name, "icon")) 56 else if (!strcmp(param->name, "icon"))
57 { 57 {
58 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) 58 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
59 { 59 {
60 Evas_Object *icon = external_common_param_icon_get(obj, param); 60 Evas_Object *icon = external_common_param_icon_get(obj, param);
61 if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE; 61 if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
62 elm_fileselector_button_icon_set(obj, icon); 62 elm_object_part_content_set(obj, "icon", icon);
63 return EINA_TRUE; 63 return EINA_TRUE;
64 } 64 }
65 } 65 }
66 else if (!strcmp(param->name, "path")) 66 else if (!strcmp(param->name, "path"))
67 { 67 {
68 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) 68 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
69 { 69 {
70 elm_fileselector_button_path_set(obj, param->s); 70 elm_fileselector_button_path_set(obj, param->s);
71 return EINA_TRUE; 71 return EINA_TRUE;
72 } 72 }
73 } 73 }
74 else if (!strcmp(param->name, "save")) 74 else if (!strcmp(param->name, "save"))
75 { 75 {
76 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 76 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
77 { 77 {
78 elm_fileselector_button_is_save_set(obj, param->i); 78 elm_fileselector_button_is_save_set(obj, param->i);
79 return EINA_TRUE; 79 return EINA_TRUE;
80 } 80 }
81 } 81 }
82 else if (!strcmp(param->name, "folder only")) 82 else if (!strcmp(param->name, "folder only"))
83 { 83 {
84 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 84 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
85 { 85 {
86 elm_fileselector_button_folder_only_set(obj, param->i); 86 elm_fileselector_button_folder_only_set(obj, param->i);
87 return EINA_TRUE; 87 return EINA_TRUE;
88 } 88 }
89 } 89 }
90 else if (!strcmp(param->name, "expandable")) 90 else if (!strcmp(param->name, "expandable"))
91 { 91 {
92 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 92 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
93 { 93 {
94 elm_fileselector_button_expandable_set(obj, param->i); 94 elm_fileselector_button_expandable_set(obj, param->i);
95 return EINA_TRUE; 95 return EINA_TRUE;
96 } 96 }
97 } 97 }
98 else if (!strcmp(param->name, "inwin mode")) 98 else if (!strcmp(param->name, "inwin mode"))
99 { 99 {
100 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 100 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
101 { 101 {
102 elm_fileselector_button_inwin_mode_set(obj, param->i); 102 elm_fileselector_button_inwin_mode_set(obj, param->i);
103 return EINA_TRUE; 103 return EINA_TRUE;
104 } 104 }
105 } 105 }
106 106
107 ERR("unknown parameter '%s' of type '%s'", 107 ERR("unknown parameter '%s' of type '%s'",
@@ -115,56 +115,56 @@ external_fileselector_button_param_get(void *data __UNUSED__, const Evas_Object
115{ 115{
116 if (!strcmp(param->name, "label")) 116 if (!strcmp(param->name, "label"))
117 { 117 {
118 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) 118 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
119 { 119 {
120 param->s = elm_object_text_get(obj); 120 param->s = elm_object_text_get(obj);
121 return EINA_TRUE; 121 return EINA_TRUE;
122 } 122 }
123 } 123 }
124 else if (!strcmp(param->name, "icon")) 124 else if (!strcmp(param->name, "icon"))
125 { 125 {
126 /* not easy to get icon name back from live object */ 126 /* not easy to get icon name back from live object */
127 return EINA_FALSE; 127 return EINA_FALSE;
128 } 128 }
129 else if (!strcmp(param->name, "path")) 129 else if (!strcmp(param->name, "path"))
130 { 130 {
131 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING) 131 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
132 { 132 {
133 param->s = elm_fileselector_button_path_get(obj); 133 param->s = elm_fileselector_button_path_get(obj);
134 return EINA_TRUE; 134 return EINA_TRUE;
135 } 135 }
136 } 136 }
137 else if (!strcmp(param->name, "save")) 137 else if (!strcmp(param->name, "save"))
138 { 138 {
139 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 139 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
140 { 140 {
141 param->i = elm_fileselector_button_is_save_get(obj); 141 param->i = elm_fileselector_button_is_save_get(obj);
142 return EINA_TRUE; 142 return EINA_TRUE;
143 } 143 }
144 } 144 }
145 else if (!strcmp(param->name, "folder only")) 145 else if (!strcmp(param->name, "folder only"))
146 { 146 {
147 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 147 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
148 { 148 {
149 param->i = elm_fileselector_button_folder_only_get(obj); 149 param->i = elm_fileselector_button_folder_only_get(obj);
150 return EINA_TRUE; 150 return EINA_TRUE;
151 } 151 }
152 } 152 }
153 else if (!strcmp(param->name, "expandable")) 153 else if (!strcmp(param->name, "expandable"))
154 { 154 {
155 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 155 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
156 { 156 {
157 param->i = elm_fileselector_button_expandable_get(obj); 157 param->i = elm_fileselector_button_expandable_get(obj);
158 return EINA_TRUE; 158 return EINA_TRUE;
159 } 159 }
160 } 160 }
161 else if (!strcmp(param->name, "inwin mode")) 161 else if (!strcmp(param->name, "inwin mode"))
162 { 162 {
163 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 163 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
164 { 164 {
165 param->i = elm_fileselector_button_inwin_mode_get(obj); 165 param->i = elm_fileselector_button_inwin_mode_get(obj);
166 return EINA_TRUE; 166 return EINA_TRUE;
167 } 167 }
168 } 168 }
169 169
170 ERR("unknown parameter '%s' of type '%s'", 170 ERR("unknown parameter '%s' of type '%s'",
@@ -188,40 +188,39 @@ external_fileselector_button_params_parse(void *data __UNUSED__, Evas_Object *ob
188 188
189 EINA_LIST_FOREACH(params, l, param) 189 EINA_LIST_FOREACH(params, l, param)
190 { 190 {
191 if (!strcmp(param->name, "path")) 191 if (!strcmp(param->name, "path"))
192 mem->fs.path = eina_stringshare_add(param->s); 192 mem->fs.path = eina_stringshare_add(param->s);
193 else if (!strcmp(param->name, "save")) 193 else if (!strcmp(param->name, "save"))
194 { 194 {
195 mem->fs.is_save = !!param->i; 195 mem->fs.is_save = !!param->i;
196 mem->fs.is_save_set = EINA_TRUE; 196 mem->fs.is_save_set = EINA_TRUE;
197 } 197 }
198 else if (!strcmp(param->name, "folder only")) 198 else if (!strcmp(param->name, "folder only"))
199 { 199 {
200 mem->fs.folder_only = !!param->i; 200 mem->fs.folder_only = !!param->i;
201 mem->fs.folder_only_set = EINA_TRUE; 201 mem->fs.folder_only_set = EINA_TRUE;
202 } 202 }
203 else if (!strcmp(param->name, "expandable")) 203 else if (!strcmp(param->name, "expandable"))
204 { 204 {
205 mem->fs.expandable = !!param->i; 205 mem->fs.expandable = !!param->i;
206 mem->fs.expandable_set = EINA_TRUE; 206 mem->fs.expandable_set = EINA_TRUE;
207 } 207 }
208 else if (!strcmp(param->name, "inwin mode")) 208 else if (!strcmp(param->name, "inwin mode"))
209 { 209 {
210 mem->fs.inwin_mode = !!param->i; 210 mem->fs.inwin_mode = !!param->i;
211 mem->fs.inwin_mode_set = EINA_TRUE; 211 mem->fs.inwin_mode_set = EINA_TRUE;
212 } 212 }
213 else if (!strcmp(param->name, "label")) 213 else if (!strcmp(param->name, "label"))
214 mem->label = eina_stringshare_add(param->s); 214 mem->label = eina_stringshare_add(param->s);
215 } 215 }
216 216
217 return mem; 217 return mem;
218} 218}
219 219
220static Evas_Object *external_fileselector_button_content_get(void *data __UNUSED__, 220static Evas_Object *external_fileselector_button_content_get(void *data __UNUSED__, const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
221 const Evas_Object *obj __UNUSED__, const char *content __UNUSED__)
222{ 221{
223 ERR("No content."); 222 ERR("No content.");
224 return NULL; 223 return NULL;
225} 224}
226 225
227 static void 226 static void