Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cursor name instead of Gdk::CursorType #449

Merged

Conversation

ma8ma
Copy link
Collaborator

@ma8ma ma8ma commented Aug 23, 2020

GTK4で削除されるGdk::CursorTypeのかわりにカーソルテーマの名前を使います。
カーソル名の入力ミスを予防するため文字列リテラルを直接指定するかわりに定数を使います。

非推奨のシンボルを無効化するマクロ

GDK_DISABLE_DEPRECATED
GTK_DISABLE_DEPRECATED
GDKMM_DISABLE_DEPRECATED
GTKMM_DISABLE_DEPRECATED
GIOMM_DISABLE_DEPRECATED
GLIBMM_DISABLE_DEPRECATED

コンパイラのレポート

../src/article/drawareabase.cpp:5226:70: error: no matching function for call to 'Gdk::Cursor::create(Gdk::CursorType&)'
 5226 |             m_window->set_cursor( Gdk::Cursor::create( m_cursor_type ) );
      |                                                                      ^

関連のissue: #229

GTK4で削除される`Gdk::CursorType`のかわりにカーソルテーマの名前[*]を
使います。カーソル名の入力ミスを予防するため文字列リテラルを直接指定する
かわりに定数を使います。

非推奨のシンボルを無効化するマクロ
```
GDK_DISABLE_DEPRECATED
GTK_DISABLE_DEPRECATED
GDKMM_DISABLE_DEPRECATED
GTKMM_DISABLE_DEPRECATED
GIOMM_DISABLE_DEPRECATED
GLIBMM_DISABLE_DEPRECATED
```

コンパイラのレポート
```
../src/article/drawareabase.cpp:5226:70: error: no matching function for call to 'Gdk::Cursor::create(Gdk::CursorType&)'
 5226 |             m_window->set_cursor( Gdk::Cursor::create( m_cursor_type ) );
      |                                                                      ^
```

[*]: https://developer.gnome.org/gdk3/stable/gdk3-Cursors.html#gdk-cursor-new-from-name
@ma8ma ma8ma added gtk3 GTK3版に関するトピック refactoring コードの整理 (バグ修正でも機能変更でもない) labels Aug 23, 2020
@ma8ma ma8ma added this to In progress in State of JDim-v0.4.0+ via automation Aug 23, 2020
@ma8ma ma8ma merged commit 85478c3 into JDimproved:master Aug 23, 2020
State of JDim-v0.4.0+ automation moved this from In progress to Done Aug 23, 2020
@ma8ma ma8ma deleted the use-cursor-name-instead-of-gdk-cursor branch August 23, 2020 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gtk3 GTK3版に関するトピック refactoring コードの整理 (バグ修正でも機能変更でもない)
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant