summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-07-17 06:57:41 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-07-17 06:57:41 +0000
commit2307203d491fbbf082733bb40b6987746865198c (patch)
treecce7c93a244fc06e6fd78839c4c251205fe31ba4 /src/bin
parent63e43697c164436f7370c2f2f7dc8f72aec2dd5f (diff)
1. note a bug i spotted in elm-scroller, and make terminology use the
feature.. so i can debug it. also fix errant clearing out of email helper string in options dialog. SVN revision: 73949
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/options_behavior.c63
-rw-r--r--src/bin/options_helpers.c13
2 files changed, 45 insertions, 31 deletions
diff --git a/src/bin/options_behavior.c b/src/bin/options_behavior.c
index 458ce45..399721f 100644
--- a/src/bin/options_behavior.c
+++ b/src/bin/options_behavior.c
@@ -95,74 +95,87 @@ void
95options_behavior(Evas_Object *opbox, Evas_Object *term) 95options_behavior(Evas_Object *opbox, Evas_Object *term)
96{ 96{
97 Config *config = termio_config_get(term); 97 Config *config = termio_config_get(term);
98 Evas_Object *o; 98 Evas_Object *o, *bx, *sc;
99 char *txt; 99 char *txt;
100 100
101 op_jumpcheck = o = elm_check_add(opbox); 101 sc = o = elm_scroller_add(opbox);
102 elm_scroller_content_min_limit(sc, EINA_TRUE, EINA_FALSE);
103 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
104 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
105 elm_box_pack_end(opbox, o);
106 evas_object_show(o);
107
108 bx = o = elm_box_add(opbox);
109 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
110 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0);
111 elm_object_content_set(sc, o);
112 evas_object_show(o);
113
114 op_jumpcheck = o = elm_check_add(bx);
102 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); 115 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
103 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5); 116 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
104 elm_object_text_set(o, "Jump to bottom on change"); 117 elm_object_text_set(o, "Jump to bottom on change");
105 elm_check_state_set(o, config->jump_on_change); 118 elm_check_state_set(o, config->jump_on_change);
106 elm_box_pack_end(opbox, o); 119 elm_box_pack_end(bx, o);
107 evas_object_show(o); 120 evas_object_show(o);
108 evas_object_smart_callback_add(o, "changed", 121 evas_object_smart_callback_add(o, "changed",
109 _cb_op_behavior_jump_chg, term); 122 _cb_op_behavior_jump_chg, term);
110 123
111 o = elm_check_add(opbox); 124 o = elm_check_add(bx);
112 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); 125 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
113 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5); 126 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
114 elm_object_text_set(o, "Jump to bottom on keypress"); 127 elm_object_text_set(o, "Jump to bottom on keypress");
115 elm_check_state_set(o, config->jump_on_keypress); 128 elm_check_state_set(o, config->jump_on_keypress);
116 elm_box_pack_end(opbox, o); 129 elm_box_pack_end(bx, o);
117 evas_object_show(o); 130 evas_object_show(o);
118 evas_object_smart_callback_add(o, "changed", 131 evas_object_smart_callback_add(o, "changed",
119 _cb_op_behavior_jump_keypress_chg, term); 132 _cb_op_behavior_jump_keypress_chg, term);
120 133
121 o = elm_check_add(opbox); 134 o = elm_check_add(bx);
122 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); 135 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
123 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5); 136 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
124 elm_object_text_set(o, "React to key press"); 137 elm_object_text_set(o, "React to key press");
125 elm_check_state_set(o, config->flicker_on_key); 138 elm_check_state_set(o, config->flicker_on_key);
126 elm_box_pack_end(opbox, o); 139 elm_box_pack_end(bx, o);
127 evas_object_show(o); 140 evas_object_show(o);
128 evas_object_smart_callback_add(o, "changed", 141 evas_object_smart_callback_add(o, "changed",
129 _cb_op_behavior_flicker_chg, term); 142 _cb_op_behavior_flicker_chg, term);
130 143
131 o = elm_check_add(opbox); 144 o = elm_check_add(bx);
132 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); 145 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
133 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5); 146 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
134 elm_object_text_set(o, "Disable cursor blinking"); 147 elm_object_text_set(o, "Disable cursor blinking");
135 elm_check_state_set(o, config->disable_cursor_blink); 148 elm_check_state_set(o, config->disable_cursor_blink);
136 elm_box_pack_end(opbox, o); 149 elm_box_pack_end(bx, o);
137 evas_object_show(o); 150 evas_object_show(o);
138 evas_object_smart_callback_add(o, "changed", 151 evas_object_smart_callback_add(o, "changed",
139 _cb_op_behavior_cursor_blink_chg, term); 152 _cb_op_behavior_cursor_blink_chg, term);
140 153
141 o = elm_check_add(opbox); 154 o = elm_check_add(bx);
142 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); 155 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
143 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5); 156 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
144 elm_object_text_set(o, "Urgent on bell"); 157 elm_object_text_set(o, "Urgent on bell");
145 elm_check_state_set(o, config->urg_bell); 158 elm_check_state_set(o, config->urg_bell);
146 elm_box_pack_end(opbox, o); 159 elm_box_pack_end(bx, o);
147 evas_object_show(o); 160 evas_object_show(o);
148 evas_object_smart_callback_add(o, "changed", 161 evas_object_smart_callback_add(o, "changed",
149 _cb_op_behavior_urg_bell_chg, term); 162 _cb_op_behavior_urg_bell_chg, term);
150 163
151 o = elm_separator_add(opbox); 164 o = elm_separator_add(bx);
152 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); 165 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
153 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5); 166 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
154 elm_separator_horizontal_set(o, EINA_TRUE); 167 elm_separator_horizontal_set(o, EINA_TRUE);
155 elm_box_pack_end(opbox, o); 168 elm_box_pack_end(bx, o);
156 evas_object_show(o); 169 evas_object_show(o);
157 170
158 o = elm_label_add(opbox); 171 o = elm_label_add(bx);
159 evas_object_size_hint_weight_set(o, 0.0, 0.0); 172 evas_object_size_hint_weight_set(o, 0.0, 0.0);
160 evas_object_size_hint_align_set(o, 0.0, 0.5); 173 evas_object_size_hint_align_set(o, 0.0, 0.5);
161 elm_object_text_set(o, "Word separators:"); 174 elm_object_text_set(o, "Word separators:");
162 elm_box_pack_end(opbox, o); 175 elm_box_pack_end(bx, o);
163 evas_object_show(o); 176 evas_object_show(o);
164 177
165 op_wordsep = o = elm_entry_add(opbox); 178 op_wordsep = o = elm_entry_add(bx);
166 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); 179 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
167 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5); 180 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
168 elm_entry_single_line_set(o, EINA_TRUE); 181 elm_entry_single_line_set(o, EINA_TRUE);
@@ -174,26 +187,26 @@ options_behavior(Evas_Object *opbox, Evas_Object *term)
174 elm_object_text_set(o, txt); 187 elm_object_text_set(o, txt);
175 free(txt); 188 free(txt);
176 } 189 }
177 elm_box_pack_end(opbox, o); 190 elm_box_pack_end(bx, o);
178 evas_object_show(o); 191 evas_object_show(o);
179 evas_object_smart_callback_add(o, "changed", 192 evas_object_smart_callback_add(o, "changed",
180 _cb_op_behavior_wsep_chg, term); 193 _cb_op_behavior_wsep_chg, term);
181 194
182 o = elm_separator_add(opbox); 195 o = elm_separator_add(bx);
183 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); 196 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
184 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5); 197 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.5);
185 elm_separator_horizontal_set(o, EINA_TRUE); 198 elm_separator_horizontal_set(o, EINA_TRUE);
186 elm_box_pack_end(opbox, o); 199 elm_box_pack_end(bx, o);
187 evas_object_show(o); 200 evas_object_show(o);
188 201
189 o = elm_label_add(opbox); 202 o = elm_label_add(bx);
190 evas_object_size_hint_weight_set(o, 0.0, 0.0); 203 evas_object_size_hint_weight_set(o, 0.0, 0.0);
191 evas_object_size_hint_align_set(o, 0.0, 0.5); 204 evas_object_size_hint_align_set(o, 0.0, 0.5);
192 elm_object_text_set(o, "Scrollback lines:"); 205 elm_object_text_set(o, "Scrollback lines:");
193 elm_box_pack_end(opbox, o); 206 elm_box_pack_end(bx, o);
194 evas_object_show(o); 207 evas_object_show(o);
195 208
196 op_sbslider = o = elm_slider_add(opbox); 209 op_sbslider = o = elm_slider_add(bx);
197 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0); 210 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
198 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0); 211 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 0.0);
199 elm_slider_span_size_set(o, 160); 212 elm_slider_span_size_set(o, 160);
@@ -201,12 +214,12 @@ options_behavior(Evas_Object *opbox, Evas_Object *term)
201 elm_slider_indicator_format_set(o, "%1.0f"); 214 elm_slider_indicator_format_set(o, "%1.0f");
202 elm_slider_min_max_set(o, 0, 10000); 215 elm_slider_min_max_set(o, 0, 10000);
203 elm_slider_value_set(o, config->scrollback); 216 elm_slider_value_set(o, config->scrollback);
204 elm_box_pack_end(opbox, o); 217 elm_box_pack_end(bx, o);
205 evas_object_show(o); 218 evas_object_show(o);
206 evas_object_smart_callback_add(o, "delay,changed", 219 evas_object_smart_callback_add(o, "delay,changed",
207 _cb_op_behavior_sback_chg, term); 220 _cb_op_behavior_sback_chg, term);
208 221
209 evas_object_size_hint_weight_set(opbox, EVAS_HINT_EXPAND, 0.0); 222 evas_object_size_hint_weight_set(opbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
210 evas_object_size_hint_align_set(opbox, EVAS_HINT_FILL, 0.0); 223 evas_object_size_hint_align_set(opbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
211 evas_object_show(o); 224 evas_object_show(o);
212} 225}
diff --git a/src/bin/options_helpers.c b/src/bin/options_helpers.c
index 7f300f5..9990b5d 100644
--- a/src/bin/options_helpers.c
+++ b/src/bin/options_helpers.c
@@ -47,7 +47,7 @@ _cb_op_helper_url_image_chg(void *data, Evas_Object *obj, void *event __UNUSED__
47 if (config->helper.url.image) 47 if (config->helper.url.image)
48 { 48 {
49 eina_stringshare_del(config->helper.url.image); 49 eina_stringshare_del(config->helper.url.image);
50 config->helper.email = NULL; 50 config->helper.url.image = NULL;
51 } 51 }
52 txt = elm_entry_markup_to_utf8(elm_object_text_get(obj)); 52 txt = elm_entry_markup_to_utf8(elm_object_text_get(obj));
53 if (txt) 53 if (txt)
@@ -68,7 +68,7 @@ _cb_op_helper_url_video_chg(void *data, Evas_Object *obj, void *event __UNUSED__
68 if (config->helper.url.video) 68 if (config->helper.url.video)
69 { 69 {
70 eina_stringshare_del(config->helper.url.video); 70 eina_stringshare_del(config->helper.url.video);
71 config->helper.email = NULL; 71 config->helper.url.video = NULL;
72 } 72 }
73 txt = elm_entry_markup_to_utf8(elm_object_text_get(obj)); 73 txt = elm_entry_markup_to_utf8(elm_object_text_get(obj));
74 if (txt) 74 if (txt)
@@ -89,7 +89,7 @@ _cb_op_helper_url_general_chg(void *data, Evas_Object *obj, void *event __UNUSED
89 if (config->helper.url.general) 89 if (config->helper.url.general)
90 { 90 {
91 eina_stringshare_del(config->helper.url.general); 91 eina_stringshare_del(config->helper.url.general);
92 config->helper.email = NULL; 92 config->helper.url.general = NULL;
93 } 93 }
94 txt = elm_entry_markup_to_utf8(elm_object_text_get(obj)); 94 txt = elm_entry_markup_to_utf8(elm_object_text_get(obj));
95 if (txt) 95 if (txt)
@@ -110,7 +110,7 @@ _cb_op_helper_local_image_chg(void *data, Evas_Object *obj, void *event __UNUSED
110 if (config->helper.local.image) 110 if (config->helper.local.image)
111 { 111 {
112 eina_stringshare_del(config->helper.local.image); 112 eina_stringshare_del(config->helper.local.image);
113 config->helper.email = NULL; 113 config->helper.local.image = NULL;
114 } 114 }
115 txt = elm_entry_markup_to_utf8(elm_object_text_get(obj)); 115 txt = elm_entry_markup_to_utf8(elm_object_text_get(obj));
116 if (txt) 116 if (txt)
@@ -131,7 +131,7 @@ _cb_op_helper_local_video_chg(void *data, Evas_Object *obj, void *event __UNUSED
131 if (config->helper.local.video) 131 if (config->helper.local.video)
132 { 132 {
133 eina_stringshare_del(config->helper.local.video); 133 eina_stringshare_del(config->helper.local.video);
134 config->helper.email = NULL; 134 config->helper.local.video = NULL;
135 } 135 }
136 txt = elm_entry_markup_to_utf8(elm_object_text_get(obj)); 136 txt = elm_entry_markup_to_utf8(elm_object_text_get(obj));
137 if (txt) 137 if (txt)
@@ -152,7 +152,7 @@ _cb_op_helper_local_general_chg(void *data, Evas_Object *obj, void *event __UNUS
152 if (config->helper.local.general) 152 if (config->helper.local.general)
153 { 153 {
154 eina_stringshare_del(config->helper.local.general); 154 eina_stringshare_del(config->helper.local.general);
155 config->helper.email = NULL; 155 config->helper.local.general = NULL;
156 } 156 }
157 txt = elm_entry_markup_to_utf8(elm_object_text_get(obj)); 157 txt = elm_entry_markup_to_utf8(elm_object_text_get(obj));
158 if (txt) 158 if (txt)
@@ -188,6 +188,7 @@ options_helpers(Evas_Object *opbox, Evas_Object *term)
188 evas_object_show(o); 188 evas_object_show(o);
189 189
190 sc = o = elm_scroller_add(opbox); 190 sc = o = elm_scroller_add(opbox);
191 elm_scroller_content_min_limit(sc, EINA_TRUE, EINA_FALSE);
191 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 192 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
192 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL); 193 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
193 elm_box_pack_end(opbox, o); 194 elm_box_pack_end(opbox, o);