diff gtk3/dw.c @ 1491:d77b8cf25f04

Code cleanup and removed some erroneous code for GTK in dw_window_new().
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 24 Dec 2011 18:57:46 +0000
parents 5cfbf2715eec
children 97e5e8688fe1
line wrap: on
line diff
--- a/gtk3/dw.c	Sat Dec 24 17:38:00 2011 +0000
+++ b/gtk3/dw.c	Sat Dec 24 18:57:46 2011 +0000
@@ -2914,22 +2914,17 @@
       if(flStyle & DW_FCF_SIZEBORDER)
          flags |= GDK_DECOR_RESIZEH | GDK_DECOR_BORDER;
 
-      if(flStyle & DW_FCF_BORDER || flStyle & DW_FCF_DLGBORDER)
+      if(flStyle & (DW_FCF_BORDER | DW_FCF_DLGBORDER))
          flags |= GDK_DECOR_BORDER;
 
       if(flStyle & DW_FCF_MAXIMIZE)
-      {
-         flags &= ~DW_FCF_MAXIMIZE;
          gtk_window_maximize(GTK_WINDOW(tmp));
-      }
+         
       if(flStyle & DW_FCF_MINIMIZE)
-      {
-         flags &= ~DW_FCF_MINIMIZE;
          gtk_window_iconify(GTK_WINDOW(tmp));
-      }
+         
       /* Either the CLOSEBUTTON or SYSMENU flags should make it deletable */
-      if(!(flStyle & (DW_FCF_CLOSEBUTTON | DW_FCF_SYSMENU)))
-         gtk_window_set_deletable(GTK_WINDOW(tmp), FALSE);
+      gtk_window_set_deletable(GTK_WINDOW(tmp), (flStyle & (DW_FCF_CLOSEBUTTON | DW_FCF_SYSMENU)) ? TRUE : FALSE);
 
       gdk_window_set_decorations(gtk_widget_get_window(tmp), flags);
       if(!flags)