[gyrus] Remove usage of lots of deprecated GTK+ API
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gyrus] Remove usage of lots of deprecated GTK+ API
- Date: Sun, 26 Dec 2010 15:30:10 +0000 (UTC)
commit 19eddd8f24260df45280d1c14920b72d99527462
Author: Claudio Saavedra <csaavedra igalia com>
Date: Sun Dec 26 16:30:58 2010 +0200
Remove usage of lots of deprecated GTK+ API
configure.ac | 2 +-
src/gyrus-admin.c | 16 +---------------
src/gyrus-dialog-find-mailbox.c | 10 +++++-----
src/gyrus-dialog-mailbox-new.c | 8 ++++----
src/gyrus-main-app.c | 2 +-
5 files changed, 12 insertions(+), 26 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9e37aab..d91b541 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ dnl GNOME 2 force flags
GNOME_COMPILE_WARNINGS(maximum)
-GTK_REQUIRED=2.12.0
+GTK_REQUIRED=2.18.0
GNET_REQUIRED=2.0.0
GCONF_REQUIRED=2.0.0
GTK_PRINT_REQUIRED=2.10.0
diff --git a/src/gyrus-admin.c b/src/gyrus-admin.c
index 61edc14..9a4bf2a 100644
--- a/src/gyrus-admin.c
+++ b/src/gyrus-admin.c
@@ -53,7 +53,6 @@ enum {
static gint admin_signals [SIGNAL_LAST];
static void gyrus_admin_finalize (GObject *object);
-static void gyrus_admin_destroy (GtkObject *object);
static void gyrus_admin_initialize_mailbox_tree_view (GyrusAdmin *admin,
gboolean is_orphaned);
@@ -99,7 +98,6 @@ static void
gyrus_admin_class_init (GyrusAdminClass *class)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
- GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
GType selection_changed_types [1] = {
G_TYPE_BOOLEAN
@@ -108,7 +106,6 @@ gyrus_admin_class_init (GyrusAdminClass *class)
gyrus_admin_parent_class = g_type_class_peek_parent (class);
gobject_class->finalize = gyrus_admin_finalize;
- object_class->destroy = gyrus_admin_destroy;
admin_signals [CONNECTED] =
g_signal_newv ("connected",
@@ -202,8 +199,7 @@ gyrus_admin_init_get_widgets (GyrusAdmin *admin)
priv->expander_modify_acl = GTK_WIDGET (gtk_builder_get_object (builder, "expander_modify_acl"));
table = GTK_WIDGET (gtk_builder_get_object (builder , "table_page"));
-
- gtk_box_pack_start_defaults (GTK_BOX (admin), table);
+ gtk_box_pack_start (GTK_BOX (admin), table, TRUE, TRUE, 0);
admin->priv = priv;
}
@@ -259,16 +255,6 @@ gyrus_admin_finalize (GObject *object)
G_OBJECT_CLASS (gyrus_admin_parent_class)->finalize (object);
}
-static void
-gyrus_admin_destroy (GtkObject *object)
-{
- GyrusAdmin *admin;
- g_return_if_fail (GYRUS_IS_ADMIN (object));
- admin = GYRUS_ADMIN (object);
-
- GTK_OBJECT_CLASS (gyrus_admin_parent_class)->destroy (object);
-}
-
GtkTreeModel *
gyrus_admin_mailbox_tree_model_new (void)
{
diff --git a/src/gyrus-dialog-find-mailbox.c b/src/gyrus-dialog-find-mailbox.c
index 924f89e..2683aea 100644
--- a/src/gyrus-dialog-find-mailbox.c
+++ b/src/gyrus-dialog-find-mailbox.c
@@ -223,10 +223,10 @@ gyrus_dialog_find_mailbox_init_get_widgets (GyrusDialogFindMailbox *dialog)
dialog->priv->button_find = gtk_button_new_from_stock (GTK_STOCK_FIND);
dialog->priv->button_close = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
- gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog)->action_area),
- dialog->priv->button_close);
- gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog)->action_area),
- dialog->priv->button_find);
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
+ dialog->priv->button_close, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
+ dialog->priv->button_find, TRUE, TRUE, 0);
dialog->priv->checkbutton_entire_word = GTK_WIDGET (gtk_builder_get_object (builder, "checkbutton_entire_word"));
dialog->priv->checkbutton_wrap_around = GTK_WIDGET (gtk_builder_get_object (builder, "checkbutton_wrap_around"));
@@ -295,7 +295,7 @@ gyrus_dialog_find_mailbox_init (GyrusDialogFindMailbox *dialog)
"Foo.Bar");
*/
- GTK_WIDGET_SET_FLAGS (dialog->priv->button_find, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (dialog->priv->button_find, TRUE);
gtk_widget_grab_default (dialog->priv->button_find);
gtk_widget_set_sensitive (dialog->priv->button_find, FALSE);
diff --git a/src/gyrus-dialog-mailbox-new.c b/src/gyrus-dialog-mailbox-new.c
index 0b206b9..67aeb6d 100644
--- a/src/gyrus-dialog-mailbox-new.c
+++ b/src/gyrus-dialog-mailbox-new.c
@@ -175,10 +175,10 @@ gyrus_dialog_mailbox_new_init_get_widgets (GyrusDialogMailboxNew *dialog)
dialog->priv->button_ok = gtk_button_new_from_stock (GTK_STOCK_OK);
dialog->priv->button_cancel = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
- gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog)->action_area),
- dialog->priv->button_cancel);
- gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog)->action_area),
- dialog->priv->button_ok);
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
+ dialog->priv->button_cancel, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
+ dialog->priv->button_ok, TRUE, TRUE, 0);
dialog->priv->checkbutton_quota = GTK_WIDGET (gtk_builder_get_object (builder, "checkbutton_quota"));
dialog->priv->entry_mailbox = GTK_WIDGET (gtk_builder_get_object (builder, "entry_mailbox"));
diff --git a/src/gyrus-main-app.c b/src/gyrus-main-app.c
index 7d6d873..87a5992 100644
--- a/src/gyrus-main-app.c
+++ b/src/gyrus-main-app.c
@@ -263,7 +263,7 @@ gyrus_main_app_on_button_close_page_clicked (GtkButton *button, gpointer data)
static void
gyrus_main_app_on_switch_page (GtkNotebook *notebook,
- GtkNotebookPage *page,
+ gpointer *page,
guint page_num,
gpointer user_data)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]