Kaydet (Commit) 0a90306c authored tarafından Nick Treleaven's avatar Nick Treleaven

Use ui_button_new_with_image() in dialogs_show_unsaved_file().

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1070 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 1ed9cad6
......@@ -12,6 +12,8 @@
on_compiler_treeview_copy_activate() to msgwindow.c.
Create the Recent files submenu item manually because Glade 2.10
removes empty menus.
* src/dialogs.c, src/ui_utils.c:
Use ui_button_new_with_image() in dialogs_show_unsaved_file().
2006-12-08 Enrico Troeger <enrico.troeger@uvena.de>
......
......@@ -333,7 +333,7 @@ void dialogs_show_msgbox(gint type, const gchar *text, ...)
gboolean dialogs_show_unsaved_file(gint idx)
{
#ifndef G_OS_WIN32
GtkWidget *dialog, *button, *label, *image, *hbox, *align;
GtkWidget *dialog, *button;
#endif
gchar *msg, *short_fn = NULL;
gint ret;
......@@ -356,18 +356,7 @@ gboolean dialogs_show_unsaved_file(gint idx)
"%s", _("Do you want to save it before closing?"));
gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
button = gtk_button_new();
label = gtk_label_new_with_mnemonic(_("_Don't save"));
image = gtk_image_new_from_stock(GTK_STOCK_CLEAR, GTK_ICON_SIZE_BUTTON);
hbox = gtk_hbox_new(FALSE, 2);
align = gtk_alignment_new(0.5, 0.5, 0.0, 0.0);
gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0);
gtk_box_pack_end(GTK_BOX(hbox), label, FALSE, FALSE, 0);
gtk_container_add(GTK_CONTAINER(button), align);
gtk_container_add(GTK_CONTAINER(align), hbox);
gtk_widget_show_all(align);
button = ui_button_new_with_image(GTK_STOCK_CLEAR, _("_Don't save"));
gtk_dialog_add_action_widget(GTK_DIALOG(dialog), button, GTK_RESPONSE_NO);
gtk_widget_show(button);
......
......@@ -1096,6 +1096,7 @@ GtkWidget *ui_button_new_with_image(const gchar *stock_id, const gchar *text)
align = gtk_alignment_new(0.5, 0.5, 0.0, 0.0);
gtk_container_add(GTK_CONTAINER(align), hbox);
gtk_container_add(GTK_CONTAINER(button), align);
gtk_widget_show_all(align);
return button;
}
......
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