Feature #1288 » 1288-1time.patch
client/gui-gtk-3.22/optiondlg.c | ||
---|---|---|
#include "optiondlg.h"
|
||
static int opt_dlog_width = 576, opt_dlog_height = 480;
|
||
/* The option dialog data. */
|
||
struct option_dialog {
|
||
... | ... | |
static void option_dialog_destroy_callback(GtkWidget *object, gpointer data)
|
||
{
|
||
struct option_dialog *pdialog = (struct option_dialog *) data;
|
||
GtkWidget* cont_area;
|
||
GtkAllocation allocation;
|
||
int baseline;
|
||
/* Save size of the dialog. */
|
||
cont_area = gtk_dialog_get_content_area (GTK_DIALOG(pdialog->shell));
|
||
gtk_widget_get_allocated_size(GTK_WIDGET(cont_area),
|
||
&allocation, &baseline);
|
||
opt_dlog_width = allocation.width;
|
||
opt_dlog_height = allocation.height;
|
||
if (NULL != pdialog->shell) {
|
||
/* Mark as destroyed, see also option_dialog_destroy(). */
|
||
... | ... | |
/* Shell */
|
||
setup_dialog(pdialog->shell, toplevel);
|
||
gtk_window_set_position(GTK_WINDOW(pdialog->shell), GTK_WIN_POS_MOUSE);
|
||
gtk_window_set_default_size(GTK_WINDOW(pdialog->shell), -1, 480);
|
||
gtk_window_set_default_size(GTK_WINDOW(pdialog->shell),
|
||
opt_dlog_width,
|
||
opt_dlog_height);
|
||
g_signal_connect(pdialog->shell, "response",
|
||
G_CALLBACK(option_dialog_reponse_callback), pdialog);
|
||
g_signal_connect(pdialog->shell, "destroy",
|
client/gui-gtk-4.0/optiondlg.c | ||
---|---|---|
#include "optiondlg.h"
|
||
static int opt_dlog_width = 576, opt_dlog_height = 480;
|
||
/* The option dialog data. */
|
||
struct option_dialog {
|
||
... | ... | |
{
|
||
struct option_dialog *pdialog = (struct option_dialog *) data;
|
||
/* Save size of the dialog. */
|
||
gtk_window_get_default_size (GTK_WINDOW(object),
|
||
&opt_dlog_width,
|
||
&opt_dlog_height);
|
||
if (NULL != pdialog->shell) {
|
||
/* Mark as destroyed, see also option_dialog_destroy(). */
|
||
pdialog->shell = NULL;
|
||
... | ... | |
/* Shell */
|
||
setup_dialog(pdialog->shell, toplevel);
|
||
gtk_window_set_default_size(GTK_WINDOW(pdialog->shell), -1, 480);
|
||
gtk_window_set_default_size(GTK_WINDOW(pdialog->shell),
|
||
opt_dlog_width,
|
||
opt_dlog_height);
|
||
g_signal_connect(pdialog->shell, "response",
|
||
G_CALLBACK(option_dialog_reponse_callback), pdialog);
|
||
g_signal_connect(pdialog->shell, "destroy",
|