1432
1432
window_state_event_cb (GtkWidget *window, GdkEventWindowState *event,
1433
1433
TotemObject *totem)
1437
1435
if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) {
1438
1436
totem->maximised = (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) != 0;
1439
1437
totem_action_set_sensitivity ("zoom-1-2", !totem->maximised);
1466
1465
totem->controls_visibility = TOTEM_CONTROLS_HIDDEN;
1468
1467
show_controls (totem, TRUE);
1468
totem_action_set_sensitivity ("fullscreen", TRUE);
1471
action = g_action_map_lookup_action (G_ACTION_MAP (totem), "fullscreen");
1472
g_simple_action_set_state (G_SIMPLE_ACTION (action),
1473
g_variant_new_boolean (totem->controls_visibility == TOTEM_CONTROLS_FULLSCREEN));
1475
1471
g_object_notify (G_OBJECT (totem), "fullscreen");
1513
1509
fs_exit1_activate_cb (GtkButton *button, TotemObject *totem)
1517
action = g_action_map_lookup_action (G_ACTION_MAP (totem), "fullscreen");
1518
g_action_change_state (action, g_variant_new_boolean (FALSE));
1511
totem_action_fullscreen (totem, FALSE);
1725
1718
/* Subtitle selection */
1726
1719
totem_action_set_sensitivity ("select-subtitle", FALSE);
1722
totem_action_set_sensitivity ("fullscreen", FALSE);
1728
1724
/* Set the logo */
1729
1725
bacon_video_widget_set_logo_mode (totem->bvw, TRUE);
1730
1726
update_mrl_label (totem, NULL);
1777
1774
/* Subtitle selection */
1778
1775
totem_action_set_sensitivity ("select-subtitle", !totem_is_special_mrl (mrl) && retval);
1778
window_state = gdk_window_get_state (gtk_widget_get_window (totem->win));
1779
totem_action_set_sensitivity ("fullscreen", !(window_state & GDK_WINDOW_STATE_FULLSCREEN));
1780
1781
/* Set the playlist */
1781
1782
play_pause_set_label (totem, retval ? STATE_PAUSED : STATE_STOPPED);
3270
3271
playlist_repeat_toggle_cb (TotemPlaylist *playlist, gboolean repeat, TotemObject *totem)
3274
action = g_action_map_lookup_action (G_ACTION_MAP (totem), "repeat");
3275
g_simple_action_set_state (G_SIMPLE_ACTION (action),
3276
g_variant_new_boolean (repeat));
3275
action = gtk_action_group_get_action (totem->main_action_group, "repeat-mode");
3277
g_signal_handlers_block_matched (G_OBJECT (action), G_SIGNAL_MATCH_DATA, 0, 0,
3280
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), repeat);
3282
g_signal_handlers_unblock_matched (G_OBJECT (action), G_SIGNAL_MATCH_DATA, 0, 0,
3280
3287
playlist_shuffle_toggle_cb (TotemPlaylist *playlist, gboolean shuffle, TotemObject *totem)
3284
action = g_action_map_lookup_action (G_ACTION_MAP (totem), "shuffle");
3285
g_simple_action_set_state (G_SIMPLE_ACTION (action),
3286
g_variant_new_boolean (shuffle));
3291
action = gtk_action_group_get_action (totem->main_action_group, "shuffle-mode");
3293
g_signal_handlers_block_matched (G_OBJECT (action), G_SIGNAL_MATCH_DATA, 0, 0,
3296
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), shuffle);
3298
g_signal_handlers_unblock_matched (G_OBJECT (action), G_SIGNAL_MATCH_DATA, 0, 0,
3998
4011
GtkAction *action;
3999
4012
GtkActionGroup *action_group;
4003
4015
/* Menu items */
4004
gaction = g_action_map_lookup_action (G_ACTION_MAP (totem), "repeat");
4005
g_simple_action_set_state (G_SIMPLE_ACTION (gaction),
4006
g_variant_new_boolean (totem_playlist_get_repeat (totem->playlist)));
4007
gaction = g_action_map_lookup_action (G_ACTION_MAP (totem), "shuffle");
4008
g_simple_action_set_state (G_SIMPLE_ACTION (gaction),
4009
g_variant_new_boolean (totem_playlist_get_shuffle (totem->playlist)));
4016
action = gtk_action_group_get_action (totem->main_action_group, "repeat-mode");
4017
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
4018
totem_playlist_get_repeat (totem->playlist));
4019
action = gtk_action_group_get_action (totem->main_action_group, "shuffle-mode");
4020
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
4021
totem_playlist_get_shuffle (totem->playlist));
4012
4024
box = GTK_BOX (gtk_builder_get_object (totem->xml, "tmw_buttons_hbox"));
4045
4057
gtk_box_pack_start (box, item, FALSE, FALSE, 0);
4047
4059
/* Fullscreen button */
4060
action = gtk_action_group_get_action (totem->main_action_group,
4062
item = gtk_action_create_tool_item (action);
4048
4063
/* Translators: this is the tooltip text for the fullscreen button in the controls box in Totem's main window. */
4049
item = GTK_WIDGET (gtk_toggle_tool_button_new ());
4050
gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (item), "view-fullscreen-symbolic");
4051
4064
gtk_tool_item_set_tooltip_text (GTK_TOOL_ITEM (item), _("Fullscreen"));
4052
4065
/* Translators: this is the accessibility text for the fullscreen button in the controls box in Totem's main window. */
4053
4066
atk_object_set_name (gtk_widget_get_accessible (item), _("Fullscreen"));
4054
gtk_actionable_set_action_name (GTK_ACTIONABLE (item), "app.fullscreen");
4055
gtk_widget_show (item);
4056
4067
gtk_box_pack_start (box, item, FALSE, FALSE, 0);
4058
4069
/* Sidebar button (Drag'n'Drop) */
4127
4138
* and skip-* are back in the main action group. */
4128
4139
/*totem_action_set_sensitivity ("skip-forward", FALSE);
4129
4140
totem_action_set_sensitivity ("skip-backwards", FALSE);*/
4141
totem_action_set_sensitivity ("fullscreen", FALSE);
4131
4143
action_group = GTK_ACTION_GROUP (gtk_builder_get_object (totem->xml, "skip-action-group"));