diff --git a/include/Frame_Resizer_Base.h b/include/Frame_Resizer_Base.h index 28ff6381..7a52275d 100644 --- a/include/Frame_Resizer_Base.h +++ b/include/Frame_Resizer_Base.h @@ -82,7 +82,8 @@ protected: std::vector arrow_points; - Gdk::Cursor *cursor_resize, *cursor_move; + Glib::RefPtr cursor_resize; + Glib::RefPtr cursor_move; int temp_x, temp_y ; bool fixed_start; //a fixed start disables moving the start and thereby the whole move functionality.. diff --git a/src/DialogManageFlags.cc b/src/DialogManageFlags.cc index edb502cf..1057d7e9 100644 --- a/src/DialogManageFlags.cc +++ b/src/DialogManageFlags.cc @@ -74,7 +74,7 @@ void DialogManageFlags::load_treeview() void DialogManageFlags::on_flag_toggled( const Glib::ustring & path ) { - get_window() ->set_cursor( Gdk::Cursor( Gdk::WATCH ) ) ; + get_window()->set_cursor(Gdk::Cursor::create(Gdk::WATCH)); set_sensitive( false ) ; while ( Gtk::Main::events_pending() ) Gtk::Main::iteration() ; diff --git a/src/Frame_Resizer_Base.cc b/src/Frame_Resizer_Base.cc index 7649ec36..86a737d7 100644 --- a/src/Frame_Resizer_Base.cc +++ b/src/Frame_Resizer_Base.cc @@ -59,8 +59,8 @@ void Frame_Resizer_Base::init() color_background.set("darkgrey"); color_arrow_rectangle.set("lightgrey"); - cursor_resize = new Gdk::Cursor( Gdk::SB_H_DOUBLE_ARROW ) ; - cursor_move = new Gdk::Cursor( Gdk::FLEUR ) ; + cursor_resize = Gdk::Cursor::create(Gdk::SB_H_DOUBLE_ARROW); + cursor_move = Gdk::Cursor::create(Gdk::FLEUR); GRIP_MOVE = GRIP_LEFT = GRIP_RIGHT = false; X_END = 0; @@ -306,18 +306,18 @@ bool Frame_Resizer_Base::drawingarea_on_mouse_motion( GdkEventMotion * ev ) ev ->x <= X_START && ev ->y >= 5 && ev ->y <= 45 ) - drawingarea .get_parent_window() ->set_cursor( *cursor_resize ) ; + drawingarea.get_parent_window()->set_cursor(cursor_resize); //right grip else if ( ev ->x >= X_END && ev ->x <= X_END + GRIPPER && ev ->y >= 5 && ev ->y <= 45 ) - drawingarea .get_parent_window() ->set_cursor( *cursor_resize ) ; + drawingarea.get_parent_window()->set_cursor(cursor_resize); //move grip else if ( ! fixed_start && ev ->x >= X_START && ev ->x <= X_END ) - drawingarea .get_parent_window() ->set_cursor( *cursor_move ) ; + drawingarea.get_parent_window()->set_cursor(cursor_move); //normal pointer else drawingarea .get_parent_window() ->set_cursor() ; @@ -451,8 +451,6 @@ void Frame_Resizer_Base::redraw() Frame_Resizer_Base::~Frame_Resizer_Base() { - delete cursor_resize; - delete cursor_move; } diff --git a/src/Frame_Resizer_Extended.cc b/src/Frame_Resizer_Extended.cc index c1e80d9d..284c4c94 100644 --- a/src/Frame_Resizer_Extended.cc +++ b/src/Frame_Resizer_Extended.cc @@ -143,13 +143,13 @@ bool Frame_Resizer_Extended::drawingarea_on_mouse_motion( GdkEventMotion * ev ) ev ->x <= X_START && ev ->y >= 5 && ev ->y <= 45 ) - drawingarea .get_parent_window() ->set_cursor( *cursor_resize ) ; + drawingarea.get_parent_window()->set_cursor(cursor_resize); //right grip else if ( ev ->x >= X_END && ev ->x <= X_END + GRIPPER && ev ->y >= 5 && ev ->y <= 45 ) - drawingarea .get_parent_window() ->set_cursor( *cursor_resize ) ; + drawingarea.get_parent_window()->set_cursor(cursor_resize); //normal pointer else drawingarea .get_parent_window() ->set_cursor() ; diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc index aacdc888..10dcbb17 100644 --- a/src/Win_GParted.cc +++ b/src/Win_GParted.cc @@ -3095,7 +3095,7 @@ void Win_GParted::activate_manage_flags() g_assert( selected_partition_ptr != NULL ); // Bug: Partition callback without a selected partition g_assert( valid_display_partition_ptr( selected_partition_ptr ) ); // Bug: Not pointing at a valid display partition object - get_window() ->set_cursor( Gdk::Cursor( Gdk::WATCH ) ) ; + get_window()->set_cursor(Gdk::Cursor::create(Gdk::WATCH)); while ( Gtk::Main::events_pending() ) Gtk::Main::iteration() ;