Destroy the completion feedback window

Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=19843
This commit is contained in:
Federico Mena Quintero 2008-03-13 00:43:36 +00:00 committed by Federico Mena Quintero
parent 53b09108df
commit 2465beb901

View File

@ -92,6 +92,7 @@ static void gtk_file_chooser_entry_iface_init (GtkEditableClass *iface);
static void gtk_file_chooser_entry_finalize (GObject *object); static void gtk_file_chooser_entry_finalize (GObject *object);
static void gtk_file_chooser_entry_dispose (GObject *object); static void gtk_file_chooser_entry_dispose (GObject *object);
static void gtk_file_chooser_entry_grab_focus (GtkWidget *widget); static void gtk_file_chooser_entry_grab_focus (GtkWidget *widget);
static void gtk_file_chooser_entry_unmap (GtkWidget *widget);
static gboolean gtk_file_chooser_entry_focus (GtkWidget *widget, static gboolean gtk_file_chooser_entry_focus (GtkWidget *widget,
GtkDirectionType direction); GtkDirectionType direction);
static gboolean gtk_file_chooser_entry_focus_out_event (GtkWidget *widget, static gboolean gtk_file_chooser_entry_focus_out_event (GtkWidget *widget,
@ -164,6 +165,7 @@ _gtk_file_chooser_entry_class_init (GtkFileChooserEntryClass *class)
gobject_class->dispose = gtk_file_chooser_entry_dispose; gobject_class->dispose = gtk_file_chooser_entry_dispose;
widget_class->grab_focus = gtk_file_chooser_entry_grab_focus; widget_class->grab_focus = gtk_file_chooser_entry_grab_focus;
widget_class->unmap = gtk_file_chooser_entry_unmap;
widget_class->focus = gtk_file_chooser_entry_focus; widget_class->focus = gtk_file_chooser_entry_focus;
widget_class->focus_out_event = gtk_file_chooser_entry_focus_out_event; widget_class->focus_out_event = gtk_file_chooser_entry_focus_out_event;
@ -235,6 +237,8 @@ gtk_file_chooser_entry_dispose (GObject *object)
{ {
GtkFileChooserEntry *chooser_entry = GTK_FILE_CHOOSER_ENTRY (object); GtkFileChooserEntry *chooser_entry = GTK_FILE_CHOOSER_ENTRY (object);
remove_completion_feedback (chooser_entry);
if (chooser_entry->start_autocompletion_idle_id != 0) if (chooser_entry->start_autocompletion_idle_id != 0)
{ {
g_source_remove (chooser_entry->start_autocompletion_idle_id); g_source_remove (chooser_entry->start_autocompletion_idle_id);
@ -760,6 +764,16 @@ gtk_file_chooser_entry_grab_focus (GtkWidget *widget)
_gtk_file_chooser_entry_select_filename (GTK_FILE_CHOOSER_ENTRY (widget)); _gtk_file_chooser_entry_select_filename (GTK_FILE_CHOOSER_ENTRY (widget));
} }
static void
gtk_file_chooser_entry_unmap (GtkWidget *widget)
{
GtkFileChooserEntry *chooser_entry = GTK_FILE_CHOOSER_ENTRY (widget);
remove_completion_feedback (chooser_entry);
GTK_WIDGET_CLASS (_gtk_file_chooser_entry_parent_class)->unmap (widget);
}
static gboolean static gboolean
completion_feedback_window_expose_event_cb (GtkWidget *widget, completion_feedback_window_expose_event_cb (GtkWidget *widget,
GdkEventExpose *event, GdkEventExpose *event,
@ -859,9 +873,13 @@ pop_up_completion_feedback (GtkFileChooserEntry *chooser_entry,
static void static void
remove_completion_feedback (GtkFileChooserEntry *chooser_entry) remove_completion_feedback (GtkFileChooserEntry *chooser_entry)
{ {
/* FIXME */ if (chooser_entry->completion_feedback_window)
gtk_widget_destroy (chooser_entry->completion_feedback_window);
chooser_entry->completion_feedback_window = NULL; chooser_entry->completion_feedback_window = NULL;
chooser_entry->completion_feedback_label = NULL; chooser_entry->completion_feedback_label = NULL;
/* FIXME: remove timer */
} }
static void static void