[gnome-builder] libide/gui: remove unnecessary conditional
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide/gui: remove unnecessary conditional
- Date: Sat, 16 Jul 2022 00:48:00 +0000 (UTC)
commit b5cd5ea9ffa47ed415d619561ae1001318420cef
Author: Christian Hergert <chergert redhat com>
Date: Fri Jul 15 17:46:54 2022 -0700
libide/gui: remove unnecessary conditional
We don't really care about this value since we'll get a non-zero value
back anyway if there was a match.
src/libide/gui/ide-search-popover.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/src/libide/gui/ide-search-popover.c b/src/libide/gui/ide-search-popover.c
index 58535ea9a..0641fec41 100644
--- a/src/libide/gui/ide-search-popover.c
+++ b/src/libide/gui/ide-search-popover.c
@@ -118,17 +118,14 @@ ide_search_popover_after_search (IdeSearchPopover *self)
if (self->activate_after_search)
{
- self->activate_after_search = FALSE;
+ IdeSearchResult *selected = gtk_single_selection_get_selected_item (self->selection);
- if (g_list_model_get_n_items (G_LIST_MODEL (self->selection)) > 0)
- {
- IdeSearchResult *selected = gtk_single_selection_get_selected_item (self->selection);
+ g_assert (!selected || IDE_IS_SEARCH_RESULT (selected));
- g_assert (!selected || IDE_IS_SEARCH_RESULT (selected));
+ self->activate_after_search = FALSE;
- if (selected != NULL)
- ide_search_popover_activate (self, selected);
- }
+ if (selected != NULL)
+ ide_search_popover_activate (self, selected);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]