Modified webpage: now tinymail repository is in gitorious.
[modest] / src / widgets / modest-scrolled-window-scrollable.c
index dca068f..eb8575e 100644 (file)
@@ -84,14 +84,15 @@ G_DEFINE_TYPE_EXTENDED    (ModestScrolledWindowScrollable,
                           0,
                           {
                             G_IMPLEMENT_INTERFACE (MODEST_TYPE_SCROLLABLE, modest_scrollable_iface_init);
-                            g_type_interface_add_prerequisite (g_define_type_id, GTK_TYPE_BIN);
                           }
                           );
 
 GtkWidget *
 modest_scrolled_window_scrollable_new                            (void)
 {
-       GtkWidget *scrollable = g_object_new (MODEST_TYPE_SCROLLED_WINDOW_SCROLLABLE, 
+       GtkWidget *scrollable = g_object_new (MODEST_TYPE_SCROLLED_WINDOW_SCROLLABLE,
+                                             "hscrollbar-policy", GTK_POLICY_NEVER,
+                                             "vscrollbar-policy", GTK_POLICY_AUTOMATIC,
                                              NULL);
 
     return scrollable;
@@ -103,6 +104,7 @@ modest_scrolled_window_scrollable_class_init (ModestScrolledWindowScrollableClas
        GObjectClass *gobject_class;
 
        parent_class = g_type_class_peek_parent (klass);
+       gobject_class = (GObjectClass *) klass;
        gobject_class->finalize = modest_scrolled_window_scrollable_finalize;
        gobject_class->set_property = modest_scrolled_window_scrollable_set_property;
        gobject_class->get_property = modest_scrolled_window_scrollable_get_property;
@@ -137,13 +139,13 @@ modest_scrolled_window_scrollable_class_init (ModestScrolledWindowScrollableClas
 
        g_object_class_install_property (gobject_class,
                                         PROP_MOVEMENT_MODE,
-                                        g_param_spec_enum ("movement_mode",
-                                                           "Directions scroll is allowed",
-                                                           "Movements allowed in the scrollable",
-                                                           MODEST_TYPE_MOVEMENT_MODE,
-                                                           MODEST_MOVEMENT_MODE_VERTICAL,
-                                                           G_PARAM_READWRITE |
-                                                           G_PARAM_CONSTRUCT));
+                                        g_param_spec_flags ("movement_mode",
+                                                            "Directions scroll is allowed",
+                                                            "Movements allowed in the scrollable",
+                                                            MODEST_TYPE_MOVEMENT_MODE,
+                                                            MODEST_MOVEMENT_MODE_VERTICAL,
+                                                            G_PARAM_READWRITE |
+                                                            G_PARAM_CONSTRUCT));
 
        g_object_class_install_property (gobject_class,
                                         PROP_HORIZONTAL_MAX_OVERSHOOT,
@@ -165,6 +167,7 @@ modest_scrolled_window_scrollable_class_init (ModestScrolledWindowScrollableClas
 static void
 modest_scrolled_window_scrollable_init (ModestScrolledWindowScrollable *self)
 {
+       gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (self), GTK_SHADOW_NONE);
 }
 
 static void
@@ -261,7 +264,12 @@ static void
 modest_scrolled_window_scrollable_add_with_viewport_default (ModestScrollable *self,
                                                                  GtkWidget *widget)
 {
+       GtkWidget *viewport;
+
        gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (self), widget);
+
+       viewport = gtk_bin_get_child (GTK_BIN (self));
+       gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE);
 }
 
 static GtkAdjustment *