[gtkmm] PlacesSidebar: Fix crash with the drag_* signals.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] PlacesSidebar: Fix crash with the drag_* signals.
- Date: Wed, 25 Sep 2013 09:46:42 +0000 (UTC)
commit 2713b4f8bb575675816f61551b9072062653f28b
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Sep 25 11:44:52 2013 +0200
PlacesSidebar: Fix crash with the drag_* signals.
* tool/m4/convert_gtk.m4: Remove the conversion from GFile* to
const RefPtr<>&. These do not belong in the general conversion
file.
* gtk/src/placessidebar.hg: Instead put it here. These conversions
are for signals only and care must be taken to use the
correct reference-taking (or not) for each use.
Bug #705642
gtk/src/placessidebar.hg | 6 ++----
tools/m4/convert_gtk.m4 | 3 ++-
2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gtk/src/placessidebar.hg b/gtk/src/placessidebar.hg
index 0b57040..9c4ca2d 100644
--- a/gtk/src/placessidebar.hg
+++ b/gtk/src/placessidebar.hg
@@ -101,9 +101,7 @@ public:
// We use no_default_handler with _WRAP_SIGNAL because the C *Class struct is hidden for GtkPlacesSidebar.
-// TODO
-// drag_action_requested and drag_perform_drop does not currently work due to an exec error while wrapping
the
-// GList* argument; apparently execution crashes around Glib::wrap_create_new_wrapper_for_interface
+#m4 _CONVERSION(`GFile*',`const Glib::RefPtr<Gio::File>&', `Glib::wrap($3, true)')
#m4 _CONVERSION(`GdkDragContext*',`const Glib::RefPtr<Gdk::DragContext>&',Glib::wrap($3, true))
#m4 _CONVERSION(`GList*',`const std::vector< Glib::RefPtr<Gio::File> >&',`Glib::ListHandler<
Glib::RefPtr<Gio::File> >::list_to_vector($3, Glib::OWNERSHIP_NONE)')
_WRAP_SIGNAL(int drag_action_requested(const Glib::RefPtr<Gdk::DragContext>& context, const
Glib::RefPtr<Gio::File>& dest_file, const std::vector< Glib::RefPtr<Gio::File> >& source_file_list),
"drag_action_requested", no_default_handler)
@@ -112,7 +110,7 @@ public:
_WRAP_SIGNAL(int drag_action_ask(int actions), "drag_action_ask", no_default_handler)
_WRAP_SIGNAL(void open_location(const Glib::RefPtr<Gio::File>& location, PlacesOpenFlags open_flags),
"open_location", no_default_handler)
-#m4 _CONVERSION(`GVolume*',`const Glib::RefPtr<Gio::Volume>&',Glib::wrap($3, true))
+#m4 _CONVERSION(`GVolume*',`const Glib::RefPtr<Gio::Volume>&', `Glib::wrap($3, true)')
_WRAP_SIGNAL(void populate_popup(Menu* menu, const Glib::RefPtr<Gio::File>& selected_item, const
Glib::RefPtr<Gio::Volume>& selected_volume), "populate_popup", no_default_handler)
_WRAP_SIGNAL(void show_connect_to_server(), "show_connect_to_server", no_default_handler)
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index 025e41f..b78610f 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -612,6 +612,7 @@ _CONVERSION(`GtkPageOrientation',`PageOrientation',`($2)$3')
_CONVERSION(`PageSetup&',`GtkPageSetup*',__FR2P)
_CONVERSION(`const PageSetup&',`GtkPageSetup*',__FCR2P)
_CONVERSION(`GtkPageSetup*',`Glib::RefPtr<PageSetup>',`Glib::wrap($3)')
+# TODO: What uses this?
_CONVERSION(`GtkPageSetup*',`const Glib::RefPtr<PageSetup>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<PageSetup>',`GtkPageSetup*',__CONVERT_REFPTR_TO_P($3))
_CONVERSION(`const Glib::RefPtr<PageSetup>&',`GtkPageSetup*',__CONVERT_REFPTR_TO_P($3))
@@ -649,6 +650,7 @@ _CONVERSION(`const Glib::RefPtr<Printer>&',`GtkPrinter*',__CONVERT_REFPTR_TO_P($
_CONVERSION(`GtkPrintCapabilities',`PrintCapabilities',`($2)$3')
#Tooltip
+#TODO: This should not be here:
_CONVERSION(`GtkTooltip*',`const Glib::RefPtr<Tooltip>&',`Glib::wrap($3, true)')
_CONVERSION(`const Glib::RefPtr<Tooltip>&',`GtkTooltip*',__CONVERT_REFPTR_TO_P($3))
@@ -698,7 +700,6 @@ _CONVERSION(`const Glib::RefPtr<const Gio::File>&',`GFile*',__CONVERT_CONST_REFP
_CONVERSION(`const Glib::RefPtr<Gio::File>&',`GFile*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gio::File))
_CONVERSION(`GFile*',`Glib::RefPtr<Gio::File>',`Glib::wrap($3)')
_CONVERSION(`GFile*',`Glib::RefPtr<const Gio::File>',`Glib::wrap($3)')
-_CONVERSION(`GFile*',`const Glib::RefPtr<Gio::File>&',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<Gio::Cancellable>&',`GCancellable*',__CONVERT_CONST_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Gio::InputStream>&',`GInputStream*',__CONVERT_CONST_REFPTR_TO_P)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]