mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-09 23:28:06 -05:00
Delegate GTK window creation to gtkmain.c.
This is a weird thing to have to do, but it is necessary: the OS X PuTTY will need its top-level windows to be instances of a thing called GtkApplicationWindow, rather than plain GtkWindow. Hence, the actual creation of windows needs to be somewhere that isn't centralised between the two kinds of front end.
This commit is contained in:
parent
9866b662c4
commit
f23375b14e
@ -532,6 +532,11 @@ int do_cmdline(int argc, char **argv, int do_everything, int *allow_launch,
|
||||
return err;
|
||||
}
|
||||
|
||||
GtkWidget *make_gtk_toplevel_window(void *frontend)
|
||||
{
|
||||
return gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
}
|
||||
|
||||
extern int cfgbox(Conf *conf);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
@ -4120,7 +4120,7 @@ struct gui_data *new_session_window(Conf *conf, const char *geometry_string)
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
inst->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
inst->window = make_gtk_toplevel_window(inst);
|
||||
{
|
||||
const char *winclass = conf_get_str(inst->conf, CONF_winclass);
|
||||
if (*winclass)
|
||||
|
@ -102,6 +102,9 @@ struct gui_data *new_session_window(Conf *conf, const char *geometry_string);
|
||||
void launch_duplicate_session(Conf *conf);
|
||||
void launch_new_session(void);
|
||||
void launch_saved_session(const char *str);
|
||||
#ifdef MAY_REFER_TO_GTK_IN_HEADERS
|
||||
GtkWidget *make_gtk_toplevel_window(void *frontend);
|
||||
#endif
|
||||
|
||||
/* Defined in gtkcomm.c */
|
||||
void gtkcomm_setup(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user