Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] Re: (PR#8486) Fullscreen Mode for Gtk 2 client
Home

[Freeciv-Dev] Re: (PR#8486) Fullscreen Mode for Gtk 2 client

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: andrearo@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8486) Fullscreen Mode for Gtk 2 client
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 11 Apr 2004 11:56:06 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8486 >

andrearo@xxxxxxxxxxxx wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8486 >
> 
> 
> This patch implements a Fullscreen mode for the Gtk 2 client.
> You can enable it with an option in the Local options dialog.
> 
> For Fullscreen to work, the window manager must support it.
> Recent versions of Gnome and KDE supports it, as well as Gtk on win32.
> However, Enlightenment and some other "old" window managers doesn't
> support it yet.
> 
> So, what do you think?

Full-screen mode sounds really good.  I'm unable to test it right now, 
though.

Are all of the changes really necessary?  Stuff like

-  if (dialogs_on_top) {
+  if (dialogs_on_top || fullscreen_mode) {
      gtk_window_set_transient_for(GTK_WINDOW(dshell),
-                                GTK_WINDOW(toplevel));
+                                 GTK_WINDOW(toplevel));
+    gtk_object_set_data(GTK_OBJECT(dshell), "type",
+                        (gpointer)GTK_WINDOW_POPUP);
+    gtk_window_set_type_hint(GTK_WINDOW(dshell),
+                             GDK_WINDOW_TYPE_HINT_UTILITY);
+  } else {
+    gtk_window_set_type_hint(GTK_WINDOW(dshell),
+                             GDK_WINDOW_TYPE_HINT_NORMAL);
    }

is repeated dozens of times.  Is there some simpler solution?  Perhaps

   void setup_dialog(GtkObject *shell)
   {
     if (dialogs_on_top || fullscreen_mode) {
       /* ... */
     } else {
       /* ... */
     }
   }

or maybe

   #define dialogs_on_top (dialogs_on_top_option || fullscreen_mode)

Basically this is a patch for Vasco, though...

jason




[Prev in Thread] Current Thread [Next in Thread]