I have no idea where should we free private SpokeSelector variables.. I haven't found any structure or call for that.. any idea? --- widgets/src/SpokeSelector.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/widgets/src/SpokeSelector.c b/widgets/src/SpokeSelector.c index f4247a6..bb2162e 100644 --- a/widgets/src/SpokeSelector.c +++ b/widgets/src/SpokeSelector.c @@ -58,12 +58,14 @@ struct _AnacondaSpokeSelectorPrivate { GtkWidget *icon, *incomplete_icon; GtkWidget *title_label; GtkWidget *status_label; + GdkCursor *cursor; }; G_DEFINE_TYPE(AnacondaSpokeSelector, anaconda_spoke_selector, GTK_TYPE_EVENT_BOX) static void anaconda_spoke_selector_get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); static void anaconda_spoke_selector_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); +static void anaconda_spoke_selector_realize(GtkWidget *widget, gpointer user_data); static gboolean anaconda_spoke_selector_focus_changed(GtkWidget *widget, GdkEventFocus *event, gpointer user_data); @@ -156,6 +158,11 @@ static void anaconda_spoke_selector_init(AnacondaSpokeSelector *spoke) { g_signal_connect(spoke, "focus-in-event", G_CALLBACK(anaconda_spoke_selector_focus_changed), NULL); g_signal_connect(spoke, "focus-out-event", G_CALLBACK(anaconda_spoke_selector_focus_changed), NULL); + /* Set "hand" cursor shape when over the selector */ + spoke->priv->cursor = gdk_cursor_new(GDK_HAND2); + g_signal_connect(spoke, "realize", G_CALLBACK(anaconda_spoke_selector_realize), NULL); + /* TODO free the cursor when not needed */ + /* Set property defaults. */ spoke->priv->is_incomplete = FALSE; @@ -284,3 +291,9 @@ static gboolean anaconda_spoke_selector_focus_changed(GtkWidget *widget, GdkEven gtk_widget_set_state_flags(widget, new_state, TRUE); return FALSE; } + +static void anaconda_spoke_selector_realize(GtkWidget *widget, gpointer user_data) { + AnacondaSpokeSelector *spoke_selector = ANACONDA_SPOKE_SELECTOR(widget); + + gdk_window_set_cursor(gtk_widget_get_window(widget), spoke_selector->priv->cursor); +} -- 1.7.10.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list