Bug fix for #149290, based on contributions from Timo Aaltonen, Lucas
2005-04-20 Glynn Foster <glynn.foster@sun.com> * src/msg.c, src/option.c, src/zenity.h: Bug fix for #149290, based on contributions from Timo Aaltonen, Lucas Rocha, and Carlos Parra. * THANKS: Update.
This commit is contained in:
parent
77bd857bfe
commit
6e6eeaf79c
@ -1,3 +1,10 @@
|
||||
2005-04-20 Glynn Foster <glynn.foster@sun.com>
|
||||
|
||||
* src/msg.c, src/option.c, src/zenity.h: Bug fix for
|
||||
#149290, based on contributions from Timo Aaltonen,
|
||||
Lucas Rocha, and Carlos Parra.
|
||||
* THANKS: Update.
|
||||
|
||||
2005-04-06 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* configure.in: Added "ug" to ALL_LINGUAS.
|
||||
|
2
THANKS
2
THANKS
@ -6,6 +6,7 @@
|
||||
"Patches from the following people",
|
||||
"=================================",
|
||||
"Darren Adams <darrenadams dsl pipex com>"
|
||||
"Timo Aaltonen <tjaaltonen gnome cc hut fi>",
|
||||
"Peter Astrand <astrand lysator liu se>",
|
||||
"Jonathan Blandford <jrb redhat com>",
|
||||
"Paul Bolle <pebolle tiscali nl>",
|
||||
@ -30,6 +31,7 @@
|
||||
"Buhan Milne <bgmilne linux-mandrake com>",
|
||||
"Christian Monneckes <c-w-m gmx de>",
|
||||
"Ivan Noris <vix vazka sk>",
|
||||
"Carlos Parra <cparra emergya info>",
|
||||
"Havoc Pennington <hp redhat com>",
|
||||
"Jan Arne Petersen <jpetersen uni-bonn de>",
|
||||
"Kevin C Krinke <kckrinke opendoorsoftware com>",
|
||||
|
@ -110,6 +110,9 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data)
|
||||
if (msg_data->dialog_text)
|
||||
gtk_label_set_markup (GTK_LABEL (text), msg_data->dialog_text);
|
||||
|
||||
if (msg_data->no_wrap)
|
||||
gtk_label_set_line_wrap (GTK_LABEL (text), FALSE);
|
||||
|
||||
zenity_util_show_dialog (dialog);
|
||||
gtk_main ();
|
||||
}
|
||||
|
46
src/option.c
46
src/option.c
@ -34,6 +34,7 @@ gchar *zenity_general_dialog_text;
|
||||
gchar *zenity_general_separator;
|
||||
gboolean zenity_general_editable;
|
||||
gchar *zenity_general_uri;
|
||||
gboolean zenity_general_dialog_no_wrap;
|
||||
|
||||
/* Calendar Dialog Options */
|
||||
gboolean zenity_calendar_active;
|
||||
@ -253,6 +254,15 @@ GOptionEntry error_options[] = {
|
||||
N_("Set the dialog text"),
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"no-wrap",
|
||||
'\0',
|
||||
0,
|
||||
G_OPTION_ARG_NONE,
|
||||
&zenity_general_dialog_no_wrap,
|
||||
N_("Do not enable text wrapping"),
|
||||
NULL
|
||||
},
|
||||
{
|
||||
NULL
|
||||
}
|
||||
@ -277,6 +287,15 @@ GOptionEntry info_options[] = {
|
||||
N_("Set the dialog text"),
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"no-wrap",
|
||||
'\0',
|
||||
0,
|
||||
G_OPTION_ARG_NONE,
|
||||
&zenity_general_dialog_no_wrap,
|
||||
N_("Do not enable text wrapping"),
|
||||
NULL
|
||||
},
|
||||
{
|
||||
NULL
|
||||
}
|
||||
@ -524,6 +543,15 @@ GOptionEntry question_options[] = {
|
||||
N_("Set the dialog text"),
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"no-wrap",
|
||||
'\0',
|
||||
0,
|
||||
G_OPTION_ARG_NONE,
|
||||
&zenity_general_dialog_no_wrap,
|
||||
N_("Do not enable text wrapping"),
|
||||
NULL
|
||||
},
|
||||
{
|
||||
NULL
|
||||
}
|
||||
@ -581,6 +609,15 @@ GOptionEntry warning_options[] = {
|
||||
N_("Set the dialog text"),
|
||||
NULL
|
||||
},
|
||||
{
|
||||
"no-wrap",
|
||||
'\0',
|
||||
0,
|
||||
G_OPTION_ARG_NONE,
|
||||
&zenity_general_dialog_no_wrap,
|
||||
N_("Do not enable text wrapping"),
|
||||
NULL
|
||||
},
|
||||
{
|
||||
NULL
|
||||
}
|
||||
@ -705,6 +742,7 @@ zenity_general_pre_callback (GOptionContext *context,
|
||||
zenity_general_separator = g_strdup ("|");
|
||||
zenity_general_editable = FALSE;
|
||||
zenity_general_uri = NULL;
|
||||
zenity_general_dialog_no_wrap = FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -966,6 +1004,7 @@ zenity_error_post_callback (GOptionContext *context,
|
||||
if (results->mode == MODE_ERROR) {
|
||||
results->msg_data->dialog_text = zenity_general_dialog_text;
|
||||
results->msg_data->mode = ZENITY_MSG_ERROR;
|
||||
results->msg_data->no_wrap = zenity_general_dialog_no_wrap;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@ -982,6 +1021,7 @@ zenity_info_post_callback (GOptionContext *context,
|
||||
if (results->mode == MODE_INFO) {
|
||||
results->msg_data->dialog_text = zenity_general_dialog_text;
|
||||
results->msg_data->mode = ZENITY_MSG_INFO;
|
||||
results->msg_data->no_wrap = zenity_general_dialog_no_wrap;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@ -1128,6 +1168,7 @@ zenity_question_post_callback (GOptionContext *context,
|
||||
if (results->mode == MODE_QUESTION) {
|
||||
results->msg_data->dialog_text = zenity_general_dialog_text;
|
||||
results->msg_data->mode = ZENITY_MSG_QUESTION;
|
||||
results->msg_data->no_wrap = zenity_general_dialog_no_wrap;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@ -1160,6 +1201,7 @@ zenity_warning_post_callback (GOptionContext *context,
|
||||
if (results->mode == MODE_WARNING) {
|
||||
results->msg_data->dialog_text = zenity_general_dialog_text;
|
||||
results->msg_data->mode = ZENITY_MSG_WARNING;
|
||||
results->msg_data->no_wrap = zenity_general_dialog_no_wrap;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@ -1377,5 +1419,9 @@ zenity_option_parse (gint argc, gchar **argv)
|
||||
if (results->mode != MODE_FILE && results->mode != MODE_TEXTINFO)
|
||||
zenity_option_error (zenity_option_get_name (text_options, &zenity_general_uri), ERROR_SUPPORT);
|
||||
|
||||
if (zenity_general_dialog_no_wrap)
|
||||
if (results->mode != MODE_INFO && results->mode != MODE_ERROR && results->mode != MODE_QUESTION && results->mode != MODE_WARNING)
|
||||
zenity_option_error (zenity_option_get_name (text_options, &zenity_general_dialog_no_wrap), ERROR_SUPPORT);
|
||||
|
||||
return results;
|
||||
}
|
||||
|
@ -57,6 +57,7 @@ typedef enum {
|
||||
typedef struct {
|
||||
gchar *dialog_text;
|
||||
MsgMode mode;
|
||||
gboolean no_wrap;
|
||||
} ZenityMsgData;
|
||||
|
||||
typedef struct {
|
||||
|
Reference in New Issue
Block a user