[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8399 - in gnunet-cocoa: . GNUnet Setup Assistant GNUnet Se
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8399 - in gnunet-cocoa: . GNUnet Setup Assistant GNUnet Setup Assistant/English.lproj GNUnet Setup Assistant/English.lproj/MainMenu.nib GNUnet Setup Assistant/GNUnet Setup Assistant.xcodeproj |
Date: |
Wed, 8 Apr 2009 09:29:55 -0600 |
Author: holindho
Date: 2009-04-08 09:29:54 -0600 (Wed, 08 Apr 2009)
New Revision: 8399
Added:
gnunet-cocoa/GNUnet Setup Assistant/
gnunet-cocoa/GNUnet Setup Assistant/COPYING
gnunet-cocoa/GNUnet Setup Assistant/English.lproj/
gnunet-cocoa/GNUnet Setup Assistant/English.lproj/InfoPlist.strings
gnunet-cocoa/GNUnet Setup Assistant/English.lproj/MainMenu.nib/
gnunet-cocoa/GNUnet Setup Assistant/English.lproj/MainMenu.nib/classes.nib
gnunet-cocoa/GNUnet Setup Assistant/English.lproj/MainMenu.nib/info.nib
gnunet-cocoa/GNUnet Setup
Assistant/English.lproj/MainMenu.nib/keyedobjects.nib
gnunet-cocoa/GNUnet Setup Assistant/GNDatastorePage.h
gnunet-cocoa/GNUnet Setup Assistant/GNDatastorePage.m
gnunet-cocoa/GNUnet Setup Assistant/GNFinishPage.h
gnunet-cocoa/GNUnet Setup Assistant/GNFinishPage.m
gnunet-cocoa/GNUnet Setup Assistant/GNLoadLimitPage.h
gnunet-cocoa/GNUnet Setup Assistant/GNLoadLimitPage.m
gnunet-cocoa/GNUnet Setup Assistant/GNNetworkConnectionPage.h
gnunet-cocoa/GNUnet Setup Assistant/GNNetworkConnectionPage.m
gnunet-cocoa/GNUnet Setup Assistant/GNServiceAccountPage.h
gnunet-cocoa/GNUnet Setup Assistant/GNServiceAccountPage.m
gnunet-cocoa/GNUnet Setup Assistant/GNSetupAssistant.h
gnunet-cocoa/GNUnet Setup Assistant/GNSetupAssistant.m
gnunet-cocoa/GNUnet Setup Assistant/GNUnet Setup Assistant.xcodeproj/
gnunet-cocoa/GNUnet Setup Assistant/GNUnet Setup
Assistant.xcodeproj/project.pbxproj
gnunet-cocoa/GNUnet Setup Assistant/GNUnetSetupAssistant-icon.icns
gnunet-cocoa/GNUnet Setup Assistant/GNWelcomePage.h
gnunet-cocoa/GNUnet Setup Assistant/GNWelcomePage.m
gnunet-cocoa/GNUnet Setup Assistant/Info.plist
gnunet-cocoa/GNUnet Setup Assistant/main.m
Log:
cocoa setup assistant
Added: gnunet-cocoa/GNUnet Setup Assistant/COPYING
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/COPYING (rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/COPYING 2009-04-08 15:29:54 UTC (rev
8399)
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
Added: gnunet-cocoa/GNUnet Setup Assistant/English.lproj/InfoPlist.strings
===================================================================
(Binary files differ)
Property changes on: gnunet-cocoa/GNUnet Setup
Assistant/English.lproj/InfoPlist.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: gnunet-cocoa/GNUnet Setup
Assistant/English.lproj/MainMenu.nib/classes.nib
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/English.lproj/MainMenu.nib/classes.nib
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/English.lproj/MainMenu.nib/classes.nib
2009-04-08 15:29:54 UTC (rev 8399)
@@ -0,0 +1,86 @@
+{
+ IBClasses = (
+ {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
+ {
+ ACTIONS = {backAction = id; continueAction = id;
migrationButtonPressed = id; };
+ CLASS = GNDatastorePage;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ assistant = GNSetupAssistant;
+ datastoreQuotaField = NSTextField;
+ messageView = NSTextView;
+ migrationButton = NSButton;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {
+ ACTIONS = {backAction = id; finishAction = id; };
+ CLASS = GNFinishPage;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ assistant = GNSetupAssistant;
+ autostartButton = NSButton;
+ messageView = NSTextView;
+ openEnhConfigButton = NSButton;
+ runUpdateButton = NSButton;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {
+ ACTIONS = {backAction = id; continueAction = id;
handleBandwidthSharingAction = id; };
+ CLASS = GNLoadLimitPage;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ assistant = GNSetupAssistant;
+ bandwidthShareMatrix = NSMatrix;
+ cpuUsageLimitField = NSTextField;
+ downloadLimitField = NSTextField;
+ messageView = NSTextView;
+ uploadLimitField = NSTextField;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {
+ ACTIONS = {backAction = id; comboAction = id; continueAction = id;
};
+ CLASS = GNNetworkConnectionPage;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ assistant = GNSetupAssistant;
+ ipAddressField = NSTextField;
+ messageView = NSTextView;
+ networkInterfaceComboBox = NSComboBox;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {
+ ACTIONS = {backAction = id; continueAction = id; };
+ CLASS = GNServiceAccountPage;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ assistant = GNSetupAssistant;
+ groupField = NSTextField;
+ messageView = NSTextView;
+ userField = NSTextField;
+ };
+ SUPERCLASS = NSObject;
+ },
+ {
+ CLASS = GNSetupAssistant;
+ LANGUAGE = ObjC;
+ OUTLETS = {tabView = NSTabView; window = NSWindow; };
+ SUPERCLASS = NSObject;
+ },
+ {
+ ACTIONS = {backAction = id; continueAction = id; };
+ CLASS = GNWelcomePage;
+ LANGUAGE = ObjC;
+ OUTLETS = {
+ assistant = GNSetupAssistant;
+ backButton = NSButton;
+ messageView = NSTextView;
+ };
+ SUPERCLASS = NSObject;
+ }
+ );
+ IBVersion = 1;
+}
\ No newline at end of file
Added: gnunet-cocoa/GNUnet Setup Assistant/English.lproj/MainMenu.nib/info.nib
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/English.lproj/MainMenu.nib/info.nib
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/English.lproj/MainMenu.nib/info.nib
2009-04-08 15:29:54 UTC (rev 8399)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>135 105 356 240 0 0 1680 1028 </string>
+ <key>IBEditorPositions</key>
+ <dict>
+ <key>29</key>
+ <string>132 352 311 44 0 0 1680 1028 </string>
+ </dict>
+ <key>IBFramework Version</key>
+ <string>489.0</string>
+ <key>IBOpenObjects</key>
+ <array>
+ <integer>29</integer>
+ <integer>21</integer>
+ </array>
+ <key>IBSystem Version</key>
+ <string>8S165</string>
+</dict>
+</plist>
Added: gnunet-cocoa/GNUnet Setup
Assistant/English.lproj/MainMenu.nib/keyedobjects.nib
===================================================================
(Binary files differ)
Property changes on: gnunet-cocoa/GNUnet Setup
Assistant/English.lproj/MainMenu.nib/keyedobjects.nib
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: gnunet-cocoa/GNUnet Setup Assistant/GNDatastorePage.h
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNDatastorePage.h
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNDatastorePage.h 2009-04-08
15:29:54 UTC (rev 8399)
@@ -0,0 +1,26 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import "GNSetupAssistant.h"
+
address@hidden GNDatastorePage : NSObject {
+ IBOutlet GNSetupAssistant *assistant;
+ IBOutlet NSTextView *messageView;
+ IBOutlet NSTextField *datastoreQuotaField;
+ IBOutlet NSButton *migrationButton;
+}
+
+- (void)awakeFromNib;
+- (IBAction)backAction:(id)sender;
+- (IBAction)continueAction:(id)sender;
+- (IBAction)migrationButtonPressed:(id)sender;
+- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText
*)fieldEditor;
address@hidden
Added: gnunet-cocoa/GNUnet Setup Assistant/GNDatastorePage.m
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNDatastorePage.m
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNDatastorePage.m 2009-04-08
15:29:54 UTC (rev 8399)
@@ -0,0 +1,82 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#import "GNDatastorePage.h"
+
address@hidden GNDatastorePage
+- (void)awakeFromNib
+{
+ char *val;
+
+ [messageView setDrawsBackground:NO];
+ [[messageView enclosingScrollView] setDrawsBackground:NO];
+
+ GNUNET_GC_get_configuration_value_string(
+ [assistant gnunetGCConfiguration], "FS", "QUOTA", "1024", &val);
+ [datastoreQuotaField setStringValue:[[[NSString alloc]
+ initWithCString:val
+ encoding:NSUTF8StringEncoding] autorelease]];
+ GNUNET_free(val);
+
+ if (GNUNET_GC_get_configuration_value_yesno(
+ [assistant gnunetGCConfiguration], "FS",
+ "ACTIVEMIGRATION", GNUNET_YES) == GNUNET_YES)
+ [migrationButton setState:NSOnState];
+ else
+ [migrationButton setState:NSOffState];
+}
+
+- (IBAction)backAction:(id)sender
+{
+ NSControl *control = (NSControl *)sender;
+ if ([[control window] firstResponder] != nil &&
+ [[control window] firstResponder] != control &&
+ [[control window] makeFirstResponder:nil] == NO) {
+ return;
+ }
+ [assistant previousPage];
+}
+
+- (IBAction)continueAction:(id)sender
+{
+ NSControl *control = (NSControl *)sender;
+ if ([[control window] firstResponder] != nil &&
+ [[control window] firstResponder] != control &&
+ [[control window] makeFirstResponder:nil] == NO) {
+ return;
+ }
+ [assistant nextPage];
+}
+
+- (IBAction)migrationButtonPressed:(id)sender
+{
+ if ([migrationButton state] == NSOnState)
+ [assistant setConfigurationOption:"ACTIVEMIGRATION"
+ inSection:"FS"
+ toValue:"YES"
+ fromControl:migrationButton];
+ else
+ [assistant setConfigurationOption:"ACTIVEMIGRATION"
+ inSection:"FS"
+ toValue:"NO"
+ fromControl:migrationButton];
+}
+
+- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
+{
+ if (control == datastoreQuotaField)
+ return [assistant setConfigurationOption:"QUOTA"
+ inSection:"FS"
+ toValue:[[control stringValue] UTF8String]
+ fromControl:control];
+
+ return YES;
+}
address@hidden
Added: gnunet-cocoa/GNUnet Setup Assistant/GNFinishPage.h
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNFinishPage.h
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNFinishPage.h 2009-04-08 15:29:54 UTC
(rev 8399)
@@ -0,0 +1,25 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import "GNSetupAssistant.h"
+
address@hidden GNFinishPage : NSObject {
+ IBOutlet GNSetupAssistant *assistant;
+ IBOutlet NSTextView *messageView;
+ IBOutlet NSButton *autostartButton;
+ IBOutlet NSButton *runUpdateButton;
+ IBOutlet NSButton *openEnhConfigButton;
+}
+
+- (void)awakeFromNib;
+- (IBAction)backAction:(id)sender;
+- (IBAction)finishAction:(id)sender;
address@hidden
Added: gnunet-cocoa/GNUnet Setup Assistant/GNFinishPage.m
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNFinishPage.m
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNFinishPage.m 2009-04-08 15:29:54 UTC
(rev 8399)
@@ -0,0 +1,46 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#import "GNFinishPage.h"
+
address@hidden GNFinishPage
+- (void)awakeFromNib
+{
+ [messageView setDrawsBackground:NO];
+ [[messageView enclosingScrollView] setDrawsBackground:NO];
+
+ if (GNUNET_configure_autostart(
+ [assistant gnunetGEContext], GNUNET_YES,
+ GNUNET_YES, NULL, NULL, NULL, NULL))
+ [autostartButton setEnabled:YES];
+ else
+ [autostartButton setEnabled:NO];
+
+ if (GNUNET_GC_get_configuration_value_yesno(
+ [assistant gnunetGCConfiguration], "GNUNETD",
+ "AUTOSTART", GNUNET_NO) == GNUNET_YES)
+ [autostartButton setState:NSOnState];
+ else
+ [autostartButton setState:NSOffState];
+
+ [runUpdateButton setState:NSOnState];
+ [openEnhConfigButton setState:NSOffState];
+}
+
+- (IBAction)backAction:(id)sender
+{
+ [assistant previousPage];
+}
+
+- (IBAction)finishAction:(id)sender
+{
+ [assistant finishSetup];
+}
address@hidden
Added: gnunet-cocoa/GNUnet Setup Assistant/GNLoadLimitPage.h
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNLoadLimitPage.h
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNLoadLimitPage.h 2009-04-08
15:29:54 UTC (rev 8399)
@@ -0,0 +1,28 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import "GNSetupAssistant.h"
+
address@hidden GNLoadLimitPage : NSObject {
+ IBOutlet GNSetupAssistant *assistant;
+ IBOutlet NSTextView *messageView;
+ IBOutlet NSTextField *uploadLimitField;
+ IBOutlet NSTextField *downloadLimitField;
+ IBOutlet NSTextField *cpuUsageLimitField;
+ IBOutlet NSMatrix *bandwidthShareMatrix;
+}
+
+- (void)awakeFromNib;
+- (IBAction)backAction:(id)sender;
+- (IBAction)continueAction:(id)sender;
+- (IBAction)handleBandwidthSharingAction:(id)sender;
+- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText
*)fieldEditor;
address@hidden
Added: gnunet-cocoa/GNUnet Setup Assistant/GNLoadLimitPage.m
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNLoadLimitPage.m
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNLoadLimitPage.m 2009-04-08
15:29:54 UTC (rev 8399)
@@ -0,0 +1,114 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#import "GNLoadLimitPage.h"
+
address@hidden GNLoadLimitPage
+- (void)awakeFromNib
+{
+ char *val;
+
+ [messageView setDrawsBackground:NO];
+ [[messageView enclosingScrollView] setDrawsBackground:NO];
+
+ GNUNET_GC_get_configuration_value_string(
+ [assistant gnunetGCConfiguration], "LOAD",
+ "MAXNETUPBPSTOTAL", "50000", &val);
+ [uploadLimitField setStringValue:[[[NSString alloc]
+ initWithCString:val
+ encoding:NSUTF8StringEncoding] autorelease]];
+ GNUNET_free(val);
+
+ GNUNET_GC_get_configuration_value_string(
+ [assistant gnunetGCConfiguration], "LOAD",
+ "MAXNETDOWNBPSTOTAL", "50000", &val);
+ [downloadLimitField setStringValue:[[[NSString alloc]
+ initWithCString:val
+ encoding:NSUTF8StringEncoding] autorelease]];
+ GNUNET_free(val);
+
+ [[bandwidthShareMatrix cellAtRow:0 column:0]
+ setRepresentedObject:@"YES"];
+ [[bandwidthShareMatrix cellAtRow:1 column:0]
+ setRepresentedObject:@"NO"];
+ if (GNUNET_GC_get_configuration_value_yesno(
+ [assistant gnunetGCConfiguration], "LOAD",
+ "BASICLIMITING", GNUNET_NO) == GNUNET_YES) {
+ [bandwidthShareMatrix setState:1 atRow:0 column:0];
+ }
+ else {
+ [bandwidthShareMatrix setState:1 atRow:1 column:0];
+ }
+
+ GNUNET_GC_get_configuration_value_string(
+ [assistant gnunetGCConfiguration], "LOAD", "MAXCPULOAD",
+ "50", &val);
+ [cpuUsageLimitField setStringValue:[[[NSString alloc]
+ initWithCString:val
+ encoding:NSUTF8StringEncoding] autorelease]];
+ GNUNET_free(val);
+}
+
+- (IBAction)backAction:(id)sender
+{
+ NSControl *control = (NSControl *)sender;
+ if ([[control window] firstResponder] != nil &&
+ [[control window] firstResponder] != control &&
+ [[control window] makeFirstResponder:nil] == NO) {
+ return;
+ }
+ [assistant previousPage];
+}
+
+- (IBAction)continueAction:(id)sender
+{
+ NSControl *control = (NSControl *)sender;
+ if ([[control window] firstResponder] != nil &&
+ [[control window] firstResponder] != control &&
+ [[control window] makeFirstResponder:nil] == NO) {
+ return;
+ }
+ [assistant nextPage];
+}
+
+- (IBAction)handleBandwidthSharingAction:(id)sender
+{
+ NSString *obj;
+
+ obj = [[(NSMatrix *)sender selectedCell] representedObject];
+ [assistant setConfigurationOption:"BASICLIMITING"
+ inSection:"LOAD"
+ toValue:[obj UTF8String]
+ fromControl:(NSControl *)sender];
+}
+
+- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
+{
+ if (control == uploadLimitField)
+ return [assistant setConfigurationOption:"MAXNETUPBPSTOTAL"
+ inSection:"LOAD"
+ toValue:[[control stringValue] UTF8String]
+ fromControl:control];
+ else if (control == downloadLimitField)
+ return [assistant setConfigurationOption:"MAXNETDOWNBPSTOTAL"
+ inSection:"LOAD"
+ toValue:[[control stringValue] UTF8String]
+ fromControl:control];
+ else if (control == cpuUsageLimitField) {
+ char s[16];
+ snprintf(s, 16, "%d", [control intValue]);
+ return [assistant setConfigurationOption:"MAXCPULOAD"
+ inSection:"LOAD"
+ toValue:s
+ fromControl:control];
+ }
+ return YES;
+}
address@hidden
Added: gnunet-cocoa/GNUnet Setup Assistant/GNNetworkConnectionPage.h
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNNetworkConnectionPage.h
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNNetworkConnectionPage.h
2009-04-08 15:29:54 UTC (rev 8399)
@@ -0,0 +1,26 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import "GNSetupAssistant.h"
+
address@hidden GNNetworkConnectionPage : NSObject {
+ IBOutlet GNSetupAssistant *assistant;
+ IBOutlet NSTextView *messageView;
+ IBOutlet NSComboBox *networkInterfaceComboBox;
+ IBOutlet NSTextField *ipAddressField;
+}
+
+- (void)awakeFromNib;
+- (IBAction)backAction:(id)sender;
+- (IBAction)continueAction:(id)sender;
+- (IBAction)comboAction:(id)sender;
+- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText
*)fieldEditor;
address@hidden
Added: gnunet-cocoa/GNUnet Setup Assistant/GNNetworkConnectionPage.m
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNNetworkConnectionPage.m
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNNetworkConnectionPage.m
2009-04-08 15:29:54 UTC (rev 8399)
@@ -0,0 +1,115 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#import "GNNetworkConnectionPage.h"
+
+static int insert_nic(const char *name, int default_value, void *opaque)
+{
+ NSObject *o;
+ NSComboBox *control = (NSComboBox *)opaque;
+ o = [[[NSString alloc] initWithCString:name
+ encoding:NSUTF8StringEncoding] autorelease];
+ [control addItemWithObjectValue:o];
+ if (default_value)
+ [control selectItemWithObjectValue:o];
+ return GNUNET_OK;
+}
+
address@hidden GNNetworkConnectionPage
+- (void)awakeFromNib
+{
+ char *val;
+ [messageView setDrawsBackground:NO];
+ [[messageView enclosingScrollView] setDrawsBackground:NO];
+
+ [networkInterfaceComboBox removeAllItems];
+
+ GNUNET_list_network_interfaces([assistant gnunetGEContext],
+ &insert_nic, networkInterfaceComboBox);
+ if ([networkInterfaceComboBox numberOfItems] != 0) {
+ [networkInterfaceComboBox setNumberOfVisibleItems:
+ [networkInterfaceComboBox numberOfItems] < 6 ?
+ [networkInterfaceComboBox numberOfItems] : 6];
+ if ([networkInterfaceComboBox indexOfSelectedItem] == -1)
+ [networkInterfaceComboBox selectItemAtIndex:0];
+ [assistant setConfigurationOption:"INTERFACE"
+ inSection:"NETWORK"
+ toValue:[[networkInterfaceComboBox stringValue]
+ UTF8String]
+ fromControl:networkInterfaceComboBox];
+ [assistant setConfigurationOption:"INTERFACES"
+ inSection:"LOAD"
+ toValue:[[networkInterfaceComboBox stringValue]
+ UTF8String]
+ fromControl:networkInterfaceComboBox];
+ }
+
+ GNUNET_GC_get_configuration_value_string(
+ [assistant gnunetGCConfiguration], "NETWORK", "IP", "", &val);
+ [ipAddressField setStringValue:[[[NSString alloc]
+ initWithCString:val
+ encoding:NSUTF8StringEncoding] autorelease]];
+ GNUNET_free(val);
+}
+
+- (IBAction)backAction:(id)sender
+{
+ NSControl *control = (NSControl *)sender;
+ if ([[control window] firstResponder] != nil &&
+ [[control window] firstResponder] != control &&
+ [[control window] makeFirstResponder:nil] == NO) {
+ return;
+ }
+ [assistant previousPage];
+}
+
+- (IBAction)continueAction:(id)sender
+{
+ NSControl *control = (NSControl *)sender;
+ if ([[control window] firstResponder] != nil &&
+ [[control window] firstResponder] != control &&
+ [[control window] makeFirstResponder:nil] == NO) {
+ return;
+ }
+ [assistant nextPage];
+}
+
+- (IBAction)comboAction:(id)sender
+{
+ NSControl *control = (NSControl *)sender;
+ [assistant setConfigurationOption:"INTERFACE"
+ inSection:"NETWORK"
+ toValue:[[control stringValue] UTF8String]
+ fromControl:control];
+ [assistant setConfigurationOption:"INTERFACES"
+ inSection:"LOAD"
+ toValue:[[control stringValue] UTF8String]
+ fromControl:control];
+}
+
+- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
+{
+ if (control == ipAddressField)
+ return [assistant setConfigurationOption:"IP"
+ inSection:"NETWORK"
+ toValue:[[control stringValue] UTF8String]
+ fromControl:control];
+ else if (control == networkInterfaceComboBox)
+ return [assistant setConfigurationOption:"INTERFACE"
+ inSection:"NETWORK"
+ toValue:[[control stringValue] UTF8String]
+ fromControl:control] &&
+ [assistant setConfigurationOption:"INTERFACES"
+ inSection:"LOAD"
+ toValue:[[control stringValue] UTF8String]
+ fromControl:control];
+ return YES;
+}
address@hidden
Added: gnunet-cocoa/GNUnet Setup Assistant/GNServiceAccountPage.h
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNServiceAccountPage.h
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNServiceAccountPage.h 2009-04-08
15:29:54 UTC (rev 8399)
@@ -0,0 +1,26 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import "GNSetupAssistant.h"
+
address@hidden GNServiceAccountPage : NSObject {
+ IBOutlet GNSetupAssistant *assistant;
+ IBOutlet NSTextView *messageView;
+ IBOutlet NSTextField *userField;
+ IBOutlet NSTextField *groupField;
+}
+
+- (void)awakeFromNib;
+- (void)refresh;
+- (IBAction)backAction:(id)sender;
+- (IBAction)continueAction:(id)sender;
+- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText
*)fieldEditor;
address@hidden
Added: gnunet-cocoa/GNUnet Setup Assistant/GNServiceAccountPage.m
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNServiceAccountPage.m
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNServiceAccountPage.m 2009-04-08
15:29:54 UTC (rev 8399)
@@ -0,0 +1,122 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+// TODO: username field formatter
+
+#include <sys/types.h>
+#include <pwd.h>
+#include <grp.h>
+
+#import "GNServiceAccountPage.h"
+
address@hidden GNServiceAccountPage
+- (void)awakeFromNib
+{
+ [messageView setDrawsBackground:NO];
+ [[messageView enclosingScrollView] setDrawsBackground:NO];
+
+ [self refresh];
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(refresh)
+ name:@"GNAuthorizationChanged" object:nil];
+}
+
+- (void)refresh
+{
+ char *user_name;
+ char *group_name;
+ struct passwd *pwd;
+ struct group *grp;
+
+ if (([assistant isAuthorized] == YES) || (NULL != getpwnam ("gnunet")))
+ user_name = GNUNET_strdup ("gnunet");
+ else {
+ pwd = getpwuid (geteuid ());
+ if (pwd != NULL)
+ user_name = GNUNET_strdup (pwd->pw_name);
+ else
+ user_name = NULL;
+ }
+
+
+ if (([assistant isAuthorized] == YES) || (NULL != getgrnam ("gnunet")))
+ group_name = GNUNET_strdup ("gnunet");
+ else {
+ grp = getgrgid (getegid ());
+ if ((grp != NULL) && (grp->gr_name != NULL))
+ group_name = GNUNET_strdup (grp->gr_name);
+ else
+ group_name = NULL;
+ }
+
+ if (user_name != NULL) {
+ [userField setStringValue:[[[NSString alloc]
+ initWithCString:user_name
+ encoding:NSUTF8StringEncoding] autorelease]];
+ [assistant setConfigurationOption:"USER"
+ inSection:"GNUNETD"
+ toValue:[[userField stringValue] UTF8String]
+ fromControl:userField];
+ }
+
+ if (group_name != NULL) {
+ [groupField setStringValue:[[[NSString alloc]
+ initWithCString:group_name
+ encoding:NSUTF8StringEncoding] autorelease]];
+ [assistant setConfigurationOption:"GROUP"
+ inSection:"GNUNETD"
+ toValue:[[groupField stringValue] UTF8String]
+ fromControl:groupField];
+ }
+
+ [userField setEditable:[assistant isAuthorized]];
+ [groupField setEditable:[assistant isAuthorized]];
+
+ GNUNET_free_non_null(user_name);
+ GNUNET_free_non_null(group_name);
+}
+
+- (IBAction)backAction:(id)sender
+{
+ NSControl *control = (NSControl *)sender;
+ if ([[control window] firstResponder] != nil &&
+ [[control window] firstResponder] != control &&
+ [[control window] makeFirstResponder:nil] == NO) {
+ return;
+ }
+ [assistant previousPage];
+}
+
+- (IBAction)continueAction:(id)sender
+{
+ NSControl *control = (NSControl *)sender;
+ if ([[control window] firstResponder] != nil &&
+ [[control window] firstResponder] != control &&
+ [[control window] makeFirstResponder:nil] == NO) {
+ return;
+ }
+ [assistant nextPage];
+}
+
+- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
+{
+ if (control == userField)
+ return [assistant setConfigurationOption:"USER"
+ inSection:"GNUNETD"
+ toValue:[[control stringValue] UTF8String]
+ fromControl:control];
+ else if (control == groupField)
+ return [assistant setConfigurationOption:"GROUP"
+ inSection:"GNUNETD"
+ toValue:[[control stringValue] UTF8String]
+ fromControl:control];
+ return YES;
+}
address@hidden
Added: gnunet-cocoa/GNUnet Setup Assistant/GNSetupAssistant.h
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNSetupAssistant.h
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNSetupAssistant.h 2009-04-08
15:29:54 UTC (rev 8399)
@@ -0,0 +1,61 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#import <Security/Security.h>
+#import <Cocoa/Cocoa.h>
+
+#include <GNUnet/gnunet_util.h>
+#include <GNUnet/gnunet_setup_lib.h>
+
address@hidden GNSetupAssistant : NSObject {
+ struct GNUNET_GE_Context *errorContext;
+ struct GNUNET_GNS_Context *gnsContext;
+ struct GNUNET_GC_Configuration *config;
+ NSMutableArray *gnsOptionsArray;
+ char *configFilename;
+
+ AuthorizationRef authRef;
+ BOOL isPreauthorized;
+
+ IBOutlet NSWindow *window;
+ IBOutlet NSTabView *tabView;
+}
+
+- (id)init;
+- (void)dealloc;
+- (void)awakeFromNib;
+
+- (struct GNUNET_GC_Configuration *)gnunetGCConfiguration;
+- (struct GNUNET_GE_Context *)gnunetGEContext;
+- (BOOL)setConfigurationOption:(const char *)option
+ inSection:(const char *)section
+ toValue:(const char *)value
+ fromControl:(NSControl *)control;
+
+- (BOOL)preauthorize;
+- (BOOL)isAuthorized;
+//- (AuthorizationRef)authorization;
+- (int)saveConfig;
+- (int)privilegedSaveConfig;
+- (int)createUserGroup;
+- (int)setupAutostart;
+
+- (void)nextPage;
+- (void)previousPage;
+- (void)finishSetup;
+
+- (void)displayErrorAlert:(NSString *)message;
+- (void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode
+ contextInfo:(void *)contextInfo;
+- (void)applicationWillTerminate:(NSNotification *)notification;
+
+- (void)getDefaultsFrom:(struct GNUNET_GNS_TreeNode *)pos
+ optionsTo:(NSMutableArray *)optionsArray;
address@hidden
Added: gnunet-cocoa/GNUnet Setup Assistant/GNSetupAssistant.m
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNSetupAssistant.m
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNSetupAssistant.m 2009-04-08
15:29:54 UTC (rev 8399)
@@ -0,0 +1,510 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#import "GNSetupAssistant.h"
+
+#include <GNUnet/gnunet_directories.h>
+
+static char * input_string(FILE *f)
+{
+ char *buf;
+ int len;
+ int n;
+
+ n = fread(&len, sizeof(len), 1, f);
+ if (n < 1)
+ return NULL;
+
+ if (len <= 0)
+ return NULL;
+
+ buf = malloc(len);
+ n = fread(buf, 1, len, f);
+ if (n < len) {
+ free(buf);
+ return NULL;
+ }
+
+ return buf;
+}
+
+
+static void output_string(FILE *f, char *s)
+{
+ int len;
+
+ if (s == NULL) {
+ len = 0;
+ fwrite(&len, sizeof(len), 1, f);
+ return;
+ }
+
+ len = strlen(s)+1;
+ fwrite(&len, sizeof(len), 1, f);
+ fwrite(s, 1, len, f);
+}
+
address@hidden GNSetupAssistant
+- (id) init
+{
+ if (self = [super init]) {
+ char *dirname, *specname;
+
+ errorContext = GNUNET_GE_create_context_stderr(GNUNET_NO,
+ GNUNET_GE_WARNING | GNUNET_GE_ERROR | GNUNET_GE_FATAL |
+ GNUNET_GE_USER | GNUNET_GE_ADMIN | GNUNET_GE_DEVELOPER |
+ GNUNET_GE_IMMEDIATE | GNUNET_GE_BULK);
+ GNUNET_GE_setDefaultContext(errorContext);
+ GNUNET_os_init(errorContext);
+
+ config = GNUNET_GC_create();
+ if (config == NULL) {
+ GNUNET_GE_free_context(errorContext);
+ [self release];
+ return nil;
+ }
+
+ // load spec
+ dirname = GNUNET_get_installation_path(GNUNET_IPK_DATADIR);
+ specname = GNUNET_malloc(strlen (dirname) +
+ strlen ("config-daemon.scm") + 1);
+ strcpy (specname, dirname);
+ strcat (specname, "config-daemon.scm");
+
+ gnsContext = GNUNET_GNS_load_specification(errorContext, config,
+ specname);
+ if (gnsContext == NULL) {
+ GNUNET_GE_free_context(errorContext);
+ GNUNET_GC_free(config);
+ [self release];
+ return nil;
+ }
+ GNUNET_free(specname);
+ GNUNET_free(dirname);
+
+ gnsOptionsArray = [NSMutableArray new];
+ [self getDefaultsFrom:GNUNET_GNS_get_tree_root(gnsContext)
+ optionsTo:gnsOptionsArray];
+
+ isPreauthorized = NO;
+
+ [NSApp setDelegate:self];
+ }
+
+ return self;
+}
+
+- (void) awakeFromNib
+{
+ char *filename;
+
+// TODO: take config filename from command line if specified
+/* s = [[NSUserDefaults standardUserDefaults]
+ stringForKey:@"StartupConfigType"];
+ NSLog(@"MODE: address@hidden", s);
+ if (s != nil && [s caseInsensitiveCompare:@"Daemon"] == NSOrderedSame) {
+ printf("starting up with daemon config\n");
+ isDaemonConfig = YES;
+ }
+*/
+ filename = GNUNET_DEFAULT_DAEMON_CONFIG_FILE;
+ configFilename = GNUNET_expand_file_name(errorContext, filename);
+
+ [tabView selectFirstTabViewItem:self];
+}
+
+- (struct GNUNET_GC_Configuration *)gnunetGCConfiguration
+{
+ return config;
+}
+
+- (struct GNUNET_GE_Context *)gnunetGEContext
+{
+ return errorContext;
+}
+
+- (BOOL)setConfigurationOption:(const char *)option
+ inSection:(const char *)section
+ toValue:(const char *)value
+ fromControl:(NSControl *)control
+{
+ struct GNUNET_GE_Context *ectx;
+ struct GNUNET_GE_Memory *ectxMemory;
+ int ret;
+
+ ectxMemory = GNUNET_GE_memory_create(2);
+ ectx = GNUNET_GE_create_context_memory(GNUNET_GE_ALL, ectxMemory);
+ GNUNET_GC_set_error_context(config, ectx);
+ ret = GNUNET_GC_set_configuration_value_string(config,
+ errorContext,
+ section,
+ option,
+ value);
+ GNUNET_GC_set_error_context(config, errorContext);
+ if (ret != 0) {
+ NSAlert *alert = [[[NSAlert alloc] init] autorelease];
+ [alert setMessageText:@"Error!"];
+ [alert addButtonWithTitle:@"OK"];
+ [alert setInformativeText:[[[NSString alloc]
+ initWithCString:GNUNET_GE_memory_get(ectxMemory, 0)
+ encoding:NSUTF8StringEncoding] autorelease]];
+ [alert setAlertStyle:NSWarningAlertStyle];
+ [alert beginSheetModalForWindow:[(NSControl *)control window]
+ modalDelegate:self
+ didEndSelector:@selector(alertDidEnd:returnCode:
+ contextInfo:)
+ contextInfo:control];
+ }
+ GNUNET_GE_memory_free(ectxMemory);
+
+ return (ret != 0 ? NO : YES);
+}
+
+- (BOOL)preauthorize
+{
+ AuthorizationFlags authFlags = kAuthorizationFlagDefaults;
+ OSStatus status;
+
+ if (isPreauthorized == YES)
+ return YES;
+
+ status = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment,
+ authFlags, &authRef);
+ if (status != errAuthorizationSuccess)
+ return NO;
+
+ AuthorizationItem authItems = { kAuthorizationRightExecute, 0, NULL, 0};
+ AuthorizationRights authRights = {1, &authItems};
+
+ authFlags = kAuthorizationFlagDefaults |
+ kAuthorizationFlagInteractionAllowed |
+ kAuthorizationFlagPreAuthorize |
+ kAuthorizationFlagExtendRights;
+ status = AuthorizationCopyRights(authRef, &authRights, NULL,
+ authFlags, NULL);
+
+ if (status != errAuthorizationSuccess) {
+ AuthorizationFree(authRef, kAuthorizationFlagDefaults);
+ return NO;
+ }
+
+ isPreauthorized = YES;
+
+ [[NSNotificationCenter defaultCenter]
+ postNotificationName:@"GNAuthorizationChanged" object:self];
+
+ return YES;
+}
+
+- (BOOL)isAuthorized
+{
+ return isPreauthorized;
+}
+
+- (int)saveConfig
+{
+ BOOL didSave;
+
+ didSave = NO;
+ if (isPreauthorized) {
+ if ([self privilegedSaveConfig] == 0)
+ didSave = YES;
+ }
+ else {
+ if (GNUNET_GC_write_configuration (config, configFilename) == 0)
+ didSave = YES;
+ }
+
+ return didSave == YES ? 0 : 1;
+}
+
+- (int)privilegedSaveConfig
+{
+ OSStatus status;
+ AuthorizationFlags authFlags = kAuthorizationFlagDefaults;
+ NSString *toolPath;
+ char *toolArgs[] = { "writeConfig", configFilename, NULL };
+ FILE *ioPipe = NULL;
+ NSBundle *toolBundle;
+ int ret;
+
+ toolBundle = [NSBundle bundleWithIdentifier:@"org.gnunet.GNUnet"];
+ toolPath = [[toolBundle resourcePath]
+ stringByAppendingPathComponent:@"gnunet-macosx-tool"];
+ if (toolPath == nil)
+ return -1;
+
+ authFlags = kAuthorizationFlagDefaults;
+ status = AuthorizationExecuteWithPrivileges(authRef,
+ [toolPath UTF8String], authFlags, toolArgs, &ioPipe);
+ ret = -1;
+ if (status == errAuthorizationSuccess) {
+ NSEnumerator *e = [gnsOptionsArray objectEnumerator];
+ id o;
+
+ while (o = [e nextObject]) {
+ char *section, *option, *value;
+
+ section = strdup([(NSString *)o UTF8String]);
+ option = section;
+ while (*option != '\0' && *option != ':')
+ option++;
+ if (option == '\0') {
+ free(section);
+ continue;
+ }
+ option[0] = '\0';
+ option++;
+
+ ret = GNUNET_GC_get_configuration_value_string(config,
+ section, option, NULL, &value);
+ if (ret != GNUNET_SYSERR) {
+ output_string(ioPipe, section);
+ output_string(ioPipe, option);
+ output_string(ioPipe, value);
+ GNUNET_free(value);
+ }
+ free(section);
+ }
+ output_string(ioPipe, NULL);
+
+ do {
+ char *value;
+ value = input_string(ioPipe);
+ if (value != NULL && strcmp(value, "OK") == 0)
+ ret = 0;
+ } while (!feof(ioPipe));
+
+ fclose(ioPipe);
+ }
+
+ return ret;
+}
+
+- (int)createUserGroup
+{
+ OSStatus status;
+ AuthorizationFlags authFlags = kAuthorizationFlagDefaults;
+ NSString *toolPath;
+ char *toolArgs[4];
+ FILE *ioPipe = NULL;
+ NSBundle *toolBundle;
+ char *username, *groupname;
+ int ret;
+
+ toolBundle = [NSBundle bundleWithIdentifier:@"org.gnunet.GNUnet"];
+ toolPath = [[toolBundle resourcePath]
+ stringByAppendingPathComponent:@"gnunet-macosx-tool"];
+ if (toolPath == nil)
+ return -1;
+
+ username = groupname = NULL;
+ GNUNET_GC_get_configuration_value_string (config,
+ "GNUNETD", "USER", "gnunet", &username);
+ GNUNET_GC_get_configuration_value_string (config,
+ "GNUNETD", "GROUP", "gnunet", &groupname);
+
+ if (username == NULL || groupname == NULL)
+ return -1;
+ if (strlen(username) == 0)
+ return -1;
+
+ toolArgs[0] = "createUserGroup";
+ toolArgs[1] = username;
+ toolArgs[2] = groupname;
+ toolArgs[3] = NULL;
+ authFlags = kAuthorizationFlagDefaults;
+ status = AuthorizationExecuteWithPrivileges(authRef,
+ [toolPath UTF8String], authFlags, toolArgs, &ioPipe);
+ ret = -1;
+ if (status == errAuthorizationSuccess) {
+ do {
+ char *value;
+ value = input_string(ioPipe);
+ if (value != NULL && strcmp(value, "OK") == 0)
+ ret = 0;
+ } while (!feof(ioPipe));
+
+ fclose(ioPipe);
+ }
+
+ GNUNET_free(username);
+ GNUNET_free(groupname);
+
+ return ret;
+}
+
+- (int)setupAutostart
+{
+ OSStatus status;
+ AuthorizationFlags authFlags = kAuthorizationFlagDefaults;
+ NSString *toolPath;
+ char *toolArgs[5];
+ FILE *ioPipe = NULL;
+ NSBundle *toolBundle;
+ char *username, *groupname;
+ int doAutostart;
+ int ret;
+
+ toolBundle = [NSBundle bundleWithIdentifier:@"org.gnunet.GNUnet"];
+ toolPath = [[toolBundle resourcePath]
+ stringByAppendingPathComponent:@"gnunet-macosx-tool"];
+ if (toolPath == nil)
+ return -1;
+
+ username = groupname = NULL;
+ GNUNET_GC_get_configuration_value_string (config,
+ "GNUNETD", "USER", "gnunet", &username);
+ GNUNET_GC_get_configuration_value_string (config,
+ "GNUNETD", "GROUP", "gnunet", &groupname);
+ if (GNUNET_GC_get_configuration_value_yesno(config,
+ "GNUNETD", "AUTOSTART", GNUNET_NO) == GNUNET_YES)
+ doAutostart = 1;
+ else
+ doAutostart = 0;
+
+ if (username == NULL || groupname == NULL)
+ return -1;
+ if (strlen(username) == 0)
+ return -1;
+
+ toolArgs[0] = "setupAutostart";
+ toolArgs[1] = doAutostart == 1 ? "1" : "0";
+ toolArgs[2] = username;
+ toolArgs[3] = groupname;
+ toolArgs[4] = NULL;
+ authFlags = kAuthorizationFlagDefaults;
+ status = AuthorizationExecuteWithPrivileges(authRef,
+ [toolPath UTF8String], authFlags, toolArgs, &ioPipe);
+ ret = -1;
+ if (status == errAuthorizationSuccess) {
+ do {
+ char *value;
+ value = input_string(ioPipe);
+ if (value != NULL && strcmp(value, "OK") == 0)
+ ret = 0;
+ } while (!feof(ioPipe));
+
+ fclose(ioPipe);
+ }
+
+ GNUNET_free(username);
+ GNUNET_free(groupname);
+
+ return ret;
+}
+
+- (void) finishSetup
+{
+ if ([self saveConfig] != 0)
+ [self displayErrorAlert:@"Error saving configuration!"];
+ else if ([self createUserGroup] != 0)
+ [self displayErrorAlert:@"Error creating user/group account!"];
+ else if ([self setupAutostart] != 0)
+ [self displayErrorAlert:@"Error setting up launchd
configuration!"];
+ else
+ [NSApp terminate:self];
+}
+
+- (void) nextPage
+{
+ [tabView selectNextTabViewItem:self];
+}
+
+- (void) previousPage
+{
+ [tabView selectPreviousTabViewItem:self];
+}
+
+- (void)displayErrorAlert:(NSString *)message
+{
+ NSAlert *alert = [[[NSAlert alloc] init] autorelease];
+ [alert setMessageText:message];
+ [alert addButtonWithTitle:@"OK"];
+ [alert setAlertStyle:NSCriticalAlertStyle];
+ [alert beginSheetModalForWindow:window
+ modalDelegate:self
+ didEndSelector:@selector(alertDidEnd:
+ returnCode:
+ contextInfo:)
+ contextInfo:nil];
+}
+
+- (void) alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode
contextInfo:(void *)contextInfo
+{
+ [NSApp terminate:self];
+}
+
+- (void)windowWillClose:(NSNotification *)notification
+{
+ [NSApp terminate:self];
+}
+
+- (void) applicationWillTerminate:(NSNotification *)notification
+{
+ if (gnsOptionsArray != nil)
+ [gnsOptionsArray release];
+ if (gnsContext)
+ GNUNET_GNS_free_specification(gnsContext);
+ GNUNET_GC_free(config);
+ GNUNET_GE_free_context(errorContext);
+}
+
+- (void)getDefaultsFrom:(struct GNUNET_GNS_TreeNode *)pos
+ optionsTo:(NSMutableArray *)optionsArray
+{
+ struct GNUNET_GNS_TreeNode *child;
+ char *val;
+ char *s;
+ int i;
+
+ if (pos == NULL)
+ return;
+
+ i = 0;
+ while ((child = pos->children[i]) != NULL) {
+ switch (child->type & GNUNET_GNS_KIND_MASK) {
+ case GNUNET_GNS_KIND_NODE:
+ [self getDefaultsFrom:child
+ optionsTo:optionsArray];
+ break;
+ case GNUNET_GNS_KIND_LEAF:
+ if ((child->section == NULL) ||
+ (child->option == NULL))
+ break;
+ s = GNUNET_malloc(strlen(child->section) + 1 +
+ strlen(child->option)+1);
+ strcpy(s, child->section);
+ strcat(s, ":");
+ strcat(s, child->option);
+ [optionsArray addObject:[[NSString alloc]
+ initWithUTF8String:s]];
+ GNUNET_free(s);
+
+ if (GNUNET_NO ==
+ GNUNET_GC_have_configuration_value
+ (config, child->section, child->option))
+ {
+ val =
GNUNET_GNS_get_default_value_as_string(child->type, &child->value);
+ if (val != NULL) {
+
GNUNET_GC_set_configuration_value_string (config, errorContext, child->section,
child->option, val);
+ GNUNET_free (val);
+ }
+ }
+ break;
+ default:
+ NSLog(@"unknown GNS tree node\n");
+ break;
+ }
+ i++;
+ }
+}
+
address@hidden
Added: gnunet-cocoa/GNUnet Setup Assistant/GNUnet Setup
Assistant.xcodeproj/project.pbxproj
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNUnet Setup
Assistant.xcodeproj/project.pbxproj (rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNUnet Setup
Assistant.xcodeproj/project.pbxproj 2009-04-08 15:29:54 UTC (rev 8399)
@@ -0,0 +1,317 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 42;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 8923FE290F3D6947003D9A76 /* GNUnet.framework in Frameworks */ =
{isa = PBXBuildFile; fileRef = 8923FE280F3D6946003D9A76 /* GNUnet.framework */;
};
+ 892A59830F70CABB00D216B1 /* Security.framework in Frameworks */
= {isa = PBXBuildFile; fileRef = 892A59820F70CABB00D216B1 /* Security.framework
*/; };
+ 894B87FD0F4F093600D26F3B /* GNLoadLimitPage.m in Sources */ =
{isa = PBXBuildFile; fileRef = 894B87FC0F4F093600D26F3B /* GNLoadLimitPage.m
*/; };
+ 894B88DC0F50694F00D26F3B /* GNServiceAccountPage.m in Sources
*/ = {isa = PBXBuildFile; fileRef = 894B88DB0F50694F00D26F3B /*
GNServiceAccountPage.m */; };
+ 894B89240F50746500D26F3B /* GNDatastorePage.m in Sources */ =
{isa = PBXBuildFile; fileRef = 894B89230F50746500D26F3B /* GNDatastorePage.m
*/; };
+ 894B895F0F507C3E00D26F3B /* GNFinishPage.m in Sources */ = {isa
= PBXBuildFile; fileRef = 894B895E0F507C3E00D26F3B /* GNFinishPage.m */; };
+ 897412130F3F5EC700854AC2 /* GNWelcomePage.m in Sources */ =
{isa = PBXBuildFile; fileRef = 897412120F3F5EC700854AC2 /* GNWelcomePage.m */;
};
+ 897412170F3F5F2400854AC2 /* GNNetworkConnectionPage.m in
Sources */ = {isa = PBXBuildFile; fileRef = 897412160F3F5F2400854AC2 /*
GNNetworkConnectionPage.m */; };
+ 89ADE16F0F40A40A0060A4FB /* GNSetupAssistant.m in Sources */ =
{isa = PBXBuildFile; fileRef = 89ADE16E0F40A40A0060A4FB /* GNSetupAssistant.m
*/; };
+ 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa
= PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ =
{isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings
*/; };
+ 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa =
PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings =
{ATTRIBUTES = (); }; };
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ =
{isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */;
};
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 089C165DFE840E0CC02AAC07 /* English */ = {isa =
PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings;
name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>";
};
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree
= "<absolute>"; };
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
CoreData.framework; path = /System/Library/Frameworks/CoreData.framework;
sourceTree = "<absolute>"; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= main.m; sourceTree = "<group>"; };
+ 29B97319FDCFA39411CA2CEA /* English */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path =
English.lproj/MainMenu.nib; sourceTree = "<group>"; };
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
AppKit.framework; path = /System/Library/Frameworks/AppKit.framework;
sourceTree = "<absolute>"; };
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
Foundation.framework; path = /System/Library/Frameworks/Foundation.framework;
sourceTree = "<absolute>"; };
+ 8923FE280F3D6946003D9A76 /* GNUnet.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
GNUnet.framework; path = /Library/Frameworks/GNUnet.framework; sourceTree =
"<absolute>"; };
+ 892A59820F70CABB00D216B1 /* Security.framework */ = {isa =
PBXFileReference; lastKnownFileType = wrapper.framework; name =
Security.framework; path = /System/Library/Frameworks/Security.framework;
sourceTree = "<absolute>"; };
+ 894B87FB0F4F093600D26F3B /* GNLoadLimitPage.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
GNLoadLimitPage.h; sourceTree = "<group>"; };
+ 894B87FC0F4F093600D26F3B /* GNLoadLimitPage.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= GNLoadLimitPage.m; sourceTree = "<group>"; };
+ 894B88DA0F50694F00D26F3B /* GNServiceAccountPage.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
GNServiceAccountPage.h; sourceTree = "<group>"; };
+ 894B88DB0F50694F00D26F3B /* GNServiceAccountPage.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= GNServiceAccountPage.m; sourceTree = "<group>"; };
+ 894B89220F50746500D26F3B /* GNDatastorePage.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
GNDatastorePage.h; sourceTree = "<group>"; };
+ 894B89230F50746500D26F3B /* GNDatastorePage.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= GNDatastorePage.m; sourceTree = "<group>"; };
+ 894B895D0F507C3E00D26F3B /* GNFinishPage.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
GNFinishPage.h; sourceTree = "<group>"; };
+ 894B895E0F507C3E00D26F3B /* GNFinishPage.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= GNFinishPage.m; sourceTree = "<group>"; };
+ 897412110F3F5EC700854AC2 /* GNWelcomePage.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
GNWelcomePage.h; sourceTree = "<group>"; };
+ 897412120F3F5EC700854AC2 /* GNWelcomePage.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= GNWelcomePage.m; sourceTree = "<group>"; };
+ 897412150F3F5F2400854AC2 /* GNNetworkConnectionPage.h */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path
= GNNetworkConnectionPage.h; sourceTree = "<group>"; };
+ 897412160F3F5F2400854AC2 /* GNNetworkConnectionPage.m */ = {isa
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc;
path = GNNetworkConnectionPage.m; sourceTree = "<group>"; };
+ 89ADE16D0F40A40A0060A4FB /* GNSetupAssistant.h */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path =
GNSetupAssistant.h; sourceTree = "<group>"; };
+ 89ADE16E0F40A40A0060A4FB /* GNSetupAssistant.m */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path
= GNSetupAssistant.m; sourceTree = "<group>"; };
+ 8D1107310486CEB800E47090 /* Info.plist */ = {isa =
PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path =
Info.plist; sourceTree = "<group>"; };
+ 8D1107320486CEB800E47090 /* GNUnet Setup Assistant.app */ =
{isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex
= 0; path = "GNUnet Setup Assistant.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8D11072E0486CEB800E47090 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in
Frameworks */,
+ 8923FE290F3D6947003D9A76 /* GNUnet.framework in
Frameworks */,
+ 892A59830F70CABB00D216B1 /* Security.framework
in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 894B87FB0F4F093600D26F3B /* GNLoadLimitPage.h
*/,
+ 894B87FC0F4F093600D26F3B /* GNLoadLimitPage.m
*/,
+ 897412110F3F5EC700854AC2 /* GNWelcomePage.h */,
+ 897412120F3F5EC700854AC2 /* GNWelcomePage.m */,
+ 897412150F3F5F2400854AC2 /*
GNNetworkConnectionPage.h */,
+ 897412160F3F5F2400854AC2 /*
GNNetworkConnectionPage.m */,
+ 89ADE16D0F40A40A0060A4FB /* GNSetupAssistant.h
*/,
+ 89ADE16E0F40A40A0060A4FB /* GNSetupAssistant.m
*/,
+ 894B88DA0F50694F00D26F3B /*
GNServiceAccountPage.h */,
+ 894B88DB0F50694F00D26F3B /*
GNServiceAccountPage.m */,
+ 894B89220F50746500D26F3B /* GNDatastorePage.h
*/,
+ 894B89230F50746500D26F3B /* GNDatastorePage.m
*/,
+ 894B895D0F507C3E00D26F3B /* GNFinishPage.h */,
+ 894B895E0F507C3E00D26F3B /* GNFinishPage.m */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 892A59820F70CABB00D216B1 /* Security.framework
*/,
+ 8923FE280F3D6946003D9A76 /* GNUnet.framework */,
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "<group>";
+ };
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework
*/,
+ 29B97325FDCFA39411CA2CEA /*
Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D1107320486CEB800E47090 /* GNUnet Setup
Assistant.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* GNUnet Setup Assistant */ = {
+ isa = PBXGroup;
+ children = (
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = "GNUnet Setup Assistant";
+ sourceTree = "<group>";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 8D1107310486CEB800E47090 /* Info.plist */,
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings
*/,
+ 29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks
*/,
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8D1107260486CEB800E47090 /* GNUnet Setup Assistant */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C01FCF4A08A954540054247B /*
Build configuration list for PBXNativeTarget "GNUnet Setup Assistant" */;
+ buildPhases = (
+ 8D1107290486CEB800E47090 /* Resources */,
+ 8D11072C0486CEB800E47090 /* Sources */,
+ 8D11072E0486CEB800E47090 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "GNUnet Setup Assistant";
+ productInstallPath = "$(HOME)/Applications";
+ productName = "GNUnet Setup Assistant";
+ productReference = 8D1107320486CEB800E47090 /* GNUnet
Setup Assistant.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /*
Build configuration list for PBXProject "GNUnet Setup Assistant" */;
+ hasScannedForEncodings = 1;
+ mainGroup = 29B97314FDCFA39411CA2CEA /* GNUnet Setup
Assistant */;
+ projectDirPath = "";
+ targets = (
+ 8D1107260486CEB800E47090 /* GNUnet Setup
Assistant */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D1107290486CEB800E47090 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072A0486CEB800E47090 /* MainMenu.nib in
Resources */,
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings
in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8D11072C0486CEB800E47090 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072D0486CEB800E47090 /* main.m in Sources
*/,
+ 897412130F3F5EC700854AC2 /* GNWelcomePage.m in
Sources */,
+ 897412170F3F5F2400854AC2 /*
GNNetworkConnectionPage.m in Sources */,
+ 89ADE16F0F40A40A0060A4FB /* GNSetupAssistant.m
in Sources */,
+ 894B87FD0F4F093600D26F3B /* GNLoadLimitPage.m
in Sources */,
+ 894B88DC0F50694F00D26F3B /*
GNServiceAccountPage.m in Sources */,
+ 894B89240F50746500D26F3B /* GNDatastorePage.m
in Sources */,
+ 894B895F0F507C3E00D26F3B /* GNFinishPage.m in
Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C165DFE840E0CC02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 29B97319FDCFA39411CA2CEA /* English */,
+ );
+ name = MainMenu.nib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ C01FCF4B08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = "GNUnet Setup Assistant";
+ WRAPPER_EXTENSION = app;
+ ZERO_LINK = YES;
+ };
+ name = Debug;
+ };
+ C01FCF4C08A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G5;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ PRODUCT_NAME = "GNUnet Setup Assistant";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ C01FCF4A08A954540054247B /* Build configuration list for
PBXNativeTarget "GNUnet Setup Assistant" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4B08A954540054247B /* Debug */,
+ C01FCF4C08A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for
PBXProject "GNUnet Setup Assistant" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
Added: gnunet-cocoa/GNUnet Setup Assistant/GNUnetSetupAssistant-icon.icns
===================================================================
(Binary files differ)
Property changes on: gnunet-cocoa/GNUnet Setup
Assistant/GNUnetSetupAssistant-icon.icns
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: gnunet-cocoa/GNUnet Setup Assistant/GNWelcomePage.h
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNWelcomePage.h
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNWelcomePage.h 2009-04-08 15:29:54 UTC
(rev 8399)
@@ -0,0 +1,23 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#import <Cocoa/Cocoa.h>
+#import "GNSetupAssistant.h"
+
address@hidden GNWelcomePage : NSObject {
+ IBOutlet GNSetupAssistant *assistant;
+ IBOutlet NSTextView *messageView;
+ IBOutlet NSButton *backButton;
+}
+
+- (void) awakeFromNib;
+- (IBAction) backAction:(id)sender;
+- (IBAction) continueAction:(id)sender;
address@hidden
Added: gnunet-cocoa/GNUnet Setup Assistant/GNWelcomePage.m
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/GNWelcomePage.m
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/GNWelcomePage.m 2009-04-08 15:29:54 UTC
(rev 8399)
@@ -0,0 +1,30 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#import "GNWelcomePage.h"
+
address@hidden GNWelcomePage
+- (void)awakeFromNib
+{
+ [messageView setDrawsBackground:NO];
+ [[messageView enclosingScrollView] setDrawsBackground:NO];
+ [backButton setEnabled:NO];
+}
+
+- (IBAction)backAction:(id)sender
+{
+}
+
+- (IBAction)continueAction:(id)sender
+{
+ [assistant preauthorize];
+ [assistant nextPage];
+}
address@hidden
Added: gnunet-cocoa/GNUnet Setup Assistant/Info.plist
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/Info.plist
(rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/Info.plist 2009-04-08 15:29:54 UTC
(rev 8399)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string>GNUnetSetupAssistant-icon</string>
+ <key>CFBundleIdentifier</key>
+ <string>org.gnunet.GNUnetSetupAssistant</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleShortVersionString</key>
+ <string>0.8.0</string>
+ <key>CFBundleVersion</key>
+ <string>0.8.0c</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
Added: gnunet-cocoa/GNUnet Setup Assistant/main.m
===================================================================
--- gnunet-cocoa/GNUnet Setup Assistant/main.m (rev 0)
+++ gnunet-cocoa/GNUnet Setup Assistant/main.m 2009-04-08 15:29:54 UTC (rev
8399)
@@ -0,0 +1,16 @@
+/*
+ * GNUnet Setup (Cocoa UI)
+ * Copyright (C) 2009 Heikki Lindholm <address@hidden>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#import <Cocoa/Cocoa.h>
+
+int main(int argc, char *argv[])
+{
+ return NSApplicationMain(argc, (const char **) argv);
+}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8399 - in gnunet-cocoa: . GNUnet Setup Assistant GNUnet Setup Assistant/English.lproj GNUnet Setup Assistant/English.lproj/MainMenu.nib GNUnet Setup Assistant/GNUnet Setup Assistant.xcodeproj,
gnunet <=