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 744567 - Mark application as busy while loading entries
Mark application as busy while loading entries
Status: RESOLVED FIXED
Product: gnome-logs
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-logs maintainer(s)
gnome-logs maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-02-15 18:11 UTC by Lars Karlitski
Modified: 2015-02-16 14:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Mark application as busy while loading entries.patch (9.03 KB, patch)
2015-02-15 18:11 UTC, Lars Karlitski
accepted-commit_now Details | Review
Mark application as busy while loading entries (4.61 KB, patch)
2015-02-16 06:47 UTC, Lars Karlitski
none Details | Review
Mark application as busy while loading entries (4.67 KB, patch)
2015-02-16 07:46 UTC, Lars Karlitski
committed Details | Review

Description Lars Karlitski 2015-02-15 18:11:55 UTC
Created attachment 296886 [details] [review]
Mark application as busy while loading entries.patch

Signal to the user that gnome-logs is doing something. Up until now, the only
way to see that is to watch the status bar shrink.

This adds gl_application_mark_busy_while(), which could be useful in general.
I've ported it to GApplication and filed [1].

Depends on wip/larsu/listmodel.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=744565
Comment 1 David King 2015-02-15 21:31:23 UTC
Review of attachment 296886 [details] [review]:

Indentation style is a bit off for gnome-logs, although I know that GNU style is common elsewhere.

I really like the concept, and I cannot see any problems with the code. I will review your _bind_model() stuff next. :-)

::: src/gl-application.c
@@ +361,3 @@
+ * Multiple such bindings can exist, but only one property can be bound
+ * per object. Calling this function again for the same object replaces
+ * a previous binding. If property is %NULL, the binding is destroyed.

@property?

::: src/gl-eventviewlist.c
@@ +594,3 @@
     priv->journal_model = gl_journal_model_new ();
+    gl_application_mark_busy_while (GL_APPLICATION (g_application_get_default ()),
+                                    priv->journal_model, "loading");

Very cool!

::: src/gl-journal-model.c
@@ +223,3 @@
+ * @model: a #GlJournalModel
+ *
+ * Returns %TRUE @model is currently loading entries from the journal.

Missing an "if", I suppose.
Comment 2 Lars Karlitski 2015-02-16 06:47:37 UTC
Created attachment 296904 [details] [review]
Mark application as busy while loading entries

Thanks for the review. I've updated the patch.

Also, I got rid of gl_application_mark_busy_while(), because I just pushed
g_application_bind_busy_property() to gio. It's copied verbatim from this patch
(I've incorporated the change you suggested).

> Indentation style is a bit off for gnome-logs, although I know that GNU style
> is common elsewhere.

I'm very used to writing GNU style, sorry. You're right to point this out
though, it should be consistent inside of a project. I'll update this patch
once I've updated the rest of GlJournalModel in my branch.
Comment 3 Lars Karlitski 2015-02-16 07:46:56 UTC
Created attachment 296907 [details] [review]
Mark application as busy while loading entries

Update source style to match the new one in wip/larsu/listmodel.
Comment 4 David King 2015-02-16 14:30:19 UTC
Review of attachment 296907 [details] [review]:

Thanks for getting the change into GLib, and simplifying the patch.
Comment 5 Lars Karlitski 2015-02-16 14:37:26 UTC
Thanks!

Attachment 296907 [details] pushed as 8f50026 - Mark application as busy while loading entries