From: Dirk-Jan C. Binnema Date: Mon, 9 Jul 2007 16:19:53 +0000 (+0000) Subject: * set the uber-ugly thumbable scrollbar as required by the spec. for main, viewer... X-Git-Tag: git_migration_finished~2883 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=832c77270a9a6f2ecbf7f42aeda724bffdc29749 * set the uber-ugly thumbable scrollbar as required by the spec. for main, viewer and editor fixes: NB#62858 pmo-trunk-r2655 --- diff --git a/src/maemo/modest-hildon-includes.h b/src/maemo/modest-hildon-includes.h index 03a66f3..5b602e0 100644 --- a/src/maemo/modest-hildon-includes.h +++ b/src/maemo/modest-hildon-includes.h @@ -74,7 +74,7 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, #else #ifdef MODEST_HAVE_HILDON1_WIDGETS - +#include #include #include #include diff --git a/src/maemo/modest-maemo-utils.c b/src/maemo/modest-maemo-utils.c index 3f5eff2..518fbd1 100644 --- a/src/maemo/modest-maemo-utils.c +++ b/src/maemo/modest-maemo-utils.c @@ -515,7 +515,8 @@ on_response (GtkDialog *dialog, gint response, gpointer user_data) gtk_widget_destroy (GTK_WIDGET (dialog)); } -void modest_maemo_show_information_note_and_forget (GtkWindow *parent_window, const gchar* message) +void +modest_maemo_show_information_note_and_forget (GtkWindow *parent_window, const gchar* message) { GtkDialog *dialog = GTK_DIALOG (hildon_note_new_information (parent_window, message)); @@ -524,3 +525,13 @@ void modest_maemo_show_information_note_and_forget (GtkWindow *parent_window, co gtk_widget_show (GTK_WIDGET (dialog)); } + + +void +modest_maemo_set_thumbable_scrollbar (GtkScrolledWindow *win, gboolean thumbable) +{ + g_return_if_fail (GTK_IS_SCROLLED_WINDOW(win)); +#ifdef MODEST_HAVE_HILDON1_WIDGETS + hildon_helper_set_thumb_scrollbar (win, thumbable); +#endif /* MODEST_HAVE_HILDON1_WIDGETS */ +} diff --git a/src/maemo/modest-maemo-utils.h b/src/maemo/modest-maemo-utils.h index 7282a9c..9aade8c 100644 --- a/src/maemo/modest-maemo-utils.h +++ b/src/maemo/modest-maemo-utils.h @@ -132,4 +132,7 @@ void modest_maemo_utils_setup_images_filechooser (GtkFileChooser *chooser); */ void modest_maemo_show_information_note_and_forget (GtkWindow *parent_window, const gchar* message); + +void modest_maemo_set_thumbable_scrollbar (GtkScrolledWindow *win, gboolean thumbable); + #endif /*__MODEST_MAEMO_UTILS_H__*/ diff --git a/src/maemo/modest-main-window.c b/src/maemo/modest-main-window.c index 6aaeb53..6bf6d06 100644 --- a/src/maemo/modest-main-window.c +++ b/src/maemo/modest-main-window.c @@ -1684,6 +1684,7 @@ _on_msg_count_changed (ModestHeaderView *header_view, } } + void modest_main_window_set_contents_style (ModestMainWindow *self, ModestMainWindowContentsStyle style) @@ -1720,6 +1721,8 @@ modest_main_window_set_contents_style (ModestMainWindow *self, switch (priv->contents_style) { case MODEST_MAIN_WINDOW_CONTENTS_STYLE_HEADERS: wrap_in_scrolled_window (priv->contents_widget, GTK_WIDGET (priv->header_view)); + modest_maemo_set_thumbable_scrollbar (GTK_SCROLLED_WINDOW(priv->contents_widget), + TRUE); break; case MODEST_MAIN_WINDOW_CONTENTS_STYLE_DETAILS: { @@ -1733,10 +1736,16 @@ modest_main_window_set_contents_style (ModestMainWindow *self, priv->details_widget); } g_object_unref (selected_folderstore); + modest_maemo_set_thumbable_scrollbar (GTK_SCROLLED_WINDOW(priv->contents_widget), + FALSE); + + break; } case MODEST_MAIN_WINDOW_CONTENTS_STYLE_EMPTY: wrap_in_scrolled_window (priv->contents_widget, GTK_WIDGET (priv->empty_view)); + modest_maemo_set_thumbable_scrollbar (GTK_SCROLLED_WINDOW(priv->contents_widget), + FALSE); break; default: g_return_if_reached (); diff --git a/src/maemo/modest-msg-edit-window.c b/src/maemo/modest-msg-edit-window.c index 1e98508..0ac9aa6 100644 --- a/src/maemo/modest-msg-edit-window.c +++ b/src/maemo/modest-msg-edit-window.c @@ -480,7 +480,8 @@ init_window (ModestMsgEditWindow *obj) priv->scroll = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->scroll), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (priv->scroll), GTK_SHADOW_NONE); - + modest_maemo_set_thumbable_scrollbar (GTK_SCROLLED_WINDOW(priv->scroll), TRUE); + main_vbox = gtk_vbox_new (FALSE, DEFAULT_MAIN_VBOX_SPACING); gtk_box_pack_start (GTK_BOX(main_vbox), priv->header_box, FALSE, FALSE, 0); diff --git a/src/maemo/modest-msg-view-window.c b/src/maemo/modest-msg-view-window.c index f0b4109..ad269fc 100644 --- a/src/maemo/modest-msg-view-window.c +++ b/src/maemo/modest-msg-view-window.c @@ -412,6 +412,7 @@ init_window (ModestMsgViewWindow *obj, TnyMsg *msg) priv->main_scroll = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->main_scroll), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (priv->main_scroll), GTK_SHADOW_NONE); + modest_maemo_set_thumbable_scrollbar (GTK_SCROLLED_WINDOW(priv->main_scroll), TRUE); gtk_container_add (GTK_CONTAINER (priv->main_scroll), priv->msg_view); gtk_box_pack_start (GTK_BOX(main_vbox), priv->main_scroll, TRUE, TRUE, 0);