[Xfce4-commits] <xfce4-appfinder:master> Invert expand mode from command line.

Nick Schermer noreply at xfce.org
Wed Sep 21 20:46:01 CEST 2011


Updating branch refs/heads/master
         to ee613af51874b90888b0faa396ba3abe87cb993c (commit)
       from 1614a841a7ee904142f8f1a8781d5e8097a24d55 (commit)

commit ee613af51874b90888b0faa396ba3abe87cb993c
Author: Nick Schermer <nick at xfce.org>
Date:   Wed Sep 21 20:38:52 2011 +0200

    Invert expand mode from command line.

 data/xfce4-appfinder.desktop.in |    2 +-
 data/xfce4-run.desktop.in       |    2 +-
 src/main.c                      |    9 +++++----
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/data/xfce4-appfinder.desktop.in b/data/xfce4-appfinder.desktop.in
index 2b4bec2..41f4cf5 100644
--- a/data/xfce4-appfinder.desktop.in
+++ b/data/xfce4-appfinder.desktop.in
@@ -1,6 +1,6 @@
 [Desktop Entry]
 Version=1.0
-Exec=xfce4-appfinder -x
+Exec=xfce4-appfinder
 Icon=gtk-find
 StartupNotify=true
 Terminal=false
diff --git a/data/xfce4-run.desktop.in b/data/xfce4-run.desktop.in
index 72b5012..613f8c5 100644
--- a/data/xfce4-run.desktop.in
+++ b/data/xfce4-run.desktop.in
@@ -1,7 +1,7 @@
 [Desktop Entry]
 Version=1.0
 Type=Application
-Exec=xfce4-appfinder
+Exec=xfce4-appfinder -c
 Icon=gtk-execute
 StartupNotify=true
 Terminal=false
diff --git a/src/main.c b/src/main.c
index e4897c1..cfd8cc5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -54,7 +54,7 @@
 
 
 
-static gboolean            opt_expanded = FALSE;
+static gboolean            opt_collapsed = FALSE;
 static gboolean            opt_version = FALSE;
 static gboolean            opt_replace = FALSE;
 static gboolean            opt_quit = FALSE;
@@ -67,7 +67,7 @@ static XfceAppfinderModel *model_cache = NULL;
 
 static GOptionEntry option_entries[] =
 {
-  { "expanded", 'x', 0, G_OPTION_ARG_NONE, &opt_expanded, N_("Start in expanded mode"), NULL },
+  { "collapsed", 'c', 0, G_OPTION_ARG_NONE, &opt_collapsed, N_("Start in collapsed mode"), NULL },
   { "version", 'V', 0, G_OPTION_ARG_NONE, &opt_version, N_("Print version information and exit"), NULL },
   { "replace", 'r', 0, G_OPTION_ARG_NONE, &opt_replace, N_("Replace the existing service"), NULL },
   { "quit", 'q', 0, G_OPTION_ARG_NONE, &opt_quit, N_("Quit all instances"), NULL },
@@ -190,6 +190,7 @@ appfinder_dbus_open_window (DBusConnection *dbus_connection,
 
   DBusError    derror;
   DBusMessage *method, *result;
+  gboolean     expanded = !opt_collapsed;
 
   method = dbus_message_new_method_call (APPFINDER_DBUS_SERVICE,
                                          APPFINDER_DBUS_PATH,
@@ -200,7 +201,7 @@ appfinder_dbus_open_window (DBusConnection *dbus_connection,
     startup_id = "";
 
   dbus_message_append_args (method,
-                            DBUS_TYPE_BOOLEAN, &opt_expanded,
+                            DBUS_TYPE_BOOLEAN, &expanded,
                             DBUS_TYPE_STRING, &startup_id,
                             DBUS_TYPE_INVALID);
 
@@ -458,7 +459,7 @@ main (gint argc, gchar **argv)
     }
 
   /* create initial window */
-  appfinder_window_new (NULL, opt_expanded);
+  appfinder_window_new (NULL, !opt_collapsed);
 
   APPFINDER_DEBUG ("enter mainloop");
 


More information about the Xfce4-commits mailing list