aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--embed/mozilla/EphyPromptService.cpp42
-rwxr-xr-xlib/egg/egg-editable-toolbar.c3
-rw-r--r--lib/widgets/ephy-location-entry.c3
-rw-r--r--lib/widgets/ephy-zoom-control.c3
-rw-r--r--src/ephy-fullscreen-popup.c3
-rw-r--r--src/ephy-notebook.c3
-rwxr-xr-xsrc/ephy-statusbar.c3
8 files changed, 37 insertions, 35 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c67d6028..892f781e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-03-28 Christian Persch <chpe@cvs.gnome.org>
+
+ * embed/mozilla/EphyPromptService.cpp:
+ * lib/egg/egg-editable-toolbar.c: (egg_editable_toolbar_set_fixed):
+ * lib/widgets/ephy-location-entry.c: (ephy_location_entry_init):
+ * lib/widgets/ephy-zoom-control.c: (ephy_zoom_control_init):
+ * src/ephy-fullscreen-popup.c: (ephy_fullscreen_popup_constructor):
+ * src/ephy-notebook.c: (ephy_notebook_init):
+ * src/ephy-statusbar.c: (ephy_statusbar_init):
+
+ Use g_object_ref_sink().
+
2006-03-28 Jean-François Rameau <jframeau@cvs.gnome.org>
* embed/mozilla/EphyContentPolicy.cpp: (ShouldLoad).
diff --git a/embed/mozilla/EphyPromptService.cpp b/embed/mozilla/EphyPromptService.cpp
index c121978bc..bee062ddf 100644
--- a/embed/mozilla/EphyPromptService.cpp
+++ b/embed/mozilla/EphyPromptService.cpp
@@ -68,8 +68,6 @@ enum
RESPONSE_ABORT_SCRIPT = 42
};
-#define RETVAL(r) (NS_OK)
-
class Prompter
{
public:
@@ -135,8 +133,7 @@ Prompter::Prompter (const char *aStock,
mEntries[0] = mEntries[1] = nsnull;
mDialog = GTK_DIALOG (gtk_dialog_new ());
- g_object_ref (mDialog);
- gtk_object_sink (GTK_OBJECT (mDialog));
+ g_object_ref_sink (mDialog);
char *title = NULL;
if (aTitle)
@@ -663,9 +660,9 @@ EphyPromptService::Alert (nsIDOMWindow *aParent,
{
Prompter prompt (GTK_STOCK_DIALOG_INFO, aParent, aDialogTitle, aText);
prompt.AddStockButton (GTK_STOCK_OK, GTK_RESPONSE_ACCEPT);
- PRInt32 response = prompt.Run ();
+ prompt.Run ();
- return RETVAL(response);
+ return NS_OK;
}
/* void alertCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
@@ -680,10 +677,10 @@ EphyPromptService::AlertCheck (nsIDOMWindow *aParent,
prompt.AddStockButton (GTK_STOCK_OK, GTK_RESPONSE_ACCEPT);
prompt.AddCheckbox (aCheckMsg, aCheckState);
- PRInt32 response = prompt.Run ();
+ prompt.Run ();
prompt.GetCheckboxState (aCheckState);
- return RETVAL(response);
+ return NS_OK;
}
/* boolean confirm (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText); */
@@ -698,9 +695,9 @@ EphyPromptService::Confirm (nsIDOMWindow *aParent,
Prompter prompt (GTK_STOCK_DIALOG_QUESTION, aParent, aDialogTitle, aText);
prompt.AddStockButton (GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
prompt.AddStockButton (GTK_STOCK_OK, GTK_RESPONSE_ACCEPT);
- PRInt32 response = prompt.Run (_retval);
+ prompt.Run (_retval);
- return RETVAL(response);
+ return NS_OK;
}
/* boolean confirmCheck (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
@@ -719,10 +716,10 @@ EphyPromptService::ConfirmCheck (nsIDOMWindow *aParent,
prompt.AddStockButton (GTK_STOCK_OK, GTK_RESPONSE_ACCEPT);
prompt.AddCheckbox (aCheckMsg, aCheckState);
- PRInt32 response = prompt.Run (_retval);
+ prompt.Run (_retval);
prompt.GetCheckboxState (aCheckState);
- return RETVAL(response);
+ return NS_OK;
}
/* PRInt32 confirmEx (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in unsigned long aButtonFlags, in wstring aButton0Title, in wstring aButton1Title, in wstring aButton2Title, in wstring aCheckMsg, inout boolean aCheckState); */
@@ -745,11 +742,10 @@ EphyPromptService::ConfirmEx (nsIDOMWindow *aParent,
aButton1Title, aButton2Title);
prompt.AddCheckbox (aCheckMsg, aCheckState);
- PRInt32 response = prompt.Run (nsnull);
- *_retval = response;
+ *_retval = prompt.Run (nsnull);
prompt.GetCheckboxState (aCheckState);
- return RETVAL(response);
+ return NS_OK;
}
/* boolean prompt (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aValue, in wstring aCheckMsg, inout boolean aCheckState); */
@@ -771,11 +767,11 @@ EphyPromptService::Prompt (nsIDOMWindow *aParent,
prompt.AddEntry (nsnull, *aValue, PR_FALSE);
prompt.AddCheckbox (aCheckMsg, aCheckState);
- PRInt32 response = prompt.Run (_retval);
+ prompt.Run (_retval);
prompt.GetText (0, aValue);
prompt.GetCheckboxState (aCheckState);
- return RETVAL(response);
+ return NS_OK;
}
/* boolean promptUsernameAndPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aUsername, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
@@ -800,12 +796,12 @@ EphyPromptService::PromptUsernameAndPassword (nsIDOMWindow *aParent,
prompt.AddEntry (_("_Password:"), *aPassword, PR_TRUE);
prompt.AddCheckbox (aCheckMsg, aCheckState);
- PRInt32 response = prompt.Run (_retval);
+ prompt.Run (_retval);
prompt.GetText (0, aUsername);
prompt.GetText (1, aPassword);
prompt.GetCheckboxState (aCheckState);
- return RETVAL(response);
+ return NS_OK;
}
/* boolean promptPassword (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
@@ -829,11 +825,11 @@ EphyPromptService::PromptPassword (nsIDOMWindow *aParent,
// FIXME: Add a CAPSLOCK indicator?
- PRInt32 response = prompt.Run (_retval);
+ prompt.Run (_retval);
prompt.GetText (0, aPassword);
prompt.GetCheckboxState (aCheckState);
- return RETVAL(response);
+ return NS_OK;
}
/* boolean select (in nsIDOMWindow aParent, in wstring aDialogTitle, in wstring aText, in PRUint32 aCount, [array, size_is (aCount)] in wstring aSelectList, out long aOutSelection); */
@@ -854,10 +850,10 @@ EphyPromptService::Select (nsIDOMWindow *aParent,
prompt.AddStockButton (GTK_STOCK_OK, GTK_RESPONSE_ACCEPT);
prompt.AddSelect (aCount, aSelectList, *aOutSelection);
- PRInt32 response = prompt.Run (_retval);
+ prompt.Run (_retval);
prompt.GetSelected (aOutSelection);
- return RETVAL(response);
+ return NS_OK;
}
#if HAVE_NSINONBLOCKINGALERTSERVICE_H
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c
index 2f49b42f5..b7fa0951d 100755
--- a/lib/egg/egg-editable-toolbar.c
+++ b/lib/egg/egg-editable-toolbar.c
@@ -1685,8 +1685,7 @@ egg_editable_toolbar_set_fixed (EggEditableToolbar *etoolbar,
{
priv->fixed_toolbar = GTK_WIDGET (toolbar);
gtk_toolbar_set_show_arrow (toolbar, FALSE);
- g_object_ref (toolbar);
- gtk_object_sink (GTK_OBJECT (toolbar));
+ g_object_ref_sink (toolbar);
}
update_fixed (etoolbar);
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index f38742d03..ac21374ec 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -872,8 +872,7 @@ ephy_location_entry_init (EphyLocationEntry *le)
p->user_changed = TRUE;
p->tips = gtk_tooltips_new ();
- g_object_ref (p->tips);
- gtk_object_sink (GTK_OBJECT (p->tips));
+ g_object_ref_sink (p->tips);
ephy_location_entry_construct_contents (le);
diff --git a/lib/widgets/ephy-zoom-control.c b/lib/widgets/ephy-zoom-control.c
index cc24f61a6..040a00dba 100644
--- a/lib/widgets/ephy-zoom-control.c
+++ b/lib/widgets/ephy-zoom-control.c
@@ -137,8 +137,7 @@ ephy_zoom_control_init (EphyZoomControl *control)
p->combo = combo;
gtk_combo_box_set_focus_on_click (GTK_COMBO_BOX (p->combo), FALSE);
- g_object_ref (combo);
- gtk_object_sink (GTK_OBJECT (combo));
+ g_object_ref_sink (combo);
gtk_widget_show (GTK_WIDGET (combo));
i = ephy_zoom_get_zoom_level_index (p->zoom);
diff --git a/src/ephy-fullscreen-popup.c b/src/ephy-fullscreen-popup.c
index 77250fecd..ea6679ecf 100644
--- a/src/ephy-fullscreen-popup.c
+++ b/src/ephy-fullscreen-popup.c
@@ -239,8 +239,7 @@ ephy_fullscreen_popup_constructor (GType type,
gtk_window_set_resizable (window, FALSE);
priv->tooltips = gtk_tooltips_new ();
- g_object_ref (G_OBJECT (priv->tooltips));
- gtk_object_sink (GTK_OBJECT (priv->tooltips));
+ g_object_ref_sink (priv->tooltips);
hbox = gtk_hbox_new (FALSE, 2);
gtk_container_add (GTK_CONTAINER (window), hbox);
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c
index 23173b81f..001ac21f1 100644
--- a/src/ephy-notebook.c
+++ b/src/ephy-notebook.c
@@ -484,8 +484,7 @@ ephy_notebook_init (EphyNotebook *notebook)
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
notebook->priv->title_tips = gtk_tooltips_new ();
- g_object_ref (G_OBJECT (notebook->priv->title_tips));
- gtk_object_sink (GTK_OBJECT (notebook->priv->title_tips));
+ g_object_ref_sink (notebook->priv->title_tips);
notebook->priv->show_tabs = TRUE;
notebook->priv->dnd_enabled = TRUE;
diff --git a/src/ephy-statusbar.c b/src/ephy-statusbar.c
index 76778967c..44bc5b029 100755
--- a/src/ephy-statusbar.c
+++ b/src/ephy-statusbar.c
@@ -221,8 +221,7 @@ ephy_statusbar_init (EphyStatusbar *t)
t->priv = EPHY_STATUSBAR_GET_PRIVATE (t);
t->tooltips = gtk_tooltips_new ();
- g_object_ref (G_OBJECT (t->tooltips));
- gtk_object_sink (GTK_OBJECT (t->tooltips));
+ g_object_ref_sink (t->tooltips);
t->priv->icon_container = gtk_hbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (t), t->priv->icon_container, FALSE, FALSE, 0);