} FolderCols;
-static const guint MODEST_MAIN_PANED_POS = 280;
+static const guint MODEST_MAIN_PANED_POS_PERCENTAGE = 30;
static const FolderCols INBOX_COLUMNS_DETAILS[] = {
{MODEST_HEADER_VIEW_COLUMN_MSGTYPE, 40, 0},
};
}
- key = _modest_widget_memory_get_keyname (MODEST_CONF_MAIN_PANED_KEY, MODEST_WIDGET_MEMORY_PARAM_POS);
+ key = _modest_widget_memory_get_keyname (MODEST_CONF_MAIN_PANED_KEY,
+ MODEST_WIDGET_MEMORY_PARAM_POS);
/* if we're not in overwrite mode, only write stuff it
* there was nothing before */
if (overwrite || !modest_conf_key_exists(conf, key, NULL))
- modest_conf_set_int (conf, key, MODEST_MAIN_PANED_POS, NULL);
+ modest_conf_set_int (conf, key, MODEST_MAIN_PANED_POS_PERCENTAGE, NULL);
g_free (key);
return TRUE;
gchar *key;
int percent, pos;
- key = _modest_widget_memory_get_keyname (name, MODEST_WIDGET_MEMORY_PARAM_POS);
+ key = _modest_widget_memory_get_keyname (name, MODEST_WIDGET_MEMORY_PARAM_POS);
+ percent = modest_conf_get_int (conf, key, NULL);
- if (modest_conf_key_exists (conf, key, NULL)) {
- percent = modest_conf_get_int (conf, key, NULL);
-
- pos = GTK_WIDGET (paned)->allocation.width * percent /100;
- gtk_paned_set_position (paned, pos);
- } else {
- /* The initial position must follow the 30/70 rule */
- gtk_paned_set_position (paned, GTK_WIDGET(paned)->requisition.width/3);
- }
+ pos = GTK_WIDGET (paned)->allocation.width * percent /100;
+ gtk_paned_set_position (paned, pos);
g_free (key);
return TRUE;