summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-08-22 03:12:40 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-08-22 03:12:40 +0000
commitaf8667a8329e9dcd328b55d96d70da55099a5d02 (patch)
treef8065a8239d398a263ee8f9bfda62688fa9fcadb /src
parent60cda4bcf38102df543650c459d46730c035cf50 (diff)
testing toolbar - figuring out why icon size set didnt work and also
added empty colros config pane, testing vertical toolbar scroll. SVN revision: 75513
Diffstat (limited to 'src')
-rw-r--r--src/bin/Makefile.am3
-rw-r--r--src/bin/options.c37
-rw-r--r--src/bin/options_colors.c20
-rw-r--r--src/bin/options_colors.h1
-rw-r--r--src/bin/options_font.c4
5 files changed, 57 insertions, 8 deletions
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index 416647c..5716e9b 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -19,8 +19,9 @@ main.c main.h \
19media.c media.h \ 19media.c media.h \
20options.c options.h \ 20options.c options.h \
21options_behavior.c options_behavior.h \ 21options_behavior.c options_behavior.h \
22options_helpers.c options_helpers.h \ 22options_colors.c options_colors.h \
23options_font.c options_font.h \ 23options_font.c options_font.h \
24options_helpers.c options_helpers.h \
24options_video.c options_video.h \ 25options_video.c options_video.h \
25options_theme.c options_theme.h \ 26options_theme.c options_theme.h \
26options_wallpaper.c options_wallpaper.h \ 27options_wallpaper.c options_wallpaper.h \
diff --git a/src/bin/options.c b/src/bin/options.c
index c58bdec..876f797 100644
--- a/src/bin/options.c
+++ b/src/bin/options.c
@@ -8,6 +8,7 @@
8#include "options_video.h" 8#include "options_video.h"
9#include "options_theme.h" 9#include "options_theme.h"
10#include "options_wallpaper.h" 10#include "options_wallpaper.h"
11#include "options_colors.h"
11#include "config.h" 12#include "config.h"
12#include "termio.h" 13#include "termio.h"
13 14
@@ -18,49 +19,72 @@ static Eina_Bool op_out = EINA_FALSE;
18static Ecore_Timer *op_del_timer = NULL; 19static Ecore_Timer *op_del_timer = NULL;
19static Evas_Object *saved_win = NULL; 20static Evas_Object *saved_win = NULL;
20static Evas_Object *saved_bg = NULL; 21static Evas_Object *saved_bg = NULL;
22static int mode = -1;
21 23
22static void 24static void
23_cb_op_font(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) 25_cb_op_font(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
24{ 26{
27 if (mode == 1) return;
25 elm_box_clear(op_opbox); 28 elm_box_clear(op_opbox);
26 options_font(op_opbox, data); 29 options_font(op_opbox, data);
30 mode = 1;
27} 31}
28 32
29static void 33static void
30_cb_op_theme(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) 34_cb_op_theme(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
31{ 35{
36 if (mode == 2) return;
32 elm_box_clear(op_opbox); 37 elm_box_clear(op_opbox);
33 options_theme(op_opbox, data); 38 options_theme(op_opbox, data);
34 // XXX: not done yet 39 // XXX: not done yet
40 mode = 2;
35} 41}
36 42
37static void 43static void
38_cb_op_wallpaper(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) 44_cb_op_wallpaper(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
39{ 45{
46 if (mode == 3) return;
40 elm_box_clear(op_opbox); 47 elm_box_clear(op_opbox);
41 options_wallpaper(op_opbox, data); 48 options_wallpaper(op_opbox, data);
42 // XXX: not done yet 49 // XXX: not done yet
50 mode = 3;
51}
52
53static void
54_cb_op_colors(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
55{
56 if (mode == 4) return;
57 elm_box_clear(op_opbox);
58 options_colors(op_opbox, data);
59 // XXX: not done yet
60 mode = 4;
43} 61}
44 62
45static void 63static void
46_cb_op_video(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) 64_cb_op_video(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
47{ 65{
66 if (mode == 5) return;
48 elm_box_clear(op_opbox); 67 elm_box_clear(op_opbox);
49 options_video(op_opbox, data); 68 options_video(op_opbox, data);
69 mode = 5;
50} 70}
51 71
52static void 72static void
53_cb_op_behavior(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) 73_cb_op_behavior(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
54{ 74{
75 if (mode == 6) return;
55 elm_box_clear(op_opbox); 76 elm_box_clear(op_opbox);
56 options_behavior(op_opbox, data); 77 options_behavior(op_opbox, data);
78 mode = 6;
57} 79}
58 80
59static void 81static void
60_cb_op_helpers(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__) 82_cb_op_helpers(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
61{ 83{
84 if (mode == 7) return;
62 elm_box_clear(op_opbox); 85 elm_box_clear(op_opbox);
63 options_helpers(op_opbox, data); 86 options_helpers(op_opbox, data);
87 mode = 7;
64} 88}
65 89
66static void 90static void
@@ -94,6 +118,7 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
94 118
95 saved_win = win; 119 saved_win = win;
96 saved_bg = bg; 120 saved_bg = bg;
121 mode = -1;
97 if (!op_frame) 122 if (!op_frame)
98 { 123 {
99 Elm_Object_Item *it_fn; 124 Elm_Object_Item *it_fn;
@@ -123,14 +148,12 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
123 148
124 op_toolbar = o = elm_toolbar_add(win); 149 op_toolbar = o = elm_toolbar_add(win);
125 evas_object_size_hint_weight_set(o, 0.0, EVAS_HINT_EXPAND); 150 evas_object_size_hint_weight_set(o, 0.0, EVAS_HINT_EXPAND);
126 evas_object_size_hint_align_set(o, 0.5, 0.0); 151 evas_object_size_hint_align_set(o, 0.5, EVAS_HINT_FILL);
127 elm_toolbar_horizontal_set(o, EINA_FALSE); 152 elm_toolbar_horizontal_set(o, EINA_FALSE);
128 elm_object_style_set(o, "item_horizontal"); 153 elm_object_style_set(o, "item_horizontal");
129 evas_object_size_hint_weight_set(o, 0.0, 0.0);
130 evas_object_size_hint_align_set(o, 0.5, 0.0);
131 elm_toolbar_icon_size_set(o, 16); 154 elm_toolbar_icon_size_set(o, 16);
132 elm_toolbar_shrink_mode_set(o, ELM_TOOLBAR_SHRINK_NONE); 155 elm_toolbar_shrink_mode_set(o, ELM_TOOLBAR_SHRINK_SCROLL);
133 elm_toolbar_select_mode_set(o, ELM_OBJECT_SELECT_MODE_DEFAULT); 156 elm_toolbar_select_mode_set(o, ELM_OBJECT_SELECT_MODE_ALWAYS);
134 elm_toolbar_menu_parent_set(o, win); 157 elm_toolbar_menu_parent_set(o, win);
135 elm_toolbar_homogeneous_set(o, EINA_FALSE); 158 elm_toolbar_homogeneous_set(o, EINA_FALSE);
136 159
@@ -140,6 +163,8 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
140 "Theme", _cb_op_theme, term); 163 "Theme", _cb_op_theme, term);
141 elm_toolbar_item_append(o, "preferences-desktop-wallpaper", 164 elm_toolbar_item_append(o, "preferences-desktop-wallpaper",
142 "Wallpaper", _cb_op_wallpaper, term); 165 "Wallpaper", _cb_op_wallpaper, term);
166 elm_toolbar_item_append(o, "preferences-color",
167 "Colors", _cb_op_colors, term);
143 elm_toolbar_item_append(o, "preferences-desktop-multimedia", 168 elm_toolbar_item_append(o, "preferences-desktop-multimedia",
144 "Video", _cb_op_video, term); 169 "Video", _cb_op_video, term);
145 elm_toolbar_item_append(o, "system-run", 170 elm_toolbar_item_append(o, "system-run",
@@ -153,7 +178,7 @@ options_toggle(Evas_Object *win, Evas_Object *bg, Evas_Object *term)
153 elm_toolbar_item_selected_set(it_fn, EINA_TRUE); 178 elm_toolbar_item_selected_set(it_fn, EINA_TRUE);
154 179
155 op_temp = o = elm_check_add(win); 180 op_temp = o = elm_check_add(win);
156 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 181 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, 0.0);
157 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 1.0); 182 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, 1.0);
158 elm_object_text_set(o, "Temporary"); 183 elm_object_text_set(o, "Temporary");
159 elm_check_state_set(o, config->temporary); 184 elm_check_state_set(o, config->temporary);
diff --git a/src/bin/options_colors.c b/src/bin/options_colors.c
new file mode 100644
index 0000000..e121190
--- /dev/null
+++ b/src/bin/options_colors.c
@@ -0,0 +1,20 @@
1#include "private.h"
2
3#include <Elementary.h>
4#include "config.h"
5#include "termio.h"
6#include "options.h"
7#include "options_colors.h"
8
9void
10options_colors(Evas_Object *opbox, Evas_Object *term __UNUSED__)
11{
12 Evas_Object *o;
13
14 o = elm_label_add(opbox);
15 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
16 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
17 elm_object_text_set(o, "Not Implemented Yet.");
18 evas_object_show(o);
19 elm_box_pack_end(opbox, o);
20}
diff --git a/src/bin/options_colors.h b/src/bin/options_colors.h
new file mode 100644
index 0000000..60f4ebf
--- /dev/null
+++ b/src/bin/options_colors.h
@@ -0,0 +1 @@
void options_colors(Evas_Object *opbox, Evas_Object *term);
diff --git a/src/bin/options_font.c b/src/bin/options_font.c
index 5c93e2a..18bc0e6 100644
--- a/src/bin/options_font.c
+++ b/src/bin/options_font.c
@@ -7,6 +7,8 @@
7#include "options_font.h" 7#include "options_font.h"
8#include "utils.h" 8#include "utils.h"
9 9
10#define TEST_STRING "oislOIS.015!|,"
11
10static Evas_Object *op_fontslider, *op_fontlist, *op_fsml, *op_fbig; 12static Evas_Object *op_fontslider, *op_fontlist, *op_fsml, *op_fbig;
11 13
12typedef struct _Font Font; 14typedef struct _Font Font;
@@ -104,7 +106,7 @@ _cb_op_font_preview_eval(void *data, Evas *e __UNUSED__, Evas_Object *obj, void
104 { 106 {
105 o = evas_object_text_add(evas_object_evas_get(obj)); 107 o = evas_object_text_add(evas_object_evas_get(obj));
106 evas_object_color_set(o, 0, 0, 0, 255); 108 evas_object_color_set(o, 0, 0, 0, 255);
107 evas_object_text_text_set(o, "Abc 123 $@#"); 109 evas_object_text_text_set(o, TEST_STRING);
108 evas_object_scale_set(o, elm_config_scale_get()); 110 evas_object_scale_set(o, elm_config_scale_get());
109 if (f->bitmap) 111 if (f->bitmap)
110 { 112 {