After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 771153 - Project list: don't show 'Other projects' when there isn't any.
Project list: don't show 'Other projects' when there isn't any.
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: general
3.21.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-10 04:35 UTC by Mohammed Sadiq
Modified: 2017-01-22 16:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't show Other Projects when it is empty (5.93 KB, patch)
2017-01-22 12:41 UTC, Naman
none Details | Review
Don't show Other Projects when it is empty (6.61 KB, patch)
2017-01-22 15:40 UTC, Naman
committed Details | Review

Description Mohammed Sadiq 2016-09-10 04:35:12 UTC
In the view that lists projects, the list sometimes show 'Other projects' title when there isn't any.

How to reproduce:

1. Open GNOME builder. (There shouldn't be projects below 'Other projects', so that it won't be shown)
2. Click select project for removal button (the tick button).
3. Click the tick button again to disable selection mode.

GNOME builder now shows 'Other projects' title even when it is empty.
Comment 1 Naman 2017-01-22 11:47:41 UTC
Yes, I am able to reproduce this bug.
Working on a fix...
Comment 2 Naman 2017-01-22 12:41:35 UTC
Created attachment 343978 [details] [review]
Don't show Other Projects when it is empty

The Other Projects label is shown even if it
is empty when we go to selection state or gensis
state and then cancel it to come back to the
browse state.

To fix this we have to call the function
ide_greeter_perspective_apply_filter_all when
the cancel button is clicked.
Comment 3 sébastien lafargue 2017-01-22 14:58:39 UTC
Review of attachment 343978 [details] [review]:

fix the comments but LGTM

::: libide/greeter/ide-greeter-perspective.c
@@ +758,3 @@
+static void
+ide_greeter_perspective_cancel_or_genesis_cancel_clicked (IdeGreeterPerspective *self,
+                                        GtkButton             *cancel_button)

params alignment

@@ +761,3 @@
+{
+  g_assert (IDE_IS_GREETER_PERSPECTIVE (self));
+  g_assert (GTK_IS_BUTTON (cancel_button));

empty line between assert and the rest of the code
Comment 4 Naman 2017-01-22 15:40:46 UTC
Created attachment 343981 [details] [review]
Don't show Other Projects when it is empty

The Other Projects label is shown even if it
is empty when we go to selection or genesis
state and then cancel it to come back to the
browse state.

To fix this we have to call the function
ide_greeter_perspective_apply_filter_all
after changing the state to browse when the
Cancel button is clicked.
Comment 5 sébastien lafargue 2017-01-22 16:14:16 UTC
Attachment 343981 [details] pushed as fb2b863 - Don't show Other Projects when it is empty