[Xfce4-commits] <garcon:master> Set an error domain.

Nick Schermer noreply at xfce.org
Fri Dec 23 20:06:01 CET 2011


Updating branch refs/heads/master
         to 8cfdc4b0d95d8fdf4585961c805643b7c7e48ad2 (commit)
       from 4f8d1d9803124fc092cdc636b6c02caf03e6092d (commit)

commit 8cfdc4b0d95d8fdf4585961c805643b7c7e48ad2
Author: Nick Schermer <nick at xfce.org>
Date:   Fri Dec 23 20:03:30 2011 +0100

    Set an error domain.
    
    Glib warns if the error domain is 0, so set a
    domain and code that makes sence.

 garcon/garcon-menu-item.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/garcon/garcon-menu-item.c b/garcon/garcon-menu-item.c
index 2e10210..e83f300 100644
--- a/garcon/garcon-menu-item.c
+++ b/garcon/garcon-menu-item.c
@@ -898,7 +898,9 @@ garcon_menu_item_reload_from_file (GarconMenuItem  *item,
 
   if (G_UNLIKELY (name == NULL || exec == NULL))
     {
-      g_set_error_literal (error, 0, 0, "Either the name or exec key was not defined.");
+      g_set_error_literal (error, G_KEY_FILE_ERROR,
+                           G_KEY_FILE_ERROR_KEY_NOT_FOUND,
+                           "Either the name or exec key was not defined.");
       xfce_rc_close (rc);
 
       return FALSE;


More information about the Xfce4-commits mailing list