Fixes #136105.
2004-03-08 Federico Mena Quintero <federico@ximian.com> Fixes #136105. * gtk/gtkfilechooserembed.h (struct _GtkFileChooserEmbedIface): Added an ::initial_focus() method. * gtk/gtkfilechooserembed.c (_gtk_file_chooser_embed_delegate_iface_init): Set the initial_focus method. (delegate_initial_focus): Implement. (_gtk_file_chooser_embed_initial_focus): New function. * gtk/gtkfilechooserdialog.c (gtk_file_chooser_dialog_constructor): Call _gtk_file_chooser_embed_initial_focus(). * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_init): Install the ::initial_focus() handler. (gtk_file_chooser_default_initial_focus): Implement.
This commit is contained in:

committed by
Federico Mena Quintero

parent
be4fd08c0a
commit
2247fc6659
@ -10,6 +10,7 @@ static void delegate_get_resizable_hints (GtkFileChooserEmbed *chooser_embe
|
||||
gboolean *resize_horizontally,
|
||||
gboolean *resize_vertically);
|
||||
static gboolean delegate_should_respond (GtkFileChooserEmbed *chooser_embed);
|
||||
static void delegate_initial_focus (GtkFileChooserEmbed *chooser_embed);
|
||||
static void delegate_default_size_changed (GtkFileChooserEmbed *chooser_embed,
|
||||
gpointer data);
|
||||
|
||||
@ -34,6 +35,7 @@ _gtk_file_chooser_embed_delegate_iface_init (GtkFileChooserEmbedIface *iface)
|
||||
iface->get_default_size = delegate_get_default_size;
|
||||
iface->get_resizable_hints = delegate_get_resizable_hints;
|
||||
iface->should_respond = delegate_should_respond;
|
||||
iface->initial_focus = delegate_initial_focus;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -83,6 +85,12 @@ delegate_should_respond (GtkFileChooserEmbed *chooser_embed)
|
||||
return _gtk_file_chooser_embed_should_respond (get_delegate (chooser_embed));
|
||||
}
|
||||
|
||||
static void
|
||||
delegate_initial_focus (GtkFileChooserEmbed *chooser_embed)
|
||||
{
|
||||
return _gtk_file_chooser_embed_initial_focus (get_delegate (chooser_embed));
|
||||
}
|
||||
|
||||
static void
|
||||
delegate_default_size_changed (GtkFileChooserEmbed *chooser_embed,
|
||||
gpointer data)
|
||||
@ -152,6 +160,14 @@ _gtk_file_chooser_embed_should_respond (GtkFileChooserEmbed *chooser_embed)
|
||||
return GTK_FILE_CHOOSER_EMBED_GET_IFACE (chooser_embed)->should_respond (chooser_embed);
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_file_chooser_embed_initial_focus (GtkFileChooserEmbed *chooser_embed)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_FILE_CHOOSER_EMBED (chooser_embed));
|
||||
|
||||
GTK_FILE_CHOOSER_EMBED_GET_IFACE (chooser_embed)->initial_focus (chooser_embed);
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_file_chooser_embed_get_resizable_hints (GtkFileChooserEmbed *chooser_embed,
|
||||
gboolean *resize_horizontally,
|
||||
|
Reference in New Issue
Block a user