static void on_stash_diff_command_finished (AnjutaCommand *command, guint return_code, GtkTreeStore *stash_model) { GtkTreePath *parent_path; GtkTreeIter parent_iter; GtkTreeIter iter; GQueue *output; gchar *output_line; if (return_code == 0) { parent_path = g_object_get_data (G_OBJECT (command), "parent-path"); gtk_tree_model_get_iter (GTK_TREE_MODEL (stash_model), &parent_iter, parent_path); output = git_raw_output_command_get_output (GIT_RAW_OUTPUT_COMMAND (command)); while (g_queue_peek_head (output)) { output_line = g_queue_pop_head (output); gtk_tree_store_append (stash_model, &iter, &parent_iter); gtk_tree_store_set (stash_model, &iter, COL_DIFF, output_line, -1); g_free (output_line); } } }
void git_pane_send_raw_output_to_editor (AnjutaCommand *command, IAnjutaEditor *editor) { GQueue *output; gchar *line; output = git_raw_output_command_get_output (GIT_RAW_OUTPUT_COMMAND (command)); while (g_queue_peek_head (output)) { line = g_queue_pop_head (output); ianjuta_editor_append (editor, line, strlen (line), NULL); g_free (line); } }
static void on_diff_command_data_arrived (AnjutaCommand *command, IAnjutaVcsDiffCallback callback) { GQueue *output; gchar *line; output = git_raw_output_command_get_output (GIT_RAW_OUTPUT_COMMAND (command)); while (g_queue_peek_head (output)) { line = g_queue_pop_head (output); callback (g_object_get_data (G_OBJECT (command), "file"), line, g_object_get_data (G_OBJECT (command), "user-data")); g_free (line); } }
static void on_tag_list_command_data_arrived (AnjutaCommand *command, GtkListStore *push_tag_model) { GQueue *output; gchar *name; GtkTreeIter iter; output = git_raw_output_command_get_output (GIT_RAW_OUTPUT_COMMAND (command)); while (g_queue_peek_head (output)) { name = g_queue_pop_head (output); gtk_list_store_append (push_tag_model, &iter); gtk_list_store_set (push_tag_model, &iter, COL_SELECTED, FALSE, COL_NAME, name, -1); g_free (name); } }