aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/callbacks.c
diff options
context:
space:
mode:
Diffstat (limited to 'hardinfo2/callbacks.c')
-rw-r--r--hardinfo2/callbacks.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/hardinfo2/callbacks.c b/hardinfo2/callbacks.c
index 1146bc50..c56088f4 100644
--- a/hardinfo2/callbacks.c
+++ b/hardinfo2/callbacks.c
@@ -37,8 +37,7 @@ void cb_copy_to_clipboard()
ShellModuleEntry *entry = shell_get_main_shell()->selected;
gchar *data = entry->func(entry->number);
GtkClipboard *clip = gtk_clipboard_get(gdk_atom_intern("CLIPBOARD", FALSE));
- gchar *fmtdata = g_strdup("");
- ReportContext *ctx = report_context_string_new(NULL, fmtdata);
+ ReportContext *ctx = report_context_text_new(NULL);
ctx->entry = entry;
@@ -46,11 +45,10 @@ void cb_copy_to_clipboard()
report_table(ctx, data);
report_footer(ctx);
- gtk_clipboard_set_text(clip, ctx->stream, -1);
+ gtk_clipboard_set_text(clip, ctx->output, -1);
- g_free((gchar*) ctx->stream);
- g_free(ctx);
g_free(data);
+ report_context_free(ctx);
}
void cb_side_pane()