const gchar *account,
gpointer user_data);
+#ifndef MODEST_TOOLKIT_HILDON2
static void modest_account_view_select_first_account (ModestAccountView *account_view);
+#endif
static void on_account_updated (ModestAccountMgr* mgr, gchar* account_name,
gpointer user_data);
static void update_account_view (ModestAccountMgr *account_mgr, ModestAccountView *view);
+static void on_notify_style (GObject *obj, GParamSpec *spec, gpointer userdata);
typedef enum {
MODEST_ACCOUNT_VIEW_NAME_COLUMN,
"widget_class \"*<HildonPannableArea>.ModestAccountView\" style :highest \"fremantle-modest-account-view\"");
#endif
+ g_signal_connect (G_OBJECT (obj), "notify::style", G_CALLBACK (on_notify_style), (gpointer) obj);
}
static void
modest_account_view_select_account (view, selected_name);
g_free (selected_name);
} else {
+#ifndef MODEST_TOOLKIT_HILDON2
modest_account_view_select_first_account (view);
+#endif
}
}
selected_name = modest_account_view_get_selected_account (self);
if (selected_name == NULL) {
+#ifndef MODEST_TOOLKIT_HILDON2
/* we select the first account if none is selected */
- modest_account_view_select_first_account (self);
+ modest_account_view_select_first_account (self);
+#endif
} else {
g_free (selected_name);
}
g_free (state);
}
+#ifndef MODEST_TOOLKIT_HILDON2
static void
modest_account_view_select_first_account (ModestAccountView *account_view)
{
if (gtk_tree_model_get_iter_first (model, &iter)) {
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (account_view));
-
+
gtk_tree_selection_select_iter (selection, &iter);
}
}
+#endif
static void
on_default_account_changed (ModestAccountMgr *mgr,
/* Update the view */
update_account_view (mgr, MODEST_ACCOUNT_VIEW (user_data));
}
+
+static void
+on_notify_style (GObject *obj, GParamSpec *spec, gpointer userdata)
+{
+ if (strcmp ("style", spec->name) == 0) {
+ gtk_widget_queue_draw (GTK_WIDGET (obj));
+ }
+}
+