aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-11-04 15:12:04 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-11-04 15:12:04 +0800
commit317b30ce9e92f0e9c18e4905cd6b8ae1e28b3602 (patch)
tree20f75b51acbd4dac7fa844ff2c756603d5b2ff53 /shell
parente692a531d5e6e5778f110264c98bbbc3b11f08d0 (diff)
downloadgsoc2013-evolution-317b30ce9e92f0e9c18e4905cd6b8ae1e28b3602.tar
gsoc2013-evolution-317b30ce9e92f0e9c18e4905cd6b8ae1e28b3602.tar.gz
gsoc2013-evolution-317b30ce9e92f0e9c18e4905cd6b8ae1e28b3602.tar.bz2
gsoc2013-evolution-317b30ce9e92f0e9c18e4905cd6b8ae1e28b3602.tar.lz
gsoc2013-evolution-317b30ce9e92f0e9c18e4905cd6b8ae1e28b3602.tar.xz
gsoc2013-evolution-317b30ce9e92f0e9c18e4905cd6b8ae1e28b3602.tar.zst
gsoc2013-evolution-317b30ce9e92f0e9c18e4905cd6b8ae1e28b3602.zip
Use g_object_set_data() instead of gtk_object_set_data(). Likewise.
* e-folder-list.c: Use g_object_set_data() instead of gtk_object_set_data(). * e-shell-config-default-folders.c: Likewise. * e-shell-folder-creation-dialog.c: Likewise. * e-shell-importer.c: Likewise. * e-shell-shared-folder-picker-dialog.c: Likewise. * e-shell-user-creatable-items-handler.c: Likewise. * e-shell-view.c: Likewise. * e-shell.c: Likewise. * e-storage-set-view.c: Likewise. * e-storage.c: Likewise. * evolution-test-component.c: Likewise. * e-storage-set-view.c (e_storage_set_view_construct): Use g_object_weakref() instead of gtk_object_weakref() for the ui_container. (ui_container_destroy_notify): Add param where_the_object_was to match the GWeakNotify prototype. * e-shell.c: Use g_signal_emit() instead of gtk_signal_emit(). svn path=/trunk/; revision=18523
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog23
-rw-r--r--shell/e-folder-list.c3
-rw-r--r--shell/e-shell-config-default-folders.c4
-rw-r--r--shell/e-shell-folder-creation-dialog.c2
-rw-r--r--shell/e-shell-importer.c6
-rw-r--r--shell/e-shell-shared-folder-picker-dialog.c3
-rw-r--r--shell/e-shell-user-creatable-items-handler.c6
-rw-r--r--shell/e-shell-view.c6
-rw-r--r--shell/e-shell.c14
-rw-r--r--shell/e-storage-set-view.c9
-rw-r--r--shell/e-storage.c3
-rw-r--r--shell/evolution-test-component.c16
12 files changed, 56 insertions, 39 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 32c996426e..7a14605c0e 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,26 @@
+2002-11-04 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-folder-list.c: Use g_object_set_data() instead of
+ gtk_object_set_data().
+ * e-shell-config-default-folders.c: Likewise.
+ * e-shell-folder-creation-dialog.c: Likewise.
+ * e-shell-importer.c: Likewise.
+ * e-shell-shared-folder-picker-dialog.c: Likewise.
+ * e-shell-user-creatable-items-handler.c: Likewise.
+ * e-shell-view.c: Likewise.
+ * e-shell.c: Likewise.
+ * e-storage-set-view.c: Likewise.
+ * e-storage.c: Likewise.
+ * evolution-test-component.c: Likewise.
+
+ * e-storage-set-view.c (e_storage_set_view_construct): Use
+ g_object_weakref() instead of gtk_object_weakref() for the
+ ui_container.
+ (ui_container_destroy_notify): Add param where_the_object_was to
+ match the GWeakNotify prototype.
+
+ * e-shell.c: Use g_signal_emit() instead of gtk_signal_emit().
+
2002-11-03 Ettore Perazzoli <ettore@ximian.com>
* glade/e-active-connection-dialog.glade: Converted to Glade2
diff --git a/shell/e-folder-list.c b/shell/e-folder-list.c
index 1c318bad5b..e604c9c428 100644
--- a/shell/e-folder-list.c
+++ b/shell/e-folder-list.c
@@ -307,9 +307,10 @@ create_custom_folder_list (char *name, char *string1, char *string2, int int1, i
{
ETableModel *model;
GtkWidget *scrolled;
+
model = e_table_memory_store_new (columns);
scrolled = e_table_scrolled_new (model, NULL, SPEC, NULL);
- gtk_object_set_data (GTK_OBJECT (scrolled), "table-model", model);
+ g_object_set_data (G_OBJECT (scrolled), "table-model", model);
return scrolled;
}
diff --git a/shell/e-shell-config-default-folders.c b/shell/e-shell-config-default-folders.c
index 2f152ec9fb..853d6cfbd1 100644
--- a/shell/e-shell-config-default-folders.c
+++ b/shell/e-shell-config-default-folders.c
@@ -136,8 +136,8 @@ setup_folder_selector (EvolutionDefaultFolderConfig *dfc,
EVOLUTION_FOLDER_SELECTOR_BUTTON (button),
dfc->shell_client, _("Select Default Folder"),
*uri_ptr, types);
- gtk_object_set_data (GTK_OBJECT (button), "uri_ptr", uri_ptr);
- gtk_object_set_data (GTK_OBJECT (button), "path_ptr", path_ptr);
+ g_object_set_data (G_OBJECT (button), "uri_ptr", uri_ptr);
+ g_object_set_data (G_OBJECT (button), "path_ptr", path_ptr);
g_signal_connect (button, "selected",
G_CALLBACK (folder_selected),
dfc);
diff --git a/shell/e-shell-folder-creation-dialog.c b/shell/e-shell-folder-creation-dialog.c
index a215fd8348..907a21abc4 100644
--- a/shell/e-shell-folder-creation-dialog.c
+++ b/shell/e-shell-folder-creation-dialog.c
@@ -430,7 +430,7 @@ add_folder_types (GtkWidget *dialog,
gtk_widget_show (menu_item);
gtk_menu_append (GTK_MENU (menu), menu_item);
- gtk_object_set_data_full (GTK_OBJECT (menu_item), "folder_type", g_strdup (type->type), g_free);
+ g_object_set_data_full (G_OBJECT (menu_item), "folder_type", g_strdup (type->type), g_free);
if (strcmp (type->type, default_type ? default_type : "mail") == 0)
default_item = i;
diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c
index 31721660b0..f46a392d33 100644
--- a/shell/e-shell-importer.c
+++ b/shell/e-shell-importer.c
@@ -618,8 +618,7 @@ create_plugin_menu (ImportData *data)
menu = gtk_menu_new ();
item = gtk_menu_item_new_with_label (_("Automatic"));
- gtk_object_set_data_full (GTK_OBJECT (item), "oafiid",
- g_strdup ("Automatic"), g_free);
+ g_object_set_data_full (item, "oafiid", g_strdup ("Automatic"), g_free);
gtk_menu_append (GTK_MENU (menu), item);
CORBA_exception_init (&ev);
@@ -641,8 +640,7 @@ create_plugin_menu (ImportData *data)
g_signal_connect (item, "activate",
G_CALLBACK (item_selected), data);
- gtk_object_set_data_full (GTK_OBJECT (item), "oafiid",
- g_strdup (info->iid), g_free);
+ g_object_set_data (item, "oafiid", g_strdup (info->iid), g_free);
gtk_menu_append (GTK_MENU (menu), item);
}
CORBA_free (info_list);
diff --git a/shell/e-shell-shared-folder-picker-dialog.c b/shell/e-shell-shared-folder-picker-dialog.c
index 47677af347..816a3d7e87 100644
--- a/shell/e-shell-shared-folder-picker-dialog.c
+++ b/shell/e-shell-shared-folder-picker-dialog.c
@@ -193,8 +193,7 @@ setup_server_option_menu (EShell *shell,
g_signal_connect (menu_item, "activate",
G_CALLBACK (server_option_menu_item_activate_callback),
storage_name_return);
- gtk_object_set_data_full (GTK_OBJECT (menu_item), "storage_name",
- g_strdup (storage_name), g_free);
+ g_object_set_data_full (G_OBJECT (menu_item), "storage_name", g_strdup (storage_name), g_free);
gtk_widget_show (menu_item);
gtk_menu_append (GTK_MENU (menu), menu_item);
diff --git a/shell/e-shell-user-creatable-items-handler.c b/shell/e-shell-user-creatable-items-handler.c
index fd973d663d..d3961bb8c4 100644
--- a/shell/e-shell-user-creatable-items-handler.c
+++ b/shell/e-shell-user-creatable-items-handler.c
@@ -517,7 +517,7 @@ add_verbs (EShellUserCreatableItemsHandler *handler,
priv = handler->priv;
ui_component = e_shell_view_get_bonobo_ui_component (shell_view);
- gtk_object_set_data (GTK_OBJECT (ui_component), SHELL_VIEW_KEY, shell_view);
+ g_object_set_data (G_OBJECT (ui_component), SHELL_VIEW_KEY, shell_view);
component_num = 0;
for (p = priv->components; p != NULL; p = p->next) {
@@ -593,10 +593,10 @@ setup_toolbar_button (EShellUserCreatableItemsHandler *handler,
bonobo_ui_component_object_set (ui_component, "/Toolbar/NewComboButton",
BONOBO_OBJREF (control), NULL);
- gtk_object_set_data (GTK_OBJECT (shell_view), COMBO_BUTTON_WIDGET_KEY, combo_button);
+ g_object_set_data (G_OBJECT (shell_view), COMBO_BUTTON_WIDGET_KEY, combo_button);
tooltips = gtk_tooltips_new ();
- gtk_object_set_data (GTK_OBJECT (combo_button), TOOLTIPS_KEY, tooltips);
+ g_object_set_data (G_OBJECT (combo_button), TOOLTIPS_KEY, tooltips);
}
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 7bbbba93d4..2db76cc72c 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -2183,10 +2183,8 @@ get_view_for_uri (EShellView *shell_view,
destroy_connection_id = g_signal_connect (socket, "destroy",
G_CALLBACK (socket_destroy_cb),
shell_view);
- gtk_object_set_data (GTK_OBJECT (socket),
- "e_shell_view_destroy_connection_id",
- GINT_TO_POINTER (destroy_connection_id));
- gtk_object_set_data_full (GTK_OBJECT (socket), "e_shell_view_folder_uri", g_strdup (uri), g_free);
+ g_object_set_data (G_OBJECT (socket), "e_shell_view_destroy_connection_id", GINT_TO_POINTER (destroy_connection_id));
+ g_object_set_data_full (G_OBJECT (socket), "e_shell_view_folder_uri", g_strdup (uri), g_free);
priv->sockets = g_list_prepend (priv->sockets, socket);
diff --git a/shell/e-shell.c b/shell/e-shell.c
index fb4be8a108..252b7f3300 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -535,8 +535,8 @@ impl_Shell_selectUserFolder (PortableServer_Servant servant,
listener_duplicate = CORBA_Object_duplicate (listener, ev);
- gtk_object_set_data_full (GTK_OBJECT (folder_selection_dialog), "corba_listener",
- listener_duplicate, corba_listener_destroy_notify);
+ g_object_set_data_full (G_OBJECT (folder_selection_dialog), "corba_listener",
+ listener_duplicate, corba_listener_destroy_notify);
g_signal_connect (folder_selection_dialog, "folder_selected",
G_CALLBACK (folder_selection_dialog_folder_selected_cb), shell);
@@ -980,7 +980,7 @@ view_destroy_cb (GtkObject *object,
set_interactive (shell, FALSE);
bonobo_object_ref (BONOBO_OBJECT (shell));
- gtk_signal_emit (GTK_OBJECT (shell), signals [NO_VIEWS_LEFT]);
+ g_signal_emit (shell, signals [NO_VIEWS_LEFT], 0);
bonobo_object_unref (BONOBO_OBJECT (shell));
}
}
@@ -1016,7 +1016,7 @@ create_view (EShell *shell,
e_shell_view_show_shortcut_bar (view, e_shell_view_shortcut_bar_shown (template_view));
}
- gtk_signal_emit (GTK_OBJECT (shell), signals[NEW_VIEW_CREATED], view);
+ g_signal_emit (shell, signals[NEW_VIEW_CREATED], 0, view);
return view;
}
@@ -1881,7 +1881,7 @@ offline_procedure_started_cb (EShellOfflineHandler *offline_handler,
priv = shell->priv;
priv->line_status = E_SHELL_LINE_STATUS_GOING_OFFLINE;
- gtk_signal_emit (GTK_OBJECT (shell), signals[LINE_STATUS_CHANGED], priv->line_status);
+ g_signal_emit (shell, signals[LINE_STATUS_CHANGED], 0, priv->line_status);
}
static void
@@ -1903,7 +1903,7 @@ offline_procedure_finished_cb (EShellOfflineHandler *offline_handler,
g_object_unref (priv->offline_handler);
priv->offline_handler = NULL;
- gtk_signal_emit (GTK_OBJECT (shell), signals[LINE_STATUS_CHANGED], priv->line_status);
+ g_signal_emit (shell, signals[LINE_STATUS_CHANGED], 0, priv->line_status);
}
/**
@@ -2009,7 +2009,7 @@ e_shell_go_online (EShell *shell,
e_free_string_list (component_ids);
priv->line_status = E_SHELL_LINE_STATUS_ONLINE;
- gtk_signal_emit (GTK_OBJECT (shell), signals[LINE_STATUS_CHANGED], priv->line_status);
+ g_signal_emit (shell, signals[LINE_STATUS_CHANGED], 0, priv->line_status);
}
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 2b093e19fd..1990adda21 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -410,7 +410,8 @@ convert_gdk_drag_action_set_to_corba (GdkDragAction action)
/* The weakref callback for priv->ui_component. */
static void
-ui_container_destroy_notify (void *data)
+ui_container_destroy_notify (void *data,
+ GObject *where_the_object_was)
{
EStorageSetViewPrivate *priv = (EStorageSetViewPrivate *) data;
@@ -1434,9 +1435,7 @@ etree_value_at (ETreeModel *etree,
name_with_unread = g_strdup_printf ("%s (%d)", folder_name,
unread_count);
- gtk_object_set_data_full (GTK_OBJECT (folder),
- "name_with_unread",
- name_with_unread, g_free);
+ g_object_set_data_full (G_OBJECT (folder), "name_with_unread", name_with_unread, g_free);
return (void *) name_with_unread;
} else
@@ -2087,7 +2086,7 @@ e_storage_set_view_construct (EStorageSetView *storage_set_view,
priv->ui_container = ui_container;
if (ui_container != NULL) {
- gtk_object_weakref (GTK_OBJECT (ui_container), ui_container_destroy_notify, priv);
+ g_object_weak_ref (G_OBJECT (ui_container), ui_container_destroy_notify, priv);
priv->ui_component = bonobo_ui_component_new_default ();
bonobo_ui_component_set_container (priv->ui_component,
diff --git a/shell/e-storage.c b/shell/e-storage.c
index c9af5445b2..7f72ec665d 100644
--- a/shell/e-storage.c
+++ b/shell/e-storage.c
@@ -115,8 +115,7 @@ folder_changed_cb (EFolder *folder,
highlight = GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (folder), "last_highlight"));
if (highlight != e_folder_get_highlighted (folder)) {
highlight = !highlight;
- gtk_object_set_data (GTK_OBJECT (folder), "last_highlight",
- GINT_TO_POINTER (highlight));
+ g_object_set_data (G_OBJECT (folder), "last_highlight", GINT_TO_POINTER (highlight));
p = strrchr (path, '/');
if (p && p != path) {
char *name;
diff --git a/shell/evolution-test-component.c b/shell/evolution-test-component.c
index affaa50aff..8f1c5f0502 100644
--- a/shell/evolution-test-component.c
+++ b/shell/evolution-test-component.c
@@ -292,8 +292,8 @@ shared_folder_discovery_timeout_callback (void *data)
CORBA_exception_free (&ev);
- gtk_object_set_data (GTK_OBJECT (storage), "listener", NULL);
- gtk_object_set_data (GTK_OBJECT (storage), "timeout_id", NULL);
+ g_object_set_data (storage, "listener", NULL);
+ g_object_set_data (storage, "timeout_id", NULL);
return FALSE;
}
@@ -317,8 +317,8 @@ storage_discover_shared_folder_callback (EvolutionStorage *storage,
timeout_id = g_timeout_add (1000, shared_folder_discovery_timeout_callback, storage);
- gtk_object_set_data (GTK_OBJECT (storage), "listener", listener_copy);
- gtk_object_set_data (GTK_OBJECT (storage), "timeout_id", GINT_TO_POINTER (timeout_id));
+ g_object_set_data (storage, "listener", listener_copy);
+ g_object_set_data (storage, "timeout_id", GINT_TO_POINTER (timeout_id));
}
static void
@@ -336,7 +336,7 @@ storage_cancel_discover_shared_folder_callback (EvolutionStorage *storage,
return;
g_source_remove (timeout_id);
- gtk_object_set_data (GTK_OBJECT (storage), "timeout_id", NULL);
+ g_object_set_data (storage, "timeout_id", NULL);
listener = (Bonobo_Listener) gtk_object_get_data (GTK_OBJECT (storage), "listener");
@@ -345,7 +345,7 @@ storage_cancel_discover_shared_folder_callback (EvolutionStorage *storage,
CORBA_Object_release (listener, &ev);
CORBA_exception_free (&ev);
- gtk_object_set_data (GTK_OBJECT (storage), "listener", NULL);
+ g_object_set_data (storage, "listener", NULL);
}
static void
@@ -453,7 +453,7 @@ timeout_callback_2 (void *data)
}
progress ++;
- gtk_object_set_data (GTK_OBJECT (activity_client), "my_progress", GINT_TO_POINTER (progress));
+ g_object_set_data (activity_client, "my_progress", GINT_TO_POINTER (progress));
if (progress > 100) {
gtk_timeout_add (200, timeout_callback_3, activity_client);
@@ -489,7 +489,7 @@ timeout_callback_1 (void *data)
return FALSE;
}
- gtk_object_set_data (GTK_OBJECT (activity_client), "my_progress", GINT_TO_POINTER (-1));
+ g_object_set_data (activity_client, "my_progress", GINT_TO_POINTER (-1));
g_signal_connect (activity_client, "cancel",
G_CALLBACK (activity_client_cancel_callback), NULL);