diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-09-25 06:04:36 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-11-17 08:33:32 +0800 |
commit | 054c0881696a85f537e93b4950a28f505a3dc0f7 (patch) | |
tree | e63cfece426e2de5898c926eb6737cff229bb38b /addressbook/gui/contact-list-editor | |
parent | 6348266ee635db59a12d75497f980dd85d0fcf58 (diff) | |
download | gsoc2013-evolution-054c0881696a85f537e93b4950a28f505a3dc0f7.tar gsoc2013-evolution-054c0881696a85f537e93b4950a28f505a3dc0f7.tar.gz gsoc2013-evolution-054c0881696a85f537e93b4950a28f505a3dc0f7.tar.bz2 gsoc2013-evolution-054c0881696a85f537e93b4950a28f505a3dc0f7.tar.lz gsoc2013-evolution-054c0881696a85f537e93b4950a28f505a3dc0f7.tar.xz gsoc2013-evolution-054c0881696a85f537e93b4950a28f505a3dc0f7.tar.zst gsoc2013-evolution-054c0881696a85f537e93b4950a28f505a3dc0f7.zip |
BugĀ 589153 - Use GtkBuilder instead of libglade
Diffstat (limited to 'addressbook/gui/contact-list-editor')
-rw-r--r-- | addressbook/gui/contact-list-editor/Makefile.am | 6 | ||||
-rw-r--r-- | addressbook/gui/contact-list-editor/contact-list-editor.ui (renamed from addressbook/gui/contact-list-editor/contact-list-editor.glade) | 191 | ||||
-rw-r--r-- | addressbook/gui/contact-list-editor/e-contact-list-editor.c | 123 | ||||
-rw-r--r-- | addressbook/gui/contact-list-editor/e-contact-list-editor.h | 1 |
4 files changed, 160 insertions, 161 deletions
diff --git a/addressbook/gui/contact-list-editor/Makefile.am b/addressbook/gui/contact-list-editor/Makefile.am index 71ef3703b0..c10d02a4a1 100644 --- a/addressbook/gui/contact-list-editor/Makefile.am +++ b/addressbook/gui/contact-list-editor/Makefile.am @@ -12,7 +12,7 @@ libecontactlisteditor_la_CPPFLAGS = \ -I$(top_srcdir)/addressbook/gui/merging \ -I$(top_srcdir)/addressbook/gui/contact-editor \ -I$(top_builddir)/shell \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ + -DEVOLUTION_UIDIR=\""$(uidir)"\" \ -DG_LOG_DOMAIN=\"contact-list-editor\" \ $(EVOLUTION_ADDRESSBOOK_CFLAGS) @@ -33,8 +33,8 @@ libecontactlisteditor_la_LIBADD = \ $(top_builddir)/shell/libeshell.la \ $(EVOLUTION_ADDRESSBOOK_LIBS) -glade_DATA = contact-list-editor.glade +ui_DATA = contact-list-editor.ui -EXTRA_DIST = $(glade_DATA) +EXTRA_DIST = $(ui_DATA) -include $(top_srcdir)/git.mk diff --git a/addressbook/gui/contact-list-editor/contact-list-editor.glade b/addressbook/gui/contact-list-editor/contact-list-editor.ui index 63e68aa348..a4b95d2c65 100644 --- a/addressbook/gui/contact-list-editor/contact-list-editor.glade +++ b/addressbook/gui/contact-list-editor/contact-list-editor.ui @@ -1,21 +1,20 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> +<?xml version="1.0"?> <!--*- mode: xml -*--> -<glade-interface> - <widget class="GtkDialog" id="dialog"> +<interface> + <object class="GtkDialog" id="dialog"> <property name="visible">True</property> <property name="border_width">6</property> - <property name="title" translatable="yes" context="yes">Contact List Editor</property> + <property context="yes" name="title" translatable="yes">Contact List Editor</property> <property name="window_position">GTK_WIN_POS_CENTER</property> <property name="icon_name">stock_contact-list</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="has_separator">False</property> - <signal name="delete_event" handler="contact_list_editor_delete_event_cb"/> + <signal handler="contact_list_editor_delete_event_cb" name="delete_event"/> <child internal-child="vbox"> - <widget class="GtkVBox" id="dialog-vbox"> + <object class="GtkVBox" id="dialog-vbox"> <property name="visible">True</property> <child> - <widget class="GtkTable" id="table"> + <object class="GtkTable" id="table"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="border_width">6</property> @@ -24,70 +23,70 @@ <property name="column_spacing">12</property> <property name="row_spacing">12</property> <child> - <widget class="GtkImage" id="image"> + <object class="GtkImage" id="image"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="icon_size">6</property> <property name="icon_name">x-office-address-book</property> - </widget> + </object> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> - <property name="x_options"></property> - <property name="y_options"></property> + <property name="x_options"/> + <property name="y_options"/> </packing> </child> <child> - <widget class="GtkTable" id="source-table"> + <object class="GtkTable" id="source-table"> <property name="visible">True</property> <property name="n_rows">2</property> <property name="n_columns">2</property> <property name="column_spacing">6</property> <property name="row_spacing">6</property> <child> - <widget class="GtkLabel" id="list-name-label"> + <object class="GtkLabel" id="list-name-label"> <property name="visible">True</property> <property name="xalign">1</property> - <property name="label" translatable="yes" context="yes">_List name:</property> + <property context="yes" name="label" translatable="yes">_List name:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">list-name-entry</property> - </widget> + </object> <packing> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> - <widget class="GtkLabel" id="source-label"> + <object class="GtkLabel" id="source-label"> <property name="visible">True</property> <property name="xalign">1</property> - <property name="label" translatable="yes" context="yes">_Where:</property> + <property context="yes" name="label" translatable="yes">_Where:</property> <property name="use_underline">True</property> <property name="mnemonic_widget">source-combo-box</property> - </widget> + </object> <packing> <property name="top_attach">1</property> <property name="bottom_attach">2</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> - <widget class="GtkEntry" id="list-name-entry"> + <object class="GtkEntry" id="list-name-entry"> <property name="visible">True</property> <property name="invisible_char">*</property> - <signal name="changed" handler="contact_list_editor_list_name_entry_changed_cb"/> - </widget> + <signal handler="contact_list_editor_list_name_entry_changed_cb" name="changed"/> + </object> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> - <widget class="Custom" id="source-combo-box"> - <property name="creation_function">contact_list_editor_create_source_combo_box</property> - </widget> + <object class="ESourceComboBox" type-func="e_source_combo_box_get_type" id="source-combo-box"> + <property name="visible">True</property> + </object> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> @@ -97,33 +96,33 @@ <property name="y_options">GTK_FILL</property> </packing> </child> - </widget> + </object> <packing> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> - <widget class="GtkVBox" id="members-vbox"> + <object class="GtkVBox" id="members-vbox"> <property name="visible">True</property> <property name="spacing">6</property> <child> - <widget class="GtkLabel" id="members-label"> + <object class="GtkLabel" id="members-label"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes" context="yes"><b>Members</b></property> + <property context="yes" name="label" translatable="yes"><b>Members</b></property> <property name="use_markup">True</property> - </widget> + </object> <packing> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkAlignment" id="members-alignment"> + <object class="GtkAlignment" id="members-alignment"> <property name="visible">True</property> <property name="left_padding">12</property> <child> - <widget class="GtkTable" id="members-table"> + <object class="GtkTable" id="members-table"> <property name="visible">True</property> <property name="n_rows">4</property> <property name="n_columns">2</property> @@ -139,72 +138,71 @@ <placeholder/> </child> <child> - <widget class="GtkLabel" id="members-instructions"> + <object class="GtkLabel" id="members-instructions"> <property name="visible">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes" context="yes">_Type an email address or drag a contact into the list below:</property> + <property context="yes" name="label" translatable="yes">_Type an email address or drag a contact into the list below:</property> <property name="use_underline">True</property> <property name="justify">GTK_JUSTIFY_CENTER</property> - </widget> + </object> <packing> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> - <widget class="Custom" id="email-entry"> - <property name="creation_function">contact_list_editor_create_name_selector</property> - </widget> + <object class="ENameSelectorEntry" type-func="e_name_selector_entry_get_type" id="email-entry"> + <property name="visible">True</property> + </object> <packing> <property name="top_attach">1</property> <property name="bottom_attach">2</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> - <widget class="GtkScrolledWindow" id="scrolled-window"> + <object class="GtkScrolledWindow" id="scrolled-window"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="hscrollbar_policy">GTK_POLICY_NEVER</property> <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property> <child> - <widget class="GtkTreeView" id="tree-view"> + <object class="GtkTreeView" id="tree-view"> <property name="visible">True</property> <property name="headers_visible">False</property> <property name="search_column">0</property> - <signal name="drag_motion" handler="contact_list_editor_drag_motion_cb"/> - <signal name="key_press_event" handler="contact_list_editor_tree_view_key_press_event_cb"/> - <signal name="drag_data_received" handler="contact_list_editor_drag_data_received_cb"/> - <signal name="drag_drop" handler="contact_list_editor_drag_drop_cb"/> - </widget> + <signal handler="contact_list_editor_drag_motion_cb" name="drag_motion"/> + <signal handler="contact_list_editor_tree_view_key_press_event_cb" name="key_press_event"/> + <signal handler="contact_list_editor_drag_data_received_cb" name="drag_data_received"/> + <signal handler="contact_list_editor_drag_drop_cb" name="drag_drop"/> + </object> </child> - </widget> + </object> <packing> <property name="top_attach">2</property> <property name="bottom_attach">3</property> </packing> </child> <child> - <widget class="GtkCheckButton" id="check-button"> + <object class="GtkCheckButton" id="check-button"> <property name="visible">True</property> <property name="is_focus">True</property> - <property name="label" translatable="yes" context="yes">_Hide addresses when sending mail to this list</property> + <property context="yes" name="label" translatable="yes">_Hide addresses when sending mail to this list</property> <property name="use_underline">True</property> - <property name="response_id">0</property> - <signal name="toggled" handler="contact_list_editor_check_button_toggled_cb"/> - </widget> + <signal handler="contact_list_editor_check_button_toggled_cb" name="toggled"/> + </object> <packing> <property name="top_attach">3</property> <property name="bottom_attach">4</property> - <property name="y_options"></property> + <property name="y_options"/> </packing> </child> <child> - <widget class="GtkVBox" id="members-buttons"> + <object class="GtkVBox" id="members-buttons"> <property name="visible">True</property> <property name="spacing">6</property> <child> - <widget class="GtkButton" id="add-button"> + <object class="GtkButton" id="add-button"> <property name="visible">True</property> <property name="sensitive">False</property> <property name="is_focus">True</property> @@ -212,19 +210,18 @@ <property name="has_tooltip">True</property> <property name="tooltip_markup">Add an email to the List</property> <property name="tooltip_text">Add an email to the List</property> - <property name="label" context="yes">gtk-add</property> + <property context="yes" name="label">gtk-add</property> <property name="use_stock">True</property> <property name="xalign">0</property> - <property name="response_id">0</property> - <signal name="clicked" handler="contact_list_editor_add_button_clicked_cb"/> - </widget> + <signal handler="contact_list_editor_add_button_clicked_cb" name="clicked"/> + </object> <packing> <property name="expand">False</property> <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkButton" id="remove-button"> + <object class="GtkButton" id="remove-button"> <property name="visible">True</property> <property name="sensitive">False</property> <property name="is_focus">True</property> @@ -232,12 +229,11 @@ <property name="has_tooltip">True</property> <property name="tooltip_markup">Remove an email address from the List</property> <property name="tooltip_text">Remove an email address from the List</property> - <property name="label" context="yes">gtk-remove</property> + <property context="yes" name="label">gtk-remove</property> <property name="use_stock">True</property> <property name="xalign">0</property> - <property name="response_id">0</property> - <signal name="clicked" handler="contact_list_editor_remove_button_clicked_cb"/> - </widget> + <signal handler="contact_list_editor_remove_button_clicked_cb" name="clicked"/> + </object> <packing> <property name="expand">False</property> <property name="fill">False</property> @@ -245,7 +241,7 @@ </packing> </child> <child> - <widget class="GtkButton" id="select-button"> + <object class="GtkButton" id="select-button"> <property name="visible">True</property> <property name="is_focus">True</property> <property name="can_default">True</property> @@ -255,9 +251,8 @@ <property name="tooltip_markup">Insert email addresses from Address Book</property> <property name="tooltip_text">Insert email addresses from Address Book</property> <property name="label" translatable="yes" context="yes">_Select...</property> - <property name="response_id">0</property> <signal name="clicked" handler="contact_list_editor_select_button_clicked_cb"/> - </widget> + </object> <packing> <property name="expand">False</property> <property name="fill">False</property> @@ -265,79 +260,85 @@ </packing> </child> <child> - <widget class="GtkAlignment" id="members-buttons-alignment"> + <object class="GtkAlignment" id="members-buttons-alignment"> <property name="visible">True</property> <child> <placeholder/> </child> - </widget> + </object> <packing> <property name="position">3</property> </packing> </child> - </widget> + </object> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="top_attach">2</property> <property name="bottom_attach">3</property> - <property name="x_options"></property> + <property name="x_options"/> </packing> </child> - </widget> + </object> </child> - </widget> + </object> <packing> <property name="position">1</property> </packing> </child> - </widget> + </object> <packing> <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> </packing> </child> - </widget> + </object> <packing> <property name="position">1</property> </packing> </child> <child internal-child="action_area"> - <widget class="GtkHButtonBox" id="dialog-action-area"> + <object class="GtkHButtonBox" id="dialog-action-area"> <property name="visible">True</property> <property name="layout_style">GTK_BUTTONBOX_END</property> <child> - <widget class="GtkButton" id="cancel-button"> + <object class="GtkButton" id="cancel-button"> <property name="visible">True</property> <property name="is_focus">True</property> <property name="can_default">True</property> - <property name="label" context="yes">gtk-cancel</property> + <property context="yes" name="label">gtk-cancel</property> <property name="use_stock">True</property> - <property name="response_id">0</property> - <signal name="clicked" handler="contact_list_editor_cancel_button_clicked_cb"/> - </widget> + <signal handler="contact_list_editor_cancel_button_clicked_cb" name="clicked"/> + </object> </child> <child> - <widget class="GtkButton" id="ok-button"> + <object class="GtkButton" id="ok-button"> <property name="visible">True</property> <property name="can_default">True</property> - <property name="label" context="yes">gtk-ok</property> + <property context="yes" name="label">gtk-ok</property> <property name="use_stock">True</property> - <property name="response_id">0</property> - <signal name="clicked" handler="contact_list_editor_ok_button_clicked_cb"/> - </widget> + <signal handler="contact_list_editor_ok_button_clicked_cb" name="clicked"/> + </object> <packing> <property name="position">1</property> </packing> </child> - </widget> + </object> <packing> <property name="expand">False</property> <property name="pack_type">GTK_PACK_END</property> </packing> </child> - </widget> + </object> </child> - </widget> -</glade-interface> + <action-widgets> + <action-widget response="0">check-button</action-widget> + <action-widget response="0">add-button</action-widget> + <action-widget response="0">remove-button</action-widget> + <action-widget response="0">select-button</action-widget> + <action-widget response="0">cancel-button</action-widget> + <action-widget response="0">ok-button</action-widget> + </action-widgets> + </object> +</interface> diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index 79fef05f45..8e92d28532 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -35,6 +35,7 @@ #include <libedataserverui/e-source-combo-box.h> +#include "e-util/e-util.h" #include "addressbook/gui/widgets/eab-gui-util.h" #include "addressbook/util/addressbook.h" #include "addressbook/util/eab-book-util.h" @@ -49,8 +50,8 @@ ((obj), E_TYPE_CONTACT_LIST_EDITOR, EContactListEditorPrivate)) #define CONTACT_LIST_EDITOR_WIDGET(editor, name) \ - (glade_xml_get_widget \ - (E_CONTACT_LIST_EDITOR_GET_PRIVATE (editor)->xml, name)) + (e_builder_get_widget \ + (E_CONTACT_LIST_EDITOR_GET_PRIVATE (editor)->builder, name)) /* More macros, less typos. */ #define CONTACT_LIST_EDITOR_WIDGET_ADD_BUTTON(editor) \ @@ -60,7 +61,7 @@ #define CONTACT_LIST_EDITOR_WIDGET_DIALOG(editor) \ CONTACT_LIST_EDITOR_WIDGET ((editor), "dialog") #define CONTACT_LIST_EDITOR_WIDGET_EMAIL_ENTRY(editor) \ - CONTACT_LIST_EDITOR_WIDGET ((editor), "email-entry") + E_CONTACT_LIST_EDITOR_GET_PRIVATE (editor)->email_entry #define CONTACT_LIST_EDITOR_WIDGET_LIST_NAME_ENTRY(editor) \ CONTACT_LIST_EDITOR_WIDGET ((editor), "list-name-entry") #define CONTACT_LIST_EDITOR_WIDGET_MEMBERS_VBOX(editor) \ @@ -97,9 +98,10 @@ struct _EContactListEditorPrivate { EBook *book; EContact *contact; - GladeXML *xml; + GtkBuilder *builder; GtkTreeModel *model; ENameSelector *name_selector; + ENameSelectorEntry *email_entry; /* it's kept here, because the builder has an old widget, which was changed with this one */ /* Whether we are editing a new contact or an existing one. */ guint is_new_list : 1; @@ -863,49 +865,7 @@ contact_list_editor_tree_view_key_press_event_cb (GtkWidget *widget, return FALSE; } -/*********************** Glade Custom Widget Factories ***********************/ - -GtkWidget * -contact_list_editor_create_source_combo_box (gchar *name, - gchar *string1, - gchar *string2, - gint int1, - gint int2); - -GtkWidget * -contact_list_editor_create_source_combo_box (gchar *name, - gchar *string1, - gchar *string2, - gint int1, - gint int2) -{ - const gchar *key = "/apps/evolution/addressbook/sources"; - - GtkWidget *combo_box; - GConfClient *client; - ESourceList *source_list; - - client = gconf_client_get_default (); - source_list = e_source_list_new_for_gconf (client, key); - combo_box = e_source_combo_box_new (source_list); - g_object_unref (source_list); - g_object_unref (client); - - g_signal_connect ( - combo_box, "changed", G_CALLBACK ( - contact_list_editor_source_menu_changed_cb), NULL); - - gtk_widget_show (combo_box); - - return combo_box; -} - -GtkWidget * -contact_list_editor_create_name_selector (gchar *name, - gchar *string1, - gchar *string2, - gint int1, - gint int2); +/*********************** GtkBuilder Custom Widgets Functions ***********************/ static gpointer contact_editor_fudge_new (EBook *book, @@ -937,15 +897,36 @@ contact_list_editor_fudge_new (EBook *book, shell, book, contact, is_new, editable); } -GtkWidget * -contact_list_editor_create_name_selector (gchar *name, - gchar *string1, - gchar *string2, - gint int1, - gint int2) +static void +setup_custom_widgets (EContactListEditor *editor) { + const gchar *key = "/apps/evolution/addressbook/sources"; + GtkWidget *combo_box; + GConfClient *client; + ESourceList *source_list; ENameSelectorEntry *name_selector_entry; ENameSelector *name_selector; + GtkWidget *old, *parent; + EContactListEditorPrivate *priv; + guint ba = 0, la = 0, ra = 0, ta = 0, xo = 0, xp = 0, yo = 0, yp = 0; + + g_return_if_fail (editor != NULL); + + priv = E_CONTACT_LIST_EDITOR_GET_PRIVATE (editor); + + combo_box = WIDGET (SOURCE_MENU); + client = gconf_client_get_default (); + source_list = e_source_list_new_for_gconf (client, key); + g_object_set (G_OBJECT (combo_box), "source-list", source_list, NULL); + g_object_unref (source_list); + g_object_unref (client); + + g_signal_connect ( + combo_box, "changed", G_CALLBACK ( + contact_list_editor_source_menu_changed_cb), NULL); + + old = CONTACT_LIST_EDITOR_WIDGET (editor, "email-entry"); + g_return_if_fail (old != NULL); name_selector = e_name_selector_new (); @@ -956,11 +937,32 @@ contact_list_editor_create_name_selector (gchar *name, name_selector_entry = e_name_selector_peek_section_entry ( name_selector, "Members"); + gtk_widget_set_name (GTK_WIDGET (name_selector_entry), gtk_widget_get_name (old)); + parent = gtk_widget_get_parent (old); + + gtk_container_child_get (GTK_CONTAINER (parent), old, + "bottom-attach", &ba, + "left-attach", &la, + "right-attach", &ra, + "top-attach", &ta, + "x-options", &xo, + "x-padding", &xp, + "y-options", &yo, + "y-padding", &yp, + NULL); + + /* only hide it... */ + gtk_widget_hide (old); + + /* ... and place the new name selector to the exact place as is the old one in UI file */ + gtk_widget_show (GTK_WIDGET (name_selector_entry)); + gtk_table_attach (GTK_TABLE (parent), GTK_WIDGET (name_selector_entry), la, ra, ta, ba, xo, yo, xp, yp); + priv->email_entry = name_selector_entry; + e_name_selector_entry_set_contact_editor_func ( name_selector_entry, contact_editor_fudge_new); e_name_selector_entry_set_contact_list_editor_func ( name_selector_entry, contact_list_editor_fudge_new); - gtk_widget_show (GTK_WIDGET (name_selector_entry)); g_signal_connect ( name_selector_entry, "activate", G_CALLBACK ( @@ -974,8 +976,6 @@ contact_list_editor_create_name_selector (gchar *name, g_signal_connect ( name_selector_entry, "updated", G_CALLBACK ( contact_list_editor_email_entry_updated_cb), NULL); - - return GTK_WIDGET (name_selector_entry); } /***************************** GObject Callbacks *****************************/ @@ -1294,18 +1294,15 @@ contact_list_editor_init (EContactListEditor *editor) GtkTreeViewColumn *column; GtkCellRenderer *renderer; GtkTreeView *view; - gchar *filename; priv = E_CONTACT_LIST_EDITOR_GET_PRIVATE (editor); priv->editable = TRUE; priv->allows_contact_lists = TRUE; - filename = g_build_filename ( - EVOLUTION_GLADEDIR, "contact-list-editor.glade", NULL); - priv->xml = glade_xml_new (filename, NULL, NULL); - glade_xml_signal_autoconnect (priv->xml); - g_free (filename); + priv->builder = gtk_builder_new (); + e_load_ui_builder_definition (priv->builder, "contact-list-editor.ui"); + gtk_builder_connect_signals (priv->builder, NULL); /* Embed a pointer to the EContactListEditor in the top-level * widget. Signal handlers can then access the pointer from any @@ -1353,6 +1350,8 @@ contact_list_editor_init (EContactListEditor *editor) gtk_widget_show_all (WIDGET (DIALOG)); + setup_custom_widgets (editor); + editor->priv = priv; } diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.h b/addressbook/gui/contact-list-editor/e-contact-list-editor.h index 8e258597aa..11242b3dee 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.h +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.h @@ -23,7 +23,6 @@ #ifndef __E_CONTACT_LIST_EDITOR_H__ #define __E_CONTACT_LIST_EDITOR_H__ -#include <glade/glade.h> #include <libedataserverui/e-name-selector.h> #include "addressbook/gui/contact-editor/eab-editor.h" |