This commit is contained in:
Alexey Kopytov
2014-01-02 21:03:05 +04:00
3 changed files with 24 additions and 17 deletions

View File

@ -181,9 +181,9 @@ set_group_find_defaults (void)
* date-from-subject, and sort descending by date. If fields * date-from-subject, and sort descending by date. If fields
* *are* specified, we sort in ascending order. */ * *are* specified, we sort in ascending order. */
if (!MU_CONFIG.fields || !*MU_CONFIG.fields) { if (!MU_CONFIG.fields || !*MU_CONFIG.fields) {
MU_CONFIG.fields = "d f s"; MU_CONFIG.fields = g_strdup ("d f s");
if (!MU_CONFIG.sortfield) if (!MU_CONFIG.sortfield)
MU_CONFIG.sortfield = "d"; MU_CONFIG.sortfield = g_strdup ("d");
} }
if (!MU_CONFIG.formatstr) /* by default, use plain output */ if (!MU_CONFIG.formatstr) /* by default, use plain output */
@ -505,7 +505,7 @@ parse_cmd (int *argcp, char ***argvp, GError **err)
* etc.)*/ * etc.)*/
return TRUE; return TRUE;
MU_CONFIG.cmdstr = (*argvp)[1]; MU_CONFIG.cmdstr = g_strdup ((*argvp)[1]);
MU_CONFIG.cmd = cmd_from_string (MU_CONFIG.cmdstr); MU_CONFIG.cmd = cmd_from_string (MU_CONFIG.cmdstr);
#ifndef BUILD_GUILE #ifndef BUILD_GUILE
@ -748,10 +748,18 @@ mu_config_uninit (MuConfig *opts)
if (!opts) if (!opts)
return; return;
g_free (opts->cmdstr);
g_free (opts->muhome); g_free (opts->muhome);
g_free (opts->maildir); g_free (opts->maildir);
g_free (opts->fields);
g_free (opts->sortfield);
g_free (opts->bookmark);
g_free (opts->formatstr);
g_free (opts->exec);
g_free (opts->linksdir); g_free (opts->linksdir);
g_free (opts->targetdir); g_free (opts->targetdir);
g_free (opts->parts);
g_free (opts->script);
g_strfreev (opts->params); g_strfreev (opts->params);

View File

@ -93,7 +93,7 @@ struct _MuConfig {
MuConfigCmd cmd; /* the command, or MuConfigCmd cmd; /* the command, or
* MU_CONFIG_CMD_NONE */ * MU_CONFIG_CMD_NONE */
const char *cmdstr; /* cmd string, for user char *cmdstr; /* cmd string, for user
* info */ * info */
/* general options */ /* general options */
gboolean quiet; /* don't give any output */ gboolean quiet; /* don't give any output */
@ -174,8 +174,8 @@ struct _MuConfig {
mode_t dirmode; /* mode for the created maildir */ mode_t dirmode; /* mode for the created maildir */
/* options for extracting parts */ /* options for extracting parts */
gboolean *save_all; /* extract all parts */ gboolean save_all; /* extract all parts */
gboolean *save_attachments; /* extract all attachment parts */ gboolean save_attachments; /* extract all attachment parts */
gchar *parts; /* comma-sep'd list of parts gchar *parts; /* comma-sep'd list of parts
* to save / open */ * to save / open */
gchar *targetdir; /* where to save the attachments */ gchar *targetdir; /* where to save the attachments */

View File

@ -85,8 +85,7 @@ mug_msg_view_init (MugMsgView * obj)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC); GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled), gtk_container_add (GTK_CONTAINER (scrolled), priv->_view);
priv->_view);
gtk_box_pack_start (GTK_BOX (obj), scrolled, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (obj), scrolled, TRUE, TRUE, 0);
} }