patchGnash - The GNU Flash player - Patches: patch #5640, Add about dialog to menu.

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5640: Add about dialog to menu.

Submitter:  Sebastiá Matas <annonygmouse>
Submitted:  Sat 16 Dec 2006 07:06:44 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Ready For Test Privacy:  Public
Assigned to:  rsavoye Open/Closed:  Closed

Jump to the original submission

Mon 28 May 2007 06:11:53 PM UTC, comment #6: 

The about box patch got added ages ago, so I'm closing this.

Rob Savoye <rsavoye>
Group administrator
Thu 28 Dec 2006 01:47:27 AM UTC, comment #5: 

Movie control isn't working.

Sandro Santilli <strk>
Group Member
Mon 18 Dec 2006 08:54:10 PM UTC, comment #4: 

I just checked in a variant of this patch to CVS. I made all the sub menu from the MenuBar accessible from the Popup Menu. File->Open still doesn't work, and I don't believe it actually updates the $(HOME/.gnashrc file yet, but it's a good start. At some point after this fully works, these changes should also be ported to the QT/KDE gui, since that toolkit also supports menu bars and popup menus.

Rob Savoye <rsavoye>
Group administrator
Sun 17 Dec 2006 08:04:22 PM UTC, comment #3: 


Hi Rob.
Maybe adding the same menu-bar functionality to the
pop-up menu would mean having a "huge" pop-up menu.
Anyway I'll try it.

In order to have the File->Open menu working I need to
call the player from the gtkGui. Is there any easy
way to do it?
What I'm trying is to create a new method for the class Player
that will keeep the initializations previously done and
will only load the new file (movie).
Something like:
/* \brief Run, used to open a new flash file. Using previous initialization */
int Player::run(const char* infilel)
{
// No file name was supplied
assert (infile);
_infile = infile;

// Set base url
_baseurl = infile;

// Set _root._url (either explicit of from infile)
_url=std::string(infile);

// Set base url for this movie (needed before parsing)
gnash::set_base_url(URL(_baseurl));

// Load the actual movie.
_movie_def = load_movie();
if ( ! _movie_def )
{
return EXIT_FAILURE;
}


    // Get info about the width & height of the movie.
    int movie_width = static_cast<int>(_movie_def->get_width_pixels());
    int movie_height = static_cast<int>(_movie_def->get_height_pixels());
    float movie_fps = _movie_def->get_frame_rate();

    if (!width) {
      width = int(movie_width * scale);
    }
    if (!height) {
      height = int(movie_height * scale);
    }


    // Now that we know about movie size, resize gui window (pending).
    _gui->createWindow(infile, width, height);

    movie_root& root = VM::init(*_movie_def).getRoot();
    sprite_instance* m = root.get_root_movie();

    // Start loader thread
    _movie_def->completeLoad();

    // Parse parameters
    for ( map<string,string>::const_iterator it=params.begin(),
itEnd=params.end(); it != itEnd; ++it)
    {
// todo: use a case-insensitive string type
    if ( it->first == "flashvars" || it->first == "FlashVars" )
{
setFlashVars(*m, it->second);
continue;
}

// too much noise...
        log_warning("Unused parameter %s = %s",
// it->first.c_str(), it->second.c_str());
    }


    root.set_display_viewport(0, 0, width, height);
    root.set_background_alpha(background ? 1.0f : 0.05f);

    if (!delay) {
      delay = (unsigned int) (1000 / movie_fps) ; // milliseconds per frame
    }
    _gui->setInterval(delay);

    if (exit_timeout) {
      _gui->setTimeout((unsigned int)(exit_timeout * 1000));
    }

    _gui->run();

}


I'm not familiar with C++ and I don't know how to do this.
Any hint?

PS: I think I will be able to add checkboxes for gnashrc
as you want, but it will take me some time.

Sebastià

Sebastiá Matas <annonygmouse>
Group Member
Sun 17 Dec 2006 01:58:15 AM UTC, comment #2: 

I just checked in the first part of this patch, which adds the About box. It'd be nice if File->Open worked before checking in the rest. There is also support for Yelp, the GNOME help system (--enable-ghelp), so it should be possible to have a real "Help" item that would pop up the manual. Other ideas would be adding menu checkboxes for some of the settings in the $(HOME)/.gnashrc file.

For the XID being passed in, supressing the menubar is probably the right idea, especially if the same functionality can be accessible through the right-click menu.

Rob Savoye <rsavoye>
Group administrator
Sat 16 Dec 2006 11:52:13 PM UTC, comment #1: 


I attach a new version of the patch, trying to also
implement part of the task #6124 [1]

On the GTK gui I've managed to add the menubar with some
default menu options (glade style). The only usefull ones
are: Open File (opens a file dialog), quit and About.

I've tried to implement the file opening, but I've had no luck.
It seems there's need at Player to have the filename (_infile) if not it crashes on an strlen that I've not been able to track down.


Details:
   Whenever a xid is given to Gui, it does not create the menubar.

[1] https://savannah.gnu.org/task/?6124

(file #11543)

Sebastiá Matas <annonygmouse>
Group Member
Sat 16 Dec 2006 07:06:44 PM UTC, original submission:  


Hi, I had some time today and I've implemented a silly
about dialog using the gtkaboutdialog function[1].

I've used the developers names from gnash's homepage, hope it suits you.

Kind regards
Sebastià

[1] http://www.gtk.org/api/2.6/gtk/GtkAboutDialog.html

Sebastiá Matas <annonygmouse>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #11538:  about_gnash.diff added by annonygmouse (34KiB - text/x-patch - about dialog patch.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nihilus (Updated the item)
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by rsavoye (Posted a comment)
  • -email is unavailable- added by annonygmouse (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-05-28 rsavoye Open/ClosedOpen Closed
    2007-01-06 nihilus StatusIn Progress Ready For Test
    2006-12-18 rsavoye Assigned toNone rsavoye
    2006-12-17 rsavoye StatusNone In Progress
    2006-12-16 annonygmouse Attached File- Added about_gnash_open_file.diff, #11543
    2006-12-16 annonygmouse Attached File- Added about_gnash.diff, #11538

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code