[frogr] Renamed 'set' to 'photoset' all around.
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Renamed 'set' to 'photoset' all around.
- Date: Thu, 25 Aug 2011 22:07:59 +0000 (UTC)
commit a12dbd16c643a459a56045756eedce6a823e4432
Author: Mario Sanchez Prada <msanchez igalia com>
Date: Thu Aug 25 23:22:44 2011 +0200
Renamed 'set' to 'photoset' all around.
src/frogr-add-to-set-dialog.c | 54 ++++++++--------
src/frogr-add-to-set-dialog.h | 2 +-
src/frogr-controller.c | 120 ++++++++++++++++++------------------
src/frogr-create-new-set-dialog.c | 32 +++++-----
src/frogr-create-new-set-dialog.h | 2 +-
src/frogr-main-view-model.c | 70 +++++++++++-----------
src/frogr-main-view-model.h | 18 +++---
src/frogr-photoset.c | 24 ++++----
src/frogr-photoset.h | 12 ++--
src/frogr-picture.c | 56 +++++++++---------
src/frogr-picture.h | 10 ++--
11 files changed, 200 insertions(+), 200 deletions(-)
---
diff --git a/src/frogr-add-to-set-dialog.c b/src/frogr-add-to-set-dialog.c
index 12583fc..2c1541e 100644
--- a/src/frogr-add-to-set-dialog.c
+++ b/src/frogr-add-to-set-dialog.c
@@ -45,14 +45,14 @@ typedef struct _FrogrAddToSetDialogPrivate {
GtkTreeViewColumn *n_elements_col;
GSList *pictures;
- GSList *sets;
+ GSList *photosets;
} FrogrAddToSetDialogPrivate;
/* Properties */
enum {
PROP_0,
PROP_PICTURES,
- PROP_SETS
+ PROP_PHOTOSETS
};
@@ -81,7 +81,7 @@ static gint _tree_iter_compare_n_elements_func (GtkTreeModel *model,
GtkTreeIter *b,
gpointer data);
-static void _populate_treemodel_with_sets (FrogrAddToSetDialog *self);
+static void _populate_treemodel_with_photosets (FrogrAddToSetDialog *self);
static void _fill_dialog_with_data (FrogrAddToSetDialog *self);
@@ -89,7 +89,7 @@ static void _set_toggled_cb (GtkCellRendererToggle *celltoggle,
gchar *path_string,
GtkTreeView *treeview);
-static GSList *_get_selected_sets (FrogrAddToSetDialog *self);
+static GSList *_get_selected_photosets (FrogrAddToSetDialog *self);
static void _update_pictures (FrogrAddToSetDialog *self);
@@ -231,7 +231,7 @@ _tree_iter_compare_n_elements_func (GtkTreeModel *model,
}
static void
-_populate_treemodel_with_sets (FrogrAddToSetDialog *self)
+_populate_treemodel_with_photosets (FrogrAddToSetDialog *self)
{
FrogrAddToSetDialogPrivate *priv = NULL;
FrogrPhotoSet *set = NULL;
@@ -241,9 +241,9 @@ _populate_treemodel_with_sets (FrogrAddToSetDialog *self)
priv = FROGR_ADD_TO_SET_DIALOG_GET_PRIVATE (self);
- for (current = priv->sets; current; current = g_slist_next (current))
+ for (current = priv->photosets; current; current = g_slist_next (current))
{
- if (!FROGR_IS_SET (current->data))
+ if (!FROGR_IS_PHOTOSET (current->data))
continue;
set = FROGR_PHOTOSET (current->data);
@@ -269,7 +269,7 @@ _fill_dialog_with_data (FrogrAddToSetDialog *self)
gint n_pictures;
priv = FROGR_ADD_TO_SET_DIALOG_GET_PRIVATE (self);
- n_sets = g_slist_length (priv->sets);
+ n_sets = g_slist_length (priv->photosets);
n_pictures = g_slist_length (priv->pictures);
/* No sets, nothing to do */
@@ -292,7 +292,7 @@ _fill_dialog_with_data (FrogrAddToSetDialog *self)
FrogrPicture *picture = NULL;
picture = FROGR_PICTURE (p_item->data);
- if (!frogr_picture_in_set (picture, set))
+ if (!frogr_picture_in_photoset (picture, set))
{
do_check = FALSE;
break;
@@ -331,7 +331,7 @@ _set_toggled_cb (GtkCellRendererToggle *celltoggle,
}
static GSList *
-_get_selected_sets (FrogrAddToSetDialog *self)
+_get_selected_photosets (FrogrAddToSetDialog *self)
{
FrogrAddToSetDialogPrivate *priv = NULL;
GtkTreeIter iter;
@@ -342,7 +342,7 @@ _get_selected_sets (FrogrAddToSetDialog *self)
priv = FROGR_ADD_TO_SET_DIALOG_GET_PRIVATE (self);
/* No sets, nothing to do */
- if (g_slist_length (priv->sets) == 0)
+ if (g_slist_length (priv->photosets) == 0)
return NULL;
/* Iterate over all the items */
@@ -357,7 +357,7 @@ _get_selected_sets (FrogrAddToSetDialog *self)
gtk_tree_model_get (GTK_TREE_MODEL (priv->treemodel), &iter,
SET_COL, &set, -1);
- if (FROGR_IS_SET (set))
+ if (FROGR_IS_PHOTOSET (set))
{
selected_sets = g_slist_append (selected_sets, set);
g_object_ref (set);
@@ -378,11 +378,11 @@ _update_pictures (FrogrAddToSetDialog *self)
priv = FROGR_ADD_TO_SET_DIALOG_GET_PRIVATE (self);
- selected_sets = _get_selected_sets (self);
+ selected_sets = _get_selected_photosets (self);
for (item = priv->pictures; item; item = g_slist_next (item))
{
picture = FROGR_PICTURE (item->data);
- frogr_picture_set_sets (picture, selected_sets);
+ frogr_picture_set_photosets (picture, selected_sets);
}
g_slist_foreach (selected_sets, (GFunc)g_object_unref, NULL);
@@ -417,8 +417,8 @@ _frogr_add_to_set_dialog_set_property (GObject *object,
case PROP_PICTURES:
priv->pictures = (GSList *) g_value_get_pointer (value);
break;
- case PROP_SETS:
- priv->sets = (GSList *) g_value_get_pointer (value);
+ case PROP_PHOTOSETS:
+ priv->photosets = (GSList *) g_value_get_pointer (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -439,8 +439,8 @@ _frogr_add_to_set_dialog_get_property (GObject *object,
case PROP_PICTURES:
g_value_set_pointer (value, priv->pictures);
break;
- case PROP_SETS:
- g_value_set_pointer (value, priv->sets);
+ case PROP_PHOTOSETS:
+ g_value_set_pointer (value, priv->photosets);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -460,8 +460,8 @@ _frogr_add_to_set_dialog_dispose (GObject *object)
priv->pictures = NULL;
}
- if (priv->sets)
- priv->sets = NULL;
+ if (priv->photosets)
+ priv->photosets = NULL;
if (priv->treemodel)
{
@@ -492,13 +492,13 @@ frogr_add_to_set_dialog_class_init (FrogrAddToSetDialogClass *klass)
| G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property (obj_class, PROP_PICTURES, pspec);
- pspec = g_param_spec_pointer ("sets",
- "sets",
+ pspec = g_param_spec_pointer ("photosets",
+ "photosets",
"List of sets currently available "
"for the 'add to set' dialog",
G_PARAM_READWRITE
| G_PARAM_CONSTRUCT_ONLY);
- g_object_class_install_property (obj_class, PROP_SETS, pspec);
+ g_object_class_install_property (obj_class, PROP_PHOTOSETS, pspec);
g_type_class_add_private (obj_class, sizeof (FrogrAddToSetDialogPrivate));
}
@@ -512,7 +512,7 @@ frogr_add_to_set_dialog_init (FrogrAddToSetDialog *self)
priv = FROGR_ADD_TO_SET_DIALOG_GET_PRIVATE (self);
priv->pictures = NULL;
- priv->sets = NULL;
+ priv->photosets = NULL;
/* Create widgets */
gtk_dialog_add_buttons (GTK_DIALOG (self),
@@ -559,7 +559,7 @@ frogr_add_to_set_dialog_init (FrogrAddToSetDialog *self)
/* Public API */
void
-frogr_add_to_set_dialog_show (GtkWindow *parent, GSList *pictures, GSList *sets)
+frogr_add_to_set_dialog_show (GtkWindow *parent, GSList *pictures, GSList *photosets)
{
FrogrAddToSetDialog *self = NULL;
GObject *new = NULL;
@@ -568,14 +568,14 @@ frogr_add_to_set_dialog_show (GtkWindow *parent, GSList *pictures, GSList *sets)
"title", _("Add to Sets"),
"modal", TRUE,
"pictures", pictures,
- "sets", sets,
+ "photosets", photosets,
"transient-for", parent,
"resizable", TRUE,
NULL);
self = FROGR_ADD_TO_SET_DIALOG (new);
- _populate_treemodel_with_sets (self);
+ _populate_treemodel_with_photosets (self);
_fill_dialog_with_data (self);
gtk_widget_show_all (GTK_WIDGET (self));
diff --git a/src/frogr-add-to-set-dialog.h b/src/frogr-add-to-set-dialog.h
index 179119f..4286dec 100644
--- a/src/frogr-add-to-set-dialog.h
+++ b/src/frogr-add-to-set-dialog.h
@@ -49,7 +49,7 @@ GType frogr_add_to_set_dialog_get_type (void) G_GNUC_CONST;
void frogr_add_to_set_dialog_show (GtkWindow *parent,
GSList *pictures,
- GSList *sets);
+ GSList *photosets);
G_END_DECLS /* FROGR_ADD_TO_SET_DIALOG_H */
diff --git a/src/frogr-controller.c b/src/frogr-controller.c
index d578ed7..0bf4ce1 100644
--- a/src/frogr-controller.c
+++ b/src/frogr-controller.c
@@ -76,7 +76,7 @@ struct _FrogrControllerPrivate
gboolean fetching_auth_token;
gboolean fetching_account_info;
gboolean fetching_account_extra_info;
- gboolean fetching_sets;
+ gboolean fetching_photosets;
gboolean fetching_groups;
gboolean fetching_tags;
gboolean setting_license;
@@ -86,7 +86,7 @@ struct _FrogrControllerPrivate
gboolean account_info_fetched;
gboolean account_extra_info_fetched;
- gboolean sets_fetched;
+ gboolean photosets_fetched;
gboolean groups_fetched;
gboolean tags_fetched;
};
@@ -111,7 +111,7 @@ static FrogrController *_instance = NULL;
typedef struct {
FrogrController *controller;
FrogrPicture *picture;
- GSList *sets;
+ GSList *photosets;
GSList *groups;
FrogrPictureUploadedCallback callback;
GObject *object;
@@ -124,7 +124,7 @@ typedef enum {
FETCHING_AUTH_TOKEN,
FETCHING_ACCOUNT_INFO,
FETCHING_ACCOUNT_EXTRA_INFO,
- FETCHING_SETS,
+ FETCHING_PHOTOSETS,
FETCHING_GROUPS,
FETCHING_TAGS
} FetchingActivity;
@@ -209,9 +209,9 @@ static void _on_pictures_uploaded (FrogrController *self,
static void _fetch_everything (FrogrController *self, gboolean force_fetch);
-static void _fetch_sets (FrogrController *self);
+static void _fetch_photosets (FrogrController *self);
-static void _fetch_sets_cb (GObject *object, GAsyncResult *res, gpointer data);
+static void _fetch_photosets_cb (GObject *object, GAsyncResult *res, gpointer data);
static void _fetch_groups (FrogrController *self);
@@ -546,7 +546,7 @@ _upload_picture (FrogrController *self, FrogrPicture *picture,
up_st = g_slice_new0 (upload_picture_st);
up_st->controller = self;
up_st->picture = picture;
- up_st->sets = NULL;
+ up_st->photosets = NULL;
up_st->groups = NULL;
up_st->callback = picture_uploaded_cb;
up_st->object = object;
@@ -616,12 +616,12 @@ _upload_picture_cb (GObject *object, GAsyncResult *res, gpointer data)
picture or to add the picture to sets or groups */
if (!error)
{
- GSList *sets = NULL;
+ GSList *photosets = NULL;
GSList *groups = NULL;
FspLicense license = FSP_LICENSE_NONE;
license = frogr_picture_get_license (picture);
- sets = frogr_picture_get_sets (picture);
+ photosets = frogr_picture_get_photosets (picture);
groups = frogr_picture_get_groups (picture);
/* Set license if needed */
@@ -645,10 +645,10 @@ _upload_picture_cb (GObject *object, GAsyncResult *res, gpointer data)
}
/* Add picture to set if needed (and maybe create a new one) */
- if (g_slist_length (sets) > 0)
+ if (g_slist_length (photosets) > 0)
{
priv->adding_to_set = TRUE;
- up_st->sets = sets;
+ up_st->photosets = photosets;
gdk_threads_add_timeout (DEFAULT_TIMEOUT, _create_set_or_add_picture_on_idle, up_st);
}
@@ -782,17 +782,17 @@ _create_set_or_add_picture (FrogrController *self,
FrogrControllerPrivate *priv = NULL;
FrogrPhotoSet *set = NULL;
const gchar *id = NULL;
- GSList *sets = NULL;
+ GSList *photosets = NULL;
- sets = up_st->sets;
+ photosets = up_st->photosets;
priv = FROGR_CONTROLLER_GET_PRIVATE (self);
- if (g_slist_length (sets) == 0)
+ if (g_slist_length (photosets) == 0)
{
priv->adding_to_set = FALSE;
return FALSE;
}
- set = FROGR_PHOTOSET (sets->data);
+ set = FROGR_PHOTOSET (photosets->data);
id = frogr_photoset_get_id (set);
if (id != NULL)
{
@@ -830,7 +830,7 @@ _create_photoset_cb (GObject *object, GAsyncResult *res, gpointer data)
FrogrControllerPrivate *priv = NULL;
FrogrPicture *picture = NULL;
FrogrPhotoSet *set = NULL;
- GSList *sets = NULL;
+ GSList *photosets = NULL;
gchar *photoset_id = NULL;
GError *error = NULL;
gboolean keep_going = FALSE;
@@ -839,21 +839,21 @@ _create_photoset_cb (GObject *object, GAsyncResult *res, gpointer data)
up_st = (upload_picture_st*) data;
controller = up_st->controller;
picture = up_st->picture;
- sets = up_st->sets;
+ photosets = up_st->photosets;
photoset_id = fsp_session_create_photoset_finish (session, res, &error);
up_st->error = error;
/* Update set with the new ID */
- set = FROGR_PHOTOSET (sets->data);
+ set = FROGR_PHOTOSET (photosets->data);
frogr_photoset_set_id (set, photoset_id);
g_free (photoset_id);
priv = FROGR_CONTROLLER_GET_PRIVATE (controller);
- up_st->sets = g_slist_next (sets);
+ up_st->photosets = g_slist_next (photosets);
- /* When adding pictures to sets, we only stop if the process was
- not explicitly cancelled by the user */
+ /* When adding pictures to photosets, we only stop if the process
+ was not explicitly cancelled by the user */
if (!error || error->code != FSP_ERROR_CANCELLED)
keep_going = _create_set_or_add_picture (controller, picture, up_st);
@@ -884,7 +884,7 @@ _add_to_photoset_cb (GObject *object, GAsyncResult *res, gpointer data)
FrogrControllerPrivate *priv = NULL;
FrogrPicture *picture = NULL;
FrogrPhotoSet *set = NULL;
- GSList *sets = NULL;
+ GSList *photosets = NULL;
GError *error = NULL;
gboolean keep_going = FALSE;
@@ -892,18 +892,18 @@ _add_to_photoset_cb (GObject *object, GAsyncResult *res, gpointer data)
up_st = (upload_picture_st*) data;
controller = up_st->controller;
picture = up_st->picture;
- sets = up_st->sets;
+ photosets = up_st->photosets;
fsp_session_add_to_photoset_finish (session, res, &error);
up_st->error = error;
priv = FROGR_CONTROLLER_GET_PRIVATE (controller);
- set = FROGR_PHOTOSET (sets->data);
- up_st->sets = g_slist_next (sets);
+ set = FROGR_PHOTOSET (photosets->data);
+ up_st->photosets = g_slist_next (photosets);
- /* When adding pictures to sets, we only stop if the process was
- not explicitly cancelled by the user */
+ /* When adding pictures to photosets, we only stop if the process
+ was not explicitly cancelled by the user */
if (!error || error->code != FSP_ERROR_CANCELLED)
keep_going = _create_set_or_add_picture (controller, picture, up_st);
@@ -1270,7 +1270,7 @@ _on_pictures_uploaded (FrogrController *self,
if (!error)
{
/* Fetch sets and tags (if needed) right after finishing */
- _fetch_sets (self);
+ _fetch_photosets (self);
_fetch_tags (self);
DEBUG ("%s", "Success uploading pictures!");
@@ -1306,8 +1306,8 @@ _fetch_everything (FrogrController *self, gboolean force_fetch)
/* Sets, groups and tags can take much longer to retrieve, so we
only retrieve that if actually needed (or asked to) */
- if (force_fetch || !priv->sets_fetched)
- _fetch_sets (self);
+ if (force_fetch || !priv->photosets_fetched)
+ _fetch_photosets (self);
if (force_fetch || !priv->groups_fetched)
_fetch_groups (self);
if (force_fetch || !priv->tags_fetched)
@@ -1315,7 +1315,7 @@ _fetch_everything (FrogrController *self, gboolean force_fetch)
}
static void
-_fetch_sets (FrogrController *self)
+_fetch_photosets (FrogrController *self)
{
FrogrControllerPrivate *priv = NULL;
@@ -1325,16 +1325,16 @@ _fetch_sets (FrogrController *self)
return;
priv = FROGR_CONTROLLER_GET_PRIVATE (self);
- priv->sets_fetched = FALSE;
- priv->fetching_sets = TRUE;
+ priv->photosets_fetched = FALSE;
+ priv->fetching_photosets = TRUE;
_enable_cancellable (self, TRUE);
fsp_session_get_photosets_async (priv->session, priv->last_cancellable,
- _fetch_sets_cb, self);
+ _fetch_photosets_cb, self);
}
static void
-_fetch_sets_cb (GObject *object, GAsyncResult *res, gpointer data)
+_fetch_photosets_cb (GObject *object, GAsyncResult *res, gpointer data)
{
FspSession *session = NULL;
FrogrController *controller = NULL;
@@ -1358,13 +1358,13 @@ _fetch_sets_cb (GObject *object, GAsyncResult *res, gpointer data)
/* If no photosets are found is a valid outcome */
if (error->code == FSP_ERROR_MISSING_DATA)
- priv->sets_fetched = TRUE;
+ priv->photosets_fetched = TRUE;
g_error_free (error);
}
else
{
- priv->sets_fetched = TRUE;
+ priv->photosets_fetched = TRUE;
if (data_sets_list)
{
@@ -1391,9 +1391,9 @@ _fetch_sets_cb (GObject *object, GAsyncResult *res, gpointer data)
/* Update main view's model */
mainview_model = frogr_main_view_get_model (priv->mainview);
- frogr_main_view_model_set_sets (mainview_model, sets_list);
+ frogr_main_view_model_set_photosets (mainview_model, sets_list);
- priv->fetching_sets = FALSE;
+ priv->fetching_photosets = FALSE;
}
static void
@@ -1719,7 +1719,7 @@ _show_progress_on_idle (gpointer data)
show_dialog = priv->fetching_auth_token;
break;
- case FETCHING_SETS:
+ case FETCHING_PHOTOSETS:
text = _("Retrieving list of setsâ");
show_dialog = priv->fetching_tags;
break;
@@ -1818,23 +1818,23 @@ _show_create_new_set_dialog_on_idle (GSList *pictures)
FrogrMainView *mainview = NULL;
FrogrMainViewModel *mainview_model = NULL;
GtkWindow *window = NULL;
- GSList *sets = NULL;
+ GSList *photosets = NULL;
controller = frogr_controller_get_instance ();
priv = FROGR_CONTROLLER_GET_PRIVATE (controller);
mainview = priv->mainview;
/* Keep the source while internally busy */
- if (priv->fetching_sets)
+ if (priv->fetching_photosets)
return TRUE;
frogr_main_view_hide_progress (mainview);
mainview_model = frogr_main_view_get_model (priv->mainview);
- sets = frogr_main_view_model_get_sets (mainview_model);
+ photosets = frogr_main_view_model_get_photosets (mainview_model);
window = frogr_main_view_get_window (priv->mainview);
- frogr_create_new_set_dialog_show (window, pictures, sets);
+ frogr_create_new_set_dialog_show (window, pictures, photosets);
return FALSE;
}
@@ -1847,25 +1847,25 @@ _show_add_to_set_dialog_on_idle (GSList *pictures)
FrogrMainView *mainview = NULL;
FrogrMainViewModel *mainview_model = NULL;
GtkWindow *window = NULL;
- GSList *sets = NULL;
+ GSList *photosets = NULL;
controller = frogr_controller_get_instance ();
priv = FROGR_CONTROLLER_GET_PRIVATE (controller);
mainview = priv->mainview;
/* Keep the source while internally busy */
- if (priv->fetching_sets)
+ if (priv->fetching_photosets)
return TRUE;
frogr_main_view_hide_progress (mainview);
mainview_model = frogr_main_view_get_model (priv->mainview);
- sets = frogr_main_view_model_get_sets (mainview_model);
+ photosets = frogr_main_view_model_get_photosets (mainview_model);
window = frogr_main_view_get_window (priv->mainview);
- if (frogr_main_view_model_n_sets (mainview_model) > 0)
- frogr_add_to_set_dialog_show (window, pictures, sets);
- else if (priv->sets_fetched)
+ if (frogr_main_view_model_n_photosets (mainview_model) > 0)
+ frogr_add_to_set_dialog_show (window, pictures, photosets);
+ else if (priv->photosets_fetched)
frogr_util_show_info_dialog (window, _("No sets found"));
return FALSE;
@@ -2050,7 +2050,7 @@ frogr_controller_init (FrogrController *self)
priv->fetching_auth_token = FALSE;
priv->fetching_account_info = FALSE;
priv->fetching_account_extra_info = FALSE;
- priv->fetching_sets = FALSE;
+ priv->fetching_photosets = FALSE;
priv->fetching_groups = FALSE;
priv->fetching_tags = FALSE;
priv->setting_license = FALSE;
@@ -2059,7 +2059,7 @@ frogr_controller_init (FrogrController *self)
priv->adding_to_group = FALSE;
priv->account_info_fetched = FALSE;
priv->account_extra_info_fetched = FALSE;
- priv->sets_fetched = FALSE;
+ priv->photosets_fetched = FALSE;
priv->groups_fetched = FALSE;
priv->tags_fetched = FALSE;
@@ -2428,11 +2428,11 @@ frogr_controller_show_create_new_set_dialog (FrogrController *self,
priv = FROGR_CONTROLLER_GET_PRIVATE (self);
/* Fetch the sets first if needed */
- if (!priv->sets_fetched)
+ if (!priv->photosets_fetched)
{
- gdk_threads_add_timeout (DEFAULT_TIMEOUT, (GSourceFunc) _show_progress_on_idle, GINT_TO_POINTER (FETCHING_SETS));
- if (!priv->fetching_sets)
- _fetch_sets (self);
+ gdk_threads_add_timeout (DEFAULT_TIMEOUT, (GSourceFunc) _show_progress_on_idle, GINT_TO_POINTER (FETCHING_PHOTOSETS));
+ if (!priv->fetching_photosets)
+ _fetch_photosets (self);
}
/* Show the dialog when possible */
@@ -2450,11 +2450,11 @@ frogr_controller_show_add_to_set_dialog (FrogrController *self,
priv = FROGR_CONTROLLER_GET_PRIVATE (self);
/* Fetch the sets first if needed */
- if (!priv->sets_fetched)
+ if (!priv->photosets_fetched)
{
- gdk_threads_add_timeout (DEFAULT_TIMEOUT, (GSourceFunc) _show_progress_on_idle, GINT_TO_POINTER (FETCHING_SETS));
- if (!priv->fetching_sets)
- _fetch_sets (self);
+ gdk_threads_add_timeout (DEFAULT_TIMEOUT, (GSourceFunc) _show_progress_on_idle, GINT_TO_POINTER (FETCHING_PHOTOSETS));
+ if (!priv->fetching_photosets)
+ _fetch_photosets (self);
}
/* Show the dialog when possible */
diff --git a/src/frogr-create-new-set-dialog.c b/src/frogr-create-new-set-dialog.c
index e4d4bc7..8ad08ea 100644
--- a/src/frogr-create-new-set-dialog.c
+++ b/src/frogr-create-new-set-dialog.c
@@ -44,7 +44,7 @@ typedef struct _FrogrCreateNewSetDialogPrivate {
GtkTextBuffer *description_buffer;
GSList *pictures;
- GSList *sets;
+ GSList *photosets;
gboolean copy_to_pictures;
} FrogrCreateNewSetDialogPrivate;
@@ -52,7 +52,7 @@ typedef struct _FrogrCreateNewSetDialogPrivate {
enum {
PROP_0,
PROP_PICTURES,
- PROP_SETS
+ PROP_PHOTOSETS
};
@@ -162,13 +162,13 @@ _update_model (FrogrCreateNewSetDialog *self,
/* Add the set to the model */
new_set = frogr_photoset_new (title, description);
- frogr_main_view_model_add_set (mainview_model, new_set);
+ frogr_main_view_model_add_photoset (mainview_model, new_set);
/* Add the set to the list of sets for each picture */
for (item = priv->pictures; item; item = g_slist_next (item))
{
picture = FROGR_PICTURE (item->data);
- frogr_picture_add_set (picture, new_set);
+ frogr_picture_add_photoset (picture, new_set);
/* Copy album's details over pictures if requested */
if (priv->copy_to_pictures)
@@ -210,8 +210,8 @@ _frogr_create_new_set_dialog_set_property (GObject *object,
case PROP_PICTURES:
priv->pictures = (GSList *) g_value_get_pointer (value);
break;
- case PROP_SETS:
- priv->sets = (GSList *) g_value_get_pointer (value);
+ case PROP_PHOTOSETS:
+ priv->photosets = (GSList *) g_value_get_pointer (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -232,8 +232,8 @@ _frogr_create_new_set_dialog_get_property (GObject *object,
case PROP_PICTURES:
g_value_set_pointer (value, priv->pictures);
break;
- case PROP_SETS:
- g_value_set_pointer (value, priv->sets);
+ case PROP_PHOTOSETS:
+ g_value_set_pointer (value, priv->photosets);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -253,8 +253,8 @@ _frogr_create_new_set_dialog_dispose (GObject *object)
priv->pictures = NULL;
}
- if (priv->sets)
- priv->sets = NULL;
+ if (priv->photosets)
+ priv->photosets = NULL;
G_OBJECT_CLASS(frogr_create_new_set_dialog_parent_class)->dispose (object);
}
@@ -279,13 +279,13 @@ frogr_create_new_set_dialog_class_init (FrogrCreateNewSetDialogClass *klass)
| G_PARAM_CONSTRUCT_ONLY);
g_object_class_install_property (obj_class, PROP_PICTURES, pspec);
- pspec = g_param_spec_pointer ("sets",
- "sets",
+ pspec = g_param_spec_pointer ("photosets",
+ "photosets",
"List of sets currently available "
"for the 'add to set' dialog",
G_PARAM_READWRITE
| G_PARAM_CONSTRUCT_ONLY);
- g_object_class_install_property (obj_class, PROP_SETS, pspec);
+ g_object_class_install_property (obj_class, PROP_PHOTOSETS, pspec);
g_type_class_add_private (obj_class, sizeof (FrogrCreateNewSetDialogPrivate));
}
@@ -302,7 +302,7 @@ frogr_create_new_set_dialog_init (FrogrCreateNewSetDialog *self)
priv = FROGR_CREATE_NEW_SET_DIALOG_GET_PRIVATE (self);
priv->pictures = NULL;
- priv->sets = NULL;
+ priv->photosets = NULL;
/* Create widgets */
gtk_dialog_add_buttons (GTK_DIALOG (self),
@@ -371,14 +371,14 @@ frogr_create_new_set_dialog_init (FrogrCreateNewSetDialog *self)
/* Public API */
void
-frogr_create_new_set_dialog_show (GtkWindow *parent, GSList *pictures, GSList *sets)
+frogr_create_new_set_dialog_show (GtkWindow *parent, GSList *pictures, GSList *photosets)
{
GtkWidget *dialog = NULL;
dialog = GTK_WIDGET (g_object_new (FROGR_TYPE_CREATE_NEW_SET_DIALOG,
"title", _("Create new Set"),
"modal", TRUE,
"pictures", pictures,
- "sets", sets,
+ "photosets", photosets,
"transient-for", parent,
"width-request", -1,
"height-request", 300,
diff --git a/src/frogr-create-new-set-dialog.h b/src/frogr-create-new-set-dialog.h
index 70bd07f..714f4fb 100644
--- a/src/frogr-create-new-set-dialog.h
+++ b/src/frogr-create-new-set-dialog.h
@@ -49,7 +49,7 @@ GType frogr_create_new_set_dialog_get_type (void) G_GNUC_CONST;
void frogr_create_new_set_dialog_show (GtkWindow *parent,
GSList *pictures,
- GSList *sets);
+ GSList *photosets);
G_END_DECLS /* FROGR_CREATE_NEW_SET_DIALOG_H */
diff --git a/src/frogr-main-view-model.c b/src/frogr-main-view-model.c
index a1c11ce..90ca404 100644
--- a/src/frogr-main-view-model.c
+++ b/src/frogr-main-view-model.c
@@ -39,8 +39,8 @@ struct _FrogrMainViewModelPrivate
GSList *pictures_list_as_loaded;
guint n_pictures;
- GSList *sets_list;
- guint n_sets;
+ GSList *photosets_list;
+ guint n_photosets;
GSList *groups_list;
guint n_groups;
@@ -141,11 +141,11 @@ _frogr_main_view_model_dispose (GObject* object)
priv->pictures_list_as_loaded = NULL;
}
- if (priv->sets_list)
+ if (priv->photosets_list)
{
- g_slist_foreach (priv->sets_list, (GFunc)g_object_unref, NULL);
- g_slist_free (priv->sets_list);
- priv->sets_list = NULL;
+ g_slist_foreach (priv->photosets_list, (GFunc)g_object_unref, NULL);
+ g_slist_free (priv->photosets_list);
+ priv->photosets_list = NULL;
}
if (priv->groups_list)
@@ -209,8 +209,8 @@ frogr_main_view_model_init (FrogrMainViewModel *self)
priv->pictures_list_as_loaded = NULL;
priv->n_pictures = 0;
- priv->sets_list = NULL;
- priv->n_sets = 0;
+ priv->photosets_list = NULL;
+ priv->n_photosets = 0;
priv->groups_list = NULL;
priv->n_groups = 0;
@@ -344,38 +344,38 @@ frogr_main_view_model_reorder_pictures (FrogrMainViewModel *self,
}
void
-frogr_main_view_model_add_set (FrogrMainViewModel *self,
- FrogrPhotoSet *set)
+frogr_main_view_model_add_photoset (FrogrMainViewModel *self,
+ FrogrPhotoSet *set)
{
FrogrMainViewModelPrivate *priv = NULL;
g_return_if_fail(FROGR_IS_MAIN_VIEW_MODEL (self));
- g_return_if_fail(FROGR_IS_SET (set));
+ g_return_if_fail(FROGR_IS_PHOTOSET (set));
/* When adding one by one we prepend always to keep the order */
priv = FROGR_MAIN_VIEW_MODEL_GET_PRIVATE (self);
- priv->sets_list = g_slist_prepend (priv->sets_list, set);
- priv->n_sets++;
+ priv->photosets_list = g_slist_prepend (priv->photosets_list, set);
+ priv->n_photosets++;
g_object_ref (set);
}
void
-frogr_main_view_model_remove_set (FrogrMainViewModel *self,
- FrogrPhotoSet *set)
+frogr_main_view_model_remove_photoset (FrogrMainViewModel *self,
+ FrogrPhotoSet *set)
{
FrogrMainViewModelPrivate *priv = NULL;
g_return_if_fail(FROGR_IS_MAIN_VIEW_MODEL (self));
priv = FROGR_MAIN_VIEW_MODEL_GET_PRIVATE (self);
- priv->sets_list = g_slist_remove (priv->sets_list, set);
- priv->n_sets--;
+ priv->photosets_list = g_slist_remove (priv->photosets_list, set);
+ priv->n_photosets--;
g_object_unref (set);
}
void
-frogr_main_view_model_remove_all_sets (FrogrMainViewModel *self)
+frogr_main_view_model_remove_all_photosets (FrogrMainViewModel *self)
{
FrogrMainViewModelPrivate *priv = NULL;
@@ -383,38 +383,38 @@ frogr_main_view_model_remove_all_sets (FrogrMainViewModel *self)
priv = FROGR_MAIN_VIEW_MODEL_GET_PRIVATE (self);
- g_slist_foreach (priv->sets_list, (GFunc)g_object_unref, NULL);
- g_slist_free (priv->sets_list);
+ g_slist_foreach (priv->photosets_list, (GFunc)g_object_unref, NULL);
+ g_slist_free (priv->photosets_list);
- priv->sets_list = NULL;
- priv->n_sets = 0;
+ priv->photosets_list = NULL;
+ priv->n_photosets = 0;
}
guint
-frogr_main_view_model_n_sets (FrogrMainViewModel *self)
+frogr_main_view_model_n_photosets (FrogrMainViewModel *self)
{
FrogrMainViewModelPrivate *priv = NULL;
g_return_val_if_fail(FROGR_IS_MAIN_VIEW_MODEL (self), 0);
priv = FROGR_MAIN_VIEW_MODEL_GET_PRIVATE (self);
- return priv->n_sets;
+ return priv->n_photosets;
}
GSList *
-frogr_main_view_model_get_sets (FrogrMainViewModel *self)
+frogr_main_view_model_get_photosets (FrogrMainViewModel *self)
{
FrogrMainViewModelPrivate *priv = NULL;
g_return_val_if_fail(FROGR_IS_MAIN_VIEW_MODEL (self), NULL);
priv = FROGR_MAIN_VIEW_MODEL_GET_PRIVATE (self);
- return priv->sets_list;
+ return priv->photosets_list;
}
void
-frogr_main_view_model_set_sets (FrogrMainViewModel *self,
- GSList *sets_list)
+frogr_main_view_model_set_photosets (FrogrMainViewModel *self,
+ GSList *photosets_list)
{
FrogrMainViewModelPrivate *priv = NULL;
FrogrPicture *picture = NULL;
@@ -424,19 +424,19 @@ frogr_main_view_model_set_sets (FrogrMainViewModel *self,
priv = FROGR_MAIN_VIEW_MODEL_GET_PRIVATE (self);
- /* Remove all sets attached to every picture */
+ /* Remove all photosets attached to every picture */
for (item = priv->pictures_list; item; item = g_slist_next (item))
{
picture = FROGR_PICTURE (item->data);
- frogr_picture_remove_sets (picture);
+ frogr_picture_remove_photosets (picture);
}
- /* Remove all the sets */
- frogr_main_view_model_remove_all_sets (self);
+ /* Remove all the photosets */
+ frogr_main_view_model_remove_all_photosets (self);
- /* Set photosets */
- priv->sets_list = sets_list;
- priv->n_sets = g_slist_length (sets_list);
+ /* Set photophotosets */
+ priv->photosets_list = photosets_list;
+ priv->n_photosets = g_slist_length (photosets_list);
}
void
diff --git a/src/frogr-main-view-model.h b/src/frogr-main-view-model.h
index ec69f6a..1a29d19 100644
--- a/src/frogr-main-view-model.h
+++ b/src/frogr-main-view-model.h
@@ -68,18 +68,18 @@ void frogr_main_view_model_reorder_pictures (FrogrMainViewModel *self,
const gchar *property_name,
gboolean reversed);
-void frogr_main_view_model_add_set (FrogrMainViewModel *self,
- FrogrPhotoSet *fset);
-void frogr_main_view_model_remove_set (FrogrMainViewModel *self,
- FrogrPhotoSet *fset);
-void frogr_main_view_model_remove_all_sets (FrogrMainViewModel *self);
+void frogr_main_view_model_add_photoset (FrogrMainViewModel *self,
+ FrogrPhotoSet *fset);
+void frogr_main_view_model_remove_photoset (FrogrMainViewModel *self,
+ FrogrPhotoSet *fset);
+void frogr_main_view_model_remove_all_photosets (FrogrMainViewModel *self);
-guint frogr_main_view_model_n_sets (FrogrMainViewModel *self);
+guint frogr_main_view_model_n_photosets (FrogrMainViewModel *self);
-GSList *frogr_main_view_model_get_sets (FrogrMainViewModel *self);
+GSList *frogr_main_view_model_get_photosets (FrogrMainViewModel *self);
-void frogr_main_view_model_set_sets (FrogrMainViewModel *self,
- GSList *sets_list);
+void frogr_main_view_model_set_photosets (FrogrMainViewModel *self,
+ GSList *photosets_list);
void frogr_main_view_model_add_group (FrogrMainViewModel *self,
FrogrGroup *fgroup);
diff --git a/src/frogr-photoset.c b/src/frogr-photoset.c
index ba2c1b3..398eac0 100644
--- a/src/frogr-photoset.c
+++ b/src/frogr-photoset.c
@@ -22,7 +22,7 @@
#define FROGR_PHOTOSET_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), \
- FROGR_TYPE_SET, \
+ FROGR_TYPE_PHOTOSET, \
FrogrPhotoSetPrivate))
G_DEFINE_TYPE (FrogrPhotoSet, frogr_photoset, G_TYPE_OBJECT)
@@ -208,7 +208,7 @@ frogr_photoset_new (const gchar *title,
g_return_val_if_fail (title, NULL);
g_return_val_if_fail (description, NULL);
- return FROGR_PHOTOSET (g_object_new(FROGR_TYPE_SET,
+ return FROGR_PHOTOSET (g_object_new(FROGR_TYPE_PHOTOSET,
"title", title,
"description", description,
NULL));
@@ -222,7 +222,7 @@ frogr_photoset_get_title (FrogrPhotoSet *self)
{
FrogrPhotoSetPrivate *priv = NULL;
- g_return_val_if_fail(FROGR_IS_SET(self), NULL);
+ g_return_val_if_fail(FROGR_IS_PHOTOSET(self), NULL);
priv = FROGR_PHOTOSET_GET_PRIVATE (self);
return (const gchar *)priv->title;
@@ -234,7 +234,7 @@ frogr_photoset_set_title (FrogrPhotoSet *self,
{
FrogrPhotoSetPrivate *priv = NULL;
- g_return_if_fail(FROGR_IS_SET(self));
+ g_return_if_fail(FROGR_IS_PHOTOSET(self));
g_return_if_fail(title != NULL);
priv = FROGR_PHOTOSET_GET_PRIVATE (self);
@@ -247,7 +247,7 @@ frogr_photoset_get_description (FrogrPhotoSet *self)
{
FrogrPhotoSetPrivate *priv = NULL;
- g_return_val_if_fail(FROGR_IS_SET(self), NULL);
+ g_return_val_if_fail(FROGR_IS_PHOTOSET(self), NULL);
priv = FROGR_PHOTOSET_GET_PRIVATE (self);
return (const gchar *)priv->description;
@@ -259,7 +259,7 @@ frogr_photoset_set_description (FrogrPhotoSet *self,
{
FrogrPhotoSetPrivate *priv = NULL;
- g_return_if_fail(FROGR_IS_SET(self));
+ g_return_if_fail(FROGR_IS_PHOTOSET(self));
priv = FROGR_PHOTOSET_GET_PRIVATE (self);
g_free (priv->description);
@@ -271,7 +271,7 @@ frogr_photoset_get_id (FrogrPhotoSet *self)
{
FrogrPhotoSetPrivate *priv = NULL;
- g_return_val_if_fail(FROGR_IS_SET(self), NULL);
+ g_return_val_if_fail(FROGR_IS_PHOTOSET(self), NULL);
priv = FROGR_PHOTOSET_GET_PRIVATE (self);
return (const gchar *)priv->id;
@@ -283,7 +283,7 @@ frogr_photoset_set_id (FrogrPhotoSet *self,
{
FrogrPhotoSetPrivate *priv = NULL;
- g_return_if_fail(FROGR_IS_SET(self));
+ g_return_if_fail(FROGR_IS_PHOTOSET(self));
priv = FROGR_PHOTOSET_GET_PRIVATE (self);
g_free (priv->id);
@@ -295,7 +295,7 @@ frogr_photoset_get_primary_photo_id (FrogrPhotoSet *self)
{
FrogrPhotoSetPrivate *priv = NULL;
- g_return_val_if_fail(FROGR_IS_SET(self), NULL);
+ g_return_val_if_fail(FROGR_IS_PHOTOSET(self), NULL);
priv = FROGR_PHOTOSET_GET_PRIVATE (self);
return (const gchar *)priv->primary_photo_id;
@@ -307,7 +307,7 @@ frogr_photoset_set_primary_photo_id (FrogrPhotoSet *self,
{
FrogrPhotoSetPrivate *priv = NULL;
- g_return_if_fail(FROGR_IS_SET(self));
+ g_return_if_fail(FROGR_IS_PHOTOSET(self));
priv = FROGR_PHOTOSET_GET_PRIVATE (self);
g_free (priv->primary_photo_id);
@@ -319,7 +319,7 @@ frogr_photoset_get_n_photos (FrogrPhotoSet *self)
{
FrogrPhotoSetPrivate *priv = NULL;
- g_return_val_if_fail(FROGR_IS_SET(self), FALSE);
+ g_return_val_if_fail(FROGR_IS_PHOTOSET(self), FALSE);
priv = FROGR_PHOTOSET_GET_PRIVATE (self);
return priv->n_photos;
@@ -331,7 +331,7 @@ frogr_photoset_set_n_photos (FrogrPhotoSet *self,
{
FrogrPhotoSetPrivate *priv = NULL;
- g_return_if_fail(FROGR_IS_SET(self));
+ g_return_if_fail(FROGR_IS_PHOTOSET(self));
priv = FROGR_PHOTOSET_GET_PRIVATE (self);
priv->n_photos = n;
diff --git a/src/frogr-photoset.h b/src/frogr-photoset.h
index 598390b..61f0ab1 100644
--- a/src/frogr-photoset.h
+++ b/src/frogr-photoset.h
@@ -26,12 +26,12 @@
G_BEGIN_DECLS
-#define FROGR_TYPE_SET (frogr_photoset_get_type())
-#define FROGR_PHOTOSET(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, FROGR_TYPE_SET, FrogrPhotoSet))
-#define FROGR_PHOTOSET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST(klass, FROGR_TYPE_SET, FrogrPhotoSetClass))
-#define FROGR_IS_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, FROGR_TYPE_SET))
-#define FROGR_IS_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), FROGR_TYPE_SET))
-#define FROGR_PHOTOSET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FROGR_TYPE_SET, FrogrPhotoSetClass))
+#define FROGR_TYPE_PHOTOSET (frogr_photoset_get_type())
+#define FROGR_PHOTOSET(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, FROGR_TYPE_PHOTOSET, FrogrPhotoSet))
+#define FROGR_PHOTOSET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST(klass, FROGR_TYPE_PHOTOSET, FrogrPhotoSetClass))
+#define FROGR_IS_PHOTOSET(obj) (G_TYPE_CHECK_INSTANCE_TYPE(obj, FROGR_TYPE_PHOTOSET))
+#define FROGR_IS_PHOTOSET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), FROGR_TYPE_PHOTOSET))
+#define FROGR_PHOTOSET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FROGR_TYPE_PHOTOSET, FrogrPhotoSetClass))
typedef struct _FrogrPhotoSet FrogrPhotoSet;
typedef struct _FrogrPhotoSetClass FrogrPhotoSetClass;
diff --git a/src/frogr-picture.c b/src/frogr-picture.c
index 2367ab4..d512a00 100644
--- a/src/frogr-picture.c
+++ b/src/frogr-picture.c
@@ -54,7 +54,7 @@ struct _FrogrPicturePrivate
gulong filesize; /* In KB */
gchar *datetime; /* ASCII, locale dependent, string */
- GSList *sets;
+ GSList *photosets;
GSList *groups;
GdkPixbuf *pixbuf;
@@ -84,7 +84,7 @@ enum {
/* Prototypes */
-static gboolean _tag_is_set (FrogrPicture *self, const gchar *tag);
+static gboolean _tag_is_photoset (FrogrPicture *self, const gchar *tag);
static void _add_tags_to_tags_list (FrogrPicture *self,
const gchar *tags_string);
static void _update_tags_string (FrogrPicture *self);
@@ -92,7 +92,7 @@ static void _update_tags_string (FrogrPicture *self);
/* Private API */
static gboolean
-_tag_is_set (FrogrPicture *self, const gchar *tag)
+_tag_is_photoset (FrogrPicture *self, const gchar *tag)
{
FrogrPicturePrivate *priv = FROGR_PICTURE_GET_PRIVATE (self);
GSList *item;
@@ -132,7 +132,7 @@ _add_tags_to_tags_list (FrogrPicture *self,
{
/* add stripped tag if not already set*/
tag = g_strstrip(g_strdup (tags_array[i]));
- if (!g_str_equal (tag, "") && !_tag_is_set (self, tag))
+ if (!g_str_equal (tag, "") && !_tag_is_photoset (self, tag))
priv->tags_list = g_slist_append (priv->tags_list, tag);
}
@@ -333,11 +333,11 @@ _frogr_picture_dispose (GObject* object)
priv->location = NULL;
}
- if (priv->sets)
+ if (priv->photosets)
{
- g_slist_foreach (priv->sets, (GFunc) g_object_unref, NULL);
- g_slist_free (priv->sets);
- priv->sets = NULL;
+ g_slist_foreach (priv->photosets, (GFunc) g_object_unref, NULL);
+ g_slist_free (priv->photosets);
+ priv->photosets = NULL;
}
if (priv->groups)
@@ -558,7 +558,7 @@ frogr_picture_init (FrogrPicture *self)
priv->filesize = 0;
priv->datetime = NULL;
- priv->sets = NULL;
+ priv->photosets = NULL;
priv->groups = NULL;
priv->pixbuf = NULL;
@@ -1019,22 +1019,22 @@ frogr_picture_get_datetime (FrogrPicture *self)
}
GSList *
-frogr_picture_get_sets (FrogrPicture *self)
+frogr_picture_get_photosets (FrogrPicture *self)
{
FrogrPicturePrivate *priv = NULL;
g_return_val_if_fail(FROGR_IS_PICTURE(self), NULL);
priv = FROGR_PICTURE_GET_PRIVATE (self);
- return priv->sets;
+ return priv->photosets;
}
void
-frogr_picture_set_sets (FrogrPicture *self, GSList *sets)
+frogr_picture_set_photosets (FrogrPicture *self, GSList *photosets)
{
GSList *new_list = NULL;
GSList *item = NULL;
- FrogrPhotoSet *set = NULL;
+ FrogrPhotoSet *photoset = NULL;
FrogrPicturePrivate *priv = NULL;
g_return_if_fail(FROGR_IS_PICTURE(self));
@@ -1042,52 +1042,52 @@ frogr_picture_set_sets (FrogrPicture *self, GSList *sets)
priv = FROGR_PICTURE_GET_PRIVATE (self);
/* First remove all the previous sets list */
- g_slist_foreach (priv->sets, (GFunc) g_object_unref, NULL);
- g_slist_free (priv->sets);
- priv->sets = NULL;
+ g_slist_foreach (priv->photosets, (GFunc) g_object_unref, NULL);
+ g_slist_free (priv->photosets);
+ priv->photosets = NULL;
- for (item = sets; item; item = g_slist_next (item))
+ for (item = photosets; item; item = g_slist_next (item))
{
- set = FROGR_PHOTOSET (item->data);
- new_list = g_slist_append (new_list, g_object_ref (set));
+ photoset = FROGR_PHOTOSET (item->data);
+ new_list = g_slist_append (new_list, g_object_ref (photoset));
}
- priv->sets = new_list;
+ priv->photosets = new_list;
}
void
-frogr_picture_add_set (FrogrPicture *self, FrogrPhotoSet *set)
+frogr_picture_add_photoset (FrogrPicture *self, FrogrPhotoSet *photoset)
{
FrogrPicturePrivate *priv = NULL;
g_return_if_fail(FROGR_IS_PICTURE(self));
- g_return_if_fail(FROGR_IS_SET(set));
+ g_return_if_fail(FROGR_IS_PHOTOSET(photoset));
/* Do not add the same set twice */
- if (frogr_picture_in_set (self, set))
+ if (frogr_picture_in_photoset (self, photoset))
return;
priv = FROGR_PICTURE_GET_PRIVATE (self);
- priv->sets = g_slist_append (priv->sets, g_object_ref (set));
+ priv->photosets = g_slist_append (priv->photosets, g_object_ref (photoset));
}
void
-frogr_picture_remove_sets (FrogrPicture *self)
+frogr_picture_remove_photosets (FrogrPicture *self)
{
g_return_if_fail(FROGR_IS_PICTURE(self));
- frogr_picture_set_sets (self, NULL);
+ frogr_picture_set_photosets (self, NULL);
}
gboolean
-frogr_picture_in_set (FrogrPicture *self, FrogrPhotoSet *set)
+frogr_picture_in_photoset (FrogrPicture *self, FrogrPhotoSet *photoset)
{
FrogrPicturePrivate *priv = NULL;
g_return_val_if_fail(FROGR_IS_PICTURE(self), FALSE);
priv = FROGR_PICTURE_GET_PRIVATE (self);
- if (g_slist_index (priv->sets, set) != -1)
+ if (g_slist_index (priv->photosets, photoset) != -1)
return TRUE;
return FALSE;
diff --git a/src/frogr-picture.h b/src/frogr-picture.h
index 04bad59..0771d95 100644
--- a/src/frogr-picture.h
+++ b/src/frogr-picture.h
@@ -127,11 +127,11 @@ void frogr_picture_set_filesize (FrogrPicture *self, gulong filesize);
void frogr_picture_set_datetime (FrogrPicture *self, const gchar *datetime);
const gchar *frogr_picture_get_datetime (FrogrPicture *self);
-GSList *frogr_picture_get_sets (FrogrPicture *self);
-void frogr_picture_set_sets (FrogrPicture *self, GSList *sets);
-void frogr_picture_add_set (FrogrPicture *self, FrogrPhotoSet *set);
-void frogr_picture_remove_sets (FrogrPicture *self);
-gboolean frogr_picture_in_set (FrogrPicture *self, FrogrPhotoSet *set);
+GSList *frogr_picture_get_photosets (FrogrPicture *self);
+void frogr_picture_set_photosets (FrogrPicture *self, GSList *photosets);
+void frogr_picture_add_photoset (FrogrPicture *self, FrogrPhotoSet *set);
+void frogr_picture_remove_photosets (FrogrPicture *self);
+gboolean frogr_picture_in_photoset (FrogrPicture *self, FrogrPhotoSet *set);
GSList *frogr_picture_get_groups (FrogrPicture *self);
void frogr_picture_set_groups (FrogrPicture *self, GSList *groups);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]