Skip to content

Commit

Permalink
Use Gtk::Dialog::get_content_area() instead of get_vbox() part2 (#466)
Browse files Browse the repository at this point in the history
GTK4で廃止される`Gtk::Dialog::get_vbox()`のかわりに
`Gtk::Dialog::get_content_area()`を使います。

非推奨のシンボルを無効化するマクロ
コンパイラのレポート
#466 を参照してください。
  • Loading branch information
ma8ma committed Sep 19, 2020
1 parent 85997c0 commit 52752c1
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 30 deletions.
16 changes: 8 additions & 8 deletions src/control/mousekeypref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ InputDiag::InputDiag( Gtk::Window* parent, const std::string& url,
set_title( CONTROL::get_label( m_id ) + " ( " + CONTROL::get_mode_label( m_controlmode ) + " )" );
resize( 400, 400 );

get_vbox()->pack_start( m_label );
get_content_area()->pack_start( m_label );

show_all_children();
}
Expand Down Expand Up @@ -298,9 +298,9 @@ MouseKeyDiag::MouseKeyDiag( Gtk::Window* parent, const std::string& url,
m_hbox.pack_start( m_scrollwin, Gtk::PACK_EXPAND_WIDGET );
m_hbox.pack_start( m_vbuttonbox, Gtk::PACK_SHRINK );

get_vbox()->set_spacing( 8 );
get_vbox()->pack_start( m_label, Gtk::PACK_SHRINK );
get_vbox()->pack_start( m_hbox );
get_content_area()->set_spacing( 8 );
get_content_area()->pack_start( m_label, Gtk::PACK_SHRINK );
get_content_area()->pack_start( m_hbox );

show_all_children();
set_title( CONTROL::get_label( m_id ) + " ( " + CONTROL::get_mode_label( m_controlmode ) + " )" );
Expand Down Expand Up @@ -529,10 +529,10 @@ MouseKeyPref::MouseKeyPref( Gtk::Window* parent, const std::string& url, const s
m_button_reset.signal_clicked().connect( sigc::mem_fun( *this, &MouseKeyPref::slot_reset ) );
m_hbox.pack_start( m_button_reset, Gtk::PACK_SHRINK );

get_vbox()->set_spacing( 8 );
get_vbox()->pack_start( m_label, Gtk::PACK_SHRINK );
get_vbox()->pack_start( m_scrollwin );
get_vbox()->pack_start( m_hbox, Gtk::PACK_SHRINK );
get_content_area()->set_spacing( 8 );
get_content_area()->pack_start( m_label, Gtk::PACK_SHRINK );
get_content_area()->pack_start( m_scrollwin );
get_content_area()->pack_start( m_hbox, Gtk::PACK_SHRINK );

set_default_size_ratio( 0.666 );
show_all_children();
Expand Down
4 changes: 2 additions & 2 deletions src/dbimg/delimgcachediag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ DelImgCacheDiag::DelImgCacheDiag()
set_title( "JDim 画像キャッシュ削除中" );

const int mrg = 8;
get_vbox()->set_spacing( mrg );
get_content_area()->set_spacing( mrg );
set_border_width( mrg );
get_vbox()->pack_start( m_label, Gtk::PACK_SHRINK );
get_content_area()->pack_start( m_label, Gtk::PACK_SHRINK );
show_all_children();
}

Expand Down
6 changes: 3 additions & 3 deletions src/dbimg/delimgdiag.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ namespace DBIMG
SKELETON::PrefDiag( parent, url )
{

get_vbox()->set_spacing( 8 );
get_vbox()->pack_start( m_frame_cache );
get_vbox()->pack_start( m_frame_abone );
get_content_area()->set_spacing( 8 );
get_content_area()->pack_start( m_frame_cache );
get_content_area()->pack_start( m_frame_abone );

set_activate_entry( m_frame_cache.get_spin() );
set_activate_entry( m_frame_abone.get_spin() );
Expand Down
4 changes: 2 additions & 2 deletions src/fontcolorpref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ void FontColorPref::pack_widget()
m_notebook.append_page( m_vbox_color, "色の設定" );

// 全体
get_vbox()->pack_start( m_notebook );
get_vbox()->set_spacing( mrg );
get_content_area()->pack_start( m_notebook );
get_content_area()->set_spacing( mrg );
set_border_width( mrg );
}

Expand Down
2 changes: 1 addition & 1 deletion src/globalabonepref.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace CORE
m_notebook.append_page( m_edit_word, "NG ワード" );
m_notebook.append_page( m_edit_regex, "NG 正規表現" );

get_vbox()->pack_start( m_notebook );
get_content_area()->pack_start( m_notebook );
set_title( "全体あぼ〜ん設定" );
resize( 600, 400 );
show_all_children();
Expand Down
2 changes: 1 addition & 1 deletion src/globalabonethreadpref.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace CORE
m_notebook.append_page( m_edit_word, "NG ワード" );
m_notebook.append_page( m_edit_regex, "NG 正規表現" );

get_vbox()->pack_start( m_notebook );
get_content_area()->pack_start( m_notebook );
set_title( "全体スレあぼ〜ん設定" );
resize( 600, 400 );
show_all_children();
Expand Down
2 changes: 1 addition & 1 deletion src/image/preference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Preferences::Preferences( Gtk::Window* parent, const std::string& url )
m_vbox_info.pack_end( m_check_protect, Gtk::PACK_SHRINK );

set_title( "画像のプロパティ" );
get_vbox()->pack_start( m_vbox_info );
get_content_area()->pack_start( m_vbox_info );
resize( 600, 400 );
show_all_children();
}
Expand Down
10 changes: 5 additions & 5 deletions src/linkfilterpref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ LinkFilterDiag::LinkFilterDiag( Gtk::Window* parent, const std::string& url, con
set_activate_entry( m_entry_url );
set_activate_entry( m_entry_cmd );

get_vbox()->set_spacing( 8 );
get_vbox()->pack_start( m_vbox );
get_content_area()->set_spacing( 8 );
get_content_area()->pack_start( m_vbox );

set_title( "フィルタ設定" );
show_all_children();
Expand Down Expand Up @@ -110,9 +110,9 @@ LinkFilterPref::LinkFilterPref( Gtk::Window* parent, const std::string& url )
m_hbox.pack_start( m_scrollwin, Gtk::PACK_EXPAND_WIDGET );
m_hbox.pack_start( m_vbuttonbox, Gtk::PACK_SHRINK );

get_vbox()->set_spacing( 8 );
get_vbox()->pack_start( m_label, Gtk::PACK_SHRINK );
get_vbox()->pack_start( m_hbox );
get_content_area()->set_spacing( 8 );
get_content_area()->pack_start( m_label, Gtk::PACK_SHRINK );
get_content_area()->pack_start( m_hbox );

show_all_children();
set_title( "リンクフィルタ設定" );
Expand Down
6 changes: 3 additions & 3 deletions src/livepref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ LivePref::LivePref( Gtk::Window* parent, const std::string& url )
m_vbox.pack_start( m_bt_reset, Gtk::PACK_SHRINK );
m_vbox.set_border_width( mrg );

get_vbox()->set_spacing( mrg );
get_vbox()->pack_start( m_label_inst, Gtk::PACK_SHRINK );
get_vbox()->pack_start( m_vbox, Gtk::PACK_SHRINK );
get_content_area()->set_spacing( mrg );
get_content_area()->pack_start( m_label_inst, Gtk::PACK_SHRINK );
get_content_area()->pack_start( m_vbox, Gtk::PACK_SHRINK );

set_title( "実況設定" );
show_all_children();
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ int main( int argc, char **argv )
false, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_YES_NO );

Gtk::CheckButton chk_button( "今後表示しない" );
mdiag->get_vbox()->pack_start( chk_button, Gtk::PACK_SHRINK );
mdiag->get_content_area()->pack_start( chk_button, Gtk::PACK_SHRINK );
chk_button.show();

const int ret = mdiag->run();
Expand Down
2 changes: 1 addition & 1 deletion src/message/confirmdiag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ConfirmDiag::ConfirmDiag( const std::string& url, const std::string& message )
const int mrg = 16;
Gtk::HBox* hbox = Gtk::manage( new Gtk::HBox );
hbox->pack_start( m_chkbutton, Gtk::PACK_EXPAND_WIDGET, mrg );
get_vbox()->pack_start( *hbox, Gtk::PACK_SHRINK );
get_content_area()->pack_start( *hbox, Gtk::PACK_SHRINK );

set_title( "投稿確認" );
show_all_children();
Expand Down
2 changes: 1 addition & 1 deletion src/openurldiag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ OpenURLDialog::OpenURLDialog( const std::string& url )
m_label_url.set_text( url );
set_activate_entry( m_label_url );

get_vbox()->pack_start( m_label_url, Gtk::PACK_SHRINK );
get_content_area()->pack_start( m_label_url, Gtk::PACK_SHRINK );

set_title( "URLを開く" );
resize( 600, 1 );
Expand Down
2 changes: 1 addition & 1 deletion src/passwdpref.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ namespace CORE

m_notebook.append_page( m_frame_2ch, "2ch" );
m_notebook.append_page( m_frame_be, "BE" );
get_vbox()->pack_start( m_notebook );
get_content_area()->pack_start( m_notebook );

set_title( "パスワード設定" );
show_all_children();
Expand Down

0 comments on commit 52752c1

Please sign in to comment.