formatting - and remove dead code. hinting dialog not used anymore.

SVN revision: 24692
This commit is contained in:
Carsten Haitzler 2006-08-14 15:28:44 +00:00
parent a9e7340190
commit 5e0a3ad149
5 changed files with 1 additions and 128 deletions

View File

@ -142,7 +142,6 @@ e_int_config_display.h \
e_int_config_desklock.h \
e_int_config_exebuf.h \
e_int_config_cfgdialogs.h \
e_int_config_hinting.h \
e_deskpreview.h \
e_exebuf.h \
e_desklock.h \
@ -291,7 +290,6 @@ e_int_config_display.c \
e_int_config_desklock.c \
e_int_config_exebuf.c \
e_int_config_cfgdialogs.c \
e_int_config_hinting.c \
e_deskpreview.c \
e_exebuf.c \
e_desklock.c \

View File

@ -115,7 +115,6 @@
#include "e_int_config_desklock.h"
#include "e_int_config_exebuf.h"
#include "e_int_config_cfgdialogs.h"
#include "e_int_config_hinting.h"
#include "e_deskpreview.h"
#include "e_exebuf.h"
#include "e_desklock.h"

View File

@ -131,7 +131,7 @@ e_int_config_fonts(E_Container *con)
cfd = e_config_dialog_new(con,
_("Font Settings"),
"E", "_config_fonts_dialog",
"E", "_config_fonts_dialog",
"enlightenment/fonts", 0, v, NULL);
return cfd;
}

View File

@ -1,112 +0,0 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* FIXME: FIXME: this code is dead - part of font dialog */
/* PROTOTYPES - same all the time */
static void *_create_data(E_Config_Dialog *cfd);
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
/* Actual config data we will be playing with whil the dialog is active */
struct _E_Config_Dialog_Data
{
/*- BASIC -*/
int hinting;
};
/* a nice easy setup function that does the dirty work */
EAPI E_Config_Dialog *
e_int_config_hinting(E_Container *con)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
v = E_NEW(E_Config_Dialog_View, 1);
/* methods */
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
v->basic.apply_cfdata = _basic_apply_data;
v->basic.create_widgets = _basic_create_widgets;
v->advanced.apply_cfdata = NULL;
v->advanced.create_widgets = NULL;
/* create config diaolg for NULL object/data */
cfd = e_config_dialog_new(con,
_("Font Hinting Settings"),
"E", "_config_hinting_dialog",
NULL, 0, v, NULL);
return cfd;
}
/**--CREATE--**/
static void
_fill_data(E_Config_Dialog_Data *cfdata)
{
cfdata->hinting = e_config->font_hinting;
}
static void *
_create_data(E_Config_Dialog *cfd)
{
/* Create cfdata - cfdata is a temporary block of config data that this
* dialog will be dealing with while configuring. it will be applied to
* the running systems/config in the apply methods
*/
E_Config_Dialog_Data *cfdata;
cfdata = E_NEW(E_Config_Dialog_Data, 1);
_fill_data(cfdata);
return cfdata;
}
static void
_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
/* Free the cfdata */
free(cfdata);
}
/**--APPLY--**/
static int
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
/* Actually take our cfdata settings and apply them in real life */
e_config->font_hinting = cfdata->hinting;
e_config_save_queue();
e_canvas_rehint();
return 1; /* Apply was OK */
}
/**--GUI--**/
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
{
/* generate the core widget layout for a basic dialog */
Evas_Object *o, *ob;
E_Radio_Group *rg;
int option_enable;
o = e_widget_list_add(evas, 0, 0);
rg = e_widget_radio_group_new(&(cfdata->hinting));
option_enable = evas_font_hinting_can_hint(evas, EVAS_FONT_HINTING_BYTECODE);
ob = e_widget_radio_add(evas, _("Bytecode Hinting"), 0, rg);
e_widget_disabled_set(ob, !option_enable);
e_widget_list_object_append(o, ob, 1, 1, 0.5);
option_enable = evas_font_hinting_can_hint(evas, EVAS_FONT_HINTING_AUTO);
ob = e_widget_radio_add(evas, _("Automatic Hinting"), 1, rg);
e_widget_disabled_set(ob, !option_enable);
e_widget_list_object_append(o, ob, 1, 1, 0.5);
option_enable = evas_font_hinting_can_hint(evas, EVAS_FONT_HINTING_NONE);
ob = e_widget_radio_add(evas, _("No Hinting"), 2, rg);
e_widget_disabled_set(ob, !option_enable);
e_widget_list_object_append(o, ob, 1, 1, 0.5);
return o;
}

View File

@ -1,12 +0,0 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_INT_CONFIG_HINTING_H
#define E_INT_CONFIG_HINTING_H
EAPI E_Config_Dialog *e_int_config_hinting(E_Container *con);
#endif
#endif