[Xfce4-commits] <postler:master> Accept 'bureau' as a valid application module
Christian Dywan
noreply at xfce.org
Tue Jan 4 05:52:02 CET 2011
Updating branch refs/heads/master
to 315201b4e0f3ab8e58bc441da14a1cf77dabf5ba (commit)
from af4a526da97814bc29faaaf5fe92640029bc01c7 (commit)
commit 315201b4e0f3ab8e58bc441da14a1cf77dabf5ba
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun Jan 2 19:30:22 2011 +0100
Accept 'bureau' as a valid application module
postler/postler-app.vala | 13 ++++++++-----
postler/postler-reader.vala | 13 +++++++------
2 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/postler/postler-app.vala b/postler/postler-app.vala
index d07b1ae..d7073f3 100644
--- a/postler/postler-app.vala
+++ b/postler/postler-app.vala
@@ -178,11 +178,14 @@ public class Postler.App : Unique.App {
return true;
}
- public static bool spawn_module (string name, string parameter1,
- string? parameter2=null) {
- string command = argv0 + " --module " + name + " '" + parameter1 + "'";
- if (parameter2 != null)
- command += " '" + parameter2 + "'";
+ public static bool spawn_module (string name,
+ string? arg1=null, string? arg2=null) {
+
+ string command = argv0 + " --module " + name;
+ if (arg1 != null)
+ command += " '" + arg1 + "'";
+ if (arg2 != null)
+ command += " '" + arg2 + "'";
try {
var info = GLib.AppInfo.create_from_commandline (command, "", 0);
if (info.launch (null, null))
diff --git a/postler/postler-reader.vala b/postler/postler-reader.vala
index f4dcb4b..0b0792d 100644
--- a/postler/postler-reader.vala
+++ b/postler/postler-reader.vala
@@ -70,8 +70,11 @@ public class Postler.Reader {
else
module = "content";
}
- if (module != null)
- Environment.set_prgname ("postler-" + module);
+
+ if (module == null)
+ module = "bureau";
+
+ Environment.set_prgname ("postler-" + module);
if (module == "service") {
var service = new Postler.Service ();
@@ -87,13 +90,11 @@ public class Postler.Reader {
WebKit.set_cache_model (WebKit.CacheModel.DOCUMENT_VIEWER);
Postler.App.register_stock_items ();
- if (module != null) {
+ if (module != "bureau") {
Gtk.Widget instance = null;
string icon_name = null;
string title = null;
- /* TODO: Implement "tray" */
- /* TODO: Implement "reply", "reply-all", "forward" */
if (module == "content" || module == "source") {
instance = new Postler.Content ();
icon_name = module == "source" ? "text-html" : "emblem-mail";
@@ -150,7 +151,7 @@ public class Postler.Reader {
}
else
GLib.error ("Unknown module \"%s\". Valid modules are: %s",
- module, "content source compose service");
+ module, "bureau content source compose service");
/* FIXME: Escape to close window */
var window = new Gtk.Window (Gtk.WindowType.TOPLEVEL);
More information about the Xfce4-commits
mailing list