[gnumeric] Compilation: Avoid G_OBJECT casts for g_object_ref and g_object_unref.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Compilation: Avoid G_OBJECT casts for g_object_ref and g_object_unref.
- Date: Sun, 24 Feb 2013 13:24:33 +0000 (UTC)
commit c6cf6878b55224fdbb1cd97b432e8f1c4691eb1a
Author: Morten Welinder <terra gnome org>
Date: Sat Feb 23 18:19:06 2013 -0500
Compilation: Avoid G_OBJECT casts for g_object_ref and g_object_unref.
ChangeLog | 4 ++++
plugins/applix/applix-read.c | 2 +-
plugins/dif/dif.c | 2 +-
plugins/excel/boot.c | 22 +++++++++++-----------
plugins/excel/ms-biff.c | 2 +-
plugins/excel/ms-chart.c | 2 +-
plugins/excel/ms-excel-read.c | 2 +-
plugins/excel/ms-excel-write.c | 2 +-
plugins/excel/xls-write-pivot.c | 2 +-
plugins/excel/xlsx-read-drawing.c | 4 ++--
plugins/excel/xlsx-read.c | 8 ++++----
plugins/oleo/oleo.c | 2 +-
plugins/openoffice/openoffice-read.c | 10 +++++-----
plugins/python-loader/python-loader.c | 6 +++---
plugins/qpro/qpro-read.c | 8 ++++----
plugins/sc/sc.c | 2 +-
plugins/sylk/sylk.c | 2 +-
src/commands.c | 22 +++++++++++-----------
src/dialogs/dialog-analysis-tools.c | 2 +-
src/dialogs/dialog-autofilter.c | 2 +-
src/dialogs/dialog-cell-comment.c | 2 +-
src/dialogs/dialog-cell-format-cond.c | 6 +++---
src/dialogs/dialog-cell-format.c | 2 +-
src/dialogs/dialog-cell-sort.c | 4 ++--
src/dialogs/dialog-col-row.c | 2 +-
src/dialogs/dialog-consolidate.c | 2 +-
src/dialogs/dialog-data-slicer.c | 10 +++++-----
src/dialogs/dialog-data-table.c | 2 +-
src/dialogs/dialog-define-names.c | 14 +++++++-------
src/dialogs/dialog-delete-cells.c | 2 +-
src/dialogs/dialog-doc-metadata.c | 2 +-
src/dialogs/dialog-formula-guru.c | 12 ++++++------
src/dialogs/dialog-function-select.c | 2 +-
src/dialogs/dialog-goal-seek.c | 2 +-
src/dialogs/dialog-goto-cell.c | 4 ++--
src/dialogs/dialog-hyperlink.c | 4 ++--
src/dialogs/dialog-insert-cells.c | 2 +-
src/dialogs/dialog-merge.c | 4 ++--
src/dialogs/dialog-paste-special.c | 2 +-
src/dialogs/dialog-plugin-manager.c | 8 ++++----
src/dialogs/dialog-printer-setup.c | 4 ++--
src/dialogs/dialog-row-height.c | 2 +-
src/dialogs/dialog-search-replace.c | 2 +-
src/dialogs/dialog-sheet-order.c | 4 ++--
src/dialogs/dialog-sheetobject-size.c | 8 ++++----
src/dialogs/dialog-solver.c | 2 +-
src/dialogs/dialog-tabulate.c | 2 +-
src/dialogs/dialog-view.c | 2 +-
src/dialogs/dialog-workbook-attr.c | 2 +-
src/dialogs/dialog-zoom.c | 2 +-
src/gnm-pane.c | 10 +++++-----
src/gnm-so-filled.c | 2 +-
src/gnm-so-path.c | 2 +-
src/go-data-cache.c | 2 +-
src/go-data-slicer.c | 2 +-
src/gui-clipboard.c | 4 ++--
src/gui-file.c | 4 ++--
src/gui-util.c | 2 +-
src/item-edit.c | 2 +-
src/mstyle.c | 6 +++---
src/rendered-value.c | 2 +-
src/sheet-control-gui.c | 6 +++---
src/sheet-object-cell-comment.c | 2 +-
src/sheet-object-graph.c | 2 +-
src/sheet-object-image.c | 2 +-
src/sheet-object-widget.c | 4 ++--
src/sheet-object.c | 6 +++---
src/sheet-view.c | 2 +-
src/ssgrep.c | 4 ++--
src/stf.c | 2 +-
src/style.c | 2 +-
src/wbc-gtk-edit.c | 4 ++--
src/wbc-gtk.c | 6 +++---
src/widgets/gnm-dao.c | 2 +-
src/widgets/gnumeric-cell-renderer-toggle.c | 4 ++--
src/widgets/widget-font-selector.c | 2 +-
src/workbook-view.c | 12 ++++++------
src/xml-sax-write.c | 4 ++--
78 files changed, 167 insertions(+), 163 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1c08b37..3e3e508 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-02-23 Morten Welinder <terra gnome org>
+
+ * */*.c: Avoid G_OBJECT casts for g_object_ref and g_object_unref.
+
2013-02-21 Morten Welinder <terra gnome org>
* src/sheet-style.c (sheet_style_foreach): Take a GFunc, not a
diff --git a/plugins/applix/applix-read.c b/plugins/applix/applix-read.c
index 12c0ad0..74fe330 100644
--- a/plugins/applix/applix-read.c
+++ b/plugins/applix/applix-read.c
@@ -1661,7 +1661,7 @@ applix_read (GOIOContext *io_context, WorkbookView *wb_view, GsfInput *src)
/* Actually read the workbook */
res = applix_read_impl (&state);
- g_object_unref (G_OBJECT (state.input));
+ g_object_unref (state.input);
g_free (state.buffer);
state.sheet_order = g_slist_reverse (state.sheet_order);
diff --git a/plugins/dif/dif.c b/plugins/dif/dif.c
index fb920bb..784b097 100644
--- a/plugins/dif/dif.c
+++ b/plugins/dif/dif.c
@@ -76,7 +76,7 @@ static void
dif_input_context_destroy (DifInputContext *ctxt)
{
go_io_progress_unset (ctxt->io_context);
- g_object_unref (G_OBJECT (ctxt->input)); ctxt->input = NULL;
+ g_object_unref (ctxt->input); ctxt->input = NULL;
gsf_iconv_close (ctxt->converter);
g_free (ctxt->line);
g_free (ctxt);
diff --git a/plugins/excel/boot.c b/plugins/excel/boot.c
index a1af734..661ec16 100644
--- a/plugins/excel/boot.c
+++ b/plugins/excel/boot.c
@@ -114,10 +114,10 @@ excel_file_probe (GOFileOpener const *fo, GsfInput *input, GOFileProbeLevel pl)
stream = find_content_stream (ole, NULL);
if (stream != NULL) {
- g_object_unref (G_OBJECT (stream));
+ g_object_unref (stream);
res = TRUE;
}
- g_object_unref (G_OBJECT (ole));
+ g_object_unref (ole);
return res;
}
@@ -185,12 +185,12 @@ excel_enc_file_open (GOFileOpener const *fo, char const *enc, GOIOContext *conte
if (stream == NULL) {
go_cmd_context_error_import (GO_CMD_CONTEXT (context),
_("No Workbook or Book streams found."));
- g_object_unref (G_OBJECT (ole));
+ g_object_unref (ole);
return;
}
excel_read_workbook (context, wbv, stream, &is_double_stream_file, enc);
- g_object_unref (G_OBJECT (stream));
+ g_object_unref (stream);
meta_data = gsf_doc_meta_data_new ();
excel_read_metadata (meta_data, ole, "\05SummaryInformation", context);
@@ -215,7 +215,7 @@ excel_enc_file_open (GOFileOpener const *fo, char const *enc, GOIOContext *conte
g_object_set_data_full (G_OBJECT (wb), "VBA",
modules, (GDestroyNotify) g_hash_table_destroy);
}
- g_object_unref (G_OBJECT (vba));
+ g_object_unref (vba);
}
/* LOOKS BROKEN */
@@ -223,12 +223,12 @@ excel_enc_file_open (GOFileOpener const *fo, char const *enc, GOIOContext *conte
gsf_structured_blob_read (stream), g_object_unref);
g_object_set_data_full (G_OBJECT (wb), "MS_EXCEL_MACROS",
gsf_structured_blob_read (macros), g_object_unref);
- g_object_unref (G_OBJECT (macros));
+ g_object_unref (macros);
}
- g_object_unref (G_OBJECT (stream));
+ g_object_unref (stream);
}
- g_object_unref (G_OBJECT (ole));
+ g_object_unref (ole);
/* simple guess of format based on stream names */
if (is_double_stream_file)
@@ -287,13 +287,13 @@ excel_save (GOIOContext *context, WorkbookView const *wbv, GsfOutput *output,
"\05DocumentSummaryInformation", FALSE);
gsf_doc_meta_data_write_to_msole (meta_data, content, TRUE);
gsf_output_close (content);
- g_object_unref (G_OBJECT (content));
+ g_object_unref (content);
content = gsf_outfile_new_child (outfile,
"\05SummaryInformation", FALSE);
gsf_doc_meta_data_write_to_msole (meta_data, content, FALSE);
gsf_output_close (content);
- g_object_unref (G_OBJECT (content));
+ g_object_unref (content);
}
/* restore the macros we loaded */
@@ -305,7 +305,7 @@ excel_save (GOIOContext *context, WorkbookView const *wbv, GsfOutput *output,
gsf_structured_blob_write (blob, outfile);
gsf_output_close (GSF_OUTPUT (outfile));
- g_object_unref (G_OBJECT (outfile));
+ g_object_unref (outfile);
}
void
diff --git a/plugins/excel/ms-biff.c b/plugins/excel/ms-biff.c
index 9895387..76e3b29 100644
--- a/plugins/excel/ms-biff.c
+++ b/plugins/excel/ms-biff.c
@@ -581,7 +581,7 @@ ms_biff_put_destroy (BiffPut *bp)
if (bp->output != NULL) {
gsf_output_close (bp->output);
- g_object_unref (G_OBJECT (bp->output));
+ g_object_unref (bp->output);
bp->output = NULL;
}
g_free (bp->buf);
diff --git a/plugins/excel/ms-chart.c b/plugins/excel/ms-chart.c
index a9c4f9d..148d400 100644
--- a/plugins/excel/ms-chart.c
+++ b/plugins/excel/ms-chart.c
@@ -6013,6 +6013,6 @@ ms_excel_chart_write (ExcelWriteState *ewb, SheetObject *so)
#endif
ms_biff_put_empty (ewb->bp, BIFF_EOF);
- g_object_unref (G_OBJECT (state.root_view));
+ g_object_unref (state.root_view);
g_object_unref (renderer);
}
diff --git a/plugins/excel/ms-excel-read.c b/plugins/excel/ms-excel-read.c
index eea99d0..cef5b53 100644
--- a/plugins/excel/ms-excel-read.c
+++ b/plugins/excel/ms-excel-read.c
@@ -4399,7 +4399,7 @@ excel_read_os2bmp (BiffQuery *q, guint32 image_len)
err->message);
g_error_free (err);
}
- g_object_unref (G_OBJECT (loader));
+ g_object_unref (loader);
return pixbuf;
}
diff --git a/plugins/excel/ms-excel-write.c b/plugins/excel/ms-excel-write.c
index 0c36a6b..b290141 100644
--- a/plugins/excel/ms-excel-write.c
+++ b/plugins/excel/ms-excel-write.c
@@ -4170,7 +4170,7 @@ blipinf_new (SheetObjectImage *soi)
NULL,
NULL);
blip->bytes.len = len;
- g_object_unref (G_OBJECT (pixbuf));
+ g_object_unref (pixbuf);
}
if (buffer) {
diff --git a/plugins/excel/xls-write-pivot.c b/plugins/excel/xls-write-pivot.c
index 91d50cd..db6fd34 100644
--- a/plugins/excel/xls-write-pivot.c
+++ b/plugins/excel/xls-write-pivot.c
@@ -317,7 +317,7 @@ xls_write_pivot_caches (ExcelWriteState *ewb, GsfOutfile *outfile,
ewb->bp = NULL;
}
gsf_output_close ((GsfOutput *)dir);
- g_object_unref (G_OBJECT (dir));
+ g_object_unref (dir);
g_hash_table_destroy (ewb->base.pivot_caches);
ewb->base.pivot_caches = NULL;
diff --git a/plugins/excel/xlsx-read-drawing.c b/plugins/excel/xlsx-read-drawing.c
index b32a2cd..21cc86a 100644
--- a/plugins/excel/xlsx-read-drawing.c
+++ b/plugins/excel/xlsx-read-drawing.c
@@ -687,7 +687,7 @@ xlsx_axis_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob *blob)
/* absorb a ref, and set the id, and atype */
gog_object_add_by_name (GOG_OBJECT (state->chart),
role, GOG_OBJECT (state->axis.obj));
- g_object_ref (G_OBJECT (state->axis.obj));
+ g_object_ref (state->axis.obj);
for (ptr = state->axis.info->plots; ptr != NULL ; ptr = ptr->next) {
#ifdef DEBUG_AXIS
g_print ("connect plot %p to %p in role %s\n", ptr->data, state->axis.obj, role);
@@ -1945,7 +1945,7 @@ xlsx_axis_cleanup (XLSXReadState *state)
NULL == g_hash_table_lookup (state->axis.by_obj, ptr->data)) {
if (gog_object_is_deletable (GOG_OBJECT (ptr->data))) {
gog_object_clear_parent (GOG_OBJECT (ptr->data));
- g_object_unref (G_OBJECT (ptr->data));
+ g_object_unref (ptr->data);
}
}
g_slist_free (list);
diff --git a/plugins/excel/xlsx-read.c b/plugins/excel/xlsx-read.c
index 02713d4..c0c9256 100644
--- a/plugins/excel/xlsx-read.c
+++ b/plugins/excel/xlsx-read.c
@@ -340,7 +340,7 @@ xlsx_parse_stream (XLSXReadState *state, GsfInput *in, GsfXMLInNode const *dtd)
gsf_input_name (in));
gsf_xml_in_doc_free (doc);
- g_object_unref (G_OBJECT (in));
+ g_object_unref (in);
}
return success;
}
@@ -4326,10 +4326,10 @@ xlsx_file_probe (G_GNUC_UNUSED GOFileOpener const *fo, GsfInput *input, G_GNUC_U
if (NULL != (zip = gsf_infile_zip_new (input, NULL))) {
if (NULL != (stream = gsf_infile_child_by_vname (zip, "xl", "workbook.xml", NULL))) {
- g_object_unref (G_OBJECT (stream));
+ g_object_unref (stream);
res = TRUE;
}
- g_object_unref (G_OBJECT (zip));
+ g_object_unref (zip);
}
return res;
}
@@ -4430,7 +4430,7 @@ xlsx_file_open (G_GNUC_UNUSED GOFileOpener const *fo, GOIOContext *context,
} else
go_cmd_context_error_import (GO_CMD_CONTEXT (context),
_("No workbook stream found."));
- g_object_unref (G_OBJECT (state.zip));
+ g_object_unref (state.zip);
}
gnm_pop_C_locale (locale);
diff --git a/plugins/oleo/oleo.c b/plugins/oleo/oleo.c
index 6e2d0ee..96c3c18 100644
--- a/plugins/oleo/oleo.c
+++ b/plugins/oleo/oleo.c
@@ -295,5 +295,5 @@ oleo_read (GOIOContext *io_context, Workbook *wb, GsfInput *input)
g_iconv_close (state.converter);
gnm_conventions_unref (state.convs);
- g_object_unref (G_OBJECT (state.textline));
+ g_object_unref (state.textline);
}
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index ec7da39..0735bf5 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -975,7 +975,7 @@ odf_apply_style_props (GsfXMLIn *xin, GSList *props, GOStyle *style)
NULL)) {
gdk_pixbuf_loader_close (loader, NULL);
pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
- g_object_ref (G_OBJECT (pixbuf));
+ g_object_ref (pixbuf);
if (style->fill.image.image != NULL)
g_object_set
(G_OBJECT (style->fill.image.image),
@@ -985,7 +985,7 @@ odf_apply_style_props (GsfXMLIn *xin, GSList *props, GOStyle *style)
go_pixbuf_new_from_pixbuf (pixbuf);
go_image_set_name (style->fill.image.image,
fill_image_name);
- g_object_unref (G_OBJECT (loader));
+ g_object_unref (loader);
} else {
oo_warning (xin, _("Unable to load "
"the file \'%s\'."),
@@ -6463,7 +6463,7 @@ oo_chart_style_to_series (GsfXMLIn *xin, OOChartStyle *oostyle, GObject *obj)
g_object_get (obj, "style", &style, NULL);
if (style != NULL) {
odf_apply_style_props (xin, oostyle->style_props, style);
- g_object_unref (G_OBJECT (style));
+ g_object_unref (style);
}
}
@@ -9125,7 +9125,7 @@ odf_custom_shape_replace_object (OOParseState *state, SheetObject *so)
GOStyle *style = NULL;
g_object_get (state->chart.so, "style", &style, NULL);
g_object_set (so, "style", style, NULL);
- g_object_unref (G_OBJECT (style));
+ g_object_unref (style);
}
if (NULL != g_object_class_find_property (klass, "markup")) {
PangoAttrList *attrs = NULL;
@@ -9133,7 +9133,7 @@ odf_custom_shape_replace_object (OOParseState *state, SheetObject *so)
g_object_set (so, "markup", attrs, NULL);
pango_attr_list_unref (attrs);
}
- g_object_unref (G_OBJECT (state->chart.so));
+ g_object_unref (state->chart.so);
state->chart.so = so;
}
diff --git a/plugins/python-loader/python-loader.c b/plugins/python-loader/python-loader.c
index 39a366f..d90bd17 100644
--- a/plugins/python-loader/python-loader.c
+++ b/plugins/python-loader/python-loader.c
@@ -233,7 +233,7 @@ gplp_func_file_probe (G_GNUC_UNUSED GOFileOpener const *fo, GOPluginService *ser
if (input_wrapper != NULL &&
loader_data->python_func_file_probe != NULL) {
/* wrapping adds a reference */
- g_object_unref (G_OBJECT (input));
+ g_object_unref (input);
probe_result = PyObject_CallFunction
(loader_data->python_func_file_probe,
(char *) "O", input_wrapper);
@@ -276,7 +276,7 @@ gplp_func_file_open (G_GNUC_UNUSED GOFileOpener const *fo,
input_wrapper = pygobject_new (G_OBJECT (input));
if (input_wrapper != NULL) {
/* wrapping adds a reference */
- g_object_unref (G_OBJECT (input));
+ g_object_unref (input);
open_result = PyObject_CallFunction
(loader_data->python_func_file_open,
(char *) "NO",
@@ -381,7 +381,7 @@ gplp_func_file_save (G_GNUC_UNUSED GOFileSaver const *fs, GOPluginService *servi
output_wrapper = pygobject_new (G_OBJECT (output));
if (output_wrapper != NULL) {
/* wrapping adds a reference */
- g_object_unref (G_OBJECT (output));
+ g_object_unref (output);
save_result = PyObject_CallFunction
(saver_data->python_func_file_save,
(char *) "NO", py_workbook, output_wrapper);
diff --git a/plugins/qpro/qpro-read.c b/plugins/qpro/qpro-read.c
index 86651ee..ac47304 100644
--- a/plugins/qpro/qpro-read.c
+++ b/plugins/qpro/qpro-read.c
@@ -92,9 +92,9 @@ qpro_file_probe (GOFileOpener const *fo, GsfInput *input, GOFileProbeLevel pl)
"PerfectOffice_MAIN");
if (stream != NULL) {
res = qpro_check_signature (stream);
- g_object_unref (G_OBJECT (stream));
+ g_object_unref (stream);
}
- g_object_unref (G_OBJECT (ole));
+ g_object_unref (ole);
} else
res = qpro_check_signature (input);
@@ -939,11 +939,11 @@ qpro_file_open (GOFileOpener const *fo, GOIOContext *context,
"PerfectOffice_MAIN");
if (stream != NULL) {
qpro_read_workbook (&state, stream);
- g_object_unref (G_OBJECT (stream));
+ g_object_unref (stream);
} else
go_io_warning (context,
_("Unable to find the PerfectOffice_MAIN stream. Is this really a Quattro
Pro file?"));
- g_object_unref (G_OBJECT (ole));
+ g_object_unref (ole);
} else
qpro_read_workbook (&state, input);
diff --git a/plugins/sc/sc.c b/plugins/sc/sc.c
index 14426ca..46742f9 100644
--- a/plugins/sc/sc.c
+++ b/plugins/sc/sc.c
@@ -1038,7 +1038,7 @@ sc_file_open (GOFileOpener const *fo, GOIOContext *io_context,
workbook_sheet_delete (state.sheet);
go_io_error_info_set (io_context, error);
}
- g_object_unref (G_OBJECT (state.textline));
+ g_object_unref (state.textline);
g_iconv_close (state.converter);
gnm_conventions_unref (state.convs);
g_free (state.last_error);
diff --git a/plugins/sylk/sylk.c b/plugins/sylk/sylk.c
index 558f3e1..b90d593 100644
--- a/plugins/sylk/sylk.c
+++ b/plugins/sylk/sylk.c
@@ -851,7 +851,7 @@ sylk_file_open (GOFileOpener const *fo,
g_ptr_array_free (state.formats, TRUE);
gsf_iconv_close (state.converter);
- g_object_unref (G_OBJECT (state.input));
+ g_object_unref (state.input);
}
gboolean
diff --git a/src/commands.c b/src/commands.c
index 0aaa593..d0ec65f 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -1029,8 +1029,8 @@ cmd_set_text_full (WorkbookControl *wbc, GSList *selection, GnmEvalPos *ep,
}
if (same_text_and_not_same_markup) {
/*We had the same text and differnt markup but we are not entering strings. */
- g_object_unref (G_OBJECT (undo));
- g_object_unref (G_OBJECT (redo));
+ g_object_unref (undo);
+ g_object_unref (redo);
g_free (text);
range_fragment_free (selection);
return TRUE;
@@ -1257,7 +1257,7 @@ cmd_create_data_table (WorkbookControl *wbc, Sheet *sheet, GnmRange const *r,
g_free (name);
if (texpr == NULL) {
- g_object_unref (G_OBJECT (undo));
+ g_object_unref (undo);
g_free (text);
return TRUE;
}
@@ -4830,8 +4830,8 @@ cmd_object_format (WorkbookControl *wbc, SheetObject *so,
me = g_object_new (CMD_OBJECT_FORMAT_TYPE, NULL);
- me->so = g_object_ref (G_OBJECT (so));
- me->style = g_object_ref (G_OBJECT (orig_style));
+ me->so = g_object_ref (so);
+ me->style = g_object_ref (orig_style);
me->text = g_strdup (orig_text);
if (orig_attr != NULL) {
me->attr = orig_attr;
@@ -5310,7 +5310,7 @@ cmd_analysis_tool_undo (GnmCommand *cmd, WorkbookControl *wbc)
static void
cmd_analysis_tool_draw_old_so (SheetObject *so, data_analysis_output_t *dao)
{
- g_object_ref (G_OBJECT (so));
+ g_object_ref (so);
dao_set_sheet_object (dao, 0, 1, so);
}
@@ -5807,7 +5807,7 @@ cmd_object_raise (WorkbookControl *wbc, SheetObject *so, CmdObjectRaiseSelector
me = g_object_new (CMD_OBJECT_RAISE_TYPE, NULL);
me->so = so;
- g_object_ref (G_OBJECT (so));
+ g_object_ref (so);
me->cmd.sheet = sheet_object_get_sheet (so);
me->cmd.size = 1;
@@ -6979,12 +6979,12 @@ cmd_so_graph_config (WorkbookControl *wbc, SheetObject *so,
me = g_object_new (CMD_SO_GRAPH_CONFIG_TYPE, NULL);
me->so = so;
- g_object_ref (G_OBJECT (so));
+ g_object_ref (so);
me->new_graph = GOG_GRAPH (n_graph);
- g_object_ref (G_OBJECT (me->new_graph));
+ g_object_ref (me->new_graph);
me->old_graph = GOG_GRAPH (o_graph);
- g_object_ref (G_OBJECT (me->old_graph));
+ g_object_ref (me->old_graph);
me->cmd.sheet = sheet_object_get_sheet (so);;
me->cmd.size = 10;
@@ -7051,7 +7051,7 @@ cmd_so_component_config (WorkbookControl *wbc, SheetObject *so,
me = g_object_new (CMD_SO_COMPONENT_CONFIG_TYPE, NULL);
me->so = so;
- g_object_ref (G_OBJECT (so));
+ g_object_ref (so);
me->new_obj = GO_COMPONENT (g_object_ref (n_obj));
me->old_obj = GO_COMPONENT (g_object_ref (o_obj));
diff --git a/src/dialogs/dialog-analysis-tools.c b/src/dialogs/dialog-analysis-tools.c
index 8d3e4fa..88eaa05 100644
--- a/src/dialogs/dialog-analysis-tools.c
+++ b/src/dialogs/dialog-analysis-tools.c
@@ -292,7 +292,7 @@ static void
cb_tool_destroy (GenericToolState *state)
{
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
wbcg_edit_finish (state->wbcg, WBC_EDIT_REJECT, NULL);
if (state->state_destroy)
state->state_destroy (state);
diff --git a/src/dialogs/dialog-autofilter.c b/src/dialogs/dialog-autofilter.c
index 407e376..5c9ff96 100644
--- a/src/dialogs/dialog-autofilter.c
+++ b/src/dialogs/dialog-autofilter.c
@@ -77,7 +77,7 @@ static void
cb_autofilter_destroy (AutoFilterState *state)
{
if (state->gui != NULL) {
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
state->gui = NULL;
}
diff --git a/src/dialogs/dialog-cell-comment.c b/src/dialogs/dialog-cell-comment.c
index a8fca4a..6e8a550 100644
--- a/src/dialogs/dialog-cell-comment.c
+++ b/src/dialogs/dialog-cell-comment.c
@@ -50,7 +50,7 @@ static void
cb_dialog_cell_comment_destroy (CommentState *state)
{
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
g_free (state);
}
diff --git a/src/dialogs/dialog-cell-format-cond.c b/src/dialogs/dialog-cell-format-cond.c
index 24312f8..20633a1 100644
--- a/src/dialogs/dialog-cell-format-cond.c
+++ b/src/dialogs/dialog-cell-format-cond.c
@@ -125,7 +125,7 @@ cb_c_fmt_dialog_dialog_destroy (CFormatState *state)
gnm_style_unref (state->editor.style);
if (state->style)
gnm_style_unref (state->style);
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
g_free (state);
}
@@ -626,7 +626,7 @@ c_fmt_dialog_condition_setter_tiled (G_GNUC_UNUSED SheetView *sv, GnmRange const
if (gnm_style_is_element_set (sr->style, MSTYLE_CONDITIONS) &&
NULL != (old_cond = gnm_style_get_conditions (sr->style)))
gnm_style_set_conditions (state->action.old_style,
- g_object_ref (G_OBJECT (old_cond)));
+ g_object_ref (old_cond));
else
gnm_style_set_conditions (state->action.old_style, NULL);
c_fmt_dialog_condition_setter (state->sv, &r, state);
@@ -650,7 +650,7 @@ c_fmt_dialog_set_conditions (CFormatState *state, char const *cmd_label)
state->action.old_style = gnm_style_new ();
old_cond = gnm_style_get_conditions (state->style);
gnm_style_set_conditions (state->action.old_style,
- old_cond ? g_object_ref (G_OBJECT (old_cond)) : NULL);
+ old_cond ? g_object_ref (old_cond) : NULL);
sv_selection_foreach (state->sv,
(GnmSelectionFunc)c_fmt_dialog_condition_setter,
diff --git a/src/dialogs/dialog-cell-format.c b/src/dialogs/dialog-cell-format.c
index 656c6d2..4ae63fd 100644
--- a/src/dialogs/dialog-cell-format.c
+++ b/src/dialogs/dialog-cell-format.c
@@ -2077,7 +2077,7 @@ cb_fmt_dialog_dialog_destroy (FormatState *state)
gnm_style_unref (state->back.style);
gnm_style_unref (state->style);
gnm_style_unref (state->result);
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
g_free (state);
}
diff --git a/src/dialogs/dialog-cell-sort.c b/src/dialogs/dialog-cell-sort.c
index 1e629e3..b2d78fd 100644
--- a/src/dialogs/dialog-cell-sort.c
+++ b/src/dialogs/dialog-cell-sort.c
@@ -436,9 +436,9 @@ cb_dialog_destroy (SortFlowState *state)
state->sel = NULL;
if (state->model != NULL)
- g_object_unref (G_OBJECT (state->model));
+ g_object_unref (state->model);
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
wbcg_edit_finish (state->wbcg, WBC_EDIT_REJECT, NULL);
diff --git a/src/dialogs/dialog-col-row.c b/src/dialogs/dialog-col-row.c
index 6aa9991..bbdab7f 100644
--- a/src/dialogs/dialog-col-row.c
+++ b/src/dialogs/dialog-col-row.c
@@ -51,7 +51,7 @@ static void
cb_dialog_col_row_destroy (ColRowState *state)
{
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
g_free (state);
}
diff --git a/src/dialogs/dialog-consolidate.c b/src/dialogs/dialog-consolidate.c
index 722b43d..af3fee0 100644
--- a/src/dialogs/dialog-consolidate.c
+++ b/src/dialogs/dialog-consolidate.c
@@ -270,7 +270,7 @@ static void
cb_dialog_destroy (ConsolidateState *state)
{
if (state->pixmap != NULL)
- g_object_unref (G_OBJECT (state->pixmap));
+ g_object_unref (state->pixmap);
if (state->construct_error != NULL) {
g_warning ("The construct error was not freed, this should not happen!");
g_free (state->construct_error);
diff --git a/src/dialogs/dialog-data-slicer.c b/src/dialogs/dialog-data-slicer.c
index e8883f6..ba7f9f5 100644
--- a/src/dialogs/dialog-data-slicer.c
+++ b/src/dialogs/dialog-data-slicer.c
@@ -66,9 +66,9 @@ enum {
static void
cb_dialog_data_slicer_destroy (DialogDataSlicer *state)
{
- if (NULL != state->slicer) { g_object_unref (G_OBJECT (state->slicer)); state->slicer = NULL;
}
- if (NULL != state->cache) { g_object_unref (G_OBJECT (state->cache)); state->cache = NULL; }
- if (NULL != state->source) { g_object_unref (G_OBJECT (state->source)); state->source = NULL;
}
+ if (NULL != state->slicer) { g_object_unref (state->slicer); state->slicer = NULL; }
+ if (NULL != state->cache) { g_object_unref (state->cache); state->cache = NULL; }
+ if (NULL != state->source) { g_object_unref (state->source); state->source = NULL; }
state->dialog = NULL;
g_free (state);
}
@@ -272,11 +272,11 @@ dialog_data_slicer (WBCGtk *wbcg, gboolean create)
if (NULL == state->slicer) {
state->slicer = g_object_new (GNM_SHEET_SLICER_TYPE, NULL);
} else {
- g_object_ref (G_OBJECT (state->slicer));
+ g_object_ref (state->slicer);
g_object_get (G_OBJECT (state->slicer), "cache", &state->cache, NULL);
if (NULL != state->cache &&
NULL != (state->source = go_data_cache_get_source (state->cache)))
- g_object_ref (G_OBJECT (state->source));
+ g_object_ref (state->source);
}
state->source_expr = gnm_expr_entry_new (state->wbcg, TRUE);
diff --git a/src/dialogs/dialog-data-table.c b/src/dialogs/dialog-data-table.c
index 4e98c4e..a0e16b2 100644
--- a/src/dialogs/dialog-data-table.c
+++ b/src/dialogs/dialog-data-table.c
@@ -56,7 +56,7 @@ static void
cb_data_table_destroy (GnmDialogDataTable *state)
{
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
g_free (state);
}
diff --git a/src/dialogs/dialog-define-names.c b/src/dialogs/dialog-define-names.c
index d2f5251..9111dda 100644
--- a/src/dialogs/dialog-define-names.c
+++ b/src/dialogs/dialog-define-names.c
@@ -547,19 +547,19 @@ cb_name_guru_destroy (NameGuruState *state)
wb_view_selection_desc (wb_control_view (wbc), TRUE, wbc);
if (state->gui != NULL) {
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
state->gui = NULL;
}
if (state->is_paste_dialog)
- g_object_unref (G_OBJECT (state->image_paste));
+ g_object_unref (state->image_paste);
else {
wbcg_edit_finish (state->wbcg, WBC_EDIT_REJECT, NULL);
- g_object_unref (G_OBJECT (state->image_add));
- g_object_unref (G_OBJECT (state->image_delete));
- g_object_unref (G_OBJECT (state->image_lock));
- g_object_unref (G_OBJECT (state->image_up));
- g_object_unref (G_OBJECT (state->image_down));
+ g_object_unref (state->image_add);
+ g_object_unref (state->image_delete);
+ g_object_unref (state->image_lock);
+ g_object_unref (state->image_up);
+ g_object_unref (state->image_down);
}
state->dialog = NULL;
diff --git a/src/dialogs/dialog-delete-cells.c b/src/dialogs/dialog-delete-cells.c
index f248571..8245d7d 100644
--- a/src/dialogs/dialog-delete-cells.c
+++ b/src/dialogs/dialog-delete-cells.c
@@ -54,7 +54,7 @@ static void
cb_delete_cell_destroy (DeleteCellState *state)
{
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
g_free (state);
}
diff --git a/src/dialogs/dialog-doc-metadata.c b/src/dialogs/dialog-doc-metadata.c
index 1c23bcb..c861a0d 100644
--- a/src/dialogs/dialog-doc-metadata.c
+++ b/src/dialogs/dialog-doc-metadata.c
@@ -2116,7 +2116,7 @@ dialog_doc_metadata_free (DialogDocMetaData *state)
if (state->gui != NULL) {
dialog_doc_metadata_set_file_permissions (state);
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
state->gui = NULL;
}
diff --git a/src/dialogs/dialog-formula-guru.c b/src/dialogs/dialog-formula-guru.c
index ae3f4d7..c43d2b9 100644
--- a/src/dialogs/dialog-formula-guru.c
+++ b/src/dialogs/dialog-formula-guru.c
@@ -526,18 +526,18 @@ cb_dialog_formula_guru_destroy (FormulaGuruState *state)
wbcg_edit_finish (state->wbcg, WBC_EDIT_REJECT, NULL);
if (state->model != NULL)
- g_object_unref (G_OBJECT (state->model));
+ g_object_unref (state->model);
g_free (state->prefix);
g_free (state->suffix);
g_free (state->pos);
if (state->editable)
g_object_unref (state->editable);
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
gnm_expr_entry_enable_tips (wbcg_get_entry_logical (state->wbcg));
if (state->tooltip_widget) {
- g_object_unref (G_OBJECT (state->tooltip_widget));
- g_object_unref (G_OBJECT (state->tooltip_label));
+ g_object_unref (state->tooltip_widget);
+ g_object_unref (state->tooltip_label);
}
g_free (state);
}
@@ -836,8 +836,8 @@ cb_dialog_formula_guru_query_tooltip (G_GNUC_UNUSED GtkWidget *widget,
gnumeric_tooltip_set_style (state->tooltip_label);
gnumeric_tooltip_set_style (state->tooltip_widget);
gtk_widget_show_all (state->tooltip_widget);
- g_object_ref (G_OBJECT (state->tooltip_widget));
- g_object_ref (G_OBJECT (state->tooltip_label));
+ g_object_ref (state->tooltip_widget);
+ g_object_ref (state->tooltip_label);
}
gtk_tooltip_set_custom (tooltip, state->tooltip_widget);
window = gtk_widget_get_toplevel (state->tooltip_widget);
diff --git a/src/dialogs/dialog-function-select.c b/src/dialogs/dialog-function-select.c
index 03ea620..296e004 100644
--- a/src/dialogs/dialog-function-select.c
+++ b/src/dialogs/dialog-function-select.c
@@ -327,7 +327,7 @@ cb_dialog_function_select_destroy (FunctionSelectState *state)
}
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
g_slist_free (state->recent_funcs);
gtk_tree_model_foreach (GTK_TREE_MODEL (state->model_functions),
cb_unref,
diff --git a/src/dialogs/dialog-goal-seek.c b/src/dialogs/dialog-goal-seek.c
index 4c1dadc..4399a2b 100644
--- a/src/dialogs/dialog-goal-seek.c
+++ b/src/dialogs/dialog-goal-seek.c
@@ -273,7 +273,7 @@ cb_dialog_destroy (GoalSeekState *state)
value_release (state->old_value);
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
wbcg_edit_finish (state->wbcg, WBC_EDIT_REJECT, NULL);
g_free (state);
diff --git a/src/dialogs/dialog-goto-cell.c b/src/dialogs/dialog-goto-cell.c
index e362ca1..bde295e 100644
--- a/src/dialogs/dialog-goto-cell.c
+++ b/src/dialogs/dialog-goto-cell.c
@@ -91,9 +91,9 @@ cb_dialog_goto_free (GotoState *state)
state->sheet_deleted_listener);
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
if (state->model != NULL)
- g_object_unref (G_OBJECT (state->model));
+ g_object_unref (state->model);
g_free (state);
}
diff --git a/src/dialogs/dialog-hyperlink.c b/src/dialogs/dialog-hyperlink.c
index 396874a..2c8d485 100644
--- a/src/dialogs/dialog-hyperlink.c
+++ b/src/dialogs/dialog-hyperlink.c
@@ -67,11 +67,11 @@ static void
dhl_free (HyperlinkState *state)
{
if (state->gui != NULL) {
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
state->gui = NULL;
}
if (state->link != NULL) {
- g_object_unref (G_OBJECT (state->link));
+ g_object_unref (state->link);
state->link = NULL;
}
state->dialog = NULL;
diff --git a/src/dialogs/dialog-insert-cells.c b/src/dialogs/dialog-insert-cells.c
index ac4e806..1789842 100644
--- a/src/dialogs/dialog-insert-cells.c
+++ b/src/dialogs/dialog-insert-cells.c
@@ -54,7 +54,7 @@ static void
cb_insert_cell_destroy (InsertCellState *state)
{
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
g_free (state);
}
diff --git a/src/dialogs/dialog-merge.c b/src/dialogs/dialog-merge.c
index 82ae937..2e7ce59 100644
--- a/src/dialogs/dialog-merge.c
+++ b/src/dialogs/dialog-merge.c
@@ -301,9 +301,9 @@ static void
cb_merge_destroy (MergeState *state)
{
if (state->model != NULL)
- g_object_unref (G_OBJECT (state->model));
+ g_object_unref (state->model);
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
g_free (state);
}
diff --git a/src/dialogs/dialog-paste-special.c b/src/dialogs/dialog-paste-special.c
index 8068cc5..0576796 100644
--- a/src/dialogs/dialog-paste-special.c
+++ b/src/dialogs/dialog-paste-special.c
@@ -141,7 +141,7 @@ static void
cb_destroy (PasteSpecialState *state)
{
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
wbcg_edit_finish (state->wbcg, WBC_EDIT_REJECT, NULL);
g_free (state);
}
diff --git a/src/dialogs/dialog-plugin-manager.c b/src/dialogs/dialog-plugin-manager.c
index be56eaa..e5ae09e 100644
--- a/src/dialogs/dialog-plugin-manager.c
+++ b/src/dialogs/dialog-plugin-manager.c
@@ -466,13 +466,13 @@ cb_pm_dialog_free (PluginManagerGUI *pm_gui)
}
if (pm_gui->gui != NULL)
- g_object_unref (G_OBJECT (pm_gui->gui));
+ g_object_unref (pm_gui->gui);
if (pm_gui->model_plugins != NULL)
- g_object_unref (G_OBJECT (pm_gui->model_plugins));
+ g_object_unref (pm_gui->model_plugins);
if (pm_gui->model_details != NULL)
- g_object_unref (G_OBJECT (pm_gui->model_details));
+ g_object_unref (pm_gui->model_details);
if (pm_gui->model_directories != NULL)
- g_object_unref (G_OBJECT (pm_gui->model_directories));
+ g_object_unref (pm_gui->model_directories);
g_free (pm_gui);
}
diff --git a/src/dialogs/dialog-printer-setup.c b/src/dialogs/dialog-printer-setup.c
index 8dc08f9..8632e7d 100644
--- a/src/dialogs/dialog-printer-setup.c
+++ b/src/dialogs/dialog-printer-setup.c
@@ -237,7 +237,7 @@ static void
margin_preview_page_destroy (PrinterSetupState *state)
{
if (state->preview.group) {
- g_object_unref (G_OBJECT (state->preview.group));
+ g_object_unref (state->preview.group);
state->preview.group = NULL;
}
}
@@ -1563,7 +1563,7 @@ static void
free_hf_mark_info (HFMarkInfo *info)
{
if (info->mark)
- g_object_unref (G_OBJECT (info->mark));
+ g_object_unref (info->mark);
g_free (info->options);
g_free (info);
}
diff --git a/src/dialogs/dialog-row-height.c b/src/dialogs/dialog-row-height.c
index d79e952..6438ac7 100644
--- a/src/dialogs/dialog-row-height.c
+++ b/src/dialogs/dialog-row-height.c
@@ -102,7 +102,7 @@ static void
cb_dialog_row_height_destroy (RowHeightState *state)
{
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
g_free (state);
}
diff --git a/src/dialogs/dialog-search-replace.c b/src/dialogs/dialog-search-replace.c
index ce04bb6..a601538 100644
--- a/src/dialogs/dialog-search-replace.c
+++ b/src/dialogs/dialog-search-replace.c
@@ -211,7 +211,7 @@ cancel_clicked (G_GNUC_UNUSED GtkWidget *widget, DialogState *dd)
static void
cb_dialog_destroy (DialogState *dd)
{
- g_object_unref (G_OBJECT (dd->gui));
+ g_object_unref (dd->gui);
memset (dd, 0, sizeof (*dd));
g_free (dd);
}
diff --git a/src/dialogs/dialog-sheet-order.c b/src/dialogs/dialog-sheet-order.c
index bd9b8b5..87e82d1 100644
--- a/src/dialogs/dialog-sheet-order.c
+++ b/src/dialogs/dialog-sheet-order.c
@@ -1197,10 +1197,10 @@ cb_sheet_order_destroy (SheetManager *state)
state->sheet_deleted_listener);
if (state->model != NULL) {
- g_object_unref (G_OBJECT (state->model));
+ g_object_unref (state->model);
state->model = NULL;
}
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
g_object_set_data (G_OBJECT (wb), SHEET_ORDER_KEY, NULL);
state->gui = NULL;
diff --git a/src/dialogs/dialog-sheetobject-size.c b/src/dialogs/dialog-sheetobject-size.c
index 62dada1..9b27ff0 100644
--- a/src/dialogs/dialog-sheetobject-size.c
+++ b/src/dialogs/dialog-sheetobject-size.c
@@ -111,9 +111,9 @@ cb_dialog_so_size_destroy (SOSizeState *state)
g_free (state->active_anchor);
g_free (state->old_name);
if (state->so!= NULL)
- g_object_unref (G_OBJECT (state->so));
+ g_object_unref (state->so);
if (state->gui != NULL)
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
g_free (state);
}
@@ -190,7 +190,7 @@ static GOUndo *
set_params (SheetObject *so, char *name)
{
return go_undo_binary_new
- (g_object_ref (G_OBJECT (so)), name,
+ (g_object_ref (so), name,
(GOUndoBinaryFunc)sheet_object_set_name,
g_object_unref, g_free);
}
@@ -202,7 +202,7 @@ set_print_flag (SheetObject *so, gboolean print)
*p_print = print;
return go_undo_binary_new
- (g_object_ref (G_OBJECT (so)), p_print,
+ (g_object_ref (so), p_print,
(GOUndoBinaryFunc)sheet_object_set_print_flag,
g_object_unref, g_free);
}
diff --git a/src/dialogs/dialog-solver.c b/src/dialogs/dialog-solver.c
index fcbe803..03d4e7c 100644
--- a/src/dialogs/dialog-solver.c
+++ b/src/dialogs/dialog-solver.c
@@ -465,7 +465,7 @@ cb_dialog_solver_destroy (SolverState *state)
check_for_changed_options (state);
if (state->gui != NULL) {
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
state->gui = NULL;
}
diff --git a/src/dialogs/dialog-tabulate.c b/src/dialogs/dialog-tabulate.c
index 6676f16..00b68ad 100644
--- a/src/dialogs/dialog-tabulate.c
+++ b/src/dialogs/dialog-tabulate.c
@@ -175,7 +175,7 @@ get_table_float_entry (GtkTable *t, int y, int x, GnmCell *cell, gnm_float *numb
static void
cb_dialog_destroy (DialogState *dd)
{
- g_object_unref (G_OBJECT (dd->gui));
+ g_object_unref (dd->gui);
memset (dd, 0, sizeof (*dd));
g_free (dd);
}
diff --git a/src/dialogs/dialog-view.c b/src/dialogs/dialog-view.c
index a08c96c..d7825c1 100644
--- a/src/dialogs/dialog-view.c
+++ b/src/dialogs/dialog-view.c
@@ -114,7 +114,7 @@ static void
cb_view_destroy (ViewState *state)
{
if (state->gui != NULL) {
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
state->gui = NULL;
}
diff --git a/src/dialogs/dialog-workbook-attr.c b/src/dialogs/dialog-workbook-attr.c
index 87bafcf..cef70fa 100644
--- a/src/dialogs/dialog-workbook-attr.c
+++ b/src/dialogs/dialog-workbook-attr.c
@@ -89,7 +89,7 @@ static void
cb_attr_dialog_dialog_destroy (AttrState *state)
{
if (state->gui != NULL) {
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
state->gui = NULL;
}
diff --git a/src/dialogs/dialog-zoom.c b/src/dialogs/dialog-zoom.c
index 7caad5b..2596065 100644
--- a/src/dialogs/dialog-zoom.c
+++ b/src/dialogs/dialog-zoom.c
@@ -80,7 +80,7 @@ cb_zoom_destroy (ZoomState *state)
}
if (state->gui != NULL) {
- g_object_unref (G_OBJECT (state->gui));
+ g_object_unref (state->gui);
state->gui = NULL;
}
diff --git a/src/gnm-pane.c b/src/gnm-pane.c
index 42385be..ee60f11 100644
--- a/src/gnm-pane.c
+++ b/src/gnm-pane.c
@@ -2087,11 +2087,11 @@ gnm_pane_size_guide_stop (GnmPane *pane)
g_return_if_fail (pane != NULL);
if (pane->size_guide.start != NULL) {
- g_object_unref (G_OBJECT (pane->size_guide.start));
+ g_object_unref (pane->size_guide.start);
pane->size_guide.start = NULL;
}
if (pane->size_guide.guide != NULL) {
- g_object_unref (G_OBJECT (pane->size_guide.guide));
+ g_object_unref (pane->size_guide.guide);
pane->size_guide.guide = NULL;
}
}
@@ -2191,7 +2191,7 @@ void
gnm_pane_rangesel_stop (GnmPane *pane)
{
g_return_if_fail (pane->cursor.rangesel != NULL);
- g_object_unref (G_OBJECT (pane->cursor.rangesel));
+ g_object_unref (pane->cursor.rangesel);
pane->cursor.rangesel = NULL;
/* Make the primary cursor visible again */
@@ -2230,7 +2230,7 @@ gnm_pane_special_cursor_stop (GnmPane *pane)
{
g_return_if_fail (pane->cursor.special != NULL);
- g_object_unref (G_OBJECT (pane->cursor.special));
+ g_object_unref (pane->cursor.special);
pane->cursor.special = NULL;
}
@@ -2293,7 +2293,7 @@ void
gnm_pane_edit_stop (GnmPane *pane)
{
if (pane->editor != NULL) {
- g_object_unref (G_OBJECT (pane->editor));
+ g_object_unref (pane->editor);
pane->editor = NULL;
}
}
diff --git a/src/gnm-so-filled.c b/src/gnm-so-filled.c
index 85b7d13..43d18c8 100644
--- a/src/gnm-so-filled.c
+++ b/src/gnm-so-filled.c
@@ -317,7 +317,7 @@ gnm_so_filled_draw_cairo (SheetObject const *so, cairo_t *cr,
pango_cairo_show_layout (cr, pl);
cairo_new_path (cr);
cairo_restore (cr);
- g_object_unref(G_OBJECT (pl));
+ g_object_unref (pl);
}
}
diff --git a/src/gnm-so-path.c b/src/gnm-so-path.c
index 466dafa..d98f14d 100644
--- a/src/gnm-so-path.c
+++ b/src/gnm-so-path.c
@@ -322,7 +322,7 @@ gnm_so_path_draw_cairo (SheetObject const *so, cairo_t *cr,
pango_cairo_show_layout (cr, pl);
cairo_new_path (cr);
cairo_restore (cr);
- g_object_unref(G_OBJECT (pl));
+ g_object_unref (pl);
}
}
diff --git a/src/go-data-cache.c b/src/go-data-cache.c
index 965c773..7af9d98 100644
--- a/src/go-data-cache.c
+++ b/src/go-data-cache.c
@@ -228,7 +228,7 @@ go_data_cache_set_source (GODataCache *cache, GODataCacheSource *src)
g_return_if_fail (NULL == src || IS_GO_DATA_CACHE_SOURCE (src));
if (cache->data_source)
- g_object_unref (G_OBJECT (cache->data_source));
+ g_object_unref (cache->data_source);
cache->data_source = src;
}
diff --git a/src/go-data-slicer.c b/src/go-data-slicer.c
index 6284d4a..0549b76 100644
--- a/src/go-data-slicer.c
+++ b/src/go-data-slicer.c
@@ -150,7 +150,7 @@ go_data_slicer_set_cache (GODataSlicer *ds, GODataCache *cache)
g_return_if_fail (IS_GO_DATA_SLICER (ds));
if (NULL != cache)
- g_object_ref (G_OBJECT (cache));
+ g_object_ref (cache);
if (NULL != ds->cache)
g_object_unref (ds->cache);
ds->cache = cache;
diff --git a/src/gui-clipboard.c b/src/gui-clipboard.c
index 6bb6a8e..36ad9e6 100644
--- a/src/gui-clipboard.c
+++ b/src/gui-clipboard.c
@@ -335,8 +335,8 @@ out:
g_object_unref (wb_view);
if (wb)
g_object_unref (wb);
- g_object_unref (G_OBJECT (ioc));
- g_object_unref (G_OBJECT (input));
+ g_object_unref (ioc);
+ g_object_unref (input);
return ret;
}
diff --git a/src/gui-file.c b/src/gui-file.c
index c3be9fd..f43a9fd 100644
--- a/src/gui-file.c
+++ b/src/gui-file.c
@@ -120,7 +120,7 @@ gui_file_read (WBCGtk *wbcg, char const *uri,
go_io_warning_occurred (io_context))
go_io_error_display (io_context);
- g_object_unref (G_OBJECT (io_context));
+ g_object_unref (io_context);
go_cmd_context_set_sensitive (GO_CMD_CONTEXT (wbcg), TRUE);
if (wbv != NULL) {
@@ -148,7 +148,7 @@ gui_file_template (WBCGtk *wbcg, char const *uri)
go_io_warning_occurred (io_context))
go_io_error_display (io_context);
- g_object_unref (G_OBJECT (io_context));
+ g_object_unref (io_context);
go_cmd_context_set_sensitive (GO_CMD_CONTEXT (wbcg), TRUE);
if (wbv != NULL) {
diff --git a/src/gui-util.c b/src/gui-util.c
index 418fbb2..be46ea8 100644
--- a/src/gui-util.c
+++ b/src/gui-util.c
@@ -449,7 +449,7 @@ kill_popup_menu (G_GNUC_UNUSED GtkWidget *widget, GtkMenu *menu)
g_return_if_fail (menu != NULL);
g_return_if_fail (GTK_IS_MENU (menu));
- g_object_unref (G_OBJECT (menu));
+ g_object_unref (menu);
}
/**
diff --git a/src/item-edit.c b/src/item-edit.c
index a41ffdf..75d1486 100644
--- a/src/item-edit.c
+++ b/src/item-edit.c
@@ -667,7 +667,7 @@ item_edit_unrealize (GocItem *item)
gnm_pane_expr_cursor_stop (pane););
if (ie->layout) {
- g_object_unref (G_OBJECT (ie->layout));
+ g_object_unref (ie->layout);
ie->layout = NULL;
}
diff --git a/src/mstyle.c b/src/mstyle.c
index 238061b..d7e1807 100644
--- a/src/mstyle.c
+++ b/src/mstyle.c
@@ -447,15 +447,15 @@ elem_assign_contents (GnmStyle *dst, GnmStyle const *src, GnmStyleElement elem)
return;
case MSTYLE_HLINK:
if ((dst->hlink = src->hlink))
- g_object_ref (G_OBJECT (dst->hlink));
+ g_object_ref (dst->hlink);
return;
case MSTYLE_INPUT_MSG:
if ((dst->input_msg = src->input_msg))
- g_object_ref (G_OBJECT (dst->input_msg));
+ g_object_ref (dst->input_msg);
return;
case MSTYLE_CONDITIONS:
if ((dst->conditions = src->conditions))
- g_object_ref (G_OBJECT (dst->conditions));
+ g_object_ref (dst->conditions);
return;
default:
;
diff --git a/src/rendered-value.c b/src/rendered-value.c
index 32cc94f..e7bddfd 100644
--- a/src/rendered-value.c
+++ b/src/rendered-value.c
@@ -516,7 +516,7 @@ void
gnm_rendered_value_destroy (GnmRenderedValue *rv)
{
if (rv->layout) {
- g_object_unref (G_OBJECT (rv->layout));
+ g_object_unref (rv->layout);
rv->layout = NULL;
}
diff --git a/src/sheet-control-gui.c b/src/sheet-control-gui.c
index e446a1e..43ea033 100644
--- a/src/sheet-control-gui.c
+++ b/src/sheet-control-gui.c
@@ -710,7 +710,7 @@ cb_table_destroy (SheetControlGUI *scg)
scg->pane[i] = NULL;
}
- g_object_unref (G_OBJECT (scg));
+ g_object_unref (scg);
}
static void
@@ -1831,7 +1831,7 @@ scg_unant (SheetControl *sc)
GSList *l;
for (l = pane->cursor.animated; l; l = l->next)
- g_object_unref (G_OBJECT (l->data));
+ g_object_unref (l->data);
g_slist_free (pane->cursor.animated);
pane->cursor.animated = NULL;
@@ -2845,7 +2845,7 @@ cb_collect_objects_to_commit (SheetObject *so, double *coords, CollectObjectsDat
SheetObjectView *sov = sheet_object_get_view (so,
(SheetObjectViewContainer *)pane);
- g_object_unref (G_OBJECT (ctrl_pts[9]));
+ g_object_unref (ctrl_pts[9]);
ctrl_pts[9] = NULL;
if (NULL == sov)
diff --git a/src/sheet-object-cell-comment.c b/src/sheet-object-cell-comment.c
index f5ee60f..326b15a 100644
--- a/src/sheet-object-cell-comment.c
+++ b/src/sheet-object-cell-comment.c
@@ -449,7 +449,7 @@ cell_set_comment (Sheet *sheet, GnmCellPos const *pos,
sheet_object_set_sheet (SHEET_OBJECT (cc), sheet);
/* setting the sheet added a reference */
- g_object_unref (G_OBJECT (cc));
+ g_object_unref (cc);
return cc;
}
diff --git a/src/sheet-object-graph.c b/src/sheet-object-graph.c
index 3d89d74..234903d 100644
--- a/src/sheet-object-graph.c
+++ b/src/sheet-object-graph.c
@@ -658,7 +658,7 @@ sheet_object_graph_set_gog (SheetObject *so, GogGraph *graph)
if (sog->graph == graph)
return;
- g_object_ref (G_OBJECT (graph));
+ g_object_ref (graph);
} else
graph = g_object_new (GOG_TYPE_GRAPH, NULL);
diff --git a/src/sheet-object-image.c b/src/sheet-object-image.c
index 3d2ff36..d664ca1 100644
--- a/src/sheet-object-image.c
+++ b/src/sheet-object-image.c
@@ -216,7 +216,7 @@ gnm_soi_new_view (SheetObject *so, SheetObjectViewContainer *container)
GOC_TYPE_PIXBUF,
"pixbuf", pixbuf,
NULL));
- g_object_unref (G_OBJECT (pixbuf));
+ g_object_unref (pixbuf);
g_object_set_data (G_OBJECT (item), "tile", placeholder);
}
diff --git a/src/sheet-object-widget.c b/src/sheet-object-widget.c
index 80cacc7..86ee8c2 100644
--- a/src/sheet-object-widget.c
+++ b/src/sheet-object-widget.c
@@ -1295,7 +1295,7 @@ sheet_widget_adjustment_finalize (GObject *obj)
dependent_set_expr (&swa->dep, NULL);
if (swa->adjustment != NULL) {
- g_object_unref (G_OBJECT (swa->adjustment));
+ g_object_unref (swa->adjustment);
swa->adjustment = NULL;
}
@@ -3055,7 +3055,7 @@ list_content_eval (GnmDependent *dep)
}
if (NULL != swl->model)
- g_object_unref (G_OBJECT (swl->model));
+ g_object_unref (swl->model);
swl->model = GTK_TREE_MODEL (model);
g_signal_emit (G_OBJECT (swl), list_base_signals [LIST_BASE_MODEL_CHANGED], 0);
}
diff --git a/src/sheet-object.c b/src/sheet-object.c
index 60180f6..d135afa 100644
--- a/src/sheet-object.c
+++ b/src/sheet-object.c
@@ -548,7 +548,7 @@ sheet_object_set_sheet (SheetObject *so, Sheet *sheet)
return TRUE;
}
- g_object_ref (G_OBJECT (so));
+ g_object_ref (so);
sheet->sheet_objects = g_slist_prepend (sheet->sheet_objects, so);
/* FIXME : add a flag to sheet to have sheet_update do this */
sheet_objects_max_extent (sheet);
@@ -593,7 +593,7 @@ sheet_object_clear_sheet (SheetObject *so)
while (so->realized_list != NULL) {
g_object_set_qdata (G_OBJECT (so->realized_list->data), sov_so_quark, NULL);
- g_object_unref (G_OBJECT (so->realized_list->data));
+ g_object_unref (so->realized_list->data);
so->realized_list = g_list_remove (so->realized_list, so->realized_list->data);
}
@@ -611,7 +611,7 @@ sheet_object_clear_sheet (SheetObject *so)
sheet_objects_max_extent (so->sheet);
so->sheet = NULL;
- g_object_unref (G_OBJECT (so));
+ g_object_unref (so);
}
static void
diff --git a/src/sheet-view.c b/src/sheet-view.c
index 2c61045..d9df759 100644
--- a/src/sheet-view.c
+++ b/src/sheet-view.c
@@ -216,7 +216,7 @@ sv_real_dispose (GObject *object)
if (sv->controls != NULL) {
SHEET_VIEW_FOREACH_CONTROL (sv, control, {
sv_detach_control (control);
- g_object_unref (G_OBJECT (control));
+ g_object_unref (control);
});
if (sv->controls != NULL)
g_warning ("Unexpected left-over controls");
diff --git a/src/ssgrep.c b/src/ssgrep.c
index 64d665f..baca256 100644
--- a/src/ssgrep.c
+++ b/src/ssgrep.c
@@ -465,7 +465,7 @@ main (int argc, char const **argv)
}
textline = (GsfInputTextline *)gsf_input_textline_new (input);
- g_object_unref (G_OBJECT (input));
+ g_object_unref (input);
pat = g_string_new (NULL);
while (NULL != (line = gsf_input_textline_ascii_gets (textline))) {
@@ -482,7 +482,7 @@ main (int argc, char const **argv)
ssgrep_pattern = g_string_free (pat, FALSE);
- g_object_unref (G_OBJECT (textline));
+ g_object_unref (textline);
i = 1;
N = argc - i;
diff --git a/src/stf.c b/src/stf.c
index fca9643..171b936 100644
--- a/src/stf.c
+++ b/src/stf.c
@@ -378,7 +378,7 @@ stf_text_to_columns (WorkbookControl *wbc, GOCmdContext *cc)
stf_dialog_result_free (dialogresult);
}
- g_object_unref (G_OBJECT (buf));
+ g_object_unref (buf);
}
static void
diff --git a/src/style.c b/src/style.c
index 9dd9869..2bf8740 100644
--- a/src/style.c
+++ b/src/style.c
@@ -462,7 +462,7 @@ gnm_font_init (void)
gnm_font_default_width = pts_scale *
PANGO_PIXELS (gnumeric_default_font->go.metrics->avg_digit_width);
gnm_font_unref (gnumeric_default_font);
- g_object_unref (G_OBJECT (context));
+ g_object_unref (context);
}
static void
diff --git a/src/wbc-gtk-edit.c b/src/wbc-gtk-edit.c
index 8c0fccb..5631f69 100644
--- a/src/wbc-gtk-edit.c
+++ b/src/wbc-gtk-edit.c
@@ -75,7 +75,7 @@ wbcg_auto_complete_destroy (WBCGtk *wbcg)
}
if (wbcg->auto_complete != NULL) {
- g_object_unref (G_OBJECT (wbcg->auto_complete));
+ g_object_unref (wbcg->auto_complete);
wbcg->auto_complete = NULL;
}
@@ -1062,7 +1062,7 @@ wbcg_insert_object_clear (WBCGtk *wbcg)
int i, npages;
SheetControlGUI *scg;
- g_object_unref (G_OBJECT (wbcg->new_object));
+ g_object_unref (wbcg->new_object);
wbcg->new_object = NULL;
npages = wbcg_get_n_scg (wbcg);
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index bee655b..81f80c8 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -1869,9 +1869,9 @@ wbc_gtk_close (WBCGtk *wbcg)
return FALSE;
}
- g_object_unref (G_OBJECT (wb_view));
+ g_object_unref (wb_view);
} else
- g_object_unref (G_OBJECT (wbcg));
+ g_object_unref (wbcg);
_gnm_app_flag_windows_changed ();
@@ -4462,7 +4462,7 @@ wbc_gtk_setup_icons (void)
during introspection with no proper initialization.*/
g_object_set_data_full (app, "icon-factory", factory,
(GDestroyNotify)gtk_icon_factory_remove_default);
- g_object_unref (G_OBJECT (factory));
+ g_object_unref (factory);
done = TRUE;
}
}
diff --git a/src/widgets/gnm-dao.c b/src/widgets/gnm-dao.c
index a0083b3..db89bff 100644
--- a/src/widgets/gnm-dao.c
+++ b/src/widgets/gnm-dao.c
@@ -107,7 +107,7 @@ gnm_dao_destroy (GtkWidget *widget)
GnmDao *gdao = GNM_DAO (widget);
if (gdao->gui) {
- g_object_unref (G_OBJECT (gdao->gui));
+ g_object_unref (gdao->gui);
gdao->gui = NULL;
}
diff --git a/src/widgets/gnumeric-cell-renderer-toggle.c b/src/widgets/gnumeric-cell-renderer-toggle.c
index 1d32113..b0a62f2 100644
--- a/src/widgets/gnumeric-cell-renderer-toggle.c
+++ b/src/widgets/gnumeric-cell-renderer-toggle.c
@@ -149,9 +149,9 @@ gnumeric_cell_renderer_toggle_set_property (GObject *object,
case PROP_PIXBUF:
pixbuf = (GdkPixbuf*) g_value_get_object (value);
if (pixbuf)
- g_object_ref (G_OBJECT (pixbuf));
+ g_object_ref (pixbuf);
if (celltoggle->pixbuf)
- g_object_unref (G_OBJECT (celltoggle->pixbuf));
+ g_object_unref (celltoggle->pixbuf);
celltoggle->pixbuf = pixbuf;
break;
default:
diff --git a/src/widgets/widget-font-selector.c b/src/widgets/widget-font-selector.c
index 6f7437b..9fea92d 100644
--- a/src/widgets/widget-font-selector.c
+++ b/src/widgets/widget-font-selector.c
@@ -427,7 +427,7 @@ fs_destroy (GtkWidget *widget)
}
if (fs->gui) {
- g_object_unref (G_OBJECT (fs->gui));
+ g_object_unref (fs->gui);
fs->gui = NULL;
}
diff --git a/src/workbook-view.c b/src/workbook-view.c
index 1fddcd4..86925b8 100644
--- a/src/workbook-view.c
+++ b/src/workbook-view.c
@@ -812,7 +812,7 @@ wb_view_dispose (GObject *object)
WORKBOOK_VIEW_FOREACH_CONTROL (wbv, control, {
wb_control_sheet_remove_all (control);
wb_view_detach_control (control);
- g_object_unref (G_OBJECT (control));
+ g_object_unref (control);
});
if (wbv->wb_controls != NULL)
g_warning ("Unexpected left-over controls");
@@ -1139,7 +1139,7 @@ wb_view_save_as (WorkbookView *wbv, GOFileSaver *fs, char const *uri,
}
if (has_error || has_warning)
go_io_error_display (io_context);
- g_object_unref (G_OBJECT (io_context));
+ g_object_unref (io_context);
g_object_unref (wb);
return !has_error;
@@ -1190,7 +1190,7 @@ wb_view_save (WorkbookView *wbv, GOCmdContext *context)
if (has_error || has_warning)
go_io_error_display (io_context);
- g_object_unref (G_OBJECT (io_context));
+ g_object_unref (io_context);
g_object_unref (wb);
return !has_error;
@@ -1275,12 +1275,12 @@ workbook_view_new_from_input (GsfInput *input,
workbook_enable_recursive_dirty (new_wb, old);
if (go_io_error_occurred (io_context)) {
- g_object_unref (G_OBJECT (new_wb));
+ g_object_unref (new_wb);
new_wbv = NULL;
} else if (workbook_sheet_count (new_wb) == 0) {
/* we didn't get a sheet nor an error, */
/* the user must have canceled */
- g_object_unref (G_OBJECT (new_wb));
+ g_object_unref (new_wb);
new_wbv = NULL;
} else {
workbook_share_expressions (new_wb, TRUE);
@@ -1333,7 +1333,7 @@ workbook_view_new_from_uri (char const *uri,
res = workbook_view_new_from_input (input, uri,
optional_fmt, io_context,
optional_enc);
- g_object_unref (G_OBJECT (input));
+ g_object_unref (input);
return res;
}
diff --git a/src/xml-sax-write.c b/src/xml-sax-write.c
index ebcc45e..96f49e0 100644
--- a/src/xml-sax-write.c
+++ b/src/xml-sax-write.c
@@ -1460,7 +1460,7 @@ gnm_xml_file_save_full (G_GNUC_UNUSED GOFileSaver const *fs,
g_hash_table_destroy (state.expr_map);
g_string_free (state.cell_str, TRUE);
gnm_conventions_unref (state.convs);
- g_object_unref (G_OBJECT (state.output));
+ g_object_unref (state.output);
if (gzout) {
gsf_output_close (gzout);
@@ -1608,7 +1608,7 @@ gnm_cellregion_to_xml (GnmCellRegion const *cr)
g_hash_table_destroy (state.state.expr_map);
g_string_free (state.state.cell_str, TRUE);
gnm_conventions_unref (state.state.convs);
- g_object_unref (G_OBJECT (state.state.output));
+ g_object_unref (state.state.output);
gsf_output_close (buf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]