diff options
author | Chris Toshok <toshok@ximian.com> | 2002-11-08 19:49:43 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2002-11-08 19:49:43 +0800 |
commit | 83983af43712c94cfb6fce4a2c8511864d6b5374 (patch) | |
tree | ea61b8d8c555a6336086af5e44c4180bc4353470 /addressbook/gui/contact-list-editor | |
parent | e9267e9f028e27cc1d3b4590291b5c5462054d1a (diff) | |
download | gsoc2013-evolution-83983af43712c94cfb6fce4a2c8511864d6b5374.tar gsoc2013-evolution-83983af43712c94cfb6fce4a2c8511864d6b5374.tar.gz gsoc2013-evolution-83983af43712c94cfb6fce4a2c8511864d6b5374.tar.bz2 gsoc2013-evolution-83983af43712c94cfb6fce4a2c8511864d6b5374.tar.lz gsoc2013-evolution-83983af43712c94cfb6fce4a2c8511864d6b5374.tar.xz gsoc2013-evolution-83983af43712c94cfb6fce4a2c8511864d6b5374.tar.zst gsoc2013-evolution-83983af43712c94cfb6fce4a2c8511864d6b5374.zip |
convert to glade-2
2002-11-08 Chris Toshok <toshok@ximian.com>
* gui/contact-list-editor/contact-list-editor.glade: convert to glade-2
* gui/contact-list-editor/e-contact-list-editor.c: port work.
* gui/contact-list-editor/e-contact-list-model.[ch]: port work.
svn path=/trunk/; revision=18668
Diffstat (limited to 'addressbook/gui/contact-list-editor')
4 files changed, 301 insertions, 297 deletions
diff --git a/addressbook/gui/contact-list-editor/contact-list-editor.glade b/addressbook/gui/contact-list-editor/contact-list-editor.glade index 92c6aa013f..6ba85be352 100644 --- a/addressbook/gui/contact-list-editor/contact-list-editor.glade +++ b/addressbook/gui/contact-list-editor/contact-list-editor.glade @@ -1,272 +1,278 @@ -<?xml version="1.0"?> -<GTK-Interface> +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd" > -<project> - <name>contact-list-editor</name> - <program_name>contact-list-editor</program_name> - <directory></directory> - <source_directory>src</source_directory> - <pixmaps_directory>pixmaps</pixmaps_directory> - <language>C</language> - <gnome_support>True</gnome_support> - <gettext_support>True</gettext_support> -</project> +<glade-interface> + <requires lib="gnome" /> + <requires lib="bonobo" /> -<widget> - <class>GnomeApp</class> - <name>contact list editor</name> - <title>contact-list-editor</title> - <type>GTK_WINDOW_TOPLEVEL</type> - <position>GTK_WIN_POS_NONE</position> - <modal>False</modal> - <default_width>426</default_width> - <default_height>304</default_height> - <allow_shrink>True</allow_shrink> - <allow_grow>True</allow_grow> - <auto_shrink>False</auto_shrink> - <enable_layout_config>True</enable_layout_config> + <widget class="GnomeApp" id="contact list editor"> + <property name="title" translatable="yes">contact-list-editor</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="modal">no</property> + <property name="default_width">426</property> + <property name="default_height">304</property> + <property name="allow_shrink">yes</property> + <property name="allow_grow">yes</property> + <property name="enable_layout_config">yes</property> + <property name="visible">yes</property> + <property name="window-position">GTK_WIN_POS_NONE</property> - <widget> - <class>GnomeDock</class> - <child_name>GnomeApp:dock</child_name> - <name>dock1</name> - <allow_floating>True</allow_floating> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> + <child internal-child="dock"> + <widget class="BonoboDock" id="dock1"> + <property name="allow_floating">yes</property> + <property name="visible">yes</property> - <widget> - <class>GtkVBox</class> - <child_name>GnomeDock:contents</child_name> - <name>vbox8</name> - <border_width>3</border_width> - <homogeneous>False</homogeneous> - <spacing>0</spacing> + <child> + <widget class="GtkVBox" id="vbox8"> + <property name="border_width">3</property> + <property name="homogeneous">no</property> + <property name="spacing">0</property> + <property name="visible">yes</property> - <widget> - <class>GtkHBox</class> - <name>hbox6</name> - <border_width>3</border_width> - <homogeneous>False</homogeneous> - <spacing>3</spacing> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> + <child> + <widget class="GtkHBox" id="hbox6"> + <property name="border_width">3</property> + <property name="homogeneous">no</property> + <property name="spacing">3</property> + <property name="visible">yes</property> - <widget> - <class>GtkLabel</class> - <name>label10</name> - <label>List _name:</label> - <justify>GTK_JUSTIFY_LEFT</justify> - <wrap>False</wrap> - <xalign>0</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <default_focus_target>list-name-entry</default_focus_target> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> + <child> + <widget class="GtkLabel" id="label10"> + <property name="label" translatable="yes">List _name:</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">no</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="mnemonic_widget">list-name-entry</property> + <property name="visible">yes</property> + <property name="use_underline">yes</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">no</property> + <property name="fill">no</property> + </packing> + </child> - <widget> - <class>GtkEntry</class> - <name>list-name-entry</name> - <can_focus>True</can_focus> - <has_focus>True</has_focus> - <editable>True</editable> - <text_visible>True</text_visible> - <text_max_length>0</text_max_length> - <text></text> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> - </widget> + <child> + <widget class="GtkEntry" id="list-name-entry"> + <property name="can_focus">yes</property> + <property name="has_focus">yes</property> + <property name="editable">yes</property> + <property name="text" translatable="yes"></property> + <property name="max-length">0</property> + <property name="visibility">yes</property> + <property name="visible">yes</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">yes</property> + <property name="fill">yes</property> + </packing> + </child> - <widget> - <class>Custom</class> - <name>custom7</name> - <creation_function>e_create_image_widget</creation_function> - <string1>evolution-contacts-plain.png</string1> - <int1>0</int1> - <int2>0</int2> - <last_modification_time>Sat, 23 Jun 2001 05:59:21 GMT</last_modification_time> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>True</fill> - </child> - </widget> - </widget> + <child> + <widget class="Custom" id="custom7"> + <property name="creation_function">e_create_image_widget</property> + <property name="string1">evolution-contacts-plain.png</property> + <property name="int1">0</property> + <property name="int2">0</property> + <property name="last_modification_time">Sat, 23 Jun 2001 05:59:21 GMT</property> + <property name="visible">yes</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">no</property> + <property name="fill">yes</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">no</property> + <property name="fill">no</property> + </packing> + </child> - <widget> - <class>GtkFrame</class> - <name>frame3</name> - <border_width>3</border_width> - <label>Members</label> - <label_xalign>0</label_xalign> - <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> + <child> + <widget class="GtkFrame" id="frame3"> + <property name="border_width">3</property> + <property name="label" translatable="yes">Members</property> + <property name="label_xalign">0</property> + <property name="shadow">GTK_SHADOW_ETCHED_IN</property> + <property name="visible">yes</property> - <widget> - <class>GtkHBox</class> - <name>hbox7</name> - <homogeneous>False</homogeneous> - <spacing>0</spacing> + <child> + <widget class="GtkHBox" id="hbox7"> + <property name="homogeneous">no</property> + <property name="spacing">0</property> + <property name="visible">yes</property> - <widget> - <class>GtkVBox</class> - <name>vbox9</name> - <border_width>3</border_width> - <homogeneous>False</homogeneous> - <spacing>3</spacing> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> + <child> + <widget class="GtkVBox" id="vbox9"> + <property name="border_width">3</property> + <property name="homogeneous">no</property> + <property name="spacing">3</property> + <property name="visible">yes</property> - <widget> - <class>GtkLabel</class> - <name>label11</name> - <label>Type an email address or drag a contact into the list below:</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> + <child> + <widget class="GtkLabel" id="label11"> + <property name="label" translatable="yes">Type an email address or drag a contact into the list below:</property> + <property name="justify">GTK_JUSTIFY_CENTER</property> + <property name="wrap">no</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="visible">yes</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">no</property> + <property name="fill">no</property> + </packing> + </child> - <widget> - <class>GtkEntry</class> - <name>email-entry</name> - <can_focus>True</can_focus> - <editable>True</editable> - <text_visible>True</text_visible> - <text_max_length>0</text_max_length> - <text></text> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> + <child> + <widget class="GtkEntry" id="email-entry"> + <property name="can_focus">yes</property> + <property name="editable">yes</property> + <property name="text" translatable="yes"></property> + <property name="max-length">0</property> + <property name="visibility">yes</property> + <property name="visible">yes</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">no</property> + <property name="fill">no</property> + </packing> + </child> - <widget> - <class>Custom</class> - <name>contact-list-table</name> - <creation_function>e_contact_list_editor_create_table</creation_function> - <string1></string1> - <int1>0</int1> - <int2>0</int2> - <last_modification_time>Sat, 23 Jun 2001 06:00:16 GMT</last_modification_time> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> - </widget> + <child> + <widget class="Custom" id="contact-list-table"> + <property name="creation_function">e_contact_list_editor_create_table</property> + <property name="string1"></property> + <property name="int1">0</property> + <property name="int2">0</property> + <property name="last_modification_time">Sat, 23 Jun 2001 06:00:16 GMT</property> + <property name="visible">yes</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">yes</property> + <property name="fill">yes</property> + </packing> + </child> - <widget> - <class>GtkCheckButton</class> - <name>visible-addrs-checkbutton</name> - <can_focus>True</can_focus> - <label>_Hide addresses when sending mail to this list</label> - <active>False</active> - <draw_indicator>True</draw_indicator> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> - </widget> + <child> + <widget class="GtkCheckButton" id="visible-addrs-checkbutton"> + <property name="can_focus">yes</property> + <property name="label" translatable="yes">_Hide addresses when sending mail to this list</property> + <property name="active">no</property> + <property name="draw_indicator">yes</property> + <property name="visible">yes</property> + <property name="use_underline">yes</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">no</property> + <property name="fill">no</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">yes</property> + <property name="fill">yes</property> + </packing> + </child> - <widget> - <class>GtkVBox</class> - <name>vbox10</name> - <homogeneous>False</homogeneous> - <spacing>0</spacing> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> + <child> + <widget class="GtkVBox" id="vbox10"> + <property name="homogeneous">no</property> + <property name="spacing">0</property> + <property name="visible">yes</property> - <widget> - <class>GtkLabel</class> - <name>label12</name> - <label> -</label> - <justify>GTK_JUSTIFY_CENTER</justify> - <wrap>False</wrap> - <xalign>0.5</xalign> - <yalign>0.5</yalign> - <xpad>0</xpad> - <ypad>0</ypad> - <child> - <padding>0</padding> - <expand>False</expand> - <fill>False</fill> - </child> - </widget> + <child> + <widget class="GtkLabel" id="label12"> + <property name="label" translatable="yes"> +</property> + <property name="justify">GTK_JUSTIFY_CENTER</property> + <property name="wrap">no</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="visible">yes</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">no</property> + <property name="fill">no</property> + </packing> + </child> - <widget> - <class>GtkVButtonBox</class> - <name>vbuttonbox4</name> - <layout_style>GTK_BUTTONBOX_START</layout_style> - <spacing>0</spacing> - <child_min_width>85</child_min_width> - <child_min_height>27</child_min_height> - <child_ipad_x>7</child_ipad_x> - <child_ipad_y>0</child_ipad_y> - <child> - <padding>0</padding> - <expand>True</expand> - <fill>True</fill> - </child> + <child> + <widget class="GtkVButtonBox" id="vbuttonbox4"> + <property name="layout_style">GTK_BUTTONBOX_START</property> + <property name="spacing">0</property> + <property name="visible">yes</property> - <widget> - <class>GtkButton</class> - <name>add-email-button</name> - <can_default>True</can_default> - <can_focus>True</can_focus> - <label>_Add</label> - <relief>GTK_RELIEF_NORMAL</relief> - </widget> + <child> + <widget class="GtkButton" id="add-email-button"> + <property name="can_default">yes</property> + <property name="can_focus">yes</property> + <property name="label" translatable="yes">_Add</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="visible">yes</property> + <property name="use_underline">yes</property> + </widget> + </child> - <widget> - <class>GtkButton</class> - <name>remove-button</name> - <can_default>True</can_default> - <can_focus>True</can_focus> - <label>_Remove</label> - <relief>GTK_RELIEF_NORMAL</relief> - </widget> - </widget> - </widget> - </widget> + <child> + <widget class="GtkButton" id="remove-button"> + <property name="can_default">yes</property> + <property name="can_focus">yes</property> + <property name="label" translatable="yes">_Remove</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="visible">yes</property> + <property name="use_underline">yes</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">yes</property> + <property name="fill">yes</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">no</property> + <property name="fill">no</property> + </packing> + </child> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">yes</property> + <property name="fill">yes</property> + </packing> + </child> + </widget> + </child> </widget> - </widget> + <packing> + <property name="padding">0</property> + <property name="expand">yes</property> + <property name="fill">yes</property> + </packing> + </child> </widget> -</widget> - -</GTK-Interface> +</glade-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 b689cfb5e7..9c696f9040 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -187,8 +187,8 @@ e_contact_list_editor_class_init (EContactListEditorClass *klass) contact_list_editor_signals[LIST_DELETED] = g_signal_new ("list_deleted", - G_SIGNAL_RUN_FIRST, G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (EContactListEditorClass, list_deleted), NULL, NULL, ecle_marshal_NONE__INT_OBJECT, @@ -225,7 +225,7 @@ e_contact_list_editor_init (EContactListEditor *editor) editor->app = glade_xml_get_widget (gui, "contact list editor"); editor->table = glade_xml_get_widget (gui, "contact-list-table"); - editor->model = gtk_object_get_data (GTK_OBJECT(editor->table), "model"); + editor->model = g_object_get_data (G_OBJECT(editor->table), "model"); editor->add_button = glade_xml_get_widget (editor->gui, "add-email-button"); editor->remove_button = glade_xml_get_widget (editor->gui, "remove-button"); @@ -257,9 +257,7 @@ e_contact_list_editor_init (EContactListEditor *editor) /* Build the menu and toolbar */ -#ifdef PENDING_PORT_WORK - container = bonobo_ui_container_new (); - bonobo_ui_container_set_win (container, BONOBO_WINDOW (editor->app)); + container = bonobo_window_get_ui_container (BONOBO_WINDOW (editor->app)); editor->uic = bonobo_ui_component_new_default (); if (!editor->uic) { @@ -269,41 +267,40 @@ e_contact_list_editor_init (EContactListEditor *editor) bonobo_ui_component_set_container (editor->uic, bonobo_object_corba_objref ( BONOBO_OBJECT (container)), NULL); -#endif create_ui (editor); /* connect signals */ - gtk_signal_connect (GTK_OBJECT(editor->add_button), - "clicked", GTK_SIGNAL_FUNC(add_email_cb), editor); - gtk_signal_connect (GTK_OBJECT(editor->email_entry), - "activate", GTK_SIGNAL_FUNC(add_email_cb), editor); - gtk_signal_connect (GTK_OBJECT(editor->remove_button), - "clicked", GTK_SIGNAL_FUNC(remove_entry_cb), editor); - gtk_signal_connect (GTK_OBJECT(editor->list_name_entry), - "changed", GTK_SIGNAL_FUNC(list_name_changed_cb), editor); - gtk_signal_connect (GTK_OBJECT(editor->visible_addrs_checkbutton), - "toggled", GTK_SIGNAL_FUNC(visible_addrs_toggled_cb), editor); + g_signal_connect (editor->add_button, + "clicked", G_CALLBACK(add_email_cb), editor); + g_signal_connect (editor->email_entry, + "activate", G_CALLBACK(add_email_cb), editor); + g_signal_connect (editor->remove_button, + "clicked", G_CALLBACK(remove_entry_cb), editor); + g_signal_connect (editor->list_name_entry, + "changed", G_CALLBACK(list_name_changed_cb), editor); + g_signal_connect (editor->visible_addrs_checkbutton, + "toggled", G_CALLBACK(visible_addrs_toggled_cb), editor); e_table_drag_dest_set (e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table)), 0, drag_types, num_drag_types, GDK_ACTION_LINK); - gtk_signal_connect (GTK_OBJECT(e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table))), - "table_drag_motion", GTK_SIGNAL_FUNC(table_drag_motion_cb), editor); - gtk_signal_connect (GTK_OBJECT(e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table))), - "table_drag_drop", GTK_SIGNAL_FUNC(table_drag_drop_cb), editor); - gtk_signal_connect (GTK_OBJECT(e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table))), - "table_drag_data_received", GTK_SIGNAL_FUNC(table_drag_data_received_cb), editor); + g_signal_connect (e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table)), + "table_drag_motion", G_CALLBACK(table_drag_motion_cb), editor); + g_signal_connect (e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table)), + "table_drag_drop", G_CALLBACK (table_drag_drop_cb), editor); + g_signal_connect (e_table_scrolled_get_table (E_TABLE_SCROLLED (editor->table)), + "table_drag_data_received", G_CALLBACK(table_drag_data_received_cb), editor); command_state_changed (editor); /* Connect to the deletion of the dialog */ - gtk_signal_connect (GTK_OBJECT (editor->app), "delete_event", - GTK_SIGNAL_FUNC (app_delete_event_cb), editor); + g_signal_connect (editor->app, "delete_event", + G_CALLBACK (app_delete_event_cb), editor); /* set the icon */ - icon_path = g_concat_dir_and_file (EVOLUTION_ICONSDIR, "contact-list-16.png"); + icon_path = g_build_filename (EVOLUTION_ICONSDIR, "contact-list-16.png"); gnome_window_icon_set_from_file (GTK_WINDOW (editor->app), icon_path); g_free (icon_path); } @@ -331,8 +328,8 @@ list_added_cb (EBook *book, EBookStatus status, const char *id, EditorCloseStruc e_card_set_id (cle->card, id); - gtk_signal_emit (GTK_OBJECT (cle), contact_list_editor_signals[LIST_ADDED], - status, cle->card); + g_signal_emit (cle, contact_list_editor_signals[LIST_ADDED], 0, + status, cle->card); if (status == E_BOOK_STATUS_SUCCESS) { cle->is_new_list = FALSE; @@ -357,8 +354,8 @@ list_modified_cb (EBook *book, EBookStatus status, EditorCloseStruct *ecs) gtk_widget_set_sensitive (cle->app, TRUE); cle->in_async_call = FALSE; - gtk_signal_emit (GTK_OBJECT (cle), contact_list_editor_signals[LIST_MODIFIED], - status, cle->card); + g_signal_emit (cle, contact_list_editor_signals[LIST_MODIFIED], 0, + status, cle->card); if (status == E_BOOK_STATUS_SUCCESS) { if (should_close) @@ -490,8 +487,8 @@ list_deleted_cb (EBook *book, EBookStatus status, EContactListEditor *cle) gtk_widget_set_sensitive (cle->app, TRUE); cle->in_async_call = FALSE; - gtk_signal_emit (GTK_OBJECT (cle), contact_list_editor_signals[LIST_DELETED], - status, cle->card); + g_signal_emit (cle, contact_list_editor_signals[LIST_DELETED], 0, + status, cle->card); /* always close the dialog after we successfully delete a list */ if (status == E_BOOK_STATUS_SUCCESS) @@ -567,7 +564,8 @@ create_ui (EContactListEditor *ce) } static void -contact_list_editor_destroy_notify (void *data) +contact_list_editor_destroy_notify (gpointer data, + GObject *where_the_object_was) { EContactListEditor *ce = E_CONTACT_LIST_EDITOR (data); @@ -583,9 +581,9 @@ e_contact_list_editor_new (EBook *book, EContactListEditor *ce = g_object_new (E_TYPE_CONTACT_LIST_EDITOR, NULL); all_contact_list_editors = g_slist_prepend (all_contact_list_editors, ce); - gtk_object_weakref (GTK_OBJECT (ce), contact_list_editor_destroy_notify, ce); + g_object_weak_ref (G_OBJECT (ce), contact_list_editor_destroy_notify, ce); - gtk_object_set (GTK_OBJECT (ce), + g_object_set (ce, "book", book, "card", list_card, "is_new_list", is_new_list, @@ -711,7 +709,7 @@ e_contact_list_editor_create_table(gchar *name, EVOLUTION_ETSPECDIR "/e-contact-list-editor.etspec", NULL); - gtk_object_set_data(GTK_OBJECT(table), "model", model); + g_object_set_data(G_OBJECT(table), "model", model); return table; } @@ -785,7 +783,7 @@ close_dialog (EContactListEditor *cle) gtk_widget_destroy (cle->app); cle->app = NULL; - gtk_signal_emit (GTK_OBJECT (cle), contact_list_editor_signals[EDITOR_CLOSED]); + g_signal_emit (cle, contact_list_editor_signals[EDITOR_CLOSED], 0); } /* Callback used when the editor is destroyed */ @@ -877,7 +875,7 @@ table_drag_data_received_cb (ETable *table, int row, int col, changed = TRUE; } } - g_list_foreach (card_list, (GFunc)gtk_object_unref, NULL); + g_list_foreach (card_list, (GFunc)g_object_unref, NULL); g_list_free (card_list); /* Skip to the end of the list */ @@ -923,7 +921,7 @@ extract_info(EContactListEditor *editor) char *string = e_utf8_gtk_editable_get_chars(GTK_EDITABLE (editor->list_name_entry), 0, -1); if (string && *string) - gtk_object_set(GTK_OBJECT(card), + g_object_set (card, "file_as", string, "full_name", string, NULL); @@ -931,13 +929,13 @@ extract_info(EContactListEditor *editor) g_free (string); - gtk_object_set (GTK_OBJECT(card), + g_object_set (card, "list", GINT_TO_POINTER (TRUE), "list_show_addresses", GINT_TO_POINTER (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(editor->visible_addrs_checkbutton))), NULL); - gtk_object_get (GTK_OBJECT(card), + g_object_get (card, "email", &email_list, NULL); @@ -971,7 +969,7 @@ fill_in_info(EContactListEditor *editor) EList *email_list; EIterator *email_iter; - gtk_object_get (GTK_OBJECT (editor->card), + g_object_get (editor->card, "file_as", &file_as, "email", &email_list, "list", &is_evolution_list, diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.c b/addressbook/gui/contact-list-editor/e-contact-list-model.c index bf6c1fb7ad..91e2965d88 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-model.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-model.c @@ -158,7 +158,7 @@ e_contact_list_model_new () { EContactListModel *model; - model = gtk_type_new (e_contact_list_model_get_type ()); + model = g_object_new (E_TYPE_CONTACT_LIST_MODEL, NULL); e_contact_list_model_construct (model); diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.h b/addressbook/gui/contact-list-editor/e-contact-list-model.h index b57a785b88..bb07d83544 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-model.h +++ b/addressbook/gui/contact-list-editor/e-contact-list-model.h @@ -11,11 +11,11 @@ G_BEGIN_DECLS -#define E_CONTACT_LIST_MODEL_TYPE (e_contact_list_model_get_type ()) -#define E_CONTACT_LIST_MODEL(o) (GTK_CHECK_CAST ((o), E_CONTACT_LIST_MODEL_TYPE, EContactListModel)) -#define E_CONTACT_LIST_MODEL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_CONTACT_LIST_MODEL_TYPE, EContactListModelClass)) -#define E_IS_CONTACT_LIST_MODEL(o) (GTK_CHECK_TYPE ((o), E_CONTACT_LIST_MODEL_TYPE)) -#define E_IS_CONTACT_LIST_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_CONTACT_LIST_MODEL_TYPE)) +#define E_TYPE_CONTACT_LIST_MODEL (e_contact_list_model_get_type ()) +#define E_CONTACT_LIST_MODEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_CONTACT_LIST_MODEL, EContactListModel)) +#define E_CONTACT_LIST_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TYPE_CONTACT_LIST_MODEL, EContactListModelClass)) +#define E_IS_CONTACT_LIST_MODEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_CONTACT_LIST_MODEL)) +#define E_IS_CONTACT_LIST_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_CONTACT_LIST_MODEL)) typedef struct _EContactListModel EContactListModel; typedef struct _EContactListModelClass EContactListModelClass; |