summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-07-26 11:43:49 +0200
committerinfirit <[email protected]>2014-07-26 12:17:20 +0200
commitd056914e3d49734d740c227eda08a9a3711c9ae3 (patch)
tree2082f4858d50fe287e9c037ee2d5251679b0cae9
parent99d1fc5f4d134d93c25702fd5ba12e10b874aa71 (diff)
downloadeom-d056914e3d49734d740c227eda08a9a3711c9ae3.tar.bz2
eom-d056914e3d49734d740c227eda08a9a3711c9ae3.tar.xz
Improve the API consistency in EomImageSaveInfo
This will make things better for introspection Based on eog commit ae39227b82978abf2b69baff0e46d8bba8d3474e From Claudio Saavedra <[email protected]>
-rw-r--r--doc/reference/eom-sections.txt6
-rw-r--r--src/eom-image-save-info.c11
-rw-r--r--src/eom-image-save-info.h17
-rw-r--r--src/eom-jobs.c8
4 files changed, 21 insertions, 21 deletions
diff --git a/doc/reference/eom-sections.txt b/doc/reference/eom-sections.txt
index c88d0b4..02b8110 100644
--- a/doc/reference/eom-sections.txt
+++ b/doc/reference/eom-sections.txt
@@ -568,9 +568,9 @@ EOM_DIALOG_GET_CLASS
<TITLE>EomImageSaveInfo</TITLE>
EomImageSaveInfo
EOM_FILE_FORMAT_JPEG
-eom_image_save_info_from_image
-eom_image_save_info_from_uri
-eom_image_save_info_from_file
+eom_image_save_info_new_from_image
+eom_image_save_info_new_from_uri
+eom_image_save_info_new_from_file
<SUBSECTION Standard>
EOM_IMAGE_SAVE_INFO
EOM_IS_IMAGE_SAVE_INFO
diff --git a/src/eom-image-save-info.c b/src/eom-image-save-info.c
index d368a61..d7a70e1 100644
--- a/src/eom-image-save-info.c
+++ b/src/eom-image-save-info.c
@@ -79,12 +79,9 @@ get_save_file_type_by_file (GFile *file)
}
EomImageSaveInfo*
-eom_image_save_info_from_image (gpointer data)
+eom_image_save_info_new_from_image (EomImage *image)
{
EomImageSaveInfo *info = NULL;
- EomImage *image;
-
- image = EOM_IMAGE (data);
g_return_val_if_fail (EOM_IS_IMAGE (image), NULL);
@@ -104,7 +101,7 @@ eom_image_save_info_from_image (gpointer data)
}
EomImageSaveInfo*
-eom_image_save_info_from_uri (const char *txt_uri, GdkPixbufFormat *format)
+eom_image_save_info_new_from_uri (const char *txt_uri, GdkPixbufFormat *format)
{
GFile *file;
EomImageSaveInfo *info;
@@ -113,7 +110,7 @@ eom_image_save_info_from_uri (const char *txt_uri, GdkPixbufFormat *format)
file = g_file_new_for_uri (txt_uri);
- info = eom_image_save_info_from_file (file, format);
+ info = eom_image_save_info_new_from_file (file, format);
g_object_unref (file);
@@ -121,7 +118,7 @@ eom_image_save_info_from_uri (const char *txt_uri, GdkPixbufFormat *format)
}
EomImageSaveInfo*
-eom_image_save_info_from_file (GFile *file, GdkPixbufFormat *format)
+eom_image_save_info_new_from_file (GFile *file, GdkPixbufFormat *format)
{
EomImageSaveInfo *info;
diff --git a/src/eom-image-save-info.h b/src/eom-image-save-info.h
index 8a3c36f..41a564b 100644
--- a/src/eom-image-save-info.h
+++ b/src/eom-image-save-info.h
@@ -7,7 +7,10 @@
G_BEGIN_DECLS
-struct EomImage;
+#ifndef __EOM_IMAGE_DCLR__
+#define __EOM_IMAGE_DECLR__
+typedef struct _EomImage EomImage;
+#endif
#define EOM_TYPE_IMAGE_SAVE_INFO (eom_image_save_info_get_type ())
#define EOM_IMAGE_SAVE_INFO(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EOM_TYPE_IMAGE_SAVE_INFO, EomImageSaveInfo))
@@ -39,15 +42,15 @@ struct _EomImageSaveInfoClass {
#define EOM_FILE_FORMAT_JPEG "jpeg"
-GType eom_image_save_info_get_type (void) G_GNUC_CONST;
+GType eom_image_save_info_get_type (void) G_GNUC_CONST;
-EomImageSaveInfo *eom_image_save_info_from_image (gpointer data);
+EomImageSaveInfo *eom_image_save_info_new_from_image (EomImage *image);
-EomImageSaveInfo *eom_image_save_info_from_uri (const char *uri,
- GdkPixbufFormat *format);
+EomImageSaveInfo *eom_image_save_info_new_from_uri (const char *uri,
+ GdkPixbufFormat *format);
-EomImageSaveInfo *eom_image_save_info_from_file (GFile *file,
- GdkPixbufFormat *format);
+EomImageSaveInfo *eom_image_save_info_new_from_file (GFile *file,
+ GdkPixbufFormat *format);
G_END_DECLS
diff --git a/src/eom-jobs.c b/src/eom-jobs.c
index 1ddfc4f..d5a7a1d 100644
--- a/src/eom-jobs.c
+++ b/src/eom-jobs.c
@@ -639,7 +639,7 @@ eom_job_save_run (EomJob *ejob)
G_CALLBACK (save_progress_handler),
job);
- save_info = eom_image_save_info_from_image (image);
+ save_info = eom_image_save_info_new_from_image (image);
success = eom_image_save_by_info (image,
save_info,
@@ -748,14 +748,14 @@ eom_job_save_as_run (EomJob *ejob)
G_CALLBACK (save_progress_handler),
job);
- src_info = eom_image_save_info_from_image (image);
+ src_info = eom_image_save_info_new_from_image (image);
if (n_images == 1) {
g_assert (saveas_job->file != NULL);
format = eom_pixbuf_get_format (saveas_job->file);
- dest_info = eom_image_save_info_from_file (saveas_job->file,
+ dest_info = eom_image_save_info_new_from_file (saveas_job->file,
format);
/* SaveAsDialog has already secured permission to overwrite */
@@ -774,7 +774,7 @@ eom_job_save_as_run (EomJob *ejob)
g_assert (result);
- dest_info = eom_image_save_info_from_file (dest_file,
+ dest_info = eom_image_save_info_new_from_file (dest_file,
format);
}