gnumeric r16742 - in trunk: . src/widgets
- From: jody svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16742 - in trunk: . src/widgets
- Date: Wed, 20 Aug 2008 11:14:20 +0000 (UTC)
Author: jody
Date: Wed Aug 20 11:14:20 2008
New Revision: 16742
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16742&view=rev
Log:
Merge branch 'editable-label'
Modified:
trunk/NEWS
trunk/src/widgets/ChangeLog
trunk/src/widgets/widget-editable-label.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Aug 20 11:14:20 2008
@@ -14,6 +14,7 @@
* Name guru defaults to absolute references.
* Add mnemonics to the quit dialog. [#132131]
* Odd renaming of some long file names on windows. [#542872]
+ * Fix cusor in tab labels. [#546981]
Morten:
* Fix EOMONTH issue. [#540069]
Modified: trunk/src/widgets/widget-editable-label.c
==============================================================================
--- trunk/src/widgets/widget-editable-label.c (original)
+++ trunk/src/widgets/widget-editable-label.c Wed Aug 20 11:14:20 2008
@@ -33,7 +33,7 @@
#include <string.h>
-static GtkObjectClass *parent_class = NULL;
+static GtkWidgetClass *parent_class = NULL;
#define EDITABLE_LABEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST (k), EDITABLE_LABEL_TYPE)
struct _EditableLabel {
@@ -158,7 +158,7 @@
el_cancel_editing (el);
- parent_class->destroy (object);
+ ((GtkObjectClass *)parent_class)->destroy (object);
}
static gint
@@ -182,7 +182,7 @@
if (el->unedited_text == NULL)
return FALSE;
- return ((GtkWidgetClass *)parent_class)->button_press_event (widget, button);
+ return parent_class->button_press_event (widget, button);
}
/*
@@ -203,7 +203,7 @@
return TRUE;
}
- return ((GtkWidgetClass *)parent_class)->key_press_event (w, event);
+ return parent_class->key_press_event (w, event);
}
static void
@@ -213,7 +213,7 @@
PangoLayoutLine *line;
PangoLayout *layout;
- ((GtkWidgetClass *)parent_class)->size_request (el, req);
+ parent_class->size_request (el, req);
layout = gtk_entry_get_layout (GTK_ENTRY (el));
line = pango_layout_get_lines (layout)->data;
pango_layout_line_get_extents (line, NULL, &logical_rect);
@@ -224,10 +224,19 @@
static void
el_entry_realize (GtkWidget *widget)
{
- ((GtkWidgetClass *)parent_class)->realize (widget);
+ parent_class->realize (widget);
el_set_cursor (GTK_ENTRY (widget), GDK_HAND2);
}
+static void
+el_state_changed (GtkWidget *widget, GtkStateType previous_state)
+{
+ parent_class->state_changed (widget, previous_state);
+ /* GtkEntry::state_changed changes the cursor */
+ if (GTK_WIDGET_REALIZED (widget))
+ el_set_cursor (GTK_ENTRY (widget), GDK_HAND2);
+}
+
static gint
el_motion_notify (GtkWidget *widget,
GdkEventMotion *event)
@@ -259,6 +268,7 @@
widget_class->size_request = el_size_request;
widget_class->realize = el_entry_realize;
widget_class->motion_notify_event = el_motion_notify;
+ widget_class->state_changed = el_state_changed;
el_signals [EDIT_FINISHED] = g_signal_new ("edit_finished",
EDITABLE_LABEL_TYPE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]