/** * gedit_document_get_newline_type: * @doc: a #GeditDocument. * * Returns: the newline type. * Deprecated: 3.14: use gtk_source_file_get_newline_type() instead. */ GtkSourceNewlineType gedit_document_get_newline_type (GeditDocument *doc) { g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), 0); return gtk_source_file_get_newline_type (doc->priv->file); }
/** * gedit_document_get_newline_type: * @doc: a #GeditDocument. * * Returns: the newline type. * Deprecated: 3.14: use gtk_source_file_get_newline_type() instead. */ GtkSourceNewlineType gedit_document_get_newline_type (GeditDocument *doc) { GeditDocumentPrivate *priv; g_return_val_if_fail (GEDIT_IS_DOCUMENT (doc), 0); priv = gedit_document_get_instance_private (doc); return gtk_source_file_get_newline_type (priv->file); }
static void gtk_source_file_saver_constructed (GObject *object) { GtkSourceFileSaver *saver = GTK_SOURCE_FILE_SAVER (object); if (saver->priv->file != NULL) { const GtkSourceEncoding *encoding; GtkSourceNewlineType newline_type; GtkSourceCompressionType compression_type; encoding = gtk_source_file_get_encoding (saver->priv->file); gtk_source_file_saver_set_encoding (saver, encoding); newline_type = gtk_source_file_get_newline_type (saver->priv->file); gtk_source_file_saver_set_newline_type (saver, newline_type); compression_type = gtk_source_file_get_compression_type (saver->priv->file); gtk_source_file_saver_set_compression_type (saver, compression_type); if (saver->priv->location == NULL) { saver->priv->location = gtk_source_file_get_location (saver->priv->file); if (saver->priv->location != NULL) { g_object_ref (saver->priv->location); } else { g_warning ("GtkSourceFileSaver: the GtkSourceFile's location is NULL. " "Use gtk_source_file_saver_new_with_target()."); } } } G_OBJECT_CLASS (gtk_source_file_saver_parent_class)->constructed (object); }