After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 607344 - GtkCalendar: crash when using tooltips via glade
GtkCalendar: crash when using tooltips via glade
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkCalendar
2.18.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-01-18 18:48 UTC by Bill Nottingham
Modified: 2010-02-09 02:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bill Nottingham 2010-01-18 18:48:13 UTC
This comes from bug 563598 and bug 593894, in GnuCash.

GnuCash 2.2.x sets up a calendar widget in glade, as so:

            <widget class="GtkCalendar" id="chart-calendar">
              <property name="width_request">215</property>
              <property name="height_request">180</property>
              <property name="visible">True</property>
              <property name="tooltip" translatable="yes">Future dates are not supported</property>
              <property name="can_focus">True</property>
              <property name="display_options">GTK_CALENDAR_SHOW_HEADING|GTK_CALENDAR_SHOW_DAY_NAMES</property>
            </widget>

It doesn't do any other manipulation of the widget, such as setting a detail function.

However, the fact that it sets a tooltip causes the following:

-> mouseover
--> gtk_calendar_query_tooltip
---> gtk_calendar_get_detail

...
  return priv->detail_func (calendar,
                            year, month,
                            calendar->day[row][column],
                            priv->detail_func_user_data);
...
---> crash.

Should it be documented that setting a generic tooltip should require setting a details function? Is setting a generic tooltip nonsensical on a calendar widget? (It was removed in the 2.3.x branch to work around the crash.) Or should query_tooltip check priv->detail_func before calling _get_detail?
Comment 1 Matthias Clasen 2010-02-09 02:23:03 UTC
Fixed in master, will cherry-pick for 2.18 in a bit.