Commit a3a9c5e7 authored by Victor Ananjevsky's avatar Victor Ananjevsky

select font on double-click

parent 544ffb49
......@@ -26,6 +26,13 @@
static GtkWidget *font;
static void
font_activated_cb (GtkFontChooser *w, gchar *fn, gpointer d)
{
if (options.plug == -1)
yad_exit (options.data.def_resp);
}
static void
realize_cb (GtkWidget * w, gpointer d)
{
gtk_font_chooser_set_font (GTK_FONT_CHOOSER (w), options.common_data.font);
......@@ -42,6 +49,8 @@ font_create_widget (GtkWidget * dlg)
if (options.font_data.preview)
gtk_font_chooser_set_preview_text (GTK_FONT_CHOOSER (w), options.font_data.preview);
g_signal_connect (G_OBJECT (w), "font-activated", G_CALLBACK (font_activated_cb), NULL);
/* font must be set after widget inserted in toplevel */
if (options.common_data.font)
g_signal_connect_after (G_OBJECT (w), "realize", G_CALLBACK (realize_cb), NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment