Copy F-12 changes

This commit is contained in:
Matthias Clasen 2009-11-12 17:57:51 +00:00
parent 6a77ca27b8
commit ab4c4770aa
5 changed files with 42 additions and 282 deletions

View File

@ -1,117 +0,0 @@
From 387a91e4b0e25914bf8e879296264c74b0aa2424 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Wed, 7 Oct 2009 09:16:50 +0100
Subject: [PATCH] Fix parsing of file paths on the command-line
Between 2.26.x and 2.28.x, Brasero lost its ability to have
file paths (as opposed to URIs) be used to pass arguments
on the command-line, breaking the existing Totem and Rhythmbox
burn plugins.
Mark the relevant options as being passed filenames and get
the URI/path using GIO in the functions requiring it.
https://bugzilla.gnome.org/show_bug.cgi?id=597584
---
src/brasero-project-parse.c | 16 +++++++++++++---
src/main.c | 10 +++++-----
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/src/brasero-project-parse.c b/src/brasero-project-parse.c
index 95c438d..ffacf46 100644
--- a/src/brasero-project-parse.c
+++ b/src/brasero-project-parse.c
@@ -432,10 +432,13 @@ brasero_project_open_project_xml (const gchar *uri,
xmlDocPtr project;
xmlNodePtr item;
gboolean retval;
+ GFile *file;
gchar *path;
- path = g_filename_from_uri (uri, NULL, NULL);
- if (!path)
+ file = g_file_new_for_commandline_arg (uri);
+ path = g_file_get_path (file);
+ g_object_unref (file);
+ if (!path)
return FALSE;
/* start parsing xml doc */
@@ -571,6 +574,12 @@ brasero_project_open_audio_playlist_project (const gchar *uri,
{
TotemPlParser *parser;
TotemPlParserResult result;
+ GFile *file;
+ char *_uri;
+
+ file = g_file_new_for_commandline_arg (uri);
+ _uri = g_file_get_uri (file);
+ g_object_unref (file);
parser = totem_pl_parser_new ();
g_object_set (parser,
@@ -588,12 +597,13 @@ brasero_project_open_audio_playlist_project (const gchar *uri,
G_CALLBACK (brasero_project_playlist_entry_parsed),
session);
- result = totem_pl_parser_parse (parser, uri, FALSE);
+ result = totem_pl_parser_parse (parser, _uri, FALSE);
if (result != TOTEM_PL_PARSER_RESULT_SUCCESS) {
if (warn_user)
brasero_project_invalid_project_dialog (_("It does not seem to be a valid Brasero project"));
}
+ g_free (_uri);
g_object_unref (parser);
return (result == TOTEM_PL_PARSER_RESULT_SUCCESS);
diff --git a/src/main.c b/src/main.c
index abd31b5..e95e027 100644
--- a/src/main.c
+++ b/src/main.c
@@ -70,13 +70,13 @@ gint open_ncb;
gint parent_window;
static const GOptionEntry options [] = {
- { "project", 'p', 0, G_OPTION_ARG_STRING, &project_uri,
+ { "project", 'p', 0, G_OPTION_ARG_FILENAME, &project_uri,
N_("Open the specified project"),
N_("PROJECT") },
#ifdef BUILD_PLAYLIST
- { "playlist", 'l', 0, G_OPTION_ARG_STRING, &playlist_uri,
+ { "playlist", 'l', 0, G_OPTION_ARG_FILENAME, &playlist_uri,
N_("Open the specified playlist as an audio project"),
N_("PLAYLIST") },
@@ -94,7 +94,7 @@ static const GOptionEntry options [] = {
N_("Copy a disc"),
N_("PATH TO DEVICE") },
- { "cover", 'j', 0, G_OPTION_ARG_STRING, &cover_project,
+ { "cover", 'j', 0, G_OPTION_ARG_FILENAME, &cover_project,
N_("Cover to use"),
N_("PATH TO COVER") },
@@ -102,7 +102,7 @@ static const GOptionEntry options [] = {
N_("Open a video project adding the URIs given on the command line"),
NULL },
- { "image", 'i', 0, G_OPTION_ARG_STRING, &iso_uri,
+ { "image", 'i', 0, G_OPTION_ARG_FILENAME, &iso_uri,
N_("Uri of an image file to be burnt (autodetected)"),
N_("PATH TO PLAYLIST") },
@@ -122,7 +122,7 @@ static const GOptionEntry options [] = {
N_("Burn the contents of burn:// URI"),
NULL },
- { "burn-and-remove-project", 'r', 0, G_OPTION_ARG_STRING, &burn_project_uri,
+ { "burn-and-remove-project", 'r', 0, G_OPTION_ARG_FILENAME, &burn_project_uri,
N_("Burn the specified project and REMOVE it.\nThis option is mainly useful for integration use with other applications."),
N_("PATH") },
--
1.6.4.4

View File

@ -1,15 +1,16 @@
Name: brasero Name: brasero
Version: 2.28.1 Version: 2.28.2
Release: 2%{?dist} Release: 3%{?dist}
Summary: Gnome CD/DVD burning application Summary: Gnome CD/DVD burning application
Group: Applications/Multimedia Group: Applications/Multimedia
License: GPLv2+ License: GPLv2+
URL: http://www.gnome.org/projects/brasero/ URL: http://www.gnome.org/projects/brasero/
Source0: http://ftp.gnome.org/pub/GNOME/sources/brasero/2.28/%{name}-%{version}.tar.bz2 Source0: http://ftp.gnome.org/pub/GNOME/sources/brasero/2.28/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# https://bugzilla.gnome.org/show_bug.cgi?id=597584 # https://bugzilla.gnome.org/show_bug.cgi?id=599620
Patch0: 0001-Fix-parsing-of-file-paths-on-the-command-line.patch Patch0: last_unsaved.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: glib2-devel >= 2.15.6 BuildRequires: glib2-devel >= 2.15.6
BuildRequires: gettext intltool gtk-doc BuildRequires: gettext intltool gtk-doc
@ -48,7 +49,6 @@ Requires(pre): GConf2
Requires(post): GConf2 Requires(post): GConf2
Requires(preun): GConf2 Requires(preun): GConf2
%description %description
Simple and easy to use CD/DVD burning application for the Gnome Simple and easy to use CD/DVD burning application for the Gnome
desktop. desktop.
@ -57,6 +57,7 @@ desktop.
%package libs %package libs
Summary: Libraries for %{name} Summary: Libraries for %{name}
Group: System Environment/Libraries Group: System Environment/Libraries
Obsoletes: nautilus-cd-burner-libs < 2.25.4
%description libs %description libs
@ -81,6 +82,7 @@ Summary: Headers for developing programs that will use %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: pkgconfig Requires: pkgconfig
Obsoletes: nautilus-cd-burner-devel < 2.25.4
%description devel %description devel
@ -90,7 +92,7 @@ developing brasero applications.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .cmdline %patch0 -p1 -b .last_unsaved
%build %build
%configure \ %configure \
@ -208,10 +210,30 @@ fi
%changelog %changelog
* Thu Nov 12 2009 Matthias Clasen <mclasen@redhat.com> 2.28.2-3
- Obsolete nautilus-cd-burner-devel and -libs as well
* Mon Oct 26 2009 Matthias Clasen <mclasen@redhat.com> 2.28.2-2
- Avoid a stray underline in a button label
* Tue Oct 20 2009 Matthias Clasen <mclasen@redhat.com> 2.28.2-1
- Update to 2.28.2
* Wed Oct 07 2009 Bastien Nocera <bnocera@redhat.com> 2.28.1-2 * Wed Oct 07 2009 Bastien Nocera <bnocera@redhat.com> 2.28.1-2
- Update to 2.28.1
- Fix command-line parsing (#527484) - Fix command-line parsing (#527484)
* Mon Oct 5 2009 Matthias Clasen <mclasen@redhat.com> - 2.28.1-1
- Update to 2.28.1, fixes a number of crashes and other serious bugs:
- Fix a crash when we try to download a missing gstreamer plugin through PK
- Don't fail if a drive cannot be checksumed after a burn
- Fix a data corruption when libisofs was used for a dummy session
- Fix #596625: brasero crashed with SIGSEGV in brasero_track_data_cfg_add
- Fix progress reporting
...
* Fri Oct 2 2009 Matthias Clasen <mclasen@redhat.com> - 2.28.0-2
- Fix ejecting after burning
* Tue Sep 22 2009 Matthias Clasen <mclasen@redhat.com> - 2.28.0-1 * Tue Sep 22 2009 Matthias Clasen <mclasen@redhat.com> - 2.28.0-1
- Update to 2.28.0 - Update to 2.28.0

11
last_unsaved.patch Normal file
View File

@ -0,0 +1,11 @@
diff -up brasero-2.28.2/src/brasero-project-type-chooser.c.last_unsaved brasero-2.28.2/src/brasero-project-type-chooser.c
--- brasero-2.28.2/src/brasero-project-type-chooser.c.last_unsaved 2009-10-26 00:40:37.993196525 -0400
+++ brasero-2.28.2/src/brasero-project-type-chooser.c 2009-10-26 00:41:43.604186889 -0400
@@ -297,6 +297,7 @@ brasero_project_type_chooser_build_recen
gtk_button_set_alignment (GTK_BUTTON (link), 0.0, 0.5);
gtk_button_set_focus_on_click (GTK_BUTTON (link), FALSE);
gtk_button_set_image (GTK_BUTTON (link), image);
+ gtk_button_set_use_underline (GTK_BUTTON (link), TRUE);
g_signal_connect (link,
"clicked",
G_CALLBACK (brasero_project_type_chooser_last_unsaved_clicked_cb),

View File

@ -1,156 +0,0 @@
diff --git a/libbrasero-burn/brasero-track-data-cfg.c b/libbrasero-burn/brasero-track-data-cfg.c
index 69d3505..3e91a26 100644
--- a/libbrasero-burn/brasero-track-data-cfg.c
+++ b/libbrasero-burn/brasero-track-data-cfg.c
@@ -1754,29 +1754,6 @@ brasero_track_data_clean_autorun (BraseroTrackDataCfg *track)
}
static void
-brasero_track_data_cfg_finalize (GObject *object)
-{
- BraseroTrackDataCfgPrivate *priv;
-
- priv = BRASERO_TRACK_DATA_CFG_PRIVATE (object);
-
- brasero_track_data_clean_autorun (BRASERO_TRACK_DATA_CFG (object));
- brasero_track_data_cfg_clean_cache (BRASERO_TRACK_DATA_CFG (object));
-
- if (priv->shown) {
- g_slist_free (priv->shown);
- priv->shown = NULL;
- }
-
- if (priv->tree) {
- g_object_unref (priv->tree);
- priv->tree = NULL;
- }
-
- G_OBJECT_CLASS (brasero_track_data_cfg_parent_class)->finalize (object);
-}
-
-static void
brasero_track_data_cfg_iface_init (gpointer g_iface, gpointer data)
{
GtkTreeModelIface *iface = g_iface;
@@ -3158,6 +3135,88 @@ brasero_track_data_cfg_init (BraseroTrackDataCfg *object)
}
static void
+brasero_track_data_cfg_finalize (GObject *object)
+{
+ BraseroTrackDataCfgPrivate *priv;
+
+ priv = BRASERO_TRACK_DATA_CFG_PRIVATE (object);
+
+ brasero_track_data_clean_autorun (BRASERO_TRACK_DATA_CFG (object));
+ brasero_track_data_cfg_clean_cache (BRASERO_TRACK_DATA_CFG (object));
+
+ if (priv->shown) {
+ g_slist_free (priv->shown);
+ priv->shown = NULL;
+ }
+
+ if (priv->tree) {
+ /* This object could outlive us just for some time
+ * so we better remove all signals.
+ * When an image URI is detected it can happen
+ * that we'll be destroyed. */
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_node_added,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_node_changed,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_node_removed,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_node_reordered,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_size_changed_cb,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_session_available_cb,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_session_loaded_cb,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_project_loaded,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_activity_changed,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_deep_directory,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_2G_file,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_unreadable_uri_cb,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_unknown_uri_cb,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_recursive_uri_cb,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_image_uri_cb,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_virtual_sibling_cb,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_name_collision_cb,
+ object);
+ g_signal_handlers_disconnect_by_func (priv->tree,
+ brasero_track_data_cfg_joliet_rename_cb,
+ object);
+
+ g_object_unref (priv->tree);
+ priv->tree = NULL;
+ }
+
+ G_OBJECT_CLASS (brasero_track_data_cfg_parent_class)->finalize (object);
+}
+
+static void
brasero_track_data_cfg_class_init (BraseroTrackDataCfgClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
diff --git a/libbrasero-utils/brasero-io.c b/libbrasero-utils/brasero-io.c
index cfeb4d5..bd12861 100644
--- a/libbrasero-utils/brasero-io.c
+++ b/libbrasero-utils/brasero-io.c
@@ -364,6 +364,11 @@ brasero_io_return_result_idle (gpointer callback_data)
g_mutex_unlock (priv->lock);
data = result->callback_data;
+
+ /* This is to make sure the object lives
+ * as long as we need it. */
+ g_object_ref (base->object);
+
if (result->uri || result->info || result->error)
result->base->callback (base->object,
result->error,
@@ -371,12 +376,14 @@ brasero_io_return_result_idle (gpointer callback_data)
result->info,
data? data->callback_data:NULL);
- /* Else this is just to call destroy () for callback data */
+ /* call destroy () for callback data */
brasero_io_unref_result_callback_data (data,
base->object,
base->destroy,
FALSE);
+ g_object_unref (base->object);
+
brasero_io_job_result_free (result);
g_mutex_lock (priv->lock);

View File

@ -1 +1 @@
ad422a966d100f99b027b6b4170e8ede brasero-2.28.1.tar.bz2 7a6ab4befeadbc2ad21bd1195a840097 brasero-2.28.2.tar.bz2