[brasero] Use accessor functions instead direct access.
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Use accessor functions instead direct access.
- Date: Sun, 22 Nov 2009 21:18:22 +0000 (UTC)
commit 80a859110ee1cd33429ed27398ba12a9b592b1b2
Author: Javier Jardón <javierjc1982 gmail com>
Date: Thu Sep 10 07:57:37 2009 +0200
Use accessor functions instead direct access.
GTK+ 2.17.10 is now the required version
I've used all the GTK+ 2.19.0 api available, still missing:
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED)
GTK_WIDGET_MAPPED (container)
GTK_WIDGET_REALIZED (widget)
GtkTextView->need_im_reset
https://bugzilla.gnome.org/show_bug.cgi?id=594716
configure.in | 2 +-
libbrasero-burn/brasero-blank-dialog.c | 8 ++--
libbrasero-burn/brasero-burn-dialog.c | 17 +++---
libbrasero-burn/brasero-burn-options.c | 8 ++-
libbrasero-burn/brasero-src-image.c | 2 +-
libbrasero-burn/brasero-sum-dialog.c | 2 +-
libbrasero-burn/brasero-tool-dialog.c | 14 +++--
libbrasero-burn/brasero-track-data-cfg.c | 19 ++++---
libbrasero-utils/brasero-disc-message.c | 68 +++++++++++++++---------
libbrasero-utils/brasero-jacket-background.c | 2 +-
libbrasero-utils/brasero-jacket-edit.c | 8 ++-
libbrasero-utils/brasero-jacket-view.c | 75 +++++++++++++++-----------
libbrasero-utils/brasero-tool-color-picker.c | 19 +++----
src/baobab-cell-renderer-progress.c | 47 +++++++++-------
src/brasero-app.c | 14 +++---
src/brasero-audio-disc.c | 2 +-
src/brasero-data-disc.c | 2 +-
src/brasero-file-chooser.c | 2 +-
src/brasero-file-filtered.c | 2 +-
src/brasero-layout.c | 9 ++-
src/brasero-multi-dnd.c | 4 +-
src/brasero-multi-song-props.c | 26 +++++----
src/brasero-player-bacon.c | 39 ++++++++------
src/brasero-player.c | 44 ++++++++++------
src/brasero-playlist.c | 19 ++++---
src/brasero-plugin-manager-ui.c | 12 +++--
src/brasero-plugin-option.c | 4 +-
src/brasero-pref.c | 2 +-
src/brasero-project-type-chooser.c | 10 ++--
src/brasero-project.c | 16 +++---
src/brasero-song-properties.c | 8 ++-
src/brasero-split-dialog.c | 2 +-
src/brasero-video-disc.c | 2 +-
src/brasero-video-tree-model.c | 10 ++--
34 files changed, 301 insertions(+), 219 deletions(-)
---
diff --git a/configure.in b/configure.in
index 0987068..686bb5d 100644
--- a/configure.in
+++ b/configure.in
@@ -138,7 +138,7 @@ GTHREAD_REQUIRED=2.6.0
GMODULE_REQUIRED=2.6.0
GIO_REQUIRED=2.22.0
GDK_REQUIRED=2.6.0
-GTK_REQUIRED=2.16.0
+GTK_REQUIRED=2.17.10
GCONF_REQUIRED=2.0.0
GSTREAMER_REQUIRED=0.10.15
GSTREAMER_BASE_REQUIRED=0.10.0
diff --git a/libbrasero-burn/brasero-blank-dialog.c b/libbrasero-burn/brasero-blank-dialog.c
index 30d2c07..744200a 100644
--- a/libbrasero-burn/brasero-blank-dialog.c
+++ b/libbrasero-burn/brasero-blank-dialog.c
@@ -80,7 +80,7 @@ brasero_blank_dialog_set_button (BraseroBurnSession *session,
{
if (flag & supported) {
if (compulsory & flag) {
- if (GTK_WIDGET_SENSITIVE (button))
+ if (gtk_widget_get_sensitive (button))
saved = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
gtk_widget_set_sensitive (button, FALSE);
@@ -89,7 +89,7 @@ brasero_blank_dialog_set_button (BraseroBurnSession *session,
brasero_burn_session_add_flag (session, flag);
}
else {
- if (!GTK_WIDGET_SENSITIVE (button)) {
+ if (!gtk_widget_get_sensitive (button)) {
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), saved);
if (saved)
@@ -102,7 +102,7 @@ brasero_blank_dialog_set_button (BraseroBurnSession *session,
}
}
else {
- if (GTK_WIDGET_SENSITIVE (button))
+ if (gtk_widget_get_sensitive (button))
saved = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
gtk_widget_set_sensitive (button, FALSE);
@@ -414,7 +414,7 @@ brasero_blank_dialog_init (BraseroBlankDialog *obj)
brasero_blank_dialog_device_opts_setup (obj);
/* if fast blank is supported check it by default */
- if (GTK_WIDGET_IS_SENSITIVE (priv->fast))
+ if (gtk_widget_is_sensitive (priv->fast))
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->fast), TRUE);
}
diff --git a/libbrasero-burn/brasero-burn-dialog.c b/libbrasero-burn/brasero-burn-dialog.c
index 68256f9..c54c123 100644
--- a/libbrasero-burn/brasero-burn-dialog.c
+++ b/libbrasero-burn/brasero-burn-dialog.c
@@ -442,7 +442,7 @@ brasero_burn_dialog_wait_for_insertion (BraseroBurnDialog *dialog,
priv = BRASERO_BURN_DIALOG_PRIVATE (dialog);
- if (!GTK_WIDGET_VISIBLE (dialog)) {
+ if (!gtk_widget_get_visible (GTK_WIDGET (dialog))) {
gtk_widget_show (GTK_WIDGET (dialog));
hide = TRUE;
}
@@ -679,7 +679,7 @@ brasero_burn_dialog_image_error (BraseroBurn *burn,
priv = BRASERO_BURN_DIALOG_PRIVATE (dialog);
- if (!GTK_WIDGET_VISIBLE (dialog)) {
+ if (!gtk_widget_get_visible (GTK_WIDGET (dialog))) {
gtk_widget_show (GTK_WIDGET (dialog));
hide = TRUE;
}
@@ -822,7 +822,7 @@ brasero_burn_dialog_loss_warnings_cb (BraseroBurnDialog *dialog,
priv = BRASERO_BURN_DIALOG_PRIVATE (dialog);
- if (!GTK_WIDGET_VISIBLE (dialog)) {
+ if (!gtk_widget_get_visible (GTK_WIDGET (dialog))) {
gtk_widget_show (GTK_WIDGET (dialog));
hide = TRUE;
}
@@ -989,7 +989,7 @@ brasero_burn_dialog_eject_failure_cb (BraseroBurn *burn,
priv = BRASERO_BURN_DIALOG_PRIVATE (dialog);
- if (!GTK_WIDGET_VISIBLE (dialog)) {
+ if (!gtk_widget_get_visible (GTK_WIDGET (dialog))) {
gtk_widget_show (GTK_WIDGET (dialog));
hide = TRUE;
}
@@ -1309,8 +1309,7 @@ brasero_burn_dialog_dummy_success_cb (BraseroBurn *burn,
if (!GTK_WIDGET_MAPPED (dialog)) {
gtk_widget_show (GTK_WIDGET (dialog));
hide = TRUE;
- }
- else
+ } else
hide = FALSE;
g_timer_stop (priv->total_time);
@@ -1423,7 +1422,7 @@ brasero_burn_dialog_activity_stop (BraseroBurnDialog *dialog,
priv = BRASERO_BURN_DIALOG_PRIVATE (dialog);
- gdk_window_set_cursor (GTK_WIDGET (dialog)->window, NULL);
+ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (dialog)), NULL);
markup = g_strdup_printf ("<b><big>%s</big></b>", message);
gtk_label_set_text (GTK_LABEL (priv->header), markup);
@@ -1622,7 +1621,7 @@ brasero_burn_dialog_notify_error (BraseroBurnDialog *dialog,
else
secondary = g_strdup (_("An unknown error occurred."));
- if (!GTK_WIDGET_VISIBLE (dialog))
+ if (!gtk_widget_get_visible (GTK_WIDGET (dialog)))
gtk_widget_show (GTK_WIDGET (dialog));
message = brasero_burn_dialog_create_message (dialog,
@@ -2312,7 +2311,7 @@ brasero_burn_dialog_run (BraseroBurnDialog *dialog,
priv->initial_icon = g_strdup (gtk_window_get_icon_name (GTK_WINDOW (dialog)));
do {
- if (!GTK_WIDGET_VISIBLE (dialog))
+ if (!gtk_widget_get_visible (GTK_WIDGET (dialog)))
gtk_widget_show (GTK_WIDGET (dialog));
result = brasero_burn_dialog_record_session (dialog);
diff --git a/libbrasero-burn/brasero-burn-options.c b/libbrasero-burn/brasero-burn-options.c
index 687e166..ea86e63 100644
--- a/libbrasero-burn/brasero-burn-options.c
+++ b/libbrasero-burn/brasero-burn-options.c
@@ -554,6 +554,7 @@ brasero_burn_options_build_contents (BraseroBurnOptions *object)
BraseroBurnOptionsPrivate *priv;
GtkWidget *selection;
GtkWidget *alignment;
+ GtkWidget *content_area;
gchar *string;
priv = BRASERO_BURN_OPTIONS_PRIVATE (object);
@@ -579,7 +580,8 @@ brasero_burn_options_build_contents (BraseroBurnOptions *object)
/* Create an upper box for sources */
priv->source_placeholder = gtk_alignment_new (0.0, 0.5, 1.0, 1.0);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox),
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (object));
+ gtk_box_pack_start (GTK_BOX (content_area),
priv->source_placeholder,
FALSE,
TRUE,
@@ -622,7 +624,7 @@ brasero_burn_options_build_contents (BraseroBurnOptions *object)
g_free (string);
gtk_widget_show (selection);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox),
+ gtk_box_pack_start (GTK_BOX (content_area),
selection,
FALSE,
TRUE,
@@ -631,7 +633,7 @@ brasero_burn_options_build_contents (BraseroBurnOptions *object)
/* Create a lower box for options */
alignment = gtk_alignment_new (0.0, 0.5, 1.0, 1.0);
gtk_widget_show (alignment);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox),
+ gtk_box_pack_start (GTK_BOX (content_area),
alignment,
FALSE,
TRUE,
diff --git a/libbrasero-burn/brasero-src-image.c b/libbrasero-burn/brasero-src-image.c
index 3e4d925..68cdbb8 100644
--- a/libbrasero-burn/brasero-src-image.c
+++ b/libbrasero-burn/brasero-src-image.c
@@ -455,7 +455,7 @@ brasero_src_image_clicked (GtkButton *button)
/* add the type chooser to the dialog */
box = gtk_hbox_new (FALSE, 6);
gtk_widget_show (box);
- gtk_box_pack_end (GTK_BOX (GTK_DIALOG (priv->file)->vbox),
+ gtk_box_pack_end (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (priv->file))),
box,
FALSE,
FALSE,
diff --git a/libbrasero-burn/brasero-sum-dialog.c b/libbrasero-burn/brasero-sum-dialog.c
index 2c1cbd6..ffdf300 100644
--- a/libbrasero-burn/brasero-sum-dialog.c
+++ b/libbrasero-burn/brasero-sum-dialog.c
@@ -255,7 +255,7 @@ brasero_sum_dialog_corruption_warning (BraseroSumDialog *self,
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (scroll), tree);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (message)->vbox),
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (message))),
scroll,
TRUE,
TRUE,
diff --git a/libbrasero-burn/brasero-tool-dialog.c b/libbrasero-burn/brasero-tool-dialog.c
index 8f5fe6d..edb838c 100644
--- a/libbrasero-burn/brasero-tool-dialog.c
+++ b/libbrasero-burn/brasero-tool-dialog.c
@@ -202,6 +202,7 @@ brasero_tool_dialog_run (BraseroToolDialog *self)
BraseroMedium *medium;
BraseroMedia media;
GdkCursor *cursor;
+ GdkWindow *window;
priv = BRASERO_TOOL_DIALOG_PRIVATE (self);
medium = brasero_medium_selection_get_active (BRASERO_MEDIUM_SELECTION (priv->selector));
@@ -212,7 +213,8 @@ brasero_tool_dialog_run (BraseroToolDialog *self)
gtk_widget_set_sensitive (GTK_WIDGET (priv->button), FALSE);
cursor = gdk_cursor_new (GDK_WATCH);
- gdk_window_set_cursor (GTK_WIDGET (self)->window, cursor);
+ window = gtk_widget_get_window (GTK_WIDGET (self));
+ gdk_window_set_cursor (window, cursor);
gdk_cursor_unref (cursor);
gtk_button_set_label (GTK_BUTTON (priv->cancel), GTK_STOCK_CANCEL);
@@ -252,7 +254,7 @@ brasero_tool_dialog_run (BraseroToolDialog *self)
end:
- gdk_window_set_cursor (GTK_WIDGET (self)->window, NULL);
+ gdk_window_set_cursor (window, NULL);
gtk_button_set_label (GTK_BUTTON (priv->cancel), GTK_STOCK_CLOSE);
gtk_widget_set_sensitive (priv->upper_box, TRUE);
@@ -522,6 +524,7 @@ static void
brasero_tool_dialog_init (BraseroToolDialog *obj)
{
GtkWidget *title;
+ GtkWidget *content_area;
gchar *title_str;
BraseroToolDialogPrivate *priv;
@@ -550,7 +553,8 @@ brasero_tool_dialog_init (BraseroToolDialog *obj)
BRASERO_MEDIA_TYPE_AUDIO|
BRASERO_MEDIA_TYPE_DATA);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (obj)->vbox),
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (obj));
+ gtk_box_pack_start (GTK_BOX (content_area),
priv->upper_box,
FALSE,
FALSE,
@@ -582,13 +586,13 @@ brasero_tool_dialog_init (BraseroToolDialog *obj)
"show-info", FALSE,
NULL);
- gtk_box_pack_start (GTK_BOX (priv->lower_box),
+ gtk_box_pack_start (GTK_BOX (content_area),
priv->progress,
FALSE,
FALSE,
0);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (obj)->vbox),
+ gtk_box_pack_start (GTK_BOX (content_area),
priv->lower_box,
FALSE,
FALSE,
diff --git a/libbrasero-burn/brasero-track-data-cfg.c b/libbrasero-burn/brasero-track-data-cfg.c
index df94d39..fd0b52d 100644
--- a/libbrasero-burn/brasero-track-data-cfg.c
+++ b/libbrasero-burn/brasero-track-data-cfg.c
@@ -1088,7 +1088,7 @@ brasero_track_data_cfg_drag_data_get (GtkTreeDragSource *drag_source,
GtkTreePath *treepath,
GtkSelectionData *selection_data)
{
- if (selection_data->target == gdk_atom_intern (BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST, TRUE)) {
+ if (gtk_selection_data_get_target (selection_data) == gdk_atom_intern (BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST, TRUE)) {
GtkTreeRowReference *reference;
reference = gtk_tree_row_reference_new (GTK_TREE_MODEL (drag_source), treepath);
@@ -1123,6 +1123,7 @@ brasero_track_data_cfg_drag_data_received (GtkTreeDragDest *drag_dest,
BraseroFileNode *node;
BraseroFileNode *parent;
GtkTreePath *dest_parent;
+ GdkAtom target;
BraseroTrackDataCfgPrivate *priv;
priv = BRASERO_TRACK_DATA_CFG_PRIVATE (drag_dest);
@@ -1142,14 +1143,15 @@ brasero_track_data_cfg_drag_data_received (GtkTreeDragDest *drag_dest,
gtk_tree_path_free (dest_parent);
+ target = gtk_selection_data_get_target (selection_data);
/* Received data: see where it comes from:
* - from us, then that's a simple move
* - from another widget then it's going to be URIS and we add
* them to the DataProject */
- if (selection_data->target == gdk_atom_intern (BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST, TRUE)) {
+ if (target == gdk_atom_intern (BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST, TRUE)) {
GList *iter;
- iter = (GList *) selection_data->data;
+ iter = (GList *) gtk_selection_data_get_data (selection_data);
/* That's us: move the row and its children. */
for (; iter; iter = iter->next) {
@@ -1170,7 +1172,7 @@ brasero_track_data_cfg_drag_data_received (GtkTreeDragDest *drag_dest,
brasero_data_project_move_node (BRASERO_DATA_PROJECT (priv->tree), node, parent);
}
}
- else if (selection_data->target == gdk_atom_intern ("text/uri-list", TRUE)) {
+ else if (target == gdk_atom_intern ("text/uri-list", TRUE)) {
gint i;
gchar **uris;
gboolean success = FALSE;
@@ -1212,13 +1214,16 @@ brasero_track_data_cfg_row_drop_possible (GtkTreeDragDest *drag_dest,
GtkTreePath *dest_path,
GtkSelectionData *selection_data)
{
+ GdkAtom target;
+
+ target = gtk_selection_data_get_target (selection_data);
/* See if we are dropping to ourselves */
- if (selection_data->target == gdk_atom_intern_static_string (BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST)) {
+ if (target == gdk_atom_intern_static_string (BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST)) {
GtkTreePath *dest_parent;
BraseroFileNode *parent;
GList *iter;
- iter = (GList *) selection_data->data;
+ iter = (GList *) target;
/* make sure the parent is a directory.
* NOTE: in this case dest_path is the exact path where it
@@ -1290,7 +1295,7 @@ brasero_track_data_cfg_row_drop_possible (GtkTreeDragDest *drag_dest,
gtk_tree_path_free (dest_parent);
return FALSE;
}
- else if (selection_data->target == gdk_atom_intern_static_string ("text/uri-list"))
+ else if (target == gdk_atom_intern_static_string ("text/uri-list"))
return TRUE;
return FALSE;
diff --git a/libbrasero-utils/brasero-disc-message.c b/libbrasero-utils/brasero-disc-message.c
index af4ba9e..c7993b2 100644
--- a/libbrasero-utils/brasero-disc-message.c
+++ b/libbrasero-utils/brasero-disc-message.c
@@ -518,7 +518,7 @@ brasero_disc_message_init (BraseroDiscMessage *object)
GtkWidget *main_box;
priv = BRASERO_DISC_MESSAGE_PRIVATE (object);
- GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (object), GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (object), FALSE);
main_box = gtk_hbox_new (FALSE, 12);
priv->main_box = main_box;
@@ -589,14 +589,18 @@ brasero_disc_message_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
GtkBin *bin = GTK_BIN (widget);
+ GtkWidget *child;
+ guint border_width;
- requisition->width = GTK_CONTAINER (widget)->border_width * 2;
- requisition->height = GTK_CONTAINER (widget)->border_width * 2;
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
+ requisition->width = border_width * 2;
+ requisition->height = border_width * 2;
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child)) {
+ child = gtk_bin_get_child (bin);
+ if (child && gtk_widget_get_visible (child)) {
GtkRequisition child_requisition;
- gtk_widget_size_request (bin->child, &child_requisition);
+ gtk_widget_size_request (child, &child_requisition);
requisition->width += child_requisition.width;
requisition->height += child_requisition.height;
@@ -608,9 +612,12 @@ brasero_disc_message_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkBin *bin;
+ GtkWidget *child;
GtkAllocation child_allocation;
+ GdkWindow *window;
+ guint border_width;
- widget->allocation = *allocation;
+ gtk_widget_set_allocation (widget, allocation);
bin = GTK_BIN (widget);
child_allocation.x = 0,
@@ -618,28 +625,35 @@ brasero_disc_message_size_allocate (GtkWidget *widget,
child_allocation.width = allocation->width;
child_allocation.height = allocation->height;
- if (widget->window)
- gdk_window_move_resize (widget->window,
- allocation->x + GTK_CONTAINER (widget)->border_width,
- allocation->y + GTK_CONTAINER (widget)->border_width,
+ window = gtk_widget_get_window (widget);
+ if (window) {
+ border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
+ gdk_window_move_resize (window,
+ allocation->x + border_width,
+ allocation->y + border_width,
child_allocation.width,
child_allocation.height);
+ }
- if (bin->child)
- gtk_widget_size_allocate (bin->child, &child_allocation);
+ child = gtk_bin_get_child (GTK_BIN (widget));
+ if (child)
+ gtk_widget_size_allocate (child, &child_allocation);
}
static void
brasero_disc_message_realize (GtkWidget *widget)
{
+ GtkAllocation allocation;
GdkWindowAttr attributes;
+ GdkWindow *window;
gint attributes_mask;
attributes.window_type = GDK_WINDOW_CHILD;
- attributes.x = widget->allocation.x;
- attributes.y = widget->allocation.y;
- attributes.width = widget->allocation.width;
- attributes.height = widget->allocation.height;
+ gtk_widget_get_allocation (widget, &allocation);
+ attributes.x = allocation.x;
+ attributes.y = allocation.y;
+ attributes.width = allocation.width;
+ attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
@@ -647,12 +661,13 @@ brasero_disc_message_realize (GtkWidget *widget)
attributes.event_mask |= GDK_EXPOSURE_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_COLORMAP;
- widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
- &attributes,
- attributes_mask);
- gdk_window_set_user_data (widget->window, widget);
+ gtk_widget_set_window (widget, gdk_window_new (gtk_widget_get_parent_window (widget),
+ &attributes,
+ attributes_mask));
+ window = gtk_widget_get_window (widget);
+ gdk_window_set_user_data (window, widget);
- widget->style = gtk_style_attach (widget->style, widget->window);
+ gtk_widget_set_style (widget, gtk_style_attach (gtk_widget_get_style (widget), window));
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
}
@@ -661,8 +676,11 @@ static gboolean
brasero_disc_message_expose_event (GtkWidget *widget,
GdkEventExpose *event)
{
- gtk_paint_flat_box (widget->style,
- widget->window,
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation (widget, &allocation);
+ gtk_paint_flat_box (gtk_widget_get_style (widget),
+ gtk_widget_get_window (widget),
GTK_STATE_NORMAL,
GTK_SHADOW_OUT,
NULL,
@@ -670,8 +688,8 @@ brasero_disc_message_expose_event (GtkWidget *widget,
"tooltip",
0,
0,
- widget->allocation.width,
- widget->allocation.height);
+ allocation.width,
+ allocation.height);
GTK_WIDGET_CLASS (brasero_disc_message_parent_class)->expose_event (widget, event);
diff --git a/libbrasero-utils/brasero-jacket-background.c b/libbrasero-utils/brasero-jacket-background.c
index e2cce15..28c6fec 100644
--- a/libbrasero-utils/brasero-jacket-background.c
+++ b/libbrasero-utils/brasero-jacket-background.c
@@ -192,7 +192,7 @@ brasero_jacket_background_init (BraseroJacketBackground *object)
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
gtk_widget_show (vbox);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox), vbox, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (object))), vbox, TRUE, TRUE, 0);
string = g_strdup_printf ("<b>%s</b>", _("_Color"));
label = gtk_label_new_with_mnemonic (string);
diff --git a/libbrasero-utils/brasero-jacket-edit.c b/libbrasero-utils/brasero-jacket-edit.c
index be508c9..5a062c9 100644
--- a/libbrasero-utils/brasero-jacket-edit.c
+++ b/libbrasero-utils/brasero-jacket-edit.c
@@ -554,6 +554,7 @@ brasero_jacket_edit_init (BraseroJacketEdit *object)
GtkWidget *vbox;
GtkWidget *item;
GtkWidget *view;
+ GtkStyle *style;
priv = BRASERO_JACKET_EDIT_PRIVATE (object);
@@ -731,11 +732,12 @@ brasero_jacket_edit_init (BraseroJacketEdit *object)
gtk_box_pack_start (GTK_BOX (main_box), view, FALSE, FALSE, 0);
- if (pango_font_description_get_set_fields (priv->front->style->font_desc) & PANGO_FONT_MASK_SIZE) {
+ style = gtk_widget_get_style (priv->front);
+ if (pango_font_description_get_set_fields (style->font_desc) & PANGO_FONT_MASK_SIZE) {
guint size;
gchar string [8] = { 0, };
- size = pango_font_description_get_size (priv->front->style->font_desc);
+ size = pango_font_description_get_size (style->font_desc);
sprintf (string, "%i", size);
brasero_jacket_font_set_name (BRASERO_JACKET_FONT (priv->fonts), "Sans 12");
}
@@ -825,7 +827,7 @@ brasero_jacket_edit_dialog_new (GtkWidget *toplevel,
contents = brasero_jacket_edit_new ();
gtk_widget_show (contents);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), contents, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (window))), contents, TRUE, TRUE, 0);
if (contents_ret)
*contents_ret = BRASERO_JACKET_EDIT (contents);
diff --git a/libbrasero-utils/brasero-jacket-view.c b/libbrasero-utils/brasero-jacket-view.c
index 3c842d1..04cac81 100644
--- a/libbrasero-utils/brasero-jacket-view.c
+++ b/libbrasero-utils/brasero-jacket-view.c
@@ -610,7 +610,7 @@ brasero_jacket_view_snapshot (BraseroJacketView *self)
else
scaled = g_object_ref (priv->scaled);
- area = GTK_WIDGET (self)->allocation;
+ gtk_widget_get_allocation (GTK_WIDGET (self), &area);
area.x = 0;
area.y = 0;
brasero_jacket_view_render (self,
@@ -679,7 +679,7 @@ brasero_jacket_view_focus_in_cb (GtkWidget *view,
GtkTextView *text_view = GTK_TEXT_VIEW (view);
GtkTextBuffer *buffer;
- if (text_view->editable) {
+ if (gtk_text_view_get_editable (text_view)) {
text_view->need_im_reset = TRUE;
gtk_im_context_focus_in (text_view->im_context);
}
@@ -700,7 +700,7 @@ brasero_jacket_view_focus_out_cb (GtkWidget *view,
GtkTextView *text_view = GTK_TEXT_VIEW (view);
GtkTextBuffer *buffer;
- if (text_view->editable) {
+ if (gtk_text_view_get_editable (text_view)) {
text_view->need_im_reset = TRUE;
gtk_im_context_focus_out (text_view->im_context);
}
@@ -881,6 +881,8 @@ brasero_jacket_view_update_edit_image (BraseroJacketView *self)
GdkWindow *window;
GdkPixmap *pixmap;
GtkWidget *toplevel;
+ GtkAllocation allocation;
+ GtkStyle *style;
guint width, height, x, y;
BraseroJacketViewPrivate *priv;
@@ -901,8 +903,9 @@ brasero_jacket_view_update_edit_image (BraseroJacketView *self)
x = COVER_TEXT_MARGIN * resolution;
y = COVER_TEXT_MARGIN * resolution;
- width = priv->edit->allocation.width;
- height = priv->edit->allocation.height;
+ gtk_widget_get_allocation (priv->edit, &allocation);
+ width = allocation.width;
+ height = allocation.height;
if (priv->side == BRASERO_JACKET_BACK)
x += COVER_WIDTH_SIDE_INCH * resolution;
@@ -930,8 +933,9 @@ brasero_jacket_view_update_edit_image (BraseroJacketView *self)
gc = gdk_gc_new (GDK_DRAWABLE (pixmap));
gdk_gc_set_fill (gc, GDK_SOLID);
- gdk_gc_set_rgb_fg_color (gc, &priv->edit->style->bg [0]);
- gdk_gc_set_rgb_bg_color (gc, &priv->edit->style->bg [0]);
+ style = gtk_widget_get_style (priv->edit);
+ gdk_gc_set_rgb_fg_color (gc, &style->bg [0]);
+ gdk_gc_set_rgb_bg_color (gc, &style->bg [0]);
gdk_draw_rectangle (GDK_DRAWABLE (pixmap),
gc,
TRUE,
@@ -1268,12 +1272,13 @@ brasero_jacket_view_expose (GtkWidget *widget,
cairo_t *ctx;
gdouble resolution;
GtkWidget *toplevel;
+ GtkAllocation allocation, sides_allocation;
PangoLayout *layout;
BraseroJacketViewPrivate *priv;
priv = BRASERO_JACKET_VIEW_PRIVATE (widget);
- ctx = gdk_cairo_create (GDK_DRAWABLE (widget->window));
+ ctx = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (widget)));
toplevel = gtk_widget_get_toplevel (widget);
if (!GTK_IS_WINDOW (toplevel))
@@ -1281,9 +1286,10 @@ brasero_jacket_view_expose (GtkWidget *widget,
resolution = gdk_screen_get_resolution (gtk_window_get_screen (GTK_WINDOW (toplevel)));
layout = gtk_widget_create_pango_layout (widget, NULL);
+ gtk_widget_get_allocation (widget, &allocation);
if (priv->side == BRASERO_JACKET_BACK) {
- x = (widget->allocation.width - resolution * COVER_WIDTH_BACK_INCH) / 2;
- y = (widget->allocation.height - resolution * COVER_HEIGHT_BACK_INCH) - BRASERO_JACKET_VIEW_MARGIN;
+ x = (allocation.width - resolution * COVER_WIDTH_BACK_INCH) / 2;
+ y = (allocation.height - resolution * COVER_HEIGHT_BACK_INCH) - BRASERO_JACKET_VIEW_MARGIN;
brasero_jacket_view_render (BRASERO_JACKET_VIEW (widget),
ctx,
@@ -1310,11 +1316,12 @@ brasero_jacket_view_expose (GtkWidget *widget,
cairo_set_line_width (ctx, 0.5);
cairo_set_line_cap (ctx, CAIRO_LINE_CAP_ROUND);
+ gtk_widget_get_allocation (priv->sides, &sides_allocation);
cairo_rectangle (ctx,
- priv->sides->allocation.x - 1,
- priv->sides->allocation.y - 1,
- priv->sides->allocation.width + 2,
- priv->sides->allocation.height + 2);
+ sides_allocation.x - 1,
+ sides_allocation.y - 1,
+ sides_allocation.width + 2,
+ sides_allocation.height + 2);
cairo_stroke (ctx);
gtk_container_propagate_expose (GTK_CONTAINER (widget),
@@ -1322,8 +1329,8 @@ brasero_jacket_view_expose (GtkWidget *widget,
event);
}
else {
- x = (widget->allocation.width - resolution * COVER_WIDTH_FRONT_INCH) / 2;
- y = (widget->allocation.height - resolution * COVER_HEIGHT_FRONT_INCH) / 2;
+ x = (allocation.width - resolution * COVER_WIDTH_FRONT_INCH) / 2;
+ y = (allocation.height - resolution * COVER_HEIGHT_FRONT_INCH) / 2;
brasero_jacket_view_render (BRASERO_JACKET_VIEW (widget),
ctx,
@@ -1350,16 +1357,19 @@ static void
brasero_jacket_view_realize (GtkWidget *widget)
{
BraseroJacketViewPrivate *priv;
+ GtkAllocation allocation;
+ GdkWindow *window;
GdkWindowAttr attributes;
gint attributes_mask;
priv = BRASERO_JACKET_VIEW_PRIVATE (widget);
attributes.window_type = GDK_WINDOW_CHILD;
- attributes.x = widget->allocation.x;
- attributes.y = widget->allocation.y;
- attributes.width = widget->allocation.width;
- attributes.height = widget->allocation.height;
+ gtk_widget_get_allocation (widget, &allocation);
+ attributes.x = allocation.x;
+ attributes.y = allocation.y;
+ attributes.width = allocation.width;
+ attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
@@ -1367,12 +1377,13 @@ brasero_jacket_view_realize (GtkWidget *widget)
attributes.event_mask |= GDK_EXPOSURE_MASK|GDK_BUTTON_PRESS_MASK|GDK_LEAVE_NOTIFY_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_COLORMAP;
- widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
- &attributes,
- attributes_mask);
- gdk_window_set_user_data (widget->window, widget);
+ gtk_widget_set_window (widget, gdk_window_new (gtk_widget_get_parent_window (widget),
+ &attributes,
+ attributes_mask));
+ window = gtk_widget_get_window (widget);
+ gdk_window_set_user_data (window, widget);
- widget->style = gtk_style_attach (widget->style, widget->window);
+ gtk_widget_set_style (widget, gtk_style_attach (gtk_widget_get_style (widget), window));
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
}
@@ -1380,7 +1391,7 @@ static void
brasero_jacket_view_map (GtkWidget *widget)
{
g_return_if_fail (widget != NULL);
- gdk_window_show (widget->window);
+ gdk_window_show (gtk_widget_get_window (widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
@@ -1392,7 +1403,7 @@ static void
brasero_jacket_view_unmap (GtkWidget *widget)
{
g_return_if_fail (widget != NULL);
- gdk_window_hide (widget->window);
+ gdk_window_hide (gtk_widget_get_window (widget));
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
@@ -1410,7 +1421,7 @@ brasero_jacket_view_size_request (GtkWidget *widget,
priv = BRASERO_JACKET_VIEW_PRIVATE (widget);
- if (!widget->parent)
+ if (!gtk_widget_get_parent (widget))
return;
toplevel = gtk_widget_get_toplevel (widget);
@@ -1497,9 +1508,9 @@ brasero_jacket_view_size_allocate (GtkWidget *widget,
brasero_jacket_view_update_edit_image (BRASERO_JACKET_VIEW (widget));
gtk_widget_size_allocate (priv->edit, &view_alloc);
- widget->allocation = *allocation;
- if (GTK_WIDGET_REALIZED (widget) && !GTK_WIDGET_NO_WINDOW (widget)) {
- gdk_window_move_resize (widget->window,
+ gtk_widget_set_allocation (widget, allocation);
+ if (GTK_WIDGET_REALIZED (widget) && gtk_widget_get_has_window (widget)) {
+ gdk_window_move_resize (gtk_widget_get_window (widget),
allocation->x,
allocation->y,
allocation->width,
@@ -1559,7 +1570,7 @@ brasero_jacket_view_init (BraseroJacketView *object)
priv->edit = gtk_text_view_new_with_buffer (buffer);
g_object_unref (buffer);
- priv->b_color = priv->edit->style->bg [0];
+ priv->b_color = gtk_widget_get_style (priv->edit)->bg [0];
priv->color_style = BRASERO_JACKET_COLOR_SOLID;
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (priv->edit), GTK_WRAP_CHAR);
diff --git a/libbrasero-utils/brasero-tool-color-picker.c b/libbrasero-utils/brasero-tool-color-picker.c
index 16f30ff..85cb5fb 100644
--- a/libbrasero-utils/brasero-tool-color-picker.c
+++ b/libbrasero-utils/brasero-tool-color-picker.c
@@ -102,17 +102,19 @@ brasero_tool_color_picker_expose (GtkWidget *widget,
BraseroToolColorPicker *self)
{
BraseroToolColorPickerPrivate *priv;
+ GtkAllocation allocation;
cairo_t *ctx;
priv = BRASERO_TOOL_COLOR_PICKER_PRIVATE (self);
- ctx = gdk_cairo_create (GDK_DRAWABLE (widget->window));
+ ctx = gdk_cairo_create (GDK_DRAWABLE (gtk_widget_get_window (widget)));
gdk_cairo_set_source_color (ctx, &priv->color);
+ gtk_widget_get_allocation (widget, &allocation);
cairo_rectangle (ctx,
- widget->allocation.x,
- widget->allocation.y,
- widget->allocation.width,
- widget->allocation.height);
+ allocation.x,
+ allocation.y,
+ allocation.width,
+ allocation.height);
cairo_fill (ctx);
cairo_stroke (ctx);
cairo_destroy (ctx);
@@ -141,7 +143,7 @@ brasero_tool_color_picker_response (GtkWidget *widget,
priv = BRASERO_TOOL_COLOR_PICKER_PRIVATE (self);
if (response == GTK_RESPONSE_OK) {
- selection = GTK_COLOR_SELECTION (GTK_COLOR_SELECTION_DIALOG (priv->dialog)->colorsel);
+ selection = GTK_COLOR_SELECTION (gtk_color_selection_dialog_get_color_selection (GTK_COLOR_SELECTION_DIALOG (priv->dialog)));
gtk_color_selection_get_current_color (selection, &priv->color);
g_signal_emit (self,
@@ -165,10 +167,7 @@ brasero_tool_color_picker_clicked (BraseroToolColorPicker *self,
priv = BRASERO_TOOL_COLOR_PICKER_PRIVATE (self);
dialog = gtk_color_selection_dialog_new (_("Pick a Color"));
- selection = NULL;
- g_object_get (dialog,
- "color-selection", &selection,
- NULL);
+ selection = GTK_COLOR_SELECTION (gtk_color_selection_dialog_get_color_selection (GTK_COLOR_SELECTION_DIALOG (dialog)));
gtk_color_selection_set_current_color (selection, &priv->color);
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (self));
diff --git a/src/baobab-cell-renderer-progress.c b/src/baobab-cell-renderer-progress.c
index ed6da4b..f3a9575 100644
--- a/src/baobab-cell-renderer-progress.c
+++ b/src/baobab-cell-renderer-progress.c
@@ -48,9 +48,8 @@ baobab_cell_renderer_progress_init (BaobabCellRendererProgress *cellprogress)
g_object_set (cellprogress,
"mode", GTK_CELL_RENDERER_MODE_INERT,
- "xpad", 4,
- "ypad", 4,
- NULL);
+ NULL);
+ gtk_cell_renderer_set_padding (GTK_CELL_RENDERER (cellprogress), 4, 4);
}
GtkCellRenderer*
@@ -109,11 +108,14 @@ baobab_cell_renderer_progress_get_size (GtkCellRenderer *cell,
gint *width,
gint *height)
{
- gint calc_width;
- gint calc_height;
+ gint calc_width, calc_height;
+ gint xpad, ypad;
+ gfloat xalign, yalign;
- calc_width = (gint) cell->xpad * 2 + FIXED_WIDTH;
- calc_height = (gint) cell->ypad * 2 + FIXED_HEIGHT;
+ gtk_cell_renderer_get_padding (cell, &xpad, &ypad);
+
+ calc_width = xpad * 2 + FIXED_WIDTH;
+ calc_height = ypad * 2 + FIXED_HEIGHT;
if (width)
*width = calc_width;
@@ -121,17 +123,18 @@ baobab_cell_renderer_progress_get_size (GtkCellRenderer *cell,
if (height)
*height = calc_height;
+ gtk_cell_renderer_get_alignment (cell, &xalign, &yalign);
if (cell_area)
{
if (x_offset)
{
- *x_offset = cell->xalign * (cell_area->width - calc_width);
+ *x_offset = xalign * (cell_area->width - calc_width);
*x_offset = MAX (*x_offset, 0);
}
if (y_offset)
{
- *y_offset = cell->yalign * (cell_area->height - calc_height);
+ *y_offset = yalign * (cell_area->height - calc_height);
*y_offset = MAX (*y_offset, 0);
}
}
@@ -189,19 +192,22 @@ baobab_cell_renderer_progress_render (GtkCellRenderer *cell,
guint flags)
{
BaobabCellRendererProgress *cellprogress = BAOBAB_CELL_RENDERER_PROGRESS (cell);
+ GtkStyle *style;
gint x, y, w, h, perc_w;
+ gint xpad, ypad;
gboolean is_rtl;
cairo_t *cr;
is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
-
+
cr = gdk_cairo_create (window);
+
+ gtk_cell_renderer_get_padding (cell, &xpad, &ypad);
+ x = cell_area->x + xpad;
+ y = cell_area->y + ypad;
- x = cell_area->x + cell->xpad;
- y = cell_area->y + cell->ypad;
-
- w = cell_area->width - cell->xpad * 2;
- h = cell_area->height - cell->ypad * 2;
+ w = cell_area->width - xpad * 2;
+ h = cell_area->height - ypad * 2;
/*
* we always use a white bar with black
@@ -213,11 +219,12 @@ baobab_cell_renderer_progress_render (GtkCellRenderer *cell,
cairo_rectangle (cr, x, y, w, h);
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_fill (cr);
-
- x += widget->style->xthickness;
- y += widget->style->ythickness;
- w -= widget->style->xthickness * 2;
- h -= widget->style->ythickness * 2;
+
+ style = gtk_widget_get_style (widget);
+ x += style->xthickness;
+ y += style->ythickness;
+ w -= style->xthickness * 2;
+ h -= style->ythickness * 2;
cairo_rectangle (cr, x, y, w, h);
cairo_set_source_rgb (cr, 1, 1, 1);
diff --git a/src/brasero-app.c b/src/brasero-app.c
index 0ff967d..0216014 100644
--- a/src/brasero-app.c
+++ b/src/brasero-app.c
@@ -206,7 +206,7 @@ brasero_app_load_window_state (BraseroApp *app)
/* Make sure that on first run the window has a default size of at least
* 85% of the screen (hardware not GTK+) */
screen = gtk_window_get_screen (GTK_WINDOW (priv->mainwin));
- monitor = gdk_screen_get_monitor_at_window (screen, GTK_WIDGET (priv->mainwin)->window);
+ monitor = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (GTK_WIDGET (priv->mainwin)));
gdk_screen_get_monitor_geometry (screen, monitor, &rect);
brasero_setting_get_value (brasero_setting_get_default (),
@@ -353,7 +353,7 @@ brasero_app_dialog (BraseroApp *app,
if (!toplevel && priv->parent) {
gtk_widget_realize (GTK_WIDGET (dialog));
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gdk_window_set_transient_for (GTK_WIDGET (dialog)->window, priv->parent);
+ gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (dialog)), priv->parent);
}
if (is_on_top) {
@@ -402,7 +402,7 @@ brasero_app_alert (BraseroApp *app,
gtk_widget_realize (GTK_WIDGET (alert));
gtk_window_set_modal (GTK_WINDOW (alert), TRUE);
- gdk_window_set_transient_for (GTK_WIDGET (alert)->window, priv->parent);
+ gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (alert)), priv->parent);
}
if (is_on_top) {
@@ -659,7 +659,7 @@ brasero_app_blank (BraseroApp *app,
if (priv->parent) {
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gdk_window_set_transient_for (GTK_WIDGET (dialog)->window, priv->parent);
+ gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (dialog)), priv->parent);
}
}
else {
@@ -744,7 +744,7 @@ brasero_app_check (BraseroApp *app,
if (priv->parent) {
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gdk_window_set_transient_for (GTK_WIDGET (dialog)->window, priv->parent);
+ gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (dialog)), priv->parent);
}
}
else {
@@ -790,7 +790,7 @@ brasero_app_set_toplevel (BraseroApp *app, GtkWindow *window)
if (!priv->mainwin_running) {
if (priv->parent) {
gtk_widget_realize (GTK_WIDGET (window));
- gdk_window_set_transient_for (GTK_WIDGET (window)->window, priv->parent);
+ gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (window)), priv->parent);
}
else {
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (window), FALSE);
@@ -1481,7 +1481,7 @@ brasero_app_create_mainwin (BraseroApp *app)
if (priv->parent) {
gtk_window_set_modal (GTK_WINDOW (priv->mainwin), TRUE);
- gdk_window_set_transient_for (GTK_WIDGET (priv->mainwin)->window, priv->parent);
+ gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (priv->mainwin)), priv->parent);
}
brasero_app_load_window_state (app);
diff --git a/src/brasero-audio-disc.c b/src/brasero-audio-disc.c
index bfea0d9..55d380f 100644
--- a/src/brasero-audio-disc.c
+++ b/src/brasero-audio-disc.c
@@ -894,7 +894,7 @@ brasero_audio_disc_session_changed (BraseroSessionCfg *session,
BraseroStatus *status;
gboolean should_use_dts;
- if (!GTK_WIDGET (self)->window)
+ if (!gtk_widget_get_window (GTK_WIDGET (self)))
return;
/* make sure all tracks have video */
diff --git a/src/brasero-data-disc.c b/src/brasero-data-disc.c
index d0946cb..0e9ea0e 100644
--- a/src/brasero-data-disc.c
+++ b/src/brasero-data-disc.c
@@ -1905,7 +1905,7 @@ brasero_data_disc_rename_activated (BraseroDataDisc *disc)
gtk_widget_show (frame);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), frame, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), frame, TRUE, TRUE, 0);
gtk_widget_show (dialog);
answer = gtk_dialog_run (GTK_DIALOG (dialog));
diff --git a/src/brasero-file-chooser.c b/src/brasero-file-chooser.c
index 80d6767..50f9089 100644
--- a/src/brasero-file-chooser.c
+++ b/src/brasero-file-chooser.c
@@ -251,7 +251,7 @@ brasero_file_chooser_customize (GtkWidget *widget, gpointer null_data)
GtkWidget *parent;
/* This is to avoid having the left part too small */
- parent = widget->parent;
+ parent = gtk_widget_get_parent (widget);
width = parent->requisition.width;
height = parent->requisition.height;
gtk_widget_size_request (parent, &request);
diff --git a/src/brasero-file-filtered.c b/src/brasero-file-filtered.c
index 2c88ef3..37b25bc 100644
--- a/src/brasero-file-filtered.c
+++ b/src/brasero-file-filtered.c
@@ -143,7 +143,7 @@ brasero_file_filtered_option_pressed_cb (GtkButton *button,
NULL);
option = brasero_filter_option_new ();
gtk_widget_show (option);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), option, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), option, FALSE, FALSE, 0);
gtk_widget_show (dialog);
gtk_dialog_run (GTK_DIALOG (dialog));
diff --git a/src/brasero-layout.c b/src/brasero-layout.c
index 876adc8..9362120 100644
--- a/src/brasero-layout.c
+++ b/src/brasero-layout.c
@@ -242,7 +242,7 @@ brasero_layout_size_reallocate (BraseroLayout *layout)
BraseroLayoutObject *source;
GtkWidget *alignment;
- alignment = layout->priv->main_box->parent;
+ alignment = gtk_widget_get_parent (layout->priv->main_box);
if (layout->priv->layout_type == BRASERO_LAYOUT_TOP
|| layout->priv->layout_type == BRASERO_LAYOUT_BOTTOM) {
@@ -379,6 +379,7 @@ static void
brasero_layout_set_side_pane_visible (BraseroLayout *layout,
gboolean visible)
{
+ GtkWidget *parent;
gboolean preview_in_project;
GList *children;
@@ -386,6 +387,8 @@ brasero_layout_set_side_pane_visible (BraseroLayout *layout,
preview_in_project = (g_list_find (children, layout->priv->preview_pane) == NULL);
g_list_free (children);
+ parent = gtk_widget_get_parent (layout->priv->main_box);
+
if (!visible) {
/* No side pane should be visible */
if (!preview_in_project) {
@@ -404,7 +407,7 @@ brasero_layout_set_side_pane_visible (BraseroLayout *layout,
}
brasero_project_set_source (BRASERO_PROJECT (layout->priv->project), NULL);
- gtk_widget_hide (layout->priv->main_box->parent);
+ gtk_widget_hide (parent);
}
else {
BraseroLayoutObject *source;
@@ -433,7 +436,7 @@ brasero_layout_set_side_pane_visible (BraseroLayout *layout,
brasero_uri_container_uri_selected (BRASERO_URI_CONTAINER (source));
}
- gtk_widget_show (layout->priv->main_box->parent);
+ gtk_widget_show (parent);
}
g_signal_emit (layout,
diff --git a/src/brasero-multi-dnd.c b/src/brasero-multi-dnd.c
index 7c9b512..f6a69e2 100644
--- a/src/brasero-multi-dnd.c
+++ b/src/brasero-multi-dnd.c
@@ -62,7 +62,7 @@ brasero_multi_DND_drag_data_get (EggTreeMultiDragSource *drag_source,
GList *iter;
gint i;
- if (selection_data->target != gdk_atom_intern ("text/uri-list", TRUE))
+ if (gtk_selection_data_get_target (selection_data) != gdk_atom_intern ("text/uri-list", TRUE))
return TRUE;
for (iter = path_list; iter && iter->data; iter = iter->next) {
@@ -162,7 +162,7 @@ brasero_data_track_cfg_multi_DND_drag_data_get (EggTreeMultiDragSource *drag_sou
GList *path_list,
GtkSelectionData *selection_data)
{
- if (selection_data->target == gdk_atom_intern (BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST, TRUE)) {
+ if (gtk_selection_data_get_target (selection_data) == gdk_atom_intern (BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST, TRUE)) {
gtk_selection_data_set (selection_data,
gdk_atom_intern_static_string (BRASERO_DND_TARGET_DATA_TRACK_REFERENCE_LIST),
8,
diff --git a/src/brasero-multi-song-props.c b/src/brasero-multi-song-props.c
index b46d5ca..d71d8cd 100644
--- a/src/brasero-multi-song-props.c
+++ b/src/brasero-multi-song-props.c
@@ -196,12 +196,14 @@ brasero_multi_song_props_init (BraseroMultiSongProps *object)
GtkWidget *label;
GtkWidget *table;
GtkWidget *frame;
+ GtkWidget *content_area;
BraseroMultiSongPropsPrivate *priv;
priv = BRASERO_MULTI_SONG_PROPS_PRIVATE (object);
gtk_dialog_set_has_separator (GTK_DIALOG (object), FALSE);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (object)->vbox), 0);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (object));
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (object))), 0);
gtk_window_set_default_size (GTK_WINDOW (object), 400, 200);
priv->title = brasero_rename_new ();
@@ -215,11 +217,11 @@ brasero_multi_song_props_init (BraseroMultiSongProps *object)
gtk_widget_show (frame);
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox),
- frame,
- FALSE,
- FALSE,
- 0);
+ gtk_box_pack_start (GTK_BOX (content_area),
+ frame,
+ FALSE,
+ FALSE,
+ 0);
table = gtk_table_new (3, 2, FALSE);
gtk_widget_show (table);
@@ -232,11 +234,11 @@ brasero_multi_song_props_init (BraseroMultiSongProps *object)
gtk_widget_show (frame);
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox),
- frame,
- FALSE,
- FALSE,
- 0);
+ gtk_box_pack_start (GTK_BOX (content_area),
+ frame,
+ FALSE,
+ FALSE,
+ 0);
label = gtk_label_new (_("Artist:"));
gtk_widget_show (label);
@@ -311,7 +313,7 @@ brasero_multi_song_props_init (BraseroMultiSongProps *object)
gtk_widget_show (frame);
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox), frame, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (content_area), frame, FALSE, FALSE, 0);
label = gtk_label_new (_("Pause length:"));
gtk_widget_show (label);
diff --git a/src/brasero-player-bacon.c b/src/brasero-player-bacon.c
index 71c82e2..2b4c8da 100644
--- a/src/brasero-player-bacon.c
+++ b/src/brasero-player-bacon.c
@@ -219,6 +219,8 @@ brasero_player_bacon_get_property (GObject *obj,
static void
brasero_player_bacon_realize (GtkWidget *widget)
{
+ GtkAllocation allocation;
+ GdkWindow *window;
GdkWindowAttr attributes;
BraseroPlayerBacon *bacon;
gint attributes_mask;
@@ -226,10 +228,11 @@ brasero_player_bacon_realize (GtkWidget *widget)
bacon = BRASERO_PLAYER_BACON (widget);
attributes.window_type = GDK_WINDOW_CHILD;
- attributes.x = widget->allocation.x;
- attributes.y = widget->allocation.y;
- attributes.width = widget->allocation.width;
- attributes.height = widget->allocation.height;
+ gtk_widget_get_allocation (widget, &allocation);
+ attributes.x = allocation.x;
+ attributes.y = allocation.y;
+ attributes.width = allocation.width;
+ attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (widget);
attributes.colormap = gtk_widget_get_colormap (widget);
@@ -237,12 +240,13 @@ brasero_player_bacon_realize (GtkWidget *widget)
attributes.event_mask |= GDK_EXPOSURE_MASK;
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_COLORMAP;
- widget->window = gdk_window_new (gtk_widget_get_parent_window (widget),
- &attributes,
- attributes_mask);
- gdk_window_set_user_data (widget->window, widget);
+ gtk_widget_set_window (widget, gdk_window_new (gtk_widget_get_parent_window (widget),
+ &attributes,
+ attributes_mask));
+ window = gtk_widget_get_window (widget);
+ gdk_window_set_user_data (window, widget);
- widget->style = gtk_style_attach (widget->style, widget->window);
+ gtk_widget_set_style (widget, gtk_style_attach (gtk_widget_get_style (widget), window));
//gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
@@ -263,7 +267,7 @@ static void
brasero_player_bacon_map (GtkWidget *widget)
{
g_return_if_fail (widget != NULL);
- gdk_window_show (widget->window);
+ gdk_window_show (gtk_widget_get_window (widget));
GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
}
@@ -272,7 +276,7 @@ static void
brasero_player_bacon_unmap (GtkWidget *widget)
{
g_return_if_fail (widget != NULL);
- gdk_window_hide (widget->window);
+ gdk_window_hide (gtk_widget_get_window (widget));
GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED);
}
@@ -281,6 +285,7 @@ static gboolean
brasero_player_bacon_expose (GtkWidget *widget, GdkEventExpose *event)
{
BraseroPlayerBacon *bacon;
+ GdkWindow * window;
if (event && event->count > 0)
return TRUE;
@@ -293,8 +298,8 @@ brasero_player_bacon_expose (GtkWidget *widget, GdkEventExpose *event)
&& bacon->priv->state >= GST_STATE_PAUSED) {
gst_x_overlay_expose (bacon->priv->xoverlay);
}
- else if (widget->window)
- gdk_window_clear (widget->window);
+ else if ((window = gtk_widget_get_window (widget)))
+ gdk_window_clear (window);
return TRUE;
}
@@ -344,12 +349,12 @@ brasero_player_bacon_size_allocate (GtkWidget *widget,
screen_x = allocation->x + (allocation->width - (gint) screen_width) / 2;
screen_y = allocation->y + (allocation->height - (gint) screen_height) / 2;
- gdk_window_move_resize (widget->window,
+ gdk_window_move_resize (gtk_widget_get_window (widget),
screen_x,
screen_y,
(gint) screen_width,
(gint) screen_height);
- widget->allocation = *allocation;
+ gtk_widget_set_allocation (widget, allocation);
}
else if (GTK_WIDGET_CLASS (parent_class)->size_allocate)
GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation);
@@ -431,7 +436,7 @@ brasero_player_bacon_bus_messages_handler (GstBus *bus,
return GST_BUS_PASS;
}
- window = GDK_WINDOW_XWINDOW (GTK_WIDGET (bacon)->window);
+ window = GDK_WINDOW_XWINDOW (gtk_widget_get_window (GTK_WIDGET (bacon)));
bacon->priv->xoverlay = GST_X_OVERLAY (GST_MESSAGE_SRC (message));
gst_x_overlay_set_xwindow_id (bacon->priv->xoverlay, window);
@@ -735,7 +740,7 @@ error:
static void
brasero_player_bacon_init (BraseroPlayerBacon *obj)
{
- GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (obj), GTK_DOUBLE_BUFFERED);
+ gtk_widget_set_double_buffered (GTK_WIDGET (obj), FALSE);
obj->priv = g_new0 (BraseroPlayerBaconPrivate, 1);
brasero_player_bacon_setup_pipe (obj);
diff --git a/src/brasero-player.c b/src/brasero-player.c
index 5e58295..15ef68d 100644
--- a/src/brasero-player.c
+++ b/src/brasero-player.c
@@ -106,7 +106,7 @@ brasero_player_destroy_controls (BraseroPlayer *player)
return;
gtk_box_set_child_packing (GTK_BOX (player->priv->hbox),
- player->priv->notebook->parent,
+ gtk_widget_get_parent (player->priv->notebook),
FALSE,
FALSE,
0,
@@ -146,18 +146,23 @@ static void
brasero_player_video_zoom_out (GtkButton *button,
BraseroPlayer *player)
{
+ GtkWidget *parent;
+ GtkAllocation player_allocation, bacon_allocation;
gint width, height;
gtk_widget_set_sensitive (GTK_WIDGET (player->priv->video_zoom_in), TRUE);
- width = GTK_WIDGET (player->priv->bacon)->allocation.width;
- height = GTK_WIDGET (player->priv->bacon)->allocation.height;
+ gtk_widget_get_allocation (GTK_WIDGET (player->priv->bacon), &bacon_allocation);
+ width = bacon_allocation.width;
+ height = bacon_allocation.height;
width -= PLAYER_BACON_WIDTH / 3;
height -= PLAYER_BACON_HEIGHT / 3;
- if (width < (GTK_WIDGET (player)->allocation.width / 2)
- && player->priv->controls->parent == player->priv->vbox) {
+ gtk_widget_get_allocation (GTK_WIDGET (player), &player_allocation);
+ parent = gtk_widget_get_parent (player->priv->controls);
+ if (width < player_allocation.width / 2 &&
+ gtk_widget_get_parent (player->priv->controls) == player->priv->vbox) {
g_object_ref (player->priv->controls);
gtk_container_remove (GTK_CONTAINER (player->priv->vbox),
player->priv->controls);
@@ -170,7 +175,7 @@ brasero_player_video_zoom_out (GtkButton *button,
g_object_unref (player->priv->controls);
gtk_box_set_child_packing (GTK_BOX (player->priv->hbox),
- player->priv->notebook->parent,
+ gtk_widget_get_parent (player->priv->notebook),
FALSE,
FALSE,
0,
@@ -196,18 +201,21 @@ static void
brasero_player_video_zoom_in (GtkButton *button,
BraseroPlayer *player)
{
+ GtkAllocation player_allocation, bacon_allocation;
gint width, height;
gtk_widget_set_sensitive (GTK_WIDGET (player->priv->video_zoom_out), TRUE);
- width = player->priv->bacon->allocation.width;
- height = player->priv->bacon->allocation.height;
+ gtk_widget_get_allocation (player->priv->bacon, &bacon_allocation);
+ width = bacon_allocation.width;
+ height = bacon_allocation.height;
width += PLAYER_BACON_WIDTH / 3;
height += PLAYER_BACON_HEIGHT / 3;
- if (width >= (GTK_WIDGET (player)->allocation.width / 2)
- && player->priv->controls->parent == player->priv->hbox) {
+ gtk_widget_get_allocation (GTK_WIDGET (player), &player_allocation);
+ if (width >= (player_allocation.width / 2) &&
+ gtk_widget_get_parent (player->priv->controls) == player->priv->hbox) {
g_object_ref (player->priv->controls);
gtk_container_remove (GTK_CONTAINER (player->priv->hbox),
player->priv->controls);
@@ -220,7 +228,7 @@ brasero_player_video_zoom_in (GtkButton *button,
g_object_unref (player->priv->controls);
gtk_box_set_child_packing (GTK_BOX (player->priv->hbox),
- player->priv->notebook->parent,
+ gtk_widget_get_parent (player->priv->notebook),
TRUE,
TRUE,
0,
@@ -373,6 +381,7 @@ brasero_player_create_controls_stream (BraseroPlayer *player,
GtkWidget *header_box;
GtkWidget *alignment;
GtkWidget *volume;
+ GtkAllocation allocation;
if (player->priv->controls)
brasero_player_destroy_controls (player);
@@ -398,7 +407,8 @@ brasero_player_create_controls_stream (BraseroPlayer *player,
0);
player->priv->size = gtk_label_new (NULL);
- if (GTK_WIDGET (player)->allocation.width > GTK_WIDGET (player)->allocation.height) {
+ gtk_widget_get_allocation (GTK_WIDGET (player), &allocation);
+ if (allocation.width > allocation.height) {
gtk_label_set_justify (GTK_LABEL (player->priv->size), GTK_JUSTIFY_RIGHT);
gtk_misc_set_alignment (GTK_MISC (player->priv->size), 1.0, 0.0);
@@ -549,20 +559,20 @@ brasero_player_create_controls_stream (BraseroPlayer *player,
else
gtk_widget_set_sensitive (player->priv->video_zoom_in, TRUE);
- if (player->priv->video_width >= (GTK_WIDGET (player)->allocation.width / 2)) {
+ if (player->priv->video_width >= (allocation.width / 2)) {
gtk_box_pack_start (GTK_BOX (player->priv->vbox),
player->priv->controls,
TRUE,
TRUE,
0);
gtk_box_set_child_packing (GTK_BOX (player->priv->hbox),
- player->priv->notebook->parent,
+ gtk_widget_get_parent (player->priv->notebook),
TRUE,
TRUE,
0,
GTK_PACK_START);
}
- else if (player->priv->video_width < (GTK_WIDGET (player)->allocation.width / 2))
+ else if (player->priv->video_width < (allocation.width / 2))
gtk_box_pack_start (GTK_BOX (player->priv->hbox),
player->priv->controls,
TRUE,
@@ -665,13 +675,15 @@ brasero_player_create_controls_image (BraseroPlayer *player)
{
GtkWidget *box, *zoom;
GtkWidget *image;
+ GtkAllocation allocation;
if (player->priv->image_display)
gtk_widget_set_sensitive (player->priv->image_display, TRUE);
player->priv->controls = gtk_vbox_new (FALSE, 4);
- if (GTK_WIDGET (player)->allocation.width > GTK_WIDGET (player)->allocation.height)
+ gtk_widget_get_allocation (GTK_WIDGET (player), &allocation);
+ if (allocation.width > allocation.height)
gtk_box_pack_end (GTK_BOX (player->priv->hbox),
player->priv->controls,
TRUE,
diff --git a/src/brasero-playlist.c b/src/brasero-playlist.c
index 9276455..639a80e 100644
--- a/src/brasero-playlist.c
+++ b/src/brasero-playlist.c
@@ -112,7 +112,7 @@ brasero_playlist_get_proportion (BraseroLayoutObject *object,
{
GtkRequisition requisition;
- gtk_widget_size_request (BRASERO_PLAYLIST (object)->priv->button_add->parent,
+ gtk_widget_size_request (gtk_widget_get_parent (BRASERO_PLAYLIST (object)->priv->button_add),
&requisition);
(*footer) = requisition.height + BRASERO_PLAYLIST_SPACING;
}
@@ -120,14 +120,17 @@ brasero_playlist_get_proportion (BraseroLayoutObject *object,
static void
brasero_playlist_increase_activity_counter (BraseroPlaylist *playlist)
{
- if (!GTK_WIDGET (playlist->priv->tree)->window)
+ GdkWindow *window;
+
+ window = gtk_widget_get_window (GTK_WIDGET (playlist->priv->tree));
+ if (!window)
return;
if (playlist->priv->activity_counter == 0) {
GdkCursor *cursor;
cursor = gdk_cursor_new (GDK_WATCH);
- gdk_window_set_cursor (GTK_WIDGET (playlist->priv->tree)->window,
+ gdk_window_set_cursor (window,
cursor);
gdk_cursor_unref (cursor);
}
@@ -137,15 +140,17 @@ brasero_playlist_increase_activity_counter (BraseroPlaylist *playlist)
static void
brasero_playlist_decrease_activity_counter (BraseroPlaylist *playlist)
{
+ GdkWindow *window;
+
if (playlist->priv->activity_counter > 0)
playlist->priv->activity_counter--;
- if (!GTK_WIDGET (playlist->priv->tree)->window)
+ window = gtk_widget_get_window (GTK_WIDGET (playlist->priv->tree));
+ if (!window)
return;
if (playlist->priv->activity_counter == 0)
- gdk_window_set_cursor (GTK_WIDGET (playlist->priv->tree)->window,
- NULL);
+ gdk_window_set_cursor (window, NULL);
}
static void
@@ -573,7 +578,7 @@ brasero_playlist_add_cb (GtkButton *button, BraseroPlaylist *playlist)
gint result;
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (playlist));
- if (!GTK_WIDGET_TOPLEVEL (toplevel))
+ if (!gtk_widget_is_toplevel (toplevel))
return;
dialog = gtk_file_chooser_dialog_new (_("Select Playlist"),
diff --git a/src/brasero-plugin-manager-ui.c b/src/brasero-plugin-manager-ui.c
index 705814a..4ca6352 100644
--- a/src/brasero-plugin-manager-ui.c
+++ b/src/brasero-plugin-manager-ui.c
@@ -653,17 +653,19 @@ menu_position_under_widget (GtkMenu *menu,
{
GtkWidget *w = GTK_WIDGET (user_data);
GtkRequisition requisition;
+ GtkAllocation allocation;
- gdk_window_get_origin (w->window, x, y);
+ gdk_window_get_origin (gtk_widget_get_window (w), x, y);
gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
+ gtk_widget_get_allocation (w, &allocation);
if (gtk_widget_get_direction (w) == GTK_TEXT_DIR_RTL) {
- *x += w->allocation.x + w->allocation.width - requisition.width;
+ *x += allocation.x + allocation.width - requisition.width;
} else {
- *x += w->allocation.x;
+ *x += allocation.x;
}
- *y += w->allocation.y + w->allocation.height;
+ *y += allocation.y + allocation.height;
*push_in = TRUE;
}
@@ -692,7 +694,7 @@ menu_position_under_tree_view (GtkMenu *menu,
GtkTreePath *path;
GdkRectangle rect;
- gdk_window_get_origin (GTK_WIDGET (tree)->window, x, y);
+ gdk_window_get_origin (gtk_widget_get_window (GTK_WIDGET (tree)), x, y);
path = gtk_tree_model_get_path (model, &iter);
diff --git a/src/brasero-plugin-option.c b/src/brasero-plugin-option.c
index a4a0f47..cef507b 100644
--- a/src/brasero-plugin-option.c
+++ b/src/brasero-plugin-option.c
@@ -86,7 +86,7 @@ brasero_plugin_option_save_settings (BraseroPluginOption *self)
gchar *key;
widget = iter->data;
- if (!GTK_WIDGET_IS_SENSITIVE (widget->widget))
+ if (!gtk_widget_is_sensitive (widget->widget))
continue;
brasero_plugin_conf_option_get_info (widget->option,
@@ -426,7 +426,7 @@ brasero_plugin_option_init (BraseroPluginOption *object)
gtk_container_set_border_width (GTK_CONTAINER (priv->vbox), 8);
gtk_container_add (GTK_CONTAINER (frame), priv->vbox);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox),
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (object))),
frame,
FALSE,
FALSE,
diff --git a/src/brasero-pref.c b/src/brasero-pref.c
index 89dee22..b82fe34 100644
--- a/src/brasero-pref.c
+++ b/src/brasero-pref.c
@@ -69,7 +69,7 @@ brasero_pref_init (BraseroPref *object)
gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE);
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
- gtk_box_pack_end (GTK_BOX (GTK_DIALOG (object)->vbox),
+ gtk_box_pack_end (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (object))),
notebook,
TRUE,
TRUE,
diff --git a/src/brasero-project-type-chooser.c b/src/brasero-project-type-chooser.c
index 4d9114c..c7a6764 100644
--- a/src/brasero-project-type-chooser.c
+++ b/src/brasero-project-type-chooser.c
@@ -550,18 +550,18 @@ brasero_project_type_expose_event (GtkWidget *widget, GdkEventExpose *event)
chooser = BRASERO_PROJECT_TYPE_CHOOSER (widget);
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
(* GTK_WIDGET_CLASS (parent_class)->expose_event) (widget, event);
- if (!GTK_WIDGET_NO_WINDOW (widget)) {
- if (!GTK_WIDGET_APP_PAINTABLE (widget)
+ if (gtk_widget_get_has_window (widget)) {
+ if (!gtk_widget_get_app_paintable (widget)
&& chooser->priv->background) {
int width, offset = 150;
width = gdk_pixbuf_get_width (chooser->priv->background);
- gdk_draw_pixbuf (widget->window,
- widget->style->white_gc,
+ gdk_draw_pixbuf (gtk_widget_get_window (widget),
+ gtk_widget_get_style (widget)->white_gc,
chooser->priv->background,
offset,
0,
diff --git a/src/brasero-project.c b/src/brasero-project.c
index 9ba520f..2fdf370 100644
--- a/src/brasero-project.c
+++ b/src/brasero-project.c
@@ -335,10 +335,14 @@ brasero_project_get_proportion (BraseroLayoutObject *object,
gint *center,
gint *footer)
{
+ GtkAllocation allocation;
+
if (!BRASERO_PROJECT (object)->priv->name_display)
return;
- *footer = BRASERO_PROJECT (object)->priv->name_display->parent->allocation.height;
+ gtk_widget_get_allocation (gtk_widget_get_parent (BRASERO_PROJECT (object)->priv->name_display),
+ &allocation);
+ *footer = allocation.height;
}
static void
@@ -382,7 +386,7 @@ brasero_project_set_add_button_state (BraseroProject *project)
return;
widget = gtk_bin_get_child (GTK_BIN (widget));
- GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT);
+ gtk_widget_set_has_window (widget, TRUE);
gtk_window_set_default (GTK_WINDOW (toplevel), widget);
}
@@ -580,7 +584,7 @@ brasero_utils_disc_style_changed_cb (GtkWidget *widget,
{
/* The widget (a treeview here) needs to be realized to get proper style */
gtk_widget_realize (widget);
- gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, &widget->style->base[GTK_STATE_NORMAL]);
+ gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, >k_widget_get_style (widget)->base[GTK_STATE_NORMAL]);
}
static void
@@ -589,7 +593,7 @@ brasero_utils_disc_realized_cb (GtkWidget *event_box,
{
/* The widget (a treeview here) needs to be realized to get proper style */
gtk_widget_realize (textview);
- gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, &textview->style->base[GTK_STATE_NORMAL]);
+ gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, >k_widget_get_style (textview)->base[GTK_STATE_NORMAL]);
g_signal_handlers_disconnect_by_func (textview,
brasero_utils_disc_style_changed_cb,
@@ -1537,9 +1541,7 @@ brasero_project_image_properties (BraseroProject *project)
button,
GTK_RESPONSE_OK);
- GTK_WIDGET_SET_FLAGS (button,
- GTK_WIDGET_FLAGS (button)|
- GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button, TRUE);
brasero_image_properties_set_session (BRASERO_IMAGE_PROPERTIES (dialog), project->priv->session);
diff --git a/src/brasero-song-properties.c b/src/brasero-song-properties.c
index 183eb72..80f5707 100644
--- a/src/brasero-song-properties.c
+++ b/src/brasero-song-properties.c
@@ -150,10 +150,11 @@ brasero_song_props_init (BraseroSongProps *obj)
GtkWidget *table;
GtkWidget *frame;
GtkWidget *alignment;
+ GtkWidget *content_area;
obj->priv = g_new0 (BraseroSongPropsPrivate, 1);
gtk_dialog_set_has_separator (GTK_DIALOG (obj), FALSE);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (obj)->vbox), 0);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (obj))), 0);
gtk_window_set_default_size (GTK_WINDOW (obj), 400, 300);
table = gtk_table_new (4, 2, FALSE);
@@ -162,7 +163,8 @@ brasero_song_props_init (BraseroSongProps *obj)
frame = brasero_utils_pack_properties ("", table, NULL);
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (obj)->vbox),
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (obj));
+ gtk_box_pack_start (GTK_BOX (content_area),
frame,
FALSE,
FALSE,
@@ -229,7 +231,7 @@ brasero_song_props_init (BraseroSongProps *obj)
g_free (title_str);
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (obj)->vbox), frame, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (content_area), frame, FALSE, FALSE, 0);
label = gtk_label_new (_("Song start:"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
diff --git a/src/brasero-split-dialog.c b/src/brasero-split-dialog.c
index 1494a18..fa1c3ae 100644
--- a/src/brasero-split-dialog.c
+++ b/src/brasero-split-dialog.c
@@ -1055,7 +1055,7 @@ brasero_split_dialog_init (BraseroSplitDialog *object)
gtk_dialog_add_button (GTK_DIALOG (object), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
gtk_dialog_add_button (GTK_DIALOG (object), GTK_STOCK_OK, GTK_RESPONSE_OK);
- vbox = GTK_DIALOG (object)->vbox;
+ vbox = gtk_dialog_get_content_area (GTK_DIALOG (object));
gtk_box_set_spacing (GTK_BOX (vbox), 0);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_BOTH);
diff --git a/src/brasero-video-disc.c b/src/brasero-video-disc.c
index 0d8d320..4259501 100644
--- a/src/brasero-video-disc.c
+++ b/src/brasero-video-disc.c
@@ -429,7 +429,7 @@ brasero_video_disc_session_changed (BraseroSessionCfg *session,
priv = BRASERO_VIDEO_DISC_PRIVATE (self);
- if (!GTK_WIDGET (self)->window)
+ if (!gtk_widget_get_window (GTK_WIDGET (self)))
return;
/* make sure all tracks have video */
diff --git a/src/brasero-video-tree-model.c b/src/brasero-video-tree-model.c
index 87ec9f9..9adba9f 100644
--- a/src/brasero-video-tree-model.c
+++ b/src/brasero-video-tree-model.c
@@ -688,7 +688,7 @@ brasero_video_tree_model_multi_drag_data_get (EggTreeMultiDragSource *drag_sourc
GList *path_list,
GtkSelectionData *selection_data)
{
- if (selection_data->target == gdk_atom_intern (BRASERO_DND_TARGET_SELF_FILE_NODES, TRUE)) {
+ if (gtk_selection_data_get_target (selection_data) == gdk_atom_intern (BRASERO_DND_TARGET_SELF_FILE_NODES, TRUE)) {
BraseroDNDVideoContext context;
context.model = GTK_TREE_MODEL (drag_source);
@@ -834,6 +834,7 @@ brasero_video_tree_model_drag_data_received (GtkTreeDragDest *drag_dest,
{
BraseroTrack *sibling;
BraseroVideoTreeModelPrivate *priv;
+ GdkAtom target;
priv = BRASERO_VIDEO_TREE_MODEL_PRIVATE (drag_dest);
@@ -844,11 +845,12 @@ brasero_video_tree_model_drag_data_received (GtkTreeDragDest *drag_dest,
* - from us, then that's a simple move
* - from another widget then it's going to be URIS and we add
* them to VideoProject */
- if (selection_data->target == gdk_atom_intern (BRASERO_DND_TARGET_SELF_FILE_NODES, TRUE)) {
+ target = gtk_selection_data_get_target (selection_data);
+ if (target == gdk_atom_intern (BRASERO_DND_TARGET_SELF_FILE_NODES, TRUE)) {
BraseroDNDVideoContext *context;
GList *iter;
- context = (BraseroDNDVideoContext *) selection_data->data;
+ context = (BraseroDNDVideoContext *) gtk_selection_data_get_data (selection_data);
if (context->model != GTK_TREE_MODEL (drag_dest))
return TRUE;
@@ -870,7 +872,7 @@ brasero_video_tree_model_drag_data_received (GtkTreeDragDest *drag_dest,
dest_path);
}
}
- else if (selection_data->target == gdk_atom_intern ("text/uri-list", TRUE)) {
+ else if (target == gdk_atom_intern ("text/uri-list", TRUE)) {
gint i;
gchar **uris = NULL;
gboolean success = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]