aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJavier Jardón <javierjc1982@gmail.com>2009-09-22 17:27:30 +0800
committerXan Lopez <xan@gnome.org>2009-09-22 17:33:15 +0800
commit0eadd147c38a58cd235571d228e393216416cd3e (patch)
tree943359c4cb4d5ac6dcf797684322d5926f4c5c6a /src
parentf279bbf2de2896f39ef08e52961e8638b9f1a29b (diff)
downloadgsoc2013-epiphany-0eadd147c38a58cd235571d228e393216416cd3e.tar
gsoc2013-epiphany-0eadd147c38a58cd235571d228e393216416cd3e.tar.gz
gsoc2013-epiphany-0eadd147c38a58cd235571d228e393216416cd3e.tar.bz2
gsoc2013-epiphany-0eadd147c38a58cd235571d228e393216416cd3e.tar.lz
gsoc2013-epiphany-0eadd147c38a58cd235571d228e393216416cd3e.tar.xz
gsoc2013-epiphany-0eadd147c38a58cd235571d228e393216416cd3e.tar.zst
gsoc2013-epiphany-0eadd147c38a58cd235571d228e393216416cd3e.zip
GTK+ 2.17.11 is now the required version
I've used all the GTK+ 2.17.11 api available, still missing: GTK_WIDGET_REALIZED (GTK_WIDGET ()) GTK_WIDGET_MAPPED (GTK_WIDGET ()) GTK_ENTRY->im_context GTK_STATUSBAR->frame GTK_STATUSBAR->label GTK_MESSAGE_DIALOG->label https://bugzilla.gnome.org/show_bug.cgi?id=595791 Signed-off-by: Xan Lopez <xan@gnome.org>
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/ephy-bookmark-action.c5
-rw-r--r--src/bookmarks/ephy-bookmark-factory-action.c4
-rw-r--r--src/bookmarks/ephy-bookmark-properties.c14
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c15
-rw-r--r--src/bookmarks/ephy-topic-action.c4
-rw-r--r--src/bookmarks/ephy-topic-factory-action.c4
-rw-r--r--src/ephy-encoding-dialog.c8
-rw-r--r--src/ephy-find-toolbar.c17
-rw-r--r--src/ephy-fullscreen-popup.c9
-rw-r--r--src/ephy-go-action.c5
-rw-r--r--src/ephy-home-action.c27
-rw-r--r--src/ephy-navigation-action.c2
-rw-r--r--src/ephy-notebook.c27
-rw-r--r--src/ephy-nss-glue.c3
-rw-r--r--src/ephy-statusbar.c2
-rw-r--r--src/ephy-tabs-menu.c2
-rw-r--r--src/ephy-toolbar-editor.c4
-rw-r--r--src/ephy-toolbar.c2
-rw-r--r--src/ephy-window.c17
-rw-r--r--src/pdm-dialog.c10
-rw-r--r--src/prefs-dialog.c3
21 files changed, 112 insertions, 72 deletions
diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c
index fd70b2904..90af3b1fd 100644
--- a/src/bookmarks/ephy-bookmark-action.c
+++ b/src/bookmarks/ephy-bookmark-action.c
@@ -463,7 +463,8 @@ drag_data_get_cb (GtkWidget *widget,
g_return_if_fail (location != NULL);
- gtk_selection_data_set (selection_data, selection_data->target, 8, (unsigned char *)location, strlen (location));
+ gtk_selection_data_set (selection_data, gtk_selection_data_get_target (selection_data),
+ 8, (unsigned char *)location, strlen (location));
}
static void
@@ -593,7 +594,7 @@ connect_proxy (GtkAction *action,
{
GtkLabel *label;
- label = (GtkLabel *) ((GtkBin *) proxy)->child;
+ label = GTK_LABEL (gtk_bin_get_child (GTK_BIN (proxy)));
gtk_label_set_use_underline (label, FALSE);
gtk_label_set_ellipsize (label, PANGO_ELLIPSIZE_END);
diff --git a/src/bookmarks/ephy-bookmark-factory-action.c b/src/bookmarks/ephy-bookmark-factory-action.c
index 51c165f57..4a17cf5df 100644
--- a/src/bookmarks/ephy-bookmark-factory-action.c
+++ b/src/bookmarks/ephy-bookmark-factory-action.c
@@ -57,7 +57,7 @@ activate_item_cb (GtkWidget *menuitem, GtkWidget *placeholder)
g_return_if_fail (model);
children = gtk_container_get_children (GTK_CONTAINER (etoolbar));
- pos = g_list_index (children, toolbar->parent);
+ pos = g_list_index (children, gtk_widget_get_parent (toolbar));
index = gtk_toolbar_get_item_index (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (item));
g_list_free (children);
@@ -186,7 +186,7 @@ remove_placeholder_cb (GtkMenuShell *menushell,
g_object_set_data (G_OBJECT (model), EGG_TOOLBARS_MODEL_DATA, NULL);
children = gtk_container_get_children (GTK_CONTAINER (etoolbar));
- pos = g_list_index (children, toolbar->parent);
+ pos = g_list_index (children, gtk_widget_get_parent (toolbar));
index = gtk_toolbar_get_item_index (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (item));
g_list_free (children);
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c
index 83174506f..ed8f9b2cd 100644
--- a/src/bookmarks/ephy-bookmark-properties.c
+++ b/src/bookmarks/ephy-bookmark-properties.c
@@ -489,6 +489,7 @@ ephy_bookmark_properties_constructor (GType type,
EphyBookmarkProperties *properties;
EphyBookmarkPropertiesPrivate *priv;
GtkWidget *widget, *table, *label, *entry, *container;
+ GtkWidget *content_area, *action_area;
GtkWindow *window;
GtkDialog *dialog;
gboolean lockdown;
@@ -526,10 +527,11 @@ ephy_bookmark_properties_constructor (GType type,
lockdown = eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_BOOKMARK_EDITING);
update_window_title (properties);
+ content_area = gtk_dialog_get_content_area (dialog);
gtk_dialog_set_has_separator (dialog, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (properties), 5);
- gtk_box_set_spacing (GTK_BOX (dialog->vbox), 2);
+ gtk_box_set_spacing (GTK_BOX (content_area), 2);
table = gtk_table_new (4, 2, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
@@ -604,7 +606,7 @@ ephy_bookmark_properties_constructor (GType type,
gtk_widget_show (widget);
gtk_table_attach (GTK_TABLE (table), widget, 1, 2, 3, 4, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0);
- gtk_box_pack_start (GTK_BOX (dialog->vbox), table, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (content_area), table, TRUE, TRUE, 0);
priv->warning = gtk_toggle_button_new ();
gtk_button_set_focus_on_click (GTK_BUTTON (priv->warning), FALSE);
@@ -627,11 +629,13 @@ ephy_bookmark_properties_constructor (GType type,
gtk_dialog_add_button (dialog,
GTK_STOCK_HELP,
GTK_RESPONSE_HELP);
+
+ action_area = gtk_dialog_get_action_area (dialog);
- gtk_box_pack_end (GTK_BOX (dialog->action_area),
+ gtk_box_pack_end (GTK_BOX (action_area),
priv->warning, FALSE, TRUE, 0);
- gtk_button_box_set_child_secondary
- (GTK_BUTTON_BOX (dialog->action_area), priv->warning, TRUE);
+ gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (action_area),
+ priv->warning, TRUE);
if (priv->creating)
{
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index 0feceed09..ea5c37f7a 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -402,7 +402,8 @@ delete_topic_dialog_construct (GtkWindow *parent,
gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Delete Topic"), GTK_RESPONSE_ACCEPT);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
- gtk_window_group_add_window (GTK_WINDOW (parent)->group, GTK_WINDOW (dialog));
+ gtk_window_group_add_window (gtk_window_get_group (GTK_WINDOW (parent)),
+ GTK_WINDOW (dialog));
return dialog;
}
@@ -685,7 +686,7 @@ import_bookmarks (EphyBookmarksEditor *editor,
"unsupported type."),
basename);
- gtk_window_group_add_window (GTK_WINDOW (editor)->group,
+ gtk_window_group_add_window (gtk_window_get_group (GTK_WINDOW (editor)),
GTK_WINDOW (dialog));
gtk_dialog_run (GTK_DIALOG (dialog));
@@ -922,7 +923,8 @@ cmd_bookmarks_export (GtkAction *action,
gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (dialog), hbox);
- gtk_window_group_add_window (GTK_WINDOW (editor)->group, GTK_WINDOW (dialog));
+ gtk_window_group_add_window (gtk_window_get_group (GTK_WINDOW (editor)),
+ GTK_WINDOW (dialog));
g_signal_connect (dialog, "response",
G_CALLBACK (export_dialog_response_cb), editor);
@@ -934,6 +936,7 @@ cmd_bookmarks_import (GtkAction *action,
EphyBookmarksEditor *editor)
{
GtkWidget *dialog;
+ GtkWidget *content_area;
GtkWidget *label;
GtkWidget *vbox;
GtkWidget *combo;
@@ -952,15 +955,17 @@ cmd_bookmarks_import (GtkAction *action,
_("I_mport"),
GTK_RESPONSE_OK,
NULL);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
+ gtk_box_set_spacing (GTK_BOX (content_area), 2);
vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
gtk_widget_show (vbox);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox,
+ gtk_box_pack_start (GTK_BOX (content_area), vbox,
TRUE, TRUE, 0);
label = gtk_label_new (_("Import bookmarks from:"));
diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c
index d0c3fbfd7..32d922f14 100644
--- a/src/bookmarks/ephy-topic-action.c
+++ b/src/bookmarks/ephy-topic-action.c
@@ -79,7 +79,7 @@ drag_data_received_cb (GtkWidget *widget,
topic = ephy_topic_action_get_topic (EPHY_TOPIC_ACTION (action));
- data = (char *)selection_data->data;
+ data = (char *) gtk_selection_data_get_data (selection_data);
bookmarks = ephy_shell_get_bookmarks (ephy_shell);
netscape_url = g_strsplit (data, "\n", 2);
@@ -165,7 +165,7 @@ ephy_topic_action_sync_label (GtkAction *action,
}
else if (GTK_IS_MENU_ITEM (proxy))
{
- label = GTK_BIN (proxy)->child;
+ label = gtk_bin_get_child (GTK_BIN (proxy));
}
else
{
diff --git a/src/bookmarks/ephy-topic-factory-action.c b/src/bookmarks/ephy-topic-factory-action.c
index 6c164807e..e8b8e583c 100644
--- a/src/bookmarks/ephy-topic-factory-action.c
+++ b/src/bookmarks/ephy-topic-factory-action.c
@@ -99,7 +99,7 @@ activate_item_cb (GtkWidget *menuitem, GtkWidget *placeholder)
g_return_if_fail (model);
children = gtk_container_get_children (GTK_CONTAINER (etoolbar));
- pos = g_list_index (children, toolbar->parent);
+ pos = g_list_index (children, gtk_widget_get_parent (toolbar));
index = gtk_toolbar_get_item_index (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (item));
g_list_free (children);
@@ -185,7 +185,7 @@ remove_placeholder_cb (GtkMenuShell *menushell, GtkWidget *placeholder)
g_object_set_data (G_OBJECT (model), EGG_TOOLBARS_MODEL_DATA, NULL);
children = gtk_container_get_children (GTK_CONTAINER (etoolbar));
- pos = g_list_index (children, toolbar->parent);
+ pos = g_list_index (children, gtk_widget_get_parent (toolbar));
index = gtk_toolbar_get_item_index (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (item));
g_list_free (children);
diff --git a/src/ephy-encoding-dialog.c b/src/ephy-encoding-dialog.c
index 822937cf4..00953ba6b 100644
--- a/src/ephy-encoding-dialog.c
+++ b/src/ephy-encoding-dialog.c
@@ -291,7 +291,7 @@ automatic_toggled_cb (GtkToggleButton *button, EphyEncodingDialog *dialog)
static void
ephy_encoding_dialog_init (EphyEncodingDialog *dialog)
{
- GtkWidget *treeview, *scroller, *button, *window;
+ GtkWidget *treeview, *scroller, *button, *window, *child;
GtkTreeSelection *selection;
EphyNode *node;
@@ -345,13 +345,15 @@ ephy_encoding_dialog_init (EphyEncodingDialog *dialog)
(EPHY_DIALOG (dialog), properties[SCROLLED_WINDOW_PROP].id);
gtk_container_add (GTK_CONTAINER (scroller), treeview);
+ child = gtk_bin_get_child (GTK_BIN (button));
+
button = ephy_dialog_get_control (EPHY_DIALOG (dialog), properties[AUTOMATIC_PROP].id);
- gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (button)->child), TRUE);
+ gtk_label_set_use_markup (GTK_LABEL (child), TRUE);
g_signal_connect (button, "toggled",
G_CALLBACK (automatic_toggled_cb), dialog);
button = ephy_dialog_get_control (EPHY_DIALOG (dialog), properties[MANUAL_PROP].id);
- gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (button)->child), TRUE);
+ gtk_label_set_use_markup (GTK_LABEL (child), TRUE);
dialog->priv->enc_view = treeview;
diff --git a/src/ephy-find-toolbar.c b/src/ephy-find-toolbar.c
index bc8a46563..71f255258 100644
--- a/src/ephy-find-toolbar.c
+++ b/src/ephy-find-toolbar.c
@@ -92,7 +92,7 @@ scroll_lines (WebKitWebView *web_view,
scrolled_window = GTK_SCROLLED_WINDOW (gtk_widget_get_parent (GTK_WIDGET (web_view)));
vadj = gtk_scrolled_window_get_vadjustment (scrolled_window);
- value = vadj->value + (num_lines * vadj->step_increment);
+ value = gtk_adjustment_get_value (vadj) + (num_lines * gtk_adjustment_get_step_increment (vadj));
gtk_adjustment_set_value (vadj, value);
}
@@ -107,7 +107,7 @@ scroll_pages (WebKitWebView *web_view,
scrolled_window = GTK_SCROLLED_WINDOW (gtk_widget_get_parent (GTK_WIDGET (web_view)));
vadj = gtk_scrolled_window_get_vadjustment (scrolled_window);
- value = vadj->value + (num_pages * vadj->page_increment);
+ value = gtk_adjustment_get_value (vadj) + (num_pages * gtk_adjustment_get_page_increment (vadj));
gtk_adjustment_set_value (vadj, value);
}
@@ -195,7 +195,7 @@ tab_search_key_press_cb (EphyEmbed *embed,
if (ephy_window_get_is_print_preview (priv->window)) return FALSE;
/* check for / and ' which open the find toolbar in text resp. link mode */
- if (GTK_WIDGET_VISIBLE (widget) == FALSE)
+ if (gtk_widget_get_visible (widget) == FALSE)
{
if (event->keyval == GDK_slash)
{
@@ -454,7 +454,7 @@ set_focus_cb (EphyWindow *window,
while (widget != NULL && widget != wtoolbar)
{
- widget = widget->parent;
+ widget = gtk_widget_get_parent (widget);
}
/* if widget == toolbar, the new focus widget is in the toolbar */
@@ -481,7 +481,8 @@ ephy_find_toolbar_parent_set (GtkWidget *widget,
EphyFindToolbarPrivate *priv = toolbar->priv;
GtkWidget *toplevel;
- if (widget->parent != NULL && priv->set_focus_handler == 0)
+ if (gtk_widget_get_parent (widget) != NULL &&
+ priv->set_focus_handler == 0)
{
toplevel = gtk_widget_get_toplevel (widget);
priv->set_focus_handler =
@@ -795,7 +796,7 @@ ephy_find_toolbar_find_next (EphyFindToolbar *toolbar)
EphyFindToolbarPrivate *priv = toolbar->priv;
FindAgainCBStruct *data;
- if (!GTK_WIDGET_VISIBLE (widget)) {
+ if (!gtk_widget_get_visible (widget)) {
gtk_widget_show (widget);
gtk_widget_grab_focus (widget);
}
@@ -824,7 +825,7 @@ ephy_find_toolbar_find_previous (EphyFindToolbar *toolbar)
EphyFindToolbarPrivate *priv = toolbar->priv;
FindAgainCBStruct *data;
- if (!GTK_WIDGET_VISIBLE (widget)) {
+ if (!gtk_widget_get_visible (widget)) {
gtk_widget_show (widget);
gtk_widget_grab_focus (widget);
}
@@ -884,7 +885,7 @@ ephy_find_toolbar_close (EphyFindToolbar *toolbar)
void
ephy_find_toolbar_request_close (EphyFindToolbar *toolbar)
{
- if (GTK_WIDGET_VISIBLE (GTK_WIDGET (toolbar)))
+ if (gtk_widget_get_visible (GTK_WIDGET (toolbar)))
{
g_signal_emit (toolbar, signals[CLOSE], 0);
}
diff --git a/src/ephy-fullscreen-popup.c b/src/ephy-fullscreen-popup.c
index cad0c7b47..88d530d5f 100644
--- a/src/ephy-fullscreen-popup.c
+++ b/src/ephy-fullscreen-popup.c
@@ -102,7 +102,7 @@ ephy_fullscreen_popup_update_spinner (EphyFullscreenPopup *popup)
{
EphyFullscreenPopupPrivate *priv = popup->priv;
- if (priv->spinning && GTK_WIDGET_VISIBLE (popup))
+ if (priv->spinning && gtk_widget_get_visible (GTK_WIDGET (popup)))
{
ephy_spinner_start (priv->spinner);
}
@@ -116,16 +116,19 @@ static void
ephy_fullscreen_popup_update_position (EphyFullscreenPopup *popup)
{
GtkWidget *widget = GTK_WIDGET (popup);
+ GtkRequisition requisition;
GdkScreen *screen;
GdkRectangle screen_rect;
int popup_width;
- popup_width = widget->requisition.width;
+ gtk_widget_size_request (widget, &requisition);
+ popup_width = requisition.width;
screen = gtk_widget_get_screen (widget);
gdk_screen_get_monitor_geometry
(screen,
- gdk_screen_get_monitor_at_window (screen, widget->window),
+ gdk_screen_get_monitor_at_window (screen,
+ gtk_widget_get_window (widget)),
&screen_rect);
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
diff --git a/src/ephy-go-action.c b/src/ephy-go-action.c
index 7373df52d..5c5b52e62 100644
--- a/src/ephy-go-action.c
+++ b/src/ephy-go-action.c
@@ -67,9 +67,8 @@ connect_proxy (GtkAction *action,
if (GTK_IS_TOOL_ITEM (proxy))
{
- g_signal_connect (GTK_BIN (proxy)->child, "button-release-event",
- G_CALLBACK (button_clicked_cb), action
- );
+ g_signal_connect (gtk_bin_get_child (GTK_BIN (proxy)), "button-release-event",
+ G_CALLBACK (button_clicked_cb), action);
}
}
diff --git a/src/ephy-home-action.c b/src/ephy-home-action.c
index 196078f96..7dc7cf8f2 100644
--- a/src/ephy-home-action.c
+++ b/src/ephy-home-action.c
@@ -179,19 +179,26 @@ home_action_drag_data_received_cb (GtkWidget* widget,
guint time,
EphyHomeAction *action)
{
- gchar *action_name;
+ GdkAtom target;
+ gchar *action_name;
+ const guchar *data;
+ gint length;
g_object_get (action, "name", &action_name, NULL);
g_signal_stop_emission_by_name (widget, "drag_data_received");
- if (selection_data->length <= 0 || selection_data->data == NULL) return;
+ length = gtk_selection_data_get_length (selection_data);
+ data = gtk_selection_data_get_data (selection_data);
+ target = gtk_selection_data_get_target (selection_data);
- if (selection_data->target == gdk_atom_intern (EPHY_DND_URL_TYPE, FALSE))
+ if (length <= 0 || data == NULL) return;
+
+ if (target == gdk_atom_intern (EPHY_DND_URL_TYPE, FALSE))
{
char **split;
- split = g_strsplit ((const gchar *)selection_data->data, "\n", 2);
+ split = g_strsplit ((const gchar *) data, "\n", 2);
if (split != NULL && split[0] != NULL && split[0][0] != '\0')
{
action_name_association (GTK_ACTION (action),
@@ -199,7 +206,7 @@ home_action_drag_data_received_cb (GtkWidget* widget,
}
g_strfreev (split);
}
- else if (selection_data->target == gdk_atom_intern (EPHY_DND_URI_LIST_TYPE, FALSE))
+ else if (target == gdk_atom_intern (EPHY_DND_URI_LIST_TYPE, FALSE))
{
char **uris;
int i;
@@ -231,7 +238,8 @@ home_action_drag_data_received_cb (GtkWidget* widget,
static void
connect_proxy (GtkAction *action,
GtkWidget *proxy)
-{
+{
+ GtkWidget *child;
const gchar *action_name;
GTK_ACTION_CLASS (ephy_home_action_parent_class)->connect_proxy (action, proxy);
@@ -240,13 +248,14 @@ connect_proxy (GtkAction *action,
if (GTK_IS_TOOL_ITEM (proxy) && (strcmp (action_name, "GoHome") != 0))
{
- g_signal_connect (GTK_BIN (proxy)->child, "drag-data-received",
+ child = gtk_bin_get_child (GTK_BIN (proxy));
+ g_signal_connect (child, "drag-data-received",
G_CALLBACK (home_action_drag_data_received_cb), action);
- gtk_drag_dest_set (GTK_BIN (proxy)->child,
+ gtk_drag_dest_set (child,
GTK_DEST_DEFAULT_ALL,
url_drag_types, G_N_ELEMENTS (url_drag_types),
GDK_ACTION_MOVE | GDK_ACTION_COPY);
- gtk_drag_dest_add_text_targets (GTK_BIN (proxy)->child);
+ gtk_drag_dest_add_text_targets (child);
}
}
diff --git a/src/ephy-navigation-action.c b/src/ephy-navigation-action.c
index 972f86d30..d81c2c7df 100644
--- a/src/ephy-navigation-action.c
+++ b/src/ephy-navigation-action.c
@@ -88,7 +88,7 @@ new_history_menu_item (const char *origtext,
item = gtk_image_menu_item_new_with_label (origtext);
- label = GTK_LABEL (GTK_BIN (item)->child);
+ label = GTK_LABEL (gtk_bin_get_child (GTK_BIN (item)));
gtk_label_set_ellipsize (label, PANGO_ELLIPSIZE_END);
gtk_label_set_max_width_chars (label, MAX_LABEL_LENGTH);
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 9121452b9..253e3a0d9 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -260,6 +260,7 @@ find_tab_num_at_pos (EphyNotebook *notebook, gint abs_x, gint abs_y)
while ((page = gtk_notebook_get_nth_page (nb, page_num)))
{
GtkWidget *tab;
+ GtkAllocation allocation;
gint max_x, max_y;
gint x_root, y_root;
@@ -272,11 +273,12 @@ find_tab_num_at_pos (EphyNotebook *notebook, gint abs_x, gint abs_y)
continue;
}
- gdk_window_get_origin (GDK_WINDOW (tab->window),
+ gdk_window_get_origin (gtk_widget_get_window (tab),
&x_root, &y_root);
- max_x = x_root + tab->allocation.x + tab->allocation.width;
- max_y = y_root + tab->allocation.y + tab->allocation.height;
+ gtk_widget_get_allocation (tab, &allocation);
+ max_x = x_root + allocation.x + allocation.width;
+ max_y = y_root + allocation.y + allocation.height;
if (((tab_pos == GTK_POS_TOP)
|| (tab_pos == GTK_POS_BOTTOM))
@@ -359,25 +361,29 @@ notebook_drag_data_received_cb (GtkWidget* widget,
{
EphyWindow *window;
GtkWidget *notebook;
+ GdkAtom target;
+ const guchar *data;
- if (selection_data->target == gdk_atom_intern_static_string ("GTK_NOTEBOOK_TAB"))
+ target = gtk_selection_data_get_target (selection_data);
+ if (target == gdk_atom_intern_static_string ("GTK_NOTEBOOK_TAB"))
return;
g_signal_stop_emission_by_name (widget, "drag_data_received");
if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_ARBITRARY_URL)) return;
- if (selection_data->length <= 0 || selection_data->data == NULL) return;
+ data = gtk_selection_data_get_data (selection_data);
+ if (gtk_selection_data_get_length (selection_data) <= 0 || data == NULL) return;
window = EPHY_WINDOW (gtk_widget_get_toplevel (widget));
notebook = ephy_window_get_notebook (window);
- if (selection_data->target == gdk_atom_intern (EPHY_DND_URL_TYPE, FALSE))
+ if (target == gdk_atom_intern (EPHY_DND_URL_TYPE, FALSE))
{
char **split;
/* URL_TYPE has format: url \n title */
- split = g_strsplit ((const gchar *)selection_data->data, "\n", 2);
+ split = g_strsplit ((const gchar *) data, "\n", 2);
if (split != NULL && split[0] != NULL && split[0][0] != '\0')
{
ephy_link_open (EPHY_LINK (notebook), split[0], embed,
@@ -385,7 +391,7 @@ notebook_drag_data_received_cb (GtkWidget* widget,
}
g_strfreev (split);
}
- else if (selection_data->target == gdk_atom_intern (EPHY_DND_URI_LIST_TYPE, FALSE))
+ else if (target == gdk_atom_intern (EPHY_DND_URI_LIST_TYPE, FALSE))
{
char **uris;
int i;
@@ -538,7 +544,8 @@ sync_label (EphyWebView *view, GParamSpec *pspec, GtkWidget *label)
/* Set the tooltip on the label's parent (the tab label hbox),
* so it covers all of the tab label.
*/
- gtk_widget_set_tooltip_text (label->parent, title);
+ gtk_widget_set_tooltip_text (gtk_widget_get_parent (label),
+ title);
}
static void
@@ -562,7 +569,7 @@ tab_label_style_set_cb (GtkWidget *hbox,
context = gtk_widget_get_pango_context (hbox);
metrics = pango_context_get_metrics (context,
- hbox->style->font_desc,
+ gtk_widget_get_style (hbox)->font_desc,
pango_context_get_language (context));
char_width = pango_font_metrics_get_approximate_digit_width (metrics);
diff --git a/src/ephy-nss-glue.c b/src/ephy-nss-glue.c
index d60326cdb..e1c65b6c0 100644
--- a/src/ephy-nss-glue.c
+++ b/src/ephy-nss-glue.c
@@ -64,7 +64,8 @@ ask_for_nss_password (PK11SlotInfo *slot,
_("The passwords from the previous version (Gecko) are locked with a master password. If you want Epiphany to import them, please enter your master password below."));
entry = gtk_entry_new ();
gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), entry);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ entry);
gtk_widget_show (entry);
result = gtk_dialog_run (GTK_DIALOG (dialog));
diff --git a/src/ephy-statusbar.c b/src/ephy-statusbar.c
index 0a6854a63..a30d57f39 100644
--- a/src/ephy-statusbar.c
+++ b/src/ephy-statusbar.c
@@ -265,7 +265,7 @@ sync_visibility (GtkWidget *widget,
GParamSpec *pspec,
GtkWidget *separator)
{
- if (GTK_WIDGET_VISIBLE (widget))
+ if (gtk_widget_get_visible (widget))
{
gtk_widget_show (separator);
}
diff --git a/src/ephy-tabs-menu.c b/src/ephy-tabs-menu.c
index 7618b006d..7754794d4 100644
--- a/src/ephy-tabs-menu.c
+++ b/src/ephy-tabs-menu.c
@@ -277,7 +277,7 @@ connect_proxy_cb (GtkActionGroup *action_group,
{
GtkLabel *label;
- label = GTK_LABEL (GTK_BIN (proxy)->child);
+ label = GTK_LABEL (gtk_bin_get_child (GTK_BIN (proxy)));
gtk_label_set_use_underline (label, FALSE);
gtk_label_set_ellipsize (label, PANGO_ELLIPSIZE_END);
diff --git a/src/ephy-toolbar-editor.c b/src/ephy-toolbar-editor.c
index f77ef9fc5..8400a4d0c 100644
--- a/src/ephy-toolbar-editor.c
+++ b/src/ephy-toolbar-editor.c
@@ -178,9 +178,9 @@ ephy_toolbar_editor_constructor (GType type,
toolbar = ephy_window_get_toolbar (priv->window);
- vbox = GTK_DIALOG (dialog)->vbox;
+ vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
+ gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 2);
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_window_set_title (GTK_WINDOW (dialog), _("Toolbar Editor"));
gtk_window_set_icon_name (GTK_WINDOW (dialog), EPHY_STOCK_EPHY);
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index 61a34fccc..7442bc225 100644
--- a/src/ephy-toolbar.c
+++ b/src/ephy-toolbar.c
@@ -149,7 +149,7 @@ maybe_finish_activation_cb (EphyWindow *window,
while (widget != NULL && widget != wtoolbar)
{
- widget = widget->parent;
+ widget = gtk_widget_get_parent (widget);
}
/* if widget == toolbar, the new focus widget is in the toolbar, so we
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 360eaf110..80a37fe60 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -534,7 +534,8 @@ construct_confirm_close_dialog (EphyWindow *window)
/* FIXME gtk_window_set_title (GTK_WINDOW (dialog), _("Close Document?")); */
gtk_window_set_icon_name (GTK_WINDOW (dialog), EPHY_STOCK_EPHY);
- gtk_window_group_add_window (GTK_WINDOW (window)->group, GTK_WINDOW (dialog));
+ gtk_window_group_add_window (gtk_window_get_group (GTK_WINDOW (window)),
+ GTK_WINDOW (dialog));
return dialog;
}
@@ -989,7 +990,7 @@ ephy_window_key_press_event (GtkWidget *widget,
menubar = gtk_ui_manager_get_widget (window->priv->manager, "/menubar");
g_return_val_if_fail (menubar != NULL , FALSE);
- if (!GTK_WIDGET_VISIBLE (menubar))
+ if (!gtk_widget_get_visible (menubar))
{
g_signal_connect (menubar, "deactivate",
G_CALLBACK (menubar_deactivate_cb), window);
@@ -2594,6 +2595,9 @@ ephy_window_link_message_cb (EphyWebView *web_view, GParamSpec *spec, EphyWindow
char *script;
GdkColor bg, fg;
GtkWidget *widget;
+ GtkAllocation allocation;
+ GtkStyle *style;
+ GtkStateType state;
PangoLayout *layout;
PangoLayoutLine *line;
PangoLayoutRun *run;
@@ -2603,7 +2607,8 @@ ephy_window_link_message_cb (EphyWebView *web_view, GParamSpec *spec, EphyWindow
widget = GTK_WIDGET (view);
layout = gtk_widget_create_pango_layout (widget, link_message);
- pango_layout_set_width (layout, PANGO_SCALE * (widget->allocation.width * 0.9));
+ gtk_widget_get_allocation (widget, &allocation);
+ pango_layout_set_width (layout, PANGO_SCALE * (allocation.width * 0.9));
pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
line = pango_layout_get_line_readonly (layout, 0);
@@ -2620,8 +2625,10 @@ ephy_window_link_message_cb (EphyWebView *web_view, GParamSpec *spec, EphyWindow
}
g_utf8_strncpy ((gchar *)text, pango_layout_get_text (layout), item->num_chars);
- bg = widget->style->bg[GTK_WIDGET_STATE(widget)];
- fg = widget->style->fg[GTK_WIDGET_STATE(widget)];
+ style = gtk_widget_get_style (widget);
+ state = gtk_widget_get_state (widget);
+ bg = style->bg[state];
+ fg = style->fg[state];
script = g_strdup_printf(add_node_string,
(int) (bg.red / 65535. * 255),
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c
index fddf21f66..1c1bac06c 100644
--- a/src/pdm-dialog.c
+++ b/src/pdm-dialog.c
@@ -460,7 +460,7 @@ pdm_dialog_show_clear_all_dialog (EphyDialog *edialog,
_("<small><i><b>Note:</b> You cannot undo this action. "
"The data you are choosing to clear "
"will be deleted forever.</i></small>"));
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
+ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
label, FALSE, FALSE, 0);
/* Need to do this or the label will wrap too early */
gtk_widget_set_size_request (label, 330, -1);
@@ -642,7 +642,7 @@ show_cookies_properties (PdmDialog *dialog,
GtkWidget *table;
GtkWidget *label;
GtkWidget *parent;
- GtkWidget *dialog_vbox;
+ GtkWidget *content_area;
char *str;
parent = ephy_dialog_get_control (EPHY_DIALOG(dialog),
@@ -658,7 +658,8 @@ show_cookies_properties (PdmDialog *dialog,
EPHY_STATE_WINDOW_SAVE_SIZE | EPHY_STATE_WINDOW_SAVE_POSITION);
gtk_dialog_set_has_separator (GTK_DIALOG(gdialog), FALSE);
gtk_container_set_border_width (GTK_CONTAINER (gdialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (gdialog)->vbox), 14); /* 24 = 2 * 5 + 14 */
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (gdialog));
+ gtk_box_set_spacing (GTK_BOX (content_area), 14); /* 24 = 2 * 5 + 14 */
table = gtk_table_new (2, 4, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 5);
@@ -740,8 +741,7 @@ show_cookies_properties (PdmDialog *dialog,
gtk_widget_show (label);
gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, 3, 4);
- dialog_vbox = GTK_DIALOG(gdialog)->vbox;
- gtk_box_pack_start (GTK_BOX(dialog_vbox),
+ gtk_box_pack_start (GTK_BOX (content_area),
table,
FALSE, FALSE, 0);
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index 0e409051c..b9e895654 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -616,7 +616,8 @@ setup_add_language_dialog (PrefsDialog *pd)
add_lang_props[LANGUAGE_DIALOG].id, &window,
NULL);
- gtk_window_group_add_window (GTK_WINDOW (parent)->group, GTK_WINDOW (window));
+ gtk_window_group_add_window (gtk_window_get_group (GTK_WINDOW (parent)),
+ GTK_WINDOW (window));
gtk_window_set_modal (GTK_WINDOW (window), TRUE);
gtk_tree_view_set_reorderable (GTK_TREE_VIEW (treeview), FALSE);