/* Returns the number of undo's. */
static gint
test_undo_redo (GtkSourceBuffer *buffer,
		gint             max_actions)
{
	gint nb_actions;
	gint i;

	for (nb_actions = 0; nb_actions < max_actions; nb_actions++)
	{
		if (gtk_source_buffer_can_undo (buffer))
		{
			gtk_source_buffer_undo (buffer);
		}
		else
		{
			break;
		}
	}

	for (i = 0; i < nb_actions; i++)
	{
		g_assert (gtk_source_buffer_can_redo (buffer));
		gtk_source_buffer_redo (buffer);
	}

	return nb_actions;
}
Beispiel #2
0
void mape_edit_view_redo(MapeEditView* edit_view)
{
	gtk_source_buffer_redo(
		GTK_SOURCE_BUFFER(
			gtk_text_view_get_buffer(GTK_TEXT_VIEW(edit_view->view))
		)
	);
}
Beispiel #3
0
void
peacock_file_redo (PeacockFile *file)
{
	g_return_if_fail (file != NULL);
	g_return_if_fail (PEACOCK_IS_FILE (file));

	gtk_source_buffer_redo (GTK_SOURCE_BUFFER (file));
}
Beispiel #4
0
/* Edit->Redo */
void
action_redo(GtkAction *action, I7Document *document)
{
	GtkSourceBuffer *buffer = i7_document_get_buffer(document);
	if(gtk_source_buffer_can_redo(buffer))
		gtk_source_buffer_redo(buffer);

	/* Update the "sensitive" state of the undo and redo actions */
	gtk_action_set_sensitive(action, gtk_source_buffer_can_redo(buffer));
	gtk_action_set_sensitive(document->undo, gtk_source_buffer_can_undo(buffer));
}
void
gtr_actions_edit_redo (GtkAction * action, GtrWindow * window)
{
  GtrView *active_view;
  GtkSourceBuffer *active_document;

  active_view = gtr_window_get_active_view (window);
  g_return_if_fail (active_view);

  active_document =
    GTK_SOURCE_BUFFER (gtk_text_view_get_buffer
                       (GTK_TEXT_VIEW (active_view)));

  gtk_text_buffer_begin_user_action (GTK_TEXT_BUFFER (active_document));
  gtk_source_buffer_redo (active_document);
  gtk_text_buffer_end_user_action (GTK_TEXT_BUFFER (active_document));

  gtk_widget_grab_focus (GTK_WIDGET (active_view));
}
Beispiel #6
0
void
_xedit_cmd_edit_redo (GtkAction   *action,
		     XeditWindow *window)
{
	XeditView *active_view;
	GtkSourceBuffer *active_document;

	xedit_debug (DEBUG_COMMANDS);

	active_view = xedit_window_get_active_view (window);
	g_return_if_fail (active_view);

	active_document = GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (active_view)));

	gtk_source_buffer_redo (active_document);

	xedit_view_scroll_to_cursor (active_view);

	gtk_widget_grab_focus (GTK_WIDGET (active_view));
}
Beispiel #7
0
void
_gedit_cmd_edit_redo (GSimpleAction *action,
                      GVariant      *parameter,
                      gpointer       user_data)
{
	GeditWindow *window = GEDIT_WINDOW (user_data);
	GeditView *active_view;
	GtkSourceBuffer *active_document;

	gedit_debug (DEBUG_COMMANDS);

	active_view = gedit_window_get_active_view (window);
	g_return_if_fail (active_view);

	active_document = GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (active_view)));

	gtk_source_buffer_redo (active_document);

	gedit_view_scroll_to_cursor (active_view);

	gtk_widget_grab_focus (GTK_WIDGET (active_view));
}
Beispiel #8
0
void do_redo(){
  if(gtk_source_buffer_can_redo(GTK_SOURCE_BUFFER(mBuff)))  gtk_source_buffer_redo(GTK_SOURCE_BUFFER(mBuff));
}
Beispiel #9
0
//操作をやり直す
void redo_action(void)
{
    gtk_source_buffer_redo(buffer);
}