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 ...@@ -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. 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. \fIIMAGE\fP might be file name or icon name from current icon theme.
.TP .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 .B \-\-icon-theme=\fITHEME\fP
Use specified GTK icon theme instead of default. Use specified GTK icon theme instead of default.
.TP .TP
......
...@@ -324,8 +324,10 @@ create_layout (GtkWidget *dlg) ...@@ -324,8 +324,10 @@ create_layout (GtkWidget *dlg)
imw = mw; imw = mw;
/* create layout */ /* create layout */
layout = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5); if (options.data.image_on_top)
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5); {
layout = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
if (image) if (image)
gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 2);
...@@ -340,6 +342,21 @@ create_layout (GtkWidget *dlg) ...@@ -340,6 +342,21 @@ create_layout (GtkWidget *dlg)
else else
gtk_box_pack_start (GTK_BOX (layout), imw, TRUE, TRUE, 0); 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) if (options.mode == YAD_MODE_DND)
dnd_init (layout); dnd_init (layout);
......
...@@ -115,6 +115,8 @@ static GOptionEntry general_options[] = { ...@@ -115,6 +115,8 @@ static GOptionEntry general_options[] = {
N_("Set the dialog text alignment (left, center, right, fill)"), N_("TYPE") }, 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, { "image", 0, G_OPTION_FLAG_NOALIAS, G_OPTION_ARG_FILENAME, &options.data.dialog_image,
N_("Set the dialog image"), N_("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, { "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") }, N_("Use specified icon theme instead of default"), N_("THEME") },
{ "expander", 0, G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, set_expander, { "expander", 0, G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, set_expander,
...@@ -1603,6 +1605,7 @@ yad_options_init (void) ...@@ -1603,6 +1605,7 @@ yad_options_init (void)
options.data.text_width = 0; options.data.text_width = 0;
options.data.text_align = GTK_JUSTIFY_LEFT; options.data.text_align = GTK_JUSTIFY_LEFT;
options.data.dialog_image = NULL; options.data.dialog_image = NULL;
options.data.image_on_top = FALSE;
options.data.icon_theme = NULL; options.data.icon_theme = NULL;
options.data.expander = NULL; options.data.expander = NULL;
options.data.timeout = 0; options.data.timeout = 0;
......
...@@ -238,6 +238,7 @@ typedef struct { ...@@ -238,6 +238,7 @@ typedef struct {
guint text_width; guint text_width;
GtkJustification text_align; GtkJustification text_align;
gchar *dialog_image; gchar *dialog_image;
gboolean image_on_top;
gchar *icon_theme; gchar *icon_theme;
gchar *expander; gchar *expander;
gint borders; 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