summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2013-07-09 09:55:51 +0200
committerBastien Nocera <hadess@hadess.net>2013-07-09 10:28:20 +0200
commitec64084c71290557819ee007b969f080747e36e5 (patch)
tree2373f1e1aa694dce2f10acb6e5852a49139e97bd
parent589a29bb9aa7e4d1650412e9ac5512e517252d5e (diff)
downloadtotem-ec64084c71290557819ee007b969f080747e36e5.tar.gz
main: Remove "save-playback-state" setting
-rw-r--r--data/org.gnome.totem.gschema.xml.in.in4
-rw-r--r--data/preferences.ui74
-rw-r--r--src/totem-object.c1
-rw-r--r--src/totem-playlist.c37
-rw-r--r--src/totem-playlist.h4
-rw-r--r--src/totem-preferences.c4
-rw-r--r--src/totem-session.c4
7 files changed, 2 insertions, 126 deletions
diff --git a/data/org.gnome.totem.gschema.xml.in.in b/data/org.gnome.totem.gschema.xml.in.in
index a3691fa6a..50cb69e4a 100644
--- a/data/org.gnome.totem.gschema.xml.in.in
+++ b/data/org.gnome.totem.gschema.xml.in.in
@@ -102,10 +102,6 @@
<default>true</default>
<_summary>Whether to autoload external chapter files when a movie is loaded</_summary>
</key>
- <key name="save-playback-state" type="b">
- <default>true</default>
- <_summary>Whether to remember the current playlist, the playing track and position.</_summary>
- </key>
<key name="active-plugins" type="as">
<default>['skipto','chapters','screenshot','media_player_keys','screensaver','movie-properties','save-file']</default>
<_summary>Active plugins list</_summary>
diff --git a/data/preferences.ui b/data/preferences.ui
index e6399b502..ecb6b2b53 100644
--- a/data/preferences.ui
+++ b/data/preferences.ui
@@ -170,80 +170,6 @@
<property name="orientation">vertical</property>
<child>
- <object class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
- <property name="orientation">vertical</property>
-
- <child>
- <object class="GtkLabel" id="tpw_playback_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Playback</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <object class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
-
- <child>
- <object class="GtkCheckButton" id="tpw_save_session_checkbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Remember last played movies</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
<object class="GtkVBox" id="vbox6">
<property name="visible">True</property>
<property name="homogeneous">False</property>
diff --git a/src/totem-object.c b/src/totem-object.c
index 958c695c0..7d18cf266 100644
--- a/src/totem-object.c
+++ b/src/totem-object.c
@@ -1180,7 +1180,6 @@ totem_object_action_exit (TotemObject *totem)
if (display != NULL)
gdk_display_sync (display);
- totem_session_save (totem);
totem_session_cleanup (totem);
if (totem->bvw)
diff --git a/src/totem-playlist.c b/src/totem-playlist.c
index d2e661037..4eceb7b69 100644
--- a/src/totem-playlist.c
+++ b/src/totem-playlist.c
@@ -127,9 +127,6 @@ struct TotemPlaylistPrivate
/* Shuffle mode */
guint shuffle : 1;
-
- /* Whether to auto-save the playlist */
- guint save : 1;
};
/* Signals */
@@ -433,7 +430,7 @@ totem_playlist_save_session_playlist (TotemPlaylist *playlist,
* even to remove the existing session */
return;
}
- if (!playlist->priv->save || PL_LEN == 0) {
+ if (PL_LEN == 0) {
g_file_delete (output, NULL, NULL);
return;
}
@@ -1553,13 +1550,6 @@ update_shuffle_cb (GSettings *settings, const gchar *key, TotemPlaylist *playlis
}
static void
-update_save_cb (GSettings *settings, const gchar *key, TotemPlaylist *playlist)
-{
- playlist->priv->save = g_settings_get_boolean (settings, "save-playback-state");
- g_object_notify (G_OBJECT (playlist), "save");
-}
-
-static void
update_lockdown_cb (GSettings *settings, const gchar *key, TotemPlaylist *playlist)
{
playlist->priv->disable_save_to_disk = g_settings_get_boolean (settings, "disable-save-to-disk");
@@ -1580,11 +1570,9 @@ init_config (TotemPlaylist *playlist)
playlist->priv->repeat = g_settings_get_boolean (playlist->priv->settings, "repeat");
playlist->priv->shuffle = g_settings_get_boolean (playlist->priv->settings, "shuffle");
- playlist->priv->save = g_settings_get_boolean (playlist->priv->settings, "save-playback-state");
g_signal_connect (playlist->priv->settings, "changed::repeat", (GCallback) update_repeat_cb, playlist);
g_signal_connect (playlist->priv->settings, "changed::shuffle", (GCallback) update_shuffle_cb, playlist);
- g_signal_connect (playlist->priv->settings, "changed::save-playback-state", G_CALLBACK (update_save_cb), playlist);
}
static gboolean
@@ -2894,23 +2882,6 @@ totem_playlist_set_shuffle (TotemPlaylist *playlist, gboolean shuffle)
}
void
-totem_playlist_set_save (TotemPlaylist *playlist,
- gboolean save)
-{
- g_return_if_fail (TOTEM_IS_PLAYLIST (playlist));
-
- g_settings_set_boolean (playlist->priv->settings, "save-playback-state", save);
-}
-
-gboolean
-totem_playlist_get_save (TotemPlaylist *playlist)
-{
- g_return_val_if_fail (TOTEM_IS_PLAYLIST (playlist), FALSE);
-
- return playlist->priv->save;
-}
-
-void
totem_playlist_set_at_start (TotemPlaylist *playlist)
{
g_return_if_fail (TOTEM_IS_PLAYLIST (playlist));
@@ -3006,9 +2977,6 @@ totem_playlist_set_property (GObject *object,
case PROP_REPEAT:
g_settings_set_boolean (playlist->priv->settings, "repeat", g_value_get_boolean (value));
break;
- case PROP_SAVE:
- playlist->priv->save = !!g_value_get_boolean (value);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -3032,9 +3000,6 @@ totem_playlist_get_property (GObject *object,
case PROP_REPEAT:
g_value_set_boolean (value, playlist->priv->repeat);
break;
- case PROP_SAVE:
- g_value_set_boolean (value, playlist->priv->save);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
diff --git a/src/totem-playlist.h b/src/totem-playlist.h
index 1d767359c..b33cb0e05 100644
--- a/src/totem-playlist.h
+++ b/src/totem-playlist.h
@@ -154,10 +154,6 @@ gboolean totem_playlist_get_shuffle (TotemPlaylist *playlist);
void totem_playlist_set_shuffle (TotemPlaylist *playlist,
gboolean shuffle);
-gboolean totem_playlist_get_save (TotemPlaylist *playlist);
-void totem_playlist_set_save (TotemPlaylist *playlist,
- gboolean save);
-
gboolean totem_playlist_set_playing (TotemPlaylist *playlist, TotemPlaylistStatus state);
TotemPlaylistStatus totem_playlist_get_playing (TotemPlaylist *playlist);
diff --git a/src/totem-preferences.c b/src/totem-preferences.c
index e29618363..80716f6b9 100644
--- a/src/totem-preferences.c
+++ b/src/totem-preferences.c
@@ -369,10 +369,6 @@ totem_setup_preferences (Totem *totem)
g_signal_connect (totem->prefs, "destroy",
G_CALLBACK (gtk_widget_destroyed), &totem->prefs);
- /* Save session on exit */
- item = POBJ ("tpw_save_session_checkbutton");
- g_settings_bind (totem->settings, "save-playback-state", item, "active", G_SETTINGS_BIND_DEFAULT);
-
/* Screensaver audio locking */
lock_screensaver_on_audio = g_settings_get_boolean (totem->settings, "lock-screensaver-on-audio");
if (lock_screensaver_on_audio != FALSE)
diff --git a/src/totem-session.c b/src/totem-session.c
index 4664c9483..d43d805c6 100644
--- a/src/totem-session.c
+++ b/src/totem-session.c
@@ -56,9 +56,6 @@ totem_session_try_restore (Totem *totem)
char *uri;
char *mrl, *subtitle;
- if (totem_playlist_get_save (totem->playlist) == FALSE)
- return FALSE;
-
totem_signal_block_by_data (totem->playlist, totem);
/* Possibly the only place in Totem where it makes sense to add an MRL to the playlist synchronously, since we haven't yet entered
@@ -109,5 +106,6 @@ totem_session_save (Totem *totem)
void
totem_session_cleanup (Totem *totem)
{
+ g_file_delete (get_session_file (), NULL, NULL);
g_clear_object (&session_file);
}