Printing: properly claim ownership of the printing Scintilla widget
This avoids a GObject warning about unref-ing a floating object on print termination.
This commit is contained in:
parent
881ca4fa02
commit
d6c980f2fc
@ -349,6 +349,8 @@ static void begin_print(GtkPrintOperation *operation, GtkPrintContext *context,
|
||||
|
||||
/* setup printing scintilla object */
|
||||
dinfo->sci = editor_create_widget(dinfo->doc->editor);
|
||||
/* since we won't add the widget to any container, assume it's ownership */
|
||||
g_object_ref_sink(dinfo->sci);
|
||||
scintilla_send_message(dinfo->sci, SCI_SETDOCPOINTER, 0,
|
||||
scintilla_send_message(dinfo->doc->editor->sci, SCI_GETDOCPOINTER, 0, 0));
|
||||
highlighting_set_styles(dinfo->sci, dinfo->doc->file_type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user