Factor out some code

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

svn path=/trunk/; revision=19830
This commit is contained in:
Federico Mena Quintero 2008-03-13 00:39:15 +00:00 committed by Federico Mena Quintero
parent 989637296b
commit d2293cc4f8

View File

@ -593,6 +593,15 @@ clear_completions (GtkFileChooserEntry *chooser_entry)
chooser_entry->load_complete_action = LOAD_COMPLETE_NOTHING;
}
static void
clear_completions_if_not_in_change (GtkFileChooserEntry *chooser_entry)
{
if (chooser_entry->in_change)
return;
clear_completions (chooser_entry);
}
static void
gtk_file_chooser_entry_do_delete_text (GtkEditable *editable,
gint start_pos,
@ -602,10 +611,7 @@ gtk_file_chooser_entry_do_delete_text (GtkEditable *editable,
parent_editable_iface->do_delete_text (editable, start_pos, end_pos);
if (chooser_entry->in_change)
return;
clear_completions (chooser_entry);
clear_completions_if_not_in_change (chooser_entry);
}
static void
@ -616,10 +622,7 @@ gtk_file_chooser_entry_set_position (GtkEditable *editable,
parent_editable_iface->set_position (editable, position);
if (chooser_entry->in_change)
return;
clear_completions (chooser_entry);
clear_completions_if_not_in_change (chooser_entry);
}
static void
@ -631,10 +634,7 @@ gtk_file_chooser_entry_set_selection_bounds (GtkEditable *editable,
parent_editable_iface->set_selection_bounds (editable, start_pos, end_pos);
if (chooser_entry->in_change)
return;
clear_completions (chooser_entry);
clear_completions_if_not_in_change (chooser_entry);
}
static void