entry: Return boolean from gtk_entry_grab_focus_without_selecting()

This follows recent changes to gtk_widget_grab_focus().
This commit is contained in:
Benjamin Otte 2019-10-16 21:36:05 +02:00
parent 9b87cace47
commit bab7f56f64
2 changed files with 7 additions and 4 deletions

View File

@ -1695,14 +1695,17 @@ gtk_entry_snapshot (GtkWidget *widget,
* You only want to call this on some special entries
* which the user usually doesn't want to replace all text in,
* such as search-as-you-type entries.
*
* Returns: %TRUE if focus is now inside @self
*/
void
gboolean
gtk_entry_grab_focus_without_selecting (GtkEntry *entry)
{
g_return_if_fail (GTK_IS_ENTRY (entry));
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
gtk_text_grab_focus_without_selecting (GTK_TEXT (priv->text));
g_return_val_if_fail (GTK_IS_ENTRY (entry), FALSE);
return gtk_text_grab_focus_without_selecting (GTK_TEXT (priv->text));
}
static void

View File

@ -304,7 +304,7 @@ GDK_AVAILABLE_IN_ALL
PangoTabArray *gtk_entry_get_tabs (GtkEntry *entry);
GDK_AVAILABLE_IN_ALL
void gtk_entry_grab_focus_without_selecting (GtkEntry *entry);
gboolean gtk_entry_grab_focus_without_selecting (GtkEntry *entry);
GDK_AVAILABLE_IN_ALL
void gtk_entry_set_extra_menu (GtkEntry *entry,