gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] Set window title (gtk).


From: strk
Subject: Re: [Gnash-dev] Set window title (gtk).
Date: Sat, 29 Jul 2006 15:54:56 +0200

I think we can apply this, but rather then forcing subclasses
to implement the new signature, I'd rather implement a default
behaviour for the new virtual method in the base class.
(just discard the 'infile' arg and call the existing method).

This way we won't be forced to update all other GUIs.

--strk;

On Sat, Jul 29, 2006 at 01:11:10PM +0200, annonygmouse wrote:
> 
> Here's a patch that puts the name of the file played in gnash as
> the title of the window (gtk version).
> 
> If you think it's interesting enough, please apply.
> 
> Kind regards
> SebastiĆ 

> ? gnash
> ? gtk.lo
> ? gtk_glue_gtkglext.lo
> ? gui.lo
> ? libgnashgui.la
> Index: gnash.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/gui/gnash.cpp,v
> retrieving revision 1.19
> diff -u -r1.19 gnash.cpp
> --- gnash.cpp 27 Jul 2006 12:10:25 -0000      1.19
> +++ gnash.cpp 29 Jul 2006 11:09:23 -0000
> @@ -325,7 +325,7 @@
>  
>      gui.init(argc, &argv);
>  
> -    gui.createWindow(width, height);
> +    gui.createWindow(infile, width, height);
>  
>      // Load the actual movie.
>      gnash::movie_definition *md;
> Index: gtk.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
> retrieving revision 1.14
> diff -u -r1.14 gtk.cpp
> --- gtk.cpp   27 Jul 2006 00:15:22 -0000      1.14
> +++ gtk.cpp   29 Jul 2006 11:09:24 -0000
> @@ -82,7 +82,7 @@
>  }
>  
>  bool
> -GtkGui::createWindow(int width, int height)
> +GtkGui::createWindow(char *title, int width, int height)
>  {
>      GNASH_REPORT_FUNCTION;
>  
> @@ -91,6 +91,7 @@
>        dbglogfile << "Created XEmbedded window" << endl;
>      } else {
>        _window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
> +      gtk_window_set_title(GTK_WINDOW(_window), title);
>        dbglogfile << "Created top level window" << endl;
>      }
>  
> Index: gtksup.h
> ===================================================================
> RCS file: /sources/gnash/gnash/gui/gtksup.h,v
> retrieving revision 1.11
> diff -u -r1.11 gtksup.h
> --- gtksup.h  15 Jul 2006 16:02:23 -0000      1.11
> +++ gtksup.h  29 Jul 2006 11:09:24 -0000
> @@ -70,7 +70,7 @@
>      GtkGui(unsigned long xid, float scale, bool loop, unsigned int depth);
>      virtual ~GtkGui();
>      virtual bool init(int argc, char **argv[]);
> -    virtual bool createWindow(int width, int height);
> +    virtual bool createWindow( char *title, int width, int height);
>      virtual bool run(void *arg);    
>      virtual bool createMenu();
>      virtual bool setupEvents();
> Index: gui.h
> ===================================================================
> RCS file: /sources/gnash/gnash/gui/gui.h,v
> retrieving revision 1.8
> diff -u -r1.8 gui.h
> --- gui.h     27 Jul 2006 00:15:22 -0000      1.8
> +++ gui.h     29 Jul 2006 11:09:24 -0000
> @@ -64,7 +64,7 @@
>      
>      bool init(int xid, int argc, char **argv[]);
>      bool createWindow(int xid, int width, int height);    
> -    virtual bool createWindow(int width, int height) = 0;
> +    virtual bool createWindow(char *title, int width, int height) = 0;
>      virtual bool run(void *) = 0;
>      virtual bool createMenu() = 0;
>      virtual bool setupEvents() = 0;

> _______________________________________________
> Gnash-dev mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnash-dev


-- 

 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII. 





reply via email to

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