[brasero] Add the possibility to override the icon already set for previous session when merging
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Subject: [brasero] Add the possibility to override the icon already set for previous session when merging
- Date: Sun, 26 Jul 2009 12:20:14 +0000 (UTC)
commit 0f48ab7068370e9cf52cbad280fcfa320317fd4a
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Thu Jul 23 14:41:25 2009 +0200
Add the possibility to override the icon already set for previous session when merging
Also fix brasero_track_data_cfg_find_icon_name () that was entering an endless loop
libbrasero-burn/brasero-track-data-cfg.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/libbrasero-burn/brasero-track-data-cfg.c b/libbrasero-burn/brasero-track-data-cfg.c
index 6ed27bc..4c1eb83 100644
--- a/libbrasero-burn/brasero-track-data-cfg.c
+++ b/libbrasero-burn/brasero-track-data-cfg.c
@@ -2522,7 +2522,7 @@ brasero_track_data_cfg_find_icon_name (BraseroTrackDataCfg *track)
root = brasero_data_project_get_root (BRASERO_DATA_PROJECT (priv->tree));
do {
g_free (name);
- name = g_strdup_printf ("Autorun%i.ico", i);
+ name = g_strdup_printf ("Autorun%i.ico", i++);
} while (brasero_file_node_check_name_existence (root, name));
return name;
@@ -2927,12 +2927,18 @@ brasero_track_data_cfg_set_icon (BraseroTrackDataCfg *track,
root = brasero_data_project_get_root (BRASERO_DATA_PROJECT (priv->tree));
if (!priv->autorun) {
- if (brasero_file_node_check_name_existence_case (root, "autorun.inf")) {
+ BraseroFileNode *node;
+
+ node = brasero_file_node_check_name_existence_case (root, "autorun.inf");
+ if (node && !node->is_imported) {
/* There is a native autorun.inf file. That's why we can't edit
* it; even if we were to create a temporary file with just the
* icon changed then we could not save it as a project later.
* If I change my mind, I should remember that it the path is
- * the value ON DISC. */
+ * the value ON DISC.
+ * The only exception is if the autorun.inf is an autorun.inf
+ * that was imported from another session when we're
+ * merging. */
return FALSE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]