aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-02-20 01:11:52 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-02-20 01:11:52 +0800
commit59a54ea5a028455e92e3715277721f2d37131359 (patch)
treea41e9feb45d07fe978f94ab901fc0c20d6e18c3a
parent6633112f54ffbff1a331b93de1cc00d6c849fc0d (diff)
downloadgsoc2013-evolution-59a54ea5a028455e92e3715277721f2d37131359.tar
gsoc2013-evolution-59a54ea5a028455e92e3715277721f2d37131359.tar.gz
gsoc2013-evolution-59a54ea5a028455e92e3715277721f2d37131359.tar.bz2
gsoc2013-evolution-59a54ea5a028455e92e3715277721f2d37131359.tar.lz
gsoc2013-evolution-59a54ea5a028455e92e3715277721f2d37131359.tar.xz
gsoc2013-evolution-59a54ea5a028455e92e3715277721f2d37131359.tar.zst
gsoc2013-evolution-59a54ea5a028455e92e3715277721f2d37131359.zip
Coding style and whitespace cleanup.
-rw-r--r--mail/e-mail-migrate.c6
-rw-r--r--plugins/image-inline/image-inline.c38
-rw-r--r--widgets/table/e-tree.c1
3 files changed, 35 insertions, 10 deletions
diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c
index 51d6e353cf..1f9720ceeb 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 12568eecca..5ea1070afb 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 783d17491a..af1d15a1c4 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)
{