[Xfce4-commits] <xfburn:master> Automagical handling of commandline filenames.

David Mohr noreply at xfce.org
Sat Jul 7 07:24:03 CEST 2012


Updating branch refs/heads/master
         to fbaf8173845cccc7b987f85d8357de09790ac277 (commit)
       from ed4db8ccbef01a86bde9c39649093c164ea0b106 (commit)

commit fbaf8173845cccc7b987f85d8357de09790ac277
Author: David Mohr <david at mcbf.net>
Date:   Sat Jun 16 16:07:49 2012 +0200

    Automagical handling of commandline filenames.

 xfburn/xfburn-main.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xfburn/xfburn-main.c b/xfburn/xfburn-main.c
index 9e6c250..4873d14 100644
--- a/xfburn/xfburn-main.c
+++ b/xfburn/xfburn-main.c
@@ -340,6 +340,17 @@ main (int argc, char **argv)
 
   /*----------evaluate parsed command line action options-------------------------*/
 
+  /* heuristic for file names on the commandline */
+  if (argc == 2) {
+    /* exactly one filename, assume it is an image */
+      image_filename = argv[1];
+  } else if (argc > 2) {
+    /* several file names, for now just open up a data composition */
+    /* TODO: auto-detect music files for audio compositions */
+    add_data_composition = TRUE;
+  }
+
+
   if (show_main) {
     xfburn_main_enter_main_window ();
   }


More information about the Xfce4-commits mailing list