Factor out some code
Signed-off-by: Federico Mena Quintero <federico@gnu.org> svn path=/trunk/; revision=19830
This commit is contained in:
parent
989637296b
commit
d2293cc4f8
@ -593,6 +593,15 @@ clear_completions (GtkFileChooserEntry *chooser_entry)
|
|||||||
chooser_entry->load_complete_action = LOAD_COMPLETE_NOTHING;
|
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
|
static void
|
||||||
gtk_file_chooser_entry_do_delete_text (GtkEditable *editable,
|
gtk_file_chooser_entry_do_delete_text (GtkEditable *editable,
|
||||||
gint start_pos,
|
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);
|
parent_editable_iface->do_delete_text (editable, start_pos, end_pos);
|
||||||
|
|
||||||
if (chooser_entry->in_change)
|
clear_completions_if_not_in_change (chooser_entry);
|
||||||
return;
|
|
||||||
|
|
||||||
clear_completions (chooser_entry);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -616,10 +622,7 @@ gtk_file_chooser_entry_set_position (GtkEditable *editable,
|
|||||||
|
|
||||||
parent_editable_iface->set_position (editable, position);
|
parent_editable_iface->set_position (editable, position);
|
||||||
|
|
||||||
if (chooser_entry->in_change)
|
clear_completions_if_not_in_change (chooser_entry);
|
||||||
return;
|
|
||||||
|
|
||||||
clear_completions (chooser_entry);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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);
|
parent_editable_iface->set_selection_bounds (editable, start_pos, end_pos);
|
||||||
|
|
||||||
if (chooser_entry->in_change)
|
clear_completions_if_not_in_change (chooser_entry);
|
||||||
return;
|
|
||||||
|
|
||||||
clear_completions (chooser_entry);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user