GtkCMCList *clist = GTK_CMCLIST(ctree);
gint row;
GtkVisibility row_visibility, prev_row_visibility, next_row_visibility;
+ gfloat row_align;
cm_return_if_fail(ctree != NULL);
cm_return_if_fail(node != NULL);
next_row_visibility = gtk_cmclist_row_is_visible(clist, row + 1);
if (row_visibility == GTK_VISIBILITY_NONE) {
- gtk_cmclist_moveto(clist, row, -1, 0.5, 0);
+ row_align = 0.5;
+ if (gtk_cmclist_row_is_above_viewport(clist, row))
+ row_align = 0.2;
+ else if (gtk_cmclist_row_is_below_viewport(clist, row))
+ row_align = 0.8;
+ gtk_cmclist_moveto(clist, row, -1, row_align, 0);
return;
}
if (row_visibility == GTK_VISIBILITY_FULL &&
newstyle->bg[GTK_STATE_PRELIGHT] = gdk_color;
newstyle->bg[GTK_STATE_ACTIVE] = gdk_color;
gtk_widget_set_style(widget, newstyle);
+ gtk_style_unref(newstyle);
}
/*!
if (!url)
return NULL;
- gtkut_convert_int_to_gdk_color(prefs_common.uri_col,
+ gtkut_convert_int_to_gdk_color(prefs_common.color[COL_URI],
&uri_color[0]);
- gtkut_convert_int_to_gdk_color(prefs_common.uri_col,
+ gtkut_convert_int_to_gdk_color(prefs_common.color[COL_URI],
&uri_color[1]);
btn = gtk_button_new_with_label(label?label:url);
style->fg[GTK_STATE_ACTIVE] = uri_color[1];
style->fg[GTK_STATE_PRELIGHT] = uri_color[0];
gtk_widget_set_style(btn_label, style);
+ gtk_style_unref(style);
#if !GTK_CHECK_VERSION(3, 0, 0)
} else
g_warning("color allocation failed");
#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
static void auto_configure_done(const gchar *hostname, gint port, gboolean ssl, AutoConfigureData *data)
{
+ gboolean smtp = strcmp(data->tls_service, "submission") == 0 ? TRUE : FALSE;
+
if (hostname != NULL) {
if (data->hostname_entry)
gtk_entry_set_text(data->hostname_entry, hostname);
/* Wizard where TLS is [x]SSL + [x]TLS */
gtk_toggle_button_set_active(data->ssl_checkbtn, TRUE);
}
- gtk_toggle_button_set_active(data->tls_checkbtn, TRUE);
+
+ /* Even though technically this is against the RFCs,
+ * if a "_submission._tcp" SRV record uses port 465,
+ * it is safe to assume TLS-only service, instead of
+ * plaintext + STARTTLS one. */
+ if (smtp && port == 465)
+ gtk_toggle_button_set_active(data->ssl_checkbtn, TRUE);
+ else
+ gtk_toggle_button_set_active(data->tls_checkbtn, TRUE);
}
/* Check authentication by default. This is probably required if