aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-07-20 19:05:16 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-07-20 19:05:16 +0800
commit370874c6ca4c695eeba57ec7f7d059830287e637 (patch)
tree83c191b8b9d5607404f405ec58511f383a6b0537 /lib
parentba9c622c3574f82c1662aa9f0c3d676a217a1066 (diff)
downloadgsoc2013-epiphany-370874c6ca4c695eeba57ec7f7d059830287e637.tar
gsoc2013-epiphany-370874c6ca4c695eeba57ec7f7d059830287e637.tar.gz
gsoc2013-epiphany-370874c6ca4c695eeba57ec7f7d059830287e637.tar.bz2
gsoc2013-epiphany-370874c6ca4c695eeba57ec7f7d059830287e637.tar.lz
gsoc2013-epiphany-370874c6ca4c695eeba57ec7f7d059830287e637.tar.xz
gsoc2013-epiphany-370874c6ca4c695eeba57ec7f7d059830287e637.tar.zst
gsoc2013-epiphany-370874c6ca4c695eeba57ec7f7d059830287e637.zip
Rework find implementation to integrate better with type ahead and to
2003-07-20 Marco Pesenti Gritti <marco@it.gnome.org> * embed/ephy-embed.c: (ephy_embed_find_set_properties), (ephy_embed_find_next): * embed/ephy-embed.h: * embed/find-dialog.c: (update_navigation_controls), (impl_show), (find_dialog_class_init), (set_properties), (sync_page_change), (sync_embed), (find_dialog_init), (find_dialog_finalize), (find_dialog_go_next), (find_dialog_go_prev), (find_close_button_clicked_cb), (find_next_button_clicked_cb), (find_prev_button_clicked_cb), (find_entry_changed_cb), (find_check_toggled_cb): * embed/find-dialog.h: * embed/mozilla/EphyWrapper.cpp: * embed/mozilla/EphyWrapper.h: * embed/mozilla/Makefile.am: * embed/mozilla/mozilla-embed.cpp: * lib/ephy-dialog.h: * src/ephy-window.c: (ephy_window_find): * src/ephy-window.h: * src/window-commands.c: (window_cmd_edit_find), (window_cmd_edit_find_next), (window_cmd_edit_find_prev): Rework find implementation to integrate better with type ahead and to simplify the code. Do not try to set menus sensitivity because mozilla doesnt provide an api for it and it breaks with type ahead. * lib/ephy-dialog.c: (ephy_dialog_class_init), (ephy_dialog_finalize), (dialog_destroy_cb), (impl_construct), (ephy_dialog_construct): Remove no more used destruct crap.
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-dialog.c42
-rw-r--r--lib/ephy-dialog.h3
2 files changed, 3 insertions, 42 deletions
diff --git a/lib/ephy-dialog.c b/lib/ephy-dialog.c
index aa5ed1a16..1b182e0aa 100644
--- a/lib/ephy-dialog.c
+++ b/lib/ephy-dialog.c
@@ -51,10 +51,6 @@ impl_construct (EphyDialog *dialog,
const EphyDialogProperty *properties,
const char *file,
const char *name);
-
-static void
-impl_destruct (EphyDialog *dialog);
-
static GtkWidget *
impl_get_control (EphyDialog *dialog,
int property_id);
@@ -161,7 +157,6 @@ ephy_dialog_class_init (EphyDialogClass *klass)
klass->get_value = impl_get_value;
klass->run = impl_run;
klass->show = impl_show;
- klass->destruct = impl_destruct;
g_object_class_install_property (object_class,
PROP_PARENT_WINDOW,
@@ -939,7 +934,7 @@ ephy_dialog_finalize (GObject *object)
if (dialog->priv->dialog)
{
- ephy_dialog_destruct (dialog);
+ gtk_widget_destroy (dialog->priv->dialog);
}
free_props (dialog->priv->props);
@@ -1065,15 +1060,6 @@ init_props (const EphyDialogProperty *properties, GladeXML *gxml)
}
static void
-dialog_destruction_notify (EphyDialog *dialog,
- GObject *where_the_object_was)
-{
- dialog->priv->dialog = NULL;
- ephy_dialog_destruct (dialog);
- g_object_unref (dialog);
-}
-
-static void
dialog_destroy_cb (GtkWidget *widget, EphyDialog *dialog)
{
if (dialog->priv->props &&
@@ -1081,6 +1067,8 @@ dialog_destroy_cb (GtkWidget *widget, EphyDialog *dialog)
{
save_props (dialog->priv->props);
}
+
+ g_object_unref (dialog);
}
static void
@@ -1110,23 +1098,6 @@ impl_construct (EphyDialog *dialog,
dialog);
g_object_unref (gxml);
-
- g_object_weak_ref (G_OBJECT(dialog->priv->dialog),
- (GWeakNotify)dialog_destruction_notify,
- dialog);
-}
-
-static void
-impl_destruct (EphyDialog *dialog)
-{
- if (dialog->priv->dialog)
- {
- g_object_weak_unref (G_OBJECT(dialog->priv->dialog),
- (GWeakNotify)dialog_destruction_notify,
- dialog);
- gtk_widget_destroy (dialog->priv->dialog);
- dialog->priv->dialog = NULL;
- }
}
static GtkWidget *
@@ -1245,13 +1216,6 @@ ephy_dialog_construct (EphyDialog *dialog,
return klass->construct (dialog, properties, file, name);
}
-void
-ephy_dialog_destruct (EphyDialog *dialog)
-{
- EphyDialogClass *klass = EPHY_DIALOG_GET_CLASS (dialog);
- klass->destruct (dialog);
-}
-
gint
ephy_dialog_run (EphyDialog *dialog)
{
diff --git a/lib/ephy-dialog.h b/lib/ephy-dialog.h
index 9bc054e6b..646c146fc 100644
--- a/lib/ephy-dialog.h
+++ b/lib/ephy-dialog.h
@@ -71,7 +71,6 @@ struct EphyDialogClass
const EphyDialogProperty *properties,
const char *file,
const char *name);
- void (* destruct) (EphyDialog *dialog);
gint (* run) (EphyDialog *dialog);
void (* show) (EphyDialog *dialog);
GtkWidget * (* get_control) (EphyDialog *dialog,
@@ -92,8 +91,6 @@ void ephy_dialog_construct (EphyDialog *dialog,
const char *file,
const char *name);
-void ephy_dialog_destruct (EphyDialog *dialog);
-
void ephy_dialog_add_enum (EphyDialog *dialog,
int id,
guint n_items,