Author: nick
Date: 2007-09-13 08:14:03 +0000 (Thu, 13 Sep 2007)
New Revision: 26077

Modified:
   xfce4-panel/trunk/plugins/systray/xfce-tray-manager.c
   xfce4-panel/trunk/plugins/systray/xfce-tray-manager.h
Log:
* Disable the message code in the tray manager.


Modified: xfce4-panel/trunk/plugins/systray/xfce-tray-manager.c
===================================================================
--- xfce4-panel/trunk/plugins/systray/xfce-tray-manager.c       2007-09-13 
07:12:58 UTC (rev 26076)
+++ xfce4-panel/trunk/plugins/systray/xfce-tray-manager.c       2007-09-13 
08:14:03 UTC (rev 26077)
@@ -40,7 +40,9 @@
 #include <libxfce4util/libxfce4util.h>
 
 #include "xfce-tray-manager.h"
+#if XFCE_TRAY_MANAGER_ENABLE_MESSAGES
 #include "xfce-tray-marshal.h"
+#endif
 
 
 
@@ -61,6 +63,7 @@
 static GdkFilterReturn      xfce_tray_manager_window_filter                    
  (GdkXEvent            *xev,
                                                                                
   GdkEvent             *event,
                                                                                
   gpointer              user_data);
+#if XFCE_TRAY_MANAGER_ENABLE_MESSAGES
 static GdkFilterReturn      xfce_tray_manager_handle_client_message_opcode     
  (GdkXEvent            *xevent,
                                                                                
   GdkEvent             *event,
                                                                                
   gpointer              user_data);
@@ -71,6 +74,7 @@
                                                                                
   XClientMessageEvent  *xevent);
 static void                 xfce_tray_manager_handle_cancel_message            
  (XfceTrayManager      *manager,
                                                                                
   XClientMessageEvent  *xevent);
+#endif
 static void                 xfce_tray_manager_handle_dock_request              
  (XfceTrayManager      *manager,
                                                                                
   XClientMessageEvent  *xevent);
 static gboolean             xfce_tray_manager_handle_undock_request            
  (GtkSocket            *socket,
@@ -83,17 +87,21 @@
 static void                 xfce_tray_manager_application_set_socket           
  (XfceTrayManager      *manager,
                                                                                
   GtkWidget            *socket,
                                                                                
   Window                xwindow);
+#if XFCE_TRAY_MANAGER_ENABLE_MESSAGES
 static void                 xfce_tray_message_free                             
  (XfceTrayMessage      *message);
 static void                 xfce_tray_message_remove_from_list                 
  (XfceTrayManager      *manager,
                                                                                
   XClientMessageEvent  *xevent);
+#endif
 
 
 enum
 {
   TRAY_ICON_ADDED,
   TRAY_ICON_REMOVED,
+#if XFCE_TRAY_MANAGER_ENABLE_MESSAGES
   TRAY_MESSAGE_SENT,
   TRAY_MESSAGE_CANCELLED,
+#endif
   TRAY_LOST_SELECTION,
   LAST_SIGNAL
 };
@@ -116,8 +124,10 @@
     /* orientation of the tray */
     GtkOrientation  orientation;
 
+#if XFCE_TRAY_MANAGER_ENABLE_MESSAGES
     /* list of pending messages */
     GSList         *messages;
+#endif
 
     /* _net_system_tray_opcode atom */
     Atom            opcode_atom;
@@ -203,6 +213,7 @@
                       G_TYPE_NONE, 1,
                       GTK_TYPE_SOCKET);
 
+#if XFCE_TRAY_MANAGER_ENABLE_MESSAGES
     xfce_tray_manager_signals[TRAY_MESSAGE_SENT] =
         g_signal_new (I_("tray-message-sent"),
                       G_OBJECT_CLASS_TYPE (klass),
@@ -224,6 +235,7 @@
                       G_TYPE_NONE, 2,
                       GTK_TYPE_SOCKET,
                       G_TYPE_LONG);
+#endif
 
     xfce_tray_manager_signals[TRAY_LOST_SELECTION] =
         g_signal_new (I_("tray-lost-selection"),
@@ -240,10 +252,12 @@
 xfce_tray_manager_init (XfceTrayManager *manager)
 {
   /* initialize */
-  manager->messages = NULL;
   manager->invisible = NULL;
   manager->orientation = GTK_ORIENTATION_HORIZONTAL;
   manager->applications = NULL;
+#if XFCE_TRAY_MANAGER_ENABLE_MESSAGES
+  manager->messages = NULL;
+#endif
 
   /* create new sockets table */
   manager->sockets = g_hash_table_new (NULL, NULL);
@@ -277,6 +291,7 @@
     /* destroy the hash table */
     g_hash_table_destroy (manager->sockets);
 
+#if XFCE_TRAY_MANAGER_ENABLE_MESSAGES
     if (manager->messages)
     {
         /* cleanup all pending messages */
@@ -285,6 +300,7 @@
         /* free the list */
         g_slist_free (manager->messages);
     }
+#endif
 
     if (manager->applications)
     {
@@ -409,6 +425,7 @@
         opcode_atom = gdk_atom_intern ("_NET_SYSTEM_TRAY_OPCODE", FALSE);
         manager->opcode_atom = gdk_x11_atom_to_xatom_for_display (display, 
opcode_atom);
 
+#if XFCE_TRAY_MANAGER_ENABLE_MESSAGES
         /* system_tray_begin_message and system_tray_cancel_message */
         gdk_display_add_client_message_filter (display,
                                                opcode_atom,
@@ -420,6 +437,7 @@
                                                gdk_atom_intern 
("_NET_SYSTEM_TRAY_MESSAGE_DATA", FALSE),
                                                
xfce_tray_manager_handle_client_message_message_data,
                                                manager);
+#endif
     }
     else
     {
@@ -508,6 +526,7 @@
 
 
 
+#if XFCE_TRAY_MANAGER_ENABLE_MESSAGES
 static GdkFilterReturn
 xfce_tray_manager_handle_client_message_opcode (GdkXEvent *xevent,
                                                 GdkEvent  *event,
@@ -669,9 +688,9 @@
                        socket, xevent->data.l[2]);
     }
 }
+#endif
 
 
-
 static void
 xfce_tray_manager_handle_dock_request (XfceTrayManager     *manager,
                                        XClientMessageEvent *xevent)
@@ -1010,6 +1029,7 @@
 /**
  * tray messages
  **/
+#if XFCE_TRAY_MANAGER_ENABLE_MESSAGES
 static void
 xfce_tray_message_free (XfceTrayMessage *message)
 {
@@ -1047,4 +1067,4 @@
         }
     }
 }
-
+#endif

Modified: xfce4-panel/trunk/plugins/systray/xfce-tray-manager.h
===================================================================
--- xfce4-panel/trunk/plugins/systray/xfce-tray-manager.h       2007-09-13 
07:12:58 UTC (rev 26076)
+++ xfce4-panel/trunk/plugins/systray/xfce-tray-manager.h       2007-09-13 
08:14:03 UTC (rev 26077)
@@ -43,6 +43,9 @@
     XFCE_TRAY_MANAGER_ERROR_SELECTION_FAILED
 };
 
+#define XFCE_TRAY_MANAGER_ENABLE_MESSAGES 0
+
+
 #define XFCE_TYPE_TRAY_MANAGER            (xfce_tray_manager_get_type ())
 #define XFCE_TRAY_MANAGER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
XFCE_TYPE_TRAY_MANAGER, XfceTrayManager))
 #define XFCE_TRAY_MANAGER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), 
XFCE_TYPE_TRAY_MANAGER, XfceTrayManagerClass))

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

Reply via email to