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

setupwizard: Use Gtk::Grid instead of Gtk::Table #472

Merged

Conversation

ma8ma
Copy link
Collaborator

@ma8ma ma8ma commented Sep 26, 2020

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

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

GDK_DISABLE_DEPRECATED
GTK_DISABLE_DEPRECATED
GDKMM_DISABLE_DEPRECATED
GTKMM_DISABLE_DEPRECATED
GIOMM_DISABLE_DEPRECATED
GLIBMM_DISABLE_DEPRECATED

コンパイラのレポート

../src/setupwizard.h:73:14: error: 'Table' in namespace 'Gtk' does not name a type
   73 |         Gtk::Table m_table;
      |              ^~~~~

関連のissue: #229

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

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

コンパイラのレポート
```
../src/setupwizard.h:73:14: error: 'Table' in namespace 'Gtk' does not name a type
   73 |         Gtk::Table m_table;
      |              ^~~~~
```
@ma8ma ma8ma added gtk3 GTK3版に関するトピック refactoring コードの整理 (バグ修正でも機能変更でもない) labels Sep 26, 2020
@ma8ma ma8ma added this to In progress in State of JDim-v0.4.0+ via automation Sep 26, 2020
Comment on lines +146 to +156
constexpr int width = 1;
constexpr int height = 1;
m_table.attach( m_label_res, 0, 0, width, height );
m_table.attach( m_label_mail, 0, 1, width, height );
m_table.attach( m_label_popup, 0, 2, width, height );
m_table.attach( m_label_tree, 0, 3, width, height );

m_table.attach( m_font_res, 1, 0, width, height );
m_table.attach( m_font_mail, 1, 1, width, height );
m_table.attach( m_font_popup, 1, 2, width, height );
m_table.attach( m_font_tree, 1, 3, width, height );
Copy link
Collaborator Author

@ma8ma ma8ma Sep 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コンパイルエラーの原因 (https://github.com/JDimproved/JDim/runs/1169393326)

gtkmm 3.22 の Gtk::Grid::attach() にはデフォルト引数が設定されていない。
https://developer.gnome.org/gtkmm/3.22/classGtk_1_1Grid.html#a9c425e95660daff60a77fc0cafc18115

@ma8ma ma8ma merged commit 21e5c69 into JDimproved:master Sep 26, 2020
State of JDim-v0.4.0+ automation moved this from In progress to Done Sep 26, 2020
@ma8ma ma8ma deleted the setupwizard-use-gtkgrid-instead-of-gtktable branch September 26, 2020 07:52
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