Page 1 of 1

win32 - vs2017 solution - gtk_cheat edit?

Posted: Fri Aug 07, 2020 10:42 pm
by wolfomat
Hi there,

what do i oversee - i want to customize the gtk_cheat.cpp with another column "hotkey", but somehow this file isn't within the win solution.
Compiling runs successfull. but somehow my changes are dismissed / not visible.

so far, i just wanted to ad a colum.


changes in gtk_cheat.cpp (via notepad++)

Code: Select all

enum {
    COLUMN_ENABLED = 0,
    COLUMN_DESCRIPTION = 1,
    COLUMN_CHEAT = 2,
    COLUMN_HOTKEY = 3, // this is new
    NUM_COLS
};
// after line 71:

    auto text_renderer2 = new Gtk::CellRendererText();
    view->insert_column(_("Hotkey"), *text_renderer2, COLUMN_HOTKEY);
    column = view->get_column(COLUMN_HOTKEY);
    column->set_resizable();
    column->set_min_width(40);
    column->add_attribute(*text_renderer2, "text", COLUMN_HOTKEY);

    view->insert_column(_("Cheat"), *text_renderer2, COLUMN_CHEAT);
    column = view->get_column(COLUMN_CHEAT);
    column->set_resizable();
    column->set_min_width(40);
    column->add_attribute(*text_renderer2, "text", COLUMN_CHEAT);
then i hit "compile", build sucess. starting the exe will result that the cheat windows do not display another column.

Is it:
1. because the changes are not counted in the snes9x solution
2. or because of some wrong programming?

If it's 2, then it is okay just to point out that my codes is wrong, i'll figure out the error myself (in order to improve / reactivate my c++ skills)
if it''s 1, then i have no idea how to make this work.

thanks and greetings

Re: win32 - vs2017 solution - gtk_cheat edit?

Posted: Fri Aug 07, 2020 11:00 pm
by wolfomat
okay, it seems that it's not GTK related.

as i am only using windows, i think it could be the file wsnes9x.cpp, line 8769 (SendDlgItemMessage(hDlg, IDC_CHEAT_DESCRIPTION, EM_LIMITTEXT, CHEAT_SIZE, 0);

there i should add the column. i am not used to the resources editor windows, or how to you implement those columns?

Re: win32 - vs2017 solution - gtk_cheat edit?

Posted: Sat Aug 08, 2020 4:38 am
by odditude
as you've realized, gtk isn't used for windows - only linux.

unfortunately, i can't help you with your actual question. i'd recommend cutting a feature request issue in github (see your other post).