[mistelix/stable] Fixes custom DVD menu image background selection
- From: Jordi Mas <jmas src gnome org>
- To: svn-commits-list gnome org
- Subject: [mistelix/stable] Fixes custom DVD menu image background selection
- Date: Fri, 29 May 2009 11:04:50 -0400 (EDT)
commit a8268fe18cc5d41dba97621ef5020bd2617f5240
Author: Jordi Mas <jmas softcatala org>
Date: Fri May 29 17:04:10 2009 +0200
Fixes custom DVD menu image background selection
---
src/core/DvdMenu.cs | 2 +-
src/dialogs/ThemeSelectionDialog.cs | 20 +++++++++++++++++---
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/core/DvdMenu.cs b/src/core/DvdMenu.cs
index 9305c5d..51c6943 100644
--- a/src/core/DvdMenu.cs
+++ b/src/core/DvdMenu.cs
@@ -111,7 +111,7 @@ namespace Mistelix.Core
}
try {
- if (project.Details.CustomMenuBackground != null)
+ if (string.IsNullOrEmpty (project.Details.CustomMenuBackground) == false)
im = new Gdk.Pixbuf (project.Details.CustomMenuBackground);
}
diff --git a/src/dialogs/ThemeSelectionDialog.cs b/src/dialogs/ThemeSelectionDialog.cs
index e9e07fd..cde0020 100644
--- a/src/dialogs/ThemeSelectionDialog.cs
+++ b/src/dialogs/ThemeSelectionDialog.cs
@@ -90,10 +90,12 @@ namespace Mistelix.Dialogs
}
try {
- if (custom_menubackground != null)
+ if (string.IsNullOrEmpty (custom_menubackground) == false)
im = new Gdk.Pixbuf (custom_menubackground);
}
- catch { }
+ catch {
+ Logger.Error ("MenuBackgroundPreview.OnExposeEvent. Error loading {0}", custom_menubackground);
+ }
try {
if (im == null)
@@ -208,10 +210,22 @@ namespace Mistelix.Dialogs
selectbutton_drawing_area = new ButtonPreview (project);
highlightbutton_drawing_area = new ButtonPreview (project);
- browse_file = new BrowseFile (file_hbox, Mistelix.Preferences.GetStringValue (Preferences.ImagesDirectoryKey), true);
+ browse_file = new BrowseFile (file_hbox, project.Details.CustomMenuBackground, true);
+ browse_file.DefaultDirectory = Mistelix.Preferences.GetStringValue (Preferences.ImagesDirectoryKey);
+ menu_drawing_area.CustomMenuBackground = project.Details.CustomMenuBackground;
color = author_label.Style.Background (StateType.Normal);
textview.ModifyBase (Gtk.StateType.Normal, color);
+
+ Gtk.Button clean_button = new Gtk.Button (Catalog.GetString ("Clean"));
+ clean_button.Clicked += delegate
+ {
+ browse_file.Filename = null;
+ menu_drawing_area.CustomMenuBackground = null;
+ };
+
+ file_hbox.Add (clean_button);
+ file_hbox.ShowAll ();
PrepareTree ();
backpreview_box.Add (menu_drawing_area);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]