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: annonygmouse
Subject: Re: [Gnash-dev] Set window title (gtk).
Date: Sun, 30 Jul 2006 22:24:03 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; ca-AD; rv:1.7.13) Gecko/20060621 Debian/1.7.13-0.2

strk wrote:
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.

I hope this is what you meant (see attached patch).

I've obtained the patch doing:

address@hidden:~/gnash/gui$ cvs diff -u > ../set_window_title.patch

If this is not how you need it, please tell me so, I'm new in this code contributing thing :O.

I would also like to capture the + and - buttons to increment and decrement sound volume respectivelly. I think it would be easy enough to do it. But if there are other _easy_ and more important/urgent things to do, tell me and I'll try it.

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.20
diff -u -r1.20 gnash.cpp
--- gnash.cpp   29 Jul 2006 13:48:28 -0000      1.20
+++ gnash.cpp   30 Jul 2006 20:20:22 -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     30 Jul 2006 20:20:23 -0000
@@ -82,6 +82,19 @@
 }
 
 bool
+GtkGui::createWindow(char *title, int width, int height)
+{
+//First call the old createWindow function and then set the title.
+//In case there's some need to not setting the title.
+    bool ret;
+
+    ret = createWindow(width, height);
+    gtk_window_set_title(GTK_WINDOW(_window), title);
+    return ret;
+}
+
+
+bool
 GtkGui::createWindow(int width, int height)
 {
     GNASH_REPORT_FUNCTION;
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    30 Jul 2006 20:20:23 -0000
@@ -70,6 +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(char* title, int width, int height);
     virtual bool createWindow(int width, int height);
     virtual bool run(void *arg);    
     virtual bool createMenu();
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       30 Jul 2006 20:20:23 -0000
@@ -65,6 +65,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;

reply via email to

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