Commit d24e98cc authored by Victor Ananjevsky's avatar Victor Ananjevsky

fix selectable labels behavior

parent 02170b0d
...@@ -41,6 +41,7 @@ GdkPixbuf *big_fallback_image = NULL; ...@@ -41,6 +41,7 @@ GdkPixbuf *big_fallback_image = NULL;
GdkPixbuf *small_fallback_image = NULL; GdkPixbuf *small_fallback_image = NULL;
static GtkWidget *dialog = NULL; static GtkWidget *dialog = NULL;
static GtkWidget *text = NULL;
static gint ret = YAD_RESPONSE_ESC; static gint ret = YAD_RESPONSE_ESC;
...@@ -157,9 +158,9 @@ yad_exit (gint id) ...@@ -157,9 +158,9 @@ yad_exit (gint id)
static GtkWidget * static GtkWidget *
create_layout (GtkWidget *dlg) create_layout (GtkWidget *dlg)
{ {
GtkWidget *image, *text, *mw, *imw, *layout, *exp, *box; GtkWidget *image, *mw, *imw, *layout, *exp, *box;
layout = image = text = mw = exp = NULL; layout = image = mw = exp = NULL;
/* create image */ /* create image */
if (options.data.dialog_image) if (options.data.dialog_image)
...@@ -197,6 +198,7 @@ create_layout (GtkWidget *dlg) ...@@ -197,6 +198,7 @@ create_layout (GtkWidget *dlg)
gtk_label_set_justify (GTK_LABEL (text), options.data.text_align); gtk_label_set_justify (GTK_LABEL (text), options.data.text_align);
gtk_widget_set_state_flags (text, GTK_STATE_NORMAL, FALSE); gtk_widget_set_state_flags (text, GTK_STATE_NORMAL, FALSE);
gtk_label_set_xalign (GTK_LABEL (text), options.data.text_align); gtk_label_set_xalign (GTK_LABEL (text), options.data.text_align);
gtk_widget_set_can_focus (text, FALSE);
} }
} }
...@@ -834,6 +836,9 @@ main (gint argc, gchar ** argv) ...@@ -834,6 +836,9 @@ main (gint argc, gchar ** argv)
picture_fit_to_window (); picture_fit_to_window ();
} }
if (text && options.data.selectable_labels)
gtk_label_select_region (GTK_LABEL (text), 0, 0);
/* run main loop */ /* run main loop */
gtk_main (); gtk_main ();
......
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