GNOME Bugzilla – Bug 594576
Empathy should complain at runtime if MC5 is not installed
Last modified: 2010-10-15 03:06:45 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.
Do you have telepathy-mission-control-5 installed?
(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).
Ok. Found. But I guess ./configure could check for it - or at least message info displayed.
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.
(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.
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.
Any news? MC5 Works? Can someone send feedback?
Yes it does. This bug is about Empathy which should warn user if MC5 is not present, not specific issues with MC5.
Created attachment 172397 [details] [review] A modal dialog to warn the user if account manager could not be contacted
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.
Created attachment 172398 [details] [review] Same as the previous patch but with the indentation rectified
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().
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 '\"'.
Created attachment 172399 [details] [review] Reviews attended
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]
Created attachment 172401 [details] [review] rectified thanks for your reviews! those were helpful.
Created attachment 172402 [details] [review] The final patch
Committed. Thanks!
yayy! my first commit! :D Thanks!