Use a Save or an Open stock button for the C-l dialog depending on the

2004-06-22  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (location_popup_handler): Use a Save
	or an Open stock button for the C-l dialog depending on the action
	in which the file chooser operates.  Fixes #141753.
This commit is contained in:
Federico Mena Quintero 2004-06-23 00:28:47 +00:00 committed by Federico Mena Quintero
parent a2e95582ca
commit 765d7d0517
5 changed files with 29 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2004-06-22 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (location_popup_handler): Use a Save
or an Open stock button for the C-l dialog depending on the action
in which the file chooser operates. Fixes #141753.
2004-06-22 Federico Mena Quintero <federico@ximian.com> 2004-06-22 Federico Mena Quintero <federico@ximian.com>
Fixes the GTK+ part of #142308: Fixes the GTK+ part of #142308:

View File

@ -1,3 +1,9 @@
2004-06-22 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (location_popup_handler): Use a Save
or an Open stock button for the C-l dialog depending on the action
in which the file chooser operates. Fixes #141753.
2004-06-22 Federico Mena Quintero <federico@ximian.com> 2004-06-22 Federico Mena Quintero <federico@ximian.com>
Fixes the GTK+ part of #142308: Fixes the GTK+ part of #142308:

View File

@ -1,3 +1,9 @@
2004-06-22 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (location_popup_handler): Use a Save
or an Open stock button for the C-l dialog depending on the action
in which the file chooser operates. Fixes #141753.
2004-06-22 Federico Mena Quintero <federico@ximian.com> 2004-06-22 Federico Mena Quintero <federico@ximian.com>
Fixes the GTK+ part of #142308: Fixes the GTK+ part of #142308:

View File

@ -1,3 +1,9 @@
2004-06-22 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (location_popup_handler): Use a Save
or an Open stock button for the C-l dialog depending on the action
in which the file chooser operates. Fixes #141753.
2004-06-22 Federico Mena Quintero <federico@ximian.com> 2004-06-22 Federico Mena Quintero <federico@ximian.com>
Fixes the GTK+ part of #142308: Fixes the GTK+ part of #142308:

View File

@ -5328,7 +5328,8 @@ location_popup_handler (GtkFileChooserDefault *impl)
GtkWidget *label; GtkWidget *label;
GtkWidget *entry; GtkWidget *entry;
gboolean refocus; gboolean refocus;
char *title; const char *title;
const char *accept_stock;
/* Create dialog */ /* Create dialog */
@ -5338,19 +5339,21 @@ location_popup_handler (GtkFileChooserDefault *impl)
|| impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) || impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
{ {
title = _("Open Location"); title = _("Open Location");
accept_stock = GTK_STOCK_OPEN;
} }
else else
{ {
g_assert (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE g_assert (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
|| impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER); || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER);
title = _("Save in Location"); title = _("Save in Location");
accept_stock = GTK_STOCK_SAVE;
} }
dialog = gtk_dialog_new_with_buttons (title, dialog = gtk_dialog_new_with_buttons (title,
toplevel, toplevel,
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, accept_stock, GTK_RESPONSE_ACCEPT,
NULL); NULL);
gtk_window_set_default_size (GTK_WINDOW (dialog), 300, -1); gtk_window_set_default_size (GTK_WINDOW (dialog), 300, -1);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);