X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fgtksheet%2Fgsheet-column-iface.c;h=5abd21bc2ab99669a1bc4cbf3bfc5811106210b9;hb=1ba9ab71de8a6528beaf22de3ee6d2eb697eb61d;hp=a4cc9f36b3a54359eae56bba396f152c34b08141;hpb=1ce1429567835f83a712a8a76ab80db64360d742;p=pspp-builds.git diff --git a/lib/gtksheet/gsheet-column-iface.c b/lib/gtksheet/gsheet-column-iface.c index a4cc9f36..5abd21bc 100644 --- a/lib/gtksheet/gsheet-column-iface.c +++ b/lib/gtksheet/gsheet-column-iface.c @@ -25,7 +25,7 @@ #include #include "gsheet-column-iface.h" #include "gtkextra-marshal.h" - +#include "gtkextra-sheet.h" enum { COLUMNS_CHANGED, @@ -73,8 +73,6 @@ g_sheet_column_get_type (void) } -static GtkSheetButton default_button; - static void g_sheet_column_base_init (gpointer g_class) { @@ -95,12 +93,6 @@ g_sheet_column_base_init (gpointer g_class) G_TYPE_INT); - default_button.state = GTK_STATE_NORMAL; - default_button.label = NULL; - default_button.label_visible = TRUE; - default_button.child = NULL; - default_button.justification = GTK_JUSTIFY_FILL; - initialized = TRUE; } } @@ -159,21 +151,20 @@ g_sheet_column_get_sensitivity(const GSheetColumn *column, } -inline const GtkSheetButton * +inline GtkSheetButton * g_sheet_column_get_button(const GSheetColumn *column, gint col, const GtkSheet *sheet) { - static GtkSheetButton button ; + GtkSheetButton *button = gtk_sheet_button_new(); + GSheetColumnIface *iface = G_SHEET_COLUMN_GET_IFACE (column); g_return_val_if_fail (G_IS_SHEET_COLUMN (column), FALSE); - memcpy(&button, &default_button, sizeof (button)); - if ( iface->get_button_label) - button.label = iface->get_button_label(column, col, sheet); + button->label = iface->get_button_label(column, col, sheet); - return &button; + return button; } inline GtkJustification