diff options
author | Chris Toshok <toshok@ximian.com> | 2002-12-19 06:11:28 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2002-12-19 06:11:28 +0800 |
commit | ace402d9173fe24b4f9a753f7c155fa0605ed866 (patch) | |
tree | a5d6e3dd59631365199ef713b7d7359dbc27ec91 /addressbook/gui/component | |
parent | 1b8d99dcfd0406e9785e1a60b6e9e903e9e60493 (diff) | |
download | gsoc2013-evolution-ace402d9173fe24b4f9a753f7c155fa0605ed866.tar gsoc2013-evolution-ace402d9173fe24b4f9a753f7c155fa0605ed866.tar.gz gsoc2013-evolution-ace402d9173fe24b4f9a753f7c155fa0605ed866.tar.bz2 gsoc2013-evolution-ace402d9173fe24b4f9a753f7c155fa0605ed866.tar.lz gsoc2013-evolution-ace402d9173fe24b4f9a753f7c155fa0605ed866.tar.xz gsoc2013-evolution-ace402d9173fe24b4f9a753f7c155fa0605ed866.tar.zst gsoc2013-evolution-ace402d9173fe24b4f9a753f7c155fa0605ed866.zip |
drop use of "font" arg. (get_left_width): use pango to calculate this
2002-12-18 Chris Toshok <toshok@ximian.com>
* gui/widgets/e-minicard.c (e_minicard_realize): drop use of
"font" arg.
(get_left_width): use pango to calculate this instead of a GdkFont.
* gui/widgets/e-minicard-view.c: drop include of e-unicode.h.
* gui/widgets/e-minicard-label.c (e_minicard_label_construct):
don't need to create the font anymore.
* gui/search/Makefile.am (INCLUDES): add -D*_DISABLE_DEPRECATED.
* gui/search/e-addressbook-search-dialog.c
(e_addressbook_search_dialog_new): use g_object_new instead of
gtk_type_new.
* gui/merging/Makefile.am (INCLUDES): add -D*_DISABLE_DEPRECATED.
* gui/contact-list-editor/Makefile.am (INCLUDES): add
-D*_DISABLE_DEPRECATED.
* gui/contact-list-editor/e-contact-list-editor.c (is_named):
strdup (or not, if we don't need to save the value) instead of
using the e_utf8 functions.
(fill_in_info): same.
* gui/contact-editor/Makefile.am (INCLUDES): add
-D*_DISABLE_DEPRECATED.
* gui/contact-editor/e-contact-save-as.c (e_contact_save_as):
strdup (or not, if we don't need to save the value) instead of
using the e_utf8 functions.
(e_contact_list_save_as): same.
* gui/contact-editor/e-contact-quick-add.c (clicked_cb): strdup
(or not, if we don't need to save the value) instead of using the
e_utf8 functions.
(build_quick_add_dialog): same.
* gui/contact-editor/e-contact-editor.c (phone_entry_changed):
strdup (or not, if we don't need to save the value) instead of
using the e_utf8 functions.
(file_as_set_style): same.
(name_entry_changed): same.
(full_name_clicked): same.
(categories_clicked): same.
(set_field): same.
(fill_in_field): same.
(fill_in_single_field): same.
(extract_field): same.
(extract_single_field): same.
* gui/contact-editor/e-contact-editor-fullname.c (extract_field):
just strdup, it's already utf8.
* gui/contact-editor/e-contact-editor-address.c (extract_field):
they're all entries, use GTK_ENTRY foo here.
* gui/component/select-names/Makefile.am (INCLUDES): add
-D*_DISABLE_DEPRECATED.
* gui/component/select-names/e-select-names.c
(e_select_names_add_section): remove the extra
utf8_from_locale_string stuff.
* gui/component/select-names/e-select-names-popup.c
(set_uiinfo_label): gtk_container_children ->
gtk_container_get_children, and remove the extra utf8 stuff.
* gui/component/Makefile.am (INCLUDES): add
-D*_DISABLE_DEPRECATED.
* gui/component/addressbook-storage.c
(addressbook_storage_init_source_uri): g_string_sprintfa ->
g_string_append_printf.
* gui/component/addressbook-config.c (focus_help):
gtk_notebook_set_page -> gtk_notebook_set_current_page.
(addressbook_source_dialog_set_source): same.
(auth_optionmenu_activated): gtk_container_children ->
gtk_container_get_children.
(ssl_optionmenu_activated): same.
(ssl_optionmenu_selected): same, and gtk_notebook_set_page ->
gtk_notebook_set_current_page.
(scope_optionmenu_activated): same.
(set_advanced_button_state): same.
(addressbook_ldap_init): hook "response" to gtk_widget_destroy to
make the dialog go away when clicked.
(addressbook_ldap_auth): same.
(addressbook_root_dse_query): same.
(do_ldap_root_dse_query): same.
(addressbook_config_control_new): fix return type and cast.
(main): remove call to gtk_widget_push_visual.
* gui/component/addressbook-config.h:
addressbook_config_control_new returns a BonoboObject, not a
BonoboControl.
* gui/component/addressbook.c: remove e-unicode.h include.
* backend/pas/Makefile.am (INCLUDES): Add
-DLIBGNOME_DISABLE_DEPRECATED.
* backend/ebook/Makefile.am (INCLUDES): Add
-DLIBGNOME_DISABLE_DEPRECATED.
* backend/ebook/e-card.c (e_card_get_property): remove misleading
comment.
svn path=/trunk/; revision=19160
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r-- | addressbook/gui/component/Makefile.am | 4 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-config.c | 37 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-config.h | 2 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-storage.c | 13 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook.c | 1 | ||||
-rw-r--r-- | addressbook/gui/component/select-names/Makefile.am | 4 | ||||
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names-popup.c | 8 | ||||
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names.c | 3 |
8 files changed, 39 insertions, 33 deletions
diff --git a/addressbook/gui/component/Makefile.am b/addressbook/gui/component/Makefile.am index 8d4fcb2471..f9e9863713 100644 --- a/addressbook/gui/component/Makefile.am +++ b/addressbook/gui/component/Makefile.am @@ -25,6 +25,10 @@ INCLUDES = \ -DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \ -DEVOLUTION_IMAGESDIR=\""$(datadir)"/images/evolution\" \ $(LDAP_CFLAGS) \ + -DG_DISABLE_DEPRECATED \ + -DGTK_DISABLE_DEPRECATED \ + -DLIBGNOME_DISABLE_DEPRECATED \ + -DLIBGNOMEUI_DISABLE_DEPRECATED \ $(EVOLUTION_ADDRESSBOOK_CFLAGS) componentdir = $(COMPONENT_DIR) diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index df65eb72d3..0aa0dc62c3 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -33,7 +33,6 @@ #include "evolution-config-control.h" #include <shell/e-folder-list.h> -#include <gal/widgets/e-unicode.h> #include <gal/e-table/e-table-memory-store.h> #include <gal/e-table/e-table-scrolled.h> @@ -80,7 +79,7 @@ typedef struct { static void focus_help (GtkWidget *w, GdkEventFocus *event, FocusHelpClosure *closure) { - gtk_notebook_set_page (GTK_NOTEBOOK(closure->notebook), closure->page_num); + gtk_notebook_set_current_page (GTK_NOTEBOOK(closure->notebook), closure->page_num); } static void @@ -204,7 +203,7 @@ addressbook_ldap_init (GtkWidget *window, AddressbookSource *source) GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Failed to connect to LDAP server")); - + g_signal_connect (dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_widget_show (dialog); return NULL; @@ -229,6 +228,7 @@ addressbook_ldap_auth (GtkWidget *window, AddressbookSource *source, LDAP *ldap) GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Failed to authenticate with LDAP server")); + g_signal_connect (dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_widget_show (dialog); } return ldap_error; @@ -256,6 +256,7 @@ addressbook_root_dse_query (GtkWindow *window, AddressbookSource *source, LDAP * GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("Could not perform query on Root DSE")); + g_signal_connect (dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_widget_show (dialog); } @@ -302,8 +303,8 @@ addressbook_source_dialog_set_source (AddressbookSourceDialog *dialog, Addressbo dialog->auth = source ? source->auth : ADDRESSBOOK_LDAP_AUTH_NONE; gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->auth_optionmenu), dialog->auth); if (dialog->auth != ADDRESSBOOK_LDAP_AUTH_NONE) { - gtk_notebook_set_page (GTK_NOTEBOOK(dialog->auth_label_notebook), dialog->auth - 1); - gtk_notebook_set_page (GTK_NOTEBOOK(dialog->auth_entry_notebook), dialog->auth - 1); + gtk_notebook_set_current_page (GTK_NOTEBOOK(dialog->auth_label_notebook), dialog->auth - 1); + gtk_notebook_set_current_page (GTK_NOTEBOOK(dialog->auth_entry_notebook), dialog->auth - 1); } gtk_widget_set_sensitive (dialog->auth_label_notebook, dialog->auth != ADDRESSBOOK_LDAP_AUTH_NONE); gtk_widget_set_sensitive (dialog->auth_entry_notebook, dialog->auth != ADDRESSBOOK_LDAP_AUTH_NONE); @@ -398,8 +399,8 @@ reparent_to_vbox (AddressbookSourceDialog *dialog, char *vbox_name, char *widget static void auth_optionmenu_activated (GtkWidget *item, AddressbookSourceDialog *dialog) { - dialog->auth = g_list_index (gtk_container_children (GTK_CONTAINER (item->parent)), - item); + dialog->auth = g_list_index (gtk_container_get_children (GTK_CONTAINER (item->parent)), + item); dialog->general_modify_func (item, dialog); @@ -410,8 +411,8 @@ auth_optionmenu_activated (GtkWidget *item, AddressbookSourceDialog *dialog) else { gtk_widget_set_sensitive (dialog->auth_label_notebook, TRUE); gtk_widget_set_sensitive (dialog->auth_entry_notebook, TRUE); - gtk_notebook_set_page (GTK_NOTEBOOK(dialog->auth_label_notebook), dialog->auth - 1); - gtk_notebook_set_page (GTK_NOTEBOOK(dialog->auth_entry_notebook), dialog->auth - 1); + gtk_notebook_set_current_page (GTK_NOTEBOOK(dialog->auth_label_notebook), dialog->auth - 1); + gtk_notebook_set_current_page (GTK_NOTEBOOK(dialog->auth_entry_notebook), dialog->auth - 1); } } @@ -501,7 +502,7 @@ druid_info_page_prepare (GnomeDruidPage *dpage, GtkWidget *gdruid, AddressbookSo static void ssl_optionmenu_activated (GtkWidget *item, AddressbookSourceDialog *dialog) { - dialog->ssl = g_list_index (gtk_container_children (GTK_CONTAINER (item->parent)), + dialog->ssl = g_list_index (gtk_container_get_children (GTK_CONTAINER (item->parent)), item); dialog->connecting_modify_func (item, dialog); @@ -511,12 +512,12 @@ static void ssl_optionmenu_selected (GtkWidget *item, AddressbookSourceDialog *dialog) { GtkWidget *connecting_tab_help; - int ssl_type = g_list_index (gtk_container_children (GTK_CONTAINER (item->parent)), + int ssl_type = g_list_index (gtk_container_get_children (GTK_CONTAINER (item->parent)), item); connecting_tab_help = glade_xml_get_widget (dialog->gui, "connecting-tab-help"); - gtk_notebook_set_page (GTK_NOTEBOOK(connecting_tab_help), ssl_type + 1); + gtk_notebook_set_current_page (GTK_NOTEBOOK(connecting_tab_help), ssl_type + 1); } static void @@ -667,6 +668,7 @@ do_ldap_root_dse_query (GtkWidget *dialog, ETableModel *model, AddressbookSource GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("The server responded with no supported search bases")); + g_signal_connect (error_dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_widget_show (error_dialog); goto fail; } @@ -744,7 +746,7 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog) static void scope_optionmenu_activated (GtkWidget *item, AddressbookSourceDialog *dialog) { - dialog->scope = g_list_index (gtk_container_children (GTK_CONTAINER (item->parent)), + dialog->scope = g_list_index (gtk_container_get_children (GTK_CONTAINER (item->parent)), item); if (dialog->searching_modify_func) @@ -1117,7 +1119,7 @@ static void set_advanced_button_state (AddressbookSourceDialog *dialog) { if (dialog->advanced) { - gtk_notebook_set_page (GTK_NOTEBOOK(dialog->advanced_button_notebook), 0); + gtk_notebook_set_current_page (GTK_NOTEBOOK(dialog->advanced_button_notebook), 0); #ifdef NEW_ADVANCED_UI gtk_notebook_append_page (GTK_NOTEBOOK(dialog->notebook), dialog->objectclasses_tab, dialog->objectclasses_label); gtk_notebook_append_page (GTK_NOTEBOOK(dialog->notebook), dialog->mappings_tab, dialog->mappings_label); @@ -1125,7 +1127,7 @@ set_advanced_button_state (AddressbookSourceDialog *dialog) #endif } else { - gtk_notebook_set_page (GTK_NOTEBOOK(dialog->advanced_button_notebook), 1); + gtk_notebook_set_current_page (GTK_NOTEBOOK(dialog->advanced_button_notebook), 1); /* hide the advanced tabs of the main notebook */ gtk_notebook_remove_page (GTK_NOTEBOOK(dialog->notebook), 5); @@ -1672,7 +1674,7 @@ ldap_config_control_new (GNOME_Evolution_Shell shell) } -BonoboControl * +BonoboObject * addressbook_config_control_new (void) { GNOME_Evolution_Shell shell; @@ -1681,7 +1683,7 @@ addressbook_config_control_new (void) if (! shell) return NULL; - return BONOBO_CONTROL (ldap_config_control_new (shell)); + return BONOBO_OBJECT (ldap_config_control_new (shell)); } void @@ -1731,7 +1733,6 @@ main(int argc, char **argv) g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING); #endif - gtk_widget_push_visual (gdk_rgb_get_visual ()); gtk_widget_push_colormap (gdk_rgb_get_cmap ()); dialog = ldap_dialog_new (NULL); diff --git a/addressbook/gui/component/addressbook-config.h b/addressbook/gui/component/addressbook-config.h index 89d3a411a0..2f95a8cbbe 100644 --- a/addressbook/gui/component/addressbook-config.h +++ b/addressbook/gui/component/addressbook-config.h @@ -27,7 +27,7 @@ #include "addressbook-storage.h" -BonoboControl *addressbook_config_control_new (void); +BonoboObject *addressbook_config_control_new (void); void addressbook_config_create_new_source (const char *new_source, GtkWidget *parent); diff --git a/addressbook/gui/component/addressbook-storage.c b/addressbook/gui/component/addressbook-storage.c index 4cf66bca00..9b73b93b54 100644 --- a/addressbook/gui/component/addressbook-storage.c +++ b/addressbook/gui/component/addressbook-storage.c @@ -371,15 +371,18 @@ addressbook_storage_init_source_uri (AddressbookSource *source) str = g_string_new ("ldap://"); - g_string_sprintfa (str, "%s:%s/%s?"/*trigraph prevention*/"?%s", - source->host, source->port, source->rootdn, ldap_unparse_scope (source->scope)); + g_string_append_printf (str, "%s:%s/%s?"/*trigraph prevention*/"?%s", + source->host, + source->port, + source->rootdn, + ldap_unparse_scope (source->scope)); - g_string_sprintfa (str, ";limit=%d", source->limit); + g_string_append_printf (str, ";limit=%d", source->limit); - g_string_sprintfa (str, ";ssl=%s", ldap_unparse_ssl (source->ssl)); + g_string_append_printf (str, ";ssl=%s", ldap_unparse_ssl (source->ssl)); #if 0 - g_string_sprintfa (str, ";timeout=%d", source->timeout); + g_string_append_printf (str, ";timeout=%d", source->timeout); #endif source->uri = str->str; diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 86644aaf8d..1fb5520454 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -37,7 +37,6 @@ #include <bonobo/bonobo-exception.h> #include <bonobo/bonobo-property-bag.h> #include <gal/util/e-util.h> -#include <gal/widgets/e-unicode.h> #include "e-util/e-categories-master-list-wombat.h" #include "e-util/e-sexp.h" diff --git a/addressbook/gui/component/select-names/Makefile.am b/addressbook/gui/component/select-names/Makefile.am index deee27fca0..3b1c816ad6 100644 --- a/addressbook/gui/component/select-names/Makefile.am +++ b/addressbook/gui/component/select-names/Makefile.am @@ -44,6 +44,10 @@ INCLUDES = \ -DEVOLUTION_ICONSDIR=\""$(iconsdir)"\" \ -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ -DCAMEL_PROVIDERDIR=\""$(providerdir)"\" \ + -DG_DISABLE_DEPRECATED \ + -DGTK_DISABLE_DEPRECATED \ + -DLIBGNOME_DISABLE_DEPRECATED \ + -DLIBGNOMEUI_DISABLE_DEPRECATED \ $(EVOLUTION_ADDRESSBOOK_CFLAGS) lib_LTLIBRARIES = libeselectnames.la diff --git a/addressbook/gui/component/select-names/e-select-names-popup.c b/addressbook/gui/component/select-names/e-select-names-popup.c index 3c18638298..33afa13b2e 100644 --- a/addressbook/gui/component/select-names/e-select-names-popup.c +++ b/addressbook/gui/component/select-names/e-select-names-popup.c @@ -35,7 +35,6 @@ #include <libgnomeui/gnome-app.h> #include <libgnomeui/gnome-app-helper.h> #include <libgnomeui/gnome-popup-menu.h> -#include <gal/widgets/e-unicode.h> #include <addressbook/backend/ebook/e-book-util.h> #include <addressbook/gui/contact-editor/e-contact-editor.h> @@ -215,15 +214,12 @@ static void set_uiinfo_label (GnomeUIInfo *uiinfo, const gchar *str) { GtkWidget *label; - gchar *label_txt; GList *item_children; - label_txt = e_utf8_to_locale_string (str); - item_children = gtk_container_children (GTK_CONTAINER (uiinfo->widget)); + item_children = gtk_container_get_children (GTK_CONTAINER (uiinfo->widget)); label = item_children->data; g_list_free (item_children); - gtk_label_set_text (GTK_LABEL (label), label_txt); - g_free (label_txt); + gtk_label_set_text (GTK_LABEL (label), str); } #define ARBITRARY_UIINFO_LIMIT 64 diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index bed94290ae..8b0531093b 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -43,7 +43,6 @@ #include <addressbook/backend/ebook/e-card-simple.h> #include "e-select-names-text-model.h" #include <gal/widgets/e-categories-master-list-option-menu.h> -#include <gal/widgets/e-unicode.h> #include <gal/e-text/e-entry.h> #include <e-util/e-categories-master-list-wombat.h> @@ -724,7 +723,7 @@ e_select_names_add_section(ESelectNames *e_select_names, char *name, char *id, E child = g_new(ESelectNamesChild, 1); child->names = e_select_names; - child->title = e_utf8_from_locale_string(_(name)); + child->title = g_strdup (_(name)); child->text_model = (ESelectNamesTextModel *) e_select_names_text_model_new (source); e_select_names_text_model_set_separator (child->text_model, "\n"); |