[haiku-commits] r39169 - haiku/trunk/src/preferences/print

  • From: revol@xxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 28 Oct 2010 16:50:05 +0200 (CEST)

Author: mmu_man
Date: 2010-10-28 16:50:05 +0200 (Thu, 28 Oct 2010)
New Revision: 39169
Changeset: http://dev.haiku-os.org/changeset/39169

Modified:
   haiku/trunk/src/preferences/print/Printers.cpp
   haiku/trunk/src/preferences/print/Printers.h
   haiku/trunk/src/preferences/print/Printers.rdef
Log:
Add ipp: and lpr: as supported uri schemes for the Printer pref, and the 
ArgsReceived() hook with a TODO to handle them. It should use it to prefill the 
add printer dialog.


Modified: haiku/trunk/src/preferences/print/Printers.cpp
===================================================================
--- haiku/trunk/src/preferences/print/Printers.cpp      2010-10-28 11:19:20 UTC 
(rev 39168)
+++ haiku/trunk/src/preferences/print/Printers.cpp      2010-10-28 14:50:05 UTC 
(rev 39169)
@@ -57,3 +57,13 @@
                BApplication::MessageReceived(msg);
        }
 }
+
+
+void
+PrintersApp::ArgvReceived(int32 argc, char** argv)
+{
+       for (int i; i < argc; i++) {
+               // TODO: show a pre-filled add printer dialog here
+       }
+}
+

Modified: haiku/trunk/src/preferences/print/Printers.h
===================================================================
--- haiku/trunk/src/preferences/print/Printers.h        2010-10-28 11:19:20 UTC 
(rev 39168)
+++ haiku/trunk/src/preferences/print/Printers.h        2010-10-28 14:50:05 UTC 
(rev 39169)
@@ -22,6 +22,7 @@
                                                                PrintersApp();
                        void                            ReadyToRun();
                        void                            
MessageReceived(BMessage* msg);
+                       void                            ArgvReceived(int32 
argc, char** argv);
 };
 
 #endif // _PRINTERS_H

Modified: haiku/trunk/src/preferences/print/Printers.rdef
===================================================================
--- haiku/trunk/src/preferences/print/Printers.rdef     2010-10-28 11:19:20 UTC 
(rev 39168)
+++ haiku/trunk/src/preferences/print/Printers.rdef     2010-10-28 14:50:05 UTC 
(rev 39169)
@@ -18,6 +18,12 @@
        long_info = "Printers ©2001-2010 Haiku"
 };
 
+resource(1, "BEOS:FILE_TYPES") message
+{
+       "types" = "application/x-vnd.Be.URL.ipp",
+       "types" = "application/x-vnd.Be.URL.lpr"
+};
+
 resource vector_icon {
        $"6E6369660B050002001602B76E71BBF8593D1210B8A7674742A04ABEFB00AEFF"
        $"E1053802001603373333B9333339333337333348E54F4B555400FFBFE5FF9B02"


Other related posts:

  • » [haiku-commits] r39169 - haiku/trunk/src/preferences/print - revol