~ubuntu-branches/ubuntu/saucy/mplayerplug-in/saucy

« back to all changes in this revision

Viewing changes to Source/plugin.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2006-06-27 04:52:18 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060627045218-dx495rr0atvev8nu
Tags: 3.25-7ubuntu1
Resynchronise with Debian (Closes Ubuntu: #33722, #43382, #44639,
#48424).

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
#include "../pixmaps/logo.xpm"
49
49
#endif
50
50
 
 
51
#ifdef HAVE_GETTEXT
 
52
#ifdef X_ENABLED
 
53
#include <locale.h>
 
54
#endif
 
55
#endif
 
56
 
51
57
extern int errno;
52
58
extern int DEBUG;
 
59
extern int instance_counter;
53
60
 
54
61
int32 STREAMBUFSIZE = 0X0FFFFFFF;
55
62
 
118
125
        new nsPluginInstance(aCreateDataStruct->instance);
119
126
 
120
127
    New(plugin, aCreateDataStruct);
121
 
    return plugin;
 
128
    return plugin;    
122
129
}
123
130
 
124
131
void NS_DestroyPluginInstance(nsPluginInstanceBase * aPlugin)
137
144
{
138
145
    int i;
139
146
 
 
147
    instance_counter++;
 
148
 
140
149
    toolkitok = toolkitOk(mInstance, &moz_toolkit, &plug_toolkit);
141
150
 
142
151
    mScriptablePeer = getScriptablePeer();
270
279
    af = NULL;
271
280
    loop = -1;
272
281
    rtsp_use_tcp = 0;
 
282
    rtsp_use_http = 0;
273
283
    keep_download = 0;
274
284
    maintain_aspect = 1;
275
285
    download_dir = strdup(getenv("HOME"));
291
301
    enable_mpeg = 1;
292
302
    enable_mp3 = 1;
293
303
    enable_ogg = 1;
 
304
    enable_midi = 0;
 
305
    enable_pls = 1;
294
306
 
295
307
    // JavaScript
296
308
    paused = 0;
306
318
 
307
319
    LoadConfigFile(this);
308
320
 
 
321
#ifdef HAVE_GETTEXT
 
322
#ifdef X_ENABLED
 
323
    setlocale(LC_ALL, "");
 
324
#endif
 
325
    textdomain("mplayerplug-in");
 
326
    bind_textdomain_codeset("mplayerplug-in", "utf-8");
 
327
#endif
309
328
}
310
329
 
311
330
nsPluginInstance::~nsPluginInstance()
320
339
    gdk_flush();
321
340
#endif
322
341
 
 
342
    instance_counter--;
323
343
 
324
344
    mInstance = NULL;
325
345
    mInitialized = FALSE;
374
394
                ("Thread is setup but waiting for signal so we need to shut it down\n");
375
395
        signalPlayerThread(this);
376
396
        threadsignaled = 1;
 
397
 
377
398
    }
378
399
 
379
400
    if (threadsetup == 1) {
 
401
 
380
402
        if (threadlaunched == 1) {
381
403
            pthread_mutex_lock(&control_mutex);
382
404
            if (paused == 1) {
384
406
                paused = 0;
385
407
            }
386
408
            sendCommand(this, "quit\n");
387
 
            pthread_mutex_lock(&read_mutex);
 
409
#ifndef BSD
 
410
            pthread_mutex_lock(&read_mutex);
 
411
#endif
388
412
            cancelled = 1;
389
 
            pthread_mutex_unlock(&read_mutex);
 
413
#ifndef BSD
 
414
            pthread_mutex_unlock(&read_mutex);
 
415
#endif
390
416
            pthread_mutex_unlock(&control_mutex);
391
417
            pthread_cancel(player_thread);
392
418
            pthread_join(player_thread, NULL);
393
419
            js_state = JS_STATE_UNDEFINED;
394
 
            
 
420
 
395
421
        }
396
422
    }
397
 
 
398
423
#ifdef GTK_ENABLED
399
424
    while (g_idle_remove_by_data(this)) {
400
425
        if (DEBUG)
403
428
#endif
404
429
 
405
430
    if (pid != 0) {
406
 
        killmplayer(this);
 
431
        killmplayer(this);
407
432
    }
408
433
 
409
434
    if (DEBUG)
431
456
        if (targetplayer != 0) {
432
457
            g_signal_handler_disconnect(GTK_OBJECT(gtkwidget),
433
458
                                        delete_signal_id);
 
459
            g_signal_handler_disconnect(GTK_OBJECT(gtkwidget),
 
460
                                        visible_signal_id);
434
461
            if (GTK_IS_WIDGET(button_window))
435
462
                gtk_widget_destroy(button_window);
 
463
 
436
464
        }
437
465
        if (GTK_IS_WIDGET(gtkwidget))
438
466
            gtk_widget_destroy(gtkwidget);
 
467
 
439
468
    }
440
469
#endif
441
470
 
651
680
        return NPERR_NO_ERROR;
652
681
    }
653
682
 
654
 
 
655
683
    if ((Window) window != (Window) aWindow->window) {
656
684
        if (DEBUG)
657
685
            printf("New window! old: 0x%li    new 0x%li\n",
709
737
            gtkwidget = gtk_window_new(GTK_WINDOW_POPUP);
710
738
        } else {
711
739
            gtkwidget = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 
740
            button_window = gtk_window_new(GTK_WINDOW_POPUP);
712
741
#ifdef GTK2_ENABLED
713
742
            delete_signal_id =
714
743
                g_signal_connect(GTK_OBJECT(gtkwidget), "delete_event",
725
754
                                 "mplayerplug-in player");
726
755
 
727
756
        }
 
757
 
728
758
        gtk_widget_realize(gtkwidget);
729
759
        gdk_flush();
730
760
        gtk_widget_add_events(gtkwidget, GDK_BUTTON_PRESS_MASK);
736
766
        if (targetplayer == 1) {
737
767
            window_width = 400;
738
768
            window_height = 200;
 
769
            movie_width = 400;
 
770
            movie_height = 200;
739
771
        }
740
772
        if (DEBUG > 1)
741
773
            printf("setting window size\n");
749
781
        gtk_widget_set_usize(gtkwidget, window_width, window_height);
750
782
#endif
751
783
 
752
 
 
753
 
 
754
 
#ifdef HAVE_GETTEXT
755
 
        textdomain("mplayerplug-in");
756
 
        bind_textdomain_codeset("mplayerplug-in", "utf-8");
757
 
#endif
758
 
 
759
784
        popup_menu = GTK_MENU(gtk_menu_new());
760
785
        menuitem_play =
761
786
            GTK_MENU_ITEM(gtk_menu_item_new_with_label(_("Play")));
889
914
                                 "button_press_event",
890
915
                                 G_CALLBACK(popup_handler),
891
916
                                 GTK_OBJECT(popup_menu));
 
917
        gtk_widget_set_size_request(GTK_WIDGET(fixed_container),
 
918
                                    window_width, window_height);
 
919
        gtk_widget_set_size_request(GTK_WIDGET(fixed_event_box),
 
920
                                    window_width, window_height);
 
921
 
892
922
#endif
893
923
#ifdef GTK1_ENABLED
894
924
        gtk_signal_connect_object(GTK_OBJECT(fixed_event_box),
895
925
                                  "button_press_event",
896
926
                                  GTK_SIGNAL_FUNC(popup_handler),
897
927
                                  GTK_OBJECT(popup_menu));
 
928
        gtk_widget_set_usize(GTK_WIDGET(fixed_container), window_width,
 
929
                             window_height);
 
930
        gtk_widget_set_usize(GTK_WIDGET(fixed_event_box), window_width,
 
931
                             window_height);
 
932
 
898
933
#endif
899
934
        gtk_container_add(GTK_CONTAINER(fixed_event_box), fixed_container);
900
935
 
973
1008
 
974
1009
        gtk_misc_set_alignment(GTK_MISC(status), 0, 0);
975
1010
        gtk_label_set_line_wrap(status, TRUE);
 
1011
        drawing_area = gtk_socket_new();
 
1012
        gtk_widget_set_events(drawing_area, GDK_BUTTON_PRESS_MASK);
 
1013
        if (mode == NP_EMBED) {
 
1014
            gtk_fixed_put(GTK_FIXED(fixed_container), drawing_area, 0, 0);
 
1015
        } else {
 
1016
            gtk_fixed_put(GTK_FIXED(fixed_container),
 
1017
                          drawing_area, 10, 100);
 
1018
        }
 
1019
        gtk_widget_show(drawing_area);
 
1020
 
 
1021
 
976
1022
        gtk_container_add(GTK_CONTAINER(gtkwidget), fixed_event_box);
977
1023
        if (!hidestatus)
978
1024
            gtk_widget_show(GTK_WIDGET(status));
991
1037
#endif
992
1038
 
993
1039
#ifdef GTK2_ENABLED
 
1040
            gtk_widget_modify_bg(gtkwidget, GTK_STATE_NORMAL,
 
1041
                                 &black);
994
1042
            gtk_widget_modify_bg(fixed_event_box, GTK_STATE_NORMAL,
995
1043
                                 &black);
996
1044
            gtk_widget_modify_fg(GTK_WIDGET(status), GTK_STATE_NORMAL,
1004
1052
 
1005
1053
        gdk_flush();
1006
1054
        InitPixbufs(this);
1007
 
 
1008
 
        if (DEBUG > 1)
1009
 
            printf("all setup and ready to reparent and map\n");
1010
1055
#ifdef GTK_ENABLED
1011
1056
 
1012
1057
        if (targetplayer == 0) {
1014
1059
                            GDK_WINDOW_XWINDOW(gtkwidget->window), window,
1015
1060
                            0, 0);
1016
1061
            gtk_widget_map(gtkwidget);
 
1062
        } else {
 
1063
            gtk_widget_show(button_window);
 
1064
            XReparentWindow(GDK_WINDOW_XDISPLAY(button_window->window),
 
1065
                            GDK_WINDOW_XWINDOW(button_window->window),
 
1066
                            window, 0, 0);
 
1067
            gtk_widget_map(button_window);
1017
1068
        }
1018
1069
#endif
1019
 
 
1020
1070
        if (panel_drawn == 0 && autostart == 0 && nomediacache == 1) {
1021
1071
            if (showcontrols) {
1022
1072
                panel_height = window_height;
1025
1075
#endif
1026
1076
            }
1027
1077
        }
1028
 
 
1029
 
        if (DEBUG > 1)
1030
 
            printf("reparent and map done\n");
1031
 
 
1032
1078
#endif
1033
1079
 
1034
1080
    } else {
1072
1118
                            pthread_mutex_lock(&control_mutex);
1073
1119
                            js_state = JS_STATE_READY;
1074
1120
                            pthread_mutex_unlock(&control_mutex);
1075
 
                        }                       
 
1121
                        }
1076
1122
                    }
1077
1123
                }
1078
1124
 
1090
1136
                            pthread_mutex_lock(&control_mutex);
1091
1137
                            js_state = JS_STATE_READY;
1092
1138
                            pthread_mutex_unlock(&control_mutex);
1093
 
                        }                       
 
1139
                        }
1094
1140
                    }
1095
1141
                }
1096
1142
            }
1117
1163
#ifdef GTK2_ENABLED
1118
1164
        gtk_widget_set_size_request(GTK_WIDGET(status),
1119
1165
                                    window_width - 20, window_height - 25);
 
1166
        gtk_widget_set_size_request(GTK_WIDGET(gtkwidget),
 
1167
                                    window_width, window_height);
 
1168
 
1120
1169
#endif
1121
1170
#ifdef GTK1_ENABLED
1122
1171
        gtk_widget_set_usize(GTK_WIDGET(status),
1123
1172
                             window_width - 20, window_height - 25);
 
1173
        gtk_widget_set_usize(GTK_WIDGET(gtkwidget),
 
1174
                             window_width, window_height);
1124
1175
#endif
 
1176
        if (panel_drawn == 1) {
 
1177
            height = 16;
 
1178
            width = 21;
 
1179
 
 
1180
            multiplier = 0;
 
1181
 
 
1182
            if (mmsstream == 0) {
 
1183
                gtk_fixed_move(GTK_FIXED(fixed_container),
 
1184
                               GTK_WIDGET(rew_event_box),
 
1185
                               width * multiplier++,
 
1186
                               window_height - height);
 
1187
            }
 
1188
            gtk_fixed_move(GTK_FIXED(fixed_container),
 
1189
                           GTK_WIDGET(play_event_box),
 
1190
                           width * multiplier++, window_height - height);
 
1191
            gtk_fixed_move(GTK_FIXED(fixed_container),
 
1192
                           GTK_WIDGET(pause_event_box),
 
1193
                           width * multiplier++, window_height - height);
 
1194
            gtk_fixed_move(GTK_FIXED(fixed_container),
 
1195
                           GTK_WIDGET(stop_event_box),
 
1196
                           width * multiplier++, window_height - height);
 
1197
            if (mmsstream == 0) {
 
1198
                gtk_fixed_move(GTK_FIXED(fixed_container),
 
1199
                               GTK_WIDGET(ff_event_box),
 
1200
                               width * multiplier++,
 
1201
                               window_height - height);
 
1202
            }
 
1203
            if (GTK_IS_WIDGET(mediaprogress_bar)) {
 
1204
                gtk_fixed_move(GTK_FIXED(fixed_container),
 
1205
                               GTK_WIDGET(mediaprogress_bar),
 
1206
                               (width * multiplier + 10),
 
1207
                               window_height - height + 2);
 
1208
 
 
1209
                gtk_widget_set_usize(GTK_WIDGET(mediaprogress_bar),
 
1210
                                     window_width -
 
1211
                                     (width * (multiplier + 1) + 20),
 
1212
                                     height - 4);
 
1213
            }
 
1214
            gtk_fixed_move(GTK_FIXED(fixed_container),
 
1215
                           GTK_WIDGET(fs_event_box),
 
1216
                           (window_width - width), window_height - height);
 
1217
 
 
1218
        }
 
1219
        if (progress_bar != NULL) {
 
1220
            gtk_fixed_move(GTK_FIXED(fixed_container),
 
1221
                           GTK_WIDGET(progress_bar),
 
1222
                           10, window_height - 50);
 
1223
 
 
1224
            gtk_widget_set_usize(GTK_WIDGET(progress_bar),
 
1225
                                 window_width - 20, 15);
 
1226
        }
 
1227
 
1125
1228
    }
1126
1229
    if (gtkwidget == NULL)
1127
1230
        return NPERR_NO_ERROR;
1128
1231
 
1129
1232
    if (targetplayer == 0)
1130
1233
        gtk_widget_show(gtkwidget);
1131
 
/*
1132
 
    XResizeWindow(GDK_WINDOW_XDISPLAY(gtkwidget->window),
1133
 
                  GDK_WINDOW_XWINDOW(gtkwidget->window),
1134
 
                  aWindow->width, aWindow->height);
1135
 
    XResizeWindow(display, window, aWindow->width, aWindow->height);
1136
 
*/
 
1234
 
1137
1235
    if (DEBUG > 1)
1138
1236
        printf("resize is complete\n");
1139
1237
 
1145
1243
#endif
1146
1244
        }
1147
1245
    }
1148
 
 
1149
 
    if (panel_drawn == 1 && mode == NP_FULL) {
1150
 
        if (panel_height >= 32) {
1151
 
            height = 32;
1152
 
            width = 43;
1153
 
        } else {
1154
 
            height = 16;
1155
 
            width = 21;
1156
 
        }
1157
 
 
1158
 
        multiplier = 0;
1159
 
 
1160
 
        if (mmsstream == 0) {
1161
 
            gtk_fixed_move(GTK_FIXED(fixed_container),
1162
 
                           GTK_WIDGET(rew_event_box), width * multiplier++,
1163
 
                           aWindow->height - height);
1164
 
        }
1165
 
        gtk_fixed_move(GTK_FIXED(fixed_container),
1166
 
                       GTK_WIDGET(play_event_box), width * multiplier++,
1167
 
                       aWindow->height - height);
1168
 
        gtk_fixed_move(GTK_FIXED(fixed_container),
1169
 
                       GTK_WIDGET(pause_event_box), width * multiplier++,
1170
 
                       aWindow->height - height);
1171
 
        gtk_fixed_move(GTK_FIXED(fixed_container),
1172
 
                       GTK_WIDGET(stop_event_box), width * multiplier++,
1173
 
                       aWindow->height - height);
1174
 
        if (mmsstream == 0) {
1175
 
            gtk_fixed_move(GTK_FIXED(fixed_container),
1176
 
                           GTK_WIDGET(ff_event_box), width * multiplier++,
1177
 
                           aWindow->height - height);
1178
 
        }
1179
 
        if (mediaprogress_bar != NULL) {
1180
 
            gtk_fixed_move(GTK_FIXED(fixed_container),
1181
 
                           GTK_WIDGET(mediaprogress_bar),
1182
 
                           (width * multiplier + 10),
1183
 
                           aWindow->height - height + 2);
1184
 
            gtk_widget_set_usize(GTK_WIDGET(mediaprogress_bar),
1185
 
                                 aWindow->width -
1186
 
                                 (width * (multiplier + 1) + 20),
1187
 
                                 height - 4);
1188
 
        }
1189
 
        gtk_fixed_move(GTK_FIXED(fixed_container),
1190
 
                       GTK_WIDGET(fs_event_box),
1191
 
                       (aWindow->width - width), aWindow->height - height);
1192
 
 
1193
 
    }
1194
1246
#endif
1195
1247
 
1196
1248
    if (DEBUG >= 2) {
1279
1331
                if (n->fname != NULL)
1280
1332
                    remove(n->fname);
1281
1333
            }
1282
 
            printf
1283
 
                ("checking to see if we need to make a button\nn->url=%s\nurl=%s\nhref=%s\n",
1284
 
                 n->url, url, href);
 
1334
 
 
1335
            if (DEBUG)
 
1336
                printf
 
1337
                    ("checking to see if we need to make a button\nn->url=%s\nurl=%s\nhref=%s\n",
 
1338
                     n->url, url, (href == NULL) ? "(NULL)" : href);
 
1339
 
1285
1340
            if (n->url != NULL && url != NULL) {
1286
1341
                if ((strncmp(n->url, url, 1024) == 0) && href != NULL) {
1287
1342
                    if (srcToButton(n->fname, this)) {
1296
1351
                        NPN_GetURL(mInstance, href, NULL);
1297
1352
                        return NPERR_NO_ERROR;
1298
1353
                    }
 
1354
                } else if ( strstr(n->url, url) && href != NULL) {
 
1355
                    // we are in this block because the url is a relative url and so
 
1356
                    // it is a subset of the fully qualified n->url
 
1357
                    if (srcToButton(n->fname, this)) {
 
1358
                        n->play = 0;
 
1359
                        pthread_mutex_unlock(&playlist_mutex);
 
1360
                        return NPERR_NO_ERROR;
 
1361
                    } else {
 
1362
                        n = newNode();
 
1363
                        snprintf(n->url, 1024, "%s", href);
 
1364
                        addToEnd(td->list, n);
 
1365
                        pthread_mutex_unlock(&playlist_mutex);
 
1366
                        NPN_GetURL(mInstance, href, NULL);
 
1367
                        return NPERR_NO_ERROR;
 
1368
                    }
1299
1369
                }
1300
1370
            }
1301
1371
 
1306
1376
                buildPlaylist(this, n->fname, n);
1307
1377
                if (mode == NP_FULL || noembed == 1) {
1308
1378
#ifdef X_ENABLED
1309
 
                    DrawUI(widget, this, "Download Complete", 0, 99);
 
1379
                    DrawUI(widget, this, _("Download Complete"), 0, 99);
1310
1380
#endif
1311
1381
#ifdef GTK_ENABLED
1312
1382
                    if (status != NULL) {
1313
 
                        gtk_label_set_text(status, "Download Complete");
 
1383
                        gtk_label_set_text(status, _("Download Complete"));
1314
1384
                    }
 
1385
                    g_idle_add(gtkgui_save_enable, this);
1315
1386
                    if (progress_bar != NULL) {
1316
1387
                        gtk_progress_bar_update(progress_bar, 1.0);
1317
1388
                        if (n->next == NULL) {
1354
1425
                                    pthread_mutex_lock(&control_mutex);
1355
1426
                                    js_state = JS_STATE_READY;
1356
1427
                                    pthread_mutex_unlock(&control_mutex);
1357
 
                                
 
1428
 
1358
1429
                                }
1359
1430
                            }
1360
1431
 
1435
1506
                            pthread_mutex_lock(&control_mutex);
1436
1507
                            js_state = JS_STATE_READY;
1437
1508
                            pthread_mutex_unlock(&control_mutex);
1438
 
                        }                       
 
1509
                        }
1439
1510
                    }
1440
1511
                }
1441
1512
            }
1524
1595
                                pthread_mutex_lock(&control_mutex);
1525
1596
                                js_state = JS_STATE_READY;
1526
1597
                                pthread_mutex_unlock(&control_mutex);
1527
 
                            
 
1598
 
1528
1599
                            }
1529
1600
                        }
1530
1601
                    }
1541
1612
{
1542
1613
    Node *n;
1543
1614
 
1544
 
    if (state == STATE_PLAY_CANCELLED)
 
1615
    if (state == STATE_PLAY_CANCELLED || cancelled == 1)
1545
1616
        return -1;
1546
1617
 
1547
1618
    if (td == NULL)
1607
1678
                        pthread_mutex_lock(&control_mutex);
1608
1679
                        js_state = JS_STATE_READY;
1609
1680
                        pthread_mutex_unlock(&control_mutex);
1610
 
                    
 
1681
 
1611
1682
                    }
1612
1683
                }
1613
1684
            }
1616
1687
            if (strlen(n->fname) == 0) {
1617
1688
                snprintf(n->fname, 1024, "%s",
1618
1689
                         tempnam("/tmp", "mplayerplug-inXXXXXX"));
 
1690
                if (strstr(mimetype, "midi") != NULL) {
 
1691
                    strlcat(n->fname, ".mid", 1024);
 
1692
                }
 
1693
                if (strstr(mimetype, "mp3") != NULL) {
 
1694
                    strlcat(n->fname, ".mp3", 1024);
 
1695
                }
 
1696
                if (strstr(mimetype, "audio/mpeg") != NULL) {
 
1697
                    strlcat(n->fname, ".mp3", 1024);
 
1698
                }
1619
1699
                if (DEBUG)
1620
1700
                    printf("WR tempname: %s\n", n->fname);
1621
1701
 
1683
1763
    char message[1024];
1684
1764
    char *burl;
1685
1765
 
1686
 
    if (state == STATE_PLAY_CANCELLED)
 
1766
    if (state == STATE_PLAY_CANCELLED || cancelled == 1)
1687
1767
        return -1;
 
1768
 
1688
1769
    if (td == NULL)
1689
1770
        return -1;
1690
1771
 
1877
1958
                }
1878
1959
            }
1879
1960
            if (n->play == 1) {
 
1961
                if (n->localcache != NULL && nomediacache == 1) {
 
1962
                    fclose(n->localcache);
 
1963
                }
1880
1964
                if (n->mmsstream == 1) {
1881
1965
                    if (threadsignaled == 0) {
1882
1966
                        if (autostart) {
1908
1992
                                    pthread_mutex_lock(&control_mutex);
1909
1993
                                    js_state = JS_STATE_READY;
1910
1994
                                    pthread_mutex_unlock(&control_mutex);
1911
 
                                
 
1995
 
1912
1996
                                }
1913
1997
                            }
1914
1998
                        }
1992
2076
        signalPlayerThread(this);
1993
2077
        threadsignaled = 1;
1994
2078
    }
1995
 
 
1996
2079
    // normal state, the media is paused or stopped and the thread is active.
1997
2080
    if (paused == 1) {
1998
2081
        if (DEBUG)
2362
2445
 
2363
2446
#ifdef GTK_ENABLED
2364
2447
    int multiplier, height = 0, width;
2365
 
    int x, y, disp_x, pos_x, disp_y, pos_y;
 
2448
    int x, y, disp_x, pos_x, disp_y, pos_y, button_top;
2366
2449
    GdkColormap *colormap;
2367
2450
    GdkColor black;
2368
2451
#endif
2510
2593
                height = 16;
2511
2594
                width = 21;
2512
2595
 
 
2596
                if (targetplayer == 0) {
 
2597
                    button_top = win_height - height;
 
2598
                } else {
 
2599
                    button_top = win_height;
 
2600
                }
 
2601
 
2513
2602
                multiplier = 0;
2514
2603
 
2515
2604
                if (mmsstream == 0 && win_width > 126) {
2516
2605
                    gtk_fixed_move(GTK_FIXED(fixed_container),
2517
2606
                                   GTK_WIDGET(rew_event_box),
2518
 
                                   width * multiplier++,
2519
 
                                   win_height - height);
 
2607
                                   width * multiplier++, button_top);
2520
2608
                }
2521
2609
                gtk_fixed_move(GTK_FIXED(fixed_container),
2522
2610
                               GTK_WIDGET(play_event_box),
2523
 
                               width * multiplier++, win_height - height);
 
2611
                               width * multiplier++, button_top);
2524
2612
                if (win_width > 126)
2525
2613
                    gtk_fixed_move(GTK_FIXED(fixed_container),
2526
2614
                                   GTK_WIDGET(pause_event_box),
2527
 
                                   width * multiplier++,
2528
 
                                   win_height - height);
 
2615
                                   width * multiplier++, button_top);
2529
2616
                gtk_fixed_move(GTK_FIXED(fixed_container),
2530
2617
                               GTK_WIDGET(stop_event_box),
2531
 
                               width * multiplier++, win_height - height);
 
2618
                               width * multiplier++, button_top);
2532
2619
                if (mmsstream == 0 && win_width > 126) {
2533
2620
                    gtk_fixed_move(GTK_FIXED(fixed_container),
2534
2621
                                   GTK_WIDGET(ff_event_box),
2535
 
                                   width * multiplier++,
2536
 
                                   win_height - height);
 
2622
                                   width * multiplier++, button_top);
2537
2623
                }
2538
2624
 
2539
2625
                if (mediaprogress_bar != NULL) {
2540
2626
                    gtk_fixed_move(GTK_FIXED(fixed_container),
2541
2627
                                   GTK_WIDGET(mediaprogress_bar),
2542
2628
                                   (width * multiplier + 10),
2543
 
                                   win_height - height + 2);
 
2629
                                   button_top + 2);
2544
2630
                    gtk_widget_set_usize(GTK_WIDGET(mediaprogress_bar),
2545
2631
                                         win_width -
2546
2632
                                         (width * (multiplier + 1) + 20),
2549
2635
                if (win_width > 126)
2550
2636
                    gtk_fixed_move(GTK_FIXED(fixed_container),
2551
2637
                                   GTK_WIDGET(fs_event_box),
2552
 
                                   (win_width - width),
2553
 
                                   win_height - height);
 
2638
                                   (win_width - width), button_top);
2554
2639
 
2555
2640
 
2556
2641
            }
2679
2764
                gtk_window_fullscreen(GTK_WINDOW(gtkwidget));
2680
2765
            }
2681
2766
#endif
 
2767
 
2682
2768
#ifdef GTK1_ENABLED
2683
2769
            fs_window = gtk_window_new(GTK_WINDOW_POPUP);
2684
2770
            gtk_widget_add_events(fs_window, GDK_BUTTON_PRESS_MASK);
2717
2803
                height = 16;
2718
2804
                width = 21;
2719
2805
 
 
2806
 
2720
2807
                multiplier = 0;
2721
2808
 
2722
2809
                if (mmsstream == 0) {