From 8c45e0ae5e7281bc2f98f26535e3f6344347e680 Mon Sep 17 00:00:00 2001 From: Christopher Michael Date: Sat, 18 Mar 2006 16:40:28 +0000 Subject: [PATCH] Bah...Remove the unused Cfg_File struct. Some formatting. Refix the config options changing values when switching between Basic/Advanced by not calling _fill_data twice. It's called on _create_data, there is no need to call it again. SVN revision: 21374 --- src/modules/ibox/e_mod_config.c | 60 ++++++--------------------------- 1 file changed, 11 insertions(+), 49 deletions(-) diff --git a/src/modules/ibox/e_mod_config.c b/src/modules/ibox/e_mod_config.c index bc0ddff7c..f2a941c83 100644 --- a/src/modules/ibox/e_mod_config.c +++ b/src/modules/ibox/e_mod_config.c @@ -3,8 +3,6 @@ #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; - IBox *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 == IBOX_WIDTH_FIXED)) - { - ib->conf->width = IBOX_WIDTH_AUTO; - } + ib->conf->width = IBOX_WIDTH_AUTO; else if (!(cfdata->autofit) && (ib->conf->width == IBOX_WIDTH_AUTO)) - { - ib->conf->width = IBOX_WIDTH_FIXED; - } + ib->conf->width = IBOX_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; - IBox *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 == IBOX_WIDTH_FIXED)) - { - ib->conf->width = IBOX_WIDTH_AUTO; - } + ib->conf->width = IBOX_WIDTH_AUTO; else if (!(cfdata->autofit) && (ib->conf->width == IBOX_WIDTH_AUTO)) - { - ib->conf->width = IBOX_WIDTH_FIXED; - } + ib->conf->width = IBOX_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();