mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-24 14:30:18 +00:00
UI: duplicate dialog buttons persisted. This should fix them now.
This commit is contained in:
@@ -1935,6 +1935,8 @@ menu_about (GtkWidget *wid, gpointer sess)
|
||||
GtkWidget *license;
|
||||
GtkWidget *close;
|
||||
GtkWidget *actions;
|
||||
GList *children;
|
||||
GList *child;
|
||||
static const gchar *empty_people[] = { NULL };
|
||||
theme_manager_attach_window (GTK_WIDGET (dialog));
|
||||
char comment[512];
|
||||
@@ -1963,16 +1965,14 @@ menu_about (GtkWidget *wid, gpointer sess)
|
||||
gtk_about_dialog_set_logo (dialog, pix_zoitechat);
|
||||
gtk_about_dialog_set_copyright (dialog, "\302\251 1998-2010 Peter \305\275elezn\303\275\n\302\251 2009-2014 Berke Viktor\n\302\251 2015-2025 Patrick Griffis\n\302\251 2026 deepend");
|
||||
gtk_about_dialog_set_comments (dialog, comment);
|
||||
website = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_HELP);
|
||||
if (!website)
|
||||
website = gtk_dialog_add_button (GTK_DIALOG (dialog), "Website", GTK_RESPONSE_HELP);
|
||||
license = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_APPLY);
|
||||
if (!license)
|
||||
license = gtk_dialog_add_button (GTK_DIALOG (dialog), "License", GTK_RESPONSE_APPLY);
|
||||
close = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
|
||||
if (!close)
|
||||
close = gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Close"), GTK_RESPONSE_CLOSE);
|
||||
actions = gtk_widget_get_parent (website);
|
||||
actions = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
|
||||
children = gtk_container_get_children (GTK_CONTAINER (actions));
|
||||
for (child = children; child; child = child->next)
|
||||
gtk_widget_destroy (GTK_WIDGET (child->data));
|
||||
g_list_free (children);
|
||||
website = gtk_dialog_add_button (GTK_DIALOG (dialog), "Website", GTK_RESPONSE_HELP);
|
||||
license = gtk_dialog_add_button (GTK_DIALOG (dialog), "License", GTK_RESPONSE_APPLY);
|
||||
close = gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Close"), GTK_RESPONSE_CLOSE);
|
||||
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (actions), website, TRUE);
|
||||
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (actions), license, TRUE);
|
||||
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (actions), close, FALSE);
|
||||
|
||||
Reference in New Issue
Block a user