Fix all remaining GTK3 issues.
Work around the issue of GnomeCanvasItem amending its own flags to GtkObject::flags (which is sealed) by giving it its own flags field. This breaks libgnomecanvas ABI and API, but I see no other way. This commit didn't work the first time because gnome-pilot libraries were still pulling in the system-wide libgnomecanvas, and that was interfereing with our bundled version which has a different ABI. But gnome-pilot integration was dropped in the previous commit, so everything is now using the bundled libgnomecanvas.
This commit is contained in:
@ -414,7 +414,9 @@ e_minicard_label_resize_children(EMinicardLabel *e_minicard_label)
|
||||
static void
|
||||
set_colors (EMinicardLabel *label)
|
||||
{
|
||||
if ((GTK_OBJECT_FLAGS (label) & GNOME_CANVAS_ITEM_REALIZED)) {
|
||||
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (label);
|
||||
|
||||
if ((item->flags & GNOME_CANVAS_ITEM_REALIZED)) {
|
||||
GnomeCanvas *canvas;
|
||||
GtkStyle *style;
|
||||
|
||||
|
||||
@ -321,7 +321,7 @@ e_minicard_set_property (GObject *object, guint prop_id, const GValue *value, G
|
||||
if (e_minicard->width != g_value_get_double (value)) {
|
||||
e_minicard->width = g_value_get_double (value);
|
||||
e_minicard_resize_children(e_minicard);
|
||||
if (GTK_OBJECT_FLAGS( e_minicard ) & GNOME_CANVAS_ITEM_REALIZED)
|
||||
if (item->flags & GNOME_CANVAS_ITEM_REALIZED)
|
||||
e_canvas_item_request_reflow(item);
|
||||
}
|
||||
break;
|
||||
@ -467,7 +467,9 @@ e_minicard_finalize (GObject *object)
|
||||
static void
|
||||
e_minicard_style_set (EMinicard *minicard, GtkStyle *previous_style)
|
||||
{
|
||||
if ((GTK_OBJECT_FLAGS( minicard ) & GNOME_CANVAS_ITEM_REALIZED))
|
||||
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (minicard);
|
||||
|
||||
if ((item->flags & GNOME_CANVAS_ITEM_REALIZED))
|
||||
set_selected (minicard, minicard->selected);
|
||||
}
|
||||
|
||||
@ -910,9 +912,12 @@ get_left_width (EMinicard *e_minicard, gboolean is_list)
|
||||
static void
|
||||
remodel( EMinicard *e_minicard )
|
||||
{
|
||||
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (e_minicard);
|
||||
gint count = 0;
|
||||
if (!(GTK_OBJECT_FLAGS( e_minicard ) & GNOME_CANVAS_ITEM_REALIZED))
|
||||
|
||||
if (!(item->flags & GNOME_CANVAS_ITEM_REALIZED))
|
||||
return;
|
||||
|
||||
if (e_minicard->contact) {
|
||||
EContactField field;
|
||||
GList *list;
|
||||
@ -1012,7 +1017,8 @@ static void
|
||||
e_minicard_reflow(GnomeCanvasItem *item, gint flags)
|
||||
{
|
||||
EMinicard *e_minicard = E_MINICARD(item);
|
||||
if (GTK_OBJECT_FLAGS (e_minicard) & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
|
||||
if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
GList *list;
|
||||
gdouble text_height;
|
||||
gint old_height;
|
||||
|
||||
@ -1931,7 +1931,11 @@ e_day_view_focus_in (GtkWidget *widget, GdkEventFocus *event)
|
||||
|
||||
day_view = E_DAY_VIEW (widget);
|
||||
|
||||
/* XXX Can't access flags directly anymore, but is it really needed?
|
||||
* If so, could we call gtk_widget_send_focus_change() instead? */
|
||||
#if 0
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
|
||||
#endif
|
||||
|
||||
gtk_widget_queue_draw (day_view->top_canvas);
|
||||
gtk_widget_queue_draw (day_view->main_canvas);
|
||||
@ -1950,7 +1954,11 @@ e_day_view_focus_out (GtkWidget *widget, GdkEventFocus *event)
|
||||
|
||||
day_view = E_DAY_VIEW (widget);
|
||||
|
||||
/* XXX Can't access flags directly anymore, but is it really needed?
|
||||
* If so, could we call gtk_widget_send_focus_change() instead? */
|
||||
#if 0
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
|
||||
#endif
|
||||
|
||||
gtk_widget_queue_draw (day_view->top_canvas);
|
||||
gtk_widget_queue_draw (day_view->main_canvas);
|
||||
@ -7100,10 +7108,8 @@ e_day_view_auto_scroll_handler (gpointer data)
|
||||
e_day_view_update_selection (day_view, day, row);
|
||||
} else if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) {
|
||||
e_day_view_update_resize (day_view, row);
|
||||
} else if (day_view->drag_item->object.flags
|
||||
& GNOME_CANVAS_ITEM_VISIBLE) {
|
||||
e_day_view_update_main_canvas_drag (day_view, row,
|
||||
day);
|
||||
} else if (day_view->drag_item->flags & GNOME_CANVAS_ITEM_VISIBLE) {
|
||||
e_day_view_update_main_canvas_drag (day_view, row, day);
|
||||
}
|
||||
}
|
||||
|
||||
@ -7511,8 +7517,7 @@ e_day_view_update_top_canvas_drag (EDayView *day_view,
|
||||
|
||||
/* If the position hasn't changed, just return. */
|
||||
if (day_view->drag_last_day == day
|
||||
&& (day_view->drag_long_event_item->object.flags
|
||||
& GNOME_CANVAS_ITEM_VISIBLE))
|
||||
&& (day_view->drag_long_event_item->flags & GNOME_CANVAS_ITEM_VISIBLE))
|
||||
return;
|
||||
|
||||
day_view->drag_last_day = day;
|
||||
@ -7539,7 +7544,7 @@ e_day_view_update_top_canvas_drag (EDayView *day_view,
|
||||
item_x + E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH + E_DAY_VIEW_LONG_EVENT_X_PAD,
|
||||
item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT + E_DAY_VIEW_LONG_EVENT_Y_PAD);
|
||||
|
||||
if (!(day_view->drag_long_event_rect_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) {
|
||||
if (!(day_view->drag_long_event_rect_item->flags & GNOME_CANVAS_ITEM_VISIBLE)) {
|
||||
gnome_canvas_item_raise_to_top (day_view->drag_long_event_rect_item);
|
||||
gnome_canvas_item_show (day_view->drag_long_event_rect_item);
|
||||
}
|
||||
@ -7547,8 +7552,7 @@ e_day_view_update_top_canvas_drag (EDayView *day_view,
|
||||
/* Set the text, if necessary. We don't want to set the text every
|
||||
time it moves, so we check if it is currently invisible and only
|
||||
set the text then. */
|
||||
if (!(day_view->drag_long_event_item->object.flags
|
||||
& GNOME_CANVAS_ITEM_VISIBLE)) {
|
||||
if (!(day_view->drag_long_event_item->flags & GNOME_CANVAS_ITEM_VISIBLE)) {
|
||||
const gchar *summary;
|
||||
|
||||
if (event && is_comp_data_valid (event)) {
|
||||
@ -7629,7 +7633,7 @@ e_day_view_update_main_canvas_drag (EDayView *day_view,
|
||||
/* If the position hasn't changed, just return. */
|
||||
if (day_view->drag_last_day == day
|
||||
&& day_view->drag_last_row == row
|
||||
&& (day_view->drag_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE))
|
||||
&& (day_view->drag_item->flags & GNOME_CANVAS_ITEM_VISIBLE))
|
||||
return;
|
||||
|
||||
day_view->drag_last_day = day;
|
||||
@ -7700,12 +7704,12 @@ e_day_view_update_main_canvas_drag (EDayView *day_view,
|
||||
item_x + E_DAY_VIEW_BAR_WIDTH + E_DAY_VIEW_EVENT_X_PAD,
|
||||
item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT + E_DAY_VIEW_EVENT_Y_PAD);
|
||||
|
||||
if (!(day_view->drag_bar_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) {
|
||||
if (!(day_view->drag_bar_item->flags & GNOME_CANVAS_ITEM_VISIBLE)) {
|
||||
gnome_canvas_item_raise_to_top (day_view->drag_bar_item);
|
||||
gnome_canvas_item_show (day_view->drag_bar_item);
|
||||
}
|
||||
|
||||
if (!(day_view->drag_rect_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) {
|
||||
if (!(day_view->drag_rect_item->flags & GNOME_CANVAS_ITEM_VISIBLE)) {
|
||||
gnome_canvas_item_raise_to_top (day_view->drag_rect_item);
|
||||
gnome_canvas_item_show (day_view->drag_rect_item);
|
||||
}
|
||||
@ -7713,7 +7717,7 @@ e_day_view_update_main_canvas_drag (EDayView *day_view,
|
||||
/* Set the text, if necessary. We don't want to set the text every
|
||||
time it moves, so we check if it is currently invisible and only
|
||||
set the text then. */
|
||||
if (!(day_view->drag_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) {
|
||||
if (!(day_view->drag_item->flags & GNOME_CANVAS_ITEM_VISIBLE)) {
|
||||
const gchar *summary;
|
||||
|
||||
if (event && is_comp_data_valid (event)) {
|
||||
|
||||
@ -1363,7 +1363,11 @@ e_week_view_focus_in (GtkWidget *widget, GdkEventFocus *event)
|
||||
|
||||
week_view = E_WEEK_VIEW (widget);
|
||||
|
||||
/* XXX Can't access flags directly anymore, but is it really needed?
|
||||
* If so, could we call gtk_widget_send_focus_change() instead? */
|
||||
#if 0
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
|
||||
#endif
|
||||
|
||||
gtk_widget_queue_draw (week_view->main_canvas);
|
||||
|
||||
@ -1381,7 +1385,11 @@ e_week_view_focus_out (GtkWidget *widget, GdkEventFocus *event)
|
||||
|
||||
week_view = E_WEEK_VIEW (widget);
|
||||
|
||||
/* XXX Can't access flags directly anymore, but is it really needed?
|
||||
* If so, could we call gtk_widget_send_focus_change() instead? */
|
||||
#if 0
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
|
||||
#endif
|
||||
|
||||
gtk_widget_queue_draw (week_view->main_canvas);
|
||||
|
||||
@ -4676,7 +4684,7 @@ e_week_view_is_jump_button_visible (EWeekView *week_view, gint day)
|
||||
g_return_val_if_fail (E_IS_WEEK_VIEW (week_view), FALSE);
|
||||
|
||||
if ((day >= 0) && (day < E_WEEK_VIEW_MAX_WEEKS * 7))
|
||||
return week_view->jump_buttons[day]->object.flags & GNOME_CANVAS_ITEM_VISIBLE;
|
||||
return week_view->jump_buttons[day]->flags & GNOME_CANVAS_ITEM_VISIBLE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@ -242,7 +242,7 @@ ea_week_view_get_n_children (AtkObject *accessible)
|
||||
|
||||
/* add the number of visible jump buttons */
|
||||
for (i = 0; i < E_WEEK_VIEW_MAX_WEEKS * 7; i++) {
|
||||
if (week_view->jump_buttons[i]->object.flags & GNOME_CANVAS_ITEM_VISIBLE)
|
||||
if (week_view->jump_buttons[i]->flags & GNOME_CANVAS_ITEM_VISIBLE)
|
||||
++count;
|
||||
}
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
#define gdk_drag_context_get_suggested_action(context) (context)->suggested_action
|
||||
#define gdk_drag_context_get_selected_action(context) (context)->action
|
||||
#define gdk_drag_context_list_targets(context) (context)->targets
|
||||
#define gdk_visual_get_depth(visual) (visual)->depth
|
||||
|
||||
#define gtk_accessible_get_widget(accessible) \
|
||||
(GTK_ACCESSIBLE (accessible)->widget)
|
||||
|
||||
@ -29,6 +29,8 @@
|
||||
#include "gailcanvasitemfactory.h"
|
||||
#include "gailcanvaswidgetfactory.h"
|
||||
|
||||
#include <e-util/gtk-compat.h>
|
||||
|
||||
static void gail_canvas_class_init (GailCanvasClass *klass);
|
||||
static void gail_canvas_real_initialize (AtkObject *obj,
|
||||
gpointer data);
|
||||
@ -180,13 +182,13 @@ gail_canvas_real_initialize (AtkObject *obj,
|
||||
|
||||
canvas = GNOME_CANVAS (data);
|
||||
|
||||
adj = canvas->layout.hadjustment;
|
||||
adj = gtk_layout_get_hadjustment (GTK_LAYOUT (canvas));
|
||||
g_signal_connect (adj,
|
||||
"value_changed",
|
||||
G_CALLBACK (adjustment_changed),
|
||||
canvas);
|
||||
|
||||
adj = canvas->layout.vadjustment;
|
||||
adj = gtk_layout_get_vadjustment (GTK_LAYOUT (canvas));
|
||||
g_signal_connect (adj,
|
||||
"value_changed",
|
||||
G_CALLBACK (adjustment_changed),
|
||||
@ -206,7 +208,7 @@ gail_canvas_get_n_children (AtkObject* obj)
|
||||
g_return_val_if_fail (GAIL_IS_CANVAS (obj), 0);
|
||||
|
||||
accessible = GTK_ACCESSIBLE (obj);
|
||||
widget = accessible->widget;
|
||||
widget = gtk_accessible_get_widget (accessible);
|
||||
if (widget == NULL)
|
||||
/* State is defunct */
|
||||
return 0;
|
||||
@ -235,7 +237,7 @@ gail_canvas_ref_child (AtkObject *obj,
|
||||
g_return_val_if_fail (GAIL_IS_CANVAS (obj), NULL);
|
||||
|
||||
accessible = GTK_ACCESSIBLE (obj);
|
||||
widget = accessible->widget;
|
||||
widget = gtk_accessible_get_widget (accessible);
|
||||
if (widget == NULL)
|
||||
/* State is defunct */
|
||||
return NULL;
|
||||
|
||||
@ -199,7 +199,7 @@ gail_canvas_item_ref_state_set (AtkObject *obj)
|
||||
{
|
||||
item = GNOME_CANVAS_ITEM (g_obj);
|
||||
|
||||
if (item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)
|
||||
if (item->flags & GNOME_CANVAS_ITEM_VISIBLE)
|
||||
{
|
||||
atk_state_set_add_state (state_set, ATK_STATE_VISIBLE);
|
||||
if (is_item_on_screen (item))
|
||||
@ -482,14 +482,16 @@ is_item_in_window (GnomeCanvasItem *item,
|
||||
gint height)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GdkWindow *window;
|
||||
gboolean retval;
|
||||
|
||||
widget = GTK_WIDGET (item->canvas);
|
||||
if (widget->window)
|
||||
window = gtk_widget_get_window (widget);
|
||||
if (window)
|
||||
{
|
||||
int window_width, window_height;
|
||||
|
||||
gdk_window_get_geometry (widget->window, NULL, NULL,
|
||||
gdk_window_get_geometry (window, NULL, NULL,
|
||||
&window_width, &window_height, NULL);
|
||||
/*
|
||||
* Check whether rectangles intersect
|
||||
|
||||
@ -1096,14 +1096,18 @@ gnome_canvas_line_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_pa
|
||||
static void
|
||||
gnome_canvas_line_realize (GnomeCanvasItem *item)
|
||||
{
|
||||
GtkLayout *layout;
|
||||
GnomeCanvasLine *line;
|
||||
GdkWindow *bin_window;
|
||||
|
||||
line = GNOME_CANVAS_LINE (item);
|
||||
|
||||
if (parent_class->realize)
|
||||
(* parent_class->realize) (item);
|
||||
|
||||
line->gc = gdk_gc_new (item->canvas->layout.bin_window);
|
||||
layout = GTK_LAYOUT (item->canvas);
|
||||
bin_window = gtk_layout_get_bin_window (layout);
|
||||
line->gc = gdk_gc_new (bin_window);
|
||||
|
||||
#if 0
|
||||
(* GNOME_CANVAS_ITEM_CLASS (item->object.klass)->update) (item, NULL, NULL, 0);
|
||||
|
||||
@ -1522,8 +1522,14 @@ gnome_canvas_rich_text_event(GnomeCanvasItem *item, GdkEvent *event)
|
||||
return gnome_canvas_rich_text_button_release_event(
|
||||
item, (GdkEventButton *) event);
|
||||
case GDK_FOCUS_CHANGE:
|
||||
if (((GdkEventFocus *) event)->window !=
|
||||
item->canvas->layout.bin_window)
|
||||
{
|
||||
GtkLayout *layout;
|
||||
GdkWindow *bin_window;
|
||||
|
||||
layout = GTK_LAYOUT (item->canvas);
|
||||
bin_window = gtk_layout_get_bin_window (layout);
|
||||
|
||||
if (((GdkEventFocus *) event)->window != bin_window)
|
||||
return FALSE;
|
||||
|
||||
if (((GdkEventFocus *) event)->in)
|
||||
@ -1532,6 +1538,7 @@ gnome_canvas_rich_text_event(GnomeCanvasItem *item, GdkEvent *event)
|
||||
else
|
||||
return gnome_canvas_rich_text_focus_out_event(
|
||||
item, (GdkEventFocus *) event);
|
||||
}
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
@ -1705,8 +1712,13 @@ scale_fonts(GtkTextTag *tag, gpointer data)
|
||||
{
|
||||
GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(data);
|
||||
|
||||
/* XXX GtkTextTag::values is sealed with apparently no way
|
||||
* to access it. This looks like a small optimization
|
||||
* anyway. */
|
||||
#if 0
|
||||
if (!tag->values)
|
||||
return;
|
||||
#endif
|
||||
|
||||
g_object_set(
|
||||
G_OBJECT(tag), "scale",
|
||||
@ -1919,7 +1931,7 @@ gnome_canvas_rich_text_ensure_layout(GnomeCanvasRichText *text)
|
||||
style = gtk_text_attributes_new();
|
||||
|
||||
gnome_canvas_rich_text_set_attributes_from_style(
|
||||
text, style, canvas->style);
|
||||
text, style, gtk_widget_get_style (canvas));
|
||||
|
||||
style->pixels_above_lines = text->_priv->pixels_above_lines;
|
||||
style->pixels_below_lines = text->_priv->pixels_below_lines;
|
||||
@ -2120,6 +2132,8 @@ gnome_canvas_rich_text_draw(GnomeCanvasItem *item, GdkDrawable *drawable,
|
||||
int x, int y, int width, int height)
|
||||
{
|
||||
GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT(item);
|
||||
GtkStyle *style;
|
||||
GtkWidget *widget;
|
||||
double i2w[6], w2c[6], i2c[6];
|
||||
double ax, ay;
|
||||
int x1, y1, x2, y2;
|
||||
@ -2145,13 +2159,16 @@ gnome_canvas_rich_text_draw(GnomeCanvasItem *item, GdkDrawable *drawable,
|
||||
y2 = c2.y;
|
||||
|
||||
gtk_text_layout_set_screen_width(text->_priv->layout, x2 - x1);
|
||||
|
||||
|
||||
widget = GTK_WIDGET (item->canvas);
|
||||
style = gtk_widget_get_style (widget);
|
||||
|
||||
/* FIXME: should last arg be NULL? */
|
||||
gtk_text_layout_draw(
|
||||
text->_priv->layout,
|
||||
GTK_WIDGET(item->canvas),
|
||||
widget,
|
||||
drawable,
|
||||
GTK_WIDGET (item->canvas)->style->text_gc[GTK_STATE_NORMAL],
|
||||
style->text_gc[GTK_STATE_NORMAL],
|
||||
x - x1, y - y1,
|
||||
0, 0, (x2 - x1) - (x - x1), (y2 - y1) - (y - y1),
|
||||
NULL);
|
||||
|
||||
@ -648,12 +648,18 @@ gnome_canvas_shape_realize (GnomeCanvasItem *item)
|
||||
(* parent_class->realize) (item);
|
||||
|
||||
if (!item->canvas->aa) {
|
||||
GtkLayout *layout;
|
||||
GdkWindow *bin_window;
|
||||
|
||||
gcbp_ensure_gdk (shape);
|
||||
|
||||
g_assert(item->canvas->layout.bin_window != NULL);
|
||||
layout = GTK_LAYOUT (item->canvas);
|
||||
bin_window = gtk_layout_get_bin_window (layout);
|
||||
|
||||
shape->priv->gdk->fill_gc = gdk_gc_new (item->canvas->layout.bin_window);
|
||||
shape->priv->gdk->outline_gc = gdk_gc_new (item->canvas->layout.bin_window);
|
||||
g_assert (bin_window != NULL);
|
||||
|
||||
shape->priv->gdk->fill_gc = gdk_gc_new (bin_window);
|
||||
shape->priv->gdk->outline_gc = gdk_gc_new (bin_window);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1428,10 +1434,11 @@ gcbp_ensure_mask (GnomeCanvasShape * shape, gint width, gint height)
|
||||
|
||||
if ((width > ctx->width) || (height > ctx->height)) {
|
||||
/* Ctx is too small */
|
||||
|
||||
GtkWidget *widget;
|
||||
GdkWindow * window;
|
||||
|
||||
window = ((GtkWidget *) (((GnomeCanvasItem *) shape)->canvas))->window;
|
||||
widget = GTK_WIDGET (GNOME_CANVAS_ITEM (shape)->canvas);
|
||||
window = gtk_widget_get_window (widget);
|
||||
|
||||
if (ctx->clear_gc) g_object_unref (ctx->clear_gc);
|
||||
if (ctx->xor_gc) g_object_unref (ctx->xor_gc);
|
||||
|
||||
@ -1307,9 +1307,13 @@ gnome_canvas_text_get_property (GObject *object,
|
||||
static void
|
||||
gnome_canvas_text_apply_font_desc (GnomeCanvasText *text)
|
||||
{
|
||||
PangoFontDescription *font_desc =
|
||||
pango_font_description_copy (
|
||||
GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas)->style->font_desc);
|
||||
PangoFontDescription *font_desc;
|
||||
GtkWidget *widget;
|
||||
GtkStyle *style;
|
||||
|
||||
widget = GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas);
|
||||
style = gtk_widget_get_style (widget);
|
||||
font_desc = pango_font_description_copy (style->font_desc);
|
||||
|
||||
if (text->font_desc)
|
||||
pango_font_description_merge (font_desc, text->font_desc, TRUE);
|
||||
@ -1423,6 +1427,8 @@ gnome_canvas_text_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_pa
|
||||
static void
|
||||
gnome_canvas_text_realize (GnomeCanvasItem *item)
|
||||
{
|
||||
GtkLayout *layout;
|
||||
GdkWindow *bin_window;
|
||||
GnomeCanvasText *text;
|
||||
|
||||
text = GNOME_CANVAS_TEXT (item);
|
||||
@ -1430,7 +1436,10 @@ gnome_canvas_text_realize (GnomeCanvasItem *item)
|
||||
if (parent_class->realize)
|
||||
(* parent_class->realize) (item);
|
||||
|
||||
text->gc = gdk_gc_new (item->canvas->layout.bin_window);
|
||||
layout = GTK_LAYOUT (item->canvas);
|
||||
bin_window = gtk_layout_get_bin_window (layout);
|
||||
|
||||
text->gc = gdk_gc_new (bin_window);
|
||||
}
|
||||
|
||||
/* Unrealize handler for the text item */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -90,17 +90,17 @@ typedef struct _GnomeCanvasGroupClass GnomeCanvasGroupClass;
|
||||
*/
|
||||
|
||||
/* Object flags for items */
|
||||
enum {
|
||||
GNOME_CANVAS_ITEM_REALIZED = 1 << 4,
|
||||
GNOME_CANVAS_ITEM_MAPPED = 1 << 5,
|
||||
GNOME_CANVAS_ITEM_ALWAYS_REDRAW = 1 << 6,
|
||||
GNOME_CANVAS_ITEM_VISIBLE = 1 << 7,
|
||||
GNOME_CANVAS_ITEM_NEED_UPDATE = 1 << 8,
|
||||
GNOME_CANVAS_ITEM_NEED_AFFINE = 1 << 9,
|
||||
GNOME_CANVAS_ITEM_NEED_CLIP = 1 << 10,
|
||||
GNOME_CANVAS_ITEM_NEED_VIS = 1 << 11,
|
||||
GNOME_CANVAS_ITEM_AFFINE_FULL = 1 << 12
|
||||
};
|
||||
typedef enum {
|
||||
GNOME_CANVAS_ITEM_REALIZED = 1 << 0,
|
||||
GNOME_CANVAS_ITEM_MAPPED = 1 << 1,
|
||||
GNOME_CANVAS_ITEM_ALWAYS_REDRAW = 1 << 2,
|
||||
GNOME_CANVAS_ITEM_VISIBLE = 1 << 3,
|
||||
GNOME_CANVAS_ITEM_NEED_UPDATE = 1 << 4,
|
||||
GNOME_CANVAS_ITEM_NEED_AFFINE = 1 << 5,
|
||||
GNOME_CANVAS_ITEM_NEED_CLIP = 1 << 6,
|
||||
GNOME_CANVAS_ITEM_NEED_VIS = 1 << 7,
|
||||
GNOME_CANVAS_ITEM_AFFINE_FULL = 1 << 8
|
||||
} GnomeCanvasItemFlags;
|
||||
|
||||
/* Update flags for items */
|
||||
enum {
|
||||
@ -161,6 +161,10 @@ struct _GnomeCanvasItem {
|
||||
|
||||
/* Bounding box for this item (in canvas coordinates) */
|
||||
double x1, y1, x2, y2;
|
||||
|
||||
/* XXX GtkObject flags are sealed now, so we have to provide
|
||||
* our own. This breaks ABI compatibility with upstream. */
|
||||
GnomeCanvasItemFlags flags;
|
||||
};
|
||||
|
||||
struct _GnomeCanvasItemClass {
|
||||
|
||||
@ -266,7 +266,7 @@ ecb_set_property (GObject *object,
|
||||
if (color_changed) {
|
||||
ecb->priv->color = color;
|
||||
|
||||
if (GNOME_CANVAS_ITEM_REALIZED & GTK_OBJECT_FLAGS(item)) {
|
||||
if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
get_color (ecb);
|
||||
if (!item->canvas->aa) {
|
||||
gdk_gc_set_foreground (ecb->priv->gc, &ecb->priv->color);
|
||||
|
||||
@ -256,7 +256,7 @@ e_canvas_vbox_real_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
|
||||
e_canvas_vbox->items = g_list_append(e_canvas_vbox->items, item);
|
||||
g_object_weak_ref (G_OBJECT (item),
|
||||
e_canvas_vbox_remove_item, e_canvas_vbox);
|
||||
if (GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
if (GNOME_CANVAS_ITEM (e_canvas_vbox)->flags & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
gnome_canvas_item_set(item,
|
||||
"width", (gdouble) e_canvas_vbox->minimum_width,
|
||||
NULL);
|
||||
@ -270,7 +270,7 @@ e_canvas_vbox_real_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *i
|
||||
e_canvas_vbox->items = g_list_prepend(e_canvas_vbox->items, item);
|
||||
g_object_weak_ref (G_OBJECT (item),
|
||||
e_canvas_vbox_remove_item, e_canvas_vbox);
|
||||
if (GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
if (GNOME_CANVAS_ITEM (e_canvas_vbox)->flags & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
gnome_canvas_item_set(item,
|
||||
"width", (gdouble) e_canvas_vbox->minimum_width,
|
||||
NULL);
|
||||
@ -297,7 +297,7 @@ static void
|
||||
e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags )
|
||||
{
|
||||
ECanvasVbox *e_canvas_vbox = E_CANVAS_VBOX(item);
|
||||
if (GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
|
||||
gdouble old_height;
|
||||
gdouble running_height;
|
||||
|
||||
@ -399,7 +399,7 @@ pick_current_item (GnomeCanvas *canvas, GdkEvent *event)
|
||||
|
||||
/* find the closest item */
|
||||
|
||||
if (canvas->root->object.flags & GNOME_CANVAS_ITEM_VISIBLE)
|
||||
if (canvas->root->flags & GNOME_CANVAS_ITEM_VISIBLE)
|
||||
gnome_canvas_item_invoke_point (canvas->root, x, y, cx, cy,
|
||||
&canvas->new_current_item);
|
||||
else
|
||||
@ -593,7 +593,11 @@ e_canvas_focus_in (GtkWidget *widget, GdkEventFocus *event)
|
||||
canvas = GNOME_CANVAS (widget);
|
||||
ecanvas = E_CANVAS (widget);
|
||||
|
||||
/* XXX Can't access flags directly anymore, but is it really needed?
|
||||
* If so, could we call gtk_widget_send_focus_change() instead? */
|
||||
#if 0
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
|
||||
#endif
|
||||
|
||||
gtk_im_context_focus_in (ecanvas->im_context);
|
||||
|
||||
@ -616,7 +620,11 @@ e_canvas_focus_out (GtkWidget *widget, GdkEventFocus *event)
|
||||
canvas = GNOME_CANVAS (widget);
|
||||
ecanvas = E_CANVAS (widget);
|
||||
|
||||
/* XXX Can't access flags directly anymore, but is it really needed?
|
||||
* If so, could we call gtk_widget_send_focus_change() instead? */
|
||||
#if 0
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
|
||||
#endif
|
||||
|
||||
gtk_im_context_focus_out (ecanvas->im_context);
|
||||
|
||||
@ -700,12 +708,12 @@ e_canvas_item_invoke_reflow (GnomeCanvasItem *item, gint flags)
|
||||
group = GNOME_CANVAS_GROUP (item);
|
||||
for (list = group->item_list; list; list = list->next) {
|
||||
child = GNOME_CANVAS_ITEM (list->data);
|
||||
if (child->object.flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW)
|
||||
if (child->flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW)
|
||||
e_canvas_item_invoke_reflow (child, flags);
|
||||
}
|
||||
}
|
||||
|
||||
if (item->object.flags & E_CANVAS_ITEM_NEEDS_REFLOW) {
|
||||
if (item->flags & E_CANVAS_ITEM_NEEDS_REFLOW) {
|
||||
ECanvasItemReflowFunc func;
|
||||
func = (ECanvasItemReflowFunc)
|
||||
g_object_get_data (G_OBJECT (item),
|
||||
@ -714,14 +722,14 @@ e_canvas_item_invoke_reflow (GnomeCanvasItem *item, gint flags)
|
||||
func (item, flags);
|
||||
}
|
||||
|
||||
item->object.flags &= ~E_CANVAS_ITEM_NEEDS_REFLOW;
|
||||
item->object.flags &= ~E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW;
|
||||
item->flags &= ~E_CANVAS_ITEM_NEEDS_REFLOW;
|
||||
item->flags &= ~E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW;
|
||||
}
|
||||
|
||||
static void
|
||||
do_reflow (ECanvas *canvas)
|
||||
{
|
||||
if (GNOME_CANVAS(canvas)->root->object.flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW)
|
||||
if (GNOME_CANVAS(canvas)->root->flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW)
|
||||
e_canvas_item_invoke_reflow (GNOME_CANVAS(canvas)->root, 0);
|
||||
}
|
||||
|
||||
@ -761,10 +769,10 @@ add_idle (ECanvas *canvas)
|
||||
static void
|
||||
e_canvas_item_descendent_needs_reflow (GnomeCanvasItem *item)
|
||||
{
|
||||
if (item->object.flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW)
|
||||
if (item->flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW)
|
||||
return;
|
||||
|
||||
item->object.flags |= E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW;
|
||||
item->flags |= E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW;
|
||||
if (item->parent)
|
||||
e_canvas_item_descendent_needs_reflow(item->parent);
|
||||
}
|
||||
@ -772,8 +780,8 @@ e_canvas_item_descendent_needs_reflow (GnomeCanvasItem *item)
|
||||
void
|
||||
e_canvas_item_request_reflow (GnomeCanvasItem *item)
|
||||
{
|
||||
if (item->object.flags & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
item->object.flags |= E_CANVAS_ITEM_NEEDS_REFLOW;
|
||||
if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
item->flags |= E_CANVAS_ITEM_NEEDS_REFLOW;
|
||||
e_canvas_item_descendent_needs_reflow(item);
|
||||
add_idle(E_CANVAS(item->canvas));
|
||||
}
|
||||
|
||||
@ -1040,7 +1040,7 @@ etgc_reflow (GnomeCanvasItem *item, gint flags)
|
||||
if (frozen)
|
||||
return;
|
||||
|
||||
if (GTK_OBJECT_FLAGS(etgc)& GNOME_CANVAS_ITEM_REALIZED) {
|
||||
if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
gdouble running_height = 0;
|
||||
gdouble running_width = 0;
|
||||
gdouble old_height;
|
||||
|
||||
@ -343,12 +343,15 @@ eti_free_save_state (ETableItem *eti)
|
||||
static void
|
||||
eti_realize_cell_views ( ETableItem *eti)
|
||||
{
|
||||
GnomeCanvasItem *item;
|
||||
gint i;
|
||||
|
||||
item = GNOME_CANVAS_ITEM (eti);
|
||||
|
||||
if (eti->cell_views_realized)
|
||||
return;
|
||||
|
||||
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED))
|
||||
if (!(item->flags & GNOME_CANVAS_ITEM_REALIZED))
|
||||
return;
|
||||
|
||||
for (i = 0; i < eti->n_cells; i++)
|
||||
@ -673,7 +676,11 @@ height_cache_idle(ETableItem *eti)
|
||||
static void
|
||||
free_height_cache (ETableItem *eti)
|
||||
{
|
||||
if (GNOME_CANVAS_ITEM_REALIZED & GTK_OBJECT_FLAGS (eti)) {
|
||||
GnomeCanvasItem *item;
|
||||
|
||||
item = GNOME_CANVAS_ITEM (eti);
|
||||
|
||||
if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
if (eti->height_cache)
|
||||
g_free (eti->height_cache);
|
||||
eti->height_cache = NULL;
|
||||
@ -909,9 +916,12 @@ eti_request_region_show (ETableItem *eti,
|
||||
static void
|
||||
eti_show_cursor (ETableItem *eti, gint delay)
|
||||
{
|
||||
GnomeCanvasItem *item;
|
||||
gint cursor_row;
|
||||
|
||||
if (!((GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized))
|
||||
item = GNOME_CANVAS_ITEM (eti);
|
||||
|
||||
if (!((item->flags & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized))
|
||||
return;
|
||||
|
||||
if (eti->frozen_count > 0) {
|
||||
@ -940,17 +950,13 @@ eti_show_cursor (ETableItem *eti, gint delay)
|
||||
static void
|
||||
eti_check_cursor_bounds (ETableItem *eti)
|
||||
{
|
||||
GnomeCanvasItem *item;
|
||||
gint x1, y1, x2, y2;
|
||||
gint cursor_row;
|
||||
|
||||
if (!((GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized))
|
||||
return;
|
||||
item = GNOME_CANVAS_ITEM (eti);
|
||||
|
||||
if (eti->frozen_count > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!((GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized))
|
||||
if (!((item->flags & GNOME_CANVAS_ITEM_REALIZED) && eti->cell_views_realized))
|
||||
return;
|
||||
|
||||
if (eti->frozen_count > 0) {
|
||||
@ -1089,7 +1095,9 @@ eti_table_model_no_change (ETableModel *table_model, ETableItem *eti)
|
||||
static void
|
||||
eti_table_model_changed (ETableModel *table_model, ETableItem *eti)
|
||||
{
|
||||
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) {
|
||||
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
|
||||
|
||||
if (!(item->flags & GNOME_CANVAS_ITEM_REALIZED)) {
|
||||
eti_unfreeze (eti);
|
||||
return;
|
||||
}
|
||||
@ -1111,7 +1119,9 @@ eti_table_model_changed (ETableModel *table_model, ETableItem *eti)
|
||||
static void
|
||||
eti_table_model_row_changed (ETableModel *table_model, gint row, ETableItem *eti)
|
||||
{
|
||||
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) {
|
||||
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
|
||||
|
||||
if (!(item->flags & GNOME_CANVAS_ITEM_REALIZED)) {
|
||||
eti_unfreeze (eti);
|
||||
return;
|
||||
}
|
||||
@ -1129,7 +1139,9 @@ eti_table_model_row_changed (ETableModel *table_model, gint row, ETableItem *eti
|
||||
static void
|
||||
eti_table_model_cell_changed (ETableModel *table_model, gint col, gint row, ETableItem *eti)
|
||||
{
|
||||
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) {
|
||||
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
|
||||
|
||||
if (!(item->flags & GNOME_CANVAS_ITEM_REALIZED)) {
|
||||
eti_unfreeze (eti);
|
||||
return;
|
||||
}
|
||||
@ -1147,7 +1159,9 @@ eti_table_model_cell_changed (ETableModel *table_model, gint col, gint row, ETab
|
||||
static void
|
||||
eti_table_model_rows_inserted (ETableModel *table_model, gint row, gint count, ETableItem *eti)
|
||||
{
|
||||
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) {
|
||||
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
|
||||
|
||||
if (!(item->flags & GNOME_CANVAS_ITEM_REALIZED)) {
|
||||
eti_unfreeze (eti);
|
||||
return;
|
||||
}
|
||||
@ -1174,7 +1188,9 @@ eti_table_model_rows_inserted (ETableModel *table_model, gint row, gint count, E
|
||||
static void
|
||||
eti_table_model_rows_deleted (ETableModel *table_model, gint row, gint count, ETableItem *eti)
|
||||
{
|
||||
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED)) {
|
||||
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
|
||||
|
||||
if (!(item->flags & GNOME_CANVAS_ITEM_REALIZED)) {
|
||||
eti_unfreeze (eti);
|
||||
return;
|
||||
}
|
||||
@ -1428,11 +1444,10 @@ eti_dispose (GObject *object)
|
||||
static void
|
||||
eti_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
|
||||
{
|
||||
ETableItem *eti;
|
||||
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (object);
|
||||
ETableItem *eti = E_TABLE_ITEM (object);
|
||||
gint cursor_col;
|
||||
|
||||
eti = E_TABLE_ITEM (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_TABLE_HEADER:
|
||||
eti_remove_header_model (eti);
|
||||
@ -1481,7 +1496,7 @@ eti_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpe
|
||||
if ((eti->minimum_width == eti->width && g_value_get_double(value) > eti->width) ||
|
||||
g_value_get_double(value) < eti->width) {
|
||||
eti->needs_compute_width = 1;
|
||||
e_canvas_item_request_reflow (GNOME_CANVAS_ITEM(eti));
|
||||
e_canvas_item_request_reflow (item);
|
||||
}
|
||||
eti->minimum_width = g_value_get_double (value);
|
||||
break;
|
||||
@ -1495,18 +1510,18 @@ eti_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpe
|
||||
case PROP_UNIFORM_ROW_HEIGHT:
|
||||
if (eti->uniform_row_height != g_value_get_boolean (value)) {
|
||||
eti->uniform_row_height = g_value_get_boolean (value);
|
||||
if (GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
|
||||
free_height_cache(eti);
|
||||
eti->needs_compute_height = 1;
|
||||
e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (eti));
|
||||
e_canvas_item_request_reflow (item);
|
||||
eti->needs_redraw = 1;
|
||||
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (eti));
|
||||
gnome_canvas_item_request_update (item);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
eti->needs_redraw = 1;
|
||||
gnome_canvas_item_request_update (GNOME_CANVAS_ITEM(eti));
|
||||
gnome_canvas_item_request_update (item);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -2765,7 +2780,9 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e)
|
||||
static void
|
||||
eti_style_set (ETableItem *eti, GtkStyle *previous_style)
|
||||
{
|
||||
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED))
|
||||
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
|
||||
|
||||
if (!(item->flags & GNOME_CANVAS_ITEM_REALIZED))
|
||||
return;
|
||||
|
||||
if (eti->cell_views_realized) {
|
||||
@ -3074,9 +3091,10 @@ e_table_item_get_focused_column (ETableItem *eti)
|
||||
static void
|
||||
eti_cursor_change (ESelectionModel *selection, gint row, gint col, ETableItem *eti)
|
||||
{
|
||||
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
|
||||
gint view_row;
|
||||
|
||||
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED))
|
||||
if (!(item->flags & GNOME_CANVAS_ITEM_REALIZED))
|
||||
return;
|
||||
|
||||
view_row = model_to_view_row(eti, row);
|
||||
@ -3112,10 +3130,11 @@ eti_cursor_change (ESelectionModel *selection, gint row, gint col, ETableItem *e
|
||||
static void
|
||||
eti_cursor_activated (ESelectionModel *selection, gint row, gint col, ETableItem *eti)
|
||||
{
|
||||
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
|
||||
gint view_row;
|
||||
gint view_col;
|
||||
|
||||
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED))
|
||||
if (!(item->flags & GNOME_CANVAS_ITEM_REALIZED))
|
||||
return;
|
||||
|
||||
view_row = model_to_view_row(eti, row);
|
||||
@ -3143,7 +3162,9 @@ eti_cursor_activated (ESelectionModel *selection, gint row, gint col, ETableItem
|
||||
static void
|
||||
eti_selection_change (ESelectionModel *selection, ETableItem *eti)
|
||||
{
|
||||
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED))
|
||||
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
|
||||
|
||||
if (!(item->flags & GNOME_CANVAS_ITEM_REALIZED))
|
||||
return;
|
||||
|
||||
eti->needs_redraw = TRUE;
|
||||
@ -3153,7 +3174,9 @@ eti_selection_change (ESelectionModel *selection, ETableItem *eti)
|
||||
static void
|
||||
eti_selection_row_change (ESelectionModel *selection, gint row, ETableItem *eti)
|
||||
{
|
||||
if (!(GTK_OBJECT_FLAGS(eti) & GNOME_CANVAS_ITEM_REALIZED))
|
||||
GnomeCanvasItem *item = GNOME_CANVAS_ITEM (eti);
|
||||
|
||||
if (!(item->flags & GNOME_CANVAS_ITEM_REALIZED))
|
||||
return;
|
||||
|
||||
if (!eti->needs_redraw) {
|
||||
|
||||
@ -730,14 +730,14 @@ e_reflow_set_property (GObject *object, guint prop_id, const GValue *value, GPar
|
||||
break;
|
||||
case PROP_MINIMUM_WIDTH:
|
||||
reflow->minimum_width = g_value_get_double (value);
|
||||
if (GNOME_CANVAS_ITEM_REALIZED & GTK_OBJECT_FLAGS(object))
|
||||
if (item->flags & GNOME_CANVAS_ITEM_REALIZED)
|
||||
set_empty(reflow);
|
||||
e_canvas_item_request_reflow(item);
|
||||
break;
|
||||
case PROP_EMPTY_MESSAGE:
|
||||
g_free(reflow->empty_message);
|
||||
reflow->empty_message = g_strdup(g_value_get_string (value));
|
||||
if (GNOME_CANVAS_ITEM_REALIZED & GTK_OBJECT_FLAGS(object))
|
||||
if (item->flags & GNOME_CANVAS_ITEM_REALIZED)
|
||||
set_empty(reflow);
|
||||
break;
|
||||
case PROP_MODEL:
|
||||
@ -1382,7 +1382,7 @@ e_reflow_reflow( GnomeCanvasItem *item, gint flags )
|
||||
gint next_column;
|
||||
gint i;
|
||||
|
||||
if (!(GTK_OBJECT_FLAGS (reflow) & GNOME_CANVAS_ITEM_REALIZED))
|
||||
if (!(item->flags & GNOME_CANVAS_ITEM_REALIZED))
|
||||
return;
|
||||
|
||||
if (reflow->need_reflow_columns) {
|
||||
|
||||
Reference in New Issue
Block a user