Commit 6b574695 authored by Arturo Espinosa's avatar Arturo Espinosa
Browse files

Python warning fixes; Clipboard exports to X selection fixes Paste from X



Python warning fixes;  Clipboard exports to X selection fixes
Paste from X selection will need a bit more of work.
parent dab2b065
1998-09-26 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/render-ascii.c (cell_region_render_ascii): Ok, remove the
leaks now.
1998-09-25 Adrian Likins <adrian@gimp.org>
*docs/cell_refer.sgml
docs/gnumeric.sgml
docs/editing.sgml: Change the structure of the outline
*doc/cell_refer.sgml
doc/gnumeric.sgml
doc/editing.sgml: Change the structure of the outline
of the docs to make a bit mroe sense. Added some more
docs too.
*docs/cell-*.jpg, docs/selection[8,9,10].jpg: more jpgs
*doc/cell-*.jpg, doc/selection[8,9,10].jpg: more jpgs
1998-09-25 Miguel de Icaza <miguel@nuclecu.unam.mx>
......@@ -45,16 +50,16 @@
1998-09-25 Adrian Likins <adrian@gimp.org>
* docs/dndselection.sgml, selection.sml: more docs, some
* doc/dndselection.sgml, selection.sml: more docs, some
on creating selections, and some on moving/copying cells
* docs/dndselection-*.jpg, selection-*.jpg: jpegs to
* doc/dndselection-*.jpg, selection-*.jpg: jpegs to
accompany the docs.
1998-09-24 Adrian Likins <adrian@gimp.org>
* docs/gnumeric.sgml, autofill.sgml: Some docs on the autofill
* doc/gnumeric.sgml, autofill.sgml: Some docs on the autofill
stuff.
* docs/autofill-[1..10].jpg: jpegs accompaning the autofill docs
* doc/autofill-[1..10].jpg: jpegs accompaning the autofill docs
1998-09-24 Miguel de Icaza <miguel@nuclecu.unam.mx>
......
1998-09-26 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/render-ascii.c (cell_region_render_ascii): Ok, remove the
leaks now.
1998-09-25 Adrian Likins <adrian@gimp.org>
*docs/cell_refer.sgml
docs/gnumeric.sgml
docs/editing.sgml: Change the structure of the outline
*doc/cell_refer.sgml
doc/gnumeric.sgml
doc/editing.sgml: Change the structure of the outline
of the docs to make a bit mroe sense. Added some more
docs too.
*docs/cell-*.jpg, docs/selection[8,9,10].jpg: more jpgs
*doc/cell-*.jpg, doc/selection[8,9,10].jpg: more jpgs
1998-09-25 Miguel de Icaza <miguel@nuclecu.unam.mx>
......@@ -45,16 +50,16 @@
1998-09-25 Adrian Likins <adrian@gimp.org>
* docs/dndselection.sgml, selection.sml: more docs, some
* doc/dndselection.sgml, selection.sml: more docs, some
on creating selections, and some on moving/copying cells
* docs/dndselection-*.jpg, selection-*.jpg: jpegs to
* doc/dndselection-*.jpg, selection-*.jpg: jpegs to
accompany the docs.
1998-09-24 Adrian Likins <adrian@gimp.org>
* docs/gnumeric.sgml, autofill.sgml: Some docs on the autofill
* doc/gnumeric.sgml, autofill.sgml: Some docs on the autofill
stuff.
* docs/autofill-[1..10].jpg: jpegs accompaning the autofill docs
* doc/autofill-[1..10].jpg: jpegs accompaning the autofill docs
1998-09-24 Miguel de Icaza <miguel@nuclecu.unam.mx>
......
1998-09-26 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/render-ascii.c (cell_region_render_ascii): Ok, remove the
leaks now.
1998-09-25 Adrian Likins <adrian@gimp.org>
*docs/cell_refer.sgml
docs/gnumeric.sgml
docs/editing.sgml: Change the structure of the outline
*doc/cell_refer.sgml
doc/gnumeric.sgml
doc/editing.sgml: Change the structure of the outline
of the docs to make a bit mroe sense. Added some more
docs too.
*docs/cell-*.jpg, docs/selection[8,9,10].jpg: more jpgs
*doc/cell-*.jpg, doc/selection[8,9,10].jpg: more jpgs
1998-09-25 Miguel de Icaza <miguel@nuclecu.unam.mx>
......@@ -45,16 +50,16 @@
1998-09-25 Adrian Likins <adrian@gimp.org>
* docs/dndselection.sgml, selection.sml: more docs, some
* doc/dndselection.sgml, selection.sml: more docs, some
on creating selections, and some on moving/copying cells
* docs/dndselection-*.jpg, selection-*.jpg: jpegs to
* doc/dndselection-*.jpg, selection-*.jpg: jpegs to
accompany the docs.
1998-09-24 Adrian Likins <adrian@gimp.org>
* docs/gnumeric.sgml, autofill.sgml: Some docs on the autofill
* doc/gnumeric.sgml, autofill.sgml: Some docs on the autofill
stuff.
* docs/autofill-[1..10].jpg: jpegs accompaning the autofill docs
* doc/autofill-[1..10].jpg: jpegs accompaning the autofill docs
1998-09-24 Miguel de Icaza <miguel@nuclecu.unam.mx>
......
1998-09-26 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/render-ascii.c (cell_region_render_ascii): Ok, remove the
leaks now.
1998-09-25 Adrian Likins <adrian@gimp.org>
*docs/cell_refer.sgml
docs/gnumeric.sgml
docs/editing.sgml: Change the structure of the outline
*doc/cell_refer.sgml
doc/gnumeric.sgml
doc/editing.sgml: Change the structure of the outline
of the docs to make a bit mroe sense. Added some more
docs too.
*docs/cell-*.jpg, docs/selection[8,9,10].jpg: more jpgs
*doc/cell-*.jpg, doc/selection[8,9,10].jpg: more jpgs
1998-09-25 Miguel de Icaza <miguel@nuclecu.unam.mx>
......@@ -45,16 +50,16 @@
1998-09-25 Adrian Likins <adrian@gimp.org>
* docs/dndselection.sgml, selection.sml: more docs, some
* doc/dndselection.sgml, selection.sml: more docs, some
on creating selections, and some on moving/copying cells
* docs/dndselection-*.jpg, selection-*.jpg: jpegs to
* doc/dndselection-*.jpg, selection-*.jpg: jpegs to
accompany the docs.
1998-09-24 Adrian Likins <adrian@gimp.org>
* docs/gnumeric.sgml, autofill.sgml: Some docs on the autofill
* doc/gnumeric.sgml, autofill.sgml: Some docs on the autofill
stuff.
* docs/autofill-[1..10].jpg: jpegs accompaning the autofill docs
* doc/autofill-[1..10].jpg: jpegs accompaning the autofill docs
1998-09-24 Miguel de Icaza <miguel@nuclecu.unam.mx>
......
......@@ -2,11 +2,8 @@
* Rudimentary support for Python in gnumeric.
*/
#include <string.h>
#include <glib.h>
#include <gnome.h>
#include <string.h>
#include "../../src/gnumeric.h"
#include "../../src/symbol.h"
#include "../../src/plugin.h"
......@@ -178,20 +175,18 @@ no_unloading_for_me(PluginData *pd)
int
init_plugin(PluginData * pd)
{
PyObject *m, *d, *f;
pd->can_unload = no_unloading_for_me;
pd->title = g_strdup("Python Plugin");
/* initialize the python interpreter */
Py_SetProgramName("gnumeric");
Py_Initialize();
Py_SetProgramName ("gnumeric");
Py_Initialize ();
/* setup standard functions */
initgnumeric();
if (PyErr_Occurred()) {
PyErr_Print();
initgnumeric ();
if (PyErr_Occurred ()) {
PyErr_Print ();
return -1;
}
......
......@@ -101,11 +101,16 @@ CellRegion *
clipboard_copy_cell_range (Sheet *sheet, int start_col, int start_row, int end_col, int end_row)
{
append_cell_closure_t c;
GtkEditable *editable;
g_return_val_if_fail (sheet != NULL, NULL);
g_return_val_if_fail (IS_SHEET (sheet), NULL);
g_return_val_if_fail (start_col <= end_col, NULL);
g_return_val_if_fail (start_row <= end_row, NULL);
if (!editable){
editable = GTK_EDITABLE (gtk_type_new (gtk_editable_get_type ()));
}
c.r = g_new0 (CellRegion, 1);
......@@ -166,7 +171,7 @@ clipboard_paste_region (CellRegion *region, Sheet *dest_sheet,
GList *deps;
int formulas = 0;
int col, row;
g_return_if_fail (region != NULL);
g_return_if_fail (dest_sheet != NULL);
g_return_if_fail (IS_SHEET (dest_sheet));
......
......@@ -14,10 +14,10 @@
char *
cell_region_render_ascii (CellRegion *cr)
{
int col, row;
char ***data;
GString *all, *line;
GList *l;
GString *all;
char ***data, *return_val;
int col, row;
g_assert (cr != NULL);
data = g_new0 (char **, cr->rows);
......@@ -32,21 +32,30 @@ cell_region_render_ascii (CellRegion *cr)
}
all = g_string_new (NULL);
line = g_string_new (NULL);
for (row = 0; row < cr->rows; row++){
GString *str;
str = g_string_new (NULL);
g_string_assign (line, "");
for (col = 0; col < cr->cols; col++){
if (data [row][col])
g_string_append (str, data [row][col]);
g_string_append_c (str, '\t');
g_string_append (line, data [row][col]);
g_string_append_c (line, '\t');
}
g_string_append (all, str->str);
g_string_append (all, line->str);
g_string_append_c (all, '\n');
}
return all->str;
return_val = g_strdup (all->str);
/* Release, everything we used */
g_string_free (line, TRUE);
g_string_free (all, TRUE);
for (row = 0; row < cr->rows; row++)
g_free (data [row]);
g_free (data);
return return_val;
}
......@@ -2204,7 +2204,7 @@ sheet_selection_paste (Sheet *sheet, int dest_col, int dest_row, int paste_flags
g_return_if_fail (sheet != NULL);
g_return_if_fail (IS_SHEET (sheet));
g_return_if_fail (sheet->selections);
content = sheet->workbook->clipboard_contents;
if (!content)
......@@ -2228,7 +2228,7 @@ sheet_selection_paste (Sheet *sheet, int dest_col, int dest_row, int paste_flags
end_col = dest_col + paste_width - 1;
end_row = dest_row + paste_height - 1;
clipboard_paste_region (content, sheet, dest_col, dest_row,
paste_width, paste_height, paste_flags);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment