static void gtk_sheet_update_primary_selection (GtkSheet *sheet);
-
-
static void gtk_sheet_column_title_button_draw (GtkSheet *sheet, gint column);
static void gtk_sheet_row_title_button_draw (GtkSheet *sheet, gint row);
static gboolean gtk_sheet_cell_empty (const GtkSheet *sheet, gint row, gint col);
-static inline
-void dispose_string (const GtkSheet *sheet, gchar *text)
+static inline void
+dispose_string (const GtkSheet *sheet, gchar *text)
{
GSheetModel *model = gtk_sheet_get_model (sheet);
static void gtk_sheet_class_init (GtkSheetClass * klass);
static void gtk_sheet_init (GtkSheet * sheet);
-static void gtk_sheet_destroy (GtkObject * object);
+static void gtk_sheet_dispose (GObject * object);
static void gtk_sheet_finalize (GObject * object);
static void gtk_sheet_style_set (GtkWidget *widget,
GtkStyle *previous_style);
static void gtk_sheet_entry_changed (GtkWidget *widget,
gpointer data);
-static gboolean gtk_sheet_deactivate_cell (GtkSheet *sheet);
+static void gtk_sheet_deactivate_cell (GtkSheet *sheet);
static void gtk_sheet_hide_active_cell (GtkSheet *sheet);
static gboolean gtk_sheet_activate_cell (GtkSheet *sheet,
gint row, gint col);
TRAVERSE,
DEACTIVATE,
ACTIVATE,
- SET_CELL,
- CLEAR_CELL,
CHANGED,
- NEW_COL_WIDTH,
- NEW_ROW_HEIGHT,
LAST_SIGNAL
};
return sheet_range_type;
}
+
+static void column_titles_changed (GtkWidget *w, gint first, gint n_columns, gpointer data);
+
+/* Properties */
+enum
+{
+ PROP_0,
+ PROP_ROW_GEO,
+ PROP_COL_GEO,
+ PROP_MODEL
+};
+
+static void
+gtk_sheet_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+
+{
+ GtkSheet *sheet = GTK_SHEET (object);
+
+ switch (prop_id)
+ {
+ case PROP_ROW_GEO:
+ sheet->row_geometry = g_value_get_pointer (value);
+ break;
+ case PROP_COL_GEO:
+ sheet->column_geometry = g_value_get_pointer (value);
+ if ( sheet->column_geometry)
+ g_signal_connect (sheet->column_geometry, "columns_changed",
+ G_CALLBACK (column_titles_changed), sheet);
+ break;
+ case PROP_MODEL:
+ gtk_sheet_set_model (sheet, g_value_get_pointer (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ };
+}
+
+static void
+gtk_sheet_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GtkSheet *sheet = GTK_SHEET (object);
+
+ switch (prop_id)
+ {
+ case PROP_ROW_GEO:
+ g_value_set_pointer (value, sheet->row_geometry);
+ break;
+ case PROP_COL_GEO:
+ g_value_set_pointer (value, sheet->column_geometry);
+ break;
+ case PROP_MODEL:
+ g_value_set_pointer (value, sheet->model);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ };
+}
+
+
static void
gtk_sheet_class_init (GtkSheetClass * klass)
{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ GParamSpec *row_geo_spec ;
+ GParamSpec *col_geo_spec ;
+ GParamSpec *model_spec ;
- object_class = (GtkObjectClass *) klass;
- widget_class = (GtkWidgetClass *) klass;
- container_class = (GtkContainerClass *) klass;
+ GtkWidgetClass *widget_class = (GtkWidgetClass *) klass;
+ GtkContainerClass *container_class = (GtkContainerClass *) klass;
parent_class = g_type_class_peek_parent (klass);
G_SIGNAL_RUN_LAST,
offsetof (GtkSheetClass, select_row),
NULL, NULL,
- gtkextra_VOID__INT,
+ g_cclosure_marshal_VOID__INT,
G_TYPE_NONE,
1,
G_TYPE_INT);
G_SIGNAL_RUN_LAST,
offsetof (GtkSheetClass, select_column),
NULL, NULL,
- gtkextra_VOID__INT,
+ g_cclosure_marshal_VOID__INT,
G_TYPE_NONE,
1,
G_TYPE_INT);
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
- gtkextra_VOID__INT,
+ g_cclosure_marshal_VOID__INT,
G_TYPE_NONE,
1,
G_TYPE_INT);
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
- gtkextra_VOID__INT,
+ g_cclosure_marshal_VOID__INT,
G_TYPE_NONE,
1,
G_TYPE_INT);
G_SIGNAL_RUN_LAST,
offsetof (GtkSheetClass, select_range),
NULL, NULL,
- gtkextra_VOID__BOXED,
+ g_cclosure_marshal_VOID__BOXED,
G_TYPE_NONE,
1,
GTK_TYPE_SHEET_RANGE);
G_SIGNAL_RUN_LAST,
offsetof (GtkSheetClass, deactivate),
NULL, NULL,
- gtkextra_BOOLEAN__INT_INT,
- G_TYPE_BOOLEAN, 2, G_TYPE_INT, G_TYPE_INT);
+ gtkextra_VOID__INT_INT,
+ G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
sheet_signals[ACTIVATE] =
g_signal_new ("activate",
gtkextra_BOOLEAN__INT_INT,
G_TYPE_BOOLEAN, 2, G_TYPE_INT, G_TYPE_INT);
- sheet_signals[SET_CELL] =
- g_signal_new ("set-cell",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- offsetof (GtkSheetClass, set_cell),
- NULL, NULL,
- gtkextra_VOID__INT_INT,
- G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
-
-
- sheet_signals[CLEAR_CELL] =
- g_signal_new ("clear-cell",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- offsetof (GtkSheetClass, clear_cell),
- NULL, NULL,
- gtkextra_VOID__INT_INT,
- G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
-
sheet_signals[CHANGED] =
g_signal_new ("changed",
G_TYPE_FROM_CLASS (object_class),
gtkextra_VOID__INT_INT,
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
- sheet_signals[NEW_COL_WIDTH] =
- g_signal_new ("new-column-width",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- offsetof (GtkSheetClass, new_column_width), /*!!!! */
- NULL, NULL,
- gtkextra_VOID__INT_INT,
- G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
-
- sheet_signals[NEW_ROW_HEIGHT] =
- g_signal_new ("new-row-height",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- offsetof (GtkSheetClass, new_row_height), /*!!!! */
- NULL, NULL,
- gtkextra_VOID__INT_INT,
- G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
-
widget_class->set_scroll_adjustments_signal =
g_signal_new ("set-scroll-adjustments",
G_TYPE_FROM_CLASS (object_class),
container_class->remove = gtk_sheet_remove;
container_class->forall = gtk_sheet_forall;
- object_class->destroy = gtk_sheet_destroy;
- gobject_class->finalize = gtk_sheet_finalize;
+ object_class->dispose = gtk_sheet_dispose;
+ object_class->finalize = gtk_sheet_finalize;
+
+
+ row_geo_spec =
+ g_param_spec_pointer ("row-geometry",
+ "Row Geometry",
+ "A pointer to the model of the row geometry",
+ G_PARAM_READABLE | G_PARAM_WRITABLE );
+
+ col_geo_spec =
+ g_param_spec_pointer ("column-geometry",
+ "Column Geometry",
+ "A pointer to the model of the column geometry",
+ G_PARAM_READABLE | G_PARAM_WRITABLE );
+
+ model_spec =
+ g_param_spec_pointer ("model",
+ "Model",
+ "A pointer to the data model",
+ G_PARAM_READABLE | G_PARAM_WRITABLE );
+
+
+ object_class->set_property = gtk_sheet_set_property;
+ object_class->get_property = gtk_sheet_get_property;
+
+ g_object_class_install_property (object_class,
+ PROP_ROW_GEO,
+ row_geo_spec);
+
+ g_object_class_install_property (object_class,
+ PROP_COL_GEO,
+ col_geo_spec);
+
+ g_object_class_install_property (object_class,
+ PROP_MODEL,
+ model_spec);
+
widget_class->realize = gtk_sheet_realize;
widget_class->unrealize = gtk_sheet_unrealize;
klass->traverse = NULL;
klass->deactivate = NULL;
klass->activate = NULL;
- klass->set_cell = NULL;
- klass->clear_cell = NULL;
klass->changed = NULL;
}
sheet->show_grid = TRUE;
sheet->motion_timer = 0;
+
+ sheet->columns_resizable = TRUE;
+ sheet->rows_resizable = TRUE;
+
+ sheet->row_titles_visible = TRUE;
+ sheet->row_title_area.width = DEFAULT_COLUMN_WIDTH;
+
+ sheet->column_titles_visible = TRUE;
+ sheet->autoscroll = TRUE;
+ sheet->justify_entry = TRUE;
+
+
+ /* create sheet entry */
+ sheet->entry_type = 0;
+ create_sheet_entry (sheet);
+
+ /* create global selection button */
+ create_global_button (sheet);
}
}
-static void gtk_sheet_construct (GtkSheet *sheet,
- GSheetRow *vgeo,
- GSheetColumn *hgeo,
- const gchar *title);
-
-
/**
* gtk_sheet_new:
* @rows: initial number of rows
* Returns: the new sheet widget
*/
GtkWidget *
-gtk_sheet_new (GSheetRow *vgeo, GSheetColumn *hgeo, const gchar *title,
- GSheetModel *model)
+gtk_sheet_new (GSheetRow *vgeo, GSheetColumn *hgeo, GSheetModel *model)
{
- GtkWidget *widget = g_object_new (GTK_TYPE_SHEET, NULL);
-
- gtk_sheet_construct (GTK_SHEET (widget), vgeo, hgeo, title);
-
- if (model)
- gtk_sheet_set_model (GTK_SHEET (widget), model);
-
-
+ GtkWidget *widget = g_object_new (GTK_TYPE_SHEET,
+ "row-geometry", vgeo,
+ "column-geometry", hgeo,
+ "model", model,
+ NULL);
return widget;
}
gtk_sheet_set_model (GtkSheet *sheet, GSheetModel *model)
{
g_return_if_fail (GTK_IS_SHEET (sheet));
- g_return_if_fail (G_IS_SHEET_MODEL (model));
+
+ if (sheet->model ) g_object_unref (sheet->model);
sheet->model = model;
+ if ( model)
+ {
g_signal_connect (model, "range_changed",
G_CALLBACK (range_update_callback), sheet);
g_signal_connect (model, "columns_deleted",
G_CALLBACK (columns_inserted_deleted_callback), sheet);
-
+ }
}
}
-static void
-gtk_sheet_construct (GtkSheet *sheet,
- GSheetRow *vgeo,
- GSheetColumn *hgeo,
- const gchar *title)
-{
- g_return_if_fail (G_IS_SHEET_COLUMN (hgeo));
- g_return_if_fail (G_IS_SHEET_ROW (vgeo));
-
- sheet->column_geometry = hgeo;
- sheet->row_geometry = vgeo;
-
-
- sheet->columns_resizable = TRUE;
- sheet->rows_resizable = TRUE;
-
- sheet->row_titles_visible = TRUE;
- sheet->row_title_area.width = DEFAULT_COLUMN_WIDTH;
-
- sheet->column_titles_visible = TRUE;
- sheet->autoscroll = TRUE;
- sheet->justify_entry = TRUE;
-
-
- /* create sheet entry */
- sheet->entry_type = 0;
- create_sheet_entry (sheet);
-
- /* create global selection button */
- create_global_button (sheet);
-
- if (title)
- sheet->name = g_strdup (title);
-
- g_signal_connect (sheet->column_geometry, "columns_changed",
- G_CALLBACK (column_titles_changed), sheet);
-
-}
-
-
-GtkWidget *
-gtk_sheet_new_with_custom_entry (GSheetRow *rows, GSheetColumn *columns,
- const gchar *title, GtkType entry_type)
-{
- GtkWidget *widget = g_object_new (GTK_TYPE_SHEET, NULL);
-
- gtk_sheet_construct_with_custom_entry (GTK_SHEET (widget),
- rows, columns, title, entry_type);
-
- return widget;
-}
-
-void
-gtk_sheet_construct_with_custom_entry (GtkSheet *sheet,
- GSheetRow *vgeo,
- GSheetColumn *hgeo,
- const gchar *title,
- GtkType entry_type)
-{
- gtk_sheet_construct (sheet, vgeo, hgeo, title);
-
- sheet->entry_type = entry_type;
- create_sheet_entry (sheet);
-}
-
-
-
void
gtk_sheet_change_entry (GtkSheet *sheet, GtkType entry_type)
{
}
-/* This routine has problems with gtk+- 1.2 related with the
- label / button drawing - I think it's a bug in gtk+- 1.2 */
-void
-gtk_sheet_set_title (GtkSheet *sheet, const gchar *title)
-{
- GtkWidget *label;
-
- g_return_if_fail (sheet != NULL);
- g_return_if_fail (title != NULL);
- g_return_if_fail (GTK_IS_SHEET (sheet));
-
- if (sheet->name)
- g_free (sheet->name);
-
- sheet->name = g_strdup (title);
-
- if (!GTK_WIDGET_REALIZED (GTK_WIDGET (sheet)) || !title) return;
-
- if (GTK_BIN (sheet->button)->child)
- label = GTK_BIN (sheet->button)->child;
-
- size_allocate_global_button (sheet);
-}
void
gtk_sheet_freeze (GtkSheet *sheet)
if (sheet->state != GTK_SHEET_NORMAL)
gtk_sheet_real_unselect_range (sheet, NULL);
else
- {
- gboolean veto = TRUE;
- veto = gtk_sheet_deactivate_cell (sheet);
- if (!veto) return;
- }
+ gtk_sheet_deactivate_cell (sheet);
sheet->state = GTK_SHEET_ROW_SELECTED;
sheet->range.row0 = row;
if (sheet->state != GTK_SHEET_NORMAL)
gtk_sheet_real_unselect_range (sheet, NULL);
else
- {
- gboolean veto = TRUE;
- veto = gtk_sheet_deactivate_cell (sheet);
- if (!veto) return;
- }
+ gtk_sheet_deactivate_cell (sheet);
+
sheet->state = GTK_SHEET_COLUMN_SELECTED;
sheet->range.row0 = 0;
sheet = GTK_SHEET (object);
- if (sheet->name)
- {
- g_free (sheet->name);
- sheet->name = NULL;
- }
-
if (G_OBJECT_CLASS (parent_class)->finalize)
(*G_OBJECT_CLASS (parent_class)->finalize) (object);
}
static void
-gtk_sheet_destroy (GtkObject * object)
+gtk_sheet_dispose (GObject * object)
{
- GtkSheet *sheet;
+ GtkSheet *sheet = GTK_SHEET (object);
GList *children;
g_return_if_fail (object != NULL);
g_return_if_fail (GTK_IS_SHEET (object));
- sheet = GTK_SHEET (object);
+ if ( sheet->dispose_has_run )
+ return ;
+
+ if (sheet->model) g_object_unref (sheet->model);
+ sheet->dispose_has_run = TRUE;
/* destroy the entry */
if (sheet->sheet_entry && GTK_IS_WIDGET (sheet->sheet_entry))
sheet->sheet_entry = NULL;
}
- /* destroy the global selection button */
- if (sheet->button && GTK_IS_WIDGET (sheet->button))
- {
- gtk_widget_destroy (sheet->button);
- sheet->button = NULL;
- }
+ g_object_unref (sheet->button);
/* unref adjustments */
if (sheet->hadjustment)
}
sheet->children = NULL;
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (*GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ (*G_OBJECT_CLASS (parent_class)->dispose) (object);
}
static void
gint attributes_mask;
GdkGCValues values, auxvalues;
GdkColormap *colormap;
- gchar *name;
GtkSheetChild *child;
GList *children;
gtk_widget_set_parent_window (sheet->sheet_entry, sheet->sheet_window);
gtk_widget_set_parent (sheet->sheet_entry, GTK_WIDGET (sheet));
- if (sheet->button && sheet->button->parent)
- {
- gtk_widget_ref (sheet->button);
- gtk_widget_unparent (sheet->button);
- }
gtk_widget_set_parent_window (sheet->button, sheet->sheet_window);
gtk_widget_set_parent (sheet->button, GTK_WIDGET (sheet));
size_allocate_row_title_buttons (sheet);
size_allocate_column_title_buttons (sheet);
- name = g_strdup (sheet->name);
- gtk_sheet_set_title (sheet, name);
-
- g_free (name);
-
children = sheet->children;
while (children)
{
{
sheet->button = gtk_button_new_with_label (" ");
+ g_object_ref_sink (sheet->button);
+
g_signal_connect (sheet->button,
"pressed",
G_CALLBACK (global_button_clicked),
static void
gtk_sheet_map (GtkWidget * widget)
{
- GtkSheet *sheet;
+ GtkSheet *sheet = GTK_SHEET (widget);
GtkSheetChild *child;
GList *children;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_SHEET (widget));
- sheet = GTK_SHEET (widget);
-
if (!GTK_WIDGET_MAPPED (widget))
{
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
if (old_text && strlen (old_text) > 0 )
{
g_sheet_model_datum_clear (model, row, column);
-
- if (G_OBJECT (sheet)->ref_count > 0)
- g_signal_emit (sheet, sheet_signals[CLEAR_CELL], 0,
- row, column);
}
dispose_string (sheet, old_text);
return FALSE;
if (GTK_WIDGET_REALIZED (GTK_WIDGET (sheet)))
- {
- if (!gtk_sheet_deactivate_cell (sheet)) return FALSE;
- }
+ gtk_sheet_deactivate_cell (sheet);
sheet->active_cell.row = row;
sheet->active_cell.col = column;
if (row < 0 || col < 0) return;
- sheet->active_cell.row = -1;
- sheet->active_cell.col = -1;
+ sheet->active_cell.row =- 1;
+ sheet->active_cell.col =- 1;
text = gtk_entry_get_text (GTK_ENTRY (gtk_sheet_get_entry (sheet)));
}
-static gboolean
+static void
gtk_sheet_deactivate_cell (GtkSheet *sheet)
{
- gboolean veto = TRUE;
-
- g_return_val_if_fail (sheet != NULL, FALSE);
- g_return_val_if_fail (GTK_IS_SHEET (sheet), FALSE);
+ g_return_if_fail (sheet != NULL);
+ g_return_if_fail (GTK_IS_SHEET (sheet));
- if (!GTK_WIDGET_REALIZED (GTK_WIDGET (sheet))) return FALSE;
- if (sheet->state != GTK_SHEET_NORMAL) return FALSE;
+ if (!GTK_WIDGET_REALIZED (GTK_WIDGET (sheet))) return ;
+ if (sheet->state != GTK_SHEET_NORMAL) return ;
- _gtkextra_signal_emit (GTK_OBJECT (sheet), sheet_signals[DEACTIVATE],
- sheet->active_cell.row,
- sheet->active_cell.col, &veto);
+ if ( sheet->active_cell.row == -1 || sheet->active_cell.col == -1 )
+ return ;
- if (!veto) return FALSE;
+ g_signal_emit (sheet, sheet_signals[DEACTIVATE], 0,
+ sheet->active_cell.row,
+ sheet->active_cell.col);
- if ( sheet->active_cell.row == -1 || sheet->active_cell.col == -1 )
- return TRUE;
g_signal_handlers_disconnect_by_func (gtk_sheet_get_entry (sheet),
G_CALLBACK (gtk_sheet_entry_changed),
GTK_SHEET_UNSET_FLAGS (sheet, GTK_SHEET_REDRAW_PENDING);
gtk_sheet_range_draw (sheet, NULL);
}
-
- return TRUE;
}
static void
gdk_gc_set_clip_rectangle (sheet->xor_gc, &area);
- for (i = -1; i <= 1; ++i)
+ for (i =- 1; i <= 1; ++i)
gdk_draw_rectangle (sheet->sheet_window,
sheet->xor_gc,
FALSE,
if (sheet->state != GTK_SHEET_NORMAL)
gtk_sheet_real_unselect_range (sheet, NULL);
else
- {
- gboolean veto = TRUE;
- veto = gtk_sheet_deactivate_cell (sheet);
- if (!veto) return;
- }
+ gtk_sheet_deactivate_cell (sheet);
sheet->range.row0 = range->row0;
sheet->range.rowi = range->rowi;
{
row = sheet->active_cell.row;
column = sheet->active_cell.col;
- if (!gtk_sheet_deactivate_cell (sheet)) return FALSE;
+ gtk_sheet_deactivate_cell (sheet);
sheet->active_cell.row = row;
sheet->active_cell.col = column;
sheet->drag_range = sheet->range;
{
row = sheet->active_cell.row;
column = sheet->active_cell.col;
- if (!gtk_sheet_deactivate_cell (sheet)) return FALSE;
+ gtk_sheet_deactivate_cell (sheet);
sheet->active_cell.row = row;
sheet->active_cell.col = column;
sheet->drag_range = sheet->range;
return;
}
- if (row == -1 && column == -1)
+ if (row == - 1 && column == - 1)
{
sheet->range.row0 = 0;
sheet->range.col0 = 0;
}
else
{
- if (!gtk_sheet_deactivate_cell (sheet))
- {
- *veto = FALSE;
- return;
- }
+ gtk_sheet_deactivate_cell (sheet);
gtk_sheet_activate_cell (sheet, row, column);
}
row_move = FALSE;
column_move = FALSE;
- row_align = -1.;
- col_align = -1.;
+ row_align =- 1.;
+ col_align =- 1.;
height = sheet->sheet_window_height;
width = sheet->sheet_window_width;
if (!GTK_WIDGET_DRAWABLE (sheet)) return;
+ size_allocate_global_button (sheet);
+
for (i = MIN_VISIBLE_COLUMN (sheet); i <= MAX_VISIBLE_COLUMN (sheet); i++)
gtk_sheet_column_title_button_draw (sheet, i);
}
if (!GTK_WIDGET_DRAWABLE (sheet)) return;
+ size_allocate_global_button (sheet);
+
for (i = MIN_VISIBLE_ROW (sheet); i <= MAX_VISIBLE_ROW (sheet); i++)
{
if ( i >= yyy_row_count (sheet))
gdk_gc_set_clip_rectangle (sheet->xor_gc, &clip_area);
- for (i = -1; i <= 1; ++i)
+ for (i =- 1; i <= 1; ++i)
gdk_draw_rectangle (sheet->sheet_window,
sheet->xor_gc,
FALSE,
}
g_signal_emit (sheet, sheet_signals[CHANGED], 0, -1, column);
- g_signal_emit (sheet, sheet_signals[NEW_COL_WIDTH], 0,
- column, width);
}
}
g_signal_emit (sheet, sheet_signals[CHANGED], 0, row, - 1);
- g_signal_emit (sheet, sheet_signals[NEW_ROW_HEIGHT], 0,
- row, height);
-
}
-
-
gboolean
gtk_sheet_get_attributes (const GtkSheet *sheet, gint row, gint col,
GtkSheetCellAttr *attributes)
if (!GTK_WIDGET_REALIZED (sheet))
return;
- clipboard = gtk_widget_get_clipboard (GTK_WIDGET (sheet),
+ clipboard = gtk_widget_get_clipboard (GTK_WIDGET (sheet),
GDK_SELECTION_PRIMARY);
-
+
if (gtk_sheet_range_isvisible (sheet, sheet->range))
{
- if (!gtk_clipboard_set_with_owner (clipboard, targets,
+ if (!gtk_clipboard_set_with_owner (clipboard, targets,
G_N_ELEMENTS (targets),
primary_get_cb, primary_clear_cb,
G_OBJECT (sheet)))