Commit 36f4ca7a authored by Vladislav's avatar Vladislav

Revert image-on-top for left image position

parent 92a7978d
......@@ -137,6 +137,9 @@ Set type of dialog text justification. \fITYPE\fP may be \fIleft\fP, \fIright\fP
Set the dialog image which appears on the left side of dialog`s text.
\fIIMAGE\fP might be file name or icon name from current icon theme.
.TP
.B \-\-image-on-top
Show image above main widget instead of left. This option is always on for print dialog.
.TP
.B \-\-icon-theme=\fITHEME\fP
Use specified GTK icon theme instead of default.
.TP
......
......@@ -324,6 +324,8 @@ create_layout (GtkWidget *dlg)
imw = mw;
/* create layout */
if (options.data.image_on_top)
{
layout = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
......@@ -340,6 +342,21 @@ create_layout (GtkWidget *dlg)
else
gtk_box_pack_start (GTK_BOX (layout), imw, TRUE, TRUE, 0);
}
}
else
{
layout = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
if (text)
gtk_box_pack_start (GTK_BOX (box), text, FALSE, FALSE, 0);
if (imw)
gtk_box_pack_start (GTK_BOX (box), imw, TRUE, TRUE, 0);
if (image)
gtk_box_pack_start (GTK_BOX (layout), image, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (layout), box, TRUE, TRUE, 0);
}
if (options.mode == YAD_MODE_DND)
dnd_init (layout);
......
......@@ -115,6 +115,8 @@ static GOptionEntry general_options[] = {
N_("Set the dialog text alignment (left, center, right, fill)"), N_("TYPE") },
{ "image", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_FILENAME, &options.data.dialog_image,
N_("Set the dialog image"), N_("IMAGE") },
{ "image-on-top", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_NONE, &options.data.image_on_top,
N_("Show image above main widget"), NULL },
{ "icon-theme", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_STRING, &options.data.icon_theme,
N_("Use specified icon theme instead of default"), N_("THEME") },
{ "expander", 0, G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, set_expander,
......@@ -1603,6 +1605,7 @@ yad_options_init (void)
options.data.text_width = 0;
options.data.text_align = GTK_JUSTIFY_LEFT;
options.data.dialog_image = NULL;
options.data.image_on_top = FALSE;
options.data.icon_theme = NULL;
options.data.expander = NULL;
options.data.timeout = 0;
......
......@@ -238,6 +238,7 @@ typedef struct {
guint text_width;
GtkJustification text_align;
gchar *dialog_image;
gboolean image_on_top;
gchar *icon_theme;
gchar *expander;
gint borders;
......
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