Commit 9ad970d1 authored by Arturo Espinosa's avatar Arturo Espinosa
Browse files

Minimal bug fix

parent 5a7c1eeb
......@@ -348,7 +348,6 @@ create_number_format_page (GtkWidget *prop_win, CellList *cells)
/* 3.2: Invoke the current style for the cell if possible */
if (format){
if (!format_find (format->format))
gtk_entry_set_text (GTK_ENTRY (number_input), format->format);
......@@ -451,7 +450,7 @@ create_align_page (GtkWidget *prop_win, CellList *cells)
if (cells){
ha = ((Cell *) (cells->data))->style->halign;
va = ((Cell *) (cells->data))->style->valign;
for (ok = 1, l = cells; l; l = l->data){
for (ok = 1, l = cells; l; l = l->next){
Cell *cell = l->data;
if (cell->style->halign != ha || cell->style->valign != va){
......@@ -463,7 +462,7 @@ create_align_page (GtkWidget *prop_win, CellList *cells)
/* If all the cells share the same alignment, select that on the radio boxes */
if (ok){
int n;
for (n = 0; horizontal_aligns [n].name; n++)
if (horizontal_aligns [n].flag == ha){
gtk_radio_button_select (hradio_list, n);
......
......@@ -348,7 +348,6 @@ create_number_format_page (GtkWidget *prop_win, CellList *cells)
/* 3.2: Invoke the current style for the cell if possible */
if (format){
if (!format_find (format->format))
gtk_entry_set_text (GTK_ENTRY (number_input), format->format);
......@@ -451,7 +450,7 @@ create_align_page (GtkWidget *prop_win, CellList *cells)
if (cells){
ha = ((Cell *) (cells->data))->style->halign;
va = ((Cell *) (cells->data))->style->valign;
for (ok = 1, l = cells; l; l = l->data){
for (ok = 1, l = cells; l; l = l->next){
Cell *cell = l->data;
if (cell->style->halign != ha || cell->style->valign != va){
......@@ -463,7 +462,7 @@ create_align_page (GtkWidget *prop_win, CellList *cells)
/* If all the cells share the same alignment, select that on the radio boxes */
if (ok){
int n;
for (n = 0; horizontal_aligns [n].name; n++)
if (horizontal_aligns [n].flag == ha){
gtk_radio_button_select (hradio_list, n);
......
......@@ -51,8 +51,8 @@ gtk_radio_button_select (GSList *group, int n)
GSList *l;
int len = g_slist_length (group);
l = g_slist_nth (group, len - n);
gtk_toggle_button_toggled (GTK_TOGGLE_BUTTON (l->data));
l = g_slist_nth (group, len - n - 1);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (l->data), 1);
}
static void
......
......@@ -51,8 +51,8 @@ gtk_radio_button_select (GSList *group, int n)
GSList *l;
int len = g_slist_length (group);
l = g_slist_nth (group, len - n);
gtk_toggle_button_toggled (GTK_TOGGLE_BUTTON (l->data));
l = g_slist_nth (group, len - n - 1);
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (l->data), 1);
}
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment