aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-31 03:03:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-04-08 23:05:26 +0800
commit72797decc12602b181f69dba7c54df7a0d1b9326 (patch)
treeecd1314c92bc26b59647b351b2d47e446f4ed21d /addressbook
parent3ba0b61f9f447b01c3a83bfb78ee33a45d413700 (diff)
downloadgsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.gz
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.zst
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.zip
Giant leap towards GSEAL compliance.
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor-fullname.c39
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c31
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c34
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c9
-rw-r--r--addressbook/gui/merging/eab-contact-merging.c30
-rw-r--r--addressbook/gui/widgets/e-addressbook-selector.c2
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c10
-rw-r--r--addressbook/gui/widgets/e-minicard-label.c18
-rw-r--r--addressbook/gui/widgets/e-minicard-view-widget.c26
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c18
-rw-r--r--addressbook/gui/widgets/e-minicard.c30
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c5
12 files changed, 144 insertions, 108 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index 3f80ec9f4b..a872afb7d9 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -101,20 +101,28 @@ static void
e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullname)
{
GtkBuilder *builder;
+ GtkDialog *dialog;
+ GtkWidget *parent;
GtkWidget *widget;
+ GtkWidget *action_area;
+ GtkWidget *content_area;
+ const gchar *title;
+
+ dialog = GTK_DIALOG (e_contact_editor_fullname);
+ action_area = gtk_dialog_get_action_area (dialog);
+ content_area = gtk_dialog_get_content_area (dialog);
gtk_widget_realize (GTK_WIDGET (e_contact_editor_fullname));
- gtk_dialog_set_has_separator (GTK_DIALOG (e_contact_editor_fullname),
- FALSE);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (e_contact_editor_fullname)->vbox), 0);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (e_contact_editor_fullname)->action_area), 12);
+ gtk_dialog_set_has_separator (dialog, FALSE);
+ gtk_container_set_border_width (GTK_CONTAINER (action_area), 12);
+ gtk_container_set_border_width (GTK_CONTAINER (content_area), 0);
- gtk_dialog_add_buttons (GTK_DIALOG (e_contact_editor_fullname),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
+ gtk_dialog_add_buttons (
+ dialog,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
- gtk_window_set_resizable(GTK_WINDOW(e_contact_editor_fullname), TRUE);
+ gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
e_contact_editor_fullname->name = NULL;
@@ -124,14 +132,15 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam
e_contact_editor_fullname->builder = builder;
widget = e_builder_get_widget(builder, "dialog-checkfullname");
- gtk_window_set_title (GTK_WINDOW (e_contact_editor_fullname),
- GTK_WINDOW (widget)->title);
+ title = gtk_window_get_title (GTK_WINDOW (widget));
+ gtk_window_set_title (GTK_WINDOW (e_contact_editor_fullname), title);
widget = e_builder_get_widget(builder, "table-checkfullname");
- g_object_ref(widget);
- gtk_container_remove(GTK_CONTAINER(widget->parent), widget);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (e_contact_editor_fullname)->vbox), widget, TRUE, TRUE, 0);
- g_object_unref(widget);
+ parent = gtk_widget_get_parent (widget);
+ g_object_ref (widget);
+ gtk_container_remove (GTK_CONTAINER (parent), widget);
+ gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 0);
+ g_object_unref (widget);
gtk_window_set_icon_name (
GTK_WINDOW (e_contact_editor_fullname), "contact-new");
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 95e9c34481..38490aee72 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -3457,24 +3457,7 @@ expand_phone_toggle (EContactEditor *ce)
GtkWidget *phone_ext_table;
phone_ext_table = e_builder_get_widget (ce->builder, "table-phone-extended");
-#if GTK_CHECK_VERSION(2,19,7)
expand_phone (ce, !gtk_widget_get_visible (phone_ext_table));
-#else
- expand_phone (ce, !GTK_WIDGET_VISIBLE (phone_ext_table));
-#endif
-}
-
-static void
-expand_mail_toggle (EContactEditor *ce)
-{
- GtkWidget *mail;
-
- mail = e_builder_get_widget (ce->builder, "entry-email-4");
-#if GTK_CHECK_VERSION(2,19,7)
- expand_mail (ce, !gtk_widget_get_visible (mail));
-#else
- expand_mail (ce, !GTK_WIDGET_VISIBLE (mail));
-#endif
}
static void
@@ -3482,6 +3465,7 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
{
GtkBuilder *builder;
EShell *shell;
+ GtkWidget *container;
GtkWidget *widget, *label;
GtkEntryCompletion *completion;
@@ -3512,8 +3496,10 @@ e_contact_editor_init (EContactEditor *e_contact_editor)
gtk_widget_ensure_style (widget);
gtk_window_set_type_hint (GTK_WINDOW (widget), GDK_WINDOW_TYPE_HINT_NORMAL);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (widget)->vbox), 0);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (widget)->action_area), 12);
+ container = gtk_dialog_get_action_area (GTK_DIALOG (widget));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 12);
+ container = gtk_dialog_get_content_area (GTK_DIALOG (widget));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 0);
init_all (e_contact_editor);
@@ -3909,9 +3895,12 @@ static void
e_contact_editor_raise (EABEditor *editor)
{
EContactEditor *ce = E_CONTACT_EDITOR (editor);
+ GdkWindow *window;
+
+ window = gtk_widget_get_window (ce->app);
- if (GTK_WIDGET (ce->app)->window)
- gdk_window_raise (GTK_WIDGET (ce->app)->window);
+ if (window != NULL)
+ gdk_window_raise (window);
}
/**
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c
index d10ceeac6f..0242d20c02 100644
--- a/addressbook/gui/contact-editor/e-contact-quick-add.c
+++ b/addressbook/gui/contact-editor/e-contact-quick-add.c
@@ -342,6 +342,7 @@ build_quick_add_dialog (QuickAdd *qa)
{
ESourceList *source_list;
GConfClient *gconf_client;
+ GtkWidget *container;
GtkWidget *dialog;
GtkWidget *label;
GtkTable *table;
@@ -350,19 +351,21 @@ build_quick_add_dialog (QuickAdd *qa)
g_return_val_if_fail (qa != NULL, NULL);
- dialog = gtk_dialog_new_with_buttons (_("Contact Quick-Add"),
- e_shell_get_active_window (NULL),
- GTK_DIALOG_NO_SEPARATOR,
- _("_Edit Full"), QUICK_ADD_RESPONSE_EDIT_FULL,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
+ dialog = gtk_dialog_new_with_buttons (
+ _("Contact Quick-Add"),
+ e_shell_get_active_window (NULL),
+ GTK_DIALOG_NO_SEPARATOR,
+ _("_Edit Full"), QUICK_ADD_RESPONSE_EDIT_FULL,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OK, GTK_RESPONSE_OK,
+ NULL);
gtk_widget_ensure_style (dialog);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
- 0);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area),
- 12);
+
+ container = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 12);
+ container = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 0);
g_signal_connect (dialog, "response", G_CALLBACK (clicked_cb), qa);
@@ -460,11 +463,10 @@ build_quick_add_dialog (QuickAdd *qa)
1, 2, 2, 3,
GTK_EXPAND | GTK_FILL, 0, xpad, ypad);
- gtk_container_set_border_width (GTK_CONTAINER (table),
- 12);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
- GTK_WIDGET (table),
- FALSE, FALSE, 0);
+ gtk_container_set_border_width (GTK_CONTAINER (table), 12);
+ container = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_box_pack_start (
+ GTK_BOX (container), GTK_WIDGET (table), FALSE, FALSE, 0);
gtk_widget_show_all (GTK_WIDGET (table));
return dialog;
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index c15a03c70c..831b51eb27 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -439,6 +439,7 @@ contact_list_editor_drag_data_received_cb (GtkWidget *widget,
EContactListModel *model;
gboolean changed = FALSE;
gboolean handled = FALSE;
+ const guchar *data;
GList *list, *iter;
GdkAtom target;
@@ -451,7 +452,8 @@ contact_list_editor_drag_data_received_cb (GtkWidget *widget,
if (!e_targets_include_directory (&target, 1))
goto exit;
- list = eab_contact_list_from_string ((gchar *) selection_data->data);
+ data = gtk_selection_data_get_data (selection_data);
+ list = eab_contact_list_from_string ((gchar *) data);
if (list != NULL)
handled = TRUE;
@@ -1088,7 +1090,10 @@ contact_list_editor_close (EABEditor *editor)
static void
contact_list_editor_raise (EABEditor *editor)
{
- gdk_window_raise (WIDGET (DIALOG)->window);
+ GdkWindow *window;
+
+ window = gtk_widget_get_window (WIDGET (DIALOG));
+ gdk_window_raise (window);
}
static void
diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c
index a4659c7402..ec37972b46 100644
--- a/addressbook/gui/merging/eab-contact-merging.c
+++ b/addressbook/gui/merging/eab-contact-merging.c
@@ -173,12 +173,15 @@ cancelit (EContactMergingLookup *lookup)
static void
dialog_map (GtkWidget *window, GdkEvent *event, GtkWidget *table)
{
+ GtkAllocation allocation;
gint h, w;
+ gtk_widget_get_allocation (table, &allocation);
+
/* Spacing around the table */
- w = table->allocation.width + 30;
+ w = allocation.width + 30;
/* buttons and outer spacing */
- h = table->allocation.height + 60;
+ h = allocation.height + 60;
if (w > 400)
w = 400;
if (h > 450)
@@ -204,6 +207,7 @@ static gint
mergeit (EContactMergingLookup *lookup)
{
GtkWidget *scrolled_window, *label, *hbox, *dropdown;
+ GtkWidget *content_area;
GtkDialog *dialog;
GtkTable *table;
EContactField field;
@@ -216,6 +220,8 @@ mergeit (EContactMergingLookup *lookup)
dialog = (GtkDialog *)(gtk_dialog_new_with_buttons (_("Merge Contact"), NULL, GTK_DIALOG_NO_SEPARATOR, NULL));
gtk_container_set_border_width (GTK_CONTAINER(dialog), 5);
+ content_area = gtk_dialog_get_content_area (dialog);
+
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC,
@@ -355,7 +361,7 @@ mergeit (EContactMergingLookup *lookup)
gtk_window_set_default_size (GTK_WINDOW (dialog), 420, 300);
gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled_window), GTK_WIDGET (table));
- gtk_box_pack_start (GTK_BOX (dialog->vbox), GTK_WIDGET (scrolled_window), TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (content_area), GTK_WIDGET (scrolled_window), TRUE, TRUE, 0);
gtk_widget_show (scrolled_window);
g_signal_connect (dialog, "map-event", G_CALLBACK (dialog_map), table);
gtk_widget_show_all ((GtkWidget *)table);
@@ -477,8 +483,9 @@ match_query_callback (EContact *contact, EContact *match, EABContactMatchType ty
doit (lookup, same_uids);
} else {
GtkBuilder *builder;
-
- GtkWidget *widget, *merge_button;
+ GtkWidget *container;
+ GtkWidget *merge_button;
+ GtkWidget *widget;
/* XXX I think we're leaking the GtkBuilder. */
builder = gtk_builder_new ();
@@ -518,11 +525,16 @@ match_query_callback (EContact *contact, EContact *match, EABContactMatchType ty
widget = e_builder_get_widget (builder, "dialog-duplicate-contact");
gtk_widget_ensure_style (widget);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (widget)->vbox), 0);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (widget)->action_area), 12);
- g_signal_connect (widget, "response",
- G_CALLBACK (response), lookup);
+ container = gtk_dialog_get_action_area (GTK_DIALOG (widget));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 12);
+
+ container = gtk_dialog_get_content_area (GTK_DIALOG (widget));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 0);
+
+ g_signal_connect (
+ widget, "response",
+ G_CALLBACK (response), lookup);
gtk_widget_show_all (widget);
}
diff --git a/addressbook/gui/widgets/e-addressbook-selector.c b/addressbook/gui/widgets/e-addressbook-selector.c
index 3fcf8e8f8b..690ad007ba 100644
--- a/addressbook/gui/widgets/e-addressbook-selector.c
+++ b/addressbook/gui/widgets/e-addressbook-selector.c
@@ -295,7 +295,7 @@ addressbook_selector_data_dropped (ESourceSelector *selector,
priv = E_ADDRESSBOOK_SELECTOR_GET_PRIVATE (selector);
g_return_val_if_fail (priv->current_view != NULL, FALSE);
- string = (const gchar *) selection_data->data;
+ string = (const gchar *) gtk_selection_data_get_data (selection_data);
remove_from_source = (action == GDK_ACTION_MOVE);
target_book = e_book_new (destination, NULL);
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index c27bb74d8d..1e9b732861 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -241,6 +241,7 @@ table_drag_data_get (ETable *table,
EAddressbookModel *model;
EBook *book;
GList *contact_list;
+ GdkAtom target;
gchar *value;
if (!E_IS_ADDRESSBOOK_TABLE_ADAPTER (view->priv->object))
@@ -250,14 +251,15 @@ table_drag_data_get (ETable *table,
book = e_addressbook_model_get_book (model);
contact_list = e_addressbook_view_get_selected (view);
+ target = gtk_selection_data_get_target (selection_data);
switch (info) {
case DND_TARGET_TYPE_VCARD:
value = eab_contact_list_to_string (contact_list);
gtk_selection_data_set (
- selection_data, selection_data->target,
- 8, (guchar *)value, strlen (value));
+ selection_data, target, 8,
+ (guchar *)value, strlen (value));
g_free (value);
break;
@@ -267,8 +269,8 @@ table_drag_data_get (ETable *table,
book, contact_list);
gtk_selection_data_set (
- selection_data, selection_data->target,
- 8, (guchar *)value, strlen (value));
+ selection_data, target, 8,
+ (guchar *)value, strlen (value));
g_free (value);
break;
diff --git a/addressbook/gui/widgets/e-minicard-label.c b/addressbook/gui/widgets/e-minicard-label.c
index 3b0edc8854..0eb166bcf3 100644
--- a/addressbook/gui/widgets/e-minicard-label.c
+++ b/addressbook/gui/widgets/e-minicard-label.c
@@ -414,9 +414,13 @@ e_minicard_label_resize_children(EMinicardLabel *e_minicard_label)
static void
set_colors (EMinicardLabel *label)
{
- if ((GTK_OBJECT_FLAGS( label ) & GNOME_CANVAS_ITEM_REALIZED)) {
- GtkWidget *canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (label)->canvas);
- GtkStyle *style = gtk_widget_get_style (canvas);
+ if ((GTK_OBJECT_FLAGS (label) & GNOME_CANVAS_ITEM_REALIZED)) {
+ GnomeCanvas *canvas;
+ GtkStyle *style;
+
+ canvas = GNOME_CANVAS_ITEM (label)->canvas;
+ style = gtk_widget_get_style (GTK_WIDGET (canvas));
+
if (label->has_focus) {
gnome_canvas_item_set (label->rect,
"outline_color_gdk", &style->mid[GTK_STATE_SELECTED],
@@ -424,11 +428,11 @@ set_colors (EMinicardLabel *label)
NULL);
gnome_canvas_item_set (label->field,
- "fill_color_gdk", &canvas->style->text[GTK_STATE_NORMAL],
+ "fill_color_gdk", &style->text[GTK_STATE_NORMAL],
NULL);
gnome_canvas_item_set (label->fieldname,
- "fill_color_gdk", &canvas->style->text[GTK_STATE_NORMAL],
+ "fill_color_gdk", &style->text[GTK_STATE_NORMAL],
NULL);
}
else {
@@ -438,11 +442,11 @@ set_colors (EMinicardLabel *label)
NULL);
gnome_canvas_item_set (label->field,
- "fill_color_gdk", &canvas->style->text[GTK_STATE_NORMAL],
+ "fill_color_gdk", &style->text[GTK_STATE_NORMAL],
NULL);
gnome_canvas_item_set (label->fieldname,
- "fill_color_gdk", &canvas->style->text[GTK_STATE_NORMAL],
+ "fill_color_gdk", &style->text[GTK_STATE_NORMAL],
NULL);
}
}
diff --git a/addressbook/gui/widgets/e-minicard-view-widget.c b/addressbook/gui/widgets/e-minicard-view-widget.c
index 0244d13d34..7a78d83a42 100644
--- a/addressbook/gui/widgets/e-minicard-view-widget.c
+++ b/addressbook/gui/widgets/e-minicard-view-widget.c
@@ -361,11 +361,14 @@ static void
e_minicard_view_widget_style_set (GtkWidget *widget, GtkStyle *previous_style)
{
EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget);
+ GtkStyle *style;
+
+ style = gtk_widget_get_style (widget);
if (view->background)
- gnome_canvas_item_set (view->background,
- "fill_color_gdk", &widget->style->base[GTK_STATE_NORMAL],
- NULL );
+ gnome_canvas_item_set (
+ view->background, "fill_color_gdk",
+ &style->base[GTK_STATE_NORMAL], NULL);
if (GTK_WIDGET_CLASS(parent_class)->style_set)
GTK_WIDGET_CLASS(parent_class)->style_set (widget, previous_style);
@@ -420,11 +423,7 @@ e_minicard_view_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocatio
if (GTK_WIDGET_CLASS(parent_class)->size_allocate)
GTK_WIDGET_CLASS(parent_class)->size_allocate (widget, allocation);
-#if GTK_CHECK_VERSION(2,19,7)
if (gtk_widget_get_realized (widget)) {
-#else
- if (GTK_WIDGET_REALIZED(widget)) {
-#endif
gdouble width;
EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(widget);
@@ -447,15 +446,18 @@ e_minicard_view_widget_reflow(ECanvas *canvas)
{
gdouble width;
EMinicardViewWidget *view = E_MINICARD_VIEW_WIDGET(canvas);
+ GtkAllocation allocation;
if (E_CANVAS_CLASS(parent_class)->reflow)
E_CANVAS_CLASS(parent_class)->reflow (canvas);
- g_object_get(view->emv,
- "width", &width,
- NULL);
- width = MAX(width, GTK_WIDGET(canvas)->allocation.width);
- gnome_canvas_set_scroll_region(GNOME_CANVAS(canvas), 0, 0, width - 1, GTK_WIDGET(canvas)->allocation.height - 1);
+ g_object_get (view->emv, "width", &width, NULL);
+ gtk_widget_get_allocation (GTK_WIDGET (canvas), &allocation);
+
+ gnome_canvas_set_scroll_region (
+ GNOME_CANVAS(canvas), 0, 0,
+ MAX (width, allocation.width) - 1,
+ allocation.height - 1);
}
ESelectionModel *
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index 04121207e7..b69f842d63 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -83,19 +83,22 @@ e_minicard_view_drag_data_get(GtkWidget *widget,
guint time,
EMinicardView *view)
{
+ GdkAtom target;
+
if (!E_IS_MINICARD_VIEW(view))
return;
+ target = gtk_selection_data_get_target (selection_data);
+
switch (info) {
case DND_TARGET_TYPE_VCARD_LIST: {
gchar *value;
value = eab_contact_list_to_string (view->drag_list);
- gtk_selection_data_set (selection_data,
- selection_data->target,
- 8,
- (guchar *)value, strlen (value));
+ gtk_selection_data_set (
+ selection_data, target, 8,
+ (guchar *) value, strlen (value));
g_free (value);
break;
}
@@ -106,10 +109,9 @@ e_minicard_view_drag_data_get(GtkWidget *widget,
g_object_get (view->adapter, "book", &book, NULL);
value = eab_book_and_contact_list_to_string (book, view->drag_list);
- gtk_selection_data_set (selection_data,
- selection_data->target,
- 8,
- (guchar *)value, strlen (value));
+ gtk_selection_data_set (
+ selection_data, target, 8,
+ (guchar *) value, strlen (value));
g_free (value);
break;
}
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 8a5783f3ed..213d600746 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -267,26 +267,31 @@ e_minicard_init (EMinicard *minicard)
static void
set_selected (EMinicard *minicard, gboolean selected)
{
- GtkWidget *canvas = GTK_WIDGET(GNOME_CANVAS_ITEM(minicard)->canvas);
+ GnomeCanvas *canvas;
+ GtkStyle *style;
+
+ canvas = GNOME_CANVAS_ITEM (minicard)->canvas;
+ style = gtk_widget_get_style (GTK_WIDGET (canvas));
+
if (selected) {
gnome_canvas_item_set (minicard->rect,
- "outline_color_gdk", &canvas->style->bg[GTK_STATE_ACTIVE],
+ "outline_color_gdk", &style->bg[GTK_STATE_ACTIVE],
NULL);
gnome_canvas_item_set (minicard->header_rect,
- "fill_color_gdk", &canvas->style->bg[GTK_STATE_SELECTED],
+ "fill_color_gdk", &style->bg[GTK_STATE_SELECTED],
NULL);
gnome_canvas_item_set (minicard->header_text,
- "fill_color_gdk", &canvas->style->text[GTK_STATE_SELECTED],
+ "fill_color_gdk", &style->text[GTK_STATE_SELECTED],
NULL);
} else {
gnome_canvas_item_set (minicard->rect,
"outline_color", NULL,
NULL);
gnome_canvas_item_set (minicard->header_rect,
- "fill_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL],
+ "fill_color_gdk", &style->bg[GTK_STATE_NORMAL],
NULL);
gnome_canvas_item_set (minicard->header_text,
- "fill_color_gdk", &canvas->style->text[GTK_STATE_NORMAL],
+ "fill_color_gdk", &style->text[GTK_STATE_NORMAL],
NULL);
}
minicard->selected = selected;
@@ -471,11 +476,14 @@ e_minicard_realize (GnomeCanvasItem *item)
{
EMinicard *e_minicard;
GnomeCanvasGroup *group;
- GtkWidget *canvas;
+ GnomeCanvas *canvas;
+ GtkStyle *style;
e_minicard = E_MINICARD (item);
- group = GNOME_CANVAS_GROUP( item );
- canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (item)->canvas);
+ group = GNOME_CANVAS_GROUP (item);
+
+ canvas = GNOME_CANVAS_ITEM (item)->canvas;
+ style = gtk_widget_get_style (GTK_WIDGET (canvas));
if (GNOME_CANVAS_ITEM_CLASS(parent_class)->realize)
(* GNOME_CANVAS_ITEM_CLASS(parent_class)->realize) (item);
@@ -497,7 +505,7 @@ e_minicard_realize (GnomeCanvasItem *item)
"y1", (double) 2,
"x2", (double) MAX (e_minicard->width - 3, 0),
"y2", (double) MAX (e_minicard->height - 3, 0),
- "fill_color_gdk", &canvas->style->bg[GTK_STATE_NORMAL],
+ "fill_color_gdk", &style->bg[GTK_STATE_NORMAL],
NULL );
e_minicard->header_text =
@@ -507,7 +515,7 @@ e_minicard_realize (GnomeCanvasItem *item)
"width", (double) MAX( e_minicard->width - 12, 0 ),
"clip", TRUE,
"use_ellipsis", TRUE,
- "fill_color_gdk", &canvas->style->fg[GTK_STATE_NORMAL],
+ "fill_color_gdk", &style->fg[GTK_STATE_NORMAL],
"text", "",
"draw_background", FALSE,
NULL );
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index 080d1787c7..d127d50786 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -234,6 +234,7 @@ eab_select_source (ESource *except_source, const gchar *title, const gchar *mess
{
ESource *source;
ESourceList *source_list;
+ GtkWidget *content_area;
GtkWidget *dialog;
GtkWidget *ok_button;
/* GtkWidget *label; */
@@ -272,8 +273,8 @@ eab_select_source (ESource *except_source, const gchar *title, const gchar *mess
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_IN);
gtk_container_add (GTK_CONTAINER (scrolled_window), selector);
- /* gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, FALSE, 4); */
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), scrolled_window, TRUE, TRUE, 4);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_box_pack_start (GTK_BOX (content_area), scrolled_window, TRUE, TRUE, 4);
gtk_widget_show_all (dialog);
response = gtk_dialog_run (GTK_DIALOG (dialog));