diff options
author | Adam Williamson <awilliam@redhat.com> | 2023-04-20 11:57:34 -0700 |
---|---|---|
committer | Adam Williamson <awilliam@redhat.com> | 2023-04-20 11:57:34 -0700 |
commit | 5db548c4368459eb71da8f2a923c8830f5e0bcba (patch) | |
tree | f8fb52b0ef9b8d23aa46cc55274db9d71193b356 /src | |
parent | 7998cc581046aeab3f7c952656aec8accaef76e2 (diff) | |
download | zenity-5db548c4368459eb71da8f2a923c8830f5e0bcba.tar.gz |
Set dialog 'heading', not 'title'
In the GTK 4 port, we made all Zenity dialogs use the libadwaita
`AdwMessageDialog` class. This dialog does not have a title bar
and does not show its title. The equivalent to title for this
class is 'heading' - everywhere we were previously setting the
title, we should set the 'heading' instead.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/calendar.c | 2 | ||||
-rw-r--r-- | src/entry.c | 2 | ||||
-rw-r--r-- | src/forms.c | 2 | ||||
-rw-r--r-- | src/msg.c | 2 | ||||
-rw-r--r-- | src/password.c | 2 | ||||
-rw-r--r-- | src/progress.c | 2 | ||||
-rw-r--r-- | src/scale.c | 2 | ||||
-rw-r--r-- | src/text.c | 2 | ||||
-rw-r--r-- | src/tree.c | 2 | ||||
-rw-r--r-- | src/zenity.ui | 22 |
10 files changed, 20 insertions, 20 deletions
diff --git a/src/calendar.c b/src/calendar.c index f5237d1..1eac9f3 100644 --- a/src/calendar.c +++ b/src/calendar.c @@ -60,7 +60,7 @@ zenity_calendar (ZenityData *data, ZenityCalendarData *cal_data) G_CALLBACK(zenity_calendar_dialog_response), data); if (data->dialog_title) - gtk_window_set_title (GTK_WINDOW (dialog), data->dialog_title); + adw_message_dialog_set_heading (ADW_MESSAGE_DIALOG(dialog), data->dialog_title);; gtk_window_set_icon_name (GTK_WINDOW(dialog), "x-office-calendar"); diff --git a/src/entry.c b/src/entry.c index bf94cd4..2632d28 100644 --- a/src/entry.c +++ b/src/entry.c @@ -73,7 +73,7 @@ zenity_entry (ZenityData *data, ZenityEntryData *entry_data) g_signal_connect (dialog, "response", G_CALLBACK(zenity_entry_dialog_response), data); if (data->dialog_title) - gtk_window_set_title (GTK_WINDOW(dialog), data->dialog_title); + adw_message_dialog_set_heading (ADW_MESSAGE_DIALOG(dialog), data->dialog_title);; gtk_window_set_icon_name (GTK_WINDOW(dialog), "insert-text"); diff --git a/src/forms.c b/src/forms.c index 4e4a60e..59ada04 100644 --- a/src/forms.c +++ b/src/forms.c @@ -248,7 +248,7 @@ zenity_forms_dialog (ZenityData *data, ZenityFormsData *forms_data) G_CALLBACK (zenity_forms_dialog_response), forms_data); if (data->dialog_title) - gtk_window_set_title (GTK_WINDOW(dialog), data->dialog_title); + adw_message_dialog_set_heading (ADW_MESSAGE_DIALOG(dialog), data->dialog_title);; if (data->width > -1 || data->height > -1) { gtk_window_set_default_size (GTK_WINDOW(dialog), @@ -122,7 +122,7 @@ zenity_msg (ZenityData *data, ZenityMsgData *msg_data) g_signal_connect (dialog, "response", G_CALLBACK(zenity_msg_dialog_response), data); if (data->dialog_title) - gtk_window_set_title (GTK_WINDOW (dialog), data->dialog_title); + adw_message_dialog_set_heading (ADW_MESSAGE_DIALOG(dialog), data->dialog_title);; if (data->ok_label) { diff --git a/src/password.c b/src/password.c index 69dd683..fc27021 100644 --- a/src/password.c +++ b/src/password.c @@ -120,7 +120,7 @@ zenity_password_dialog (ZenityData *data, ZenityPasswordData *password_data) 1, 1); if (data->dialog_title) - gtk_window_set_title (GTK_WINDOW(dialog), data->dialog_title); + adw_message_dialog_set_heading (ADW_MESSAGE_DIALOG(dialog), data->dialog_title);; if (data->modal) gtk_window_set_modal (GTK_WINDOW(dialog), TRUE); diff --git a/src/progress.c b/src/progress.c index cae1a6c..a33763d 100644 --- a/src/progress.c +++ b/src/progress.c @@ -340,7 +340,7 @@ zenity_progress (ZenityData *data, ZenityProgressData *progress_data) g_signal_connect (dialog, "response", G_CALLBACK(zenity_progress_dialog_response), data); if (data->dialog_title) - gtk_window_set_title (GTK_WINDOW(dialog), data->dialog_title); + adw_message_dialog_set_heading (ADW_MESSAGE_DIALOG(dialog), data->dialog_title);; gtk_window_set_icon_name (GTK_WINDOW(dialog), "appointment-soon"); diff --git a/src/scale.c b/src/scale.c index 7ac0f41..73ab015 100644 --- a/src/scale.c +++ b/src/scale.c @@ -73,7 +73,7 @@ zenity_scale (ZenityData *data, ZenityScaleData *scale_data) } if (data->dialog_title) - gtk_window_set_title (GTK_WINDOW (dialog), data->dialog_title); + adw_message_dialog_set_heading (ADW_MESSAGE_DIALOG(dialog), data->dialog_title);; gtk_window_set_icon_name (GTK_WINDOW(dialog), "dialog-question"); @@ -280,7 +280,7 @@ zenity_text (ZenityData *data, ZenityTextData *text_data) G_CALLBACK(zenity_text_dialog_response), data); if (data->dialog_title) - gtk_window_set_title (GTK_WINDOW(dialog), data->dialog_title); + adw_message_dialog_set_heading (ADW_MESSAGE_DIALOG(dialog), data->dialog_title);; gtk_window_set_icon_name (GTK_WINDOW(dialog), "accessories-text-editor"); @@ -291,7 +291,7 @@ zenity_tree (ZenityData *data, ZenityTreeData *tree_data) g_signal_connect (dialog, "response", G_CALLBACK(zenity_tree_dialog_response), data); if (data->dialog_title) - gtk_window_set_title (GTK_WINDOW (dialog), data->dialog_title); + adw_message_dialog_set_heading (ADW_MESSAGE_DIALOG(dialog), data->dialog_title);; if (data->modal) gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); diff --git a/src/zenity.ui b/src/zenity.ui index e4e6a5b..5644aff 100644 --- a/src/zenity.ui +++ b/src/zenity.ui @@ -6,7 +6,7 @@ <interface> <requires lib="gtk" version="4.0"/> <object class="AdwMessageDialog" id="zenity_scale_dialog"> - <property name="title" translatable="yes">Adjust the scale value</property> + <property name="heading" translatable="yes">Adjust the scale value</property> <property name="default_width">300</property> <property name="default_height">100</property> <property name="extra-child">zenity_scale_box</property> @@ -42,7 +42,7 @@ </child> </object> <object class="AdwMessageDialog" id="zenity_text_dialog"> - <property name="title" translatable="yes">Text View</property> + <property name="heading" translatable="yes">Text View</property> <property name="default_width">300</property> <property name="default_height">200</property> <property name="resizable">true</property> @@ -79,7 +79,7 @@ </child> </object> <object class="AdwMessageDialog" id="zenity_calendar_dialog"> - <property name="title" translatable="yes">Calendar selection</property> + <property name="heading" translatable="yes">Calendar selection</property> <property name="extra-child">zenity_calendar_box</property> <responses> <response id="cancel" translatable="yes">_Cancel</response> @@ -129,7 +129,7 @@ </child> </object> <object class="AdwMessageDialog" id="zenity_entry_dialog"> - <property name="title" translatable="yes">Add a new entry</property> + <property name="heading" translatable="yes">Add a new entry</property> <property name="extra-child">zenity_entry_box</property> <responses> <response id="cancel" translatable="yes">_Cancel</response> @@ -167,7 +167,7 @@ </child> </object> <object class="AdwMessageDialog" id="zenity_error_dialog"> - <property name="title" translatable="yes">Error</property> + <property name="heading" translatable="yes">Error</property> <property name="extra-child">zenity_error_box</property> <responses> <response id="ok" translatable="yes">_OK</response> @@ -266,7 +266,7 @@ </child> </object> <object class="AdwMessageDialog" id="zenity_info_dialog"> - <property name="title" translatable="yes">Information</property> + <property name="heading" translatable="yes">Information</property> <property name="extra-child">zenity_info_box</property> <responses> <response id="ok" translatable="yes">_OK</response> @@ -302,7 +302,7 @@ </child> </object> <object class="AdwMessageDialog" id="zenity_progress_dialog"> - <property name="title" translatable="yes">Progress</property> + <property name="heading" translatable="yes">Progress</property> <property name="extra-child">zenity_progress_box</property> </object> <object class="GtkBox" id="zenity_progress_box"> @@ -336,7 +336,7 @@ </child> </object> <object class="AdwMessageDialog" id="zenity_question_dialog"> - <property name="title" translatable="yes">Question</property> + <property name="heading" translatable="yes">Question</property> <property name="extra-child">zenity_question_box</property> <responses> <response id="no" translatable="yes">_No</response> @@ -372,7 +372,7 @@ </child> </object> <object class="AdwMessageDialog" id="zenity_tree_dialog"> - <property name="title" translatable="yes">Select items from the list</property> + <property name="heading" translatable="yes">Select items from the list</property> <property name="default_width">480</property> <property name="default_height">320</property> <property name="extra-child">zenity_tree_box</property> @@ -412,7 +412,7 @@ </child> </object> <object class="AdwMessageDialog" id="zenity_warning_dialog"> - <property name="title" translatable="yes">Warning</property> + <property name="heading" translatable="yes">Warning</property> <property name="resizable">false</property> <property name="extra-child">zenity_warning_box</property> <responses> @@ -449,7 +449,7 @@ </child> </object> <object class="AdwMessageDialog" id="zenity_password_dialog"> - <property name="title" translatable="yes">Warning</property> + <property name="heading" translatable="yes">Warning</property> <property name="resizable">false</property> <property name="extra-child">zenity_password_box</property> <responses> |