Beispiel #1
0
/*#
    @method get_deleted GtkTextMark
    @brief Returns true if the mark has been removed from its buffer with gtk_text_buffer_delete_mark().
    @return whether the mark is deleted

    See gtk_text_buffer_add_mark() for a way to add it to a buffer again.
 */
FALCON_FUNC TextMark::get_deleted( VMARG )
{
    NO_ARGS
    MYSELF;
    GET_OBJ( self );
    vm->retval( (bool) gtk_text_mark_get_deleted( (GtkTextMark*)_obj ) );
}
void
_gcr_display_view_clear (GcrDisplayView *self, GcrRenderer *renderer)
{
	GtkTextIter start, iter;
	GcrDisplayItem *item;

	g_return_if_fail (GCR_IS_DISPLAY_VIEW (self));
	item = lookup_display_item (self, renderer);
	g_return_if_fail (item);

	if (gtk_widget_get_parent (item->details_widget))
		gtk_container_remove (GTK_CONTAINER (self), item->details_widget);
	gtk_text_buffer_get_iter_at_mark (self->pv->buffer, &start, item->beginning);
	gtk_text_buffer_get_iter_at_mark (self->pv->buffer, &iter, item->ending);
	gtk_text_buffer_delete (self->pv->buffer, &start, &iter);

	g_return_if_fail (!gtk_text_mark_get_deleted (item->beginning));
	g_return_if_fail (!gtk_text_mark_get_deleted (item->ending));

	item->extra_tag = NULL;
	item->field_width = 0;
	item->details = FALSE;
}
static void
destroy_display_item (gpointer data)
{
	GcrDisplayItem *item = data;
	GtkTextTagTable *tags;
	GcrDisplayView *self;

	g_assert (item);

	g_assert (GCR_IS_DISPLAY_VIEW (item->display_view));
	self = item->display_view;

	tags = gtk_text_buffer_get_tag_table (self->pv->buffer);
	gtk_text_tag_table_remove (tags, item->field_tag);
	gtk_text_tag_table_remove (tags, item->details_tag);

	g_object_unref (item->field_tag);
	g_object_unref (item->details_tag);

	if (item->pixbuf)
		g_object_unref (item->pixbuf);
	item->pixbuf = NULL;

	g_assert (item->details_widget);
	g_object_unref (item->details_widget);
	item->details_widget = NULL;

	g_return_if_fail (!gtk_text_mark_get_deleted (item->beginning));
	gtk_text_buffer_delete_mark (self->pv->buffer, item->beginning);
	g_object_unref (item->beginning);

	g_return_if_fail (!gtk_text_mark_get_deleted (item->ending));
	gtk_text_buffer_delete_mark (self->pv->buffer, item->ending);
	g_object_unref (item->ending);

	g_free (item);
}
Beispiel #4
0
static VALUE
rg_deleted_p(VALUE self)
{
    return CBOOL2RVAL(gtk_text_mark_get_deleted(_SELF(self)));
}