From: Jim Evins Date: Sun, 22 Nov 2009 23:50:38 +0000 (-0500) Subject: Use accessor functions instead direct access X-Git-Tag: glabels-2_3_0~130 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b87405cab3c8fba70b5261280b5ed1e3de0871bd;p=glabels Use accessor functions instead direct access Replaced direct access of widget fields with accessor functions. This round catches flags and allocations which now have accessor functions in Gtk 2.18. As a result, the master branch now requires Gtk-2.18/GNOME-2.28. --- diff --git a/configure.in b/configure.in index 86315131..663d849d 100644 --- a/configure.in +++ b/configure.in @@ -58,13 +58,13 @@ dnl --------------------------------------------------------------------------- dnl - Library dependencies dnl --------------------------------------------------------------------------- dnl Required dependencies -GLIB_REQUIRED=2.20.0 -GTK_REQUIRED=2.16.0 -GCONF_REQUIRED=2.26.0 +GLIB_REQUIRED=2.22.0 +GTK_REQUIRED=2.18.0 +GCONF_REQUIRED=2.28.0 LIBXML_REQUIRED=2.7.0 dnl Optional dependencies -LIBEBOOK_REQUIRED=2.26.0 +LIBEBOOK_REQUIRED=2.28.0 LIBBARCODE_REQUIRED=0.98 LIBQRENCODE_REQUIRED=3.1.0 LIBIEC16022_REQUIRED=0.2.4 diff --git a/docs/libglabels/libglabels-decl-list.txt b/docs/libglabels/libglabels-decl-list.txt deleted file mode 100644 index b86ecf0f..00000000 --- a/docs/libglabels/libglabels-decl-list.txt +++ /dev/null @@ -1,172 +0,0 @@ -
-xml-paper -lgl_xml_paper_read_papers_from_file -lgl_xml_paper_parse_papers_doc -lgl_xml_paper_parse_paper_node -
- -
-xml-category -lgl_xml_category_read_categories_from_file -lgl_xml_category_parse_categories_doc -lgl_xml_category_parse_category_node -
- -
-libglabels -
- -
-db -lglDbRegStatus -lgl_db_init -lgl_db_get_paper_id_list -lgl_db_free_paper_id_list -lgl_db_get_paper_name_list -lgl_db_free_paper_name_list -lgl_db_lookup_paper_from_name -lgl_db_lookup_paper_from_id -lgl_db_lookup_paper_id_from_name -lgl_db_lookup_paper_name_from_id -lgl_db_is_paper_id_known -lgl_db_is_paper_id_other -lgl_db_get_category_id_list -lgl_db_free_category_id_list -lgl_db_get_category_name_list -lgl_db_free_category_name_list -lgl_db_lookup_category_from_name -lgl_db_lookup_category_from_id -lgl_db_lookup_category_id_from_name -lgl_db_lookup_category_name_from_id -lgl_db_is_category_id_known -lgl_db_get_brand_list -lgl_db_free_brand_list -lgl_db_register_template -lgl_db_does_template_exist -lgl_db_does_template_name_exist -lgl_db_get_template_name_list_unique -lgl_db_get_template_name_list_all -lgl_db_free_template_name_list -lgl_db_lookup_template_from_name -lgl_db_print_known_papers -lgl_db_print_known_categories -lgl_db_print_known_templates -lgl_db_print_aliases -
- -
-units -lglUnits -lgl_units_get_id -lgl_units_from_id -lgl_units_get_name -lgl_units_from_name -lgl_units_get_points_per_unit -lgl_units_get_units_per_point -
- -
-str -lgl_str_utf8_casecmp -
- -
-template -lglTemplate -lglTemplateAlias -lglTemplateFrameAll -lglTemplateFrameRect -lglTemplateFrameRound -lglTemplateFrameCD -lglTemplateLayout -lglTemplateMarkupMargin -lglTemplateMarkupLine -lglTemplateMarkupCircle -lglTemplateMarkupRect -lglTemplateOrigin -lglTemplateFrameShape -lglTemplateFrame -lglTemplateMarkupType -lglTemplateMarkup -lgl_template_get_name -lgl_template_do_templates_match -lgl_template_does_brand_match -lgl_template_does_page_size_match -lgl_template_does_category_match -lgl_template_frame_get_size -lgl_template_frame_get_n_labels -lgl_template_frame_get_origins -lgl_template_new -lgl_template_add_alias -lgl_template_add_category -lgl_template_add_frame -lgl_template_frame_rect_new -lgl_template_alias_new -lgl_template_frame_round_new -lgl_template_frame_cd_new -lgl_template_frame_add_layout -lgl_template_frame_add_markup -lgl_template_layout_new -lgl_template_markup_margin_new -lgl_template_markup_line_new -lgl_template_markup_circle_new -lgl_template_markup_rect_new -lgl_template_dup -lgl_template_free -lgl_template_alias_dup -lgl_template_alias_free -lgl_template_frame_dup -lgl_template_frame_free -lgl_template_layout_dup -lgl_template_layout_free -lgl_template_markup_dup -lgl_template_markup_free -
- -
-category -lglCategory -lgl_category_new -lgl_category_dup -lgl_category_free -
- -
-xml -LGL_XML_NAME_SPACE -lgl_xml_get_prop_string -lgl_xml_get_prop_i18n_string -lgl_xml_get_prop_double -lgl_xml_get_prop_boolean -lgl_xml_get_prop_int -lgl_xml_get_prop_uint -lgl_xml_get_prop_length -lgl_xml_set_prop_string -lgl_xml_set_prop_double -lgl_xml_set_prop_boolean -lgl_xml_set_prop_int -lgl_xml_set_prop_uint_hex -lgl_xml_set_prop_length -lgl_xml_is_node -lgl_xml_get_node_content -lgl_xml_set_default_units -
- -
-xml-template -lgl_xml_template_read_templates_from_file -lgl_xml_template_parse_templates_doc -lgl_xml_template_parse_template_node -lgl_xml_template_write_templates_to_file -lgl_xml_template_write_template_to_file -lgl_xml_template_create_template_node -
- -
-paper -lglPaper -lgl_paper_new -lgl_paper_dup -lgl_paper_free -
- diff --git a/src/color-combo-button.c b/src/color-combo-button.c index 3593275a..80ec08fd 100644 --- a/src/color-combo-button.c +++ b/src/color-combo-button.c @@ -306,7 +306,7 @@ menu_position_function (GtkMenu *menu, gint w_screen, h_screen; GdkWindow *window; gint x_window, y_window; - GtkAllocation *allocation; + GtkAllocation allocation; gint x_this, y_this, h_this; GtkRequisition menu_requisition; gint h_menu, w_menu; @@ -327,10 +327,10 @@ menu_position_function (GtkMenu *menu, /* * Position and size of "this" inside window */ - allocation = >K_WIDGET (this)->allocation; - x_this = allocation->x; - y_this = allocation->y; - h_this = allocation->height; + gtk_widget_get_allocation (GTK_WIDGET (this), &allocation); + x_this = allocation.x; + y_this = allocation.y; + h_this = allocation.height; /* * Size of menu. diff --git a/src/color-combo.c b/src/color-combo.c index 0334efdc..c833f193 100644 --- a/src/color-combo.c +++ b/src/color-combo.c @@ -248,7 +248,7 @@ menu_position_function (GtkMenu *menu, gint w_screen, h_screen; GdkWindow *window; gint x_window, y_window; - GtkAllocation *allocation; + GtkAllocation allocation; gint x_this, y_this, h_this; GtkRequisition menu_requisition; gint h_menu, w_menu; @@ -269,10 +269,10 @@ menu_position_function (GtkMenu *menu, /* * Position and size of "this" inside window */ - allocation = >K_WIDGET (this)->allocation; - x_this = allocation->x; - y_this = allocation->y; - h_this = allocation->height; + gtk_widget_get_allocation (GTK_WIDGET (this), &allocation); + x_this = allocation.x; + y_this = allocation.y; + h_this = allocation.height; /* * Size of menu. diff --git a/src/color-swatch.c b/src/color-swatch.c index d850e528..f43108f7 100644 --- a/src/color-swatch.c +++ b/src/color-swatch.c @@ -96,7 +96,7 @@ gl_color_swatch_class_init (glColorSwatchClass *class) static void gl_color_swatch_init (glColorSwatch *this) { - GTK_WIDGET_SET_FLAGS (GTK_WIDGET (this), GTK_NO_WINDOW); + gtk_widget_set_has_window (GTK_WIDGET (this), FALSE); this->priv = g_new0 (glColorSwatchPrivate, 1); } @@ -191,8 +191,9 @@ static gboolean expose_event_cb (GtkWidget *widget, GdkEventExpose *event) { - GdkWindow *window; - cairo_t *cr; + GdkWindow *window; + cairo_t *cr; + GtkAllocation allocation; window = gtk_widget_get_window (widget); @@ -203,7 +204,8 @@ expose_event_cb (GtkWidget *widget, event->area.width, event->area.height); cairo_clip (cr); - cairo_translate (cr, widget->allocation.x, widget->allocation.y); + gtk_widget_get_allocation (widget, &allocation); + cairo_translate (cr, allocation.x, allocation.y); draw_swatch (GL_COLOR_SWATCH (widget), cr); @@ -220,20 +222,22 @@ static void draw_swatch (glColorSwatch *this, cairo_t *cr) { - GtkStyle *style; - gdouble w, h; - guint fill_color, line_color; + GtkAllocation allocation; + GtkStyle *style; + gdouble w, h; + guint fill_color, line_color; cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); - w = GTK_WIDGET (this)->allocation.width; - h = GTK_WIDGET (this)->allocation.height; + gtk_widget_get_allocation (GTK_WIDGET (this), &allocation); + w = allocation.width; + h = allocation.height; style = gtk_widget_get_style (GTK_WIDGET (this)); - if ( GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (this)) ) + if ( gtk_widget_is_sensitive (GTK_WIDGET (this)) ) { fill_color = this->priv->color; line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_NORMAL]); diff --git a/src/field-button.c b/src/field-button.c index 4000d41b..a0061a8f 100644 --- a/src/field-button.c +++ b/src/field-button.c @@ -202,7 +202,7 @@ menu_position_function (GtkMenu *menu, gint w_screen, h_screen; GdkWindow *window; gint x_window, y_window; - GtkAllocation *allocation; + GtkAllocation allocation; gint x_this, y_this, h_this; GtkRequisition menu_requisition; gint h_menu, w_menu; @@ -223,10 +223,10 @@ menu_position_function (GtkMenu *menu, /* * Position and size of "this" inside window */ - allocation = >K_WIDGET (this)->allocation; - x_this = allocation->x; - y_this = allocation->y; - h_this = allocation->height; + gtk_widget_get_allocation (GTK_WIDGET (this), &allocation); + x_this = allocation.x; + y_this = allocation.y; + h_this = allocation.height; /* * Size of menu. diff --git a/src/font-combo.c b/src/font-combo.c index 49b0d7ee..993089f2 100644 --- a/src/font-combo.c +++ b/src/font-combo.c @@ -229,7 +229,7 @@ menu_position_function (GtkMenu *menu, gint w_screen, h_screen; GdkWindow *window; gint x_window, y_window; - GtkAllocation *allocation; + GtkAllocation allocation; gint x_this, y_this, h_this; GtkRequisition menu_requisition; gint h_menu, w_menu; @@ -250,10 +250,10 @@ menu_position_function (GtkMenu *menu, /* * Position and size of "this" inside window */ - allocation = >K_WIDGET (this)->allocation; - x_this = allocation->x; - y_this = allocation->y; - h_this = allocation->height; + gtk_widget_get_allocation (GTK_WIDGET (this), &allocation); + x_this = allocation.x; + y_this = allocation.y; + h_this = allocation.height; /* * Size of menu. diff --git a/src/font-sample.c b/src/font-sample.c index ff04ac85..43020649 100644 --- a/src/font-sample.c +++ b/src/font-sample.c @@ -99,7 +99,7 @@ gl_font_sample_class_init (glFontSampleClass *class) static void gl_font_sample_init (glFontSample *this) { - GTK_WIDGET_SET_FLAGS (GTK_WIDGET (this), GTK_NO_WINDOW); + gtk_widget_set_has_window (GTK_WIDGET (this), FALSE); this->priv = g_new0 (glFontSamplePrivate, 1); } @@ -185,8 +185,9 @@ static gboolean expose_event_cb (GtkWidget *widget, GdkEventExpose *event) { - GdkWindow *window; - cairo_t *cr; + GdkWindow *window; + cairo_t *cr; + GtkAllocation allocation; window = gtk_widget_get_window (widget); @@ -197,7 +198,8 @@ expose_event_cb (GtkWidget *widget, event->area.width, event->area.height); cairo_clip (cr); - cairo_translate (cr, widget->allocation.x, widget->allocation.y); + gtk_widget_get_allocation (widget, &allocation); + cairo_translate (cr, allocation.x, allocation.y); draw_sample (GL_FONT_SAMPLE (widget), cr); @@ -214,6 +216,7 @@ static void draw_sample (glFontSample *this, cairo_t *cr) { + GtkAllocation allocation; GtkStyle *style; gdouble w, h; guint fill_color, line_color; @@ -223,13 +226,13 @@ draw_sample (glFontSample *this, gdouble layout_x, layout_y, layout_width, layout_height; - - w = GTK_WIDGET (this)->allocation.width; - h = GTK_WIDGET (this)->allocation.height; + gtk_widget_get_allocation (GTK_WIDGET (this), &allocation); + w = allocation.width; + h = allocation.height; style = gtk_widget_get_style (GTK_WIDGET (this)); - if ( GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (this)) ) + if ( gtk_widget_is_sensitive (GTK_WIDGET (this)) ) { fill_color = gl_color_from_gdk_color (&style->light[GTK_STATE_NORMAL]); line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_NORMAL]); diff --git a/src/glabels-batch.c b/src/glabels-batch.c index b05673bd..ac574326 100644 --- a/src/glabels-batch.c +++ b/src/glabels-batch.c @@ -31,7 +31,6 @@ #include "print-op.h" #include "file-util.h" #include "prefs.h" -#include "font-history.h" #include "debug.h" /*============================================*/ @@ -128,8 +127,6 @@ main (int argc, char **argv) gl_merge_init (); lgl_db_init (); gl_prefs_init (); - gl_template_history_init (); - gl_font_history_init (); /* now print the files */ for (p = file_list; p; p = p->next) { diff --git a/src/merge-text.c b/src/merge-text.c index b502a871..e23803e9 100644 --- a/src/merge-text.c +++ b/src/merge-text.c @@ -158,7 +158,6 @@ static void gl_merge_text_finalize (GObject *object) { glMergeText *merge_text = GL_MERGE_TEXT (object); - gint i; gl_debug (DEBUG_MERGE, "START"); @@ -284,10 +283,7 @@ static GList * gl_merge_text_get_key_list (glMerge *merge) { glMergeText *merge_text; - GList *record_list, *p_rec; - glMergeRecord *record; - GList *p_field; - gint i_field, n_fields_line, n_fields; + gint i_field, n_fields; GList *key_list; gl_debug (DEBUG_MERGE, "BEGIN"); diff --git a/src/mini-label-preview.c b/src/mini-label-preview.c index e5f21813..ec78aad9 100644 --- a/src/mini-label-preview.c +++ b/src/mini-label-preview.c @@ -100,7 +100,7 @@ gl_mini_label_preview_class_init (glMiniLabelPreviewClass *class) static void gl_mini_label_preview_init (glMiniLabelPreview *this) { - GTK_WIDGET_SET_FLAGS (GTK_WIDGET (this), GTK_NO_WINDOW); + gtk_widget_set_has_window (GTK_WIDGET (this), FALSE); this->priv = g_new0 (glMiniLabelPreviewPrivate, 1); } @@ -203,8 +203,9 @@ static gboolean expose_event_cb (GtkWidget *widget, GdkEventExpose *event) { - GdkWindow *window; - cairo_t *cr; + GdkWindow *window; + cairo_t *cr; + GtkAllocation allocation; window = gtk_widget_get_window (widget); @@ -215,7 +216,8 @@ expose_event_cb (GtkWidget *widget, event->area.width, event->area.height); cairo_clip (cr); - cairo_translate (cr, widget->allocation.x, widget->allocation.y); + gtk_widget_get_allocation (widget, &allocation); + cairo_translate (cr, allocation.x, allocation.y); draw_preview (GL_MINI_LABEL_PREVIEW (widget), cr); @@ -232,6 +234,7 @@ static void draw_preview (glMiniLabelPreview *this, cairo_t *cr) { + GtkAllocation allocation; GtkStyle *style; gdouble w, h; guint fill_color, line_color, shadow_color; @@ -240,12 +243,13 @@ draw_preview (glMiniLabelPreview *this, gdouble scale; - w = GTK_WIDGET (this)->allocation.width; - h = GTK_WIDGET (this)->allocation.height; + gtk_widget_get_allocation (GTK_WIDGET (this), &allocation); + w = allocation.width; + h = allocation.height; style = gtk_widget_get_style (GTK_WIDGET (this)); - if ( GTK_WIDGET_IS_SENSITIVE (GTK_WIDGET (this)) ) + if ( gtk_widget_is_sensitive (GTK_WIDGET (this)) ) { fill_color = gl_color_from_gdk_color (&style->light[GTK_STATE_NORMAL]); line_color = gl_color_from_gdk_color (&style->fg[GTK_STATE_NORMAL]); diff --git a/src/mini-preview.c b/src/mini-preview.c index 2d5882a5..6ba6ddef 100644 --- a/src/mini-preview.c +++ b/src/mini-preview.c @@ -224,7 +224,7 @@ gl_mini_preview_init (glMiniPreview *this) gtk_event_box_set_visible_window (GTK_EVENT_BOX (this), FALSE); this->priv->canvas = gtk_drawing_area_new (); - GTK_WIDGET_SET_FLAGS (this->priv->canvas, GTK_NO_WINDOW); + gtk_widget_set_has_window(this->priv->canvas, FALSE); gtk_container_add (GTK_CONTAINER (this), this->priv->canvas); g_signal_connect (G_OBJECT (this->priv->canvas), "expose-event", @@ -555,14 +555,16 @@ static gdouble set_transform_and_get_scale (glMiniPreview *this, cairo_t *cr) { - lglTemplate *template = this->priv->template; - gdouble w, h; - gdouble scale; - gdouble offset_x, offset_y; + lglTemplate *template = this->priv->template; + GtkAllocation allocation; + gdouble w, h; + gdouble scale; + gdouble offset_x, offset_y; /* Establish scale and origin. */ - w = GTK_WIDGET (this)->allocation.width; - h = GTK_WIDGET (this)->allocation.height; + gtk_widget_get_allocation (GTK_WIDGET (this), &allocation); + w = allocation.width; + h = allocation.height; /* establish scale. */ scale = MIN( (w - 2*MARGIN - 2*SHADOW_OFFSET)/template->page_width, @@ -752,6 +754,7 @@ expose_event_cb (GtkWidget *widget, { GdkWindow *window; cairo_t *cr; + GtkAllocation allocation; gl_debug (DEBUG_MINI_PREVIEW, "START"); @@ -765,7 +768,9 @@ expose_event_cb (GtkWidget *widget, event->area.x, event->area.y, event->area.width, event->area.height); cairo_clip (cr); - cairo_translate (cr, widget->allocation.x, widget->allocation.y); + + gtk_widget_get_allocation (widget, &allocation); + cairo_translate (cr, allocation.x, allocation.y); draw (this, cr); diff --git a/src/object-editor-edit-page.c b/src/object-editor-edit-page.c index c85ff5be..704b8efe 100644 --- a/src/object-editor-edit-page.c +++ b/src/object-editor-edit-page.c @@ -76,8 +76,9 @@ gl_object_editor_prepare_edit_page (glObjectEditor *editor) editor->priv->edit_insert_field_button = gl_field_button_new (_("Insert merge field")); gtk_box_pack_start (GTK_BOX (editor->priv->edit_insert_field_vbox), editor->priv->edit_insert_field_button, FALSE, FALSE, 0); - GTK_WIDGET_UNSET_FLAGS (editor->priv->edit_insert_field_button, - GTK_CAN_FOCUS | GTK_CAN_DEFAULT); + + gtk_widget_set_can_focus (editor->priv->edit_insert_field_button, FALSE); + gtk_widget_set_can_default (editor->priv->edit_insert_field_button, FALSE); /* Un-hide */ gtk_widget_show_all (editor->priv->edit_page_vbox); diff --git a/src/view.c b/src/view.c index ca917342..c814cd13 100644 --- a/src/view.c +++ b/src/view.c @@ -328,7 +328,7 @@ gl_view_init (glView *view) gtk_widget_modify_bg (GTK_WIDGET (view->canvas), GTK_STATE_NORMAL, bg_color); g_free (bg_color); - GTK_WIDGET_SET_FLAGS (GTK_WIDGET (view->canvas), GTK_CAN_FOCUS); + gtk_widget_set_can_focus (GTK_WIDGET (view->canvas), TRUE); gtk_widget_add_events (GTK_WIDGET (view->canvas), (GDK_FOCUS_CHANGE_MASK | @@ -2675,19 +2675,21 @@ gl_view_zoom_out (glView *view) void gl_view_zoom_to_fit (glView *view) { - gint w_view, h_view; - gdouble w_label, h_label; - gdouble x_scale, y_scale, scale; + GtkAllocation allocation; + gint w_view, h_view; + gdouble w_label, h_label; + gdouble x_scale, y_scale, scale; gl_debug (DEBUG_VIEW, ""); - if ( ! GTK_WIDGET_VISIBLE(view)) { + if ( ! gtk_widget_get_window (GTK_WIDGET (view)) ) { set_zoom_real (view, 1.0, TRUE); return; } - w_view = GTK_WIDGET(view)->allocation.width; - h_view = GTK_WIDGET(view)->allocation.height; + gtk_widget_get_allocation (GTK_WIDGET (view), &allocation); + w_view = allocation.width; + h_view = allocation.height; gl_label_get_size (GL_LABEL(view->label), &w_label, &h_label); @@ -3237,8 +3239,6 @@ static gboolean focus_in_event_cb (glView *view, GdkEventFocus *event) { - GTK_WIDGET_SET_FLAGS (GTK_WIDGET (view->canvas), GTK_HAS_FOCUS); - return FALSE; } @@ -3250,8 +3250,6 @@ static gboolean focus_out_event_cb (glView *view, GdkEventFocus *event) { - GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (view->canvas), GTK_HAS_FOCUS); - return FALSE; } diff --git a/src/wdgt-chain-button.c b/src/wdgt-chain-button.c index be6ab62d..5963fea9 100644 --- a/src/wdgt-chain-button.c +++ b/src/wdgt-chain-button.c @@ -229,6 +229,7 @@ gl_wdgt_chain_button_draw_lines (GtkWidget *widget, GdkEventExpose *eevent, glWdgtChainButton *button) { + GtkAllocation allocation; GdkPoint points[3]; GdkPoint buf; GtkShadowType shadow; @@ -241,8 +242,9 @@ gl_wdgt_chain_button_draw_lines (GtkWidget *widget, g_return_val_if_fail (GL_WDGT_IS_CHAIN_BUTTON (button), FALSE); - points[0].x = widget->allocation.width / 2; - points[0].y = widget->allocation.height / 2; + gtk_widget_get_allocation (widget, &allocation); + points[0].x = allocation.width / 2; + points[0].y = allocation.height / 2; which_line = (widget == button->line1) ? 1 : -1; @@ -268,7 +270,7 @@ gl_wdgt_chain_button_draw_lines (GtkWidget *widget, points[1].x = points[0].x - SHORT_LINE; points[1].y = points[0].y; points[2].x = points[1].x; - points[2].y = (which_line == 1) ? widget->allocation.height - 1 : 0; + points[2].y = (which_line == 1) ? allocation.height - 1 : 0; shadow = GTK_SHADOW_ETCHED_IN; break; case GL_WDGT_CHAIN_RIGHT: @@ -276,14 +278,14 @@ gl_wdgt_chain_button_draw_lines (GtkWidget *widget, points[1].x = points[0].x + SHORT_LINE; points[1].y = points[0].y; points[2].x = points[1].x; - points[2].y = (which_line == 1) ? widget->allocation.height - 1 : 0; + points[2].y = (which_line == 1) ? allocation.height - 1 : 0; shadow = GTK_SHADOW_ETCHED_OUT; break; case GL_WDGT_CHAIN_TOP: points[0].y += SHORT_LINE; points[1].x = points[0].x; points[1].y = points[0].y - SHORT_LINE; - points[2].x = (which_line == 1) ? widget->allocation.width - 1 : 0; + points[2].x = (which_line == 1) ? allocation.width - 1 : 0; points[2].y = points[1].y; shadow = GTK_SHADOW_ETCHED_OUT; break; @@ -291,7 +293,7 @@ gl_wdgt_chain_button_draw_lines (GtkWidget *widget, points[0].y -= SHORT_LINE; points[1].x = points[0].x; points[1].y = points[0].y + SHORT_LINE; - points[2].x = (which_line == 1) ? widget->allocation.width - 1 : 0; + points[2].x = (which_line == 1) ? allocation.width - 1 : 0; points[2].y = points[1].y; shadow = GTK_SHADOW_ETCHED_IN; break;