gboolean
-on_text_change (GtkTextBuffer *buf, gpointer data)
+on_text_change (GtkTextBuffer *buf, TboWindow *tbo)
{
GtkTextIter start, end;
gtk_text_buffer_get_start_iter (buf, &start);
if (TEXT_SELECTED)
{
tbo_text_set_text (TEXT_SELECTED, gtk_text_buffer_get_text (buf, &start, &end, FALSE));
+ update_drawing (tbo);
}
return FALSE;
}
y = tbo_frame_get_base_y (y);
text_tool_get_color (&r, &g, &b);
text = tbo_text_new_with_params (x, y, 100, 0,
- "Texto",
+ _("Texto"),
(char *)text_tool_get_pango_font (),
r, g, b);
tbo_frame_add_obj (frame, text);
}
text_tool_set_selected (text);
+ update_drawing (tbo);
}
void text_tool_on_release (GtkWidget *widget, GdkEventButton *event, TboWindow *tbo)
cairo_t *cr;
enum Tool tool;
GdkWindow *window;
+ gint w, h;
cr = gdk_cairo_create(GTK_LAYOUT (widget)->bin_window);
+ gdk_drawable_get_size (GDK_DRAWABLE (GTK_LAYOUT (widget)->bin_window), &w, &h);
cairo_set_source_rgb (cr, 0, 0, 0);
- cairo_rectangle (cr, 0, 0, tbo->comic->width,
- tbo->comic->height);
+ cairo_rectangle (cr, 0, 0, w, h);
cairo_fill (cr);
tbo_drawing_draw (cr, tbo);