[eog] Improve the API consistency in EogImageSaveInfo
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Improve the API consistency in EogImageSaveInfo
- Date: Thu, 30 Dec 2010 19:18:54 +0000 (UTC)
commit ae39227b82978abf2b69baff0e46d8bba8d3474e
Author: Claudio Saavedra <csaavedra igalia com>
Date: Thu Dec 30 20:58:32 2010 +0200
Improve the API consistency in EogImageSaveInfo
This will make things better for introspection
doc/reference/eog-sections.txt | 6 +++---
src/eog-image-save-info.c | 11 ++++-------
src/eog-image-save-info.h | 17 ++++++++++-------
src/eog-jobs.c | 12 ++++++------
4 files changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/doc/reference/eog-sections.txt b/doc/reference/eog-sections.txt
index 90be50e..f76e19d 100644
--- a/doc/reference/eog-sections.txt
+++ b/doc/reference/eog-sections.txt
@@ -568,9 +568,9 @@ EOG_DIALOG_GET_CLASS
<TITLE>EogImageSaveInfo</TITLE>
EogImageSaveInfo
EOG_FILE_FORMAT_JPEG
-eog_image_save_info_from_image
-eog_image_save_info_from_uri
-eog_image_save_info_from_file
+eog_image_save_info_new_from_image
+eog_image_save_info_new_from_uri
+eog_image_save_info_new_from_file
<SUBSECTION Standard>
EOG_IMAGE_SAVE_INFO
EOG_IS_IMAGE_SAVE_INFO
diff --git a/src/eog-image-save-info.c b/src/eog-image-save-info.c
index 351ae5a..e76105f 100644
--- a/src/eog-image-save-info.c
+++ b/src/eog-image-save-info.c
@@ -79,12 +79,9 @@ get_save_file_type_by_file (GFile *file)
}
EogImageSaveInfo*
-eog_image_save_info_from_image (gpointer data)
+eog_image_save_info_new_from_image (EogImage *image)
{
EogImageSaveInfo *info = NULL;
- EogImage *image;
-
- image = EOG_IMAGE (data);
g_return_val_if_fail (EOG_IS_IMAGE (image), NULL);
@@ -104,7 +101,7 @@ eog_image_save_info_from_image (gpointer data)
}
EogImageSaveInfo*
-eog_image_save_info_from_uri (const char *txt_uri, GdkPixbufFormat *format)
+eog_image_save_info_new_from_uri (const char *txt_uri, GdkPixbufFormat *format)
{
GFile *file;
EogImageSaveInfo *info;
@@ -113,7 +110,7 @@ eog_image_save_info_from_uri (const char *txt_uri, GdkPixbufFormat *format)
file = g_file_new_for_uri (txt_uri);
- info = eog_image_save_info_from_file (file, format);
+ info = eog_image_save_info_new_from_file (file, format);
g_object_unref (file);
@@ -121,7 +118,7 @@ eog_image_save_info_from_uri (const char *txt_uri, GdkPixbufFormat *format)
}
EogImageSaveInfo*
-eog_image_save_info_from_file (GFile *file, GdkPixbufFormat *format)
+eog_image_save_info_new_from_file (GFile *file, GdkPixbufFormat *format)
{
EogImageSaveInfo *info;
diff --git a/src/eog-image-save-info.h b/src/eog-image-save-info.h
index 72ac575..33d6b27 100644
--- a/src/eog-image-save-info.h
+++ b/src/eog-image-save-info.h
@@ -7,7 +7,10 @@
G_BEGIN_DECLS
-struct EogImage;
+#ifndef __EOG_IMAGE_DECLR__
+#define __EOG_IMAGE_DECLR__
+typedef struct _EogImage EogImage;
+#endif
#define EOG_TYPE_IMAGE_SAVE_INFO (eog_image_save_info_get_type ())
#define EOG_IMAGE_SAVE_INFO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EOG_TYPE_IMAGE_SAVE_INFO, EogImageSaveInfo))
@@ -39,15 +42,15 @@ struct _EogImageSaveInfoClass {
#define EOG_FILE_FORMAT_JPEG "jpeg"
-GType eog_image_save_info_get_type (void) G_GNUC_CONST;
+GType eog_image_save_info_get_type (void) G_GNUC_CONST;
-EogImageSaveInfo *eog_image_save_info_from_image (gpointer data);
+EogImageSaveInfo *eog_image_save_info_new_from_image (EogImage *image);
-EogImageSaveInfo *eog_image_save_info_from_uri (const char *uri,
- GdkPixbufFormat *format);
+EogImageSaveInfo *eog_image_save_info_new_from_uri (const char *uri,
+ GdkPixbufFormat *format);
-EogImageSaveInfo *eog_image_save_info_from_file (GFile *file,
- GdkPixbufFormat *format);
+EogImageSaveInfo *eog_image_save_info_new_from_file (GFile *file,
+ GdkPixbufFormat *format);
G_END_DECLS
diff --git a/src/eog-jobs.c b/src/eog-jobs.c
index 5cf8127..2a02e33 100644
--- a/src/eog-jobs.c
+++ b/src/eog-jobs.c
@@ -637,7 +637,7 @@ eog_job_save_run (EogJob *ejob)
G_CALLBACK (save_progress_handler),
job);
- save_info = eog_image_save_info_from_image (image);
+ save_info = eog_image_save_info_new_from_image (image);
success = eog_image_save_by_info (image,
save_info,
@@ -746,15 +746,15 @@ eog_job_save_as_run (EogJob *ejob)
G_CALLBACK (save_progress_handler),
job);
- src_info = eog_image_save_info_from_image (image);
+ src_info = eog_image_save_info_new_from_image (image);
if (n_images == 1) {
g_assert (saveas_job->file != NULL);
format = eog_pixbuf_get_format (saveas_job->file);
- dest_info = eog_image_save_info_from_file (saveas_job->file,
- format);
+ dest_info = eog_image_save_info_new_from_file (saveas_job->file,
+ format);
/* SaveAsDialog has already secured permission to overwrite */
if (dest_info->exists) {
@@ -772,8 +772,8 @@ eog_job_save_as_run (EogJob *ejob)
g_assert (result);
- dest_info = eog_image_save_info_from_file (dest_file,
- format);
+ dest_info = eog_image_save_info_new_from_file (dest_file,
+ format);
}
success = eog_image_save_as_by_info (image,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]