~ubuntu-branches/ubuntu/saucy/gnash/saucy-proposed

« back to all changes in this revision

Viewing changes to gui/gtk/gtk.cpp

  • Committer: Package Import Robot
  • Author(s): Micah Gersten
  • Date: 2012-03-04 03:19:06 UTC
  • mfrom: (1.1.18) (3.1.24 sid)
  • Revision ID: package-import@ubuntu.com-20120304031906-p6q5rnb0xhgpof7o
Tags: 0.8.10-3ubuntu1
* Merge from Debian testing (FFe: LP: #940876), remaining changes:
  - Use mozilla-flashplugin as the alternative for now
  - Change xulrunner-dev build dep to firefox-dev
* Drop the plugin API porting patch, this has been fixed upstream
  - drop debian/patches*
* Drop the following change as we want Adobe's player to take priority
  if it's installed
  - Set alternative priority to 50 so that it matches Adobe Flash's priority

Show diffs side-by-side

added added

removed removed

Lines of Context:
156
156
{
157
157
#ifdef HAVE_X11
158
158
    if (!XInitThreads()) {
159
 
        log_debug("Failed to initialize X threading support\n");
 
159
        log_error(_("Failed to initialize X threading support\n"));
160
160
        return false;
161
161
    }
162
162
#endif
170
170
#else
171
171
        _window = gtk_plug_new(_xid);
172
172
#endif
173
 
        log_debug (_("Created XEmbedded window"));
 
173
        // log_debug("Created XEmbedded window");
174
174
    } else {
175
175
        _window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
176
 
        log_debug (_("Created top level window"));
 
176
        // log_debug ("Created top level window");
177
177
    }
178
178
    
179
179
    addGnashIcon(GTK_WINDOW(_window));
199
199
        // If we don't have these extensions, don't bother with OpenGl,
200
200
        // drop back to AGG.
201
201
        if (!glx || !dri) {
202
 
            g_warning("This system lacks a hardware OpenGL driver!");
 
202
            log_error(_("This system lacks a hardware OpenGL driver!"));
203
203
        }
204
204
    }
205
205
 
264
264
bool
265
265
GtkGui::run()
266
266
{
 
267
    // Kick-start before setting the interval timeout
 
268
    advance_movie(this);
 
269
 
267
270
    gtk_main();
268
271
    return true;
269
272
}
281
284
    
282
285
    RcInitFile& rcfile = RcInitFile::getDefaultInstance();
283
286
    
284
 
    if (!rcfile.popupMessages()) return;
 
287
    if (!rcfile.popupMessages()) {
 
288
        return;
 
289
    }
285
290
 
286
291
    GtkWidget* popup = gtk_dialog_new_with_buttons("Gnash Error",
287
292
            GTK_WINDOW(_window),
410
415
            cursortype = GDK_LAST_CURSOR;
411
416
    }
412
417
  
413
 
    GdkCursor* gdkcursor = NULL;
 
418
    GdkCursor* gdkcursor = NULL; 
414
419
  
415
420
    if (cursortype != GDK_LAST_CURSOR) {
416
421
         gdkcursor = gdk_cursor_new(cursortype);
431
436
 
432
437
    bool state = _mouseShown;
433
438
 
434
 
    if (show == _mouseShown) return state;
435
 
 
 
439
    RcInitFile& rcfile = RcInitFile::getDefaultInstance();
 
440
    
 
441
    // Whether to forcibly show the mouse pointer even if the SWF file
 
442
    // disables it. This allows touchscreen based SWF files to
 
443
    // work on a normal non-touchscreen desktop.
 
444
    if (rcfile.showMouse()) {
 
445
        return true;
 
446
    } else {
 
447
        if (show == _mouseShown) {
 
448
            return state;
 
449
        }
 
450
    }
 
451
    
436
452
    if (!show) {
437
453
        GdkPixmap *pixmap;
438
454
        GdkColor *color;
451
467
        _mouseShown = false;
452
468
 
453
469
    }
454
 
    else if (show) _mouseShown = true;
 
470
    else if (show) {
 
471
        _mouseShown = true;
 
472
    }
455
473
    
456
474
    return state;
457
475
}
611
629
{
612
630
    _interval = interval;
613
631
 
614
 
    if ( ! isStopped() ) startAdvanceTimer();
 
632
    if ( ! isStopped() ) {
 
633
        startAdvanceTimer();
 
634
    }
615
635
}
616
636
 
617
637
///////////////////////////////////////////////////////////////////////////////
710
730
void
711
731
GtkGui::resizeWindow(int width, int height)
712
732
{
713
 
    log_debug(_("GtkGui: Window resize request received"));
 
733
    // log_debug("GtkGui: Window resize request received");
714
734
 
715
735
    if (!_xid) {
716
736
    
2253
2273
 
2254
2274
    if (!pathname) {
2255
2275
        log_error (_("Couldn't find pixmap file: %s"), filename);
2256
 
        g_warning (_("Couldn't find pixmap file: %s"), filename);
 
2276
        g_warning(_("Couldn't find pixmap file: %s"), filename);
2257
2277
        return NULL;
2258
2278
    }
2259
2279
 
2568
2588
    // run() will return. If run() is then changed to return a pointer to the
2569
2589
    // next file to be played, then the Player class can play the next file,
2570
2590
    // unless run() returns NULL.
2571
 
    log_error (_("Attempting to open file %s.\n"
 
2591
    log_error(_("Attempting to open file %s.\n"
2572
2592
               "NOTE: the file open functionality is not yet implemented!"),
2573
2593
               filename);
2574
2594