mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-24 22:40:18 +00:00
Merge pull request #151 from ZoiteChat/about-dialog-fixes
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 *license;
|
||||||
GtkWidget *close;
|
GtkWidget *close;
|
||||||
GtkWidget *actions;
|
GtkWidget *actions;
|
||||||
|
GList *children;
|
||||||
|
GList *child;
|
||||||
static const gchar *empty_people[] = { NULL };
|
static const gchar *empty_people[] = { NULL };
|
||||||
theme_manager_attach_window (GTK_WIDGET (dialog));
|
theme_manager_attach_window (GTK_WIDGET (dialog));
|
||||||
char comment[512];
|
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_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_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);
|
gtk_about_dialog_set_comments (dialog, comment);
|
||||||
website = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_HELP);
|
actions = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
|
||||||
if (!website)
|
children = gtk_container_get_children (GTK_CONTAINER (actions));
|
||||||
website = gtk_dialog_add_button (GTK_DIALOG (dialog), "Website", GTK_RESPONSE_HELP);
|
for (child = children; child; child = child->next)
|
||||||
license = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_APPLY);
|
gtk_widget_destroy (GTK_WIDGET (child->data));
|
||||||
if (!license)
|
g_list_free (children);
|
||||||
license = gtk_dialog_add_button (GTK_DIALOG (dialog), "License", GTK_RESPONSE_APPLY);
|
website = gtk_dialog_add_button (GTK_DIALOG (dialog), "Website", GTK_RESPONSE_HELP);
|
||||||
close = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
|
license = gtk_dialog_add_button (GTK_DIALOG (dialog), "License", GTK_RESPONSE_APPLY);
|
||||||
if (!close)
|
close = gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Close"), GTK_RESPONSE_CLOSE);
|
||||||
close = gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Close"), GTK_RESPONSE_CLOSE);
|
|
||||||
actions = gtk_widget_get_parent (website);
|
|
||||||
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (actions), website, TRUE);
|
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), license, TRUE);
|
||||||
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (actions), close, FALSE);
|
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (actions), close, FALSE);
|
||||||
|
|||||||
Reference in New Issue
Block a user