[evolution] Coding style and whitespace cleanup.



commit 59a54ea5a028455e92e3715277721f2d37131359
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Feb 19 12:11:52 2010 -0500

    Coding style and whitespace cleanup.

 mail/e-mail-migrate.c               |    6 ++--
 plugins/image-inline/image-inline.c |   38 +++++++++++++++++++++++++++++-----
 widgets/table/e-tree.c              |    1 -
 3 files changed, 35 insertions(+), 10 deletions(-)
---
diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c
index 51d6e35..1f9720c 100644
--- a/mail/e-mail-migrate.c
+++ b/mail/e-mail-migrate.c
@@ -231,9 +231,9 @@ struct _imap_folder_info_1_0 {
 
 struct _migrate_state_info {
 	gchar *label_name;
-	double progress;
+	gdouble progress;
 };
-static gboolean update_states_in_main_thread (const struct 
+static gboolean update_states_in_main_thread (const struct
 		_migrate_state_info *info);
 
 static GHashTable *accounts_1_0 = NULL;
@@ -2834,7 +2834,7 @@ migrate_folders(CamelStore *store, gboolean is_local, CamelFolderInfo *fi, const
 		*nth_folder = *nth_folder + 1;
 
 		info->progress = (double) (*nth_folder) / total_folders;
-		g_idle_add ((GSourceFunc) update_states_in_main_thread, 
+		g_idle_add ((GSourceFunc) update_states_in_main_thread,
 				&info);
 
 		if (is_local)
diff --git a/plugins/image-inline/image-inline.c b/plugins/image-inline/image-inline.c
index 12568ee..5ea1070 100644
--- a/plugins/image-inline/image-inline.c
+++ b/plugins/image-inline/image-inline.c
@@ -259,19 +259,45 @@ size_allocate_cb (GtkHTMLEmbedded *embedded,
 }
 
 static void
-mouse_wheel_scroll_cb (GtkWidget *img_view, GdkScrollDirection direction, ImageInlinePObject *image_object)
+mouse_wheel_scroll_cb (GtkWidget *image_view,
+                       GdkScrollDirection direction,
+                       ImageInlinePObject *image_object)
 {
+	GtkOrientation orientation;
+	GtkScrollType scroll_type;
 	GtkHTML *html;
 	gint steps = 2;
 
-	g_return_if_fail (image_object != NULL);
-	g_return_if_fail (image_object->object.format != NULL);
-	g_return_if_fail (image_object->object.format->html != NULL);
-
 	html = image_object->object.format->html;
 
+	switch (direction) {
+		case GDK_SCROLL_UP:
+			orientation = GTK_ORIENTATION_VERTICAL;
+			scroll_type = GTK_SCROLL_STEP_BACKWARD;
+			break;
+
+		case GDK_SCROLL_DOWN:
+			orientation = GTK_ORIENTATION_VERTICAL;
+			scroll_type = GTK_SCROLL_STEP_FORWARD;
+			break;
+
+		case GDK_SCROLL_LEFT:
+			orientation = GTK_ORIENTATION_HORIZONTAL;
+			scroll_type = GTK_SCROLL_STEP_BACKWARD;
+			break;
+
+		case GDK_SCROLL_RIGHT:
+			orientation = GTK_ORIENTATION_HORIZONTAL;
+			scroll_type = GTK_SCROLL_STEP_FORWARD;
+			break;
+
+		default:
+			g_return_if_reached ();
+	}
+
 	while (steps > 0) {
-		g_signal_emit_by_name (html, "scroll", (direction == GDK_SCROLL_DOWN || direction == GDK_SCROLL_UP) ? GTK_ORIENTATION_VERTICAL : GTK_ORIENTATION_HORIZONTAL, (direction == GDK_SCROLL_DOWN || direction == GDK_SCROLL_RIGHT) ? GTK_SCROLL_STEP_FORWARD : GTK_SCROLL_STEP_BACKWARD, 2.0, NULL);
+		g_signal_emit_by_name (
+			html, "scroll", orientation, scroll_type, 2.0, NULL);
 		steps--;
 	}
 }
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 783d174..af1d15a 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -1710,7 +1710,6 @@ e_tree_show_cursor_after_reflow (ETree *e_tree)
 	e_tree->priv->show_cursor_after_reflow = TRUE;
 }
 
-
 void
 e_tree_set_cursor (ETree *e_tree, ETreePath path)
 {



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