diff options
| author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-10-24 21:14:35 +0000 | 
|---|---|---|
| committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-10-24 21:14:35 +0000 | 
| commit | 7b773f5c8225479e0748db69b9ac7f92b127890c (patch) | |
| tree | c17b8af3a09888232fc64a4f73605c1c81a5c2d9 /hardinfo2/callbacks.c | |
| parent | c4fea4934333faac2a6629c945333697d2d15142 (diff) | |
Allows to change the report output format. Better report generation code.
Diffstat (limited to 'hardinfo2/callbacks.c')
| -rw-r--r-- | hardinfo2/callbacks.c | 8 | 
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() | 
