3 /* local function protos */
4 static void *_create_data (E_Config_Dialog *cfd);
5 static void _fill_data (E_Config_Dialog_Data *cfdata);
6 static void _free_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
7 static int _basic_apply (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
8 static Evas_Object *_basic_create (E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
10 struct _E_Config_Dialog_Data
17 e_int_toolbar_config(E_Toolbar *tbar)
20 E_Config_Dialog_View *v;
23 v = E_NEW(E_Config_Dialog_View, 1);
25 con = e_container_current_get(e_manager_current_get());
26 v->create_cfdata = _create_data;
27 v->free_cfdata = _free_data;
28 v->basic.apply_cfdata = _basic_apply;
29 v->basic.create_widgets = _basic_create;
30 cfd = e_config_dialog_new(con, _("Toolbar Settings"), "E",
31 "_toolbar_config_dialog", "preferences-desktop-shelf",
38 _create_data(E_Config_Dialog *cfd)
40 E_Config_Dialog_Data *cfdata;
42 cfdata = E_NEW(E_Config_Dialog_Data, 1);
43 cfdata->tbar = cfd->data;
49 _fill_data(E_Config_Dialog_Data *cfdata)
51 cfdata->orient = cfdata->tbar->gadcon->orient;
55 _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
57 cfdata->tbar->cfg_dlg = NULL;
62 _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
68 e_toolbar_orient(tbar, cfdata->orient);
69 e_toolbar_position_calc(tbar);
70 if ((tbar->fwin) && (tbar->fwin->cb_resize))
71 tbar->fwin->cb_resize(tbar->fwin);
76 _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata)
78 Evas_Object *o, *ot, *ow;
81 o = e_widget_list_add(evas, 0, 0);
82 ot = e_widget_frametable_add(evas, _("Layout"), 1);
83 rg = e_widget_radio_group_new(&(cfdata->orient));
85 ow = e_widget_radio_icon_add(evas, NULL, "preferences-position-left",
86 24, 24, E_GADCON_ORIENT_LEFT, rg);
87 e_widget_frametable_object_append(ot, ow, 0, 1, 1, 1, 1, 1, 1, 1);
89 ow = e_widget_radio_icon_add(evas, NULL, "preferences-position-top",
90 24, 24, E_GADCON_ORIENT_TOP, rg);
91 e_widget_frametable_object_append(ot, ow, 0, 0, 1, 1, 1, 1, 1, 1);
93 ow = e_widget_radio_icon_add(evas, NULL, "preferences-position-right",
94 24, 24, E_GADCON_ORIENT_RIGHT, rg);
95 e_widget_frametable_object_append(ot, ow, 2, 1, 1, 1, 1, 1, 1, 1);
97 ow = e_widget_radio_icon_add(evas, NULL, "preferences-position-bottom",
98 24, 24, E_GADCON_ORIENT_BOTTOM, rg);
99 e_widget_frametable_object_append(ot, ow, 0, 1, 1, 1, 1, 1, 1, 1);
100 e_widget_list_object_append(o, ot, 1, 1, 0.5);