forked from enlightenment/enlightenment
Dunno how this got back in there but...
- Remove the Cfg_File struct as it's not being used. - Don't need to call _fill_data for every create_widgets. It's called when we create data the first time. This fixes 'setting an option in basic and clicking advanced would revert the value back' problem SVN revision: 21373
This commit is contained in:
parent
05bb9b9a1c
commit
6c2fb583ff
|
@ -1,10 +1,8 @@
|
|||
#include "e.h"
|
||||
#include <e.h>
|
||||
#include "e_mod_main.h"
|
||||
#include "e_mod_config.h"
|
||||
#include "config.h"
|
||||
|
||||
typedef struct _Cfg_File_Data Cfg_File_Data;
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
int autofit;
|
||||
|
@ -14,12 +12,6 @@ struct _E_Config_Dialog_Data
|
|||
double autoscroll_speed;
|
||||
};
|
||||
|
||||
struct _Cfg_File_Data
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
char *file;
|
||||
};
|
||||
|
||||
/* Protos */
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
|
@ -85,10 +77,6 @@ static Evas_Object *
|
|||
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
Evas_Object *o, *ob;
|
||||
IBar *ib;
|
||||
|
||||
ib = cfd->data;
|
||||
_fill_data(ib, cfdata);
|
||||
|
||||
o = e_widget_list_add(evas, 0, 0);
|
||||
ob = e_widget_check_add(evas, _("Show Follower"), &(cfdata->follower));
|
||||
|
@ -106,22 +94,14 @@ _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
ib = cfd->data;
|
||||
e_border_button_bindings_ungrab_all();
|
||||
if ((cfdata->follower) && (!ib->conf->follower))
|
||||
{
|
||||
ib->conf->follower = 1;
|
||||
}
|
||||
ib->conf->follower = 1;
|
||||
else if (!(cfdata->follower) && (ib->conf->follower))
|
||||
{
|
||||
ib->conf->follower = 0;
|
||||
}
|
||||
ib->conf->follower = 0;
|
||||
|
||||
if ((cfdata->autofit) && (ib->conf->width == IBAR_WIDTH_FIXED))
|
||||
{
|
||||
ib->conf->width = IBAR_WIDTH_AUTO;
|
||||
}
|
||||
ib->conf->width = IBAR_WIDTH_AUTO;
|
||||
else if (!(cfdata->autofit) && (ib->conf->width == IBAR_WIDTH_AUTO))
|
||||
{
|
||||
ib->conf->width = IBAR_WIDTH_FIXED;
|
||||
}
|
||||
ib->conf->width = IBAR_WIDTH_FIXED;
|
||||
|
||||
e_border_button_bindings_grab_all();
|
||||
e_config_save_queue();
|
||||
|
@ -134,10 +114,6 @@ static Evas_Object *
|
|||
_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
Evas_Object *o, *of, *ob;
|
||||
IBar *ib;
|
||||
|
||||
ib = cfd->data;
|
||||
_fill_data(ib, cfdata);
|
||||
|
||||
o = e_widget_list_add(evas, 0, 0);
|
||||
|
||||
|
@ -175,35 +151,21 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
|||
ib = cfd->data;
|
||||
e_border_button_bindings_ungrab_all();
|
||||
if ((cfdata->follower) && (!ib->conf->follower))
|
||||
{
|
||||
ib->conf->follower = 1;
|
||||
}
|
||||
ib->conf->follower = 1;
|
||||
else if (!(cfdata->follower) && (ib->conf->follower))
|
||||
{
|
||||
ib->conf->follower = 0;
|
||||
}
|
||||
ib->conf->follower = 0;
|
||||
|
||||
if ((cfdata->autofit) && (ib->conf->width == IBAR_WIDTH_FIXED))
|
||||
{
|
||||
ib->conf->width = IBAR_WIDTH_AUTO;
|
||||
}
|
||||
ib->conf->width = IBAR_WIDTH_AUTO;
|
||||
else if (!(cfdata->autofit) && (ib->conf->width == IBAR_WIDTH_AUTO))
|
||||
{
|
||||
ib->conf->width = IBAR_WIDTH_FIXED;
|
||||
}
|
||||
ib->conf->width = IBAR_WIDTH_FIXED;
|
||||
|
||||
if (cfdata->iconsize != ib->conf->iconsize)
|
||||
{
|
||||
ib->conf->iconsize = cfdata->iconsize;
|
||||
}
|
||||
ib->conf->iconsize = cfdata->iconsize;
|
||||
if (cfdata->follow_speed != ib->conf->follow_speed)
|
||||
{
|
||||
ib->conf->follow_speed = cfdata->follow_speed;
|
||||
}
|
||||
ib->conf->follow_speed = cfdata->follow_speed;
|
||||
if (cfdata->autoscroll_speed != ib->conf->autoscroll_speed)
|
||||
{
|
||||
ib->conf->autoscroll_speed = cfdata->autoscroll_speed;
|
||||
}
|
||||
ib->conf->autoscroll_speed = cfdata->autoscroll_speed;
|
||||
|
||||
e_border_button_bindings_grab_all();
|
||||
e_config_save_queue();
|
||||
|
|
Loading…
Reference in New Issue