diff options
author | Federico Mena Quintero <federico@ximian.com> | 2003-09-11 00:33:28 +0000 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2003-09-11 00:33:28 +0000 |
commit | aa22566e6c98745e38b777b2c099bdc799857f59 (patch) | |
tree | f8b1a77adfa66d7e0e471c6c705a05ea5f739fa2 /gtk/gtkfilechooserutils.c | |
parent | e23ed607821328952000268ff8227cf36cddefc9 (diff) | |
download | gtk+-aa22566e6c98745e38b777b2c099bdc799857f59.tar.gz |
Connect to "row_activated" on the file list. (list_row_activated): New
2003-09-10 Federico Mena Quintero <federico@ximian.com>
* gtkfilechooserimpldefault.c (create_file_list): Connect to
"row_activated" on the file list.
(list_row_activated): New function. Changes to folders or emits
the "file-activated" signal depending on what type of row was
activated.
(create_folder_tree): Renamed from create_directory_tree(), since
"folder" is the new politically-correct name.
* gtkfilechooserprivate.h (struct _GtkFileChooserIface): Added a
file-activated signal.
* gtkfilechooser.c (gtk_file_chooser_class_init): Register the
signal.
* gtkfilechooserutils.c (_gtk_file_chooser_set_delegate): Connect
to "file-activated" on the delegate.
(delegate_file_activated): New function.
* TODO: Added an API item about Clipart-like folders provided by
applications.
Diffstat (limited to 'gtk/gtkfilechooserutils.c')
-rw-r--r-- | gtk/gtkfilechooserutils.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gtkfilechooserutils.c b/gtk/gtkfilechooserutils.c index 687cf44714..593a7ab567 100644 --- a/gtk/gtkfilechooserutils.c +++ b/gtk/gtkfilechooserutils.c @@ -52,6 +52,8 @@ static void delegate_selection_changed (GtkFileChooser *choose gpointer data); static void delegate_update_preview (GtkFileChooser *chooser, gpointer data); +static void delegate_file_activated (GtkFileChooser *chooser, + gpointer data); /** * _gtk_file_chooser_install_properties: @@ -156,6 +158,8 @@ _gtk_file_chooser_set_delegate (GtkFileChooser *receiver, G_CALLBACK (delegate_selection_changed), receiver); g_signal_connect (delegate, "update-preview", G_CALLBACK (delegate_update_preview), receiver); + g_signal_connect (delegate, "file-activated", + G_CALLBACK (delegate_file_activated), receiver); } static GtkFileChooser * @@ -280,3 +284,10 @@ delegate_update_preview (GtkFileChooser *chooser, { g_signal_emit_by_name (data, "update-preview"); } + +static void +delegate_file_activated (GtkFileChooser *chooser, + gpointer data) +{ + g_signal_emit_by_name (data, "file-activated"); +} |