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 622352 - Hyena Exception dialog uses "Banshee".
Hyena Exception dialog uses "Banshee".
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
GIT
Other Linux
: Normal trivial
: 0.7.1
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2010-06-22 07:14 UTC by Ruben Vermeersch
Modified: 2010-07-06 20:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix the typo (999 bytes, patch)
2010-06-23 14:46 UTC, Stéphane Maniaci
needs-work Details | Review
Add a ApplicationName property to ApplicationContext. (2.14 KB, patch)
2010-07-01 12:24 UTC, Paul Lange
needs-work Details | Review
Add a ApplicationName property to ApplicationContext. (2.16 KB, patch)
2010-07-01 12:46 UTC, Paul Lange
needs-work Details | Review
Add a ApplicationName property to ApplicationContext. (1.83 KB, patch)
2010-07-01 16:37 UTC, Paul Lange
none Details | Review
Add an ApplicationName property to ApplicationContext. (1.73 KB, patch)
2010-07-01 16:51 UTC, Paul Lange
committed Details | Review
Set application name for exception dialog. (665 bytes, patch)
2010-07-06 20:47 UTC, Paul Lange
committed Details | Review

Description Ruben Vermeersch 2010-06-22 07:14:42 UTC
This should be the name of the application that's running.
Comment 1 Ruben Vermeersch 2010-06-22 07:15:07 UTC
Should be a rather easy fix.
Comment 2 Stéphane Maniaci 2010-06-23 14:46:27 UTC
Created attachment 164398 [details] [review]
Fix the typo

After a night of hacking, here's the patch. Note that grepping Banshee in Hyena shows a lot of references left, so there might be some further work.
Comment 3 Ruben Vermeersch 2010-06-24 08:57:11 UTC
I don't think that's the right solution: this is a user-visible dialog. Ideally it should read "Banshee encountered ..." when used within Banshee and "F-Spot encountered ..." when used within F-Spot.

Adding Gabriel as CC.
Comment 4 Paul Lange 2010-07-01 12:24:24 UTC
Created attachment 165021 [details] [review]
Add a ApplicationName property to ApplicationContext.

This is used to display a proper name in the ExceptionDialog and
 can also be used to set the process name.
Comment 5 Ruben Vermeersch 2010-07-01 12:31:38 UTC
Review of attachment 165021 [details] [review]:

Better solution, but:

::: src/Hyena.Gui/Hyena.Gui.Dialogs/ExceptionDialog.cs
@@ -51,2 +51,4 @@
             Resizable = false;
-            Title = Catalog.GetString("Banshee Encountered a Fatal Error");
+            Title = string.Format("{0} {1}",
+                                  Hyena.ApplicationContext.ApplicationName,
+                                  Catalog.GetString("Encountered a Fatal Error"));

You can't assume that every language puts the application name first. This means you'll have to do something like:

String.Format (Catalog.GetString("{0} Encountered a Fatal Error"), ApplicationContext.ApplicationName)

Mind: String, not string.
Also mind: No Hyena prefix.
Third one: Probably best to add a translators comment here to explain what this string means (=> {0} is substituted by app name).
Comment 6 Ruben Vermeersch 2010-07-01 12:33:31 UTC
Example of a translators comment (from Banshee):

   // Translators: {0} is the name of a library, eg 'Music' or 'Podcasts'
   var label = new Label (String.Format (Catalog.GetString ("{0}:"), library.Name));
Comment 7 Paul Lange 2010-07-01 12:46:57 UTC
Created attachment 165023 [details] [review]
Add a ApplicationName property to ApplicationContext.

This is used to display a proper name in the ExceptionDialog and
 can also be used to set the process name.
Comment 8 Paul Lange 2010-07-01 12:50:29 UTC
Thanks for looking at this Ruben. 

Why should I use String and not string?
Comment 9 Ruben Vermeersch 2010-07-01 12:50:32 UTC
Review of attachment 165023 [details] [review]:

Looks good for me, will talk to Gabriel to get this committed. Thanks a lot!
Comment 10 Gabriel Burt 2010-07-01 16:28:01 UTC
Comment on attachment 165023 [details] [review]
Add a ApplicationName property to ApplicationContext.

I don't like the +        public static void TrySetProcessName ()
part of the patch, since "PDF Mod" isn't what I'd want the process name to be, but rather "pdfmod".  Plus the ApplicationName may be translated.

Maybe we should just remove "Banshee " from the string, leaving it "Encountered a Fatal Error"?

If you really think having the name in there is important, then change the property decl to "public static string ApplicationName { get; set; }" all one line, lower case string for declarations.
Comment 11 Ruben Vermeersch 2010-07-01 16:30:58 UTC
(In reply to comment #10)
> If you really think having the name in there is important, then change the
> property decl to "public static string ApplicationName { get; set; }" all one
> line, lower case string for declarations.

It's not that important for F-Spot, but it matters for Banshee. When streaming from the systray, Banshee occasionally runs into a fatal error and pops up that dialog. Without the name in there, I'd have no idea who caused it. Oh and the funny thing is that it keeps on playing.

So let's just drop the TrySetProcessName part of it :-)
Comment 12 Paul Lange 2010-07-01 16:37:49 UTC
Created attachment 165035 [details] [review]
Add a ApplicationName property to ApplicationContext.

This is used to display a proper name in the ExceptionDialog and
 can also be used to set the process name.
Comment 13 Paul Lange 2010-07-01 16:51:33 UTC
Created attachment 165038 [details] [review]
Add an ApplicationName property to ApplicationContext.
Comment 14 Gabriel Burt 2010-07-06 20:39:14 UTC
Review of attachment 165038 [details] [review]:

Committed, thanks
Comment 15 Paul Lange 2010-07-06 20:47:50 UTC
Created attachment 165381 [details] [review]
Set application name for exception dialog.
Comment 16 Paul Lange 2010-07-06 20:48:49 UTC
The last patch with an update of the linked hyena version should fix this.
Comment 17 Ruben Vermeersch 2010-07-06 20:52:44 UTC
Comment on attachment 165381 [details] [review]
Set application name for exception dialog.

Merged