Author: kelnos
Date: 2007-02-18 22:21:26 +0000 (Sun, 18 Feb 2007)
New Revision: 24993

Modified:
   xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu-dentry.c
   xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu-file.c
   xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu.h
   xfdesktop/branches/xfce_4_4/src/xfdesktop-icon-view.c
   xfdesktop/trunk/modules/menu/desktop-menu-dentry.c
   xfdesktop/trunk/modules/menu/desktop-menu-file.c
   xfdesktop/trunk/modules/menu/desktop-menu.h
   xfdesktop/trunk/src/xfdesktop-icon-view.c
Log:
remove use of __FUNCTION__ as it breaks sun's compiler (bug 2924)


Modified: xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu-dentry.c
===================================================================
--- xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu-dentry.c      
2007-02-18 20:07:04 UTC (rev 24992)
+++ xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu-dentry.c      
2007-02-18 22:21:26 UTC (rev 24993)
@@ -46,7 +46,6 @@
 #include <libxfcegui4/xfce-appmenuitem.h>
 #include <libxfcegui4/icons.h>
 
-//#define BDEBUG
 #include "desktop-menu-dentry.h"
 #include "desktop-menu-private.h"
 #include "desktop-menu.h"
@@ -139,7 +138,7 @@
 _build_path(const gchar *basepath, const gchar *path, const gchar *name)
 {
     gchar *newpath = NULL;
-    BD("%s, %s, %s", basepath, path, name);
+    DBG("%s, %s, %s", basepath, path, name);
     if(basepath && *basepath == '/')
         newpath = g_build_path("/", basepath, path, name, NULL);
     else if(basepath)
@@ -153,7 +152,7 @@
     else if(name)
         newpath = g_strconcat("/", name, NULL);
     
-    BD("  newpath=%s", newpath);
+    DBG("  newpath=%s", newpath);
     
     return newpath;
 }
@@ -190,7 +189,7 @@
     const gchar *icon = NULL;
     gint menu_pos;
     
-    BD("%s", path);
+    DBG("%s", path);
     
     if(desktop_menu->menu_branches && 
            (submenu = g_hash_table_lookup(desktop_menu->menu_branches, path)))
@@ -203,7 +202,7 @@
             parent = _ensure_path(desktop_menu, tmppath);
         if(!parent)
             parent = desktop_menu->dentry_basemenu;
-        BD("  parent=%p", parent);
+        DBG("  parent=%p", parent);
         g_free(tmppath);
     }
     
@@ -268,7 +267,7 @@
     desktop_menu_cache_add_entry(DM_TYPE_MENU, q, NULL, icon,
             FALSE, FALSE, parent, menu_pos, submenu);
     
-    BD("for the hell of it: basepath=%s", desktop_menu->dentry_basepath);
+    DBG("for the hell of it: basepath=%s", desktop_menu->dentry_basepath);
     
     return submenu;
 }
@@ -388,7 +387,7 @@
     
     if(pathtype == MPATH_SIMPLE_UNIQUE) {
         /* grab first of the most general */
-        BD("before ensuring - basepath=%s", desktop_menu->dentry_basepath);
+        DBG("before ensuring - basepath=%s", desktop_menu->dentry_basepath);
         path = _build_path(desktop_menu->dentry_basepath,
                 g_ptr_array_index(newpaths, 0), NULL);
         menu = _ensure_path(desktop_menu, path);
@@ -413,7 +412,7 @@
         g_object_set_data(G_OBJECT(mi), "item-name", (gpointer)name);
         gtk_widget_show(mi);
         menu_pos = _menu_shell_insert_sorted(GTK_MENU_SHELL(menu), mi, name);
-        BD("before hashtable: path=%s, name=%s", path, name);
+        DBG("before hashtable: path=%s, name=%s", path, name);
         g_hash_table_insert(desktop_menu->menu_entry_hash, _build_path(NULL,
                 path, name), GINT_TO_POINTER(1));
         desktop_menu_cache_add_entry(DM_TYPE_APP, name,

Modified: xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu-file.c
===================================================================
--- xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu-file.c        
2007-02-18 20:07:04 UTC (rev 24992)
+++ xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu-file.c        
2007-02-18 22:21:26 UTC (rev 24993)
@@ -155,7 +155,7 @@
     gchar tmppath[2048], *cmd_locale;
     struct MenuFileParserState *state = user_data;
     
-    BD("cur_path: %s, hidelevel=%d", state->cur_path, state->hidelevel);
+    DBG("cur_path: %s, hidelevel=%d", state->cur_path, state->hidelevel);
     
     if(!state->started && !strcmp(element_name, "xfdesktop-menu"))
         state->started = TRUE;
@@ -501,7 +501,7 @@
                 do_legacy = FALSE;
             
             state->desktop_menu->dentry_basepath = state->cur_path;
-            BD("cur_path: %s", state->cur_path);
+            DBG("cur_path: %s", state->cur_path);
             state->desktop_menu->dentry_basemenu = state->cur_branch;
 
             if(j != -1 && !strcmp(attribute_values[j], "multilevel")) {

Modified: xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu.h
===================================================================
--- xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu.h     2007-02-18 
20:07:04 UTC (rev 24992)
+++ xfdesktop/branches/xfce_4_4/modules/menu/desktop-menu.h     2007-02-18 
22:21:26 UTC (rev 24993)
@@ -40,17 +40,6 @@
 extern GdkPixbuf *dummy_icon;
 extern GdkPixbuf *unknown_icon;
 
-#ifdef BDEBUG
-#define BD(fmt, args...) \
-    do { \
-        fprintf(stderr, "[%s():%d] ", __FUNCTION__, __LINE__); \
-        fprintf(stderr, fmt, ## args); \
-        fprintf(stderr, "\n"); \
-    } while(0)
-#else
-#define BD(fmt, args...)
-#endif
-
 G_END_DECLS
 
 #endif /* !def __DESKTOP_MENU_H__ */

Modified: xfdesktop/branches/xfce_4_4/src/xfdesktop-icon-view.c
===================================================================
--- xfdesktop/branches/xfce_4_4/src/xfdesktop-icon-view.c       2007-02-18 
20:07:04 UTC (rev 24992)
+++ xfdesktop/branches/xfce_4_4/src/xfdesktop-icon-view.c       2007-02-18 
22:21:26 UTC (rev 24993)
@@ -59,7 +59,7 @@
 {\
     gint my_i, my_maxi;\
     \
-    g_printerr("\nDBG[%s:%d] %s\n", __FILE__, __LINE__, __FUNCTION__);\
+    DBG("grid layout dump:"); \
     my_maxi = icon_view->priv->nrows * icon_view->priv->ncols;\
     for(my_i = 0; my_i < my_maxi; my_i++)\
         g_printerr("%c ", icon_view->priv->grid_layout[my_i] ? '1' : '0');\

Modified: xfdesktop/trunk/modules/menu/desktop-menu-dentry.c
===================================================================
--- xfdesktop/trunk/modules/menu/desktop-menu-dentry.c  2007-02-18 20:07:04 UTC 
(rev 24992)
+++ xfdesktop/trunk/modules/menu/desktop-menu-dentry.c  2007-02-18 22:21:26 UTC 
(rev 24993)
@@ -46,7 +46,6 @@
 #include <libxfcegui4/xfce-appmenuitem.h>
 #include <libxfcegui4/icons.h>
 
-//#define BDEBUG
 #include "desktop-menu-dentry.h"
 #include "desktop-menu-private.h"
 #include "desktop-menu.h"
@@ -139,7 +138,7 @@
 _build_path(const gchar *basepath, const gchar *path, const gchar *name)
 {
     gchar *newpath = NULL;
-    BD("%s, %s, %s", basepath, path, name);
+    DBG("%s, %s, %s", basepath, path, name);
     if(basepath && *basepath == '/')
         newpath = g_build_path("/", basepath, path, name, NULL);
     else if(basepath)
@@ -153,7 +152,7 @@
     else if(name)
         newpath = g_strconcat("/", name, NULL);
     
-    BD("  newpath=%s", newpath);
+    DBG("  newpath=%s", newpath);
     
     return newpath;
 }
@@ -190,7 +189,7 @@
     const gchar *icon = NULL;
     gint menu_pos;
     
-    BD("%s", path);
+    DBG("%s", path);
     
     if(desktop_menu->menu_branches && 
            (submenu = g_hash_table_lookup(desktop_menu->menu_branches, path)))
@@ -203,7 +202,7 @@
             parent = _ensure_path(desktop_menu, tmppath);
         if(!parent)
             parent = desktop_menu->dentry_basemenu;
-        BD("  parent=%p", parent);
+        DBG("  parent=%p", parent);
         g_free(tmppath);
     }
     
@@ -268,7 +267,7 @@
     desktop_menu_cache_add_entry(DM_TYPE_MENU, q, NULL, icon,
             FALSE, FALSE, parent, menu_pos, submenu);
     
-    BD("for the hell of it: basepath=%s", desktop_menu->dentry_basepath);
+    DBG("for the hell of it: basepath=%s", desktop_menu->dentry_basepath);
     
     return submenu;
 }
@@ -388,7 +387,7 @@
     
     if(pathtype == MPATH_SIMPLE_UNIQUE) {
         /* grab first of the most general */
-        BD("before ensuring - basepath=%s", desktop_menu->dentry_basepath);
+        DBG("before ensuring - basepath=%s", desktop_menu->dentry_basepath);
         path = _build_path(desktop_menu->dentry_basepath,
                 g_ptr_array_index(newpaths, 0), NULL);
         menu = _ensure_path(desktop_menu, path);
@@ -413,7 +412,7 @@
         g_object_set_data(G_OBJECT(mi), "item-name", (gpointer)name);
         gtk_widget_show(mi);
         menu_pos = _menu_shell_insert_sorted(GTK_MENU_SHELL(menu), mi, name);
-        BD("before hashtable: path=%s, name=%s", path, name);
+        DBG("before hashtable: path=%s, name=%s", path, name);
         g_hash_table_insert(desktop_menu->menu_entry_hash, _build_path(NULL,
                 path, name), GINT_TO_POINTER(1));
         desktop_menu_cache_add_entry(DM_TYPE_APP, name,

Modified: xfdesktop/trunk/modules/menu/desktop-menu-file.c
===================================================================
--- xfdesktop/trunk/modules/menu/desktop-menu-file.c    2007-02-18 20:07:04 UTC 
(rev 24992)
+++ xfdesktop/trunk/modules/menu/desktop-menu-file.c    2007-02-18 22:21:26 UTC 
(rev 24993)
@@ -155,7 +155,7 @@
     gchar tmppath[2048], *cmd_locale;
     struct MenuFileParserState *state = user_data;
     
-    BD("cur_path: %s, hidelevel=%d", state->cur_path, state->hidelevel);
+    DBG("cur_path: %s, hidelevel=%d", state->cur_path, state->hidelevel);
     
     if(!state->started && !strcmp(element_name, "xfdesktop-menu"))
         state->started = TRUE;
@@ -501,7 +501,7 @@
                 do_legacy = FALSE;
             
             state->desktop_menu->dentry_basepath = state->cur_path;
-            BD("cur_path: %s", state->cur_path);
+            DBG("cur_path: %s", state->cur_path);
             state->desktop_menu->dentry_basemenu = state->cur_branch;
 
             if(j != -1 && !strcmp(attribute_values[j], "multilevel")) {

Modified: xfdesktop/trunk/modules/menu/desktop-menu.h
===================================================================
--- xfdesktop/trunk/modules/menu/desktop-menu.h 2007-02-18 20:07:04 UTC (rev 
24992)
+++ xfdesktop/trunk/modules/menu/desktop-menu.h 2007-02-18 22:21:26 UTC (rev 
24993)
@@ -40,17 +40,6 @@
 extern GdkPixbuf *dummy_icon;
 extern GdkPixbuf *unknown_icon;
 
-#ifdef BDEBUG
-#define BD(fmt, args...) \
-    do { \
-        fprintf(stderr, "[%s():%d] ", __FUNCTION__, __LINE__); \
-        fprintf(stderr, fmt, ## args); \
-        fprintf(stderr, "\n"); \
-    } while(0)
-#else
-#define BD(fmt, args...)
-#endif
-
 G_END_DECLS
 
 #endif /* !def __DESKTOP_MENU_H__ */

Modified: xfdesktop/trunk/src/xfdesktop-icon-view.c
===================================================================
--- xfdesktop/trunk/src/xfdesktop-icon-view.c   2007-02-18 20:07:04 UTC (rev 
24992)
+++ xfdesktop/trunk/src/xfdesktop-icon-view.c   2007-02-18 22:21:26 UTC (rev 
24993)
@@ -59,7 +59,7 @@
 {\
     gint my_i, my_maxi;\
     \
-    g_printerr("\nDBG[%s:%d] %s\n", __FILE__, __LINE__, __FUNCTION__);\
+    DBG("grid layout dump:"); \
     my_maxi = icon_view->priv->nrows * icon_view->priv->ncols;\
     for(my_i = 0; my_i < my_maxi; my_i++)\
         g_printerr("%c ", icon_view->priv->grid_layout[my_i] ? '1' : '0');\

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to