Commit 884ec61baf97aba95487ea477c773ffcc6121758

Authored by Perry Werneck
1 parent c413483b
Exists in master and in 1 other branch develop

Fixing win32 user interface.

src/dialogs/load.c
... ... @@ -136,7 +136,7 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_
136 136 // 1 - Charset xxxxxxxxx.xxxxxxxxx. Format: xxxxxxxxx.xxxxxxxxx.
137 137  
138 138  
139   - gtk_window_set_deletable(GTK_WINDOW(dialog),FALSE);
  139 +// gtk_window_set_deletable(GTK_WINDOW(dialog),FALSE);
140 140  
141 141 // Setup visual elements
142 142 // https://developer.gnome.org/hig/stable/visual-layout.html.en
... ... @@ -145,7 +145,10 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_
145 145  
146 146 GtkBox * box = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog)));
147 147 gtk_window_set_resizable(GTK_WINDOW(dialog),FALSE);
  148 +
  149 +#if G_OS_UNIX
148 150 gtk_container_set_border_width(GTK_CONTAINER(box),18);
  151 +#endif // UNIX
149 152  
150 153 GtkGrid * grid = GTK_GRID(gtk_grid_new());
151 154 gtk_grid_set_row_spacing(GTK_GRID(grid),6);
... ...
src/dialogs/save/save.c
... ... @@ -165,7 +165,7 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_
165 165  
166 166 dialog->mode = LIB3270_CONTENT_ALL;
167 167  
168   - gtk_window_set_deletable(GTK_WINDOW(dialog),FALSE);
  168 + // gtk_window_set_deletable(GTK_WINDOW(dialog),FALSE);
169 169  
170 170 // Setup visual elements
171 171 // https://developer.gnome.org/hig/stable/visual-layout.html.en
... ... @@ -174,7 +174,10 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_
174 174  
175 175 GtkBox * box = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog)));
176 176 gtk_window_set_resizable(GTK_WINDOW(dialog),FALSE);
  177 +
  178 +#if G_OS_UNIX
177 179 gtk_container_set_border_width(GTK_CONTAINER(box),18);
  180 +#endif // LINUX
178 181  
179 182 GtkGrid * grid = GTK_GRID(gtk_grid_new());
180 183 gtk_grid_set_row_spacing(GTK_GRID(grid),6);
... ...
src/testprogram/testprogram.c
... ... @@ -201,6 +201,11 @@ int main (int argc, char **argv) {
201 201 setlocale( LC_ALL, "" );
202 202 #endif
203 203  
  204 +#ifdef _WIN32
  205 + // https://stackoverflow.com/questions/37035936/how-to-get-native-windows-decorations-on-gtk3-on-windows-7-and-msys2
  206 + putenv("GTK_CSD=0");
  207 +#endif // _WIN32
  208 +
204 209 textdomain("libv3270");
205 210  
206 211 app = gtk_application_new ("br.com.bb.libv3270",G_APPLICATION_FLAGS_NONE);
... ...