[evolution-exchange] Fix GSEAL compliance issues.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-exchange] Fix GSEAL compliance issues.
- Date: Thu, 8 Apr 2010 17:24:56 +0000 (UTC)
commit 5b110a864452d5a89e5d68749e22c3eb78b23cb9
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Apr 8 13:24:11 2010 -0400
Fix GSEAL compliance issues.
Also bump the GTK+ requirement to 2.18.
configure.ac | 2 +-
eplugin/exchange-account-setup.c | 2 +-
eplugin/exchange-calendar.c | 2 +-
eplugin/exchange-config-listener.c | 8 ++++----
eplugin/exchange-delegates.c | 6 +++---
eplugin/exchange-folder.c | 8 ++++++--
eplugin/exchange-permissions-dialog.c | 10 +++++-----
eplugin/exchange-user-dialog.c | 10 +++++++---
8 files changed, 28 insertions(+), 20 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 80c6f9c..ba59da7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl Required Package Versions
m4_define([glib_minimum_version], [2.16.0])
m4_define([gthread_minimum_version], [2.16.0])
-m4_define([gtk_minimum_version], [2.10.0])
+m4_define([gtk_minimum_version], [2.18.0])
m4_define([eds_minimum_version], [eex_version])
m4_define([evo_minimum_version], [eex_version])
m4_define([gconf_minimum_version], [2.0.0]) dnl XXX Just a Guess
diff --git a/eplugin/exchange-account-setup.c b/eplugin/exchange-account-setup.c
index b0cde83..5666fce 100644
--- a/eplugin/exchange-account-setup.c
+++ b/eplugin/exchange-account-setup.c
@@ -729,7 +729,7 @@ org_gnome_exchange_owa_url(EPlugin *epl, EConfigHookItemFactoryData *data)
g_free(uri);
}
- row = ((GtkTable *)data->parent)->nrows;
+ g_object_get (data->parent, "n-rows", &row, NULL);
hbox = gtk_hbox_new (FALSE, 6);
label = gtk_label_new_with_mnemonic(_("_OWA URL:"));
diff --git a/eplugin/exchange-calendar.c b/eplugin/exchange-calendar.c
index 8c09417..7a42b7b 100644
--- a/eplugin/exchange-calendar.c
+++ b/eplugin/exchange-calendar.c
@@ -185,7 +185,7 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
e_uri_free (uri);
parent = data->parent;
- row = ((GtkTable*)parent)->nrows;
+ g_object_get (parent, "n-rows", &row, NULL);
exchange_config_listener_get_offline_status (exchange_global_config_listener,
&offline_status);
diff --git a/eplugin/exchange-config-listener.c b/eplugin/exchange-config-listener.c
index 8c47afd..b2415bf 100644
--- a/eplugin/exchange-config-listener.c
+++ b/eplugin/exchange-config-listener.c
@@ -682,12 +682,12 @@ display_passwd_expiry_message (gint max_passwd_age, ExchangeAccount *account)
change_passwd_button = gtk_button_new_with_mnemonic (_("_Change Password"));
gtk_widget_show (change_passwd_button);
gtk_dialog_add_action_widget (GTK_DIALOG (passwd_exp_dialog), change_passwd_button, 0);
- GTK_WIDGET_SET_FLAGS (change_passwd_button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (change_passwd_button, TRUE);
ok_button = gtk_button_new_from_stock ("gtk-ok");
gtk_widget_show (ok_button);
gtk_dialog_add_action_widget (GTK_DIALOG (passwd_exp_dialog), ok_button, GTK_RESPONSE_OK);
- GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (ok_button, TRUE);
atko = gtk_widget_get_accessible (ok_button);
atk_object_set_name (atko, "ok_button");
@@ -764,7 +764,7 @@ run_oof_dialog (void)
button3 = gtk_button_new ();
gtk_widget_show (button3);
gtk_dialog_add_action_widget (GTK_DIALOG (oof_dialog), button3, GTK_RESPONSE_NO);
- GTK_WIDGET_SET_FLAGS (button3, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button3, TRUE);
alignment3 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment3);
@@ -785,7 +785,7 @@ run_oof_dialog (void)
button4 = gtk_button_new ();
gtk_widget_show (button4);
gtk_dialog_add_action_widget (GTK_DIALOG (oof_dialog), button4, GTK_RESPONSE_YES);
- GTK_WIDGET_SET_FLAGS (button4, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button4, TRUE);
alignment4 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment4);
diff --git a/eplugin/exchange-delegates.c b/eplugin/exchange-delegates.c
index d5e0005..847fa6b 100644
--- a/eplugin/exchange-delegates.c
+++ b/eplugin/exchange-delegates.c
@@ -960,17 +960,17 @@ exchange_delegates (ExchangeAccount *account, GtkWidget *parent)
add_button = gtk_button_new_from_stock ("gtk-add");
gtk_widget_show (add_button);
gtk_container_add (GTK_CONTAINER (vbuttonbox1), add_button);
- GTK_WIDGET_SET_FLAGS (add_button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (add_button, TRUE);
edit_button = gtk_button_new_with_mnemonic (_("_Edit"));
gtk_widget_show (edit_button);
gtk_container_add (GTK_CONTAINER (vbuttonbox1), edit_button);
- GTK_WIDGET_SET_FLAGS (edit_button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (edit_button, TRUE);
remove_button = gtk_button_new_from_stock ("gtk-remove");
gtk_widget_show (remove_button);
gtk_container_add (GTK_CONTAINER (vbuttonbox1), remove_button);
- GTK_WIDGET_SET_FLAGS (remove_button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (remove_button, TRUE);
g_signal_connect (delegates->dialog, "response",
G_CALLBACK (dialog_response), delegates);
diff --git a/eplugin/exchange-folder.c b/eplugin/exchange-folder.c
index c1729cd..9bad01b 100644
--- a/eplugin/exchange-folder.c
+++ b/eplugin/exchange-folder.c
@@ -292,6 +292,7 @@ static void
eex_addresssbook_unsubscribe (ESource *source)
{
GtkWidget *dialog = NULL;
+ GtkWidget *content_area;
ExchangeAccount *account = NULL;
gchar *title = NULL;
gchar *displayed_folder_name = NULL;
@@ -329,7 +330,8 @@ eex_addresssbook_unsubscribe (ESource *source)
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 6);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_box_set_spacing (GTK_BOX (content_area), 6);
title = g_strdup_printf (_("Unsubscribe from \"%s\""), displayed_folder_name);
gtk_window_set_title (GTK_WINDOW (dialog), title);
@@ -345,6 +347,7 @@ static void
eex_calendar_unsubscribe (ESource *source)
{
GtkWidget *dialog = NULL;
+ GtkWidget *content_area;
ExchangeAccount *account = NULL;
gchar *title = NULL;
const gchar *displayed_folder_name;
@@ -383,7 +386,8 @@ eex_calendar_unsubscribe (ESource *source)
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 6);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_box_set_spacing (GTK_BOX (content_area), 6);
title = g_strdup_printf (_("Unsubscribe from \"%s\""), displayed_folder_name);
gtk_window_set_title (GTK_WINDOW (dialog), title);
diff --git a/eplugin/exchange-permissions-dialog.c b/eplugin/exchange-permissions-dialog.c
index 2a43973..51d1398 100644
--- a/eplugin/exchange-permissions-dialog.c
+++ b/eplugin/exchange-permissions-dialog.c
@@ -748,7 +748,7 @@ create_permissions_vbox (ExchangePermissionsDialog *dialog)
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (scrolledwindow1);
gtk_box_pack_start (GTK_BOX (hbox1), scrolledwindow1, TRUE, TRUE, 0);
- GTK_WIDGET_UNSET_FLAGS (scrolledwindow1, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (scrolledwindow1, FALSE);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_SHADOW_IN);
@@ -766,12 +766,12 @@ create_permissions_vbox (ExchangePermissionsDialog *dialog)
add_button = gtk_button_new_from_stock ("gtk-add");
gtk_widget_show (add_button);
gtk_container_add (GTK_CONTAINER (vbuttonbox1), add_button);
- GTK_WIDGET_SET_FLAGS (add_button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_focus (add_button, TRUE);
remove_button = gtk_button_new_from_stock ("gtk-remove");
gtk_widget_show (remove_button);
gtk_container_add (GTK_CONTAINER (vbuttonbox1), remove_button);
- GTK_WIDGET_SET_FLAGS (remove_button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_focus (remove_button, TRUE);
table2 = gtk_table_new (3, 2, FALSE);
gtk_widget_show (table2);
@@ -818,8 +818,8 @@ create_permissions_vbox (ExchangePermissionsDialog *dialog)
role_optionmenu = exchange_permissions_role_optionmenu_new ();
gtk_widget_show (role_optionmenu);
gtk_box_pack_start (GTK_BOX (hbox3), role_optionmenu, TRUE, TRUE, 0);
- GTK_WIDGET_UNSET_FLAGS (role_optionmenu, GTK_CAN_FOCUS);
- GTK_WIDGET_UNSET_FLAGS (role_optionmenu, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_focus (role_optionmenu, FALSE);
+ gtk_widget_set_can_default (role_optionmenu, FALSE);
hbox2 = gtk_hbox_new (TRUE, 6);
gtk_widget_show (hbox2);
diff --git a/eplugin/exchange-user-dialog.c b/eplugin/exchange-user-dialog.c
index 908ffd3..817ab3c 100644
--- a/eplugin/exchange-user-dialog.c
+++ b/eplugin/exchange-user-dialog.c
@@ -81,9 +81,12 @@ class_init (E2kUserDialogClass *class)
static void
init (E2kUserDialog *dialog)
{
+ GtkWidget *content_area;
+
dialog->priv = g_new0 (E2kUserDialogPrivate, 1);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 6);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_box_set_spacing (GTK_BOX (content_area), 6);
}
E2K_MAKE_TYPE (e2k_user_dialog, E2kUserDialog, class_init, init, PARENT_TYPE)
@@ -127,6 +130,7 @@ e2k_user_dialog_construct (E2kUserDialog *dialog,
GtkWidget *hbox, *vbox, *label, *button;
ENameSelectorModel *name_selector_model;
ENameSelectorDialog *name_selector_dialog;
+ GtkWidget *content_area;
gtk_window_set_title (GTK_WINDOW (dialog), _("Select User"));
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
@@ -173,8 +177,8 @@ e2k_user_dialog_construct (E2kUserDialog *dialog,
dialog);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 6);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
- TRUE, TRUE, 6);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_box_pack_start (GTK_BOX (content_area), hbox, TRUE, TRUE, 6);
gtk_widget_show_all (hbox);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]