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 i18n text instead of Gtk::Stock::(ADD|DELETE) for button label #495

Merged

Conversation

ma8ma
Copy link
Collaborator

@ma8ma ma8ma commented Oct 25, 2020

GTK4で廃止されるGtk::Stock::(ADD|DELETE)をi18n対応テキストに置き換えます。

Gtk::Stockからラベルに変更する参考文献
https://developer.gnome.org/gtk3/stable/gtk3-Stock-Items.html
https://stackoverflow.com/questions/36805505/gtk-stock-is-deprecated-whats-the-alternative/36811163#36811163
https://gitlab.gnome.org/GNOME/gtk/blob/3.24.20/gtk/deprecated/gtkstock.c#L346

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

GDK_DISABLE_DEPRECATED
GTK_DISABLE_DEPRECATED
GDKMM_DISABLE_DEPRECATED
GTKMM_DISABLE_DEPRECATED
GIOMM_DISABLE_DEPRECATED
GLIBMM_DISABLE_DEPRECATED

コンパイラのレポート

../src/control/mousekeypref.cpp:272:29: error: 'Gtk::Stock' has not been declared
  272 |       m_button_delete( Gtk::Stock::DELETE ),
      |                             ^~~~~
../src/control/mousekeypref.cpp:273:26: error: 'Gtk::Stock' has not been declared
  273 |       m_button_add( Gtk::Stock::ADD ),
      |                          ^~~~~
../src/linkfilterpref.cpp:70:29: error: 'Gtk::Stock' has not been declared
   70 |       m_button_delete( Gtk::Stock::DELETE ),
      |                             ^~~~~
../src/linkfilterpref.cpp:71:26: error: 'Gtk::Stock' has not been declared
   71 |       m_button_add( Gtk::Stock::ADD )
      |                          ^~~~~

関連のissue: #229, #482

GTK4で廃止される`Gtk::Stock::(ADD|DELETE)`をi18n対応テキストに置き換えます。

Gtk::Stockからラベルに変更する参考文献:
https://developer.gnome.org/gtk3/stable/gtk3-Stock-Items.html
https://stackoverflow.com/questions/36805505/gtk-stock-is-deprecated-whats-the-alternative/36811163#36811163
https://gitlab.gnome.org/GNOME/gtk/blob/3.24.20/gtk/deprecated/gtkstock.c#L346

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

コンパイラのレポート
```
../src/control/mousekeypref.cpp:272:29: error: 'Gtk::Stock' has not been declared
  272 |       m_button_delete( Gtk::Stock::DELETE ),
      |                             ^~~~~
../src/control/mousekeypref.cpp:273:26: error: 'Gtk::Stock' has not been declared
  273 |       m_button_add( Gtk::Stock::ADD ),
      |                          ^~~~~
../src/linkfilterpref.cpp:70:29: error: 'Gtk::Stock' has not been declared
   70 |       m_button_delete( Gtk::Stock::DELETE ),
      |                             ^~~~~
../src/linkfilterpref.cpp:71:26: error: 'Gtk::Stock' has not been declared
   71 |       m_button_add( Gtk::Stock::ADD )
      |                          ^~~~~
```
@ma8ma ma8ma added gtk3 GTK3版に関するトピック feature 機能の追加と削除 labels Oct 25, 2020
@ma8ma ma8ma added this to In progress in State of JDim-v0.4.0+ via automation Oct 25, 2020
@ma8ma ma8ma merged commit a52939a into JDimproved:master Oct 25, 2020
State of JDim-v0.4.0+ automation moved this from In progress to Done Oct 25, 2020
@ma8ma ma8ma deleted the use-i18n-text-instead-of-gtkstock-add-delete branch October 25, 2020 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 機能の追加と削除 gtk3 GTK3版に関するトピック
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant