don't define gconf_key as const and save a few casts
2007-08-31 Jens Granseuer <jensgr@gmx.net> * appearance-font.c: (font_render_load), (setup_font_pair), (enum_group_load), (enum_group_create): don't define gconf_key as const and save a few casts svn path=/trunk/; revision=8062
This commit is contained in:
parent
326eeb16b7
commit
d16f73873e
2 changed files with 14 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2007-08-31 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
|
* appearance-font.c: (font_render_load), (setup_font_pair),
|
||||||
|
(enum_group_load), (enum_group_create): don't define gconf_key as
|
||||||
|
const and save a few casts
|
||||||
|
|
||||||
2007-08-31 Jens Granseuer <jensgr@gmx.net>
|
2007-08-31 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
* appearance-font.c: (enum_group_destroy), (cb_show_details),
|
* appearance-font.c: (enum_group_destroy), (cb_show_details),
|
||||||
|
|
|
@ -341,7 +341,7 @@ font_render_get_gconf (GConfClient *client,
|
||||||
typedef struct {
|
typedef struct {
|
||||||
Antialiasing antialiasing;
|
Antialiasing antialiasing;
|
||||||
Hinting hinting;
|
Hinting hinting;
|
||||||
GtkWidget *radio;
|
GtkToggleButton *radio;
|
||||||
} FontPair;
|
} FontPair;
|
||||||
|
|
||||||
static GSList *font_pairs = NULL;
|
static GSList *font_pairs = NULL;
|
||||||
|
@ -362,7 +362,7 @@ font_render_load (GConfClient *client)
|
||||||
FontPair *pair = tmp_list->data;
|
FontPair *pair = tmp_list->data;
|
||||||
|
|
||||||
if (antialiasing == pair->antialiasing && hinting == pair->hinting) {
|
if (antialiasing == pair->antialiasing && hinting == pair->hinting) {
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pair->radio), TRUE);
|
gtk_toggle_button_set_active (pair->radio, TRUE);
|
||||||
inconsistent = FALSE;
|
inconsistent = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -370,7 +370,7 @@ font_render_load (GConfClient *client)
|
||||||
for (tmp_list = font_pairs; tmp_list; tmp_list = tmp_list->next) {
|
for (tmp_list = font_pairs; tmp_list; tmp_list = tmp_list->next) {
|
||||||
FontPair *pair = tmp_list->data;
|
FontPair *pair = tmp_list->data;
|
||||||
|
|
||||||
gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (pair->radio), inconsistent);
|
gtk_toggle_button_set_inconsistent (pair->radio, inconsistent);
|
||||||
}
|
}
|
||||||
|
|
||||||
in_change = FALSE;
|
in_change = FALSE;
|
||||||
|
@ -415,7 +415,7 @@ setup_font_pair (GtkWidget *radio,
|
||||||
|
|
||||||
pair->antialiasing = antialiasing;
|
pair->antialiasing = antialiasing;
|
||||||
pair->hinting = hinting;
|
pair->hinting = hinting;
|
||||||
pair->radio = radio;
|
pair->radio = GTK_TOGGLE_BUTTON (radio);
|
||||||
|
|
||||||
setup_font_sample (darea, antialiasing, hinting);
|
setup_font_sample (darea, antialiasing, hinting);
|
||||||
font_pairs = g_slist_prepend (font_pairs, pair);
|
font_pairs = g_slist_prepend (font_pairs, pair);
|
||||||
|
@ -580,7 +580,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
GConfClient *client;
|
GConfClient *client;
|
||||||
GSList *items;
|
GSList *items;
|
||||||
const gchar *gconf_key;
|
gchar *gconf_key;
|
||||||
GConfEnumStringPair *enums;
|
GConfEnumStringPair *enums;
|
||||||
int default_value;
|
int default_value;
|
||||||
} EnumGroup;
|
} EnumGroup;
|
||||||
|
@ -588,7 +588,7 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
EnumGroup *group;
|
EnumGroup *group;
|
||||||
GtkWidget *widget;
|
GtkToggleButton *widget;
|
||||||
int value;
|
int value;
|
||||||
} EnumItem;
|
} EnumItem;
|
||||||
|
|
||||||
|
@ -610,7 +610,7 @@ enum_group_load (EnumGroup *group)
|
||||||
EnumItem *item = tmp_list->data;
|
EnumItem *item = tmp_list->data;
|
||||||
|
|
||||||
if (val == item->value)
|
if (val == item->value)
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (item->widget), TRUE);
|
gtk_toggle_button_set_active (item->widget, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
in_change = FALSE;
|
in_change = FALSE;
|
||||||
|
@ -668,7 +668,7 @@ enum_group_create (const gchar *gconf_key,
|
||||||
|
|
||||||
item = g_new (EnumItem, 1);
|
item = g_new (EnumItem, 1);
|
||||||
item->group = group;
|
item->group = group;
|
||||||
item->widget = widget;
|
item->widget = GTK_TOGGLE_BUTTON (widget);
|
||||||
item->value = va_arg (args, int);
|
item->value = va_arg (args, int);
|
||||||
|
|
||||||
g_signal_connect (item->widget, "toggled",
|
g_signal_connect (item->widget, "toggled",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue