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 594576 - Empathy should complain at runtime if MC5 is not installed
Empathy should complain at runtime if MC5 is not installed
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
2.27.x
Other Linux
: Low trivial
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2009-09-09 00:00 UTC by Maciej (Matthew) Piechotka
Modified: 2010-10-15 03:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A modal dialog to warn the user if account manager could not be contacted (1.02 KB, patch)
2010-10-15 00:34 UTC, Chandni Verma
needs-work Details | Review
Same as the previous patch but with the indentation rectified (1.01 KB, patch)
2010-10-15 00:51 UTC, Chandni Verma
none Details | Review
Reviews attended (708 bytes, patch)
2010-10-15 01:18 UTC, Chandni Verma
none Details | Review
rectified (891 bytes, patch)
2010-10-15 02:01 UTC, Chandni Verma
none Details | Review
The final patch (1.28 KB, patch)
2010-10-15 02:58 UTC, Chandni Verma
none Details | Review

Description Maciej (Matthew) Piechotka 2009-09-09 00:00:12 UTC
In empahy 2.27.91 and 2.27.92 I cannot create any account. The ones from previous version are gone.

2.27.5 works - hence there is problem with MC migration.
Comment 1 Guillaume Desmottes 2009-09-09 09:28:24 UTC
Do you have telepathy-mission-control-5 installed?
Comment 2 Maciej (Matthew) Piechotka 2009-09-09 09:45:49 UTC
(In reply to comment #1)
> Do you have telepathy-mission-control-5 installed?

No. I have last package from mission control website- 4.67 or something similar.
I cannot find source tarball as well under this name (I'll need to package it myself).
Comment 3 Maciej (Matthew) Piechotka 2009-09-09 09:48:21 UTC
Ok. Found. But I guess ./configure could check for it - or at least message info displayed.
Comment 4 Guillaume Desmottes 2009-09-09 10:00:14 UTC
MC5 is a run time dep, not a build time one so we can't check for it during configure.

As said, in the Empathy 2.27.91 release notes, MC5 is now mandatory. Distro should ship it with Empathy.
Comment 5 Maciej (Matthew) Piechotka 2009-09-09 10:13:53 UTC
(In reply to comment #4)
> MC5 is a run time dep, not a build time one so we can't check for it during
> configure.
> 
> As said, in the Empathy 2.27.91 release notes, MC5 is now mandatory. Distro
> should ship it with Empathy.

Well. As time-to-time packager (i.e. not official but sometimes sending ebuilds) I can say that I hardly ever see to release notes - it hardly ever mentioned there any package dependencies - 99.9% of dependencies are either build-time dependences or metioned in configured. The rest 0.01% is mentioned in varies places.

While I understend that MC5 is mandatory for build but notification of failture would be really nice. For example "Mission-controll is not found. Please install telepathy-mission-control package" or something like that.
Comment 6 Maciej (Matthew) Piechotka 2009-09-09 10:16:00 UTC
I mean in runtime not in configure ;)

PS. Mark as UNCONFIRMED and TRIVIAL. I'd change the description to "empathy is not reporting mission MC5" but I cannot find such option.
Comment 7 yermandu 2009-10-06 21:51:20 UTC
Any news? 

MC5 Works? 

Can someone send feedback?
Comment 8 Guillaume Desmottes 2009-10-07 08:59:32 UTC
Yes it does. This bug is about Empathy which should warn user if MC5 is not present, not specific issues with MC5.
Comment 9 Chandni Verma 2010-10-15 00:34:17 UTC
Created attachment 172397 [details] [review]
A modal dialog to warn the user if account manager could not be contacted
Comment 10 Chandni Verma 2010-10-15 00:37:05 UTC
I think the above patch facilitates the user with needful warning if the Account manager can not be contacted due to pre-specification version of Mission-Control or any other reason for that matter. Kindly have a look.
Comment 11 Chandni Verma 2010-10-15 00:51:40 UTC
Created attachment 172398 [details] [review]
Same as the previous patch but with the indentation rectified
Comment 12 Danielle Madeley 2010-10-15 00:56:33 UTC
Review of attachment 172397 [details] [review]:

Basically right. Minor style fixes required.

::: src/empathy.c
@@ +32,3 @@
 #include <gdk/gdkx.h>
 #include <unique/unique.h>
+#include <gtk/gtk.h>// for dialog

You don't need this line, gtk.h is already included 3 lines up. Also we don't use // comments.

@@ +258,3 @@
   TpConnectionPresenceType presence;
   GSettings *gsettings = g_settings_new (EMPATHY_PREFS_SCHEMA);
+  GtkWidget *dialog;

This should be inside the block where it's used [1].

@@ +262,2 @@
   if (!tp_account_manager_prepare_finish (manager, result, &error))
     {

<-- here [1]

@@ +264,3 @@
+      dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR,
+    		      GTK_BUTTONS_OK, _("The Account Manager could not be contacted."
+    		    		  "\nThe error given was: \" %s \""),error->message);

This should be four space indentation:

dialog = gtk_mes...
    GTK_BUTTONS_OK,
    some more stuff

I think you should use a double \n\n in the string.
Also no spaces in \"%s\".

@@ +269,1 @@
       DEBUG ("Failed to prepare account manager: %s", error->message);

This DEBUG statement should be before the dialog creation and run().
Comment 13 Danielle Madeley 2010-10-15 00:58:35 UTC
Review of attachment 172398 [details] [review]:

::: src/empathy.c
@@ +264,3 @@
+      dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR,
+          GTK_BUTTONS_OK, _("The Account Manager could not be contacted.\nThe "
+          "error given was: \" %s \""),error->message);

Also, you're missing a space after '),' before 'error'.

Also missing a full stop after '\"'.
Comment 14 Chandni Verma 2010-10-15 01:18:16 UTC
Created attachment 172399 [details] [review]
Reviews attended
Comment 15 Danielle Madeley 2010-10-15 01:28:45 UTC
Review of attachment 172399 [details] [review]:

::: src/empathy.c
@@ +260,3 @@
   if (!tp_account_manager_prepare_finish (manager, result, &error))
     {
+      GtkWidget *dialog;

Blank line between type declarations and code.

<-- here [1]

@@ +263,3 @@
+      dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
+          GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("The Account Manager could not"
+          " be contacted.\nThe error given was: \" %s \"."), error->message);

Looking at this, you should actually use primary and secondary text. Consider

gtk_message_dialog_new (..., _("Error contacting the Account Manager"));
gtk_message_dialog_format_secondary_text (..., _("There was an error while trying to connect to the Telepathy Account Manager. The error was:\n\n%s", error->message);

@@ +268,1 @@
       DEBUG ("Failed to prepare account manager: %s", error->message);

Move this debug message to above the dialog creation [1]
Comment 16 Chandni Verma 2010-10-15 02:01:30 UTC
Created attachment 172401 [details] [review]
rectified

thanks for your reviews! those were helpful.
Comment 17 Chandni Verma 2010-10-15 02:58:33 UTC
Created attachment 172402 [details] [review]
The final patch
Comment 18 Danielle Madeley 2010-10-15 03:05:16 UTC
Committed. Thanks!
Comment 19 Chandni Verma 2010-10-15 03:06:45 UTC
yayy! my first commit! :D Thanks!