summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserembed.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2004-03-08 22:21:47 +0000
committerFederico Mena Quintero <federico@src.gnome.org>2004-03-08 22:21:47 +0000
commit2247fc6659fc9ffeb7d169f01d7e9c11e68f239c (patch)
tree45e5e2200eac443ec63bf8835324fdc52695e858 /gtk/gtkfilechooserembed.c
parentbe4fd08c0aab27b8bc02f1328805ba0997e4b706 (diff)
downloadgtk+-2247fc6659fc9ffeb7d169f01d7e9c11e68f239c.tar.gz
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.
Diffstat (limited to 'gtk/gtkfilechooserembed.c')
-rw-r--r--gtk/gtkfilechooserembed.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gtk/gtkfilechooserembed.c b/gtk/gtkfilechooserembed.c
index 0705ff8f41..3e3b625032 100644
--- a/gtk/gtkfilechooserembed.c
+++ b/gtk/gtkfilechooserembed.c
@@ -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;
}
/**
@@ -84,6 +86,12 @@ delegate_should_respond (GtkFileChooserEmbed *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)
{
@@ -153,6 +161,14 @@ _gtk_file_chooser_embed_should_respond (GtkFileChooserEmbed *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,
gboolean *resize_vertically)