2 * Copyright (C) 2009 Collabora Ltd.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 * Authors: Jonny Lamb <jonny.lamb@collabora.co.uk>
23 #include <glib/gi18n.h>
26 #define DEBUG_FLAG EMPATHY_DEBUG_OTHER
27 #include <libempathy/empathy-debug.h>
28 #include <libempathy/empathy-utils.h>
30 #include <libempathy-gtk/empathy-account-chooser.h>
32 #include <telepathy-glib/dbus.h>
33 #include <telepathy-glib/util.h>
34 #include <telepathy-glib/proxy-subclass.h>
36 #include "extensions/extensions.h"
38 #include "empathy-debug-dialog.h"
40 G_DEFINE_TYPE (EmpathyDebugDialog, empathy_debug_dialog,
51 COL_DEBUG_TIMESTAMP = 0,
54 COL_DEBUG_LEVEL_STRING,
56 COL_DEBUG_LEVEL_VALUE,
74 #define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyDebugDialog)
80 GtkWidget *cm_chooser;
82 GtkTreeModel *store_filter;
84 TpProxySignalConnection *signal_connection;
88 } EmpathyDebugDialogPriv;
91 log_level_to_string (guint level)
95 case EMP_DEBUG_LEVEL_ERROR:
98 case EMP_DEBUG_LEVEL_CRITICAL:
101 case EMP_DEBUG_LEVEL_WARNING:
104 case EMP_DEBUG_LEVEL_MESSAGE:
107 case EMP_DEBUG_LEVEL_INFO:
110 case EMP_DEBUG_LEVEL_DEBUG:
114 g_assert_not_reached ();
120 debug_dialog_add_message (EmpathyDebugDialog *debug_dialog,
122 const gchar *domain_category,
124 const gchar *message)
126 EmpathyDebugDialogPriv *priv = GET_PRIV (debug_dialog);
127 gchar *domain, *category;
131 if (g_strrstr (domain_category, "/"))
133 gchar **parts = g_strsplit (domain_category, "/", 2);
134 domain = g_strdup (parts[0]);
135 category = g_strdup (parts[1]);
140 domain = g_strdup (domain_category);
141 category = g_strdup ("");
144 if (g_str_has_suffix (message, "\n"))
145 string = g_strchomp (g_strdup (message));
147 string = g_strdup (message);
150 gtk_list_store_append (priv->store, &iter);
151 gtk_list_store_set (priv->store, &iter,
152 COL_DEBUG_TIMESTAMP, timestamp,
153 COL_DEBUG_DOMAIN, domain,
154 COL_DEBUG_CATEGORY, category,
155 COL_DEBUG_LEVEL_STRING, log_level_to_string (level),
156 COL_DEBUG_MESSAGE, string,
157 COL_DEBUG_LEVEL_VALUE, level,
166 debug_dialog_new_debug_message_cb (TpProxy *proxy,
170 const gchar *message,
172 GObject *weak_object)
174 EmpathyDebugDialog *debug_dialog = (EmpathyDebugDialog *) user_data;
176 debug_dialog_add_message (debug_dialog, timestamp, domain, level,
181 debug_dialog_set_enabled (EmpathyDebugDialog *debug_dialog,
184 EmpathyDebugDialogPriv *priv = GET_PRIV (debug_dialog);
187 val = tp_g_value_slice_new_boolean (enabled);
189 tp_cli_dbus_properties_call_set (priv->proxy, -1, EMP_IFACE_DEBUG,
190 "Enabled", val, NULL, NULL, NULL, NULL);
192 tp_g_value_slice_free (val);
196 debug_dialog_get_messages_cb (TpProxy *proxy,
197 const GPtrArray *messages,
200 GObject *weak_object)
202 EmpathyDebugDialog *debug_dialog = (EmpathyDebugDialog *) user_data;
203 EmpathyDebugDialogPriv *priv = GET_PRIV (debug_dialog);
208 DEBUG ("GetMessages failed: %s", error->message);
212 for (i = 0; i < messages->len; i++)
214 GValueArray *values = g_ptr_array_index (messages, i);
216 debug_dialog_add_message (debug_dialog,
217 g_value_get_double (g_value_array_get_nth (values, 0)),
218 g_value_get_string (g_value_array_get_nth (values, 1)),
219 g_value_get_uint (g_value_array_get_nth (values, 2)),
220 g_value_get_string (g_value_array_get_nth (values, 3)));
223 /* Connect to NewDebugMessage */
224 priv->signal_connection = emp_cli_debug_connect_to_new_debug_message (
225 proxy, debug_dialog_new_debug_message_cb, debug_dialog,
228 /* Set Enabled as appropriate */
229 debug_dialog_set_enabled (debug_dialog, !priv->paused);
233 debug_dialog_cm_chooser_changed_cb (GtkComboBox *cm_chooser,
234 EmpathyDebugDialog *debug_dialog)
236 EmpathyDebugDialogPriv *priv = GET_PRIV (debug_dialog);
239 GError *error = NULL;
241 TpConnection *connection;
244 if (!gtk_combo_box_get_active_iter (cm_chooser, &iter))
246 DEBUG ("No CM is selected");
250 mc = empathy_mission_control_dup_singleton ();
251 dbus = tp_dbus_daemon_dup (&error);
255 DEBUG ("Failed at duping the dbus daemon: %s", error->message);
259 gtk_tree_model_get (GTK_TREE_MODEL (priv->cms), &iter,
260 COL_CM_BUS, &bus_name, -1);
261 connection = tp_connection_new (dbus, bus_name, DEBUG_OBJECT_PATH, &error);
266 DEBUG ("Getting a new TpConnection failed: %s", error->message);
267 g_error_free (error);
268 g_object_unref (dbus);
273 /* Disable debug signalling */
274 if (priv->proxy != NULL)
275 debug_dialog_set_enabled (debug_dialog, FALSE);
277 /* Disconnect from previous NewDebugMessage signal */
278 if (priv->signal_connection)
280 tp_proxy_signal_connection_disconnect (priv->signal_connection);
281 priv->signal_connection = NULL;
285 g_object_unref (priv->proxy);
287 priv->proxy = TP_PROXY (connection);
289 tp_proxy_add_interface_by_id (priv->proxy, emp_iface_quark_debug ());
291 emp_cli_debug_call_get_messages (priv->proxy, -1,
292 debug_dialog_get_messages_cb, debug_dialog, NULL, NULL);
294 g_object_unref (dbus);
299 debug_dialog_list_connection_names_cb (const gchar * const *names,
301 const gchar * const *cms,
302 const gchar * const *protocols,
305 GObject *weak_object)
307 EmpathyDebugDialog *debug_dialog = (EmpathyDebugDialog *) user_data;
308 EmpathyDebugDialogPriv *priv = GET_PRIV (debug_dialog);
313 DEBUG ("list_connection_names failed: %s", error->message);
317 for (i = 0; cms[i] != NULL; i++)
320 gtk_list_store_append (priv->cms, &iter);
321 gtk_list_store_set (priv->cms, &iter,
323 COL_CM_BUS, names[i],
327 gtk_combo_box_set_active (GTK_COMBO_BOX (priv->cm_chooser), 0);
330 debug_dialog_cm_chooser_changed_cb (GTK_COMBO_BOX (priv->cm_chooser), debug_dialog);
334 debug_dialog_fill_cm_chooser (EmpathyDebugDialog *debug_dialog)
337 GError *error = NULL;
339 dbus = tp_dbus_daemon_dup (&error);
343 DEBUG ("Failed to dup dbus daemon: %s", error->message);
344 g_error_free (error);
348 tp_list_connection_names (dbus, debug_dialog_list_connection_names_cb,
349 debug_dialog, NULL, NULL);
351 g_object_unref (dbus);
355 debug_dialog_pause_toggled_cb (GtkToggleToolButton *pause,
356 EmpathyDebugDialog *debug_dialog)
358 EmpathyDebugDialogPriv *priv = GET_PRIV (debug_dialog);
360 priv->paused = gtk_toggle_tool_button_get_active (pause);
362 debug_dialog_set_enabled (debug_dialog, !priv->paused);
366 debug_dialog_visible_func (GtkTreeModel *model,
370 EmpathyDebugDialog *debug_dialog = (EmpathyDebugDialog *) user_data;
371 EmpathyDebugDialogPriv *priv = GET_PRIV (debug_dialog);
372 guint filter_value, level;
373 GtkTreeModel *filter_model;
374 GtkTreeIter filter_iter;
376 filter_model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->filter));
377 gtk_combo_box_get_active_iter (GTK_COMBO_BOX (priv->filter),
380 gtk_tree_model_get (model, iter, COL_DEBUG_LEVEL_VALUE, &level, -1);
381 gtk_tree_model_get (filter_model, &filter_iter,
382 COL_LEVEL_VALUE, &filter_value, -1);
384 if (level <= filter_value)
391 debug_dialog_filter_changed_cb (GtkComboBox *filter,
392 EmpathyDebugDialog *debug_dialog)
394 EmpathyDebugDialogPriv *priv = GET_PRIV (debug_dialog);
396 gtk_tree_model_filter_refilter (
397 GTK_TREE_MODEL_FILTER (priv->store_filter));
401 debug_dialog_clear_clicked_cb (GtkToolButton *clear_button,
402 EmpathyDebugDialog *debug_dialog)
404 EmpathyDebugDialogPriv *priv = GET_PRIV (debug_dialog);
406 gtk_list_store_clear (priv->store);
410 debug_dialog_menu_copy_activate_cb (GtkMenuItem *menu_item,
411 EmpathyDebugDialog *debug_dialog)
413 EmpathyDebugDialogPriv *priv = GET_PRIV (debug_dialog);
415 GtkTreeViewColumn *focus_column;
418 GtkClipboard *clipboard;
420 gtk_tree_view_get_cursor (GTK_TREE_VIEW (priv->view),
421 &path, &focus_column);
425 DEBUG ("No row is in focus");
429 gtk_tree_model_get_iter (priv->store_filter, &iter, path);
431 gtk_tree_model_get (priv->store_filter, &iter,
432 COL_DEBUG_MESSAGE, &message,
435 if (EMP_STR_EMPTY (message))
437 DEBUG ("Log message is empty");
441 clipboard = gtk_clipboard_get_for_display (
442 gtk_widget_get_display (GTK_WIDGET (menu_item)),
443 GDK_SELECTION_CLIPBOARD);
445 gtk_clipboard_set_text (clipboard, message, -1);
452 EmpathyDebugDialog *debug_dialog;
458 debug_dialog_show_menu (gpointer user_data)
460 MenuPopupData *data = (MenuPopupData *) user_data;
461 GtkWidget *menu, *item;
464 menu = gtk_menu_new ();
465 shell = GTK_MENU_SHELL (menu);
467 item = gtk_image_menu_item_new_from_stock (GTK_STOCK_COPY, NULL);
469 g_signal_connect (item, "activate",
470 G_CALLBACK (debug_dialog_menu_copy_activate_cb), data->debug_dialog);
472 gtk_menu_shell_append (shell, item);
473 gtk_widget_show (item);
475 gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
476 data->button, data->time);
478 g_slice_free (MenuPopupData, user_data);
484 debug_dialog_button_press_event_cb (GtkTreeView *view,
485 GdkEventButton *event,
488 if (event->button == 3)
491 data = g_slice_new0 (MenuPopupData);
492 data->debug_dialog = user_data;
493 data->button = event->button;
494 data->time = event->time;
495 g_idle_add (debug_dialog_show_menu, data);
502 debug_dialog_constructor (GType type,
503 guint n_construct_params,
504 GObjectConstructParam *construct_params)
507 EmpathyDebugDialogPriv *priv;
513 GtkCellRenderer *renderer;
514 GtkWidget *scrolled_win;
515 GtkListStore *level_store;
518 object = G_OBJECT_CLASS (empathy_debug_dialog_parent_class)->constructor
519 (type, n_construct_params, construct_params);
520 priv = GET_PRIV (object);
522 gtk_window_set_title (GTK_WINDOW (object), _("Debug Window"));
523 gtk_window_set_default_size (GTK_WINDOW (object), 800, 400);
524 gtk_window_set_transient_for (GTK_WINDOW (object), priv->parent);
526 vbox = GTK_DIALOG (object)->vbox;
528 toolbar = gtk_toolbar_new ();
529 gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_BOTH_HORIZ);
530 gtk_toolbar_set_show_arrow (GTK_TOOLBAR (toolbar), TRUE);
531 gtk_toolbar_set_icon_size (GTK_TOOLBAR (toolbar), GTK_ICON_SIZE_SMALL_TOOLBAR);
532 gtk_widget_show (toolbar);
534 gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, FALSE, 0);
537 priv->cm_chooser = gtk_combo_box_new_text ();
538 priv->cms = gtk_list_store_new (NUM_COLS_CM, G_TYPE_STRING, G_TYPE_STRING);
539 gtk_combo_box_set_model (GTK_COMBO_BOX (priv->cm_chooser),
540 GTK_TREE_MODEL (priv->cms));
541 gtk_widget_show (priv->cm_chooser);
543 item = gtk_tool_item_new ();
544 gtk_widget_show (GTK_WIDGET (item));
545 gtk_container_add (GTK_CONTAINER (item), priv->cm_chooser);
546 gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
547 debug_dialog_fill_cm_chooser (EMPATHY_DEBUG_DIALOG (object));
548 g_signal_connect (priv->cm_chooser, "changed",
549 G_CALLBACK (debug_dialog_cm_chooser_changed_cb), object);
550 gtk_widget_show (GTK_WIDGET (priv->cm_chooser));
552 item = gtk_separator_tool_item_new ();
553 gtk_widget_show (GTK_WIDGET (item));
554 gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
557 item = gtk_tool_button_new_from_stock (GTK_STOCK_SAVE);
558 gtk_widget_show (GTK_WIDGET (item));
559 gtk_tool_item_set_is_important (GTK_TOOL_ITEM (item), TRUE);
560 gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
563 item = gtk_tool_button_new_from_stock (GTK_STOCK_CLEAR);
564 g_signal_connect (item, "clicked",
565 G_CALLBACK (debug_dialog_clear_clicked_cb), object);
566 gtk_widget_show (GTK_WIDGET (item));
567 gtk_tool_item_set_is_important (GTK_TOOL_ITEM (item), TRUE);
568 gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
570 item = gtk_separator_tool_item_new ();
571 gtk_widget_show (GTK_WIDGET (item));
572 gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
575 priv->paused = FALSE;
576 image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_PAUSE, GTK_ICON_SIZE_MENU);
577 gtk_widget_show (image);
578 item = gtk_toggle_tool_button_new ();
579 gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (item), priv->paused);
580 g_signal_connect (item, "toggled", G_CALLBACK (debug_dialog_pause_toggled_cb),
582 gtk_widget_show (GTK_WIDGET (item));
583 gtk_tool_item_set_is_important (GTK_TOOL_ITEM (item), TRUE);
584 gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), _("Pause"));
585 gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (item), image);
586 gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
588 item = gtk_separator_tool_item_new ();
589 gtk_widget_show (GTK_WIDGET (item));
590 gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
593 item = gtk_tool_item_new ();
594 gtk_widget_show (GTK_WIDGET (item));
595 label = gtk_label_new (_("Level "));
596 gtk_widget_show (label);
597 gtk_container_add (GTK_CONTAINER (item), label);
598 gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
600 priv->filter = gtk_combo_box_new_text ();
601 gtk_widget_show (priv->filter);
603 item = gtk_tool_item_new ();
604 gtk_widget_show (GTK_WIDGET (item));
605 gtk_container_add (GTK_CONTAINER (item), priv->filter);
606 gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
608 level_store = gtk_list_store_new (NUM_COLS_LEVEL,
609 G_TYPE_STRING, G_TYPE_UINT);
610 gtk_combo_box_set_model (GTK_COMBO_BOX (priv->filter),
611 GTK_TREE_MODEL (level_store));
613 gtk_list_store_append (level_store, &iter);
614 gtk_list_store_set (level_store, &iter,
615 COL_LEVEL_NAME, _("Debug"),
616 COL_LEVEL_VALUE, EMP_DEBUG_LEVEL_DEBUG,
619 gtk_list_store_append (level_store, &iter);
620 gtk_list_store_set (level_store, &iter,
621 COL_LEVEL_NAME, _("Info"),
622 COL_LEVEL_VALUE, EMP_DEBUG_LEVEL_INFO,
625 gtk_list_store_append (level_store, &iter);
626 gtk_list_store_set (level_store, &iter,
627 COL_LEVEL_NAME, _("Message"),
628 COL_LEVEL_VALUE, EMP_DEBUG_LEVEL_MESSAGE,
631 gtk_list_store_append (level_store, &iter);
632 gtk_list_store_set (level_store, &iter,
633 COL_LEVEL_NAME, _("Warning"),
634 COL_LEVEL_VALUE, EMP_DEBUG_LEVEL_WARNING,
637 gtk_list_store_append (level_store, &iter);
638 gtk_list_store_set (level_store, &iter,
639 COL_LEVEL_NAME, _("Critical"),
640 COL_LEVEL_VALUE, EMP_DEBUG_LEVEL_CRITICAL,
643 gtk_list_store_append (level_store, &iter);
644 gtk_list_store_set (level_store, &iter,
645 COL_LEVEL_NAME, _("Error"),
646 COL_LEVEL_VALUE, EMP_DEBUG_LEVEL_ERROR,
649 gtk_combo_box_set_active (GTK_COMBO_BOX (priv->filter), 0);
650 g_signal_connect (priv->filter, "changed",
651 G_CALLBACK (debug_dialog_filter_changed_cb), object);
654 priv->view = gtk_tree_view_new ();
655 gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (priv->view), TRUE);
657 g_signal_connect (priv->view, "button-press-event",
658 G_CALLBACK (debug_dialog_button_press_event_cb), object);
660 renderer = gtk_cell_renderer_text_new ();
661 g_object_set (renderer, "yalign", 0, NULL);
663 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (priv->view),
664 -1, _("Time"), renderer, "text", COL_DEBUG_TIMESTAMP, NULL);
665 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (priv->view),
666 -1, _("Domain"), renderer, "text", COL_DEBUG_DOMAIN, NULL);
667 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (priv->view),
668 -1, _("Category"), renderer, "text", COL_DEBUG_CATEGORY, NULL);
669 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (priv->view),
670 -1, _("Level"), renderer, "text", COL_DEBUG_LEVEL_STRING, NULL);
672 renderer = gtk_cell_renderer_text_new ();
673 g_object_set (renderer, "family", "Monospace", NULL);
674 gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (priv->view),
675 -1, _("Message"), renderer, "text", COL_DEBUG_MESSAGE, NULL);
677 priv->store = gtk_list_store_new (NUM_DEBUG_COLS, G_TYPE_DOUBLE,
678 G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
681 priv->store_filter = gtk_tree_model_filter_new (
682 GTK_TREE_MODEL (priv->store), NULL);
684 gtk_tree_model_filter_set_visible_func (
685 GTK_TREE_MODEL_FILTER (priv->store_filter),
686 debug_dialog_visible_func, object, NULL);
688 gtk_tree_view_set_model (GTK_TREE_VIEW (priv->view), priv->store_filter);
690 /* Scrolled window */
691 scrolled_win = gtk_scrolled_window_new (NULL, NULL);
692 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
693 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
695 gtk_widget_show (priv->view);
696 gtk_container_add (GTK_CONTAINER (scrolled_win), priv->view);
698 gtk_widget_show (scrolled_win);
699 gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
701 gtk_widget_show (GTK_WIDGET (object));
707 empathy_debug_dialog_init (EmpathyDebugDialog *empathy_debug_dialog)
709 EmpathyDebugDialogPriv *priv =
710 G_TYPE_INSTANCE_GET_PRIVATE (empathy_debug_dialog,
711 EMPATHY_TYPE_DEBUG_DIALOG, EmpathyDebugDialogPriv);
713 empathy_debug_dialog->priv = priv;
715 priv->dispose_run = FALSE;
719 debug_dialog_set_property (GObject *object,
724 EmpathyDebugDialogPriv *priv = GET_PRIV (object);
729 priv->parent = GTK_WINDOW (g_value_dup_object (value));
732 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
738 debug_dialog_get_property (GObject *object,
743 EmpathyDebugDialogPriv *priv = GET_PRIV (object);
748 g_value_set_object (value, priv->parent);
751 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
757 debug_dialog_dispose (GObject *object)
759 EmpathyDebugDialog *selector = EMPATHY_DEBUG_DIALOG (object);
760 EmpathyDebugDialogPriv *priv = GET_PRIV (selector);
762 if (priv->dispose_run)
765 priv->dispose_run = TRUE;
768 g_object_unref (priv->parent);
771 g_object_unref (priv->store);
775 debug_dialog_set_enabled (EMPATHY_DEBUG_DIALOG (object), FALSE);
776 g_object_unref (priv->proxy);
779 if (priv->signal_connection)
780 tp_proxy_signal_connection_disconnect (priv->signal_connection);
783 g_object_unref (priv->cms);
785 (G_OBJECT_CLASS (empathy_debug_dialog_parent_class)->dispose) (object);
789 empathy_debug_dialog_class_init (EmpathyDebugDialogClass *klass)
791 GObjectClass *object_class = G_OBJECT_CLASS (klass);
792 object_class->constructor = debug_dialog_constructor;
793 object_class->dispose = debug_dialog_dispose;
794 object_class->set_property = debug_dialog_set_property;
795 object_class->get_property = debug_dialog_get_property;
796 g_type_class_add_private (klass, sizeof (EmpathyDebugDialogPriv));
798 g_object_class_install_property (object_class, PROP_PARENT,
799 g_param_spec_object ("parent", "parent", "parent",
800 GTK_TYPE_WINDOW, G_PARAM_CONSTRUCT_ONLY |
801 G_PARAM_READWRITE | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
807 empathy_debug_dialog_new (GtkWindow *parent)
809 g_return_val_if_fail (GTK_IS_WINDOW (parent), NULL);
811 return GTK_WIDGET (g_object_new (EMPATHY_TYPE_DEBUG_DIALOG,
812 "parent", parent, NULL));