Commit 884ec61baf97aba95487ea477c773ffcc6121758
1 parent
c413483b
Exists in
master
and in
1 other branch
Fixing win32 user interface.
Showing
3 changed files
with
13 additions
and
2 deletions
Show diff stats
src/dialogs/load.c
| @@ -136,7 +136,7 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_ | @@ -136,7 +136,7 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_ | ||
| 136 | // 1 - Charset xxxxxxxxx.xxxxxxxxx. Format: xxxxxxxxx.xxxxxxxxx. | 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 | // Setup visual elements | 141 | // Setup visual elements |
| 142 | // https://developer.gnome.org/hig/stable/visual-layout.html.en | 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,7 +145,10 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_ | ||
| 145 | 145 | ||
| 146 | GtkBox * box = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))); | 146 | GtkBox * box = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))); |
| 147 | gtk_window_set_resizable(GTK_WINDOW(dialog),FALSE); | 147 | gtk_window_set_resizable(GTK_WINDOW(dialog),FALSE); |
| 148 | + | ||
| 149 | +#if G_OS_UNIX | ||
| 148 | gtk_container_set_border_width(GTK_CONTAINER(box),18); | 150 | gtk_container_set_border_width(GTK_CONTAINER(box),18); |
| 151 | +#endif // UNIX | ||
| 149 | 152 | ||
| 150 | GtkGrid * grid = GTK_GRID(gtk_grid_new()); | 153 | GtkGrid * grid = GTK_GRID(gtk_grid_new()); |
| 151 | gtk_grid_set_row_spacing(GTK_GRID(grid),6); | 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,7 +165,7 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_ | ||
| 165 | 165 | ||
| 166 | dialog->mode = LIB3270_CONTENT_ALL; | 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 | // Setup visual elements | 170 | // Setup visual elements |
| 171 | // https://developer.gnome.org/hig/stable/visual-layout.html.en | 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,7 +174,10 @@ static void icon_press(GtkEntry *entry, G_GNUC_UNUSED GtkEntryIconPosition icon_ | ||
| 174 | 174 | ||
| 175 | GtkBox * box = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))); | 175 | GtkBox * box = GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))); |
| 176 | gtk_window_set_resizable(GTK_WINDOW(dialog),FALSE); | 176 | gtk_window_set_resizable(GTK_WINDOW(dialog),FALSE); |
| 177 | + | ||
| 178 | +#if G_OS_UNIX | ||
| 177 | gtk_container_set_border_width(GTK_CONTAINER(box),18); | 179 | gtk_container_set_border_width(GTK_CONTAINER(box),18); |
| 180 | +#endif // LINUX | ||
| 178 | 181 | ||
| 179 | GtkGrid * grid = GTK_GRID(gtk_grid_new()); | 182 | GtkGrid * grid = GTK_GRID(gtk_grid_new()); |
| 180 | gtk_grid_set_row_spacing(GTK_GRID(grid),6); | 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,6 +201,11 @@ int main (int argc, char **argv) { | ||
| 201 | setlocale( LC_ALL, "" ); | 201 | setlocale( LC_ALL, "" ); |
| 202 | #endif | 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 | textdomain("libv3270"); | 209 | textdomain("libv3270"); |
| 205 | 210 | ||
| 206 | app = gtk_application_new ("br.com.bb.libv3270",G_APPLICATION_FLAGS_NONE); | 211 | app = gtk_application_new ("br.com.bb.libv3270",G_APPLICATION_FLAGS_NONE); |