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:
parent
be4fd08c0a
commit
2247fc6659
21
ChangeLog
21
ChangeLog
@ -1,3 +1,24 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2004-03-08 Federico Mena Quintero <federico@ximian.com>
|
2004-03-08 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
* gtk/gtkfilechooserdefault.c (update_from_entry): Return a
|
* gtk/gtkfilechooserdefault.c (update_from_entry): Return a
|
||||||
|
@ -1,3 +1,24 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2004-03-08 Federico Mena Quintero <federico@ximian.com>
|
2004-03-08 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
* gtk/gtkfilechooserdefault.c (update_from_entry): Return a
|
* gtk/gtkfilechooserdefault.c (update_from_entry): Return a
|
||||||
|
@ -1,3 +1,24 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2004-03-08 Federico Mena Quintero <federico@ximian.com>
|
2004-03-08 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
* gtk/gtkfilechooserdefault.c (update_from_entry): Return a
|
* gtk/gtkfilechooserdefault.c (update_from_entry): Return a
|
||||||
|
@ -1,3 +1,24 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2004-03-08 Federico Mena Quintero <federico@ximian.com>
|
2004-03-08 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
* gtk/gtkfilechooserdefault.c (update_from_entry): Return a
|
* gtk/gtkfilechooserdefault.c (update_from_entry): Return a
|
||||||
|
@ -1,3 +1,24 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2004-03-08 Federico Mena Quintero <federico@ximian.com>
|
2004-03-08 Federico Mena Quintero <federico@ximian.com>
|
||||||
|
|
||||||
* gtk/gtkfilechooserdefault.c (update_from_entry): Return a
|
* gtk/gtkfilechooserdefault.c (update_from_entry): Return a
|
||||||
|
@ -274,6 +274,7 @@ static void gtk_file_chooser_default_get_resizable_hints (GtkFileCh
|
|||||||
gboolean *resize_horizontally,
|
gboolean *resize_horizontally,
|
||||||
gboolean *resize_vertically);
|
gboolean *resize_vertically);
|
||||||
static gboolean gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed);
|
static gboolean gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed);
|
||||||
|
static void gtk_file_chooser_default_initial_focus (GtkFileChooserEmbed *chooser_embed);
|
||||||
|
|
||||||
static void location_popup_handler (GtkFileChooserDefault *impl);
|
static void location_popup_handler (GtkFileChooserDefault *impl);
|
||||||
static void up_folder_handler (GtkFileChooserDefault *impl);
|
static void up_folder_handler (GtkFileChooserDefault *impl);
|
||||||
@ -496,6 +497,7 @@ gtk_file_chooser_embed_default_iface_init (GtkFileChooserEmbedIface *iface)
|
|||||||
iface->get_default_size = gtk_file_chooser_default_get_default_size;
|
iface->get_default_size = gtk_file_chooser_default_get_default_size;
|
||||||
iface->get_resizable_hints = gtk_file_chooser_default_get_resizable_hints;
|
iface->get_resizable_hints = gtk_file_chooser_default_get_resizable_hints;
|
||||||
iface->should_respond = gtk_file_chooser_default_should_respond;
|
iface->should_respond = gtk_file_chooser_default_should_respond;
|
||||||
|
iface->initial_focus = gtk_file_chooser_default_initial_focus;
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
gtk_file_chooser_default_init (GtkFileChooserDefault *impl)
|
gtk_file_chooser_default_init (GtkFileChooserDefault *impl)
|
||||||
@ -3561,6 +3563,30 @@ gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Implementation for GtkFileChooserEmbed::initial_focus() */
|
||||||
|
static void
|
||||||
|
gtk_file_chooser_default_initial_focus (GtkFileChooserEmbed *chooser_embed)
|
||||||
|
{
|
||||||
|
GtkFileChooserDefault *impl;
|
||||||
|
GtkWidget *widget;
|
||||||
|
|
||||||
|
impl = GTK_FILE_CHOOSER_DEFAULT (chooser_embed);
|
||||||
|
|
||||||
|
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN
|
||||||
|
|| impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
|
||||||
|
widget = impl->browse_files_tree_view;
|
||||||
|
else if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
|
||||||
|
|| impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
|
||||||
|
widget = impl->save_file_name_entry;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_assert_not_reached ();
|
||||||
|
widget = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
gtk_widget_grab_focus (widget);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_current_filter (GtkFileChooserDefault *impl,
|
set_current_filter (GtkFileChooserDefault *impl,
|
||||||
GtkFileFilter *filter)
|
GtkFileFilter *filter)
|
||||||
|
@ -331,6 +331,8 @@ gtk_file_chooser_dialog_constructor (GType type,
|
|||||||
else
|
else
|
||||||
priv->widget = g_object_new (GTK_TYPE_FILE_CHOOSER_WIDGET, NULL);
|
priv->widget = g_object_new (GTK_TYPE_FILE_CHOOSER_WIDGET, NULL);
|
||||||
|
|
||||||
|
_gtk_file_chooser_embed_initial_focus (GTK_FILE_CHOOSER_EMBED (priv->widget));
|
||||||
|
|
||||||
g_signal_connect (priv->widget, "file-activated",
|
g_signal_connect (priv->widget, "file-activated",
|
||||||
G_CALLBACK (file_chooser_widget_file_activated), object);
|
G_CALLBACK (file_chooser_widget_file_activated), object);
|
||||||
g_signal_connect (priv->widget, "default-size-changed",
|
g_signal_connect (priv->widget, "default-size-changed",
|
||||||
|
@ -10,6 +10,7 @@ static void delegate_get_resizable_hints (GtkFileChooserEmbed *chooser_embe
|
|||||||
gboolean *resize_horizontally,
|
gboolean *resize_horizontally,
|
||||||
gboolean *resize_vertically);
|
gboolean *resize_vertically);
|
||||||
static gboolean delegate_should_respond (GtkFileChooserEmbed *chooser_embed);
|
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,
|
static void delegate_default_size_changed (GtkFileChooserEmbed *chooser_embed,
|
||||||
gpointer data);
|
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_default_size = delegate_get_default_size;
|
||||||
iface->get_resizable_hints = delegate_get_resizable_hints;
|
iface->get_resizable_hints = delegate_get_resizable_hints;
|
||||||
iface->should_respond = delegate_should_respond;
|
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));
|
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
|
static void
|
||||||
delegate_default_size_changed (GtkFileChooserEmbed *chooser_embed,
|
delegate_default_size_changed (GtkFileChooserEmbed *chooser_embed,
|
||||||
gpointer data)
|
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);
|
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
|
void
|
||||||
_gtk_file_chooser_embed_get_resizable_hints (GtkFileChooserEmbed *chooser_embed,
|
_gtk_file_chooser_embed_get_resizable_hints (GtkFileChooserEmbed *chooser_embed,
|
||||||
gboolean *resize_horizontally,
|
gboolean *resize_horizontally,
|
||||||
|
@ -48,6 +48,8 @@ struct _GtkFileChooserEmbedIface
|
|||||||
gboolean *resize_vertically);
|
gboolean *resize_vertically);
|
||||||
|
|
||||||
gboolean (*should_respond) (GtkFileChooserEmbed *chooser_embed);
|
gboolean (*should_respond) (GtkFileChooserEmbed *chooser_embed);
|
||||||
|
|
||||||
|
void (*initial_focus) (GtkFileChooserEmbed *chooser_embed);
|
||||||
/* Signals
|
/* Signals
|
||||||
*/
|
*/
|
||||||
void (*default_size_changed) (GtkFileChooserEmbed *chooser_embed);
|
void (*default_size_changed) (GtkFileChooserEmbed *chooser_embed);
|
||||||
@ -64,6 +66,8 @@ void _gtk_file_chooser_embed_get_resizable_hints (GtkFileChooserEmbed *chooser_
|
|||||||
|
|
||||||
gboolean _gtk_file_chooser_embed_should_respond (GtkFileChooserEmbed *chooser_embed);
|
gboolean _gtk_file_chooser_embed_should_respond (GtkFileChooserEmbed *chooser_embed);
|
||||||
|
|
||||||
|
void _gtk_file_chooser_embed_initial_focus (GtkFileChooserEmbed *chooser_embed);
|
||||||
|
|
||||||
void _gtk_file_chooser_embed_delegate_iface_init (GtkFileChooserEmbedIface *iface);
|
void _gtk_file_chooser_embed_delegate_iface_init (GtkFileChooserEmbedIface *iface);
|
||||||
void _gtk_file_chooser_embed_set_delegate (GtkFileChooserEmbed *receiver,
|
void _gtk_file_chooser_embed_set_delegate (GtkFileChooserEmbed *receiver,
|
||||||
GtkFileChooserEmbed *delegate);
|
GtkFileChooserEmbed *delegate);
|
||||||
|
Loading…
Reference in New Issue
Block a user