[frogr] Renamed *_photo_* to *_picture_* in video related code



commit 47f040987a55309922c6c9d83aed4b1ae74000df
Author: Mario Sanchez Prada <msanchez gnome org>
Date:   Sat Nov 3 19:40:42 2012 +0100

    Renamed *_photo_* to *_picture_* in video related code

 src/examples/example.c     |    4 ++--
 src/flicksoup/fsp-data.c   |    4 ++--
 src/flicksoup/fsp-data.h   |    4 ++--
 src/flicksoup/fsp-error.c  |   20 ++++++++++----------
 src/flicksoup/fsp-error.h  |    2 +-
 src/flicksoup/fsp-parser.c |    2 +-
 src/frogr-account.c        |   30 +++++++++++++++---------------
 src/frogr-account.h        |    6 +++---
 src/frogr-controller.c     |   12 ++++++------
 src/frogr-file-loader.c    |   10 +++++-----
 src/frogr-file-loader.h    |    2 +-
 11 files changed, 48 insertions(+), 48 deletions(-)
---
diff --git a/src/examples/example.c b/src/examples/example.c
index e1079e3..9f33e57 100644
--- a/src/examples/example.c
+++ b/src/examples/example.c
@@ -567,8 +567,8 @@ get_upload_status_cb (GObject *object, GAsyncResult *res, gpointer unused)
                upload_status->bw_used_videos);
       g_print ("[get_upload_status_cb]::\tBandwitdh Remaining videos: %u\n",
                upload_status->bw_remaining_videos);
-      g_print ("[get_upload_status_cb]::\tPhoto filesize Max KB: %lu\n",
-               upload_status->photo_fs_max_kb);
+      g_print ("[get_upload_status_cb]::\tPicture filesize Max KB: %lu\n",
+               upload_status->picture_fs_max_kb);
       g_print ("[get_upload_status_cb]::\tVideo filesize Max KB: %lu\n",
                upload_status->video_fs_max_kb);
 
diff --git a/src/flicksoup/fsp-data.c b/src/flicksoup/fsp-data.c
index 13e8f0f..014ac9f 100644
--- a/src/flicksoup/fsp-data.c
+++ b/src/flicksoup/fsp-data.c
@@ -61,7 +61,7 @@ fsp_data_new                            (FspDataType type)
       new_data->upload_status.bw_used_videos = G_MAXUINT;
       new_data->upload_status.bw_remaining_videos = G_MAXUINT;
       new_data->upload_status.bw_remaining_kb = G_MAXUINT32;
-      new_data->upload_status.photo_fs_max_kb = G_MAXUINT32;
+      new_data->upload_status.picture_fs_max_kb = G_MAXUINT32;
       new_data->upload_status.video_fs_max_kb = G_MAXUINT32;
       break;
 
@@ -146,7 +146,7 @@ fsp_data_copy                           (const FspData *data)
       new_data->upload_status.bw_remaining_kb = data->upload_status.bw_remaining_kb;
       new_data->upload_status.bw_used_videos = data->upload_status.bw_used_videos;
       new_data->upload_status.bw_remaining_videos = data->upload_status.bw_remaining_videos;
-      new_data->upload_status.photo_fs_max_kb = data->upload_status.photo_fs_max_kb;
+      new_data->upload_status.picture_fs_max_kb = data->upload_status.picture_fs_max_kb;
       new_data->upload_status.video_fs_max_kb = data->upload_status.video_fs_max_kb;
       break;
 
diff --git a/src/flicksoup/fsp-data.h b/src/flicksoup/fsp-data.h
index a714823..18383bb 100644
--- a/src/flicksoup/fsp-data.h
+++ b/src/flicksoup/fsp-data.h
@@ -152,8 +152,8 @@ struct _FspDataUploadStatus
   guint        bw_used_videos;      /* Current number of videos */
   guint        bw_remaining_videos; /* Remaining number of videos */
 
-  gulong       photo_fs_max_kb;     /* Filesize max KB */
-  gulong       video_fs_max_kb;     /* Filesize max KB */
+  gulong       picture_fs_max_kb;   /* Filesize max KB for pictures */
+  gulong       video_fs_max_kb;     /* Filesize max KB for videos */
 };
 
 struct _FspDataPhotoInfo
diff --git a/src/flicksoup/fsp-error.c b/src/flicksoup/fsp-error.c
index c23cb44..bb23f03 100644
--- a/src/flicksoup/fsp-error.c
+++ b/src/flicksoup/fsp-error.c
@@ -25,16 +25,16 @@
 #define N_ERRORS (N_SPECIFIC_ERRORS + N_GENERAL_ERRORS)
 
 static const FspError photo_upload_translations [N_SPECIFIC_ERRORS] = {
-  FSP_ERROR_UNKNOWN,                     /* 0 */
-  FSP_ERROR_UNKNOWN,                     /* 1 */
-  FSP_ERROR_UPLOAD_MISSING_PHOTO,        /* 2 */
-  FSP_ERROR_UPLOAD_GENERAL_FAILURE,      /* 3 */
-  FSP_ERROR_UPLOAD_INVALID_FILE,         /* 4 */
-  FSP_ERROR_UPLOAD_INVALID_FILE,         /* 5 */
-  FSP_ERROR_UPLOAD_QUOTA_PHOTO_EXCEEDED, /* 6 */
-  FSP_ERROR_UPLOAD_QUOTA_VIDEO_EXCEEDED, /* 7 */
-  FSP_ERROR_UNKNOWN,                     /* 8 */
-  FSP_ERROR_UNKNOWN,                     /* 9 */
+  FSP_ERROR_UNKNOWN,                       /* 0 */
+  FSP_ERROR_UNKNOWN,                       /* 1 */
+  FSP_ERROR_UPLOAD_MISSING_PHOTO,          /* 2 */
+  FSP_ERROR_UPLOAD_GENERAL_FAILURE,        /* 3 */
+  FSP_ERROR_UPLOAD_INVALID_FILE,           /* 4 */
+  FSP_ERROR_UPLOAD_INVALID_FILE,           /* 5 */
+  FSP_ERROR_UPLOAD_QUOTA_PICTURE_EXCEEDED, /* 6 */
+  FSP_ERROR_UPLOAD_QUOTA_VIDEO_EXCEEDED,   /* 7 */
+  FSP_ERROR_UNKNOWN,                       /* 8 */
+  FSP_ERROR_UNKNOWN,                       /* 9 */
 };
 
 static const FspError photo_get_info_translations [N_SPECIFIC_ERRORS] = {
diff --git a/src/flicksoup/fsp-error.h b/src/flicksoup/fsp-error.h
index 449b045..451349f 100644
--- a/src/flicksoup/fsp-error.h
+++ b/src/flicksoup/fsp-error.h
@@ -47,7 +47,7 @@ typedef enum {
   FSP_ERROR_UPLOAD_MISSING_PHOTO,
   FSP_ERROR_UPLOAD_GENERAL_FAILURE,
   FSP_ERROR_UPLOAD_INVALID_FILE,
-  FSP_ERROR_UPLOAD_QUOTA_PHOTO_EXCEEDED,
+  FSP_ERROR_UPLOAD_QUOTA_PICTURE_EXCEEDED,
   FSP_ERROR_UPLOAD_QUOTA_VIDEO_EXCEEDED,
 
   FSP_ERROR_PHOTO_NOT_FOUND,
diff --git a/src/flicksoup/fsp-parser.c b/src/flicksoup/fsp-parser.c
index 2254496..5dcad51 100644
--- a/src/flicksoup/fsp-parser.c
+++ b/src/flicksoup/fsp-parser.c
@@ -554,7 +554,7 @@ _get_upload_status_parser               (xmlDoc  *doc,
           if (!g_strcmp0 ((gchar *) node->name, "filesize"))
             {
               value = xmlGetProp (node, (const xmlChar *) "maxkb");
-              upload_status->photo_fs_max_kb = (gulong) g_ascii_strtoll ((gchar *) value, NULL, 10);
+              upload_status->picture_fs_max_kb = (gulong) g_ascii_strtoll ((gchar *) value, NULL, 10);
               xmlFree (value);
             }
 
diff --git a/src/frogr-account.c b/src/frogr-account.c
index 0e1413d..b47667f 100644
--- a/src/frogr-account.c
+++ b/src/frogr-account.c
@@ -47,7 +47,7 @@ struct _FrogrAccountPrivate
   /* Following properties won't be persistent */
   gulong remaining_bandwidth;
   gulong max_bandwidth;
-  gulong max_photo_filesize;
+  gulong max_picture_filesize;
   gulong max_video_filesize;
   guint remaining_videos;
   guint current_videos;
@@ -69,7 +69,7 @@ enum {
   PROP_HAS_EXTRA_INFO,
   PROP_REMAINING_BANDWIDTH,
   PROP_MAX_BANDWIDTH,
-  PROP_MAX_PHOTO_FILESIZE,
+  PROP_MAX_PICTURE_FILESIZE,
   PROP_MAX_VIDEO_FILESIZE,
   PROP_REMAINING_VIDEOS,
   PROP_CURRENT_VIDEOS,
@@ -133,8 +133,8 @@ _frogr_account_set_property (GObject      *object,
       frogr_account_set_max_bandwidth (self, g_value_get_ulong (value));
       break;
 
-    case PROP_MAX_PHOTO_FILESIZE:
-      frogr_account_set_max_photo_filesize (self, g_value_get_ulong (value));
+    case PROP_MAX_PICTURE_FILESIZE:
+      frogr_account_set_max_picture_filesize (self, g_value_get_ulong (value));
       break;
 
     case PROP_MAX_VIDEO_FILESIZE:
@@ -212,8 +212,8 @@ _frogr_account_get_property (GObject    *object,
       g_value_set_ulong (value, priv->max_bandwidth);
       break;
 
-    case PROP_MAX_PHOTO_FILESIZE:
-      g_value_set_ulong (value, priv->max_photo_filesize);
+    case PROP_MAX_PICTURE_FILESIZE:
+      g_value_set_ulong (value, priv->max_picture_filesize);
       break;
 
     case PROP_MAX_VIDEO_FILESIZE:
@@ -343,12 +343,12 @@ frogr_account_class_init (FrogrAccountClass *klass)
                               G_PARAM_READWRITE);
   g_object_class_install_property (obj_class, PROP_MAX_BANDWIDTH, pspec);
 
-  pspec = g_param_spec_ulong ("max-photo-filesize",
-                              "max-photo-filesize",
-                              "Max allowed filesize for photos in KB",
+  pspec = g_param_spec_ulong ("max-picture-filesize",
+                              "max-picture-filesize",
+                              "Max allowed filesize for pictures in KB",
                               0, G_MAXULONG, G_MAXULONG,
                               G_PARAM_READWRITE);
-  g_object_class_install_property (obj_class, PROP_MAX_PHOTO_FILESIZE, pspec);
+  g_object_class_install_property (obj_class, PROP_MAX_PICTURE_FILESIZE, pspec);
 
   pspec = g_param_spec_ulong ("max-video-filesize",
                               "max-video-filesize",
@@ -396,7 +396,7 @@ frogr_account_init (FrogrAccount *self)
   priv->has_extra_info = FALSE;
   priv->remaining_bandwidth = G_MAXULONG;
   priv->max_bandwidth = G_MAXULONG;
-  priv->max_photo_filesize = G_MAXULONG;
+  priv->max_picture_filesize = G_MAXULONG;
   priv->max_video_filesize = G_MAXULONG;
   priv->remaining_videos = G_MAXUINT;
   priv->current_videos = G_MAXUINT;
@@ -654,17 +654,17 @@ frogr_account_set_max_bandwidth (FrogrAccount *self, gulong max_bandwidth)
   priv->max_bandwidth = max_bandwidth;
 }
 
-gulong frogr_account_get_max_photo_filesize (FrogrAccount *self)
+gulong frogr_account_get_max_picture_filesize (FrogrAccount *self)
 {
   FrogrAccountPrivate *priv = NULL;
 
   g_return_val_if_fail (FROGR_IS_ACCOUNT (self), G_MAXULONG);
 
   priv = FROGR_ACCOUNT_GET_PRIVATE (self);
-  return priv->max_photo_filesize;
+  return priv->max_picture_filesize;
 }
 
-void frogr_account_set_max_photo_filesize (FrogrAccount *self,
+void frogr_account_set_max_picture_filesize (FrogrAccount *self,
                                            gulong max_filesize)
 {
   FrogrAccountPrivate *priv = NULL;
@@ -672,7 +672,7 @@ void frogr_account_set_max_photo_filesize (FrogrAccount *self,
   g_return_if_fail (FROGR_IS_ACCOUNT (self));
 
   priv = FROGR_ACCOUNT_GET_PRIVATE (self);
-  priv->max_photo_filesize = max_filesize;
+  priv->max_picture_filesize = max_filesize;
 }
 
 gulong
diff --git a/src/frogr-account.h b/src/frogr-account.h
index 19c1e57..011eecd 100644
--- a/src/frogr-account.h
+++ b/src/frogr-account.h
@@ -110,10 +110,10 @@ gulong frogr_account_get_max_bandwidth (FrogrAccount *self);
 void frogr_account_set_max_bandwidth (FrogrAccount *self,
                                       gulong max_bandwidth);
 
-gulong frogr_account_get_max_photo_filesize (FrogrAccount *self);
+gulong frogr_account_get_max_picture_filesize (FrogrAccount *self);
 
-void frogr_account_set_max_photo_filesize (FrogrAccount *self,
-                                           gulong max_filesize);
+void frogr_account_set_max_picture_filesize (FrogrAccount *self,
+                                             gulong max_filesize);
 
 gulong frogr_account_get_remaining_videos (FrogrAccount *self);
 
diff --git a/src/frogr-controller.c b/src/frogr-controller.c
index 9761c46..d34cec3 100644
--- a/src/frogr-controller.c
+++ b/src/frogr-controller.c
@@ -310,7 +310,7 @@ _handle_flicksoup_error (FrogrController *self, GError *error, gboolean notify_u
       msg = g_strdup (_("Error uploading:\nFile invalid"));
       break;
 
-    case FSP_ERROR_UPLOAD_QUOTA_PHOTO_EXCEEDED:
+    case FSP_ERROR_UPLOAD_QUOTA_PICTURE_EXCEEDED:
       msg = g_strdup (_("Error uploading picture:\nQuota exceeded"));
       break;
 
@@ -601,7 +601,7 @@ _should_retry_operation (GError *error, gint attempts)
 {
   if (error->code == FSP_ERROR_CANCELLED
       || error->code == FSP_ERROR_UPLOAD_INVALID_FILE
-      || error->code == FSP_ERROR_UPLOAD_QUOTA_PHOTO_EXCEEDED
+      || error->code == FSP_ERROR_UPLOAD_QUOTA_PICTURE_EXCEEDED
       || error->code == FSP_ERROR_UPLOAD_QUOTA_VIDEO_EXCEEDED
       || error->code == FSP_ERROR_OAUTH_NOT_AUTHORIZED_YET
       || error->code == FSP_ERROR_NOT_AUTHENTICATED
@@ -1639,7 +1639,7 @@ _fetch_account_extra_info_cb (GObject *object, GAsyncResult *res, gpointer data)
 
       frogr_account_set_remaining_bandwidth (priv->account, upload_status->bw_remaining_kb);
       frogr_account_set_max_bandwidth (priv->account, upload_status->bw_max_kb);
-      frogr_account_set_max_photo_filesize (priv->account, upload_status->photo_fs_max_kb);
+      frogr_account_set_max_picture_filesize (priv->account, upload_status->picture_fs_max_kb);
 
       frogr_account_set_remaining_videos (priv->account, upload_status->bw_remaining_videos);
       frogr_account_set_current_videos (priv->account, upload_status->bw_used_videos);
@@ -2616,17 +2616,17 @@ frogr_controller_load_pictures (FrogrController *self,
 {
   FrogrControllerPrivate *priv = NULL;
   FrogrFileLoader *loader = NULL;
-  gulong max_photo_filesize = G_MAXULONG;
+  gulong max_picture_filesize = G_MAXULONG;
   gulong max_video_filesize = G_MAXULONG;
 
   g_return_if_fail(FROGR_IS_CONTROLLER (self));
 
   priv = FROGR_CONTROLLER_GET_PRIVATE (self);
 
-  max_photo_filesize = frogr_account_get_max_photo_filesize (priv->account);
+  max_picture_filesize = frogr_account_get_max_picture_filesize (priv->account);
   max_video_filesize = frogr_account_get_max_video_filesize (priv->account);
 
-  loader = frogr_file_loader_new (fileuris, max_photo_filesize, max_video_filesize);
+  loader = frogr_file_loader_new (fileuris, max_picture_filesize, max_video_filesize);
 
   g_signal_connect (G_OBJECT (loader), "file-loaded",
                     G_CALLBACK (_on_file_loaded),
diff --git a/src/frogr-file-loader.c b/src/frogr-file-loader.c
index 35ee1f9..5c6d028 100644
--- a/src/frogr-file-loader.c
+++ b/src/frogr-file-loader.c
@@ -61,7 +61,7 @@ struct _FrogrFileLoaderPrivate
   guint index;
   guint n_files;
 
-  gulong max_photo_size;
+  gulong max_picture_size;
   gulong max_video_size;
   gboolean keep_file_extensions;
   gboolean import_tags;
@@ -377,7 +377,7 @@ _load_next_file_cb (GObject *object,
 
   /* Check if we must interrupt the process */
   picture_filesize = frogr_picture_get_filesize (fpicture);
-  max_filesize = frogr_picture_is_video (fpicture) ? priv->max_video_size : priv->max_photo_size;
+  max_filesize = frogr_picture_is_video (fpicture) ? priv->max_video_size : priv->max_picture_size;
 
   if (picture_filesize > max_filesize)
     {
@@ -649,7 +649,7 @@ frogr_file_loader_init (FrogrFileLoader *self)
   priv->mainview = g_object_ref (frogr_controller_get_main_view (priv->controller));
 
   /* Initialize values from frogr configuration */
-  priv->max_photo_size = G_MAXULONG;
+  priv->max_picture_size = G_MAXULONG;
   priv->max_video_size = G_MAXULONG;
   priv->keep_file_extensions = frogr_config_get_keep_file_extensions (config);
   priv->import_tags = frogr_config_get_import_tags_from_metadata (config);
@@ -672,7 +672,7 @@ frogr_file_loader_init (FrogrFileLoader *self)
 /* Public API */
 
 FrogrFileLoader *
-frogr_file_loader_new (GSList *file_uris, gulong max_photo_size, gulong max_video_size)
+frogr_file_loader_new (GSList *file_uris, gulong max_picture_size, gulong max_video_size)
 {
   FrogrFileLoader *self = NULL;
   FrogrFileLoaderPrivate *priv = NULL;
@@ -684,7 +684,7 @@ frogr_file_loader_new (GSList *file_uris, gulong max_photo_size, gulong max_vide
   priv->current = priv->file_uris;
   priv->index = 0;
   priv->n_files = g_slist_length (priv->file_uris);
-  priv->max_photo_size = max_photo_size;
+  priv->max_picture_size = max_picture_size;
   priv->max_video_size = max_video_size;
 
   return self;
diff --git a/src/frogr-file-loader.h b/src/frogr-file-loader.h
index 80e59cf..eb64cc3 100644
--- a/src/frogr-file-loader.h
+++ b/src/frogr-file-loader.h
@@ -51,7 +51,7 @@ struct _FrogrFileLoaderClass
 
 GType frogr_file_loader_get_type(void) G_GNUC_CONST;
 
-FrogrFileLoader *frogr_file_loader_new (GSList *file_uris, gulong max_photo_size, gulong max_video_size);
+FrogrFileLoader *frogr_file_loader_new (GSList *file_uris, gulong max_picture_size, gulong max_video_size);
 
 void frogr_file_loader_load (FrogrFileLoader *self);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]