[cheese] lib: return const char * when getting photo/video paths
- From: Lucas Rocha <lucasr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] lib: return const char * when getting photo/video paths
- Date: Mon, 11 Apr 2011 20:59:15 +0000 (UTC)
commit da4d8b0a0a501d6019f3ca3ca8a2189045ea0664
Author: Lucas Rocha <lucasr gnome org>
Date: Sun Apr 3 15:30:38 2011 +0100
lib: return const char * when getting photo/video paths
Update all uses of both methods accordingly.
libcheese/cheese-fileutil.c | 18 +++++++++---------
libcheese/cheese-fileutil.h | 10 +++++-----
src/thumbview/cheese-thumb-view.c | 6 +++---
src/thumbview/cheese-thumb-view.h | 4 ++--
4 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/libcheese/cheese-fileutil.c b/libcheese/cheese-fileutil.c
index d2cd1bd..d86dc50 100644
--- a/libcheese/cheese-fileutil.c
+++ b/libcheese/cheese-fileutil.c
@@ -42,7 +42,7 @@ typedef struct
gchar *burst_raw_name;
} CheeseFileUtilPrivate;
-gchar *
+const gchar *
cheese_fileutil_get_video_path (CheeseFileUtil *fileutil)
{
CheeseFileUtilPrivate *priv = CHEESE_FILEUTIL_GET_PRIVATE (fileutil);
@@ -50,7 +50,7 @@ cheese_fileutil_get_video_path (CheeseFileUtil *fileutil)
return priv->video_path;
}
-gchar *
+const gchar *
cheese_fileutil_get_photo_path (CheeseFileUtil *fileutil)
{
CheeseFileUtilPrivate *priv = CHEESE_FILEUTIL_GET_PRIVATE (fileutil);
@@ -67,13 +67,13 @@ cheese_fileutil_get_path_before_224 (CheeseFileUtil *fileutil)
gchar *
cheese_fileutil_get_new_media_filename (CheeseFileUtil *fileutil, CheeseMediaMode mode)
{
- struct tm *ptr;
- time_t tm;
- char date[21];
- gchar *path;
- char *filename;
- GFile *file;
- int num;
+ struct tm *ptr;
+ time_t tm;
+ char date[21];
+ const gchar *path;
+ char *filename;
+ GFile *file;
+ int num;
CheeseFileUtilPrivate *priv = CHEESE_FILEUTIL_GET_PRIVATE (fileutil);
diff --git a/libcheese/cheese-fileutil.h b/libcheese/cheese-fileutil.h
index 0f209f1..95fb650 100644
--- a/libcheese/cheese-fileutil.h
+++ b/libcheese/cheese-fileutil.h
@@ -57,11 +57,11 @@ typedef enum
GType cheese_fileutil_get_type (void);
CheeseFileUtil *cheese_fileutil_new (void);
-gchar *cheese_fileutil_get_video_path (CheeseFileUtil *fileutil);
-gchar *cheese_fileutil_get_photo_path (CheeseFileUtil *fileutil);
-gchar *cheese_fileutil_get_path_before_224 (CheeseFileUtil *fileutil);
-gchar *cheese_fileutil_get_new_media_filename (CheeseFileUtil *fileutil, CheeseMediaMode mode);
-void cheese_fileutil_reset_burst (CheeseFileUtil *fileutil);
+const gchar *cheese_fileutil_get_video_path (CheeseFileUtil *fileutil);
+const gchar *cheese_fileutil_get_photo_path (CheeseFileUtil *fileutil);
+gchar *cheese_fileutil_get_path_before_224 (CheeseFileUtil *fileutil);
+gchar *cheese_fileutil_get_new_media_filename (CheeseFileUtil *fileutil, CheeseMediaMode mode);
+void cheese_fileutil_reset_burst (CheeseFileUtil *fileutil);
G_END_DECLS
diff --git a/src/thumbview/cheese-thumb-view.c b/src/thumbview/cheese-thumb-view.c
index 6ab2eba..d5502c8 100644
--- a/src/thumbview/cheese-thumb-view.c
+++ b/src/thumbview/cheese-thumb-view.c
@@ -488,7 +488,7 @@ cheese_thumb_view_fill (CheeseThumbView *thumb_view)
CheeseThumbViewPrivate *priv = CHEESE_THUMB_VIEW_GET_PRIVATE (thumb_view);
GDir *dir_videos, *dir_photos;
- char *path_videos, *path_photos;
+ const char *path_videos, *path_photos;
const char *name;
char *filename;
GFile *file;
@@ -675,7 +675,7 @@ cheese_thumb_view_new ()
}
void
-cheese_thumb_view_start_monitoring_photo_path (CheeseThumbView *thumb_view, char *path_photos)
+cheese_thumb_view_start_monitoring_photo_path (CheeseThumbView *thumb_view, const char *path_photos)
{
CheeseThumbViewPrivate *priv = CHEESE_THUMB_VIEW_GET_PRIVATE (thumb_view);
@@ -694,7 +694,7 @@ cheese_thumb_view_start_monitoring_photo_path (CheeseThumbView *thumb_view, char
}
void
-cheese_thumb_view_start_monitoring_video_path (CheeseThumbView *thumb_view, char *path_videos)
+cheese_thumb_view_start_monitoring_video_path (CheeseThumbView *thumb_view, const char *path_videos)
{
CheeseThumbViewPrivate *priv = CHEESE_THUMB_VIEW_GET_PRIVATE (thumb_view);
diff --git a/src/thumbview/cheese-thumb-view.h b/src/thumbview/cheese-thumb-view.h
index 44480fc..140a283 100644
--- a/src/thumbview/cheese-thumb-view.h
+++ b/src/thumbview/cheese-thumb-view.h
@@ -54,8 +54,8 @@ GList *cheese_thumb_view_get_selected_images_list (CheeseThumbView *thumb_view);
char * cheese_thumb_view_get_selected_image (CheeseThumbView *thumb_view);
guint cheese_thumb_view_get_n_selected (CheeseThumbView *thumbview);
void cheese_thumb_view_remove_item (CheeseThumbView *thumb_view, GFile *file);
-void cheese_thumb_view_start_monitoring_photo_path (CheeseThumbView *thumbview, char *path_photos);
-void cheese_thumb_view_start_monitoring_video_path (CheeseThumbView *thumbview, char *path_videos);
+void cheese_thumb_view_start_monitoring_photo_path (CheeseThumbView *thumbview, const char *path_photos);
+void cheese_thumb_view_start_monitoring_video_path (CheeseThumbView *thumbview, const char *path_videos);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]