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 Gtk::ColorChooserDialog instead of Gtk::ColorSelectionDialog #476

Conversation

ma8ma
Copy link
Collaborator

@ma8ma ma8ma commented Oct 3, 2020

Fix #469

GTK4で廃止されるGtk::ColorSelectionDialogのかわりにGtk::ColorChooserDialogを使います。

JDimの関数や設定が対応してないためalphaチャンネルは無効にしてあります。

既知の問題

KDE plasma(X11?)環境では色選択ダイアログのカラーピッカーで色を抜き出すことができない。(関連の問題?)

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

GDK_DISABLE_DEPRECATED
GTK_DISABLE_DEPRECATED
GDKMM_DISABLE_DEPRECATED
GTKMM_DISABLE_DEPRECATED
GIOMM_DISABLE_DEPRECATED
GLIBMM_DISABLE_DEPRECATED

コンパイラのレポート

../src/core.cpp:1681:10: error: 'ColorSelectionDialog' is not a member of 'Gtk'
 1681 |     Gtk::ColorSelectionDialog diag( title );
      |          ^~~~~~~~~~~~~~~~~~~~
../src/core.cpp:1682:5: error: 'diag' was not declared in this scope
 1682 |     diag.get_color_selection()->set_current_color( color );
      |     ^~~~
../src/core.cpp:1685:14: error: 'ColorSelection' is not a member of 'Gtk'
 1685 |         Gtk::ColorSelection* sel = diag.get_color_selection();
      |              ^~~~~~~~~~~~~~
../src/core.cpp:1685:30: error: 'sel' was not declared in this scope
 1685 |         Gtk::ColorSelection* sel = diag.get_color_selection();
      |                              ^~~
../src/fontcolorpref.cpp:454:10: error: 'ColorSelectionDialog' is not a member of 'Gtk'
  454 |     Gtk::ColorSelectionDialog colordiag;
      |          ^~~~~~~~~~~~~~~~~~~~
../src/fontcolorpref.cpp:456:14: error: 'ColorSelection' is not a member of 'Gtk'
  456 |         Gtk::ColorSelection* sel = colordiag.get_color_selection();
      |              ^~~~~~~~~~~~~~
../src/fontcolorpref.cpp:456:30: error: 'sel' was not declared in this scope
  456 |         Gtk::ColorSelection* sel = colordiag.get_color_selection();
      |                              ^~~
../src/fontcolorpref.cpp:456:36: error: 'colordiag' was not declared in this scope; did you mean 'colorid'?
  456 |         Gtk::ColorSelection* sel = colordiag.get_color_selection();
      |                                    ^~~~~~~~~
      |                                    colorid
../src/fontcolorpref.cpp:471:22: error: 'ColorSelection' is not a member of 'Gtk'
  471 |                 Gtk::ColorSelection* sel = colordiag.get_color_selection();
      |                      ^~~~~~~~~~~~~~
../src/fontcolorpref.cpp:471:38: error: 'sel' was not declared in this scope
  471 |                 Gtk::ColorSelection* sel = colordiag.get_color_selection();
      |                                      ^~~

関連のissue: #229

GTK4で廃止される`Gtk::ColorSelectionDialog`のかわりに
`Gtk::ColorChooserDialog`を使います。

JDimの関数や設定が対応してないためalphaチャンネルは無効にしてあります。

既知の問題
KDE plasma(X11?)環境では色選択ダイアログのカラーピッカーで色を抜き出す
ことができない。(関連の問題?[*])

[*]: https://bugs.kde.org/show_bug.cgi?id=407226

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

コンパイラのレポート
```
../src/core.cpp:1681:10: error: 'ColorSelectionDialog' is not a member of 'Gtk'
 1681 |     Gtk::ColorSelectionDialog diag( title );
      |          ^~~~~~~~~~~~~~~~~~~~
../src/core.cpp:1682:5: error: 'diag' was not declared in this scope
 1682 |     diag.get_color_selection()->set_current_color( color );
      |     ^~~~
../src/core.cpp:1685:14: error: 'ColorSelection' is not a member of 'Gtk'
 1685 |         Gtk::ColorSelection* sel = diag.get_color_selection();
      |              ^~~~~~~~~~~~~~
../src/core.cpp:1685:30: error: 'sel' was not declared in this scope
 1685 |         Gtk::ColorSelection* sel = diag.get_color_selection();
      |                              ^~~
../src/fontcolorpref.cpp:454:10: error: 'ColorSelectionDialog' is not a member of 'Gtk'
  454 |     Gtk::ColorSelectionDialog colordiag;
      |          ^~~~~~~~~~~~~~~~~~~~
../src/fontcolorpref.cpp:456:14: error: 'ColorSelection' is not a member of 'Gtk'
  456 |         Gtk::ColorSelection* sel = colordiag.get_color_selection();
      |              ^~~~~~~~~~~~~~
../src/fontcolorpref.cpp:456:30: error: 'sel' was not declared in this scope
  456 |         Gtk::ColorSelection* sel = colordiag.get_color_selection();
      |                              ^~~
../src/fontcolorpref.cpp:456:36: error: 'colordiag' was not declared in this scope; did you mean 'colorid'?
  456 |         Gtk::ColorSelection* sel = colordiag.get_color_selection();
      |                                    ^~~~~~~~~
      |                                    colorid
../src/fontcolorpref.cpp:471:22: error: 'ColorSelection' is not a member of 'Gtk'
  471 |                 Gtk::ColorSelection* sel = colordiag.get_color_selection();
      |                      ^~~~~~~~~~~~~~
../src/fontcolorpref.cpp:471:38: error: 'sel' was not declared in this scope
  471 |                 Gtk::ColorSelection* sel = colordiag.get_color_selection();
      |                                      ^~~
```
@ma8ma ma8ma added gtk3 GTK3版に関するトピック feature 機能の追加と削除 labels Oct 3, 2020
@ma8ma ma8ma added this to In progress in State of JDim-v0.4.0+ via automation Oct 3, 2020
@ma8ma ma8ma merged commit ee26d55 into JDimproved:master Oct 3, 2020
State of JDim-v0.4.0+ automation moved this from In progress to Done Oct 3, 2020
@ma8ma ma8ma deleted the use-gtkcolorchooserdialog-instead-of-gtkcolorselectiondialog branch October 3, 2020 07:31
ma8ma added a commit that referenced this pull request Dec 12, 2020
ma8ma added a commit that referenced this pull request Dec 12, 2020
…log (#476)" (#535)

This reverts commit ee26d55.

色選択でスポイトが使えないという報告がありましたので一旦修正を差し戻します。
https://next2ch.net/test/read.cgi/linux/1573309956/107
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.

[POSTPONE] 色設定のダイアログを新しいAPIに更新する
1 participant