eog r4411 - in trunk: . cut-n-paste/toolbar-editor src



Author: csaavedra
Date: Fri Feb 29 13:57:49 2008
New Revision: 4411
URL: http://svn.gnome.org/viewvc/eog?rev=4411&view=rev

Log:
2008-02-29  Claudio Saavedra  <csaavedra alumnos utalca cl>

	* cut-n-paste/toolbar-editor/egg-editable-toolbar.c:
	(new_separator_pixbuf):
	* cut-n-paste/toolbar-editor/egg-toolbar-editor.c:
	(egg_toolbar_editor_set_model):
	* src/eog-debug.c: (eog_debug_init):
	* src/eog-exif-details.c: (exif_entry_cb), (eog_exif_details_new):
	* src/eog-image.c: (eog_image_get_supported_mime_types):
	* src/eog-job-queue.c:
	* src/eog-metadata-reader.c: (eog_metadata_reader_consume):
	* src/eog-print-preview.c: (eog_print_preview_get_image_position):
	* src/eog-scroll-view.c: (paint_rectangle):
	* src/eog-session.c: (eog_session_is_restored):
	* src/eog-thumb-view.c: (eog_thumb_view_set_model),
	(eog_thumb_view_get_first_selected_image),
	(eog_thumb_view_select_single):
	* src/eog-transform.c: (eog_transform_reverse),
	(eog_transform_compose), (eog_transform_identity_new),
	(eog_transform_rotate_new), (eog_transform_flip_new):
	* src/eog-util.c: (eog_util_string_array_make_absolute):
	* src/eog-window.c: (eog_window_transparency_changed_cb),
	(eog_job_progress_cb):
	* src/main.c: (set_startup_flags), (load_files),
	(load_files_remote):

	Many functions and variables declarations fixes, courtesy of 
	sparse.



Modified:
   trunk/ChangeLog
   trunk/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
   trunk/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
   trunk/src/eog-debug.c
   trunk/src/eog-exif-details.c
   trunk/src/eog-image.c
   trunk/src/eog-job-queue.c
   trunk/src/eog-metadata-reader.c
   trunk/src/eog-print-preview.c
   trunk/src/eog-scroll-view.c
   trunk/src/eog-session.c
   trunk/src/eog-thumb-view.c
   trunk/src/eog-transform.c
   trunk/src/eog-util.c
   trunk/src/eog-window.c
   trunk/src/main.c

Modified: trunk/cut-n-paste/toolbar-editor/egg-editable-toolbar.c
==============================================================================
--- trunk/cut-n-paste/toolbar-editor/egg-editable-toolbar.c	(original)
+++ trunk/cut-n-paste/toolbar-editor/egg-editable-toolbar.c	Fri Feb 29 13:57:49 2008
@@ -1827,7 +1827,7 @@
 }
 
 static GdkPixbuf *
-new_separator_pixbuf ()
+new_separator_pixbuf (void)
 {
   GtkWidget *separator;
   GdkPixbuf *pixbuf;

Modified: trunk/cut-n-paste/toolbar-editor/egg-toolbar-editor.c
==============================================================================
--- trunk/cut-n-paste/toolbar-editor/egg-toolbar-editor.c	(original)
+++ trunk/cut-n-paste/toolbar-editor/egg-toolbar-editor.c	Fri Feb 29 13:57:49 2008
@@ -174,10 +174,12 @@
 egg_toolbar_editor_set_model (EggToolbarEditor *t,
 			      EggToolbarsModel *model)
 {
+  EggToolbarEditorPrivate *priv;
+
   g_return_if_fail (EGG_IS_TOOLBAR_EDITOR (t));
   g_return_if_fail (model != NULL);
 
-  EggToolbarEditorPrivate *priv = t->priv;
+  priv = t->priv;
 
   if (priv->model)
     {

Modified: trunk/src/eog-debug.c
==============================================================================
--- trunk/src/eog-debug.c	(original)
+++ trunk/src/eog-debug.c	Fri Feb 29 13:57:49 2008
@@ -43,7 +43,7 @@
 static EogDebugSection debug = EOG_NO_DEBUG;
 
 void
-eog_debug_init ()
+eog_debug_init (void)
 {
 	if (g_getenv ("EOG_DEBUG") != NULL)
 	{

Modified: trunk/src/eog-exif-details.c
==============================================================================
--- trunk/src/eog-exif-details.c	(original)
+++ trunk/src/eog-exif-details.c	Fri Feb 29 13:57:49 2008
@@ -374,7 +374,7 @@
 	} else {
 
 		ExifMnoteData *mnote = (entry->tag == EXIF_TAG_MAKER_NOTE ?
-			exif_data_get_mnote_data (entry->parent->parent) : 0);
+			exif_data_get_mnote_data (entry->parent->parent) : NULL);
 
 		if (mnote) {
 			// Supported MakerNote Found
@@ -422,7 +422,7 @@
 #endif
 
 GtkWidget *
-eog_exif_details_new ()
+eog_exif_details_new (void)
 {
 	GObject *object;
 
@@ -470,7 +470,7 @@
 		exif_data_foreach_content (data, exif_content_cb, exif_details);
 	}
 }
-#endif HAVE_EXIF
+#endif /* HAVE_EXIF */
 
 #ifdef HAVE_EXEMPI
 typedef struct {

Modified: trunk/src/eog-image.c
==============================================================================
--- trunk/src/eog-image.c	(original)
+++ trunk/src/eog-image.c	Fri Feb 29 13:57:49 2008
@@ -2118,7 +2118,7 @@
 }
 
 GList *
-eog_image_get_supported_mime_types ()
+eog_image_get_supported_mime_types (void)
 {
 	GSList *format_list, *it;
 	gchar **mime_types;

Modified: trunk/src/eog-job-queue.c
==============================================================================
--- trunk/src/eog-job-queue.c	(original)
+++ trunk/src/eog-job-queue.c	Fri Feb 29 13:57:49 2008
@@ -25,8 +25,8 @@
 #include "eog-jobs.h"
 #include "eog-job-queue.h"
 
-GCond  *render_cond = NULL;
-GMutex *eog_queue_mutex = NULL;
+static GCond  *render_cond = NULL;
+static GMutex *eog_queue_mutex = NULL;
 
 static GQueue *thumbnail_queue = NULL;
 static GQueue *load_queue = NULL;

Modified: trunk/src/eog-metadata-reader.c
==============================================================================
--- trunk/src/eog-metadata-reader.c	(original)
+++ trunk/src/eog-metadata-reader.c	Fri Feb 29 13:57:49 2008
@@ -189,6 +189,8 @@
 	EogMetadataReaderPrivate *priv;
  	EogJpegApp1Type app1_type;
 	int i;
+	EogMetadataReaderState next_state;
+	guchar *chunk = NULL;
 
 	g_return_if_fail (EOG_IS_METADATA_READER (emr));
 
@@ -276,9 +278,6 @@
 
 			app1_type = eog_metadata_identify_app1 ((gchar*) &buf[i], priv->size);
 			
-			EogMetadataReaderState next_state;
-			guchar *chunk = NULL;
-
 			switch (app1_type) {
 			case EJA_EXIF:
 				if (priv->exif_chunk == NULL) { 

Modified: trunk/src/eog-print-preview.c
==============================================================================
--- trunk/src/eog-print-preview.c	(original)
+++ trunk/src/eog-print-preview.c	Fri Feb 29 13:57:49 2008
@@ -1145,11 +1145,11 @@
 				      gdouble *x,
 				      gdouble *y)
 {
-	g_return_if_fail (EOG_IS_PRINT_PREVIEW (preview));
-		
 	EogPrintPreviewPrivate *priv;
 	gdouble width, height;
 
+	g_return_if_fail (EOG_IS_PRINT_PREVIEW (preview));
+		
 	priv = preview->priv;
 
 	if (x != NULL) {

Modified: trunk/src/eog-scroll-view.c
==============================================================================
--- trunk/src/eog-scroll-view.c	(original)
+++ trunk/src/eog-scroll-view.c	Fri Feb 29 13:57:49 2008
@@ -515,6 +515,7 @@
 	ArtIRect r, d;
 	GdkPixbuf *tmp;
 	int check_size;
+	char *str;
 	guint32 check_1 = 0;
 	guint32 check_2 = 0;
 
@@ -611,7 +612,6 @@
 	if (art_irect_empty (&d))
 		return;
 
-	char *str;
 	switch (interp_type) {
 	case GDK_INTERP_NEAREST:
 		str = "NEAREST";

Modified: trunk/src/eog-session.c
==============================================================================
--- trunk/src/eog-session.c	(original)
+++ trunk/src/eog-session.c	Fri Feb 29 13:57:49 2008
@@ -62,7 +62,7 @@
 }
 
 gboolean
-eog_session_is_restored	()
+eog_session_is_restored	(void)
 {
 	return FALSE;
 }

Modified: trunk/src/eog-thumb-view.c
==============================================================================
--- trunk/src/eog-thumb-view.c	(original)
+++ trunk/src/eog-thumb-view.c	Fri Feb 29 13:57:49 2008
@@ -544,10 +544,12 @@
 void
 eog_thumb_view_set_model (EogThumbView *tb, EogListStore *store)
 {
+	gint index;
+	
 	g_return_if_fail (EOG_IS_THUMB_VIEW (tb));
 	g_return_if_fail (EOG_IS_LIST_STORE (store));
 	
-	gint index = eog_list_store_get_initial_pos (store);
+	index = eog_list_store_get_initial_pos (store);
 
 	gtk_icon_view_set_model (GTK_ICON_VIEW (tb), GTK_TREE_MODEL (store));
 
@@ -613,13 +615,14 @@
 	   smaller tree path value => tricky and expensive. Do we really need this?
 	*/
 	EogImage *image;
+	GtkTreePath *path;
 	GList *list = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (tb));
 
 	if (list == NULL) {
 		return NULL;
 	}
 
-	GtkTreePath *path = (GtkTreePath *) (list->data);
+	path = (GtkTreePath *) (list->data);
 
 	image = eog_thumb_view_get_image_from_path (tb, path);
 
@@ -682,12 +685,13 @@
 eog_thumb_view_select_single (EogThumbView *tb, 
 			      EogThumbViewSelectionChange change)
 {
-	g_return_if_fail (EOG_IS_THUMB_VIEW (tb));
-	GtkTreePath *path = NULL;
+  	GtkTreePath *path = NULL;
 	GtkTreeModel *model;
 	GList *list;
 	gint n_items;
 
+	g_return_if_fail (EOG_IS_THUMB_VIEW (tb));
+
 	model = gtk_icon_view_get_model (GTK_ICON_VIEW (tb));
 
 	n_items = eog_list_store_length (EOG_LIST_STORE (model));
@@ -698,6 +702,8 @@
 	
 	if (eog_thumb_view_get_n_selected (tb) == 0) {
 		switch (change) {
+		case EOG_THUMB_VIEW_SELECT_CURRENT:
+			break;
 		case EOG_THUMB_VIEW_SELECT_RIGHT:
 		case EOG_THUMB_VIEW_SELECT_FIRST:
 			path = gtk_tree_path_new_first ();

Modified: trunk/src/eog-transform.c
==============================================================================
--- trunk/src/eog-transform.c	(original)
+++ trunk/src/eog-transform.c	Fri Feb 29 13:57:49 2008
@@ -169,7 +169,7 @@
 
 	g_return_val_if_fail (EOG_IS_TRANSFORM (trans), NULL);
 
-	reverse = EOG_TRANSFORM (g_object_new (EOG_TYPE_TRANSFORM, 0));
+	reverse = EOG_TRANSFORM (g_object_new (EOG_TYPE_TRANSFORM, NULL));
 
 	art_affine_invert (reverse->priv->affine, trans->priv->affine);
 
@@ -183,8 +183,8 @@
 
 	g_return_val_if_fail (EOG_IS_TRANSFORM (trans), NULL);
 	g_return_val_if_fail (EOG_IS_TRANSFORM (compose), NULL);
-	
-	composition = EOG_TRANSFORM (g_object_new (EOG_TYPE_TRANSFORM, 0));
+
+	composition = EOG_TRANSFORM (g_object_new (EOG_TYPE_TRANSFORM, NULL));
 
 	art_affine_multiply (composition->priv->affine,
 			     trans->priv->affine,
@@ -208,7 +208,7 @@
 {
 	EogTransform *trans; 
 
-	trans = EOG_TRANSFORM (g_object_new (EOG_TYPE_TRANSFORM, 0));
+	trans = EOG_TRANSFORM (g_object_new (EOG_TYPE_TRANSFORM, NULL));
 	
 	art_affine_identity (trans->priv->affine);
 
@@ -220,7 +220,7 @@
 {
 	EogTransform *trans; 
 
-	trans = EOG_TRANSFORM (g_object_new (EOG_TYPE_TRANSFORM, 0));
+	trans = EOG_TRANSFORM (g_object_new (EOG_TYPE_TRANSFORM, NULL));
 	
 	art_affine_rotate (trans->priv->affine, degree);
 
@@ -233,7 +233,7 @@
 	EogTransform *trans; 
 	gboolean horiz, vert;
 
-	trans = EOG_TRANSFORM (g_object_new (EOG_TYPE_TRANSFORM, 0));
+	trans = EOG_TRANSFORM (g_object_new (EOG_TYPE_TRANSFORM, NULL));
 	
 	art_affine_identity (trans->priv->affine);
 

Modified: trunk/src/eog-util.c
==============================================================================
--- trunk/src/eog-util.c	(original)
+++ trunk/src/eog-util.c	Fri Feb 29 13:57:49 2008
@@ -180,13 +180,14 @@
 eog_util_string_array_make_absolute (gchar **files)
 {
 	int i;
+	int size;
 	gchar **abs_files;
 
 	if (files == NULL)
 		return NULL;
-	
-	int size = g_strv_length (files);
-	
+
+	size = g_strv_length (files);
+
 	/* Ensure new list is NULL-terminated */
 	abs_files = g_new0 (gchar *, size+1);
 	

Modified: trunk/src/eog-window.c
==============================================================================
--- trunk/src/eog-window.c	(original)
+++ trunk/src/eog-window.c	Fri Feb 29 13:57:49 2008
@@ -328,10 +328,10 @@
 		g_free (color_str);
 	} else if (g_ascii_strcasecmp (value, "CHECK_PATTERN") == 0) {
 		eog_scroll_view_set_transparency (EOG_SCROLL_VIEW (priv->view),
-						  EOG_TRANSP_CHECKED, 0);
+						  EOG_TRANSP_CHECKED, NULL);
 	} else {
 		eog_scroll_view_set_transparency (EOG_SCROLL_VIEW (priv->view),
-						  EOG_TRANSP_BACKGROUND, 0);
+						  EOG_TRANSP_BACKGROUND, NULL);
 	}
 }
 
@@ -1166,9 +1166,11 @@
 static void
 eog_job_progress_cb (EogJobLoad *job, float progress, gpointer user_data) 
 {
+	EogWindow *window;
+
 	g_return_if_fail (EOG_IS_WINDOW (user_data));
 	
-	EogWindow *window = EOG_WINDOW (user_data);
+	window = EOG_WINDOW (user_data);
 
 	eog_statusbar_set_progress (EOG_STATUSBAR (window->priv->statusbar), 
 				    progress);

Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c	(original)
+++ trunk/src/main.c	Fri Feb 29 13:57:49 2008
@@ -69,7 +69,7 @@
 };
 
 static void 
-set_startup_flags ()
+set_startup_flags (void)
 {
   if (fullscreen)
     flags |= EOG_STARTUP_FULLSCREEN;
@@ -82,7 +82,7 @@
 }
 
 static void 
-load_files ()
+load_files (void)
 {
 	GSList *files = NULL;
 
@@ -100,7 +100,7 @@
 
 #ifdef HAVE_DBUS
 static gboolean
-load_files_remote ()
+load_files_remote (void)
 {
 	GError *error = NULL;
 	DBusGConnection *connection;



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