Fixed alternating button order in Find dialog; use it in more dialogs (LoneFox)

This commit is contained in:
Yevgen Muntyan 2007-12-03 12:32:08 -06:00
parent d4b984a94d
commit c8ea7257a5
5 changed files with 15 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<medit-project version="1.0" type="C" name="moo">
<active>test</active>
<active>debug</active>
<configurations>
<darwin>
<build_dir>build/darwin</build_dir>

View File

@ -93,6 +93,10 @@ _moo_print_preview_init (MooPrintPreview *preview)
moo_glade_xml_fill_widget (preview->priv->xml, GTK_WIDGET (preview),
mooprintpreview_glade_xml, -1,
"dialog", NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (preview),
GTK_RESPONSE_APPLY,
GTK_RESPONSE_CLOSE,
-1);
preview->priv->context = NULL;
preview->priv->gtk_preview = NULL;

View File

@ -190,7 +190,7 @@ moo_find_constructor (GType type,
stock_id, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (find), GTK_RESPONSE_OK,
GTK_STOCK_CANCEL, -1);
GTK_RESPONSE_CANCEL, -1);
gtk_dialog_set_default_response (GTK_DIALOG (find), GTK_RESPONSE_OK);
moo_help_set_id (GTK_WIDGET (find), find->replace ?

View File

@ -364,6 +364,10 @@ create_grep_dialog (MooEditWindow *window,
gtk_dialog_set_response_sensitive (GTK_DIALOG (stuff->grep_dialog),
GTK_RESPONSE_OK, FALSE);
moo_window_set_parent (stuff->grep_dialog, GTK_WIDGET (window));
gtk_dialog_set_alternative_button_order (GTK_DIALOG (stuff->grep_dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
moo_help_set_id (stuff->grep_dialog, HELP_SECTION_DIALOG_FIND_IN_FILES);
moo_help_connect_keys (stuff->grep_dialog);
@ -403,6 +407,10 @@ create_find_dialog (MooEditWindow *window,
GTK_RESPONSE_OK);
gtk_dialog_set_response_sensitive (GTK_DIALOG (stuff->find_dialog),
GTK_RESPONSE_OK, FALSE);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (stuff->find_dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
moo_window_set_parent (stuff->find_dialog, GTK_WIDGET (window));
moo_help_set_id (stuff->find_dialog, HELP_SECTION_DIALOG_FIND_FILE);

View File

@ -64,6 +64,7 @@ def get_format(parent=None):
window = gtk.Dialog("Select Format", parent, 0,
(gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT,
gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))
window.set_alternative_button_order([gtk.RESPONSE_ACCEPT, gtk.RESPONSE_REJECT])
window.set_size_request(250, 300)
swindow = gtk.ScrolledWindow()
treeview = gtk.TreeView()