最近gtkmm 3.0に変更するまでうまくいったgtkmm 2.4を使用するアプリケーションがあります。私はg ++(バージョン4.6.1)の問題を抱えています。 "エラー: 'クラスGtk :: TextView'には 'modify_font'という名前のメンバーがありません。これは、ビルドバックをgtkmm 2.4に戻したときには当てはまりません(pkg-config gtkmm-3.0 --cflags --libs
をgtkmm-2.4に戻すことによって)。GTKMM 2.4からGTK3.0に移動するときのGtk :: TextView :: modify_fontの問題
私はヘッダ(code :: blocks内から)をたどり、関数ヘッダは間違いなくそこにあります。 Gtk :: Widget :: modify_fontも償却されたようには見えません。
私のクラス階層がそののGtk :: TextViewにする点でどのように見えるかの例:
// The parent of the offending TextView
class popupWindow : public Gtk::Window
{
public:
popupWindow();
private:
Gtk::TextView theView;
Gtk::ScrolledWindow scrollView;
Gtk::VBox layoutBox;
Glib::RefPtr<Gtk::TextBuffer> textBuffer;
};
// The main window class
class mainWindow : public Gtk::Window
{
private:
popupWindow foo;
};
// Part of the header where I try and set the modified font
popupWindow::popupwindow() : layoutBox(false, 8)
{
// Modify the font styling of the TextView
{
Pango::FontDescription fdesc;
fdesc.set_family("monospace");
fdesc.set_size(10 * PANGO_SCALE);
theView.modify_font(fdesc);
}
// Make a new text buffer
textBuffer = Gtk::TextBuffer::create();
add(layoutBox);
layoutBox.pack_start(scrollView);
scrollView.add(theView);
theView.set_buffer(textBuffer);
}
フィードバックに感謝します。私はどこにでもリストされていることがわかりませんでしたあなたは2.4 - > 3.0の変更ログがいくらか欠けているのは間違いありません。私は時間を取ったときにそれに貢献しようと努力します。 –