changeset 777:088b71bf5715

Reduce indentation level.
author zas_
date Tue, 03 Jun 2008 08:57:46 +0000
parents 9c962ffe8edc
children 21ec5e6d3ddf
files src/collect-table.c
diffstat 1 files changed, 47 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/src/collect-table.c	Tue Jun 03 08:53:53 2008 +0000
+++ b/src/collect-table.c	Tue Jun 03 08:57:46 2008 +0000
@@ -129,67 +129,63 @@
 {
 	GtkTreePath *tpath;
 	GtkTreeViewColumn *column;
-
-	if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(ct->listview), x, y,
-					  &tpath, &column, NULL, NULL))
-		{
-		GtkTreeModel *store;
-		GtkTreeIter row;
-		GList *list;
-		gint n;
-
-		store = gtk_tree_view_get_model(GTK_TREE_VIEW(ct->listview));
-		gtk_tree_model_get_iter(store, &row, tpath);
-		gtk_tree_path_free(tpath);
-
-		gtk_tree_model_get(store, &row, CTABLE_COLUMN_POINTER, &list, -1);
-		if (!list) return NULL;
-
-		n = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(column), "column_number"));
-		if (iter) *iter = row;
-		return g_list_nth_data(list, n);
-		}
-
-	return NULL;
+	GtkTreeModel *store;
+	GtkTreeIter row;
+	GList *list;
+	gint n;
+
+	if (!gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(ct->listview), x, y,
+					   &tpath, &column, NULL, NULL))
+		return NULL;
+
+	store = gtk_tree_view_get_model(GTK_TREE_VIEW(ct->listview));
+	gtk_tree_model_get_iter(store, &row, tpath);
+	gtk_tree_path_free(tpath);
+
+	gtk_tree_model_get(store, &row, CTABLE_COLUMN_POINTER, &list, -1);
+	if (!list) return NULL;
+
+	n = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(column), "column_number"));
+	if (iter) *iter = row;
+	return g_list_nth_data(list, n);
 }
 
 static void collection_table_update_status(CollectTable *ct)
 {
-	if (ct->status_label)
+	gchar *buf;
+
+	if (!ct->status_label) return;
+
+	if (!ct->cd->list)
+		{
+		buf = g_strdup(_("Empty"));
+		}
+	else if (ct->selection)
 		{
-		gchar *buf;
-
-		if (!ct->cd->list)
-			{
-			buf = g_strdup(_("Empty"));
-			}
-		else if (ct->selection)
-			{
-			buf = g_strdup_printf(_("%d images (%d)"), g_list_length(ct->cd->list), g_list_length(ct->selection));
-			}
-		else
-			{
-			buf = g_strdup_printf(_("%d images"), g_list_length(ct->cd->list));
-			}
-
-		gtk_label_set_text(GTK_LABEL(ct->status_label), buf);
-		g_free(buf);
+		buf = g_strdup_printf(_("%d images (%d)"), g_list_length(ct->cd->list), g_list_length(ct->selection));
 		}
+	else
+		{
+		buf = g_strdup_printf(_("%d images"), g_list_length(ct->cd->list));
+		}
+
+	gtk_label_set_text(GTK_LABEL(ct->status_label), buf);
+	g_free(buf);
 }
 
 static void collection_table_update_extras(CollectTable *ct, gint loading, gdouble value)
 {
-	if (ct->extra_label)
-		{
-		gchar *text;
-		if (loading)
-			text = _("Loading thumbs...");
-		else
-			text = " ";
-
-		gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ct->extra_label), value);
-		gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ct->extra_label), text);
-		}
+	gchar *text;
+
+	if (!ct->extra_label) return;
+
+	if (loading)
+		text = _("Loading thumbs...");
+	else
+		text = " ";
+
+	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(ct->extra_label), value);
+	gtk_progress_bar_set_text(GTK_PROGRESS_BAR(ct->extra_label), text);
 }
 
 static void collection_table_toggle_filenames(CollectTable *ct)