[Rawstudio-commit] r4154 - trunk/src

Klaus Post klauspost at gmail.com
Sun Feb 19 14:55:45 CET 2012


Author: post
Date: 2012-02-19 14:55:45 +0100 (Sun, 19 Feb 2012)
New Revision: 4154

Modified:
   trunk/src/gtk-helper.c
   trunk/src/rs-batch.c
   trunk/src/rs-save-dialog.c
Log:
Don't use int casts for GType numbers.

Modified: trunk/src/gtk-helper.c
===================================================================
--- trunk/src/gtk-helper.c	2012-02-19 13:34:36 UTC (rev 4153)
+++ trunk/src/gtk-helper.c	2012-02-19 13:55:45 UTC (rev 4154)
@@ -228,7 +228,7 @@
 		gchar *name = g_strdup(g_type_name(savers[i])); /* FIXME: Stop leaking! */
 		GType type = g_type_from_name(name);
 		klass = g_type_class_ref(savers[i]);
-		gui_confbox_add_entry(confbox, name, klass->display_name, GINT_TO_POINTER(type));
+		gui_confbox_add_entry(confbox, name, klass->display_name, (gpointer)type);
 		g_type_class_unref(klass);
 	}
 	g_free(savers);

Modified: trunk/src/rs-batch.c
===================================================================
--- trunk/src/rs-batch.c	2012-02-19 13:34:36 UTC (rev 4153)
+++ trunk/src/rs-batch.c	2012-02-19 13:55:45 UTC (rev 4154)
@@ -795,7 +795,7 @@
 filetype_changed(gpointer active, gpointer user_data)
 {
 	RS_QUEUE *queue = (RS_QUEUE *) user_data;
-	GType filetype = GPOINTER_TO_INT(active);
+	GType filetype = (GType)active;
 
 	if (!filetype)
 		return;

Modified: trunk/src/rs-save-dialog.c
===================================================================
--- trunk/src/rs-save-dialog.c	2012-02-19 13:34:36 UTC (rev 4153)
+++ trunk/src/rs-save-dialog.c	2012-02-19 13:55:45 UTC (rev 4154)
@@ -147,7 +147,7 @@
 		RSOutputClass *klass;
 		gchar *name = g_strdup(g_type_name(savers[i]));
 		klass = g_type_class_ref(savers[i]);
-		gui_confbox_add_entry(dialog->type_box, name, klass->display_name, GINT_TO_POINTER(savers[i]));
+		gui_confbox_add_entry(dialog->type_box, name, klass->display_name, (gpointer)savers[i]);
 		g_type_class_unref(klass);
 	}
 	g_free(savers);
@@ -233,7 +233,7 @@
 file_type_changed(gpointer active, gpointer user_data)
 {
 	RSSaveDialog *dialog = RS_SAVE_DIALOG(user_data);
-	const gchar *identifier = g_type_name(GPOINTER_TO_INT(active));
+	const gchar *identifier = g_type_name((GType)active);
 
 	if (dialog->output)
 		g_object_unref(dialog->output);




More information about the Rawstudio-commit mailing list