Updating branch refs/heads/master
         to e2583754c6cba9e5254cb805e7e951eedb78277a (commit)
       from 3d240520d5de23b536fccc9043003f75767923e0 (commit)

commit e2583754c6cba9e5254cb805e7e951eedb78277a
Author: Mike Massonnet <[email protected]>
Date:   Sun Nov 7 11:47:51 2010 +0100

    Initialize the first group with load_window_data
    
    Redone the way the first group is created in order to keep the xfconf
    binding in one place.
    
    This will be useful in order to create FileMonitors later.

 lib/application.vala |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/lib/application.vala b/lib/application.vala
index cd6c300..df4414f 100644
--- a/lib/application.vala
+++ b/lib/application.vala
@@ -158,17 +158,15 @@ namespace Xnp {
 
                        /* Insert initial notes */
                        if (name == null) {
-                               var note = window.insert_note ();
-                               Xfconf.Property.bind (xfconf_channel, 
"/global/font-description",
-                                       typeof (string), note.text_view, 
"font");
-
-                               string window_path = "%s/%s".printf 
(notes_path, window.name);
-                               GLib.DirUtils.create_with_parents (window_path, 
0700);
                                try {
-                                       string note_path = "%s/%s".printf 
(window_path, note.name);
+                                       string window_path = "%s/%s".printf 
(notes_path, window.name);
+                                       GLib.DirUtils.create_with_parents 
(window_path, 0700);
+                                       string note_path = "%s/%s".printf 
(window_path, _("Notes"));
                                        GLib.FileUtils.set_contents (note_path, 
"", -1);
+                                       this.load_window_data (window);
                                }
                                catch (FileError e) {
+                                       critical ("Unable to initialize a notes 
group: %s", e.message);
                                }
                        }
                        else {
@@ -289,7 +287,6 @@ namespace Xnp {
                                        window.show ();
                        }
                        catch (GLib.Error e) {
-                               message ("Unable to load window configuration 
from %s: %s", config_file, e.message);
                                window.show ();
                        }
                }
@@ -325,6 +322,7 @@ namespace Xnp {
                                GLib.FileUtils.set_contents (config_file, 
contents);
                        }
                        catch (FileError e) {
+                               message ("Unable to save window configuration 
from %s: %s", config_file, e.message);
                        }
                }
 
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to