~handsomepot/totem/trunk

« back to all changes in this revision

Viewing changes to debian/patches/revert_shell_menu.patch

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-05-26 00:07:51 UTC
  • mfrom: (1.6.1) (24.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20130526000751-kv8ap3x1di4qq8j2
Tags: 3.8.2-0ubuntu1
* Sync with Debian. Remaining changes: 
* debian/control.in:
  - Drop build-depends on libepc-ui-dev and libgrilo-0.2-dev (in universe)
  - Drop libxtst-dev build-depends so that the (redundant) fake key presses
    for inhibiting the screensaver are disabled (LP: #1007438)
  - Build-depend on libzeitgeist-dev
  - Suggest rather than recommend gstreamer components in universe
  - Add totem-plugins-extra
  - Add XB-Npp-Description and XB-Npp-Filename header to the 
    totem-mozilla package to improve ubufox/ubuntu plugin db integration 
  - Refer to Firefox in totem-mozilla description instead of Iceweasel
  - Don't have totem-mozilla recommend any particular browser
  - Drop obsolete python library dependencies since iplayer is no longer
    included
* debian/totem-common.install, debian/source_totem.py:
  - Install Ubuntu apport debugging hook
* debian/totem-plugins-extra.install:
  - Universe plugins split out of totem-plugins (currently only gromit)
* debian/totem-plugins.install:    
  - Skip the plugins split to -extra and add the zeitgeist plugin
* debian/rules:
  - Build with --fail-missing, to ensure we install everything. 
    + Ignore libtotem.{,l}a since we delibrately don't install these.
  - Re-enable hardening, make sure both PIE and BINDNOW are used
    by setting hardening=+all. (LP: #1039604)
* debian/patches/91_quicklist_entries.patch:
  - Add static quicklist
* debian/patches/92_gst-plugins-good.patch:
  - Build without unnecessary gstreamer1.0-bad dependency
* debian/patches/93_grilo_optional.patch:
  - Allow building without grilo while grilo MIR is still pending
* debian/patches/correct_desktop_mimetypes.patch:
  - Don't list the mimetypes after the unity lists
* debian/patches/revert_shell_menu.patch: 
  - revert the use of a shell menu until indicator-appmenu can handle
    the mixed shell/traditional menus itself
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
=== modified file 'data/totem.ui'
 
2
Index: totem-3.8.0/data/totem.ui
 
3
===================================================================
 
4
--- totem-3.8.0.orig/data/totem.ui      2013-05-25 23:02:46.490386347 -0400
 
5
+++ totem-3.8.0/data/totem.ui   2013-05-25 23:02:46.486386347 -0400
 
6
@@ -4,51 +4,6 @@
 
7
 <interface>
 
8
 <requires lib="gtk+" version="3.0"/>
 
9
 
 
10
-<menu id="appmenu">
 
11
-       <section>
 
12
-               <item>
 
13
-                       <attribute name="label" translatable="yes">_Open</attribute>
 
14
-                       <attribute name="action">app.open</attribute>
 
15
-                       <attribute name="accel">&lt;Ctrl&gt;O</attribute>
 
16
-               </item>
 
17
-               <item>
 
18
-                       <attribute name="label" translatable="yes">Open _Location</attribute>
 
19
-                       <attribute name="action">app.open-location</attribute>
 
20
-                       <attribute name="accel">&lt;Ctrl&gt;L</attribute>
 
21
-               </item>
 
22
-       </section>
 
23
-       <section>
 
24
-               <item>
 
25
-                       <attribute name="label" translatable="yes">_Fullscreen</attribute>
 
26
-                       <attribute name="action">app.fullscreen</attribute>
 
27
-                       <attribute name="accel">F11</attribute>
 
28
-               </item>
 
29
-       </section>
 
30
-       <section>
 
31
-               <item>
 
32
-                       <attribute name="label" translatable="yes">Prefere_nces</attribute>
 
33
-                       <attribute name="action">app.preferences</attribute>
 
34
-               </item>
 
35
-       </section>
 
36
-       <section>
 
37
-               <item>
 
38
-                       <attribute name="label" translatable="yes">Shuff_le</attribute>
 
39
-                       <attribute name="action">app.shuffle</attribute>
 
40
-               </item>
 
41
-               <item>
 
42
-                       <attribute name="label" translatable="yes">_Repeat</attribute>
 
43
-                       <attribute name="action">app.repeat</attribute>
 
44
-               </item>
 
45
-       </section>
 
46
-       <section>
 
47
-               <item>
 
48
-                       <attribute name="label" translatable="yes">_Quit</attribute>
 
49
-                       <attribute name="action">app.quit</attribute>
 
50
-                       <attribute name="accel">&lt;Ctrl&gt;Q</attribute>
 
51
-               </item>
 
52
-       </section>
 
53
-</menu>
 
54
-
 
55
 <object class="GtkUIManager" id="totem-ui-manager">
 
56
    <child>
 
57
       <object class="GtkActionGroup" id="main-action-group">
 
58
@@ -58,6 +13,23 @@
 
59
             </object>
 
60
          </child>
 
61
          <child>
 
62
+            <object class="GtkAction" id="open">
 
63
+               <property name="label" translatable="yes">_Open...</property>
 
64
+               <property name="stock-id">gtk-open</property>
 
65
+               <property name="tooltip" translatable="yes">Open a file</property>
 
66
+               <signal name="activate" handler="open_action_callback"/>
 
67
+            </object>
 
68
+            <accelerator key="O" modifiers="GDK_CONTROL_MASK"/>
 
69
+         </child>
 
70
+         <child>
 
71
+            <object class="GtkAction" id="open-location">
 
72
+               <property name="label" translatable="yes">Open _Location...</property>
 
73
+               <property name="tooltip" translatable="yes">Open a non-local file</property>
 
74
+               <signal name="activate" handler="open_location_action_callback"/>
 
75
+            </object>
 
76
+            <accelerator key="L" modifiers="GDK_CONTROL_MASK"/>
 
77
+         </child>
 
78
+         <child>
 
79
             <object class="GtkAction" id="eject">
 
80
                <property name="label" translatable="yes">_Eject</property>
 
81
                <property name="icon-name">media-eject-symbolic</property>
 
82
@@ -84,6 +56,15 @@
 
83
             </object>
 
84
             <accelerator key="space" modifiers="GDK_CONTROL_MASK"/>
 
85
          </child>
 
86
+         <child>
 
87
+            <object class="GtkAction" id="quit">
 
88
+               <property name="label" translatable="yes">_Quit</property>
 
89
+               <property name="stock-id">gtk-quit</property>
 
90
+               <property name="tooltip" translatable="yes">Quit the program</property>
 
91
+               <signal name="activate" handler="quit_action_callback"/>
 
92
+            </object>
 
93
+            <accelerator key="Q" modifiers="GDK_CONTROL_MASK"/>
 
94
+         </child>
 
95
 
 
96
          <child>
 
97
             <object class="GtkAction" id="edit-menu">
 
98
@@ -99,6 +80,14 @@
 
99
             </object>
 
100
          </child>
 
101
          <child>
 
102
+            <object class="GtkAction" id="preferences">
 
103
+               <property name="label" translatable="yes">Prefere_nces</property>
 
104
+               <property name="stock-id">gtk-preferences</property>
 
105
+               <property name="tooltip" translatable="yes">Configure the application</property>
 
106
+               <signal name="activate" handler="preferences_action_callback"/>
 
107
+            </object>
 
108
+         </child>
 
109
+         <child>
 
110
             <object class="GtkAction" id="plugins">
 
111
                <property name="label" translatable="yes">Plugins...</property>
 
112
                <property name="tooltip" translatable="yes">Configure plugins to extend the application</property>
 
113
@@ -112,6 +101,15 @@
 
114
             </object>
 
115
          </child>
 
116
          <child>
 
117
+            <object class="GtkAction" id="fullscreen">
 
118
+               <property name="label" translatable="yes">_Fullscreen</property>
 
119
+               <property name="icon-name">view-fullscreen-symbolic</property>
 
120
+               <property name="tooltip" translatable="yes">Switch to fullscreen</property>
 
121
+               <signal name="activate" handler="fullscreen_action_callback"/>
 
122
+            </object>
 
123
+            <accelerator key="F11"/>
 
124
+         </child>
 
125
+         <child>
 
126
             <object class="GtkAction" id="zoom-window-menu">
 
127
                <property name="label" translatable="yes">Fit Window to Movie</property>
 
128
             </object>
 
129
@@ -262,6 +260,22 @@
 
130
          </child>
 
131
 
 
132
          <child>
 
133
+            <object class="GtkToggleAction" id="repeat-mode">
 
134
+               <property name="label" translatable="yes">_Repeat Mode</property>
 
135
+               <property name="tooltip" translatable="yes">Set the repeat mode</property>
 
136
+               <property name="active">False</property>
 
137
+               <signal name="activate" handler="repeat_mode_action_callback"/>
 
138
+            </object>
 
139
+         </child>
 
140
+         <child>
 
141
+            <object class="GtkToggleAction" id="shuffle-mode">
 
142
+               <property name="label" translatable="yes">Shuff_le Mode</property>
 
143
+               <property name="tooltip" translatable="yes">Set the shuffle mode</property>
 
144
+               <property name="active">False</property>
 
145
+               <signal name="activate" handler="shuffle_mode_action_callback"/>
 
146
+            </object>
 
147
+         </child>
 
148
+         <child>
 
149
             <object class="GtkToggleAction" id="show-controls">
 
150
                <property name="label" translatable="yes">Show _Controls</property>
 
151
                <property name="tooltip" translatable="yes">Show controls</property>
 
152
@@ -385,6 +399,8 @@
 
153
    <ui>
 
154
       <menubar name="tmw-menubar">
 
155
          <menu name="movie" action="movie-menu">
 
156
+            <menuitem name="open" action="open"/>
 
157
+           <menuitem name="open-location" action="open-location"/>
 
158
            <placeholder name="save-placeholder"/>
 
159
             <separator name="recent-separator"/>
 
160
             <placeholder name="recent-placeholder"/>
 
161
@@ -395,13 +411,20 @@
 
162
             <menuitem name="eject" action="eject"/>
 
163
             <separator/>
 
164
             <menuitem name="play" action="play"/>
 
165
+            <separator/>
 
166
+            <menuitem name="quit" action="quit"/>
 
167
          </menu>
 
168
          <menu name="edit" action="edit-menu">
 
169
+            <menuitem name="repeat-mode" action="repeat-mode"/>
 
170
+            <menuitem name="shuffle-mode" action="shuffle-mode"/>
 
171
+            <separator/>
 
172
             <menuitem name="clear-playlist" action="clear-playlist"/>
 
173
             <separator/>
 
174
             <menuitem name="plugins" action="plugins"/>
 
175
+            <menuitem name="preferences" action="preferences"/>
 
176
          </menu>
 
177
          <menu name="view" action="view-menu">
 
178
+            <menuitem name="fullscreen" action="fullscreen"/>
 
179
             <menu name="zoom-window" action="zoom-window-menu">
 
180
                <menuitem name="zoom-1-2" action="zoom-1-2"/>
 
181
                <menuitem name="zoom-1-1" action="zoom-1-1"/>
 
182
@@ -461,6 +484,7 @@
 
183
          <menuitem name="skip-forward" action="skip-forward"/>
 
184
          <menuitem name="skip-backwards" action="skip-backwards"/>
 
185
          <menuitem name="show-controls" action="show-controls"/>
 
186
+         <menuitem name="fullscreen" action="fullscreen"/>
 
187
          <menuitem name="select-subtitle" action="select-subtitle"/>
 
188
          <separator/>
 
189
          <placeholder name="save-placeholder"/>
 
190
@@ -485,7 +509,7 @@
 
191
   <signal name="value-changed" handler="seek_slider_changed_cb"/>
 
192
 </object>
 
193
 
 
194
-<object class="GtkApplicationWindow" id="totem_main_window">
 
195
+<object class="GtkWindow" id="totem_main_window">
 
196
   <property name="title" translatable="yes">Videos</property>
 
197
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
 
198
   <property name="window_position">GTK_WIN_POS_NONE</property>
 
199
Index: totem-3.8.0/src/totem-menu.c
 
200
===================================================================
 
201
--- totem-3.8.0.orig/src/totem-menu.c   2013-05-25 23:02:46.490386347 -0400
 
202
+++ totem-3.8.0/src/totem-menu.c        2013-05-25 23:02:46.486386347 -0400
 
203
@@ -43,10 +43,14 @@
 
204
 #define TOTEM_MAX_RECENT_ITEM_LEN 40
 
205
 
 
206
 /* Callback functions for GtkBuilder */
 
207
+G_MODULE_EXPORT void open_action_callback (GtkAction *action, Totem *totem);
 
208
+G_MODULE_EXPORT void open_location_action_callback (GtkAction *action, Totem *totem);
 
209
 G_MODULE_EXPORT void eject_action_callback (GtkAction *action, Totem *totem);
 
210
 G_MODULE_EXPORT void properties_action_callback (GtkAction *action, Totem *totem);
 
211
 G_MODULE_EXPORT void play_action_callback (GtkAction *action, Totem *totem);
 
212
 G_MODULE_EXPORT void quit_action_callback (GtkAction *action, Totem *totem);
 
213
+G_MODULE_EXPORT void preferences_action_callback (GtkAction *action, Totem *totem);
 
214
+G_MODULE_EXPORT void fullscreen_action_callback (GtkAction *action, Totem *totem);
 
215
 G_MODULE_EXPORT void zoom_1_2_action_callback (GtkAction *action, Totem *totem);
 
216
 G_MODULE_EXPORT void zoom_1_1_action_callback (GtkAction *action, Totem *totem);
 
217
 G_MODULE_EXPORT void zoom_2_1_action_callback (GtkAction *action, Totem *totem);
 
218
@@ -66,118 +70,14 @@
 
219
 G_MODULE_EXPORT void contents_action_callback (GtkAction *action, Totem *totem);
 
220
 G_MODULE_EXPORT void about_action_callback (GtkAction *action, Totem *totem);
 
221
 G_MODULE_EXPORT void plugins_action_callback (GtkAction *action, Totem *totem);
 
222
+G_MODULE_EXPORT void repeat_mode_action_callback (GtkToggleAction *action, Totem *totem);
 
223
+G_MODULE_EXPORT void shuffle_mode_action_callback (GtkToggleAction *action, Totem *totem);
 
224
 G_MODULE_EXPORT void show_controls_action_callback (GtkToggleAction *action, Totem *totem);
 
225
 G_MODULE_EXPORT void show_sidebar_action_callback (GtkToggleAction *action, Totem *totem);
 
226
 G_MODULE_EXPORT void aspect_ratio_changed_callback (GtkRadioAction *action, GtkRadioAction *current, Totem *totem);
 
227
 G_MODULE_EXPORT void select_subtitle_action_callback (GtkAction *action, Totem *totem);
 
228
 G_MODULE_EXPORT void clear_playlist_action_callback (GtkAction *action, Totem *totem);
 
229
 
 
230
-static void
 
231
-open_action_cb (GSimpleAction *action,
 
232
-               GVariant      *parameter,
 
233
-               gpointer       user_data)
 
234
-{
 
235
-       totem_action_open (TOTEM_OBJECT (user_data));
 
236
-}
 
237
-
 
238
-static void
 
239
-open_location_action_cb (GSimpleAction *action,
 
240
-                        GVariant      *parameter,
 
241
-                        gpointer       user_data)
 
242
-{
 
243
-       totem_action_open_location (TOTEM_OBJECT (user_data));
 
244
-}
 
245
-
 
246
-static void
 
247
-preferences_action_cb (GSimpleAction *action,
 
248
-                      GVariant      *parameter,
 
249
-                      gpointer       user_data)
 
250
-{
 
251
-       gtk_widget_show (TOTEM_OBJECT (user_data)->prefs);
 
252
-}
 
253
-
 
254
-static void
 
255
-fullscreen_change_state (GSimpleAction *action,
 
256
-                        GVariant      *value,
 
257
-                        gpointer       user_data)
 
258
-{
 
259
-       gboolean param;
 
260
-
 
261
-       param = g_variant_get_boolean (value);
 
262
-       totem_action_fullscreen (TOTEM_OBJECT (user_data), param);
 
263
-
 
264
-       g_simple_action_set_state (action, value);
 
265
-}
 
266
-
 
267
-static void
 
268
-shuffle_change_state (GSimpleAction *action,
 
269
-                     GVariant      *value,
 
270
-                     gpointer       user_data)
 
271
-{
 
272
-       gboolean param;
 
273
-
 
274
-       param = g_variant_get_boolean (value);
 
275
-       totem_playlist_set_shuffle (TOTEM_OBJECT (user_data)->playlist, param);
 
276
-
 
277
-       g_simple_action_set_state (action, value);
 
278
-}
 
279
-
 
280
-static void
 
281
-repeat_change_state (GSimpleAction *action,
 
282
-                    GVariant      *value,
 
283
-                    gpointer       user_data)
 
284
-{
 
285
-       gboolean param;
 
286
-
 
287
-       param = g_variant_get_boolean (value);
 
288
-       totem_playlist_set_repeat (TOTEM_OBJECT (user_data)->playlist, param);
 
289
-
 
290
-       g_simple_action_set_state (action, value);
 
291
-}
 
292
-
 
293
-static void
 
294
-toggle_action_cb (GSimpleAction *action,
 
295
-                 GVariant      *parameter,
 
296
-                 gpointer       user_data)
 
297
-{
 
298
-       GVariant *state;
 
299
-
 
300
-       state = g_action_get_state (G_ACTION (action));
 
301
-       g_action_change_state (G_ACTION (action), g_variant_new_boolean (!g_variant_get_boolean (state)));
 
302
-       g_variant_unref (state);
 
303
-}
 
304
-
 
305
-static void
 
306
-quit_action_cb (GSimpleAction *action,
 
307
-               GVariant      *parameter,
 
308
-               gpointer       user_data)
 
309
-{
 
310
-       totem_action_exit (TOTEM_OBJECT (user_data));
 
311
-}
 
312
-
 
313
-static GActionEntry app_entries[] = {
 
314
-       { "open", open_action_cb, NULL, NULL, NULL },
 
315
-       { "open-location", open_location_action_cb, NULL, NULL, NULL },
 
316
-       { "fullscreen", toggle_action_cb, NULL, "false", fullscreen_change_state },
 
317
-       { "preferences", preferences_action_cb, NULL, NULL, NULL },
 
318
-       { "shuffle", toggle_action_cb, NULL, "false", shuffle_change_state },
 
319
-       { "repeat", toggle_action_cb, NULL, "false", repeat_change_state },
 
320
-       { "quit", quit_action_cb, NULL, NULL, NULL },
 
321
-};
 
322
-
 
323
-void
 
324
-totem_app_menu_setup (Totem *totem)
 
325
-{
 
326
-       GMenuModel *appmenu;
 
327
-
 
328
-       g_action_map_add_action_entries (G_ACTION_MAP (totem), app_entries, G_N_ELEMENTS (app_entries), totem);
 
329
-
 
330
-       appmenu = (GMenuModel *)gtk_builder_get_object (totem->xml, "appmenu");
 
331
-       gtk_application_set_app_menu (GTK_APPLICATION (totem), appmenu);
 
332
-
 
333
-       gtk_window_set_application (GTK_WINDOW (totem->win), GTK_APPLICATION (totem));
 
334
-}
 
335
-
 
336
 /* Helper function to escape underscores in labels
 
337
  * before putting them in menu items */
 
338
 static char *
 
339
@@ -634,6 +534,18 @@
 
340
 }
 
341
 
 
342
 void
 
343
+open_action_callback (GtkAction *action, Totem *totem)
 
344
+{
 
345
+       totem_action_open (totem);
 
346
+}
 
347
+
 
348
+void
 
349
+open_location_action_callback (GtkAction *action, Totem *totem)
 
350
+{
 
351
+       totem_action_open_location (totem);
 
352
+}
 
353
+
 
354
+void
 
355
 eject_action_callback (GtkAction *action, Totem *totem)
 
356
 {
 
357
        totem_action_eject (totem);
 
358
@@ -658,6 +570,18 @@
 
359
 }
 
360
 
 
361
 void
 
362
+preferences_action_callback (GtkAction *action, Totem *totem)
 
363
+{
 
364
+       gtk_widget_show (totem->prefs);
 
365
+}
 
366
+
 
367
+void
 
368
+fullscreen_action_callback (GtkAction *action, Totem *totem)
 
369
+{
 
370
+       totem_action_fullscreen_toggle (totem);
 
371
+}
 
372
+
 
373
+void
 
374
 zoom_1_2_action_callback (GtkAction *action, Totem *totem)
 
375
 {
 
376
        totem_action_set_scale_ratio (totem, 0.5);
 
377
@@ -853,6 +777,20 @@
 
378
 }
 
379
 
 
380
 void
 
381
+repeat_mode_action_callback (GtkToggleAction *action, Totem *totem)
 
382
+{
 
383
+       totem_playlist_set_repeat (totem->playlist,
 
384
+                       gtk_toggle_action_get_active (action));
 
385
+}
 
386
+
 
387
+void
 
388
+shuffle_mode_action_callback (GtkToggleAction *action, Totem *totem)
 
389
+{
 
390
+       totem_playlist_set_shuffle (totem->playlist,
 
391
+                       gtk_toggle_action_get_active (action));
 
392
+}
 
393
+
 
394
+void
 
395
 show_controls_action_callback (GtkToggleAction *action, Totem *totem)
 
396
 {
 
397
        gboolean show;
 
398
Index: totem-3.8.0/src/totem-menu.h
 
399
===================================================================
 
400
--- totem-3.8.0.orig/src/totem-menu.h   2013-05-25 23:02:46.490386347 -0400
 
401
+++ totem-3.8.0/src/totem-menu.h        2013-05-25 23:02:46.486386347 -0400
 
402
@@ -27,8 +27,6 @@
 
403
 
 
404
 G_BEGIN_DECLS
 
405
 
 
406
-void totem_app_menu_setup (Totem *totem);
 
407
-
 
408
 void totem_ui_manager_setup (Totem *totem);
 
409
 
 
410
 void totem_sublang_update (Totem *totem);
 
411
Index: totem-3.8.0/src/totem-object.c
 
412
===================================================================
 
413
--- totem-3.8.0.orig/src/totem-object.c 2013-05-25 23:02:46.490386347 -0400
 
414
+++ totem-3.8.0/src/totem-object.c      2013-05-25 23:02:46.486386347 -0400
 
415
@@ -1430,8 +1430,6 @@
 
416
 window_state_event_cb (GtkWidget *window, GdkEventWindowState *event,
 
417
                       TotemObject *totem)
 
418
 {
 
419
-       GAction *action;
 
420
-
 
421
        if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) {
 
422
                totem->maximised = (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) != 0;
 
423
                totem_action_set_sensitivity ("zoom-1-2", !totem->maximised);
 
424
@@ -1450,6 +1448,7 @@
 
425
 
 
426
                totem->controls_visibility = TOTEM_CONTROLS_FULLSCREEN;
 
427
                show_controls (totem, FALSE);
 
428
+               totem_action_set_sensitivity ("fullscreen", FALSE);
 
429
        } else {
 
430
                GtkAction *action;
 
431
 
 
432
@@ -1464,12 +1463,9 @@
 
433
                        totem->controls_visibility = TOTEM_CONTROLS_HIDDEN;
 
434
 
 
435
                show_controls (totem, TRUE);
 
436
+               totem_action_set_sensitivity ("fullscreen", TRUE);
 
437
        }
 
438
 
 
439
-       action = g_action_map_lookup_action (G_ACTION_MAP (totem), "fullscreen");
 
440
-       g_simple_action_set_state (G_SIMPLE_ACTION (action),
 
441
-                                  g_variant_new_boolean (totem->controls_visibility == TOTEM_CONTROLS_FULLSCREEN));
 
442
-
 
443
        g_object_notify (G_OBJECT (totem), "fullscreen");
 
444
 
 
445
        return FALSE;
 
446
@@ -1510,10 +1506,7 @@
 
447
 void
 
448
 fs_exit1_activate_cb (GtkButton *button, TotemObject *totem)
 
449
 {
 
450
-       GAction *action;
 
451
-
 
452
-       action = g_action_map_lookup_action (G_ACTION_MAP (totem), "fullscreen");
 
453
-       g_action_change_state (action, g_variant_new_boolean (FALSE));
 
454
+       totem_action_fullscreen (totem, FALSE);
 
455
 }
 
456
 
 
457
 void
 
458
@@ -1723,6 +1716,9 @@
 
459
                /* Subtitle selection */
 
460
                totem_action_set_sensitivity ("select-subtitle", FALSE);
 
461
 
 
462
+               /* Fullscreen */
 
463
+               totem_action_set_sensitivity ("fullscreen", FALSE);
 
464
+
 
465
                /* Set the logo */
 
466
                bacon_video_widget_set_logo_mode (totem->bvw, TRUE);
 
467
                update_mrl_label (totem, NULL);
 
468
@@ -1736,6 +1732,7 @@
 
469
                gdouble volume;
 
470
                char *user_agent;
 
471
                char *autoload_sub;
 
472
+               GdkWindowState window_state;
 
473
                GError *err = NULL;
 
474
 
 
475
                bacon_video_widget_set_logo_mode (totem->bvw, FALSE);
 
476
@@ -1775,6 +1772,10 @@
 
477
                /* Subtitle selection */
 
478
                totem_action_set_sensitivity ("select-subtitle", !totem_is_special_mrl (mrl) && retval);
 
479
 
 
480
+               /* Fullscreen */
 
481
+               window_state = gdk_window_get_state (gtk_widget_get_window (totem->win));
 
482
+               totem_action_set_sensitivity ("fullscreen", !(window_state & GDK_WINDOW_STATE_FULLSCREEN));
 
483
+
 
484
                /* Set the playlist */
 
485
                play_pause_set_label (totem, retval ? STATE_PAUSED : STATE_STOPPED);
 
486
 
 
487
@@ -3268,21 +3269,33 @@
 
488
 static void
 
489
 playlist_repeat_toggle_cb (TotemPlaylist *playlist, gboolean repeat, TotemObject *totem)
 
490
 {
 
491
-       GAction *action;
 
492
+       GtkAction *action;
 
493
+
 
494
+       action = gtk_action_group_get_action (totem->main_action_group, "repeat-mode");
 
495
+
 
496
+       g_signal_handlers_block_matched (G_OBJECT (action), G_SIGNAL_MATCH_DATA, 0, 0,
 
497
+                       NULL, NULL, totem);
 
498
 
 
499
-       action = g_action_map_lookup_action (G_ACTION_MAP (totem), "repeat");
 
500
-       g_simple_action_set_state (G_SIMPLE_ACTION (action),
 
501
-                                  g_variant_new_boolean (repeat));
 
502
+       gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), repeat);
 
503
+
 
504
+       g_signal_handlers_unblock_matched (G_OBJECT (action), G_SIGNAL_MATCH_DATA, 0, 0,
 
505
+                       NULL, NULL, totem);
 
506
 }
 
507
 
 
508
 static void
 
509
 playlist_shuffle_toggle_cb (TotemPlaylist *playlist, gboolean shuffle, TotemObject *totem)
 
510
 {
 
511
-       GAction *action;
 
512
+       GtkAction *action;
 
513
+
 
514
+       action = gtk_action_group_get_action (totem->main_action_group, "shuffle-mode");
 
515
+
 
516
+       g_signal_handlers_block_matched (G_OBJECT (action), G_SIGNAL_MATCH_DATA, 0, 0,
 
517
+                       NULL, NULL, totem);
 
518
 
 
519
-       action = g_action_map_lookup_action (G_ACTION_MAP (totem), "shuffle");
 
520
-       g_simple_action_set_state (G_SIMPLE_ACTION (action),
 
521
-                                  g_variant_new_boolean (shuffle));
 
522
+       gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), shuffle);
 
523
+
 
524
+       g_signal_handlers_unblock_matched (G_OBJECT (action), G_SIGNAL_MATCH_DATA, 0, 0,
 
525
+                       NULL, NULL, totem);
 
526
 }
 
527
 
 
528
 /**
 
529
@@ -3999,15 +4012,14 @@
 
530
        GtkAction *action;
 
531
        GtkActionGroup *action_group;
 
532
        GtkBox *box;
 
533
-       GAction *gaction;
 
534
 
 
535
        /* Menu items */
 
536
-       gaction = g_action_map_lookup_action (G_ACTION_MAP (totem), "repeat");
 
537
-       g_simple_action_set_state (G_SIMPLE_ACTION (gaction),
 
538
-                                  g_variant_new_boolean (totem_playlist_get_repeat (totem->playlist)));
 
539
-       gaction = g_action_map_lookup_action (G_ACTION_MAP (totem), "shuffle");
 
540
-       g_simple_action_set_state (G_SIMPLE_ACTION (gaction),
 
541
-                                  g_variant_new_boolean (totem_playlist_get_shuffle (totem->playlist)));
 
542
+       action = gtk_action_group_get_action (totem->main_action_group, "repeat-mode");
 
543
+       gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
 
544
+               totem_playlist_get_repeat (totem->playlist));
 
545
+       action = gtk_action_group_get_action (totem->main_action_group, "shuffle-mode");
 
546
+       gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
 
547
+               totem_playlist_get_shuffle (totem->playlist));
 
548
 
 
549
        /* Controls */
 
550
        box = GTK_BOX (gtk_builder_get_object (totem->xml, "tmw_buttons_hbox"));
 
551
@@ -4046,14 +4058,13 @@
 
552
        gtk_box_pack_start (box, item, FALSE, FALSE, 0);
 
553
 
 
554
        /* Fullscreen button */
 
555
+       action = gtk_action_group_get_action (totem->main_action_group,
 
556
+                       "fullscreen");
 
557
+       item = gtk_action_create_tool_item (action);
 
558
        /* Translators: this is the tooltip text for the fullscreen button in the controls box in Totem's main window. */
 
559
-       item = GTK_WIDGET (gtk_toggle_tool_button_new ());
 
560
-       gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "view-fullscreen-symbolic");
 
561
        gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (item), _("Fullscreen"));
 
562
        /* Translators: this is the accessibility text for the fullscreen button in the controls box in Totem's main window. */
 
563
        atk_object_set_name (gtk_widget_get_accessible (item), _("Fullscreen"));
 
564
-       gtk_actionable_set_action_name (GTK_ACTIONABLE (item), "app.fullscreen");
 
565
-       gtk_widget_show (item);
 
566
        gtk_box_pack_start (box, item, FALSE, FALSE, 0);
 
567
 
 
568
        /* Sidebar button (Drag'n'Drop) */
 
569
@@ -4128,6 +4139,7 @@
 
570
         * and skip-* are back in the main action group. */
 
571
        /*totem_action_set_sensitivity ("skip-forward", FALSE);
 
572
        totem_action_set_sensitivity ("skip-backwards", FALSE);*/
 
573
+       totem_action_set_sensitivity ("fullscreen", FALSE);
 
574
 
 
575
        action_group = GTK_ACTION_GROUP (gtk_builder_get_object (totem->xml, "skip-action-group"));
 
576
 
 
577
Index: totem-3.8.0/src/totem.c
 
578
===================================================================
 
579
--- totem-3.8.0.orig/src/totem.c        2013-05-25 23:02:46.490386347 -0400
 
580
+++ totem-3.8.0/src/totem.c     2013-05-25 23:03:03.810385623 -0400
 
581
@@ -92,9 +92,6 @@
 
582
 
 
583
        totem->win = GTK_WIDGET (gtk_builder_get_object (totem->xml, "totem_main_window"));
 
584
        gtk_window_set_hide_titlebar_when_maximized (GTK_WINDOW (totem->win), TRUE);
 
585
-       g_object_bind_property (G_OBJECT (totem), "fullscreen",
 
586
-                               G_OBJECT (totem->win), "show-menubar",
 
587
-                               G_BINDING_INVERT_BOOLEAN);
 
588
 
 
589
        /* Menubar */
 
590
        totem_ui_manager_setup (totem);
 
591
@@ -117,7 +114,6 @@
 
592
        totem_session_setup (totem, argv);
 
593
        totem_setup_file_monitoring (totem);
 
594
        totem_setup_file_filters ();
 
595
-       totem_app_menu_setup (totem);
 
596
        totem_callback_connect (totem);
 
597
 
 
598
        sidebar_pageid = totem_setup_window (totem);