[Glade-users] adding custom widgets written with Gtkmm



On Sat, Sep 20, 2008 at 11:48 AM, Tristan Wibberley
<tristan at wibberley.org> wrote:
Tristan, (it feels really weird addressing an email to "Tristan" as I've
never met anybody with the same name as me before :)

You have to start somewhere :) Im 29 yrs old and Ive met about 4.

[...]
glade-3 now says (upon adding my widget to a toplevel !YAY!):

**
** Gtk:ERROR:(/build/buildd/gtk
+2.0-2.12.9/gtk/gtkwidget.c:7967):gtk_widget_real_realize: assertion
failed: (GTK_WIDGET_NO_WINDOW (widget))
Aborted

Please tell me that your widget already works and that your
not making your tests in an experimental glade environment :D

Just have to double check ;-)

What does "/gtk/gtkwidget.c:7967):gtk_widget_real_realize()" have to
say about it, did you look at the source around the assertion ?

I think your widget may try to create a widget->window when you
didnt unset the GTK_WIDGET_NO_WINDOW flag in your init()
routine, something like that.

Cheers,
                -Tristan


nm now says (ignore the _Z* symbols - they are c++ stuff)

tristan at maihem:~/dev/anjuta/src$ nm .libs/libcustom.so
0000000000208f30 d DW.ref.__gxx_personality_v0
00000000002089a8 a _DYNAMIC
0000000000208cd8 a _GLOBAL_OFFSET_TABLE_
0000000000005cb0 t _GLOBAL__I_diffscroll.cc
                w _Jv_RegisterClasses
                U _Unwind_Resume@@GCC_3.0
                U _ZN3Atk11Implementor21ref_accessibile_vfuncEv
                U _ZN3Atk11ImplementorD0Ev
                U _ZN3Atk11ImplementorD1Ev
                U
_ZN3Gdk5Cairo16set_source_colorERN5Cairo6RefPtrINS1_7ContextEEERKNS_5ColorE
                U _ZN3Gdk5ColorC1ERKN4Glib7ustringE
                U _ZN3Gdk5ColorD1Ev
                U _ZN3Gdk6Window11move_resizeEiiii
                U _ZN3Gdk6Window13set_user_dataEPv
                U
_ZN3Gdk6Window6createERKN4Glib6RefPtrIS0_EEP14_GdkWindowAttri
                U _ZN3Gdk8Drawable20create_cairo_contextEv
                U _ZN3Gtk6Object10set_manageEv
                U _ZN3Gtk6Object15destroy_notify_Ev
                U _ZN3Gtk6ObjectD0Ev
                U _ZN3Gtk6ObjectD1Ev
                U _ZN3Gtk6Widget10get_windowEv
                U _ZN3Gtk6Widget10on_realizeEv
                U
_ZN3Gtk6Widget10set_windowERKN4Glib6RefPtrIN3Gdk6WindowEEE
                U
_ZN3Gtk6Widget11on_drag_endERKN4Glib6RefPtrIN3Gdk11DragContextEEE
                U _ZN3Gtk6Widget11unset_flagsENS_11WidgetFlagsE
                U _ZN3Gtk6Widget12ensure_styleEv
                U
_ZN3Gtk6Widget12on_drag_dropERKN4Glib6RefPtrIN3Gdk11DragContextEEEiij
                U _ZN3Gtk6Widget12on_map_eventEP12_GdkEventAny
                U _ZN3Gtk6Widget12on_unrealizeEv
                U
_ZN3Gtk6Widget13on_drag_beginERKN4Glib6RefPtrIN3Gdk11DragContextEEE
                U
_ZN3Gtk6Widget13on_drag_leaveERKN4Glib6RefPtrIN3Gdk11DragContextEEEj
                U _ZN3Gtk6Widget13on_grab_focusEv
                U _ZN3Gtk6Widget14hide_all_vfuncEv
                U
_ZN3Gtk6Widget14on_drag_motionERKN4Glib6RefPtrIN3Gdk11DragContextEEEiij
                U _ZN3Gtk6Widget14on_grab_notifyEb
                U _ZN3Gtk6Widget14on_unmap_eventEP12_GdkEventAny
                U _ZN3Gtk6Widget14set_allocationERKN3Gdk9RectangleE
                U _ZN3Gtk6Widget14show_all_vfuncEv
                U _ZN3Gtk6Widget15on_child_notifyEP11_GParamSpec
                U _ZN3Gtk6Widget15on_client_eventEP15_GdkEventClient
                U _ZN3Gtk6Widget15on_delete_eventEP12_GdkEventAny
                U _ZN3Gtk6Widget15on_expose_eventEP15_GdkEventExpose
                U _ZN3Gtk6Widget15on_scroll_eventEP15_GdkEventScroll
                U _ZN3Gtk6Widget15on_size_requestEP15_GtkRequisition
                U
_ZN3Gtk6Widget16on_drag_data_getERKN4Glib6RefPtrIN3Gdk11DragContextEEERNS_13SelectionDataEjj
                U
_ZN3Gtk6Widget16on_selection_getERNS_13SelectionDataEjj
                U _ZN3Gtk6Widget16on_size_allocateERN3Gdk9RectangleE
                U _ZN3Gtk6Widget16on_state_changedENS_9StateTypeE
                U
_ZN3Gtk6Widget16on_style_changedERKN4Glib6RefPtrINS_5StyleEEE
                U _ZN3Gtk6Widget17on_focus_in_eventEP14_GdkEventFocus
                U _ZN3Gtk6Widget17on_get_accessibleEv
                U _ZN3Gtk6Widget17on_parent_changedEPS0_
                U
_ZN3Gtk6Widget17on_screen_changedERKN4Glib6RefPtrIN3Gdk6ScreenEEE
                U
_ZN3Gtk6Widget18on_configure_eventEP18_GdkEventConfigure
                U _ZN3Gtk6Widget18on_focus_out_eventEP14_GdkEventFocus
                U _ZN3Gtk6Widget18on_key_press_eventEP12_GdkEventKey
                U _ZN3Gtk6Widget18on_no_expose_eventEP12_GdkEventAny
                U
_ZN3Gtk6Widget19on_drag_data_deleteERKN4Glib6RefPtrIN3Gdk11DragContextEEE
                U _ZN3Gtk6Widget20get_accessible_vfuncEv
                U
_ZN3Gtk6Widget20on_direction_changedENS_13TextDirectionE
                U _ZN3Gtk6Widget20on_hierarchy_changedEPS0_
                U _ZN3Gtk6Widget20on_key_release_eventEP12_GdkEventKey
                U _ZN3Gtk6Widget20on_mnemonic_activateEb
                U
_ZN3Gtk6Widget21on_button_press_eventEP15_GdkEventButton
                U
_ZN3Gtk6Widget21on_drag_data_receivedERKN4Glib6RefPtrIN3Gdk11DragContextEEEiiRKNS_13SelectionDataEjj
                U
_ZN3Gtk6Widget21on_enter_notify_eventEP17_GdkEventCrossing
                U
_ZN3Gtk6Widget21on_leave_notify_eventEP17_GdkEventCrossing
                U
_ZN3Gtk6Widget21on_proximity_in_eventEP18_GdkEventProximity
                U
_ZN3Gtk6Widget21on_selection_receivedERKNS_13SelectionDataEj
                U
_ZN3Gtk6Widget21on_window_state_eventEP20_GdkEventWindowState
                U
_ZN3Gtk6Widget22on_motion_notify_eventEP15_GdkEventMotion
                U
_ZN3Gtk6Widget22on_proximity_out_eventEP18_GdkEventProximity
                U
_ZN3Gtk6Widget23on_button_release_eventEP15_GdkEventButton
                U
_ZN3Gtk6Widget24on_property_notify_eventEP17_GdkEventProperty
                U
_ZN3Gtk6Widget24on_selection_clear_eventEP18_GdkEventSelection
                U
_ZN3Gtk6Widget25on_selection_notify_eventEP18_GdkEventSelection
                U
_ZN3Gtk6Widget26on_selection_request_eventEP18_GdkEventSelection
                U
_ZN3Gtk6Widget26on_visibility_notify_eventEP19_GdkEventVisibility
                U
_ZN3Gtk6Widget39dispatch_child_properties_changed_vfuncEjPP11_GParamSpec
                U _ZN3Gtk6Widget6on_mapEv
                U _ZN3Gtk6Widget7on_hideEv
                U _ZN3Gtk6Widget7on_showEv
                U _ZN3Gtk6Widget8get_typeEv
                U _ZN3Gtk6Widget8on_eventEP9_GdkEvent
                U _ZN3Gtk6Widget8on_focusENS_13DirectionTypeE
                U _ZN3Gtk6Widget8on_unmapEv
                U _ZN3Gtk6Widget9get_styleEv
                U _ZN3Gtk6Widget9modify_bgENS_9StateTypeERKN3Gdk5ColorE
                U _ZN3Gtk6Widget9modify_fgENS_9StateTypeERKN3Gdk5ColorE
                U _ZN3Gtk6Widget9set_flagsENS_11WidgetFlagsE
                U _ZN3Gtk6WidgetC2Ev
                U _ZN3Gtk6WidgetD0Ev
                U _ZN3Gtk6WidgetD1Ev
                U _ZN3Gtk6WidgetD2Ev
                U _ZN4Glib10ObjectBase10set_manageEv
                U _ZN4Glib10ObjectBase15destroy_notify_Ev
                U _ZN4Glib10ObjectBaseC2EPKc
                U _ZN4Glib10ObjectBaseD2Ev
                U _ZN4Glib5ValueIiE10value_typeEv
                U _ZN4Glib6ObjectD0Ev
                U _ZN4Glib6ObjectD1Ev
0000000000006d90 W _ZN4Glib6RefPtrIN3Gdk6WindowEED1Ev
                U _ZN4Glib7ustringC1EPKc
                U _ZN4Glib7ustringD1Ev
                U _ZN4Glib9InterfaceD0Ev
                U _ZN4Glib9InterfaceD1Ev
                U _ZN4Glib9ValueBase4initEm
                U _ZN4Glib9ValueBaseC2Ev
                U _ZN4Glib9ValueBaseD2Ev
                U _ZN4sigc9trackableC2Ev
                U _ZN4sigc9trackableD2Ev
                U _ZN5Cairo7Context4clipEv
                U _ZN5Cairo7Context5paintEv
                U _ZN5Cairo7Context6strokeEv
                U _ZN5Cairo7Context7line_toEdd
                U _ZN5Cairo7Context7move_toEdd
                U _ZN5Cairo7Context9rectangleEdddd
0000000000006510 T _ZN8MyWidget10on_realizeEv
0000000000006000 T _ZN8MyWidget12on_unrealizeEv
00000000000068a0 T _ZN8MyWidget15on_expose_eventEP15_GdkEventExpose
0000000000005c80 T _ZN8MyWidget15on_size_requestEP15_GtkRequisition
0000000000005ce0 T _ZN8MyWidget16on_size_allocateERN3Gdk9RectangleE
0000000000005c90 T _ZN8MyWidget6on_mapEv
0000000000005ca0 T _ZN8MyWidget8on_unmapEv
0000000000006030 T _ZN8MyWidgetC1Ev
00000000000062f0 T _ZN8MyWidgetC2Ev
0000000000005dc0 T _ZN8MyWidgetD0Ev
0000000000005ec0 T _ZN8MyWidgetD1Ev
0000000000005f90 T _ZN8MyWidgetD2Ev
                U _ZNK3Gdk9Rectangle10get_heightEv
                U _ZNK3Gdk9Rectangle5get_xEv
                U _ZNK3Gdk9Rectangle5get_yEv
                U _ZNK3Gdk9Rectangle9get_widthEv
                U _ZNK3Gtk5Style6get_bgENS_9StateTypeE
                U _ZNK3Gtk5Style6get_fgENS_9StateTypeE
                U _ZNK3Gtk6Widget10get_eventsEv
                U _ZNK3Gtk6Widget14get_allocationEv
0000000000006dc0 W
_ZNK3Gtk6Widget18get_style_propertyIiEEvRKN4Glib7ustringERT_
                U
_ZNK3Gtk6Widget24get_style_property_valueERKN4Glib7ustringERNS1_9ValueBaseE
                U _ZNK4Glib10ObjectBase11unreferenceEv
                U _ZNK4Glib10ObjectBase9referenceEv
                U _ZNK4Glib5ValueIiE3getEv
                U _ZNSo3putEc@@GLIBCXX_3.4
                U _ZNSo5flushEv@@GLIBCXX_3.4
                U _ZNSolsEi@@GLIBCXX_3.4
                U _ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4
                U _ZNSt8ios_base4InitD1Ev@@GLIBCXX_3.4
                U
_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate@@GLIBCXX_3.4
                U
_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l@@GLIBCXX_3.4.9
                U _ZSt16__throw_bad_castv@@GLIBCXX_3.4
                U _ZSt4cout@@GLIBCXX_3.4
0000000000208f48 b _ZStL8__ioinit
0000000000208680 V _ZTC8MyWidget0_N3Gtk6ObjectE
00000000002083a0 V _ZTC8MyWidget0_N3Gtk6WidgetE
0000000000208740 V _ZTC8MyWidget0_N4Glib6ObjectE
00000000002087e0 V _ZTC8MyWidget16_N3Atk11ImplementorE
00000000002088a0 V _ZTC8MyWidget16_N4Glib9InterfaceE
0000000000208940 V _ZTC8MyWidget40_N4Glib10ObjectBaseE
0000000000208990 V _ZTI8MyWidget
                U _ZTIN3Atk11ImplementorE
                U _ZTIN3Gtk6ObjectE
                U _ZTIN3Gtk6WidgetE
                U _ZTIN4Glib10ObjectBaseE
                U _ZTIN4Glib6ObjectE
                U _ZTIN4Glib9InterfaceE
0000000000006f68 V _ZTS8MyWidget
0000000000208320 V _ZTT8MyWidget
0000000000208040 V _ZTV8MyWidget
                U _ZTVN10__cxxabiv120__si_class_type_infoE@@CXXABI_1.3
                U _ZThn16_N3Gtk6WidgetD0Ev
                U _ZThn16_N3Gtk6WidgetD1Ev
0000000000005db0 T _ZThn16_N8MyWidgetD0Ev
0000000000005eb0 T _ZThn16_N8MyWidgetD1Ev
                U _ZTv0_n32_N3Atk11ImplementorD0Ev
                U _ZTv0_n32_N3Atk11ImplementorD1Ev
                U _ZTv0_n32_N3Gtk6ObjectD0Ev
                U _ZTv0_n32_N3Gtk6ObjectD1Ev
                U _ZTv0_n32_N3Gtk6WidgetD0Ev
                U _ZTv0_n32_N3Gtk6WidgetD1Ev
                U _ZTv0_n32_N4Glib6ObjectD0Ev
                U _ZTv0_n32_N4Glib6ObjectD1Ev
                U _ZTv0_n32_N4Glib9InterfaceD0Ev
                U _ZTv0_n32_N4Glib9InterfaceD1Ev
0000000000005da0 T _ZTv0_n32_N8MyWidgetD0Ev
0000000000005ea0 T _ZTv0_n32_N8MyWidgetD1Ev
                U _ZTv0_n56_N3Gtk6Object15destroy_notify_Ev
                U _ZTv0_n64_N3Gtk6Object10set_manageEv
                U _ZdlPv@@GLIBCXX_3.4
                U _Znwm@@GLIBCXX_3.4
0000000000208010 d __CTOR_END__
0000000000208000 d __CTOR_LIST__
0000000000208020 d __DTOR_END__
0000000000208018 d __DTOR_LIST__
0000000000007340 r __FRAME_END__
0000000000208028 d __JCR_END__
0000000000208028 d __JCR_LIST__
0000000000208f38 A __bss_start
                U __cxa_atexit@@GLIBC_2.2.5
                w __cxa_finalize@@GLIBC_2.2.5
                U __cxa_pure_virtual@@CXXABI_1.3
0000000000006e50 t __do_global_ctors_aux
0000000000005bd0 t __do_global_dtors_aux
0000000000208f28 d __dso_handle
                w __gmon_start__
                U __gxx_personality_v0@@CXXABI_1.3
0000000000208f38 A _edata
0000000000208f50 A _end
0000000000006e88 T _fini
0000000000005710 T _init
0000000000005bb0 t call_gmon_start
0000000000208f38 b completed.6688
0000000000208f40 b dtor_idx.6690
0000000000005c50 t frame_dummy
                U g_param_spec_int
                U g_type_check_class_cast
                U g_type_name
                U gtk_rc_parse
                U gtk_widget_class_install_style_property
                U gtk_widget_get_type
0000000000005d90 T gtkmm___custom_object_mywidget_get_type
00000000000062a0 T gtkmm___custom_object_mywidget_new
                U strlen@@GLIBC_2.2.5

Any thoughts on this Juan ?

Cheers,
                   -Tristan

On Sat, Sep 20, 2008 at 10:31 AM, Tristan Wibberley
<tristan at wibberley.org> wrote:
On Sat, 2008-09-20 at 15:09 +0100, Tristan Wibberley wrote:

Then I wrote a catalog xml file below which I copied
to /usr/share/glade3/catalogs and I copied the library libcustom.so
to /usr/lib/glad3/modules.

I meant /usr/lib/glade3/modules

It seems if I put libc.so.6 into modules as libc.so and change the
catalog file to library="c" then libc gets loaded. This is a bit odd
because I'm sure the libc authors didn't do anything special to make
libc loadable from glade.

--
Tristan Wibberley

_______________________________________________
Glade-users maillist  -  Glade-users at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/glade-users







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]