[Xfce4-commits] <postler:master> Simplify identification, just name and version

Christian Dywan noreply at xfce.org
Wed Mar 16 06:30:02 CET 2011


Updating branch refs/heads/master
         to d9cbc5e5e433825b2d400c7df1177b6f7214da1e (commit)
       from 21ebc1091d6e9edb28e1ed96bd51235b12efcd10 (commit)

commit d9cbc5e5e433825b2d400c7df1177b6f7214da1e
Author: Christian Dywan <christian at twotoasts.de>
Date:   Wed Mar 16 00:04:36 2011 +0100

    Simplify identification, just name and version

 postler/postler-app.vala      |   11 -----------
 postler/postler-composer.vala |    2 +-
 postler/postler-content.vala  |    3 ---
 postler/postler.vapi          |   13 -------------
 4 files changed, 1 insertions(+), 28 deletions(-)

diff --git a/postler/postler-app.vala b/postler/postler-app.vala
index 584a80c..7697eb1 100644
--- a/postler/postler-app.vala
+++ b/postler/postler-app.vala
@@ -129,17 +129,6 @@ public class Postler.App : Unique.App {
         factory.add_default ();
     }
 
-    public static string get_user_agent () {
-        return "%s/%s (%s; %s; U; %s) WebKit/%d.%d+".
-            printf (Config.PACKAGE_NAME,
-                    Config.PACKAGE_VERSION.substring (0, 3),
-                    "X11", /* FIXME: Determine window system */
-                    Posixish.utsname ().sysname,
-                    Pango.Language.get_default ().to_string (),
-                    WebKit.USER_AGENT_MAJOR_VERSION,
-                    WebKit.USER_AGENT_MINOR_VERSION);
-    }
-
     public static bool show_uri (Gdk.Screen screen, string uri) {
         string real_uri = uri;
         if (!("://" in uri))
diff --git a/postler/postler-composer.vala b/postler/postler-composer.vala
index b324a54..8ed89f7 100644
--- a/postler/postler-composer.vala
+++ b/postler/postler-composer.vala
@@ -194,7 +194,7 @@ public class Postler.Composer : Gtk.Window {
                          entry_to.text,
                          entry_subject.text,
                          now.to_string (Soup.DateFormat.RFC2822),
-                         Postler.App.get_user_agent ());
+                         "Postler/" + Config.PACKAGE_VERSION.substring (0, 3));
         if (info.reply != null)
             header += "Reply-To: " + info.reply + "\n";
         if (info.organization != null)
diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index 7df08c6..ea1d8e7 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -165,9 +165,6 @@ public class Postler.Content : WebKit.WebView {
 
     public Content () {
         settings.set ("enable-scripts", false, "enable-plugins", false);
-        if (settings.get_class ().find_property ("user-agent") != null) {
-            settings.set ("user-agent", Postler.App.get_user_agent ());
-        }
         if (settings.get_class ().find_property ("enable-private-browsing") != null) {
             settings.set ("enable-private-browsing", true);
         }
diff --git a/postler/postler.vapi b/postler/postler.vapi
index d38e61a..0a22602 100644
--- a/postler/postler.vapi
+++ b/postler/postler.vapi
@@ -25,16 +25,3 @@ namespace Gdk {
                                                   void* a, void* b) throws GLib.Error;
     }
 
-[CCode (cprefix = "", lower_case_cprefix = "")]
-namespace Posixish {
-    [CCode (cname = "struct utsname", cheader_filename = "sys/utsname.h")]
-    public struct utsname {
-        public unowned string sysname;
-        public unowned string nodename;
-        public unowned string release;
-        public unowned string version;
-        public unowned string machine;
-        [CCode (cname = "uname")]
-        public utsname ();
-    }
-}



More information about the Xfce4-commits mailing list