Author: ankit
Date: 2007-12-07 07:07:44 -0500 (Fri, 07 Dec 2007)
New Revision: 90912

Modified:
   trunk/monodevelop/main/src/addins/MonoDevelop.Autotools/ChangeLog
   
trunk/monodevelop/main/src/addins/MonoDevelop.Autotools/MakefileOptionPanelWidget.cs
Log:
Fix bug #344837.
* MakefileOptionPanelWidget.cs: Improve error message.


Modified: trunk/monodevelop/main/src/addins/MonoDevelop.Autotools/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/addins/MonoDevelop.Autotools/ChangeLog   
2007-12-07 12:07:21 UTC (rev 90911)
+++ trunk/monodevelop/main/src/addins/MonoDevelop.Autotools/ChangeLog   
2007-12-07 12:07:44 UTC (rev 90912)
@@ -1,3 +1,8 @@
+2007-12-07  Ankit Jain  <[EMAIL PROTECTED]>
+
+       Fix bug #344837.
+       * MakefileOptionPanelWidget.cs: Improve error message.
+
 2007-12-04  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * MonoDevelop.Autotools.mdp, gtk-gui/gui.stetic, Makefile.am: Directory

Modified: 
trunk/monodevelop/main/src/addins/MonoDevelop.Autotools/MakefileOptionPanelWidget.cs
===================================================================
--- 
trunk/monodevelop/main/src/addins/MonoDevelop.Autotools/MakefileOptionPanelWidget.cs
        2007-12-07 12:07:21 UTC (rev 90911)
+++ 
trunk/monodevelop/main/src/addins/MonoDevelop.Autotools/MakefileOptionPanelWidget.cs
        2007-12-07 12:07:44 UTC (rev 90912)
@@ -199,7 +199,10 @@
                        if (tmpData.IntegrationEnabled) {
                                //Validate
                                try {
-                                       tmpData.Makefile.GetVariables ();       
+                                       tmpData.Makefile.GetVariables ();
+                               } catch (FileNotFoundException e) {
+                                       ShowMakefileNotFoundError (e);
+                                       return false;
                                } catch (Exception e) {
                                        
IdeApp.Services.MessageService.ShowError (e, GettextCatalog.GetString (
                                                "Specified makefile is invalid: 
{0}", tmpData.AbsoluteMakefileName),
@@ -712,6 +715,9 @@
                        ICollection<string> vars = null;
                        try {
                                vars = data.Makefile.GetVariables ();
+                       } catch (FileNotFoundException e) {
+                               if (showError)
+                                       ShowMakefileNotFoundError (e);
                        } catch (Exception e) {
                                if (showError)
                                        
IdeApp.Services.MessageService.ShowError (e,
@@ -908,6 +914,13 @@
                        entryResourcesPattern.Text = GuessResPrefix 
(data.Makefile.GetListVariable (active));
                }
 
+               void ShowMakefileNotFoundError (Exception e)
+               {
+                               IdeApp.Services.MessageService.ShowError (e,
+                    GettextCatalog.GetString ("Unable to find the specified 
Makefile. You need to specify the path to an existing Makefile for use with the 
'Makefile Integration' feature."),
+                    (Window) this.Toplevel, true);
+               }
+
                // Returns true if either
                //      - has a valid prefix
                //      - Or all entries are

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to