aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c10
-rw-r--r--src/ephy-encoding-menu.c3
-rw-r--r--src/ephy-history-window.c15
-rw-r--r--src/ephy-shell.c18
-rw-r--r--src/prefs-dialog.c20
5 files changed, 51 insertions, 15 deletions
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index badf962b8..6f5778105 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -1250,9 +1250,10 @@ ephy_bookmarks_editor_finalize (GObject *object)
if (editor->priv->window)
{
+ GtkWidget **window = &editor->priv->window;
g_object_remove_weak_pointer
(G_OBJECT(editor->priv->window),
- (gpointer *)&editor->priv->window);
+ (gpointer *)window);
}
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -1939,18 +1940,21 @@ void
ephy_bookmarks_editor_set_parent (EphyBookmarksEditor *ebe,
GtkWidget *window)
{
+ GtkWidget **w;
if (ebe->priv->window)
{
+ w = &ebe->priv->window;
g_object_remove_weak_pointer
(G_OBJECT(ebe->priv->window),
- (gpointer *)&ebe->priv->window);
+ (gpointer *)w);
}
ebe->priv->window = window;
+ w = &ebe->priv->window;
g_object_add_weak_pointer
(G_OBJECT(ebe->priv->window),
- (gpointer *)&ebe->priv->window);
+ (gpointer *)w);
}
diff --git a/src/ephy-encoding-menu.c b/src/ephy-encoding-menu.c
index 80dd7de4a..1d566cf67 100644
--- a/src/ephy-encoding-menu.c
+++ b/src/ephy-encoding-menu.c
@@ -318,11 +318,12 @@ ephy_encoding_menu_view_dialog_cb (GtkAction *action, EphyEncodingMenu *menu)
{
if (menu->priv->dialog == NULL)
{
+ EphyEncodingDialog **dialog = &menu->priv->dialog;
menu->priv->dialog = ephy_encoding_dialog_new
(menu->priv->window);
g_object_add_weak_pointer(G_OBJECT (menu->priv->dialog),
- (gpointer *) &menu->priv->dialog);
+ (gpointer *)dialog);
}
ephy_dialog_show (EPHY_DIALOG (menu->priv->dialog));
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index 7b36b261f..8d9c0acec 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -283,9 +283,12 @@ cmd_clear (GtkAction *action,
{
if (editor->priv->confirmation_dialog == NULL)
{
+ GtkWidget **confirmation_dialog;
+
editor->priv->confirmation_dialog = confirmation_dialog_construct (editor);
+ confirmation_dialog = &editor->priv->confirmation_dialog;
g_object_add_weak_pointer (G_OBJECT (editor->priv->confirmation_dialog),
- (gpointer *) &editor->priv->confirmation_dialog);
+ (gpointer *) confirmation_dialog);
}
gtk_widget_show (editor->priv->confirmation_dialog);
@@ -628,9 +631,10 @@ ephy_history_window_finalize (GObject *object)
if (editor->priv->window)
{
+ GtkWidget **window = &editor->priv->window;
g_object_remove_weak_pointer
(G_OBJECT(editor->priv->window),
- (gpointer *)&editor->priv->window);
+ (gpointer *)window);
}
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -1356,18 +1360,21 @@ void
ephy_history_window_set_parent (EphyHistoryWindow *ebe,
GtkWidget *window)
{
+ GtkWindow **widget;
if (ebe->priv->window)
{
+ widget = &ebe->priv->window;
g_object_remove_weak_pointer
(G_OBJECT(ebe->priv->window),
- (gpointer *)&ebe->priv->window);
+ (gpointer *)widget);
}
ebe->priv->window = window;
+ widget = &ebe->priv->window;
g_object_add_weak_pointer
(G_OBJECT(ebe->priv->window),
- (gpointer *)&ebe->priv->window);
+ (gpointer *)widget);
}
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 3938d5eb2..aa88aa11d 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -815,10 +815,14 @@ ephy_shell_get_pdm_dialog (EphyShell *shell)
{
if (shell->priv->pdm_dialog == NULL)
{
+ GObject **dialog;
+
shell->priv->pdm_dialog = g_object_new (EPHY_TYPE_PDM_DIALOG, NULL);
+ dialog = &shell->priv->pdm_dialog;
+
g_object_add_weak_pointer (shell->priv->pdm_dialog,
- (gpointer *) &shell->priv->pdm_dialog);
+ (gpointer *) dialog);
}
return shell->priv->pdm_dialog;
@@ -829,10 +833,14 @@ ephy_shell_get_prefs_dialog (EphyShell *shell)
{
if (shell->priv->prefs_dialog == NULL)
{
+ GObject **dialog;
+
shell->priv->prefs_dialog = g_object_new (EPHY_TYPE_PREFS_DIALOG, NULL);
+ dialog = &shell->priv->prefs_dialog;
+
g_object_add_weak_pointer (shell->priv->prefs_dialog,
- (gpointer *) &shell->priv->prefs_dialog);
+ (gpointer *) dialog);
}
return shell->priv->prefs_dialog;
@@ -843,10 +851,14 @@ ephy_shell_get_print_setup_dialog (EphyShell *shell)
{
if (shell->priv->print_setup_dialog == NULL)
{
+ GObject **dialog;
+
shell->priv->print_setup_dialog = G_OBJECT (ephy_print_setup_dialog_new ());
+ dialog = &shell->priv->print_setup_dialog;
+
g_object_add_weak_pointer (shell->priv->print_setup_dialog,
- (gpointer *) &shell->priv->print_setup_dialog);
+ (gpointer *) dialog);
}
return shell->priv->print_setup_dialog;
diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c
index ca4bb6eb5..b0b518f70 100644
--- a/src/prefs-dialog.c
+++ b/src/prefs-dialog.c
@@ -329,17 +329,21 @@ prefs_dialog_finalize (GObject *object)
if (priv->fonts_dialog != NULL)
{
+ EphyDialog **fonts_dialog = &priv->fonts_dialog;
+
g_object_remove_weak_pointer
(G_OBJECT (priv->fonts_dialog),
- (gpointer *) &priv->fonts_dialog);
+ (gpointer *) fonts_dialog);
g_object_unref (priv->fonts_dialog);
}
if (priv->add_lang_dialog != NULL)
{
+ EphyDialog **add_lang_dialog = &priv->add_lang_dialog;
+
g_object_remove_weak_pointer
(G_OBJECT (priv->add_lang_dialog),
- (gpointer *) &priv->add_lang_dialog);
+ (gpointer *) add_lang_dialog);
g_object_unref (priv->add_lang_dialog);
}
@@ -616,11 +620,15 @@ font_prefs_button_clicked_cb (GtkWidget *button,
if (priv->fonts_dialog == NULL)
{
+ EphyDialog **fonts_dialog;
+
priv->fonts_dialog = setup_fonts_dialog (pd);
+ fonts_dialog = &priv->fonts_dialog;
+
g_object_add_weak_pointer
(G_OBJECT (priv->fonts_dialog),
- (gpointer *) &priv->fonts_dialog);
+ (gpointer *) fonts_dialog);
}
ephy_dialog_show (priv->fonts_dialog);
@@ -1143,11 +1151,15 @@ language_editor_add_button_clicked_cb (GtkWidget *button,
{
if (pd->priv->add_lang_dialog == NULL)
{
+ EphyDialog **add_lang_dialog;
+
pd->priv->add_lang_dialog = setup_add_language_dialog (pd);
+ add_lang_dialog = &pd->priv->add_lang_dialog;
+
g_object_add_weak_pointer
(G_OBJECT (pd->priv->add_lang_dialog),
- (gpointer *) &pd->priv->add_lang_dialog);
+ (gpointer *) add_lang_dialog);
}
ephy_dialog_show (pd->priv->add_lang_dialog);