나는 최근에 3.0 gtkmm을 통해 변경 될 때까지 잘 근무하고있다 gtkmm 2.4을 사용하는 응용 프로그램이 있습니다. 나는 g ++ (버전 4.6.1)에 문제가 있습니다. "오류 : '클래스 Gtk :: TextView'에 'modify_font'라는 멤버가 없습니다. 내 빌드를 gtkmm 2.4로 되 돌리는 경우에는 되돌릴 수 없습니다 (pkg-config gtkmm-3.0 --cflags --libs
을 gtkmm-2.4로 다시 변경). 문제 :: modify_font GTKMM 2.4에서 이동 GTK3.0하는
내 클래스 계층 구조가은 Gtk :: 텍스트 뷰에 관련하여 어떻게 생겼는지의 예 :
// 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 changelog에 대해 옳습니다. 나는 시간을 할애하면 그것에 기여하려고 노력할 것이다. –