From 1730a037daf5c370cc61bf8babd5c40fd816ef8a Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 13 May 2003 18:22:35 +0000 Subject: Revert api change. So we keep 2.2 compatibility. 2003-05-13 Marco Pesenti Gritti * embed/mozilla/ExternalProtocolService.cpp: Revert api change. So we keep 2.2 compatibility. * lib/widgets/ephy-location-entry.c: (ephy_location_entry_class_init), (location_focus_out_cb), (ephy_location_entry_activate_cb): * lib/widgets/ephy-location-entry.h: Add a finished callback to know when the user finished using location. * src/bookmarks/ephy-bookmarks.c: (history_site_visited_cb), (ephy_bookmarks_set_icon): Remove unused vars. Bad xan. * src/toolbar.c: (location_finished_cb), (toolbar_activate_location): Show the toolbar on ctrl+l, hide it again when the user finished to edit (focus out/activate) --- lib/widgets/ephy-location-entry.c | 14 ++++++++++++++ lib/widgets/ephy-location-entry.h | 1 + 2 files changed, 15 insertions(+) (limited to 'lib') diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c index 15bcac979..0db0694ee 100644 --- a/lib/widgets/ephy-location-entry.c +++ b/lib/widgets/ephy-location-entry.c @@ -95,6 +95,7 @@ static gpointer gtk_hbox_class; */ enum EphyLocationEntrySignalsEnum { ACTIVATED, + FINISHED, LAST_SIGNAL }; static gint EphyLocationEntrySignals[LAST_SIGNAL]; @@ -123,6 +124,15 @@ ephy_location_entry_class_init (EphyLocationEntryClass *klass) 2, G_TYPE_STRING, G_TYPE_STRING); + EphyLocationEntrySignals[FINISHED] = g_signal_new ( + "finished", G_OBJECT_CLASS_TYPE (klass), + G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST | G_SIGNAL_RUN_CLEANUP, + G_STRUCT_OFFSET (EphyLocationEntryClass, finished), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, + 0, + G_TYPE_NONE); } static gboolean @@ -130,6 +140,8 @@ location_focus_out_cb (GtkWidget *widget, GdkEventFocus *event, EphyLocationEntr { w->priv->editing = FALSE; + g_signal_emit (w, EphyLocationEntrySignals[FINISHED], 0); + return FALSE; } @@ -435,6 +447,8 @@ ephy_location_entry_activate_cb (GtkEntry *entry, EphyLocationEntry *w) w->priv->editing = FALSE; g_signal_emit (w, EphyLocationEntrySignals[ACTIVATED], 0, target, content); + g_signal_emit (w, EphyLocationEntrySignals[FINISHED], 0); + g_free (content); } diff --git a/lib/widgets/ephy-location-entry.h b/lib/widgets/ephy-location-entry.h index 5a7014bae..1b9f37f25 100644 --- a/lib/widgets/ephy-location-entry.h +++ b/lib/widgets/ephy-location-entry.h @@ -52,6 +52,7 @@ struct _EphyLocationEntryClass void (*activated) (EphyLocationEntry *w, const char *content, const char *target); + void (*finished) (EphyLocationEntry *w); }; /* Remember: fields are public read-only */ -- cgit v1.2.3