aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2007-07-10 21:01:12 +0800
committerChristian Persch <chpe@src.gnome.org>2007-07-10 21:01:12 +0800
commiteb8cdb0537d915671d7caea311e3d74d24b03085 (patch)
tree2d0f2751e24886c9216cf35c9750084dfb8f08d9 /lib/widgets
parent89d4455a3bb8f1f230364c2cd83cd251d3d4244e (diff)
downloadgsoc2013-epiphany-eb8cdb0537d915671d7caea311e3d74d24b03085.tar
gsoc2013-epiphany-eb8cdb0537d915671d7caea311e3d74d24b03085.tar.gz
gsoc2013-epiphany-eb8cdb0537d915671d7caea311e3d74d24b03085.tar.bz2
gsoc2013-epiphany-eb8cdb0537d915671d7caea311e3d74d24b03085.tar.lz
gsoc2013-epiphany-eb8cdb0537d915671d7caea311e3d74d24b03085.tar.xz
gsoc2013-epiphany-eb8cdb0537d915671d7caea311e3d74d24b03085.tar.zst
gsoc2013-epiphany-eb8cdb0537d915671d7caea311e3d74d24b03085.zip
Port to new tooltips API.
2007-07-10 Christian Persch <chpe@gnome.org> * lib/widgets/ephy-zoom-action.c: (ephy_zoom_action_class_init): * lib/widgets/ephy-zoom-control.c: (ephy_zoom_control_class_init): Port to new tooltips API. svn path=/trunk/; revision=7136
Diffstat (limited to 'lib/widgets')
-rw-r--r--lib/widgets/ephy-zoom-action.c6
-rw-r--r--lib/widgets/ephy-zoom-control.c61
2 files changed, 4 insertions, 63 deletions
diff --git a/lib/widgets/ephy-zoom-action.c b/lib/widgets/ephy-zoom-action.c
index 1799fd2c8..1b6352baf 100644
--- a/lib/widgets/ephy-zoom-action.c
+++ b/lib/widgets/ephy-zoom-action.c
@@ -226,16 +226,14 @@ ephy_zoom_action_class_init (EphyZoomActionClass *class)
g_object_class_install_property (object_class,
PROP_ZOOM,
- g_param_spec_float ("zoom",
- "Zoom",
- "Zoom",
+ g_param_spec_float ("zoom", NULL, NULL,
ZOOM_MINIMAL,
ZOOM_MAXIMAL,
1.0,
G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
signals[ZOOM_TO_LEVEL_SIGNAL] =
- g_signal_new ("zoom_to_level",
+ g_signal_new ("zoom-to-level",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (EphyZoomActionClass, zoom_to_level),
diff --git a/lib/widgets/ephy-zoom-control.c b/lib/widgets/ephy-zoom-control.c
index 485aabce0..90e30281a 100644
--- a/lib/widgets/ephy-zoom-control.c
+++ b/lib/widgets/ephy-zoom-control.c
@@ -27,7 +27,6 @@
#include <gtk/gtk.h>
#include <gtk/gtkcombobox.h>
-#include <gtk/gtktooltips.h>
#include <glib/gi18n.h>
#define EPHY_ZOOM_CONTROL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_ZOOM_CONTROL, EphyZoomControlPrivate))
@@ -197,58 +196,6 @@ ephy_zoom_control_get_property (GObject *object,
}
static void
-set_combo_tooltip (GtkWidget *widget,
- GtkTooltipsData *data)
-{
- if (GTK_IS_BUTTON (widget))
- {
- gtk_tooltips_set_tip (data->tooltips, widget,
- data->tip_text, data->tip_private);
- }
-}
-
-static void
-combo_realized (GtkWidget *combo,
- GtkWidget *control)
-{
- GtkTooltipsData *data;
-
- data = gtk_tooltips_data_get (control);
- g_return_if_fail (data != NULL);
-
- gtk_container_forall (GTK_CONTAINER (combo),
- (GtkCallback) set_combo_tooltip, data);
-}
-
-static gboolean
-ephy_zoom_control_set_tooltip (GtkToolItem *tool_item,
- GtkTooltips *tooltips,
- const char *tip_text,
- const char *tip_private)
-{
- EphyZoomControl *control = EPHY_ZOOM_CONTROL (tool_item);
- GtkWidget *widget = GTK_WIDGET (tool_item);
-
- /* hack to make tooltips work also on Ctrl-F1 */
- gtk_tooltips_set_tip (tooltips, widget, tip_text, tip_private);
-
- g_signal_handlers_disconnect_by_func
- (control->priv->combo, G_CALLBACK (combo_realized), widget);
-
- if (GTK_WIDGET_REALIZED (tool_item))
- {
- combo_realized (GTK_WIDGET (control->priv->combo), widget);
- }
- else
- {
- g_signal_connect_after (control->priv->combo, "realize",
- G_CALLBACK (combo_realized), widget);
- }
-
- return TRUE;
-}
-
-static void
ephy_zoom_control_class_init (EphyZoomControlClass *klass)
{
GObjectClass *object_class;
@@ -263,20 +210,16 @@ ephy_zoom_control_class_init (EphyZoomControlClass *klass)
object_class->get_property = ephy_zoom_control_get_property;
object_class->finalize = ephy_zoom_control_finalize;
- tool_item_class->set_tooltip = ephy_zoom_control_set_tooltip;
-
g_object_class_install_property (object_class,
PROP_ZOOM,
- g_param_spec_float ("zoom",
- "Zoom",
- "Zoom level to display in the item.",
+ g_param_spec_float ("zoom", NULL, NULL,
ZOOM_MINIMAL,
ZOOM_MAXIMAL,
1.0,
G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
signals[ZOOM_TO_LEVEL_SIGNAL] =
- g_signal_new ("zoom_to_level",
+ g_signal_new ("zoom-to-level",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EphyZoomControlClass,