diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-12-20 06:03:40 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-12-20 06:03:40 +0800 |
commit | 482cf3700a1d1df629cc5d8c09a2f2490b3fcd77 (patch) | |
tree | 9c655cbaa5d03ab01095959a8569322ed8a5e89d /shell | |
parent | 05a87528f21322c1acd478e073583cde1dd9d43b (diff) | |
download | gsoc2013-evolution-482cf3700a1d1df629cc5d8c09a2f2490b3fcd77.tar gsoc2013-evolution-482cf3700a1d1df629cc5d8c09a2f2490b3fcd77.tar.gz gsoc2013-evolution-482cf3700a1d1df629cc5d8c09a2f2490b3fcd77.tar.bz2 gsoc2013-evolution-482cf3700a1d1df629cc5d8c09a2f2490b3fcd77.tar.lz gsoc2013-evolution-482cf3700a1d1df629cc5d8c09a2f2490b3fcd77.tar.xz gsoc2013-evolution-482cf3700a1d1df629cc5d8c09a2f2490b3fcd77.tar.zst gsoc2013-evolution-482cf3700a1d1df629cc5d8c09a2f2490b3fcd77.zip |
[With this commit, the shell compiles without deprecated
GLib/GTK+ functions, except for a couple of places were we use
GtkCList.]
* Makefile.am (INCLUDES): Add `-DG_DISABLE_DEPRECATED
-DGTK_DISABLE_DEPRECATED'.
* evolution-test-component.c (create_new_folder_selector): No
gtk_window_set_policy().
* main.c (quit_box_new): gtk_window_set_resizable() instead of
gtk_window_set_policy().
(view_map_callback): g_signal_handlers_disconnect_by_func()
instead of gtk_signal_disconnect_by_func().
(main): No need to push the GdkRGB visual/cmap anymore.
(new_view_created_callback): Likewise.
* e-task-widget.c: Renamed member pixmap of ETaskWidgetPrivate to
`image'.
(init): Updated accordingly.
(e_task_widget_construct): Use GtkImage, not GtkPixmap.
* e-storage.c (class_init): Converted from gtk_signal_new() to
g_signal_new().
* e-storage-set.c (class_init): Converted from gtk_signal_new() to
g_signal_new().
* e-storage-set-view.c
(setup_folder_properties_items_if_corba_storage_clicked):
g_string_append_printf() instead of g_string_sprintfa().
(class_init): Converted from gtk_signal_new() to g_signal_new().
(setup_folder_changed_callbacks): Use
e_signal_connect_while_alive() and
e_signal_connect_full_while_alive().
* e-splash.c (e_splash_construct): gtk_window_set_resizable()
instead of gtk_window_set_policy().
* e-shortcuts.c: Do not #include e-unicode.h.
(shortcut_item_update): Use g_path_get_basename() instead of
g_basename().
(e_shortcuts_add_default_shortcuts): No need to de-utfize strings.
(e_shortcuts_add_default_group): Same here.
* e-shortcuts-view.c: Do not #include <e-unicode.h>.
(class_init): Converted from gtk_signal_new() to g_signal_new().
(destroy_group_cb): No need to convert the text from UTF8.
* e-shell.c (impl_dispose): g_signal_handlers_disconnect_by_func()
instead of gtk_signal_disconnect_by_func().
(class_init): Use g_signal_new() instead of gtk_signal_new().
* e-shell-view.c: Do not #include e-unicode.h. Renamed member
offline_toggle_pixmap to offline_toggle_image in
EShellViewPrivate.
(update_folder_title_bar): No need to de-UTF8-ize the title.
(cleanup_delayed_selection):
g_signal_handlers_disconnect_by_func() instead of
gtk_signal_disconnect_by_func().
(ui_engine_add_hint_callback): gtk_label_set_text(), not
gtk_label_set().
(class_init): Use g_signal_new() instead of gtk_signal_new().
(update_for_current_uri): No need to convert the title from UTF8.
(setup_offline_toggle): Changed to set up a GtkImage, not a
GtkPixmap.
(update_offline_toggle_status): Accordingly (gtk_image* instead of
gtk_pixmap*).
(set_current_notebook_page): gtk_notebook_set_current_page(), not
gtk_notebook_set_page().
(get_storage_set_path_from_uri): g_ascii_strncasecmp() instead of
g_strncasecmp().
(folder_bar_popup_map_callback): Use
e_signal_connect_while_alive() instead of
gtk_signal_connect_while_alive().
(e_shell_view_construct): Likewise.
(display_uri): g_signal_connect_after() instead of
gtk_signal_connect_full().
(update_for_current_uri):
g_signal_handlers_{block,unblock}_by_func() instead of
gtk_signal_handler_{block,unblock}_by_func().
* e-shell-view-menu.c (command_about_box):
gtk_window_set_resizable() instead of gtk_window_set_policy().
* e-shell-utils.c (get_mini_name): g_path_get_basename() instead
of g_basename().
* e-shell-user-creatable-items-handler.c
(append_xml_for_menu_item): g_string_append_printf() instead of
g_string_sprintfa().
(create_menu_xml): Likewise.
* e-shell-shared-folder-picker-dialog.c: Do not #include
e-unicode.h.
(progress_bar_timeout_callback): Expect a GtkProgressBar data and
just use gtk_progress_bar_pulse().
(create_progress_dialog): gtk_window_set_resizable() instead of
gtk_window_set_policy(). No gtk_progress_set_activity_mode().
(setup_server_option_menu): Just use
gtk_menu_item_new_with_label() instead of
e_utf8_gtk_menu_item_new_with_label().
* e-shell-settings-dialog.c (set_dialog_size): Ported to Pango.
* e-shell-offline-sync.c
(impl_SyncFolderProgressListener_updateProgress):
gtk_progress_set_fraction() instead of
gtk_progress_bar_set_percentage().
(sync_folder): Likewise.
(setup_dialog): gtk_window_set_resizable() instead of
gtk_window_set_policy().
(sync_folder): No gtk_progress_set_activity_mode().
* e-shell-offline-handler.c: #undef {G,GTK}_DISABLE_DEPRECATED
here for now (need to port from GtkCList).
(class_init): Use g_signal_new()
* e-shell-importer.c: #undef {G,GTK}_DISABLE_DEPRECATED here for
now (need to port from GtkCList).
* e-shell-folder-title-bar.c (create_image_widget_from_xpm):
Renamed from create_pixmap_widget_from_xpm(); handle GtkImage
instead of GtkPixmap.
(new_empty_image_widget): Renamed from new_empty_pixmap_widget();
return a GtkImage instead of a GtkPixmap.
(add_navigation_buttons): Updated accordingly; so use GtkImages
instead of GtkPixmaps.
(e_shell_folder_title_bar_construct): Likewise.
(e_shell_folder_title_bar_set_icon): Use gtk_image_* instead of
gtk_pixmap_* on the image widgets.
(class_init): Converted to use g_signal_new() instead of
gtk_signal_new().
(e_shell_folder_title_bar_new): No need for pushing the GdkRGB
visual/cmap anymore.
* e-shell-folder-selection-dialog.c (check_folder_type_valid):
Just use strcmp instead of strcasecmp().
(class_init): g_signal_new() instead of gtk_signal_new().
(e_shell_folder_selection_dialog_construct): Removed call to
gtk_window_set_policy().
* e-shell-folder-creation-dialog.c
(type_with_display_name_compare_func): Changed to use
g_utf8_casefold().
* e-shell-folder-commands.c: Do not #include e-unicode.h.
(e_shell_command_rename_folder): g_path_get_dirname() instead of
g_dirname().
(folder_selection_dialog_folder_selected_callback):
g_path_get_basename() instead of g_basename().
(rename_cb): Likewise.
(delete_dialog): Do not convert from UTF8 for display purposes.
(e_shell_command_rename_folder): Likewise.
* e-shell-about-box.c (timeout_callback): Ported to Pango and use
gdk_window_invalidate_rect() instead of gtk_widget_draw().
* e-setup.c (check_evolution_directory): Use
gtk_window_set_resizable() instead of gtk_window_set_policy().
* e-local-storage.c: Do not include e-unicode.h.
(create_folder): Use g_path_get_basename() instead of
g_basename().
(create_folder_directory): Likewise.
(remove_folder_directory): Likewise.
(append_xfer_item_list): Likewise.
* e-local-folder.c (construct_loading_metadata): Use
g_path_get_basename() instead of g_basename().
* e-folder-dnd-bridge.c (handle_evolution_path_drag_motion): Use
g_path_get_basename() instead of g_basename().
* e-corba-storage-registry.c: G_STRUCT_OFFSET instead of
GTK_STRUCT_OFFSET.
* e-corba-shortcuts.c: G_STRUCT_OFFSET instead of
GTK_STRUCT_OFFSET.
* e-component-registry.c
(sleep_with_g_main_loop_timeout_callback): g_main_loop_* instead
of g_main_*.
(sleep_with_g_main_loop): Likewise.
* e-activity-handler.c: G_STRUCT_OFFSET instead of
GTK_STRUCT_OFFSET.
* evolution-wizard.c (evolution_wizard_class_init): g_signal_new()
instead of gtk_signal_new().
* evolution-storage-listener.c (class_init): g_signal_new()
instead of gtk_signal_new().
* evolution-shell-view.c (class_init): g_signal_new() instead of
gtk_signal_new().
* evolution-shell-component-dnd.c: G_STRUCT_OFFSET instead of
GTK_STRUCT_OFFSET.
* evolution-shell-component.c: G_STRUCT_OFFSET instead of
GTK_STRUCT_OFFSET.
* evolution-session.c: G_STRUCT_OFFSET instead of
GTK_STRUCT_OFFSET.
* evolution-folder-selector-button.c: Do not include e-unicode.h.
(set_folder): No need to convert from UTF8 to locale encoding
anymore. Removed unused variable.
* evolution-config-control.c (class_init): Use g_signal_new()
instead of gtk_signal_new().
* evolution-activity-client.c (class_init): Use g_signal_new()
instead of gtk_signal_new().
* e-folder-list.c: Do not include e-unicode.h. Use E_MAKE_TYPE().
(e_folder_list_get_type): Removed explicit implementation of this.
(e_folder_list_set_arg): Removed.
(e_folder_list_get_arg): Removed.
(e_folder_list_set_property): New.
(e_folder_list_get_property): New.
(e_folder_list_destroy): Removed.
(e_folder_list_dispose): New.
(e_folder_list_class_init): Updated accordingly.
* e-folder.c (impl_save_info): Use G_OBJECT_TYPE_NAME() instead of
gtk_type_name().
(impl_load_info): Likewise.
(impl_remove): Likewise.
(class_init): Use g_signal_new() instead of gtk_signal_new().
svn path=/trunk/; revision=19170
Diffstat (limited to 'shell')
48 files changed, 1225 insertions, 897 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 7944373fbd..a93e1e41e2 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,236 @@ +2002-12-19 Ettore Perazzoli <ettore@ximian.com> + + [With this commit, the shell compiles without deprecated GLib/GTK+ + functions, except for a couple of places were we use GtkCList.] + + * Makefile.am (INCLUDES): Add `-DG_DISABLE_DEPRECATED + -DGTK_DISABLE_DEPRECATED'. + + * evolution-test-component.c (create_new_folder_selector): No + gtk_window_set_policy(). + + * main.c (quit_box_new): gtk_window_set_resizable() instead of + gtk_window_set_policy(). + (view_map_callback): g_signal_handlers_disconnect_by_func() + instead of gtk_signal_disconnect_by_func(). + (main): No need to push the GdkRGB visual/cmap anymore. + (new_view_created_callback): Likewise. + + * e-task-widget.c: Renamed member pixmap of ETaskWidgetPrivate to + `image'. + (init): Updated accordingly. + (e_task_widget_construct): Use GtkImage, not GtkPixmap. + + * e-storage.c (class_init): Converted from gtk_signal_new() to + g_signal_new(). + + * e-storage-set.c (class_init): Converted from gtk_signal_new() to + g_signal_new(). + + * e-storage-set-view.c + (setup_folder_properties_items_if_corba_storage_clicked): + g_string_append_printf() instead of g_string_sprintfa(). + (class_init): Converted from gtk_signal_new() to g_signal_new(). + (setup_folder_changed_callbacks): Use + e_signal_connect_while_alive() and + e_signal_connect_full_while_alive(). + + * e-splash.c (e_splash_construct): gtk_window_set_resizable() + instead of gtk_window_set_policy(). + + * e-shortcuts.c: Do not #include e-unicode.h. + (shortcut_item_update): Use g_path_get_basename() instead of + g_basename(). + (e_shortcuts_add_default_shortcuts): No need to de-utfize strings. + (e_shortcuts_add_default_group): Same here. + + * e-shortcuts-view.c: Do not #include <e-unicode.h>. + (class_init): Converted from gtk_signal_new() to g_signal_new(). + (destroy_group_cb): No need to convert the text from UTF8. + + * e-shell.c (impl_dispose): g_signal_handlers_disconnect_by_func() + instead of gtk_signal_disconnect_by_func(). + (class_init): Use g_signal_new() instead of gtk_signal_new(). + + * e-shell-view.c: Do not #include e-unicode.h. Renamed member + offline_toggle_pixmap to offline_toggle_image in + EShellViewPrivate. + (update_folder_title_bar): No need to de-UTF8-ize the title. + (cleanup_delayed_selection): + g_signal_handlers_disconnect_by_func() instead of + gtk_signal_disconnect_by_func(). + (ui_engine_add_hint_callback): gtk_label_set_text(), not + gtk_label_set(). + (class_init): Use g_signal_new() instead of gtk_signal_new(). + (update_for_current_uri): No need to convert the title from UTF8. + (setup_offline_toggle): Changed to set up a GtkImage, not a + GtkPixmap. + (update_offline_toggle_status): Accordingly (gtk_image* instead of + gtk_pixmap*). + (set_current_notebook_page): gtk_notebook_set_current_page(), not + gtk_notebook_set_page(). + (get_storage_set_path_from_uri): g_ascii_strncasecmp() instead of + g_strncasecmp(). + (folder_bar_popup_map_callback): Use + e_signal_connect_while_alive() instead of + gtk_signal_connect_while_alive(). + (e_shell_view_construct): Likewise. + (display_uri): g_signal_connect_after() instead of + gtk_signal_connect_full(). + (update_for_current_uri): + g_signal_handlers_{block,unblock}_by_func() instead of + gtk_signal_handler_{block,unblock}_by_func(). + + * e-shell-view-menu.c (command_about_box): + gtk_window_set_resizable() instead of gtk_window_set_policy(). + + * e-shell-utils.c (get_mini_name): g_path_get_basename() instead + of g_basename(). + + * e-shell-user-creatable-items-handler.c + (append_xml_for_menu_item): g_string_append_printf() instead of + g_string_sprintfa(). + (create_menu_xml): Likewise. + + * e-shell-shared-folder-picker-dialog.c: Do not #include + e-unicode.h. + (progress_bar_timeout_callback): Expect a GtkProgressBar data and + just use gtk_progress_bar_pulse(). + (create_progress_dialog): gtk_window_set_resizable() instead of + gtk_window_set_policy(). No gtk_progress_set_activity_mode(). + (setup_server_option_menu): Just use + gtk_menu_item_new_with_label() instead of + e_utf8_gtk_menu_item_new_with_label(). + + * e-shell-settings-dialog.c (set_dialog_size): Ported to Pango. + + * e-shell-offline-sync.c + (impl_SyncFolderProgressListener_updateProgress): + gtk_progress_set_fraction() instead of + gtk_progress_bar_set_percentage(). + (sync_folder): Likewise. + (setup_dialog): gtk_window_set_resizable() instead of + gtk_window_set_policy(). + (sync_folder): No gtk_progress_set_activity_mode(). + + * e-shell-offline-handler.c: #undef {G,GTK}_DISABLE_DEPRECATED + here for now (need to port from GtkCList). + (class_init): Use g_signal_new() + + * e-shell-importer.c: #undef {G,GTK}_DISABLE_DEPRECATED here for + now (need to port from GtkCList). + + * e-shell-folder-title-bar.c (create_image_widget_from_xpm): + Renamed from create_pixmap_widget_from_xpm(); handle GtkImage + instead of GtkPixmap. + (new_empty_image_widget): Renamed from new_empty_pixmap_widget(); + return a GtkImage instead of a GtkPixmap. + (add_navigation_buttons): Updated accordingly; so use GtkImages + instead of GtkPixmaps. + (e_shell_folder_title_bar_construct): Likewise. + (e_shell_folder_title_bar_set_icon): Use gtk_image_* instead of + gtk_pixmap_* on the image widgets. + (class_init): Converted to use g_signal_new() instead of + gtk_signal_new(). + (e_shell_folder_title_bar_new): No need for pushing the GdkRGB + visual/cmap anymore. + + * e-shell-folder-selection-dialog.c (check_folder_type_valid): + Just use strcmp instead of strcasecmp(). + (class_init): g_signal_new() instead of gtk_signal_new(). + (e_shell_folder_selection_dialog_construct): Removed call to + gtk_window_set_policy(). + + * e-shell-folder-creation-dialog.c + (type_with_display_name_compare_func): Changed to use + g_utf8_casefold(). + + * e-shell-folder-commands.c: Do not #include e-unicode.h. + (e_shell_command_rename_folder): g_path_get_dirname() instead of + g_dirname(). + (folder_selection_dialog_folder_selected_callback): + g_path_get_basename() instead of g_basename(). + (rename_cb): Likewise. + (delete_dialog): Do not convert from UTF8 for display purposes. + (e_shell_command_rename_folder): Likewise. + + * e-shell-about-box.c (timeout_callback): Ported to Pango and use + gdk_window_invalidate_rect() instead of gtk_widget_draw(). + + * e-setup.c (check_evolution_directory): Use + gtk_window_set_resizable() instead of gtk_window_set_policy(). + + * e-local-storage.c: Do not include e-unicode.h. + (create_folder): Use g_path_get_basename() instead of + g_basename(). + (create_folder_directory): Likewise. + (remove_folder_directory): Likewise. + (append_xfer_item_list): Likewise. + + * e-local-folder.c (construct_loading_metadata): Use + g_path_get_basename() instead of g_basename(). + + * e-folder-dnd-bridge.c (handle_evolution_path_drag_motion): Use + g_path_get_basename() instead of g_basename(). + + * e-corba-storage-registry.c: G_STRUCT_OFFSET instead of + GTK_STRUCT_OFFSET. + + * e-corba-shortcuts.c: G_STRUCT_OFFSET instead of + GTK_STRUCT_OFFSET. + + * e-component-registry.c + (sleep_with_g_main_loop_timeout_callback): g_main_loop_* instead + of g_main_*. + (sleep_with_g_main_loop): Likewise. + + * e-activity-handler.c: G_STRUCT_OFFSET instead of + GTK_STRUCT_OFFSET. + + * evolution-wizard.c (evolution_wizard_class_init): g_signal_new() + instead of gtk_signal_new(). + + * evolution-storage-listener.c (class_init): g_signal_new() + instead of gtk_signal_new(). + + * evolution-shell-view.c (class_init): g_signal_new() instead of + gtk_signal_new(). + + * evolution-shell-component-dnd.c: G_STRUCT_OFFSET instead of + GTK_STRUCT_OFFSET. + + * evolution-shell-component.c: G_STRUCT_OFFSET instead of + GTK_STRUCT_OFFSET. + + * evolution-session.c: G_STRUCT_OFFSET instead of + GTK_STRUCT_OFFSET. + + * evolution-folder-selector-button.c: Do not include e-unicode.h. + (set_folder): No need to convert from UTF8 to locale encoding + anymore. Removed unused variable. + + * evolution-config-control.c (class_init): Use g_signal_new() + instead of gtk_signal_new(). + + * evolution-activity-client.c (class_init): Use g_signal_new() + instead of gtk_signal_new(). + + * e-folder-list.c: Do not include e-unicode.h. Use E_MAKE_TYPE(). + (e_folder_list_get_type): Removed explicit implementation of this. + (e_folder_list_set_arg): Removed. + (e_folder_list_get_arg): Removed. + (e_folder_list_set_property): New. + (e_folder_list_get_property): New. + (e_folder_list_destroy): Removed. + (e_folder_list_dispose): New. + (e_folder_list_class_init): Updated accordingly. + + * e-folder.c (impl_save_info): Use G_OBJECT_TYPE_NAME() instead of + gtk_type_name(). + (impl_load_info): Likewise. + (impl_remove): Likewise. + (class_init): Use g_signal_new() instead of gtk_signal_new(). + 2002-12-16 Jeffrey Stedfast <fejj@ximian.com> * e-shell-importer.c: Don't #include "e-util/e-html-utils.h" as diff --git a/shell/Makefile.am b/shell/Makefile.am index f2891e6fbb..9aeb46bfcd 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -1,6 +1,7 @@ SUBDIRS = glade importer INCLUDES = \ + -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED \ -I$(top_srcdir)/widgets \ -I$(top_srcdir)/widgets/misc \ -I$(top_srcdir)/libical/src/libical \ diff --git a/shell/e-activity-handler.c b/shell/e-activity-handler.c index 613b7faa3f..eae2099ae8 100644 --- a/shell/e-activity-handler.c +++ b/shell/e-activity-handler.c @@ -584,4 +584,4 @@ e_activity_handler_attach_task_bar (EActivityHandler *activity_handler, E_MAKE_X_TYPE (e_activity_handler, "EActivityHandler", EActivityHandler, class_init, init, PARENT_TYPE, POA_GNOME_Evolution_Activity__init, - GTK_STRUCT_OFFSET (EActivityHandlerClass, epv)) + G_STRUCT_OFFSET (EActivityHandlerClass, epv)) diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c index 2a69a974f7..d0a8cc146a 100644 --- a/shell/e-component-registry.c +++ b/shell/e-component-registry.c @@ -68,7 +68,7 @@ sleep_with_g_main_loop_timeout_callback (void *data) GMainLoop *loop; loop = (GMainLoop *) data; - g_main_quit (loop); + g_main_loop_quit (loop); return FALSE; } @@ -80,10 +80,10 @@ sleep_with_g_main_loop (int num_seconds) { GMainLoop *loop; - loop = g_main_new (TRUE); + loop = g_main_loop_new (NULL, TRUE); g_timeout_add (1000 * num_seconds, sleep_with_g_main_loop_timeout_callback, loop); - g_main_run (loop); - g_main_destroy (loop); + g_main_loop_run (loop); + g_main_loop_unref (loop); } static void diff --git a/shell/e-corba-shortcuts.c b/shell/e-corba-shortcuts.c index cad3af5a4c..d3e50749bb 100644 --- a/shell/e-corba-shortcuts.c +++ b/shell/e-corba-shortcuts.c @@ -346,4 +346,4 @@ e_corba_shortcuts_new (EShortcuts *shortcuts) E_MAKE_X_TYPE (e_corba_shortcuts, "ECorbaShortcuts", ECorbaShortcuts, class_init, init, PARENT_TYPE, POA_GNOME_Evolution_Shortcuts__init, - GTK_STRUCT_OFFSET (ECorbaShortcutsClass, epv)) + G_STRUCT_OFFSET (ECorbaShortcutsClass, epv)) diff --git a/shell/e-corba-storage-registry.c b/shell/e-corba-storage-registry.c index 0bb87bb9c8..097bb29333 100644 --- a/shell/e-corba-storage-registry.c +++ b/shell/e-corba-storage-registry.c @@ -491,4 +491,4 @@ e_corba_storage_registry_new (EStorageSet *storage_set) E_MAKE_X_TYPE (e_corba_storage_registry, "ECorbaStorageRegistry", ECorbaStorageRegistry, class_init, init, PARENT_TYPE, POA_GNOME_Evolution_StorageRegistry__init, - GTK_STRUCT_OFFSET (ECorbaStorageRegistryClass, epv)) + G_STRUCT_OFFSET (ECorbaStorageRegistryClass, epv)) diff --git a/shell/e-folder-dnd-bridge.c b/shell/e-folder-dnd-bridge.c index 405d5dad01..9ee9441c9d 100644 --- a/shell/e-folder-dnd-bridge.c +++ b/shell/e-folder-dnd-bridge.c @@ -220,6 +220,7 @@ handle_evolution_path_drag_motion (EStorageSet *storage_set, EFolder *folder; int source_path_len; char *destination_path; + char *base_name; folder = e_storage_set_get_folder (storage_set, source_path); if (folder != NULL && e_folder_get_is_stock (folder)) @@ -229,7 +230,10 @@ handle_evolution_path_drag_motion (EStorageSet *storage_set, if (strcmp (path, source_path) == 0) return FALSE; - destination_path = g_strconcat (path, "/", g_basename (source_path), NULL); + base_name = g_path_get_basename (source_path); + destination_path = g_strconcat (path, "/", base_name, NULL); + g_free (base_name); + if (strncmp (destination_path, source_path, source_path_len) == 0) { g_free (destination_path); return FALSE; @@ -348,6 +352,7 @@ handle_data_received_path (GdkDragContext *context, { const char *source_path; char *destination_path; + char *base_name; gboolean handled; source_path = (const char *) selection_data->data; @@ -356,7 +361,9 @@ handle_data_received_path (GdkDragContext *context, if (source_path == NULL || source_path[0] != E_PATH_SEPARATOR || source_path[1] == '\0') return FALSE; - destination_path = g_concat_dir_and_file (path, g_basename (source_path)); + base_name = g_path_get_basename (source_path); + destination_path = g_concat_dir_and_file (path, base_name); + g_free (base_name); switch (context->action) { case GDK_ACTION_MOVE: diff --git a/shell/e-folder-list.c b/shell/e-folder-list.c index 69176ddeab..3a0a0be264 100644 --- a/shell/e-folder-list.c +++ b/shell/e-folder-list.c @@ -36,7 +36,6 @@ #include <gal/e-table/e-table-memory-store.h> #include <gal/util/e-xml-utils.h> -#include <gal/widgets/e-unicode.h> #include <gal/widgets/e-gui-utils.h> #include <gal/widgets/e-option-menu.h> @@ -58,9 +57,9 @@ static guint signals [LAST_SIGNAL] = { 0, }; /* The arguments we take */ enum { - ARG_0, - ARG_TITLE, - ARG_POSSIBLE_TYPES, + PROP_0, + PROP_TITLE, + PROP_POSSIBLE_TYPES, }; struct _EFolderListPrivate { @@ -138,21 +137,19 @@ e_folder_list_changed (EFolderList *efl) } static void -e_folder_list_destroy (GtkObject *object) +e_folder_list_dispose (GObject *object) { EFolderList *efl = E_FOLDER_LIST (object); - if (efl->priv->gui) + if (efl->priv != NULL) { g_object_unref (efl->priv->gui); - - if (efl->priv->client) g_object_unref (efl->priv->client); + g_free (efl->priv); + efl->priv = NULL; + } - g_free (efl->priv); - efl->priv = NULL; - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); + if (G_OBJECT_CLASS (parent_class)->dispose) + (* G_OBJECT_CLASS (parent_class)->dispose) (object); } static void @@ -172,39 +169,46 @@ set_frame_label (EFolderList *efl) } static void -e_folder_list_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) +e_folder_list_set_property (GObject *object, + guint property_id, + const GValue *value, + GParamSpec *pspec) { EFolderList *efl = E_FOLDER_LIST(object); - switch (arg_id) { - case ARG_TITLE: + switch (property_id) { + case PROP_TITLE: g_free (efl->priv->title); - efl->priv->title = g_strdup (GTK_VALUE_STRING (*arg)); + efl->priv->title = g_strdup (g_value_get_string (value)); set_frame_label (efl); break; - case ARG_POSSIBLE_TYPES: + case PROP_POSSIBLE_TYPES: g_strfreev (efl->priv->possible_types); - efl->priv->possible_types = e_strdupv (GTK_VALUE_POINTER (*arg)); + efl->priv->possible_types = e_strdupv (g_value_get_pointer (value)); break; default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; } } static void -e_folder_list_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) +e_folder_list_get_property (GObject *object, + guint property_id, + GValue *value, + GParamSpec *pspec) { EFolderList *efl = E_FOLDER_LIST(object); - switch (arg_id) { - case ARG_TITLE: - GTK_VALUE_STRING (*arg) = g_strdup (efl->priv->title); + switch (property_id) { + case PROP_TITLE: + g_value_set_string (value, efl->priv->title); break; - case ARG_POSSIBLE_TYPES: - GTK_VALUE_POINTER (*arg) = e_strdupv ((const gchar **) efl->priv->possible_types); + case PROP_POSSIBLE_TYPES: + g_value_set_pointer (value, e_strdupv ((const gchar **) efl->priv->possible_types)); break; default: - arg->type = GTK_TYPE_INVALID; + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; } } @@ -212,45 +216,54 @@ e_folder_list_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) static void e_folder_list_class_init (EFolderListClass *klass) { - GtkObjectClass *object_class; + GObjectClass *object_class; GtkVBoxClass *vbox_class; - object_class = (GtkObjectClass*) klass; - vbox_class = (GtkVBoxClass *) klass; + object_class = (GObjectClass*) klass; + vbox_class = (GtkVBoxClass *) klass; + parent_class = g_type_class_ref (PARENT_TYPE); glade_gnome_init(); - parent_class = g_type_class_ref(PARENT_TYPE); - - object_class->set_arg = e_folder_list_set_arg; - object_class->get_arg = e_folder_list_get_arg; - object_class->destroy = e_folder_list_destroy; + object_class->set_property = e_folder_list_set_property; + object_class->get_property = e_folder_list_get_property; + object_class->dispose = e_folder_list_dispose; klass->changed = NULL; klass->option_menu_changed = NULL; signals [OPTION_MENU_CHANGED] = - gtk_signal_new ("option_menu_changed", - GTK_RUN_LAST, - E_OBJECT_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EFolderListClass, option_menu_changed), - e_shell_marshal_NONE__INT, - GTK_TYPE_NONE, 1, GTK_TYPE_INT); + g_signal_new ("option_menu_changed", + E_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EFolderListClass, option_menu_changed), + NULL, NULL, + e_shell_marshal_NONE__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); signals [CHANGED] = - gtk_signal_new ("changed", - GTK_RUN_LAST, - E_OBJECT_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EFolderListClass, changed), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + g_signal_new ("changed", + E_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EFolderListClass, changed), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); E_OBJECT_CLASS_ADD_SIGNALS (object_class, signals, LAST_SIGNAL); - gtk_object_add_arg_type ("EFolderList::title", GTK_TYPE_STRING, - GTK_ARG_READWRITE, ARG_TITLE); - gtk_object_add_arg_type ("EFolderList::possible_types", GTK_TYPE_POINTER, - GTK_ARG_READWRITE, ARG_POSSIBLE_TYPES); + g_object_class_install_property (object_class, PROP_TITLE, + g_param_spec_string ("EFolderList::title", + NULL, + NULL, + NULL, + G_PARAM_READWRITE)); + g_object_class_install_property (object_class, PROP_POSSIBLE_TYPES, + g_param_spec_pointer ("EFolderList::possible_types", + NULL, + NULL, + G_PARAM_READWRITE)); } #define SPEC "<ETableSpecification cursor-mode=\"line\"" \ @@ -536,31 +549,6 @@ e_folder_list_free_items (EFolderListItem *items) g_free (items); } -GtkType -e_folder_list_get_type (void) -{ - static GtkType folder_list_type = 0; - - if (!folder_list_type) - { - static const GtkTypeInfo folder_list_info = - { - "EFolderList", - sizeof (EFolderList), - sizeof (EFolderListClass), - (GtkClassInitFunc) e_folder_list_class_init, - (GtkObjectInitFunc) e_folder_list_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - folder_list_type = gtk_type_unique (PARENT_TYPE, &folder_list_info); - } - - return folder_list_type; -} - GtkWidget* e_folder_list_new (EvolutionShellClient *client, char *xml) { @@ -685,3 +673,6 @@ e_folder_list_set_option_menu_value (EFolderList *efl, int value) { gtk_option_menu_set_history (GTK_OPTION_MENU (efl->priv->option_menu), value); } + + +E_MAKE_TYPE (e_folder_list, "EFolderList", EFolderList, e_folder_list_class_init, e_folder_list_init, PARENT_TYPE) diff --git a/shell/e-folder.c b/shell/e-folder.c index 522ece72dd..914038d34e 100644 --- a/shell/e-folder.c +++ b/shell/e-folder.c @@ -82,7 +82,7 @@ static gboolean impl_save_info (EFolder *folder) { g_warning ("`%s' does not implement `EFolder::save_info()'", - gtk_type_name (GTK_OBJECT_TYPE (folder))); + G_OBJECT_TYPE_NAME (folder)); return FALSE; } @@ -90,7 +90,7 @@ static gboolean impl_load_info (EFolder *folder) { g_warning ("`%s' does not implement `EFolder::load_info()'", - gtk_type_name (GTK_OBJECT_TYPE (folder))); + G_OBJECT_TYPE_NAME (folder)); return FALSE; } @@ -98,7 +98,7 @@ static gboolean impl_remove (EFolder *folder) { g_warning ("`%s' does not implement `EFolder::remove()'", - gtk_type_name (GTK_OBJECT_TYPE (folder))); + G_OBJECT_TYPE_NAME (folder)); return FALSE; } @@ -143,19 +143,21 @@ class_init (EFolderClass *klass) object_class = G_OBJECT_CLASS (klass); object_class->finalize = impl_finalize; - signals[CHANGED] = gtk_signal_new ("changed", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EFolderClass, changed), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - signals[NAME_CHANGED] = gtk_signal_new ("name_changed", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EFolderClass, name_changed), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + signals[CHANGED] = g_signal_new ("changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EFolderClass, changed), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); + + signals[NAME_CHANGED] = g_signal_new ("name_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EFolderClass, name_changed), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); klass->save_info = impl_save_info; klass->load_info = impl_load_info; diff --git a/shell/e-local-folder.c b/shell/e-local-folder.c index 44de45cef6..924c252453 100644 --- a/shell/e-local-folder.c +++ b/shell/e-local-folder.c @@ -268,6 +268,7 @@ construct_loading_metadata (ELocalFolder *local_folder, EFolder *folder; xmlDoc *doc; xmlNode *root; + char *base_name; char *type; char *metadata_path; char *physical_uri; @@ -296,7 +297,9 @@ construct_loading_metadata (ELocalFolder *local_folder, return FALSE; } - e_local_folder_construct (local_folder, g_basename (path), type, NULL); + base_name = g_path_get_basename (path); + e_local_folder_construct (local_folder, base_name, type, NULL); + g_free (base_name); g_free (type); retrieve_info (local_folder, root); diff --git a/shell/e-local-storage.c b/shell/e-local-storage.c index 36abe7666f..191d356306 100644 --- a/shell/e-local-storage.c +++ b/shell/e-local-storage.c @@ -47,7 +47,6 @@ #include <libgnome/gnome-util.h> #include <gal/util/e-util.h> -#include <gal/widgets/e-unicode.h> #include "e-util/e-path.h" #include "e-local-folder.h" @@ -343,7 +342,7 @@ create_folder_directory (ELocalStorage *local_storage, { EStorage *storage; ELocalStoragePrivate *priv; - const char *folder_name; + char *folder_name; char *physical_path; storage = E_STORAGE (local_storage); @@ -352,7 +351,7 @@ create_folder_directory (ELocalStorage *local_storage, *physical_path_return = NULL; g_assert (g_path_is_absolute (path)); - folder_name = g_basename (path); + folder_name = g_path_get_basename (path); if (folder_name != path + 1) { char *subfolders_directory_physical_path; @@ -373,6 +372,8 @@ create_folder_directory (ELocalStorage *local_storage, g_free (subfolders_directory_physical_path); } + g_free (folder_name); + physical_path = e_path_to_physical (priv->base_path, path); /* Create the directory that holds the folder. */ @@ -399,7 +400,7 @@ create_folder (ELocalStorage *local_storage, EvolutionShellComponentClient *component_client; AsyncCreateFolderCallbackData *callback_data; EStorageResult result; - const char *folder_name; + char *folder_name; char *physical_path; char *physical_uri; @@ -428,7 +429,7 @@ create_folder (ELocalStorage *local_storage, return; } - folder_name = g_basename (path); + folder_name = g_path_get_basename (path); /* Finally tell the component to do the job of creating the physical files in it. */ @@ -456,6 +457,8 @@ create_folder (ELocalStorage *local_storage, type, component_async_create_folder_callback, callback_data); + + g_free (folder_name); } struct _AsyncRemoveFolderCallbackData { @@ -470,14 +473,14 @@ remove_folder_directory (ELocalStorage *local_storage, { EStorage *storage; ELocalStoragePrivate *priv; - const char *folder_name; + char *folder_name; char *file_name; char *physical_path; priv = local_storage->priv; storage = E_STORAGE (local_storage); - folder_name = g_basename (path); + folder_name = g_path_get_basename (path); /* Delete the metadata file associated with this folder. */ physical_path = e_path_to_physical (priv->base_path, path); @@ -488,6 +491,7 @@ remove_folder_directory (ELocalStorage *local_storage, /* Delete the physical directory. */ if (rmdir (physical_path) == -1) { g_free (physical_path); + g_free (folder_name); return E_STORAGE_GENERICERROR; } @@ -506,6 +510,7 @@ remove_folder_directory (ELocalStorage *local_storage, g_free (subfolders_directory_physical_path); } + g_free (folder_name); return E_STORAGE_OK; } @@ -793,14 +798,15 @@ append_xfer_item_list (EStorage *storage, subfolders = e_storage_get_subfolder_paths (storage, source_path); for (p = subfolders; p != NULL; p = p->next) { + char *base_name; char *source_subpath; char *destination_subpath; source_subpath = g_strdup ((const char *) p->data); - destination_subpath = g_concat_dir_and_file (destination_path, - g_basename (source_subpath)); - + base_name = g_path_get_basename (source_subpath); + destination_subpath = g_concat_dir_and_file (destination_path, base_name); append_xfer_item_list (storage, source_subpath, destination_subpath, list); + g_free (base_name); } e_free_string_list (subfolders); diff --git a/shell/e-setup.c b/shell/e-setup.c index ec76528bc0..c9ca711d3f 100644 --- a/shell/e-setup.c +++ b/shell/e-setup.c @@ -139,7 +139,7 @@ check_evolution_directory (const char *evolution_directory) gtk_widget_show (label1); gtk_widget_show (label2); - gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, FALSE); + gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); diff --git a/shell/e-shell-about-box.c b/shell/e-shell-about-box.c index a320222756..877387f1da 100644 --- a/shell/e-shell-about-box.c +++ b/shell/e-shell-about-box.c @@ -145,7 +145,9 @@ timeout_callback (void *data) EShellAboutBoxPrivate *priv; GdkRectangle redraw_rect; GtkWidget *widget; - GdkFont *font; + PangoContext *context; + PangoFontMetrics *metrics; + PangoLayout *layout; int line_height; int first_line; int y; @@ -156,8 +158,12 @@ timeout_callback (void *data) widget = GTK_WIDGET (about_box); - font = gtk_style_get_font (widget->style); - line_height = font->ascent + font->descent; + context = gtk_widget_get_pango_context (widget); + metrics = pango_context_get_metrics (context, gtk_widget_get_style (GTK_WIDGET (about_box))->font_desc, + NULL); + line_height = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) + + pango_font_metrics_get_descent (metrics)); + pango_font_metrics_unref (metrics); if (priv->text_y_offset < TEXT_HEIGHT) { y = TEXT_Y_OFFSET + (TEXT_HEIGHT - priv->text_y_offset); @@ -171,8 +177,11 @@ timeout_callback (void *data) 0, 0, TEXT_X_OFFSET, TEXT_Y_OFFSET, TEXT_WIDTH, TEXT_HEIGHT); + layout = pango_layout_new (context); + for (i = 0; i < TEXT_HEIGHT / line_height + 3; i ++) { const char *line; + int width; int x; if (first_line + i >= NUM_TEXT_LINES) @@ -183,9 +192,10 @@ timeout_callback (void *data) else line = _(priv->permuted_text[first_line + i]); - x = TEXT_X_OFFSET + (TEXT_WIDTH - gdk_string_width (font, line)) / 2; - - gdk_draw_string (priv->pixmap, font, priv->clipped_gc, x, y, line); + pango_layout_set_text (layout, line, -1); + pango_layout_get_pixel_size (layout, &width, NULL); + x = TEXT_X_OFFSET + (TEXT_WIDTH - width) / 2; + gdk_draw_layout (priv->pixmap, priv->clipped_gc, x, y, layout); y += line_height; } @@ -194,7 +204,8 @@ timeout_callback (void *data) redraw_rect.y = TEXT_Y_OFFSET; redraw_rect.width = TEXT_WIDTH; redraw_rect.height = TEXT_HEIGHT; - gtk_widget_draw (widget, &redraw_rect); + gdk_window_invalidate_rect (widget->window, &redraw_rect, FALSE); + gdk_window_process_updates (widget->window, FALSE); priv->text_y_offset ++; if (priv->text_y_offset > line_height * NUM_TEXT_LINES + TEXT_HEIGHT) { @@ -202,6 +213,8 @@ timeout_callback (void *data) permute_names (about_box); } + g_object_unref (layout); + return TRUE; } diff --git a/shell/e-shell-folder-commands.c b/shell/e-shell-folder-commands.c index 596ab65626..5e71bbfa8b 100644 --- a/shell/e-shell-folder-commands.c +++ b/shell/e-shell-folder-commands.c @@ -34,7 +34,6 @@ #include "e-shell-utils.h" #include <gal/widgets/e-gui-utils.h> -#include <gal/widgets/e-unicode.h> #include <libgnome/gnome-i18n.h> #include <libgnome/gnome-util.h> @@ -161,12 +160,14 @@ folder_selection_dialog_folder_selected_callback (EShellFolderSelectionDialog *f { FolderCommandData *folder_command_data; EStorageSet *storage_set; + char *base_name; gboolean remove_source; folder_command_data = (FolderCommandData *) data; - folder_command_data->destination_path = g_concat_dir_and_file (path, - g_basename (folder_command_data->source_path)); + base_name = g_path_get_basename (folder_command_data->source_path); + folder_command_data->destination_path = g_concat_dir_and_file (path, base_name); + g_free (base_name); switch (folder_command_data->command) { case FOLDER_COMMAND_COPY: @@ -392,14 +393,11 @@ delete_cb (EStorageSet *storage_set, } static int -delete_dialog (EShellView *shell_view, const char *utf8_folder) +delete_dialog (EShellView *shell_view, const char *folder_name) { GtkWidget *dialog; char *title; char *question; - char *folder_name; - - folder_name = e_utf8_to_gtk_string (GTK_WIDGET (shell_view), (char *) utf8_folder); title = g_strdup_printf (_("Delete \"%s\""), folder_name); question = g_strdup_printf (_("Really delete folder \"%s\"?"), folder_name); @@ -414,7 +412,6 @@ delete_dialog (EShellView *shell_view, const char *utf8_folder) gnome_dialog_set_default (GNOME_DIALOG (dialog), 0); g_free (title); - g_free (folder_name); g_free (question); return gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); @@ -493,8 +490,12 @@ rename_cb (EStorageSet *storage_set, EStorageResult result, void *data) storage_set = e_shell_get_storage_set (shell); folder = e_storage_set_get_folder (storage_set, callback_data->new_path); - if (folder != NULL) - e_folder_set_name (folder, g_basename (callback_data->new_path)); + if (folder != NULL) { + char *base_name = g_path_get_basename (callback_data->new_path); + + e_folder_set_name (folder, base_name); + g_free (base_name); + } } rename_callback_data_free (callback_data); @@ -509,7 +510,6 @@ e_shell_command_rename_folder (EShell *shell, EFolder *folder; RenameCallbackData *callback_data; const char *old_name; - char *old_name_locale; char *prompt; char *new_name; char *old_base_path; @@ -529,9 +529,7 @@ e_shell_command_rename_folder (EShell *shell, g_return_if_fail (folder != NULL); old_name = e_folder_get_name (folder); - old_name_locale = e_utf8_to_locale_string (old_name); - prompt = g_strdup_printf (_("Rename the \"%s\" folder to:"), old_name_locale); - g_free (old_name_locale); + prompt = g_strdup_printf (_("Rename the \"%s\" folder to:"), old_name); while (1) { const char *reason; @@ -556,7 +554,7 @@ e_shell_command_rename_folder (EShell *shell, return; } - old_base_path = g_dirname (folder_path); + old_base_path = g_path_get_dirname (folder_path); new_path = g_concat_dir_and_file (old_base_path, new_name); callback_data = rename_callback_data_new (shell_view, new_path); diff --git a/shell/e-shell-folder-creation-dialog.c b/shell/e-shell-folder-creation-dialog.c index 442d01f579..7c7aacc991 100644 --- a/shell/e-shell-folder-creation-dialog.c +++ b/shell/e-shell-folder-creation-dialog.c @@ -29,6 +29,7 @@ #include <libgnome/gnome-util.h> #include <libgnomeui/gnome-dialog.h> +#include <gtk/gtkentry.h> #include <gtk/gtkdialog.h> #include <gtk/gtkoptionmenu.h> #include <gtk/gtkmenuitem.h> @@ -36,7 +37,6 @@ #include <glade/glade-xml.h> #include <gal/util/e-util.h> -#include <gal/widgets/e-unicode.h> #include <gal/widgets/e-gui-utils.h> #include <gal/widgets/e-scroll-frame.h> @@ -353,11 +353,22 @@ static int type_with_display_name_compare_func (const void *a, const void *b) { const TypeWithDisplayName *val_a, *val_b; + char *a_display_name_casefolded; + char *b_display_name_casefolded; + int retval; val_a = (const TypeWithDisplayName *) a; val_b = (const TypeWithDisplayName *) b; - return g_strcasecmp (val_a->display_name, val_b->display_name); + a_display_name_casefolded = g_utf8_casefold (val_a->display_name, -1); + b_display_name_casefolded = g_utf8_casefold (val_b->display_name, -1); + + retval = g_utf8_collate (a_display_name_casefolded, b_display_name_casefolded); + + g_free (a_display_name_casefolded); + g_free (b_display_name_casefolded); + + return retval; } static GList * diff --git a/shell/e-shell-folder-selection-dialog.c b/shell/e-shell-folder-selection-dialog.c index d37e5c09f2..381278327f 100644 --- a/shell/e-shell-folder-selection-dialog.c +++ b/shell/e-shell-folder-selection-dialog.c @@ -96,11 +96,10 @@ check_folder_type_valid (EShellFolderSelectionDialog *folder_selection_dialog) const char *type, *slash; type = (const char *) p->data; - if (strcasecmp (folder_type, type) == 0) + if (strcmp (folder_type, type) == 0) return TRUE; slash = strchr (type, '/'); - if (slash && slash[1] == '*' && - g_strncasecmp (folder_type, type, slash - type) == 0) + if (slash && slash[1] == '*' && strncmp (folder_type, type, slash - type) == 0) return TRUE; } @@ -284,21 +283,23 @@ class_init (EShellFolderSelectionDialogClass *klass) dialog_class->response = impl_response; signals[FOLDER_SELECTED] - = gtk_signal_new ("folder_selected", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShellFolderSelectionDialogClass, folder_selected), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + = g_signal_new ("folder_selected", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EShellFolderSelectionDialogClass, folder_selected), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); signals[CANCELLED] - = gtk_signal_new ("cancelled", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShellFolderSelectionDialogClass, cancelled), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + = g_signal_new ("cancelled", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EShellFolderSelectionDialogClass, cancelled), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); } static void @@ -397,7 +398,6 @@ e_shell_folder_selection_dialog_construct (EShellFolderSelectionDialog *folder_s /* Basic dialog setup. */ - gtk_window_set_policy (GTK_WINDOW (folder_selection_dialog), FALSE, TRUE, FALSE); gtk_window_set_default_size (GTK_WINDOW (folder_selection_dialog), 350, 300); gtk_window_set_modal (GTK_WINDOW (folder_selection_dialog), TRUE); gtk_window_set_title (GTK_WINDOW (folder_selection_dialog), title); diff --git a/shell/e-shell-folder-title-bar.c b/shell/e-shell-folder-title-bar.c index 3f20c8b189..b79933b2d6 100644 --- a/shell/e-shell-folder-title-bar.c +++ b/shell/e-shell-folder-title-bar.c @@ -25,7 +25,7 @@ #endif #include <gtk/gtklabel.h> -#include <gtk/gtkpixmap.h> +#include <gtk/gtkimage.h> #include <gtk/gtkrc.h> #include <gtk/gtksignal.h> #include <gtk/gtktogglebutton.h> @@ -124,7 +124,7 @@ static const char *right_arrow_xpm[] = { /* Utility functions for managing icons and icon widgets. */ static GtkWidget * -create_pixmap_widget_from_xpm (const char **xpm) +create_image_widget_from_xpm (const char **xpm) { GdkPixbuf *pixbuf; GdkPixmap *pixmap; @@ -135,7 +135,7 @@ create_pixmap_widget_from_xpm (const char **xpm) gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, 127); - widget = gtk_pixmap_new (pixmap, mask); + widget = gtk_image_new_from_pixmap (pixmap, mask); gtk_widget_show (widget); return widget; @@ -156,9 +156,9 @@ new_empty_pixbuf (void) } static GtkWidget * -new_empty_pixmap_widget (void) +new_empty_image_widget (void) { - GtkWidget *pixmap_widget; + GtkWidget *image_widget; GdkPixmap *pixmap; GdkBitmap *mask; GdkPixbuf *empty_pixbuf; @@ -166,11 +166,11 @@ new_empty_pixmap_widget (void) empty_pixbuf = new_empty_pixbuf (); gdk_pixbuf_render_pixmap_and_mask (empty_pixbuf, &pixmap, &mask, 127); - pixmap_widget = gtk_pixmap_new (pixmap, mask); + image_widget = gtk_image_new_from_pixmap (pixmap, mask); g_object_unref (empty_pixbuf); - return pixmap_widget; + return image_widget; } @@ -196,14 +196,17 @@ set_title_bar_label_style (GtkWidget *widget) static int get_max_clipped_label_width (EClippedLabel *clipped_label) { - GdkFont *font; + PangoLayout *layout; int width; - font = gtk_style_get_font (GTK_WIDGET (clipped_label)->style); + layout = gtk_widget_create_pango_layout (GTK_WIDGET (clipped_label), + clipped_label->label); - width = gdk_string_width (font, clipped_label->label); + pango_layout_get_pixel_size (layout, &width, NULL); width += 2 * GTK_MISC (clipped_label)->xpad; + g_object_unref (layout); + return width; } @@ -334,8 +337,8 @@ static void add_navigation_buttons (EShellFolderTitleBar *folder_title_bar) { EShellFolderTitleBarPrivate *priv; - GtkWidget *back_pixmap; - GtkWidget *forward_pixmap; + GtkWidget *back_image; + GtkWidget *forward_image; priv = folder_title_bar->priv; @@ -343,8 +346,8 @@ add_navigation_buttons (EShellFolderTitleBar *folder_title_bar) gtk_button_set_relief (GTK_BUTTON (priv->back_button), GTK_RELIEF_NONE); GTK_WIDGET_UNSET_FLAGS (priv->back_button, GTK_CAN_FOCUS); - back_pixmap = create_pixmap_widget_from_xpm (left_arrow_xpm); - gtk_container_add (GTK_CONTAINER (priv->back_button), back_pixmap); + back_image = create_image_widget_from_xpm (left_arrow_xpm); + gtk_container_add (GTK_CONTAINER (priv->back_button), back_image); g_signal_connect (priv->back_button, "clicked", G_CALLBACK (back_button_clicked_callback), folder_title_bar); @@ -353,8 +356,8 @@ add_navigation_buttons (EShellFolderTitleBar *folder_title_bar) gtk_button_set_relief (GTK_BUTTON (priv->forward_button), GTK_RELIEF_NONE); GTK_WIDGET_UNSET_FLAGS (priv->forward_button, GTK_CAN_FOCUS); - forward_pixmap = create_pixmap_widget_from_xpm (right_arrow_xpm); - gtk_container_add (GTK_CONTAINER (priv->forward_button), forward_pixmap); + forward_image = create_image_widget_from_xpm (right_arrow_xpm); + gtk_container_add (GTK_CONTAINER (priv->forward_button), forward_image); g_signal_connect (priv->forward_button, "clicked", G_CALLBACK (forward_button_clicked_callback), folder_title_bar); @@ -471,27 +474,33 @@ class_init (EShellFolderTitleBarClass *klass) parent_class = g_type_class_ref(PARENT_TYPE); - signals[TITLE_TOGGLED] = gtk_signal_new ("title_toggled", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShellFolderTitleBarClass, title_toggled), - e_shell_marshal_NONE__BOOL, - GTK_TYPE_NONE, 1, - GTK_TYPE_BOOL); - - signals[BACK_CLICKED] = gtk_signal_new ("back_clicked", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShellFolderTitleBarClass, back_clicked), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - signals[FORWARD_CLICKED] = gtk_signal_new ("forward_clicked", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShellFolderTitleBarClass, forward_clicked), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + signals[TITLE_TOGGLED] + = g_signal_new ("title_toggled", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EShellFolderTitleBarClass, title_toggled), + NULL, NULL, + e_shell_marshal_NONE__BOOL, + G_TYPE_NONE, 1, + G_TYPE_BOOLEAN); + + signals[BACK_CLICKED] + = g_signal_new ("back_clicked", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EShellFolderTitleBarClass, back_clicked), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); + + signals[FORWARD_CLICKED] + = g_signal_new ("forward_clicked", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EShellFolderTitleBarClass, forward_clicked), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); } static void @@ -541,7 +550,7 @@ e_shell_folder_title_bar_construct (EShellFolderTitleBar *folder_title_bar) priv = folder_title_bar->priv; widget = GTK_WIDGET (folder_title_bar); - priv->title_icon = new_empty_pixmap_widget (); + priv->title_icon = new_empty_image_widget (); gtk_misc_set_alignment (GTK_MISC (priv->title_icon), 1.0, .5); gtk_misc_set_padding (GTK_MISC (priv->title_icon), 2, 0); gtk_widget_show (priv->title_icon); @@ -562,7 +571,7 @@ e_shell_folder_title_bar_construct (EShellFolderTitleBar *folder_title_bar) gtk_widget_show (priv->folder_bar_label); set_title_bar_label_style (priv->folder_bar_label); - priv->title_button_icon = new_empty_pixmap_widget (); + priv->title_button_icon = new_empty_image_widget (); gtk_widget_show (priv->title_button_icon); title_button_hbox = gtk_hbox_new (FALSE, 0); @@ -570,7 +579,7 @@ e_shell_folder_title_bar_construct (EShellFolderTitleBar *folder_title_bar) FALSE, TRUE, 2); gtk_box_pack_start (GTK_BOX (title_button_hbox), priv->title_button_label, TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (title_button_hbox), create_pixmap_widget_from_xpm (down_arrow_xpm), + gtk_box_pack_start (GTK_BOX (title_button_hbox), create_image_widget_from_xpm (down_arrow_xpm), FALSE, TRUE, 2); gtk_widget_show (title_button_hbox); @@ -615,13 +624,9 @@ e_shell_folder_title_bar_new (void) { EShellFolderTitleBar *new; - gtk_widget_push_colormap (gdk_rgb_get_cmap ()); - gtk_widget_push_visual (gdk_rgb_get_visual ()); new = g_object_new (e_shell_folder_title_bar_get_type (), NULL); e_shell_folder_title_bar_construct (new); - gtk_widget_pop_visual (); - gtk_widget_pop_colormap (); return GTK_WIDGET (new); } @@ -718,10 +723,10 @@ e_shell_folder_title_bar_set_icon (EShellFolderTitleBar *folder_title_bar, } gdk_pixbuf_render_pixmap_and_mask (priv->icon, &pixmap, &mask, 127); - gtk_pixmap_set (GTK_PIXMAP (priv->title_button_icon), pixmap, mask); + gtk_image_set_from_pixmap (GTK_IMAGE (priv->title_button_icon), pixmap, mask); gdk_pixbuf_render_pixmap_and_mask (priv->icon, &pixmap, &mask, 127); - gtk_pixmap_set (GTK_PIXMAP (priv->title_icon), pixmap, mask); + gtk_image_set_from_pixmap (GTK_IMAGE (priv->title_icon), pixmap, mask); } diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c index 4aeba1253a..64e9db22e3 100644 --- a/shell/e-shell-importer.c +++ b/shell/e-shell-importer.c @@ -24,6 +24,9 @@ #include <config.h> #endif +#undef GTK_DISABLE_DEPRECATED +#undef G_DISABLE_DEPRECATED + #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> diff --git a/shell/e-shell-offline-handler.c b/shell/e-shell-offline-handler.c index 42972d0e50..28616ffa01 100644 --- a/shell/e-shell-offline-handler.c +++ b/shell/e-shell-offline-handler.c @@ -24,16 +24,20 @@ #include <config.h> #endif +#undef G_DISABLE_DEPRECATED /* FIXME */ +#undef GTK_DISABLE_DEPRECATED /* FIXME */ + #include "e-shell-offline-handler.h" #include "e-shell-offline-sync.h" #include "e-shell-marshal.h" -#include <gtk/gtktypeutils.h> +#include <gtk/gtkclist.h> +#include <gtk/gtklabel.h> #include <gtk/gtksignal.h> +#include <gtk/gtktypeutils.h> #include <gtk/gtkwidget.h> -#include <gtk/gtkclist.h> #include <gal/util/e-util.h> @@ -721,21 +725,23 @@ class_init (EShellOfflineHandlerClass *klass) parent_class = g_type_class_ref(gtk_object_get_type ()); signals[OFFLINE_PROCEDURE_STARTED] - = gtk_signal_new ("offline_procedure_started", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShellOfflineHandlerClass, offline_procedure_started), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + = g_signal_new ("offline_procedure_started", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EShellOfflineHandlerClass, offline_procedure_started), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); signals[OFFLINE_PROCEDURE_FINISHED] - = gtk_signal_new ("offline_procedure_finished", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShellOfflineHandlerClass, offline_procedure_finished), - e_shell_marshal_NONE__BOOL, - GTK_TYPE_NONE, 1, - GTK_TYPE_BOOL); + = g_signal_new ("offline_procedure_finished", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EShellOfflineHandlerClass, offline_procedure_finished), + NULL, NULL, + e_shell_marshal_NONE__BOOL, + G_TYPE_NONE, 1, + G_TYPE_BOOLEAN); } diff --git a/shell/e-shell-offline-sync.c b/shell/e-shell-offline-sync.c index e40762b0c3..309a104494 100644 --- a/shell/e-shell-offline-sync.c +++ b/shell/e-shell-offline-sync.c @@ -128,7 +128,7 @@ impl_SyncFolderProgressListener_updateProgress (PortableServer_Servant servant, SyncData *sync_data; sync_data = ((SyncFolderProgressListenerServant *) servant)->sync_data; - gtk_progress_set_percentage (GTK_PROGRESS (sync_data->progress_bar), percent); + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (sync_data->progress_bar), percent); } static void @@ -237,7 +237,7 @@ setup_dialog (SyncData *sync_data) { sync_data->dialog = gnome_dialog_new (_("Syncing Folder"), GNOME_STOCK_BUTTON_CANCEL, NULL); gtk_widget_set_size_request (sync_data->dialog, 300, -1); - gtk_window_set_policy (GTK_WINDOW (sync_data->dialog), FALSE, FALSE, FALSE); + gtk_window_set_resizable (GTK_WINDOW (sync_data->dialog), FALSE); g_signal_connect (sync_data->dialog, "close", G_CALLBACK (progress_dialog_close_callback), sync_data); @@ -249,7 +249,6 @@ setup_dialog (SyncData *sync_data) sync_data->label, FALSE, TRUE, 0); sync_data->progress_bar = gtk_progress_bar_new (); - gtk_progress_set_activity_mode (GTK_PROGRESS (sync_data->progress_bar), FALSE); gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (sync_data->dialog)->vbox), sync_data->progress_bar, FALSE, TRUE, 0); @@ -315,10 +314,10 @@ sync_folder (SyncData *sync_data, msg = g_strdup_printf (_("Synchronizing \"%s\" (%d of %d) ..."), e_folder_get_name (folder), num, total); - gtk_label_set (GTK_LABEL (sync_data->label), msg); + gtk_label_set_text (GTK_LABEL (sync_data->label), msg); g_free (msg); - gtk_progress_set_value (GTK_PROGRESS (sync_data->progress_bar), 0.0); + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (sync_data->progress_bar), 0.0); /* Get the data ready. */ diff --git a/shell/e-shell-settings-dialog.c b/shell/e-shell-settings-dialog.c index 53ed1388f9..9a8e521856 100644 --- a/shell/e-shell-settings-dialog.c +++ b/shell/e-shell-settings-dialog.c @@ -57,14 +57,26 @@ struct _EShellSettingsDialogPrivate { static void set_dialog_size (EShellSettingsDialog *dialog) { - GdkFont *font; + PangoLayout *layout; + PangoContext *context; + PangoFontMetrics *metrics; int width, height; - font = gtk_style_get_font (GTK_WIDGET (dialog)->style); - width = gdk_string_width (font, "M") * 72; - height = (font->ascent + font->descent) * 35; + layout = gtk_widget_create_pango_layout (GTK_WIDGET (dialog), "M"); + context = pango_layout_get_context (layout); + metrics = pango_context_get_metrics (context, + gtk_widget_get_style (GTK_WIDGET (dialog))->font_desc, + NULL); + + width = pango_layout_get_width (layout) * 72; + height = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) + + pango_font_metrics_get_descent (metrics)) * 35; gtk_widget_set_size_request (GTK_WIDGET (dialog), width, height); + + g_object_unref (context); + g_object_unref (layout); + pango_font_metrics_unref (metrics); } diff --git a/shell/e-shell-shared-folder-picker-dialog.c b/shell/e-shell-shared-folder-picker-dialog.c index 1b63b495da..6904d5e289 100644 --- a/shell/e-shell-shared-folder-picker-dialog.c +++ b/shell/e-shell-shared-folder-picker-dialog.c @@ -34,7 +34,6 @@ #include "Evolution-Addressbook-SelectNames.h" #include <gal/widgets/e-gui-utils.h> -#include <gal/widgets/e-unicode.h> #include <libgnomeui/gnome-dialog.h> #include <libgnome/gnome-i18n.h> @@ -190,7 +189,7 @@ setup_server_option_menu (EShell *shell, storage_name = e_storage_get_name (E_STORAGE (p->data)); - menu_item = e_utf8_gtk_menu_item_new_with_label (GTK_MENU (menu), storage_name); + menu_item = gtk_menu_item_new_with_label (storage_name); g_signal_connect (menu_item, "activate", G_CALLBACK (server_option_menu_item_activate_callback), storage_name_return); @@ -287,15 +286,7 @@ cleanup_discovery (DiscoveryData *discovery_data) static int progress_bar_timeout_callback (void *data) { - GtkAdjustment *adjustment; - float value; - - adjustment = GTK_PROGRESS (data)->adjustment; - value = adjustment->value + 1; - if (value > adjustment->upper) - value = adjustment->lower; - - gtk_progress_set_value (GTK_PROGRESS (data), value); + gtk_progress_bar_pulse (GTK_PROGRESS_BAR (data)); return TRUE; } @@ -360,7 +351,7 @@ create_progress_dialog (EShell *shell, dialog = gnome_dialog_new (_("Opening Folder"), GNOME_STOCK_BUTTON_CANCEL, NULL); gtk_widget_set_size_request (dialog, 300, -1); - gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, FALSE, FALSE); + gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); g_signal_connect (dialog, "close", G_CALLBACK (progress_dialog_close_callback), NULL); @@ -376,7 +367,6 @@ create_progress_dialog (EShell *shell, g_free (text); progress_bar = gtk_progress_bar_new (); - gtk_progress_set_activity_mode (GTK_PROGRESS (progress_bar), TRUE); gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), progress_bar, FALSE, TRUE, 0); timeout_id = g_timeout_add (50, progress_bar_timeout_callback, progress_bar); diff --git a/shell/e-shell-user-creatable-items-handler.c b/shell/e-shell-user-creatable-items-handler.c index 057ac1bd1e..c2cc6b8877 100644 --- a/shell/e-shell-user-creatable-items-handler.c +++ b/shell/e-shell-user-creatable-items-handler.c @@ -299,20 +299,20 @@ append_xml_for_menu_item (GString *xml, char *encoded_tooltip; encoded_label = bonobo_ui_util_encode_str (item->label); - g_string_sprintfa (xml, "<menuitem name=\"New:%s\" verb=\"%s\" label=\"%s\"", - item->verb, item->verb, encoded_label); + g_string_append_printf (xml, "<menuitem name=\"New:%s\" verb=\"%s\" label=\"%s\"", + item->verb, item->verb, encoded_label); if (first) - g_string_sprintfa (xml, " accel=\"*Control*N\""); + g_string_append_printf (xml, " accel=\"*Control*N\""); else if (item->shortcut != '\0') - g_string_sprintfa (xml, " accel=\"*Control**Shift*%c\"", item->shortcut); + g_string_append_printf (xml, " accel=\"*Control**Shift*%c\"", item->shortcut); if (item->icon != NULL) - g_string_sprintfa (xml, " pixtype=\"pixbuf\" pixname=\"%s\"", + g_string_append_printf (xml, " pixtype=\"pixbuf\" pixname=\"%s\"", bonobo_ui_util_pixbuf_to_xml (item->icon)); encoded_tooltip = bonobo_ui_util_encode_str (item->tooltip); - g_string_sprintfa (xml, " tip=\"%s\"", encoded_tooltip); + g_string_append_printf (xml, " tip=\"%s\"", encoded_tooltip); g_string_append (xml, "/> "); @@ -404,7 +404,8 @@ create_menu_xml (EShellUserCreatableItemsHandler *handler, /* 2. Add a separator. */ if (component_id != NULL) - g_string_sprintfa (xml, "<separator f=\"\" name=\"EShellUserCreatableItemsHandlerSeparator\"/>"); + g_string_append_printf (xml, + "<separator f=\"\" name=\"EShellUserCreatableItemsHandlerSeparator\"/>"); /* 3. Add the elements that are not default for this component. */ diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c index 37cd750169..c1728dfde8 100644 --- a/shell/e-shell-utils.c +++ b/shell/e-shell-utils.c @@ -57,11 +57,11 @@ static char * get_mini_name (const char *icon_name) { const char *dot_ptr; - const char *basename; + char *basename; char *name_without_extension; char *mini_name; - basename = g_basename (icon_name); + basename = g_path_get_basename (icon_name); if (basename == NULL) return NULL; @@ -69,14 +69,16 @@ get_mini_name (const char *icon_name) if (dot_ptr == NULL) { /* No extension. */ + g_free (basename); return g_strconcat (icon_name, E_SHELL_MINI_ICON_SUFFIX, NULL); } - name_without_extension = g_strndup (icon_name, dot_ptr - icon_name); + name_without_extension = g_strndup (icon_name, dot_ptr - basename); mini_name = g_strconcat (name_without_extension, E_SHELL_MINI_ICON_SUFFIX, dot_ptr, NULL); g_free (name_without_extension); + g_free (basename); return mini_name; } diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c index 56fe42170d..453de955a0 100644 --- a/shell/e-shell-view-menu.c +++ b/shell/e-shell-view-menu.c @@ -235,7 +235,7 @@ command_about_box (BonoboUIComponent *uih, about_box_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_type_hint (GTK_WINDOW (about_box_window), GDK_WINDOW_TYPE_HINT_DIALOG); - gtk_window_set_policy (GTK_WINDOW (about_box_window), FALSE, FALSE, FALSE); + gtk_window_set_resizable (GTK_WINDOW (about_box_window), FALSE); g_signal_connect (about_box_window, "key_press_event", G_CALLBACK (about_box_event_callback), &about_box_window); g_signal_connect (about_box_window, "button_press_event", diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index a60d5bce45..275fa285ff 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -76,7 +76,6 @@ #include <gal/e-paned/e-hpaned.h> #include <gal/util/e-util.h> #include <gal/widgets/e-gui-utils.h> -#include <gal/widgets/e-unicode.h> #include <gal/widgets/e-scroll-frame.h> @@ -135,7 +134,7 @@ struct _EShellViewPrivate { /* The status bar widgetry. */ GtkWidget *status_bar; GtkWidget *offline_toggle; - GtkWidget *offline_toggle_pixmap; + GtkWidget *offline_toggle_image; GtkWidget *menu_hint_label; GtkWidget *task_bar; @@ -272,9 +271,8 @@ cleanup_delayed_selection (EShellView *shell_view) if (priv->delayed_selection != NULL) { g_free (priv->delayed_selection); priv->delayed_selection = NULL; - gtk_signal_disconnect_by_func (GTK_OBJECT (e_shell_get_storage_set (priv->shell)), - G_CALLBACK (new_folder_cb), - shell_view); + g_signal_handlers_disconnect_by_func (e_shell_get_storage_set (priv->shell), + G_CALLBACK (new_folder_cb), shell_view); } } @@ -783,18 +781,18 @@ folder_bar_popup_map_callback (GtkWidget *widget, gtk_grab_add (widget); - gtk_signal_connect_while_alive (GTK_OBJECT (widget), "button_release_event", - G_CALLBACK (storage_set_view_box_button_release_event_cb), shell_view, - GTK_OBJECT (priv->folder_bar_popup)); - gtk_signal_connect_while_alive (GTK_OBJECT (priv->storage_set_view), "folder_opened", - G_CALLBACK (storage_set_view_folder_opened_cb), shell_view, - GTK_OBJECT (priv->folder_bar_popup)); - gtk_signal_connect_while_alive (GTK_OBJECT (priv->storage_set_view), "button_release_event", - G_CALLBACK (storage_set_view_box_button_release_event_cb), shell_view, - GTK_OBJECT (priv->folder_bar_popup)); - gtk_signal_connect_while_alive (GTK_OBJECT (priv->storage_set_title_bar), "button_clicked", - G_CALLBACK (popup_storage_set_view_button_clicked), shell_view, - GTK_OBJECT (priv->folder_bar_popup)); + e_signal_connect_while_alive (widget, "button_release_event", + G_CALLBACK (storage_set_view_box_button_release_event_cb), + shell_view, priv->folder_bar_popup); + e_signal_connect_while_alive (priv->storage_set_view, "folder_opened", + G_CALLBACK (storage_set_view_folder_opened_cb), + shell_view, priv->folder_bar_popup); + e_signal_connect_while_alive (priv->storage_set_view, "button_release_event", + G_CALLBACK (storage_set_view_box_button_release_event_cb), + shell_view, priv->folder_bar_popup); + e_signal_connect_while_alive (priv->storage_set_title_bar, "button_clicked", + G_CALLBACK (popup_storage_set_view_button_clicked), + shell_view, priv->folder_bar_popup); } static void @@ -1176,7 +1174,7 @@ setup_offline_toggle (EShellView *shell_view) { EShellViewPrivate *priv; GtkWidget *toggle; - GtkWidget *pixmap; + GtkWidget *image; priv = shell_view->priv; @@ -1187,15 +1185,15 @@ setup_offline_toggle (EShellView *shell_view) g_signal_connect (toggle, "clicked", G_CALLBACK (offline_toggle_clicked_cb), shell_view); - pixmap = gtk_pixmap_new (offline_pixmap, offline_mask); + image = gtk_image_new_from_pixmap (offline_pixmap, offline_mask); - gtk_container_add (GTK_CONTAINER (toggle), pixmap); + gtk_container_add (GTK_CONTAINER (toggle), image); gtk_widget_show (toggle); - gtk_widget_show (pixmap); + gtk_widget_show (image); - priv->offline_toggle = toggle; - priv->offline_toggle_pixmap = pixmap; + priv->offline_toggle = toggle; + priv->offline_toggle_image = image; update_offline_toggle_status (shell_view); @@ -1261,7 +1259,7 @@ ui_engine_add_hint_callback (BonoboUIEngine *engine, shell_view = E_SHELL_VIEW (data); priv = shell_view->priv; - gtk_label_set (GTK_LABEL (priv->menu_hint_label), hint); + gtk_label_set_text (GTK_LABEL (priv->menu_hint_label), hint); gtk_widget_show (priv->menu_hint_label); gtk_widget_hide (priv->task_bar); } @@ -1518,34 +1516,37 @@ class_init (EShellViewClass *klass) parent_class = g_type_class_ref(BONOBO_TYPE_WINDOW); signals[SHORTCUT_BAR_VISIBILITY_CHANGED] - = gtk_signal_new ("shortcut_bar_visibility_changed", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShellViewClass, shortcut_bar_visibility_changed), - e_shell_marshal_NONE__INT, - GTK_TYPE_NONE, 1, - GTK_TYPE_INT); + = g_signal_new ("shortcut_bar_visibility_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EShellViewClass, shortcut_bar_visibility_changed), + NULL, NULL, + e_shell_marshal_NONE__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); signals[FOLDER_BAR_VISIBILITY_CHANGED] - = gtk_signal_new ("folder_bar_visibility_changed", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShellViewClass, folder_bar_visibility_changed), - e_shell_marshal_NONE__INT, - GTK_TYPE_NONE, 1, - GTK_TYPE_INT); + = g_signal_new ("folder_bar_visibility_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EShellViewClass, folder_bar_visibility_changed), + NULL, NULL, + e_shell_marshal_NONE__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); signals[VIEW_CHANGED] - = gtk_signal_new ("view_changed", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShellViewClass, view_changed), - e_shell_marshal_NONE__STRING_STRING_STRING_STRING, - GTK_TYPE_NONE, 4, - GTK_TYPE_STRING, - GTK_TYPE_STRING, - GTK_TYPE_STRING, - GTK_TYPE_STRING); + = g_signal_new ("view_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EShellViewClass, view_changed), + NULL, NULL, + e_shell_marshal_NONE__STRING_STRING_STRING_STRING, + G_TYPE_NONE, 4, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING); load_images (); } @@ -1581,7 +1582,7 @@ init (EShellView *shell_view) priv->status_bar = NULL; priv->offline_toggle = NULL; - priv->offline_toggle_pixmap = NULL; + priv->offline_toggle_image = NULL; priv->menu_hint_label = NULL; priv->task_bar = NULL; @@ -1787,9 +1788,9 @@ e_shell_view_construct (EShellView *shell_view, g_signal_connect (view, "delete_event", G_CALLBACK (delete_event_cb), NULL); - gtk_signal_connect_while_alive (GTK_OBJECT (e_shell_get_storage_set (priv->shell)), - "updated_folder", G_CALLBACK (updated_folder_cb), - shell_view, GTK_OBJECT (shell_view)); + e_signal_connect_while_alive (e_shell_get_storage_set (priv->shell), + "updated_folder", G_CALLBACK (updated_folder_cb), + shell_view, shell_view); priv->ui_container = bonobo_window_get_ui_container (BONOBO_WINDOW (view)); g_signal_connect (priv->ui_container, "system_exception", @@ -1879,7 +1880,7 @@ get_storage_set_path_from_uri (const char *uri) if (! g_path_is_absolute (colon + 1)) return NULL; - if (g_strncasecmp (uri, E_SHELL_URI_PREFIX, colon - uri) != 0) + if (g_ascii_strncasecmp (uri, E_SHELL_URI_PREFIX, colon - uri) != 0) return NULL; return colon + 1; @@ -1951,13 +1952,8 @@ update_folder_title_bar (EShellView *shell_view, if (folder_icon != NULL) g_object_unref (folder_icon); - if (title != NULL) { - char *s; - - s = e_utf8_to_gtk_string (GTK_WIDGET (priv->folder_title_bar), title); - e_shell_folder_title_bar_set_title (E_SHELL_FOLDER_TITLE_BAR (priv->folder_title_bar), s); - g_free (s); - } + if (title != NULL) + e_shell_folder_title_bar_set_title (E_SHELL_FOLDER_TITLE_BAR (priv->folder_title_bar), title); } static void @@ -1969,8 +1965,7 @@ update_for_current_uri (EShellView *shell_view) const char *type; const char *folder_name; char *title; - char *utf8_window_title; - char *gtk_window_title; + char *window_title; int unread_count; priv = shell_view->priv; @@ -2005,30 +2000,26 @@ update_for_current_uri (EShellView *shell_view) title = g_strdup (folder_name); if (SUB_VERSION[0] == '\0') - utf8_window_title = g_strdup_printf ("%s - Ximian Evolution %s", title, VERSION); + window_title = g_strdup_printf ("%s - Ximian Evolution %s", title, VERSION); else - utf8_window_title = g_strdup_printf ("%s - Ximian Evolution %s [%s]", title, VERSION, SUB_VERSION); + window_title = g_strdup_printf ("%s - Ximian Evolution %s [%s]", title, VERSION, SUB_VERSION); - gtk_window_title = e_utf8_to_gtk_string (GTK_WIDGET (shell_view), utf8_window_title); - gtk_window_set_title (GTK_WINDOW (shell_view), gtk_window_title); + gtk_window_set_title (GTK_WINDOW (shell_view), window_title); update_folder_title_bar (shell_view, title, folder); update_window_icon (shell_view, type); - g_free (gtk_window_title); - g_free (utf8_window_title); + g_free (window_title); g_free (title); - gtk_signal_handler_block_by_func (GTK_OBJECT (priv->storage_set_view), - G_CALLBACK (folder_selected_cb), - shell_view); + g_signal_handlers_block_by_func (priv->storage_set_view, + G_CALLBACK (folder_selected_cb), shell_view); if (path != NULL) e_storage_set_view_set_current_folder (E_STORAGE_SET_VIEW (priv->storage_set_view), path); - gtk_signal_handler_unblock_by_func (GTK_OBJECT (priv->storage_set_view), - G_CALLBACK (folder_selected_cb), - shell_view); + g_signal_handlers_unblock_by_func (priv->storage_set_view, + G_CALLBACK (folder_selected_cb), shell_view); } static void @@ -2068,7 +2059,7 @@ update_offline_toggle_status (EShellView *shell_view) return; } - gtk_pixmap_set (GTK_PIXMAP (priv->offline_toggle_pixmap), icon_pixmap, icon_mask); + gtk_image_set_from_pixmap (GTK_IMAGE (priv->offline_toggle_image), icon_pixmap, icon_mask); gtk_widget_set_sensitive (priv->offline_toggle, sensitive); gtk_tooltips_set_tip (priv->tooltips, priv->offline_toggle, tooltip, NULL); } @@ -2100,7 +2091,7 @@ set_current_notebook_page (EShellView *shell_view, } e_shell_folder_title_bar_set_folder_bar_label (E_SHELL_FOLDER_TITLE_BAR (priv->folder_title_bar), ""); - gtk_notebook_set_page (notebook, page_num); + gtk_notebook_set_current_page (notebook, page_num); if (page_num == -1 || page_num == 0) return; @@ -2445,9 +2436,8 @@ display_uri (EShellView *shell_view, cleanup_delayed_selection (shell_view); priv->delayed_selection = g_strdup (real_uri); - gtk_signal_connect_full (GTK_OBJECT (e_shell_get_storage_set (priv->shell)), - "new_folder", G_CALLBACK (new_folder_cb), NULL, - shell_view, NULL, FALSE, TRUE); + g_signal_connect_after (e_shell_get_storage_set (priv->shell), + "new_folder", G_CALLBACK (new_folder_cb), shell_view); retval = TRUE; goto end; } diff --git a/shell/e-shell.c b/shell/e-shell.c index d7818aa400..e15902abc0 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -1107,9 +1107,7 @@ impl_dispose (GObject *object) view = E_SHELL_VIEW (p->data); - gtk_signal_disconnect_by_func (GTK_OBJECT (view), - G_CALLBACK (view_delete_event_cb), - shell); + g_signal_handlers_disconnect_by_func (view, G_CALLBACK (view_delete_event_cb), shell); g_object_weak_unref (G_OBJECT (view), view_weak_notify, shell); @@ -1175,30 +1173,33 @@ class_init (EShellClass *klass) object_class->finalize = impl_finalize; signals[NO_VIEWS_LEFT] = - gtk_signal_new ("no_views_left", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShellClass, no_views_left), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + g_signal_new ("no_views_left", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EShellClass, no_views_left), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); signals[LINE_STATUS_CHANGED] = - gtk_signal_new ("line_status_changed", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShellClass, line_status_changed), - e_shell_marshal_NONE__INT, - GTK_TYPE_NONE, 1, - GTK_TYPE_INT); + g_signal_new ("line_status_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EShellClass, line_status_changed), + NULL, NULL, + e_shell_marshal_NONE__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); signals[NEW_VIEW_CREATED] = - gtk_signal_new ("new_view_created", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShellClass, new_view_created), - e_shell_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); + g_signal_new ("new_view_created", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EShellClass, new_view_created), + NULL, NULL, + e_shell_marshal_NONE__POINTER, + G_TYPE_NONE, 1, + G_TYPE_POINTER); epv = & klass->epv; epv->_get_displayName = impl_Shell__get_displayName; @@ -2265,4 +2266,4 @@ e_shell_parse_uri (EShell *shell, E_MAKE_X_TYPE (e_shell, "EShell", EShell, class_init, init, PARENT_TYPE, POA_GNOME_Evolution_Shell__init, - GTK_STRUCT_OFFSET (EShellClass, epv)); + G_STRUCT_OFFSET (EShellClass, epv)); diff --git a/shell/e-shortcuts-view.c b/shell/e-shortcuts-view.c index 76874ea324..2c77f62e95 100644 --- a/shell/e-shortcuts-view.c +++ b/shell/e-shortcuts-view.c @@ -48,7 +48,6 @@ #include <libgnomeui/gnome-uidefs.h> #include <gal/util/e-util.h> -#include <gal/widgets/e-unicode.h> #include <string.h> @@ -165,18 +164,16 @@ destroy_group_cb (GtkWidget *widget, EShortcutsView *shortcuts_view; EShortcutsViewPrivate *priv; GtkWidget *message_box; - char *question, *title; + char *question; menu_data = (RightClickMenuData *) data; shortcuts_view = menu_data->shortcuts_view; priv = shortcuts_view->priv; shortcuts = priv->shortcuts; - title = e_utf8_to_locale_string (e_shortcuts_get_group_title ( - shortcuts, menu_data->group_num)); question = g_strdup_printf (_("Do you really want to remove group\n" - "`%s' from the shortcut bar?"), title); - g_free (title); + "`%s' from the shortcut bar?"), + e_shortcuts_get_group_title (shortcuts, menu_data->group_num)); message_box = gnome_message_box_new (question, GNOME_MESSAGE_BOX_QUESTION, _("Remove"), _("Don't remove"), NULL); @@ -708,24 +705,26 @@ class_init (EShortcutsViewClass *klass) parent_class = g_type_class_ref(e_shortcut_bar_get_type ()); signals[ACTIVATE_SHORTCUT] = - gtk_signal_new ("activate_shortcut", - GTK_RUN_LAST | GTK_RUN_ACTION, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShortcutsViewClass, activate_shortcut), - e_shell_marshal_NONE__POINTER_STRING_INT, - GTK_TYPE_NONE, 3, - GTK_TYPE_POINTER, - GTK_TYPE_STRING, - GTK_TYPE_BOOL); + g_signal_new ("activate_shortcut", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, + G_STRUCT_OFFSET (EShortcutsViewClass, activate_shortcut), + NULL, NULL, + e_shell_marshal_NONE__POINTER_STRING_INT, + G_TYPE_NONE, 3, + G_TYPE_POINTER, + G_TYPE_STRING, + G_TYPE_BOOLEAN); signals[HIDE_REQUESTED] = - gtk_signal_new ("hide_requested", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShortcutsViewClass, - hide_requested), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + g_signal_new ("hide_requested", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EShortcutsViewClass, + hide_requested), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); } static void diff --git a/shell/e-shortcuts.c b/shell/e-shortcuts.c index d3b26e0a07..e37104612f 100644 --- a/shell/e-shortcuts.c +++ b/shell/e-shortcuts.c @@ -57,9 +57,8 @@ #include <libgnome/gnome-i18n.h> -#include <gal/util/e-util.h> #include <gal/util/e-xml-utils.h> -#include <gal/widgets/e-unicode.h> +#include <gal/util/e-util.h> #include <gal/shortcut-bar/e-shortcut-bar.h> #include "e-shortcuts-view.h" @@ -134,12 +133,14 @@ shortcut_item_new (const char *uri, { EShortcutItem *new; + new = g_new (EShortcutItem, 1); + if (name == NULL) - name = g_basename (uri); + new->name = g_path_get_basename (uri); + else + new->name = g_strdup (type); - new = g_new (EShortcutItem, 1); new->uri = g_strdup (uri); - new->name = g_strdup (name); new->type = g_strdup (type); new->custom_icon_name = g_strdup (custom_icon_name); new->unread_count = unread_count; @@ -155,10 +156,11 @@ shortcut_item_update (EShortcutItem *shortcut_item, const char *type, const char *custom_icon_name) { + char *base_name = g_path_get_basename (uri); gboolean changed = FALSE; if (name == NULL) - name = g_basename (uri); + name = base_name; if (shortcut_item->unread_count != unread_count) { shortcut_item->unread_count = unread_count; @@ -180,6 +182,8 @@ shortcut_item_update (EShortcutItem *shortcut_item, #undef UPDATE_STRING + g_free (base_name); + return changed; } @@ -680,72 +684,79 @@ class_init (EShortcutsClass *klass) parent_class = g_type_class_ref(gtk_object_get_type ()); signals[NEW_GROUP] - = gtk_signal_new ("new_group", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShortcutsClass, new_group), - e_shell_marshal_NONE__INT, - GTK_TYPE_NONE, 1, - GTK_TYPE_INT); + = g_signal_new ("new_group", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EShortcutsClass, new_group), + NULL, NULL, + e_shell_marshal_NONE__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); signals[REMOVE_GROUP] - = gtk_signal_new ("remove_group", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShortcutsClass, remove_group), - e_shell_marshal_NONE__INT, - GTK_TYPE_NONE, 1, - GTK_TYPE_INT); + = g_signal_new ("remove_group", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EShortcutsClass, remove_group), + NULL, NULL, + e_shell_marshal_NONE__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); signals[RENAME_GROUP] - = gtk_signal_new ("rename_group", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShortcutsClass, rename_group), - e_shell_marshal_NONE__INT_STRING, - GTK_TYPE_NONE, 2, - GTK_TYPE_INT, - GTK_TYPE_STRING); + = g_signal_new ("rename_group", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EShortcutsClass, rename_group), + NULL, NULL, + e_shell_marshal_NONE__INT_STRING, + G_TYPE_NONE, 2, + G_TYPE_INT, + G_TYPE_STRING); signals[GROUP_CHANGE_ICON_SIZE] - = gtk_signal_new ("group_change_icon_size", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShortcutsClass, group_change_icon_size), - e_shell_marshal_NONE__INT_INT, - GTK_TYPE_NONE, 2, - GTK_TYPE_INT, - GTK_TYPE_INT); + = g_signal_new ("group_change_icon_size", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EShortcutsClass, group_change_icon_size), + NULL, NULL, + e_shell_marshal_NONE__INT_INT, + G_TYPE_NONE, 2, + G_TYPE_INT, + G_TYPE_INT); signals[NEW_SHORTCUT] - = gtk_signal_new ("new_shortcut", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShortcutsClass, new_shortcut), - e_shell_marshal_NONE__INT_INT, - GTK_TYPE_NONE, 2, - GTK_TYPE_INT, - GTK_TYPE_INT); + = g_signal_new ("new_shortcut", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EShortcutsClass, new_shortcut), + NULL, NULL, + e_shell_marshal_NONE__INT_INT, + G_TYPE_NONE, 2, + G_TYPE_INT, + G_TYPE_INT); signals[REMOVE_SHORTCUT] - = gtk_signal_new ("remove_shortcut", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShortcutsClass, remove_shortcut), - e_shell_marshal_NONE__INT_INT, - GTK_TYPE_NONE, 2, - GTK_TYPE_INT, - GTK_TYPE_INT); + = g_signal_new ("remove_shortcut", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EShortcutsClass, remove_shortcut), + NULL, NULL, + e_shell_marshal_NONE__INT_INT, + G_TYPE_NONE, 2, + G_TYPE_INT, + G_TYPE_INT); signals[UPDATE_SHORTCUT] - = gtk_signal_new ("update_shortcut", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EShortcutsClass, update_shortcut), - e_shell_marshal_NONE__INT_INT, - GTK_TYPE_NONE, 2, - GTK_TYPE_INT, - GTK_TYPE_INT); + = g_signal_new ("update_shortcut", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EShortcutsClass, update_shortcut), + NULL, NULL, + e_shell_marshal_NONE__INT_INT, + G_TYPE_NONE, 2, + G_TYPE_INT, + G_TYPE_INT); } @@ -1066,40 +1077,21 @@ void e_shortcuts_add_default_shortcuts (EShortcuts *shortcuts, int group_num) { - char *utf; - - utf = e_utf8_from_locale_string (_("Summary")); - e_shortcuts_add_shortcut (shortcuts, 0, -1, E_SUMMARY_URI, utf, 0, "summary", NULL); - g_free (utf); - - utf = e_utf8_from_locale_string (_("Inbox")); - e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:mail", utf, 0, "mail", "inbox"); - g_free (utf); + e_shortcuts_add_shortcut (shortcuts, 0, -1, E_SUMMARY_URI, _("Summary"), 0, "summary", NULL); - utf = e_utf8_from_locale_string (_("Calendar")); - e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:calendar", utf, 0, "calendar", NULL); - g_free (utf); - - utf = e_utf8_from_locale_string (_("Tasks")); - e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:tasks", utf, 0, "tasks", NULL); - g_free (utf); - - utf = e_utf8_from_locale_string (_("Contacts")); - e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:contacts", utf, 0, "contacts", NULL); - g_free (utf); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:mail", _("Inbox"), 0, "mail", "inbox"); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:calendar", _("Calendar"), 0, "calendar", NULL); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:tasks", _("Tasks"), 0, "tasks", NULL); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:contacts", _("Contacts"), 0, "contacts", NULL); } void e_shortcuts_add_default_group (EShortcuts *shortcuts) { - char *utf; - g_return_if_fail (shortcuts != NULL); g_return_if_fail (E_IS_SHORTCUTS (shortcuts)); - utf = e_utf8_from_locale_string (_("Shortcuts")); - e_shortcuts_add_group (shortcuts, -1, utf); - g_free (utf); + e_shortcuts_add_group (shortcuts, -1, _("Shortcuts")); e_shortcuts_add_default_shortcuts (shortcuts, -1); } diff --git a/shell/e-splash.c b/shell/e-splash.c index 08a735c46f..a8a234fd75 100644 --- a/shell/e-splash.c +++ b/shell/e-splash.c @@ -348,7 +348,7 @@ e_splash_construct (ESplash *splash, g_object_set((splash), "type", GTK_WINDOW_TOPLEVEL, NULL); gtk_window_set_position (GTK_WINDOW (splash), GTK_WIN_POS_CENTER); - gtk_window_set_policy (GTK_WINDOW (splash), FALSE, FALSE, FALSE); + gtk_window_set_resizable (GTK_WINDOW (splash), FALSE); gtk_window_set_default_size (GTK_WINDOW (splash), image_width, image_height); gtk_window_set_wmclass (GTK_WINDOW (splash), "evolution-splash", "Evolution"); gnome_window_icon_set_from_file (GTK_WINDOW (splash), EVOLUTION_DATADIR "/pixmaps/evolution.png"); diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c index d57dd59968..fd1fd6fea5 100644 --- a/shell/e-storage-set-view.c +++ b/shell/e-storage-set-view.c @@ -671,16 +671,16 @@ setup_folder_properties_items_if_corba_storage_clicked (EStorageSetView *storage item = (const ECorbaStoragePropertyItem *) p->data; num_property_items ++; - g_string_sprintfa (xml, "<menuitem name=\"EStorageSetView:FolderPropertyItem:%d\"", - num_property_items); - g_string_sprintfa (xml, " verb=\"EStorageSetView:FolderPropertyItem:%d\"", - num_property_items); + g_string_append_printf (xml, "<menuitem name=\"EStorageSetView:FolderPropertyItem:%d\"", + num_property_items); + g_string_append_printf (xml, " verb=\"EStorageSetView:FolderPropertyItem:%d\"", + num_property_items); encoded_tooltip = bonobo_ui_util_encode_str (item->tooltip); - g_string_sprintfa (xml, " tip=\"%s\"", encoded_tooltip); + g_string_append_printf (xml, " tip=\"%s\"", encoded_tooltip); encoded_label = bonobo_ui_util_encode_str (item->label); - g_string_sprintfa (xml, " label=\"%s\"/>", encoded_label); + g_string_append_printf (xml, " label=\"%s\"/>", encoded_label); g_free (encoded_tooltip); g_free (encoded_label); @@ -1808,59 +1808,65 @@ class_init (EStorageSetViewClass *klass) etree_class->tree_drag_data_received = impl_tree_drag_data_received; signals[FOLDER_SELECTED] - = gtk_signal_new ("folder_selected", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageSetViewClass, folder_selected), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + = g_signal_new ("folder_selected", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageSetViewClass, folder_selected), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); signals[FOLDER_OPENED] - = gtk_signal_new ("folder_opened", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageSetViewClass, folder_opened), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + = g_signal_new ("folder_opened", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageSetViewClass, folder_opened), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); signals[DND_ACTION] - = gtk_signal_new ("dnd_action", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageSetViewClass, dnd_action), - e_shell_marshal_NONE__POINTER_POINTER_POINTER_POINTER, - GTK_TYPE_NONE, 4, - GTK_TYPE_POINTER, - GTK_TYPE_POINTER, - GTK_TYPE_POINTER, - GTK_TYPE_POINTER); + = g_signal_new ("dnd_action", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageSetViewClass, dnd_action), + NULL, NULL, + e_shell_marshal_NONE__POINTER_POINTER_POINTER_POINTER, + G_TYPE_NONE, 4, + G_TYPE_POINTER, + G_TYPE_POINTER, + G_TYPE_POINTER, + G_TYPE_POINTER); signals[FOLDER_CONTEXT_MENU_POPPING_UP] - = gtk_signal_new ("folder_context_menu_popping_up", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageSetViewClass, folder_context_menu_popping_up), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + = g_signal_new ("folder_context_menu_popping_up", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageSetViewClass, folder_context_menu_popping_up), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); signals[FOLDER_CONTEXT_MENU_POPPED_DOWN] - = gtk_signal_new ("folder_context_menu_popped_down", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageSetViewClass, folder_context_menu_popped_down), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + = g_signal_new ("folder_context_menu_popped_down", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageSetViewClass, folder_context_menu_popped_down), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); signals[CHECKBOXES_CHANGED] - = gtk_signal_new ("checkboxes_changed", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageSetViewClass, checkboxes_changed), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + = g_signal_new ("checkboxes_changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageSetViewClass, checkboxes_changed), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); checks [0] = gdk_pixbuf_new_from_xpm_data (check_empty_xpm); checks [1] = gdk_pixbuf_new_from_xpm_data (check_filled_xpm); @@ -1988,18 +1994,18 @@ setup_folder_changed_callbacks (EStorageSetView *storage_set_view, folder_changed_callback_data->storage_set_view = storage_set_view; folder_changed_callback_data->path = g_strdup (path); - gtk_signal_connect_while_alive (GTK_OBJECT (folder), "name_changed", - G_CALLBACK (folder_name_changed_cb), - folder_changed_callback_data, - GTK_OBJECT (storage_set_view)); - - e_gtk_signal_connect_full_while_alive (GTK_OBJECT (folder), "changed", - G_CALLBACK (folder_changed_cb), - NULL, - folder_changed_callback_data, - folder_changed_callback_data_destroy_notify, - FALSE, FALSE, - GTK_OBJECT (storage_set_view)); + e_signal_connect_while_alive (folder, "name_changed", + G_CALLBACK (folder_name_changed_cb), + folder_changed_callback_data, + storage_set_view); + + e_signal_connect_full_while_alive (folder, "changed", + G_CALLBACK (folder_changed_cb), + NULL, + folder_changed_callback_data, + folder_changed_callback_data_destroy_notify, + FALSE, FALSE, + storage_set_view); } diff --git a/shell/e-storage-set.c b/shell/e-storage-set.c index ab2f32ba0c..ffc8755bf5 100644 --- a/shell/e-storage-set.c +++ b/shell/e-storage-set.c @@ -387,62 +387,69 @@ class_init (EStorageSetClass *klass) object_class->finalize = impl_finalize; signals[NEW_STORAGE] = - gtk_signal_new ("new_storage", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageSetClass, new_storage), - e_shell_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); + g_signal_new ("new_storage", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageSetClass, new_storage), + NULL, NULL, + e_shell_marshal_NONE__POINTER, + G_TYPE_NONE, 1, + G_TYPE_POINTER); signals[REMOVED_STORAGE] = - gtk_signal_new ("removed_storage", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageSetClass, removed_storage), - e_shell_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); + g_signal_new ("removed_storage", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageSetClass, removed_storage), + NULL, NULL, + e_shell_marshal_NONE__POINTER, + G_TYPE_NONE, 1, + G_TYPE_POINTER); signals[NEW_FOLDER] = - gtk_signal_new ("new_folder", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageSetClass, new_folder), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + g_signal_new ("new_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageSetClass, new_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); signals[UPDATED_FOLDER] = - gtk_signal_new ("updated_folder", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageSetClass, updated_folder), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + g_signal_new ("updated_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageSetClass, updated_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); signals[REMOVED_FOLDER] = - gtk_signal_new ("removed_folder", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageSetClass, removed_folder), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + g_signal_new ("removed_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageSetClass, removed_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); signals[MOVED_FOLDER] = - gtk_signal_new ("moved_folder", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageSetClass, moved_folder), - e_shell_marshal_NONE__STRING_STRING, - GTK_TYPE_NONE, 2, - GTK_TYPE_STRING, - GTK_TYPE_STRING); + g_signal_new ("moved_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageSetClass, moved_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING_STRING, + G_TYPE_NONE, 2, + G_TYPE_STRING, + G_TYPE_STRING); signals[CLOSE_FOLDER] = - gtk_signal_new ("close_folder", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageSetClass, close_folder), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + g_signal_new ("close_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageSetClass, close_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); } static void diff --git a/shell/e-storage.c b/shell/e-storage.c index 64fbbb332a..d311135fe1 100644 --- a/shell/e-storage.c +++ b/shell/e-storage.c @@ -285,37 +285,41 @@ class_init (EStorageClass *class) class->async_remove_shared_folder = impl_async_remove_shared_folder; signals[NEW_FOLDER] = - gtk_signal_new ("new_folder", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageClass, new_folder), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + g_signal_new ("new_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageClass, new_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); signals[UPDATED_FOLDER] = - gtk_signal_new ("updated_folder", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageClass, updated_folder), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + g_signal_new ("updated_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageClass, updated_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); signals[REMOVED_FOLDER] = - gtk_signal_new ("removed_folder", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageClass, removed_folder), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + g_signal_new ("removed_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageClass, removed_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); signals[CLOSE_FOLDER] = - gtk_signal_new ("close_folder", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EStorageClass, close_folder), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + g_signal_new ("close_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EStorageClass, close_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); } static void diff --git a/shell/e-task-widget.c b/shell/e-task-widget.c index 41a59f40d6..c6cd524c2f 100644 --- a/shell/e-task-widget.c +++ b/shell/e-task-widget.c @@ -29,7 +29,7 @@ #include <gtk/gtkframe.h> #include <gtk/gtkhbox.h> #include <gtk/gtklabel.h> -#include <gtk/gtkpixmap.h> +#include <gtk/gtkimage.h> #include <gtk/gtktooltips.h> #include <libgnome/gnome-i18n.h> @@ -49,7 +49,7 @@ struct _ETaskWidgetPrivate { GdkPixbuf *icon_pixbuf; GtkWidget *label; - GtkWidget *pixmap; + GtkWidget *image; }; @@ -114,7 +114,7 @@ init (ETaskWidget *task_widget) priv->tooltips = NULL; priv->icon_pixbuf = NULL; priv->label = NULL; - priv->pixmap = NULL; + priv->image = NULL; task_widget->priv = priv; } @@ -157,9 +157,9 @@ e_task_widget_construct (ETaskWidget *task_widget, gdk_pixbuf_render_pixmap_and_mask (icon_pixbuf, &pixmap, &mask, 128); - priv->pixmap = gtk_pixmap_new (pixmap, mask); - gtk_widget_show (priv->pixmap); - gtk_box_pack_start (GTK_BOX (box), priv->pixmap, FALSE, TRUE, 0); + priv->image = gtk_image_new_from_pixmap (pixmap, mask); + gtk_widget_show (priv->image); + gtk_box_pack_start (GTK_BOX (box), priv->image, FALSE, TRUE, 0); priv->label = gtk_label_new (""); gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.5); diff --git a/shell/evolution-activity-client.c b/shell/evolution-activity-client.c index 7959458096..1447f46bc5 100644 --- a/shell/evolution-activity-client.c +++ b/shell/evolution-activity-client.c @@ -227,20 +227,22 @@ class_init (EvolutionActivityClientClass *klass) object_class->finalize = impl_finalize; signals[SHOW_DETAILS] - = gtk_signal_new ("show_details", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionActivityClientClass, show_details), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + = g_signal_new ("show_details", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionActivityClientClass, show_details), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); signals[CANCEL] - = gtk_signal_new ("cancel", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionActivityClientClass, cancel), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + = g_signal_new ("cancel", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionActivityClientClass, cancel), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); } diff --git a/shell/evolution-config-control.c b/shell/evolution-config-control.c index d5b9338678..597a826551 100644 --- a/shell/evolution-config-control.c +++ b/shell/evolution-config-control.c @@ -154,13 +154,15 @@ class_init (EvolutionConfigControlClass *class) epv->_get_control = impl__get_control; epv->_get_eventSource = impl__get_eventSource; - signals[APPLY] = gtk_signal_new ("apply", GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionConfigControlClass, apply), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - parent_class = g_type_class_ref(PARENT_TYPE); + signals[APPLY] = g_signal_new ("apply", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionConfigControlClass, apply), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); + + parent_class = g_type_class_ref (PARENT_TYPE); } static void @@ -236,4 +238,4 @@ evolution_config_control_changed (EvolutionConfigControl *config_control) E_MAKE_X_TYPE (evolution_config_control, "EvolutionConfigControl", EvolutionConfigControl, class_init, init, PARENT_TYPE, POA_GNOME_Evolution_ConfigControl__init, - GTK_STRUCT_OFFSET (EvolutionConfigControlClass, epv)) + G_STRUCT_OFFSET (EvolutionConfigControlClass, epv)) diff --git a/shell/evolution-folder-selector-button.c b/shell/evolution-folder-selector-button.c index 515d191948..ac6a26fb72 100644 --- a/shell/evolution-folder-selector-button.c +++ b/shell/evolution-folder-selector-button.c @@ -27,7 +27,6 @@ #include "e-shell-marshal.h" #include <gal/util/e-util.h> -#include <gal/widgets/e-unicode.h> #include <gtk/gtkhbox.h> #include <gtk/gtkimage.h> @@ -83,10 +82,10 @@ static void set_folder (EvolutionFolderSelectorButton *folder_selector_button, GNOME_Evolution_Folder *folder) { - GtkWidget *w = GTK_WIDGET (folder_selector_button); EvolutionFolderSelectorButtonPrivate *priv; GdkPixbuf *pixbuf; - char *folder_lname, *storage_lname, *label_text; + char *storage_lname; + char *label_text; const char *p; priv = folder_selector_button->priv; @@ -107,7 +106,6 @@ set_folder (EvolutionFolderSelectorButton *folder_selector_button, gtk_image_set_from_pixbuf (GTK_IMAGE (priv->icon), pixbuf); g_object_unref (pixbuf); - folder_lname = e_utf8_to_gtk_string (w, folder->displayName); storage_lname = NULL; p = strchr (folder->evolutionUri, '/'); if (p) { @@ -119,22 +117,22 @@ set_folder (EvolutionFolderSelectorButton *folder_selector_button, storage_uri = g_strndup (folder->evolutionUri, p - folder->evolutionUri); storage_folder = get_folder_for_uri (folder_selector_button, storage_uri); - storage_lname = e_utf8_to_gtk_string (w, storage_folder->displayName); + storage_lname = g_strdup (storage_folder->displayName); CORBA_free (storage_folder); g_free (storage_uri); } } if (storage_lname) { - label_text = g_strdup_printf (_("\"%s\" in \"%s\""), folder_lname, + label_text = g_strdup_printf (_("\"%s\" in \"%s\""), folder->displayName, storage_lname); g_free (storage_lname); } else - label_text = g_strdup_printf ("\"%s\"", folder_lname); + label_text = g_strdup_printf ("\"%s\"", folder->displayName); gtk_label_set_text (GTK_LABEL (priv->label), label_text); g_free (label_text); - g_free (folder_lname); + g_free (storage_lname); } static void @@ -255,25 +253,28 @@ class_init (EvolutionFolderSelectorButtonClass *klass) object_class->dispose = impl_dispose; object_class->finalize = impl_finalize; - signals[POPPED_UP] = gtk_signal_new ("popped_up", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionFolderSelectorButtonClass, popped_up), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - signals[SELECTED] = gtk_signal_new ("selected", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionFolderSelectorButtonClass, selected), - e_shell_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); - signals[CANCELED] = gtk_signal_new ("canceled", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionFolderSelectorButtonClass, canceled), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + signals[POPPED_UP] = g_signal_new ("popped_up", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionFolderSelectorButtonClass, popped_up), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); + signals[SELECTED] = g_signal_new ("selected", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionFolderSelectorButtonClass, selected), + NULL, NULL, + e_shell_marshal_NONE__POINTER, + G_TYPE_NONE, 1, + G_TYPE_POINTER); + signals[CANCELED] = g_signal_new ("canceled", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionFolderSelectorButtonClass, canceled), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); } static void diff --git a/shell/evolution-session.c b/shell/evolution-session.c index a53b2c3629..3c06bd2104 100644 --- a/shell/evolution-session.c +++ b/shell/evolution-session.c @@ -124,21 +124,23 @@ class_init (EvolutionSessionClass *klass) object_class->finalize = impl_finalize; signals[LOAD_CONFIGURATION] - = gtk_signal_new ("load_configuration", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionSessionClass, load_configuration), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + = g_signal_new ("load_configuration", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionSessionClass, load_configuration), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); signals[SAVE_CONFIGURATION] - = gtk_signal_new ("save_configuration", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionSessionClass, save_configuration), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + = g_signal_new ("save_configuration", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionSessionClass, save_configuration), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); corba_class_init (klass); } @@ -164,4 +166,4 @@ evolution_session_new (void) E_MAKE_X_TYPE (evolution_session, "EvolutionSession", EvolutionSession, class_init, init, PARENT_TYPE, POA_GNOME_Evolution_Session__init, - GTK_STRUCT_OFFSET (EvolutionSessionClass, epv)) + G_STRUCT_OFFSET (EvolutionSessionClass, epv)) diff --git a/shell/evolution-shell-component-dnd.c b/shell/evolution-shell-component-dnd.c index 7a2ab7c0ff..e583265b40 100644 --- a/shell/evolution-shell-component-dnd.c +++ b/shell/evolution-shell-component-dnd.c @@ -156,7 +156,7 @@ E_MAKE_X_TYPE (evolution_shell_component_dnd_source_folder, evolution_shell_component_dnd_source_folder_init, PARENT_TYPE, POA_GNOME_Evolution_ShellComponentDnd_SourceFolder__init, - GTK_STRUCT_OFFSET (EvolutionShellComponentDndSourceFolderClass, epv)) + G_STRUCT_OFFSET (EvolutionShellComponentDndSourceFolderClass, epv)) EvolutionShellComponentDndSourceFolder* evolution_shell_component_dnd_source_folder_new (DndSourceFolderBeginDragFn begin_drag, @@ -280,7 +280,7 @@ E_MAKE_X_TYPE (evolution_shell_component_dnd_destination_folder, evolution_shell_component_dnd_destination_folder_init, PARENT_TYPE, POA_GNOME_Evolution_ShellComponentDnd_DestinationFolder__init, - GTK_STRUCT_OFFSET (EvolutionShellComponentDndDestinationFolderClass, epv)) + G_STRUCT_OFFSET (EvolutionShellComponentDndDestinationFolderClass, epv)) EvolutionShellComponentDndDestinationFolder * evolution_shell_component_dnd_destination_folder_new (DndDestinationFolderHandleMotionFn handle_motion, diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c index bf98d743cf..ea28fa8cf4 100644 --- a/shell/evolution-shell-component.c +++ b/shell/evolution-shell-component.c @@ -1197,4 +1197,4 @@ evolution_shell_component_result_to_string (EvolutionShellComponentResult result E_MAKE_X_TYPE (evolution_shell_component, "EvolutionShellComponent", EvolutionShellComponent, class_init, init, PARENT_TYPE, POA_GNOME_Evolution_ShellComponent__init, - GTK_STRUCT_OFFSET (EvolutionShellComponentClass, epv)) + G_STRUCT_OFFSET (EvolutionShellComponentClass, epv)) diff --git a/shell/evolution-shell-view.c b/shell/evolution-shell-view.c index c7e8425630..2735772fea 100644 --- a/shell/evolution-shell-view.c +++ b/shell/evolution-shell-view.c @@ -164,57 +164,63 @@ class_init (EvolutionShellViewClass *klass) epv->showSettings = impl_ShellView_show_settings; signals[SET_MESSAGE] - = gtk_signal_new ("set_message", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionShellViewClass, set_message), - e_shell_marshal_NONE__STRING_INT, - GTK_TYPE_NONE, 2, - GTK_TYPE_STRING, - GTK_TYPE_BOOL); + = g_signal_new ("set_message", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionShellViewClass, set_message), + NULL, NULL, + e_shell_marshal_NONE__STRING_INT, + G_TYPE_NONE, 2, + G_TYPE_STRING, + G_TYPE_BOOLEAN); signals[UNSET_MESSAGE] - = gtk_signal_new ("unset_message", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), + = g_signal_new ("unset_message", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (EvolutionShellViewClass, unset_message), + NULL, NULL, e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + G_TYPE_NONE, 0); signals[CHANGE_VIEW] - = gtk_signal_new ("change_current_view", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), + = g_signal_new ("change_current_view", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (EvolutionShellViewClass, change_current_view), + NULL, NULL, e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + G_TYPE_NONE, 1, + G_TYPE_STRING); signals[SET_TITLE] - = gtk_signal_new ("set_title", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), + = g_signal_new ("set_title", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (EvolutionShellViewClass, set_title), + NULL, NULL, e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + G_TYPE_NONE, 1, + G_TYPE_STRING); signals[SET_FOLDER_BAR_LABEL] - = gtk_signal_new ("set_folder_bar_label", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), + = g_signal_new ("set_folder_bar_label", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (EvolutionShellViewClass, set_folder_bar_label), + NULL, NULL, e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); + G_TYPE_NONE, 1, + G_TYPE_STRING); signals[SHOW_SETTINGS] - = gtk_signal_new ("show_settings", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), + = g_signal_new ("show_settings", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (EvolutionShellViewClass, show_settings), + NULL, NULL, e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + G_TYPE_NONE, 0); parent_class = g_type_class_ref(bonobo_x_object_get_type ()); } @@ -249,4 +255,4 @@ evolution_shell_view_new (void) E_MAKE_X_TYPE (evolution_shell_view, "EvolutionShellView", EvolutionShellView, class_init, init, PARENT_TYPE, POA_GNOME_Evolution_ShellView__init, - GTK_STRUCT_OFFSET (EvolutionShellViewClass, epv)) + G_STRUCT_OFFSET (EvolutionShellViewClass, epv)) diff --git a/shell/evolution-storage-listener.c b/shell/evolution-storage-listener.c index 59bbc62391..3961014846 100644 --- a/shell/evolution-storage-listener.c +++ b/shell/evolution-storage-listener.c @@ -256,47 +256,57 @@ class_init (EvolutionStorageListenerClass *klass) object_class = G_OBJECT_CLASS (klass); object_class->finalize = impl_finalize; - signals[DESTROYED] = gtk_signal_new ("destroyed", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageListenerClass, destroyed), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - signals[NEW_FOLDER] = gtk_signal_new ("new_folder", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageListenerClass, new_folder), - e_shell_marshal_NONE__STRING_POINTER, - GTK_TYPE_NONE, 2, - GTK_TYPE_STRING, - GTK_TYPE_POINTER); - - signals[UPDATE_FOLDER] = gtk_signal_new ("update_folder", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageListenerClass, update_folder), - e_shell_marshal_NONE__STRING_INT, - GTK_TYPE_NONE, 2, - GTK_TYPE_STRING, - GTK_TYPE_INT); - - signals[REMOVED_FOLDER] = gtk_signal_new ("removed_folder", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageListenerClass, removed_folder), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); - - signals[HAS_SUBFOLDERS] = gtk_signal_new ("has_subfolders", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageListenerClass, has_subfolders), - e_shell_marshal_NONE__STRING_STRING, - GTK_TYPE_NONE, 2, - GTK_TYPE_STRING, - GTK_TYPE_STRING); + signals[DESTROYED] + = g_signal_new ("destroyed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionStorageListenerClass, destroyed), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); + + signals[NEW_FOLDER] + = g_signal_new ("new_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionStorageListenerClass, new_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING_POINTER, + G_TYPE_NONE, 2, + G_TYPE_STRING, + G_TYPE_POINTER); + + signals[UPDATE_FOLDER] + = g_signal_new ("update_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionStorageListenerClass, update_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING_INT, + G_TYPE_NONE, 2, + G_TYPE_STRING, + G_TYPE_INT); + + signals[REMOVED_FOLDER] + = g_signal_new ("removed_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionStorageListenerClass, removed_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); + + signals[HAS_SUBFOLDERS] + = g_signal_new ("has_subfolders", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionStorageListenerClass, has_subfolders), + NULL, NULL, + e_shell_marshal_NONE__STRING_STRING, + G_TYPE_NONE, 2, + G_TYPE_STRING, + G_TYPE_STRING); corba_class_init (); } diff --git a/shell/evolution-storage-set-view-listener.c b/shell/evolution-storage-set-view-listener.c index b34ccf317a..3e78b97caa 100644 --- a/shell/evolution-storage-set-view-listener.c +++ b/shell/evolution-storage-set-view-listener.c @@ -200,19 +200,23 @@ class_init (EvolutionStorageSetViewListenerClass *klass) parent_class = g_type_class_ref(gtk_object_get_type ()); - signals[FOLDER_SELECTED] = gtk_signal_new ("folder_selected", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageSetViewListenerClass, folder_selected), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); - signals[FOLDER_TOGGLED] = gtk_signal_new ("folder_toggled", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageSetViewListenerClass, folder_toggled), - e_shell_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + signals[FOLDER_SELECTED] + = g_signal_new ("folder_selected", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionStorageSetViewListenerClass, folder_selected), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); + signals[FOLDER_TOGGLED] + = g_signal_new ("folder_toggled", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionStorageSetViewListenerClass, folder_toggled), + NULL, NULL, + e_shell_marshal_NONE__NONE, + G_TYPE_NONE, 0); corba_class_init (); } diff --git a/shell/evolution-storage-set-view.c b/shell/evolution-storage-set-view.c index 7234c33ffe..ddeb5a635f 100644 --- a/shell/evolution-storage-set-view.c +++ b/shell/evolution-storage-set-view.c @@ -478,4 +478,4 @@ evolution_storage_set_view_new (EStorageSetView *storage_set_view_widget) E_MAKE_X_TYPE (evolution_storage_set_view, "EvolutionStorageSetView", EvolutionStorageSetView, class_init, init, PARENT_TYPE, POA_GNOME_Evolution_StorageSetView__init, - GTK_STRUCT_OFFSET (EvolutionStorageSetViewClass, epv)) + G_STRUCT_OFFSET (EvolutionStorageSetViewClass, epv)) diff --git a/shell/evolution-storage.c b/shell/evolution-storage.c index cf88c924d2..817bed5045 100644 --- a/shell/evolution-storage.c +++ b/shell/evolution-storage.c @@ -706,102 +706,111 @@ class_init (EvolutionStorageClass *klass) parent_class = g_type_class_ref(PARENT_TYPE); - signals[CREATE_FOLDER] = gtk_signal_new ("create_folder", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageClass, - create_folder), - e_shell_marshal_NONE__POINTER_STRING_STRING_STRING_STRING, - GTK_TYPE_NONE, 5, - GTK_TYPE_POINTER, - GTK_TYPE_STRING, - GTK_TYPE_STRING, - GTK_TYPE_STRING, - GTK_TYPE_STRING); - - signals[REMOVE_FOLDER] = gtk_signal_new ("remove_folder", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageClass, - remove_folder), - e_shell_marshal_NONE__POINTER_STRING_STRING, - GTK_TYPE_NONE, 3, - GTK_TYPE_POINTER, - GTK_TYPE_STRING, - GTK_TYPE_STRING); - - signals[XFER_FOLDER] = gtk_signal_new ("xfer_folder", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageClass, - xfer_folder), - e_shell_marshal_NONE__POINTER_STRING_STRING_BOOL, - GTK_TYPE_NONE, 4, - GTK_TYPE_POINTER, - GTK_TYPE_STRING, - GTK_TYPE_STRING, - GTK_TYPE_BOOL); + signals[CREATE_FOLDER] + = g_signal_new ("create_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EvolutionStorageClass, create_folder), + NULL, NULL, + e_shell_marshal_NONE__POINTER_STRING_STRING_STRING_STRING, + G_TYPE_NONE, 5, + G_TYPE_POINTER, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_STRING); + + signals[REMOVE_FOLDER] + = g_signal_new ("remove_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EvolutionStorageClass, remove_folder), + NULL, NULL, + e_shell_marshal_NONE__POINTER_STRING_STRING, + G_TYPE_NONE, 3, + G_TYPE_POINTER, + G_TYPE_STRING, + G_TYPE_STRING); + + signals[XFER_FOLDER] + = g_signal_new ("xfer_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EvolutionStorageClass, xfer_folder), + NULL, NULL, + e_shell_marshal_NONE__POINTER_STRING_STRING_BOOL, + G_TYPE_NONE, 4, + G_TYPE_POINTER, + G_TYPE_STRING, + G_TYPE_STRING, + G_TYPE_BOOLEAN); - signals[UPDATE_FOLDER] = gtk_signal_new ("update_folder", - GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageClass, - update_folder), - e_shell_marshal_NONE__STRING_INT, - GTK_TYPE_NONE, 2, - GTK_TYPE_STRING, - GTK_TYPE_INT); - - signals[OPEN_FOLDER] = gtk_signal_new ("open_folder", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageClass, - open_folder), - e_shell_marshal_NONE__STRING, - GTK_TYPE_NONE, 1, - GTK_TYPE_STRING); - - signals[DISCOVER_SHARED_FOLDER] = gtk_signal_new ("discover_shared_folder", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageClass, - discover_shared_folder), - e_shell_marshal_NONE__POINTER_STRING_STRING, - GTK_TYPE_NONE, 3, - GTK_TYPE_POINTER, - GTK_TYPE_STRING, - GTK_TYPE_STRING); - - signals[CANCEL_DISCOVER_SHARED_FOLDER] = gtk_signal_new ("cancel_discover_shared_folder", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageClass, - cancel_discover_shared_folder), - e_shell_marshal_NONE__STRING_STRING, - GTK_TYPE_NONE, 2, - GTK_TYPE_STRING, - GTK_TYPE_STRING); - - signals[REMOVE_SHARED_FOLDER] = gtk_signal_new ("remove_shared_folder", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageClass, - remove_shared_folder), - e_shell_marshal_NONE__STRING_POINTER, - GTK_TYPE_NONE, 2, - GTK_TYPE_STRING, - GTK_TYPE_POINTER); - - signals[SHOW_FOLDER_PROPERTIES] = gtk_signal_new ("show_folder_properties", - GTK_RUN_LAST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionStorageClass, - show_folder_properties), - e_shell_marshal_NONE__STRING_INT_INT, - GTK_TYPE_NONE, 3, - GTK_TYPE_STRING, - GTK_TYPE_INT, - GTK_TYPE_INT); + signals[UPDATE_FOLDER] + = g_signal_new ("update_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionStorageClass, update_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING_INT, + G_TYPE_NONE, 2, + G_TYPE_STRING, + G_TYPE_INT); + + signals[OPEN_FOLDER] + = g_signal_new ("open_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EvolutionStorageClass, open_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING, + G_TYPE_NONE, 1, + G_TYPE_STRING); + + signals[DISCOVER_SHARED_FOLDER] + = g_signal_new ("discover_shared_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EvolutionStorageClass, discover_shared_folder), + NULL, NULL, + e_shell_marshal_NONE__POINTER_STRING_STRING, + G_TYPE_NONE, 3, + G_TYPE_POINTER, + G_TYPE_STRING, + G_TYPE_STRING); + + signals[CANCEL_DISCOVER_SHARED_FOLDER] + = g_signal_new ("cancel_discover_shared_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EvolutionStorageClass, cancel_discover_shared_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING_STRING, + G_TYPE_NONE, 2, + G_TYPE_STRING, + G_TYPE_STRING); + + signals[REMOVE_SHARED_FOLDER] + = g_signal_new ("remove_shared_folder", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EvolutionStorageClass, remove_shared_folder), + NULL, NULL, + e_shell_marshal_NONE__STRING_POINTER, + G_TYPE_NONE, 2, + G_TYPE_STRING, + G_TYPE_POINTER); + + signals[SHOW_FOLDER_PROPERTIES] + = g_signal_new ("show_folder_properties", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EvolutionStorageClass, show_folder_properties), + NULL, NULL, + e_shell_marshal_NONE__STRING_INT_INT, + G_TYPE_NONE, 3, + G_TYPE_STRING, + G_TYPE_INT, + G_TYPE_INT); } static void diff --git a/shell/evolution-test-component.c b/shell/evolution-test-component.c index 39cfb11ceb..adce60c76c 100644 --- a/shell/evolution-test-component.c +++ b/shell/evolution-test-component.c @@ -253,7 +253,6 @@ create_new_folder_selector (EvolutionShellComponent *shell_component) GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); gtk_window_set_default_size (GTK_WINDOW (dialog), 200, 400); - gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, FALSE); gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), control_widget); diff --git a/shell/evolution-wizard.c b/shell/evolution-wizard.c index 673a7ad06b..ed036a9ab5 100644 --- a/shell/evolution-wizard.c +++ b/shell/evolution-wizard.c @@ -190,42 +190,60 @@ evolution_wizard_class_init (EvolutionWizardClass *klass) object_class->dispose = impl_dispose; object_class->finalize = impl_finalize; - signals[NEXT] = gtk_signal_new ("next", GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionWizardClass, next), - e_shell_marshal_NONE__INT, - GTK_TYPE_NONE, 1, - GTK_TYPE_INT); - signals[PREPARE] = gtk_signal_new ("prepare", GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionWizardClass, prepare), - e_shell_marshal_NONE__INT, - GTK_TYPE_NONE, 1, - GTK_TYPE_INT); - signals[BACK] = gtk_signal_new ("back", GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionWizardClass, back), - e_shell_marshal_NONE__INT, - GTK_TYPE_NONE, 1, - GTK_TYPE_INT); - signals[FINISH] = gtk_signal_new ("finish", GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionWizardClass, finish), - e_shell_marshal_NONE__INT, - GTK_TYPE_NONE, 1, - GTK_TYPE_INT); - signals[CANCEL] = gtk_signal_new ("cancel", GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionWizardClass, cancel), - e_shell_marshal_NONE__INT, - GTK_TYPE_NONE, 1, - GTK_TYPE_INT); - signals[HELP] = gtk_signal_new ("help", GTK_RUN_FIRST, - GTK_CLASS_TYPE (object_class), - G_STRUCT_OFFSET (EvolutionWizardClass, help), - e_shell_marshal_NONE__INT, - GTK_TYPE_NONE, 1, - GTK_TYPE_INT); + signals[NEXT] + = g_signal_new ("next", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionWizardClass, next), + NULL, NULL, + e_shell_marshal_NONE__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); + signals[PREPARE] + = g_signal_new ("prepare", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionWizardClass, prepare), + NULL, NULL, + e_shell_marshal_NONE__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); + signals[BACK] + = g_signal_new ("back", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionWizardClass, back), + NULL, NULL, + e_shell_marshal_NONE__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); + signals[FINISH] + = g_signal_new ("finish", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionWizardClass, finish), + NULL, NULL, + e_shell_marshal_NONE__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); + signals[CANCEL] + = g_signal_new ("cancel", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionWizardClass, cancel), + NULL, NULL, + e_shell_marshal_NONE__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); + signals[HELP] + = g_signal_new ("help", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_FIRST, + G_STRUCT_OFFSET (EvolutionWizardClass, help), + NULL, NULL, + e_shell_marshal_NONE__INT, + G_TYPE_NONE, 1, + G_TYPE_INT); parent_class = g_type_class_ref(PARENT_TYPE); diff --git a/shell/main.c b/shell/main.c index 64febd4fcd..47bf354a51 100644 --- a/shell/main.c +++ b/shell/main.c @@ -92,7 +92,7 @@ quit_box_new (void) GtkWidget *frame; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_policy (GTK_WINDOW (window), FALSE, FALSE, FALSE); + gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER); /* (Just to prevent smart-ass window managers like Sawfish from setting @@ -258,9 +258,7 @@ static void view_map_callback (GtkWidget *widget, void *data) { - gtk_signal_disconnect_by_func (GTK_OBJECT (widget), - G_CALLBACK (view_map_callback), - data); + g_signal_handlers_disconnect_by_func (widget, G_CALLBACK (view_map_callback), data); show_development_warning (GTK_WINDOW (widget)); } @@ -270,9 +268,7 @@ new_view_created_callback (EShell *shell, EShellView *view, void *data) { - gtk_signal_disconnect_by_func (GTK_OBJECT (shell), - G_CALLBACK (new_view_created_callback), - data); + g_signal_handlers_disconnect_by_func (shell, G_CALLBACK (new_view_created_callback), data); g_signal_connect (view, "map", G_CALLBACK (view_map_callback), NULL); } @@ -514,9 +510,6 @@ main (int argc, char **argv) gtk_idle_add (idle_cb, uri_list); - gtk_widget_push_visual (gdk_rgb_get_visual ()); - gtk_widget_push_colormap (gdk_rgb_get_cmap ()); - bonobo_main (); return 0; |