Initial revision

This commit is contained in:
gyboth 2004-12-23 12:58:39 +00:00
parent e63982b0ef
commit 7114381bfb
174 changed files with 54139 additions and 0 deletions

21
AUTHORS Normal file
View File

@ -0,0 +1,21 @@
Bygfoot Football Manager
AUTHORS: Gyozo Both (gyboth@bygfoot.com),
Arnaud Le Rouzic (arnaudus@bygfoot.com)
http://www.bygfoot.com
Homepage designer:
Jose Geraldo Gouvea (Brazil)
Country file contributors:
- England: Tom Chance
- Romania: Cristian Spoiala
- Brazil: Jose Geraldo Gouvea
- Poland: Michal Rudolf
- Mexico: Arturo Mendez
- Italy: Marco Fabbri
Debian maintainer:
Isaac Clerencia (Spain)
FreeBSD port:
Pav Lucistnik (Czech Republic)

340
COPYING Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Library 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Library General
Public License instead of this License.

265
ChangeLog Normal file
View File

@ -0,0 +1,265 @@
10/10/2004: v1.7.3
- introduced Arnaud Le Rouzic's XML load/save system (thanks,
Arnaud!)
- added possibility to compress savegames
- improved the options window (tabs make it more orderly now)
- added second player list (also with tabs)
- complete Bygfoot packages can be downloaded with the update
script now
09/30/2004: v1.7.2
- added country file for Mexico (thanks to Arturo Mendez)
- improved the update script
- added a simple gui for the script
- added updated country file for Italy (thanks to Marco Fabbri)
- fixed a bug that led to no ticket income for cup games
- fixed a bug that occurred when you made a stadium enlargement
over several weeks
- replaced official team names with city names because of
trademark issues (the official names can be downloaded from
http://www.bygfoot.com)
- removed official player names because of the same reason (you
can still download them from the homepage)
09/30/2004: v1.6.2
- improved the update script
- added updated country file for Italy (thanks to Marco Fabbri)
- fixed a bug that led to no ticket income for cup games
- fixed a bug that occurred when you made a stadium enlargement
over several weeks
- replaced official team names with city names because of
trademark issues (the official names can be downloaded from
http://www.bygfoot.com)
- removed official player names because of the same reason (you
can still download them from the homepage)
09/09/2004: v1.6.1 + 1.7.1
- corrected a bug that caused the game to hang if live games were
switched on and there were no games to play
- added an online update script for the source package
('bygfoot-update')
09/05/2004: v1.7.0
- added injuries and cards display for opponent teams in the match
summary
- clicking on a team name in the tables shows the team's player list
- clicking on a fixture shows the player list of one of the teams,
depending on the mouse button you use
- job offers show a lot more information on the team offering the
job
- a player can suffer an injury that forces him to retire
- added own goals and penalties in regulation and extra time
- added reasons why a player was banned (thanks to Tom Chance for
the correct football expressions)
- added player and some more team awards (with prize money) at the
end of a season
09/05/2004: v1.6.0
- added possibility to have messages shown instead of popups
when possible
- added extended stadium capacity enlargement possibilities
- added possibility to fire a player
- added 'Player actions' button
- changed the current skill and fitness display a bit: current
skill is now the skill that's really used when computing games
(except for the home advantage factor); fitness can be 100% now
and is shown in different colors (thanks to arnaudus)
- corrected a minor display bug (you could see the updated rank in
the main window when playing two live games already after the
first one)
- added uninstall possibility for the src version
- added manpage
- added a configuration file:
$HOME/.bygfoot/text_files/bygfoot.conf; this way, your favourite
settings get loaded even if you start a new game
- added physician quality (like scout); better physician costs
more but players heal better on average
- healing time of players can be overestimated; until now it was
always underestimated (i.e. the player was injured _at least_ as
long as the expected recovery time)
- corrected a save/load bug that occurred when you saved a game
just before getting a new scout
NOTE: The 1.6 branch is not savegame-compatible to the 1.4.x
versions.
08/17/2004: v1.5.2
- added possibility to have messages shown instead of popups
when possible
- added extended stadium capacity enlargement possibilities
- added possibility to fire a player
- added 'Player actions' button
- changed the current skill and fitness display a bit: current
skill is now the skill that's really used when computing games
(except for the home advantage factor); fitness can be 100% now
and is shown in different colors (thanks to arnaudus)
- corrected a minor display bug (you could see the updated rank in
the main window when playing two live games already after the
first one)
08/17/2004: v1.4.3
- corrected the '1-2'-bug: you couldn't enter these two digits
into fields like the structure field because they were used as
keyboard shortcuts for browsing forward and back. browsing's done
with 'q' and 'w' now, and 'q' quits the game only when the browse
buttons aren't shown (e.g. in main menu mode)
- corrected some minor transfer list bugs (there seem to be
infinitely many of these :-( )
- fixed a bug that occurred when cup matches that ended drawn were
shown
- corrected a sorting bug (occurred when computing the tables)
07/12/2004: v1.4.2, v1.5.1
- corrected the transfer list bug
07/10/2004: v1.5.0
- added uninstall possibility for the src version
- added manpage
- added a configuration file:
$HOME/.bygfoot/text_files/bygfoot.conf; this way, your favourite
settings get loaded even if you start a new game
- added physician quality (like scout); better physician costs
more but players heal better on average
- healing time of players can be overestimated; until now it was
always underestimated (i.e. the player was injured _at least_ as
long as the expected recovery time)
NOTE: This version is unfortunately once again not
savegame-compatible to 1.4.0. I'm terribly sorry.
07/10/2004: v1.4.1
- corrected the freeze bug that occurred when you had a
$HOME/.bygfoot directory from an older Bygfoot version
- fixed bookmaker's tip bug (thanks to metoneca)
- changed that absurd 'physicist' to 'physio'
- reduced the damage a fire caused to your stadium
07/03/2004: v1.4.0
- added Michal Rudolf's country file for Poland
- added possibility to play in international cups only
(e.g. participate in Champions' League only, without playing
regular league games)
- you can see information on your next opponents in the right part
of the main window
- swapping two players automatically adapts team structure (but
you can switch this off, of course)
- as you can see: the version numbering has changed. no
alphas and omegas anymore!
- added export/import features to the Editor; you can export
individual teams to files and import such files into your local
team definitions file
- extended the filter rules for transfer list notification
- added Autosave option
- fixed a non-technical bug: european team names didn't
change at the beginning of a new season
- fixed a scrolling bug that occurred in the live game window when
penalties were shot
- added average skill labels in the main window
- players are put onto the transfer list by right-clicking instead
of left-clicking; left-clicking always swaps players now
- converted player names to lowercase (which sounds easier than it
is in reality; utf8 seems to have disadvantages, too)
- the 'Rearrange Team' button automatically changes the team
structure to the appropriate value
- savegames located in the $HOME/.bygfoot/saves directory can be
loaded from the command line without full path names
- country files located in one of the support files directories
(e.g. $HOME/.bygfoot/text_files) can be loaded with '-f filename'
without full path names
- fixed a money bug: you can pay debts with your drawing
credit now
- introduced playing style for cpu-teams (they always played
balanced until now)
- added variable interest rates for your debts (the more you owe,
the lower the interest rate)
- added possibility to display fixtures of all leagues
NOTE: This version is unfortunately not compatible anymore to
saved games of previous versions.
06/10/2004: v1.3 beta
- corrected a horrible bug in the prize money function (thanks to
Ken Brush)
- added possibility to change team names with the Editor
- added Jose Geraldo Gouvea's country file for Brazil
- fixed some compiler warnings
- fixed a bug that made it impossible to load a custom country
file from the team selection window
05/24/2004: v1.3 alpha
- first version including the Bygfoot Team Editor
- you can edit complete teams and store them in a text file
- switched to UTF-8 encoding: all text files are encoded that way,
so that almost any special character (eg. in a team or player
name) can be displayed correctly
- added Cristian Spoiala's country file for Romania
- fixed a bug that made it possible that you got hired by your own
team
- fixed a bug that occured when displaying a game result
- created several new source files so that the code is distributed
better now
05/07/2004: v1.1 beta
- added possibility to change the name of your team
- added possibility to filter transfer notifications by age
- added prize money for teams finishing 1st - 3rd in the league
- fixed a bug that caused players to have empty name when loading
games from the command line
- fixed a bug that led to poor attendance in cup games
- added unselect feature in the player list
- really good players appear less often on the transfer list
- added drawing credit
04/16/2004: v1.1 alpha 'Eurofoot'
- added some European leagues to choose from; the game
structure stays the same, though
- accordingly, the player names aren't just English ones anymore but
international ones
- improved player generation phase concerning speed: the game
starts much quicker now
- improved 'new week' functions; the results come even quicker
- you can create an own 'localisation' by copying and editing one
of the 'team_names_XX' files, so that you have custom team names
and league/cup names
- added an 'Undo' button
NOTE: This version is unfortunately not compatible anymore to
saved games of previous versions. This is because of the new
player and team names.
04/07/2004: v1.0 final 'Quickfoot'
- connected the skill level of European teams to the average level
of the Premiership so that it doesn't become too easy to win the
European Cups after a couple of seasons
- worked a bit on speed issues; the game should start a bit faster
and calculate the results quicker, too
02/24/2004: v1.0 beta
- stadium values may be increased twice a week now
- added some buttons to give easier access to tables and fixtures
- added quick options in the main window
- changed most of the finance issues: the ticket income is higher,
but the difference between players with similar propertiers
(skill etc.) in different leagues is much smaller now
- UEFA Cup is now harder to win
- fixed a bug that led to the same number of goal chances in every
game regardless of the individual teams that played (this made
it very hard for even the best teams to win predictably against
weaker opponents)
- fixed a bug that allowed players to have a talent above 9.9
- fixed a bug that caused the game to reject some normal save
files
- fixed a bug that made it less probable to sell a player the
better the scout was
- fixed a bug that caused a player with expected recovery time 11
to get healthy within a week
02/14/2004: v1.0 alpha
- first graphical version using GTK+ 2
- new features: - live game
- playing style (attack/defend)
- buy players not on the transferlist
01/02/2002 v0.5 pre-alpha, alpha and beta
- text-based version full of pointers and containing an
untraceable segfault

208
Doxyfile Normal file
View File

@ -0,0 +1,208 @@
# Doxyfile 1.3.2
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = Bygfoot
PROJECT_NUMBER = 1.9.0
OUTPUT_DIRECTORY = ./doxygen
OUTPUT_LANGUAGE = English
USE_WINDOWS_ENCODING = NO
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
HIDE_FRIEND_COMPOUNDS = NO
HIDE_IN_BODY_DOCS = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
SHORT_NAMES = NO
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
INHERIT_DOCS = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
GENERATE_TODOLIST = NO
GENERATE_TESTLIST = NO
GENERATE_BUGLIST = NO
GENERATE_DEPRECATEDLIST= NO
ALIASES =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = /home/gy/progs/bygfoot/1.9/src/
FILE_PATTERNS = *c \
*h
RECURSIVE = NO
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT = man
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# configuration options related to the Perl module output
#---------------------------------------------------------------------------
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
CALL_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
MAX_DOT_GRAPH_DEPTH = 0
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
CGI_NAME = search.cgi
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH = /usr/local/bin/
EXT_DOC_PATHS =

266
INSTALL Normal file
View File

@ -0,0 +1,266 @@
Bygfoot Football Manager 1.9.0
AUTHOR: Gyozo Both (gyboth@bygfoot.com)
http://www.bygfoot.com
Further below you find the extensive description on how to use 'configure' and
'make' to build this package; for most users, however, the standard
three-step procedure
1. ./configure
2. make
3. (as root) make install
should work perfectly. The default install prefix is /usr/local;
you can override with './configure --prefix=your_prefix'.
I have also made the experience that giving 'configure' an
optimization flag 'configure CFLAGS=-O3' makes the binary smaller; it
should also make the game faster, but the difference is probably
not noticeable. '-Os' will make the executable even smaller.
If you'd like to remove the game, type 'make uninstall' (as root).
You'll need a more or less up-to-date system and some devel-packages
to be able to compile 'bygfoot':
- glib2
- gtk+2
- pango
- atk
- pkg-config
- freetype2.
If you don't have these, you should consider downloading one of the pre-compiled
versions (rpm, deb or simple bin).
#####################################################################
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the `--target=TYPE' option to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
will cause the specified gcc to be used as the C compiler (unless it is
overridden in the site shell script).
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

31
Makefile.am Normal file
View File

@ -0,0 +1,31 @@
## Process this file with automake to produce Makefile.in
AM_CFLAGS = -Wall
SUBDIRS = src po b-u
EXTRA_DIST = \
autogen.sh \
bygfoot.glade \
bygfoot.gladep
dist_man6_MANS = man/bygfoot.6
SUPPORT_DIRS = support_files support_files/text_files support_files/pixmaps
SUPPORT_FILES = support_files/text_files/help support_files/text_files/country_br support_files/text_files/country_de support_files/text_files/country_es support_files/text_files/country_fr support_files/text_files/country_hu support_files/text_files/country_it support_files/text_files/country_mx support_files/text_files/country_pl support_files/text_files/country_ro support_files/text_files/teams support_files/text_files/country_eng support_files/text_files/bygfoot.conf support_files/text_files/player_names support_files/pixmaps/flag_ro.png support_files/pixmaps/bygfoot_team_editor_icon.png support_files/pixmaps/bygfoot_icon.png support_files/pixmaps/flag_eng.png support_files/pixmaps/pay_loan.png support_files/pixmaps/inc_cap.png support_files/pixmaps/new_week.png support_files/pixmaps/preview.png support_files/pixmaps/get_loan.png support_files/pixmaps/transfers.png support_files/pixmaps/fire_player.png support_files/pixmaps/inc_saf.png support_files/pixmaps/football.png support_files/pixmaps/flag_br.png support_files/pixmaps/flag_de.png support_files/pixmaps/fin_stad.png support_files/pixmaps/flag_es.png support_files/pixmaps/flag_fr.png support_files/pixmaps/flag_hu.png support_files/pixmaps/flag_it.png support_files/pixmaps/flag_mx.png support_files/pixmaps/flag_pl.png
install-data-local:
@$(NORMAL_INSTALL)
for dir in $(SUPPORT_DIRS); do $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$$dir; done
for file in $(SUPPORT_FILES); do $(INSTALL_DATA) $$file $(DESTDIR)$(pkgdatadir)/$$file; done
dist-hook:
for dir in $(SUPPORT_DIRS); do mkdir $(distdir)/$$dir; done
for file in $(SUPPORT_FILES); do cp -p $$file $(distdir)/$$file; done
uninstall:
rm -rf $(DESTDIR)$(pkgdatadir)
rm -rf $(prefix)/bin/bygfoot*
rm -rf $(prefix)/man/man6/bygfoot.6
for dir in $(prefix)/share/locale/*; do rm -rf $$dir/LC_MESSAGES/bygfoot*; done

39
README Normal file
View File

@ -0,0 +1,39 @@
Bygfoot Football Manager VERSION
AUTHORS: Gyozo Both (gyboth@bygfoot.com),
Arnaud Le Rouzic (arnaudus@bygfoot.com)
http://www.bygfoot.com
DESCRIPTION
Bygfoot is a small and simple graphical football (a.k.a. soccer)
manager game featuring many international leagues and cups. You manage
a team from one such league: you form the team, buy and sell players,
get promoted or relegated and of course try to be successful.
INSTALLATION AND UPDATE
See INSTALL for instructions on how to install Bygfoot.
If you use the source package (bygfoot-X.Y.Z.tar.bz2), have a look at
UPDATE for instructions on how to keep your Bygfoot version up-to-date
without having to download new packages manually.
BUG REPORTS AND PRAISE
If you like the game and have suggestions on how to improve it (keep
in mind that the game is kept simple on purpose, so don't suggest
something like 'each player should have separate skill-values for
their right and left foot and you should add the colour of their eye,
too') or find bugs, write me to the above address or submit a report
on the website. You should describe the circumstances of the occurence
of the bug and whether you can reproduce it or not. If there's an
output, attaching it (unless it's a simple, hateful, embarrassing
segfault) might be helpful, too. If it's reproducible, it'd be very
helpful to attach a savegame.
Another way you can contribute to Bygfoot is to write a country file or edit
a team and send me the result. See the CUSTOMIZATION section in the Bygfoot
'Help' and the documentation at www.bygfoot.com.

39
README_CVS Normal file
View File

@ -0,0 +1,39 @@
Bygfoot Football Manager
AUTHOR: Gyozo Both (gyboth@bygfoot.com)
http://www.bygfoot.com
This file tries to tell you how to use the CVS bygfoot-unstable versions.
1. If you'd just like to compile and play the game, you have to run
'./autogen.sh' in order to create the build files. Afterwards you can
compile the package just like any other src package with make and make
install. You'll need the following packages (as far as I know):
- glib2
- gtk+2
- pango
- atk
- pkg-config
- freetype2.
2. If you'd like to change the source code, but not the *interface* source
files, you can do it without problems. Please send me patches if you've
implemented interesting new features or corrected a bug.
3. Here's the trickiest part. The Bygfoot interface files are generated by
Glade 2 from the *.glade files (which are in XML format). You can get it
from http://glade.gnome.org. If you'd like to change a part of the
interface, you have to:
a) find out in which of the *.glade files the things you want to change
are. For instance, if you'd like to change something in the options window,
you'd have to use bygfoot_options.glade (ignore the *.gladep files).
b) open the file with glade-2.
c) edit the interface (by clicking around wildly with your mouse).
d) save the changes and generate the *interface* files.
d) recompile.
I hope this works for you. If not, please contact me.

20
TODO Normal file
View File

@ -0,0 +1,20 @@
gyözö
working on: loading of countries, leagues and cups from xml files.
current tasks:
implement a function 'file_check_home_dir' in file.c that checks whether
the files and directories that should be in the user's home dir are there;
if not, they get created/copied.
list of dirs:
$HOME/.bygfoot
$HOME/.bygfoot/saves
$HOME/.bygfoot/definitions
$HOME/.bygfoot/names
list of files:
$HOME/.bygfoot/definitions/{any xml files found in the support_files/definitions directory}
$HOME/.bygfoot/names/{any files found in the support_files/names directory}
the function should get called in bygfoot_init in main.c.

41
UPDATE Normal file
View File

@ -0,0 +1,41 @@
Bygfoot Football Manager
AUTHOR: Gyozo Both (gyboth@bygfoot.com)
http://www.bygfoot.com
As of versions 1.6.1 and 1.7.1 there's an online update script called
'bygfoot-update' for the source package, located in the directory with
the configure script. In theory, users using the source package
shouldn't have to download new versions anymore, they can simply use
the update script to keep their version up-to-date.
Type bygfoot-update -h (or --help) to see the options the script
accepts.
You need an internet connection and the programs sed, tar, bzip2, wget
and patch to be able to use the script. If you have these, do the
following:
1. Connect to the internet.
2. Call 'bygfoot-update'.
3. Enter the directory of your source package (default is PWD).
4. Enter a temp directory you have read/write access to (default is
'/tmp').
Now the script tries to find out your revision number and package type
(stable/unstable) from the file 'revision_number' in the package
directory. Then it retrieves a list of available revision patches from
the Bygfoot homepage and asks you whether to apply those which are
new.
You can also use the script to download (or update) the official team names
and some edited teams (i.e. with real player names) which were removed from
the official packages since 1.7.2 and 1.6.2. To do so, call the script with
'bygfoot-update -c'.
There's a GUI frontend for the script. You can invoke it by calling Bygfoot
with the '-u' option or by clicking on 'File -> Start Bygfoot Online Update'
in the game.
I hope this will work well. The idea is great (isn't it?) but I don't
have a lot of experience with such things. If you find a bug, contact
me.

7
acconfig.h Normal file
View File

@ -0,0 +1,7 @@
#undef ENABLE_NLS
#undef HAVE_CATGETS
#undef HAVE_GETTEXT
#undef GETTEXT_PACKAGE
#undef HAVE_LC_MESSAGES
#undef HAVE_STPCPY
#undef HAVE_LIBSM

159
autogen.sh Executable file
View File

@ -0,0 +1,159 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
DIE=0
if [ -n "$GNOME2_DIR" ]; then
ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"
PATH="$GNOME2_DIR/bin:$PATH"
export PATH
export LD_LIBRARY_PATH
fi
(test -f $srcdir/configure.in) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level package directory"
exit 1
}
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && {
(intltoolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`intltool' installed."
echo "You can get it from:"
echo " ftp://ftp.gnome.org/pub/GNOME/"
DIE=1
}
}
(grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.in >/dev/null) && {
(xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`xml-i18n-toolize' installed."
echo "You can get it from:"
echo " ftp://ftp.gnome.org/pub/GNOME/"
DIE=1
}
}
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed."
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
}
(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null) && {
(grep "sed.*POTFILES" $srcdir/configure.in) > /dev/null || \
(glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`glib' installed."
echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
DIE=1
}
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`automake' installed."
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
DIE=1
NO_AUTOMAKE=yes
}
# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
echo "installed doesn't appear recent enough."
echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
echo
fi
case $CC in
xlc )
am_opt=--include-deps;;
esac
for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.in -print`
do
dr=`dirname $coin`
if test -f $dr/NO-AUTO-GEN; then
echo skipping $dr -- flagged as no auto-gen
else
echo processing $dr
( cd $dr
aclocalinclude="$ACLOCAL_FLAGS"
if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running glib-gettextize... Ignore non-fatal messages."
echo "no" | glib-gettextize --force --copy
echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi
if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
echo "Running intltoolize..."
intltoolize --copy --force --automake
fi
if grep "^AM_PROG_XML_I18N_TOOLS" configure.in >/dev/null; then
echo "Running xml-i18n-toolize..."
xml-i18n-toolize --copy --force --automake
fi
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
if test -z "$NO_LIBTOOLIZE" ; then
echo "Running libtoolize..."
libtoolize --force --copy
fi
fi
echo "Running aclocal $aclocalinclude ..."
aclocal $aclocalinclude
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
echo "Running autoheader..."
autoheader
fi
echo "Running automake --gnu $am_opt ..."
automake --add-missing --gnu $am_opt
echo "Running autoconf ..."
autoconf
)
fi
done
conf_flags="--enable-maintainer-mode"
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile. || exit 1
else
echo Skipping configure process.
fi

19
b-u/Makefile.am Normal file
View File

@ -0,0 +1,19 @@
## Process this file with automake to produce Makefile.in
AM_CFLAGS = -Wall
INCLUDES = \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
@PACKAGE_CFLAGS@
bin_PROGRAMS = bygfoot-update-gui
bin_SCRIPTS = bygfoot-update
bygfoot_update_gui_SOURCES = \
bu_main.c \
bu_support.c bu_support.h \
bu_interface.c bu_interface.h \
bu_callbacks.c bu_callbacks.h bu_functions.h \
bu_functions.c bu_functions.h bu_interface.h bu_support.h bu_callbacks.h
bygfoot_update_gui_LDADD = @PACKAGE_LIBS@ $(INTLLIBS)

98
b-u/bu_callbacks.c Normal file
View File

@ -0,0 +1,98 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
#include "bygfoot-update.h"
#include "bu_functions.h"
#include "bu_callbacks.h"
#include "bu_interface.h"
#include "bu_support.h"
void
on_button_packdir_fs_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *fs = create_fileselection();
gtk_widget_show(fs);
status = STATUS_FS_PACK;
}
void
on_button_tempdir_fs_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *fs = create_fileselection();
gtk_widget_show(fs);
status = STATUS_FS_TMP;
}
void
on_button_countrydir_fs_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *fs = create_fileselection();
gtk_widget_show(fs);
status = STATUS_FS_COUNTRY;
}
void
on_button_ok_clicked (GtkButton *button,
gpointer user_data)
{
callback_update();
}
void
on_button_fs_ok_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *fs = lookup_widget(GTK_WIDGET(button), "fileselection");
GtkWidget *entry = NULL;
if(status == STATUS_FS_PACK)
entry = lookup_widget(update_window, "entry_packdir");
else if(status == STATUS_FS_TMP)
entry = lookup_widget(update_window, "entry_tmpdir");
else if(status == STATUS_FS_COUNTRY)
entry = lookup_widget(update_window, "entry_countrydir");
gtk_entry_set_text(GTK_ENTRY(entry),
gtk_file_selection_get_filename(
GTK_FILE_SELECTION(fs)));
gtk_widget_destroy(fs);
status = STATUS_NORMAL;
}
void
on_button_fs_cancel_clicked (GtkButton *button,
gpointer user_data)
{
gtk_widget_destroy(lookup_widget(GTK_WIDGET(button), "fileselection"));
status = STATUS_NORMAL;
}
void
on_button_quit_clicked (GtkButton *button,
gpointer user_data)
{
gtk_widget_destroy(update_window);
gtk_main_quit();
}
void
on_button_version_clicked (GtkButton *button,
gpointer user_data)
{
update_download(TRUE);
}

34
b-u/bu_callbacks.h Normal file
View File

@ -0,0 +1,34 @@
#include <gtk/gtk.h>
void
on_button_packdir_fs_clicked (GtkButton *button,
gpointer user_data);
void
on_button_tempdir_fs_clicked (GtkButton *button,
gpointer user_data);
void
on_button_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_button_fs_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_button_fs_cancel_clicked (GtkButton *button,
gpointer user_data);
void
on_button_quit_clicked (GtkButton *button,
gpointer user_data);
void
on_button_countrydir_fs_clicked (GtkButton *button,
gpointer user_data);
void
on_button_version_clicked (GtkButton *button,
gpointer user_data);

133
b-u/bu_functions.c Normal file
View File

@ -0,0 +1,133 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
#include "bygfoot-update.h"
#include "bu_functions.h"
#include "bu_callbacks.h"
#include "bu_interface.h"
#include "bu_support.h"
#include <string.h>
void
print_message(gchar *text)
{
GtkWidget *textview =
lookup_widget(update_window, "textview");
GtkTextBuffer *textbuffer =
gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview));
GtkTextIter iter;
gchar *converted = g_locale_to_utf8(text, -1, NULL, NULL, NULL);
if(converted != NULL)
{
gtk_text_buffer_get_start_iter(textbuffer, &iter);
gtk_text_buffer_insert(textbuffer, &iter, "\n\n", -1);
gtk_text_buffer_get_start_iter(textbuffer, &iter);
gtk_text_buffer_insert(textbuffer, &iter, converted, -1);
g_free(converted);
}
}
void
update_download(gboolean get_version)
{
GtkWidget *optionmenu_format =
lookup_widget(update_window, "optionmenu_format");
GtkWidget *entry_tmpdir =
lookup_widget(update_window, "entry_tmpdir");
GtkWidget *optionmenu_type =
lookup_widget(update_window, "optionmenu_type");
gint exit;
gchar *output = NULL;
gchar type[SMALL], format[SMALL];
gchar *formats[5] = {"rpm", "bin", "src", "deb", "srpm"};
gchar swtch[SMALL];
if(gtk_option_menu_get_history(GTK_OPTION_MENU(optionmenu_type)) == 0)
strcpy(type, "stable");
else
strcpy(type, "unstable");
strcpy(format, formats[gtk_option_menu_get_history(GTK_OPTION_MENU(optionmenu_format))]);
if(get_version)
strcpy(swtch, "-V");
else
strcpy(swtch, "-n");
g_string_printf(command_line, "%s %s -t %s -T %s -f %s",
update_script->str, swtch, gtk_entry_get_text(GTK_ENTRY(entry_tmpdir)),
type, format);
if(!get_version)
return;
printf("comml +%s+\n", command_line->str);
g_spawn_command_line_sync(command_line->str, &output, NULL, &exit, NULL);
if(output != NULL)
{
print_message(output);
g_free(output);
}
}
void
update_src(void)
{
GtkWidget *entry_packdir =
lookup_widget(update_window, "entry_packdir");
GtkWidget *entry_tmpdir =
lookup_widget(update_window, "entry_tmpdir");
GtkWidget *checkbutton_recompile =
lookup_widget(update_window, "checkbutton_recompile");
gchar buf[SMALL];
sprintf(buf, "%s -p %s -t %s -a", update_script->str,
gtk_entry_get_text(GTK_ENTRY(entry_packdir)),
gtk_entry_get_text(GTK_ENTRY(entry_tmpdir)));
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton_recompile)))
strcat(buf, " -r");
else
strcat(buf, " -R");
g_string_printf(command_line, "%s", buf);
}
void
callback_update(void)
{
GtkWidget *entry_countrydir =
lookup_widget(update_window, "entry_countrydir");
GtkWidget *radiobutton_src =
lookup_widget(update_window, "radiobutton_src");
GtkWidget *radiobutton_country =
lookup_widget(update_window, "radiobutton_country");
gint exit;
gchar *output = NULL;
if(gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(radiobutton_src)))
update_src();
else if(gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(radiobutton_country)))
g_string_printf(command_line, "%s -c -C %s", update_script->str,
gtk_entry_get_text(GTK_ENTRY(entry_countrydir)));
else
update_download(FALSE);
printf("comml +%s+\n", command_line->str);
g_spawn_command_line_sync(command_line->str, &output, NULL, &exit, NULL);
if(output != NULL)
{
print_message(output);
g_free(output);
}
}

14
b-u/bu_functions.h Normal file
View File

@ -0,0 +1,14 @@
void
print_message(gchar *text);
void
callback_update(void);
void
update_src(void);
void
update_countries(void);
void
update_download(gboolean get_version);

576
b-u/bu_interface.c Normal file
View File

@ -0,0 +1,576 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include "bu_callbacks.h"
#include "bu_interface.h"
#include "bu_support.h"
#define GLADE_HOOKUP_OBJECT(component,widget,name) \
g_object_set_data_full (G_OBJECT (component), name, \
gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
g_object_set_data (G_OBJECT (component), name, widget)
GtkWidget*
create_update_window (void)
{
GtkWidget *update_window;
GtkWidget *vbox1;
GtkWidget *scrolledwindow1;
GtkWidget *textview;
GtkWidget *hseparator1;
GtkWidget *vbox2;
GtkWidget *hbox15;
GtkWidget *radiobutton_src;
GSList *radiobutton_src_group = NULL;
GtkWidget *checkbutton_recompile;
GtkWidget *hseparator4;
GtkWidget *hbox12;
GtkWidget *radiobutton_country;
GtkWidget *hseparator5;
GtkWidget *hbox16;
GtkWidget *radiobutton_download;
GtkWidget *button_version;
GtkWidget *alignment9;
GtkWidget *hbox17;
GtkWidget *image9;
GtkWidget *label14;
GtkWidget *vbox3;
GtkWidget *label12;
GtkWidget *optionmenu_type;
GtkWidget *menu1;
GtkWidget *stable1;
GtkWidget *unstable1;
GtkWidget *vbox4;
GtkWidget *label13;
GtkWidget *optionmenu_format;
GtkWidget *menu2;
GtkWidget *rpm1;
GtkWidget *binary1;
GtkWidget *source1;
GtkWidget *deb1;
GtkWidget *srpm1;
GtkWidget *hseparator3;
GtkWidget *label1;
GtkWidget *hbox2;
GtkWidget *entry_packdir;
GtkWidget *button_packdir_fs;
GtkWidget *alignment1;
GtkWidget *hbox5;
GtkWidget *image1;
GtkWidget *label3;
GtkWidget *label2;
GtkWidget *hbox3;
GtkWidget *entry_tmpdir;
GtkWidget *button_tempdir_fs;
GtkWidget *alignment3;
GtkWidget *hbox7;
GtkWidget *image3;
GtkWidget *label5;
GtkWidget *label11;
GtkWidget *hbox13;
GtkWidget *entry_countrydir;
GtkWidget *button_countrydir_fs;
GtkWidget *alignment8;
GtkWidget *hbox14;
GtkWidget *image8;
GtkWidget *label10;
GtkWidget *hseparator2;
GtkWidget *hbox4;
GtkWidget *button_ok;
GtkWidget *alignment4;
GtkWidget *hbox8;
GtkWidget *image4;
GtkWidget *label6;
GtkWidget *button_quit;
GtkWidget *alignment7;
GtkWidget *hbox11;
GtkWidget *image7;
GtkWidget *label9;
GtkAccelGroup *accel_group;
GtkTooltips *tooltips;
tooltips = gtk_tooltips_new ();
accel_group = gtk_accel_group_new ();
update_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (update_window), 5);
gtk_window_set_title (GTK_WINDOW (update_window), _("Bygfoot Online Update Frontend"));
gtk_window_set_position (GTK_WINDOW (update_window), GTK_WIN_POS_CENTER);
gtk_window_set_default_size (GTK_WINDOW (update_window), 400, 550);
vbox1 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox1);
gtk_container_add (GTK_CONTAINER (update_window), vbox1);
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (scrolledwindow1);
gtk_box_pack_start (GTK_BOX (vbox1), scrolledwindow1, TRUE, TRUE, 0);
textview = gtk_text_view_new ();
gtk_widget_show (textview);
gtk_container_add (GTK_CONTAINER (scrolledwindow1), textview);
gtk_container_set_border_width (GTK_CONTAINER (textview), 2);
gtk_text_view_set_editable (GTK_TEXT_VIEW (textview), FALSE);
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (textview), GTK_WRAP_WORD);
hseparator1 = gtk_hseparator_new ();
gtk_widget_show (hseparator1);
gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, FALSE, TRUE, 0);
gtk_widget_set_size_request (hseparator1, 1, 10);
vbox2 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox2);
gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, TRUE, 0);
hbox15 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox15);
gtk_box_pack_start (GTK_BOX (vbox2), hbox15, TRUE, TRUE, 0);
radiobutton_src = gtk_radio_button_new_with_mnemonic (NULL, _("Update source package"));
gtk_widget_show (radiobutton_src);
gtk_box_pack_start (GTK_BOX (hbox15), radiobutton_src, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, radiobutton_src, _("Update your Bygfoot source package using patches"), NULL);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_src), radiobutton_src_group);
radiobutton_src_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_src));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiobutton_src), TRUE);
checkbutton_recompile = gtk_check_button_new_with_mnemonic (_("Run './configure && make' after updating"));
gtk_widget_show (checkbutton_recompile);
gtk_box_pack_start (GTK_BOX (hbox15), checkbutton_recompile, FALSE, FALSE, 0);
hseparator4 = gtk_hseparator_new ();
gtk_widget_show (hseparator4);
gtk_box_pack_start (GTK_BOX (vbox2), hseparator4, FALSE, TRUE, 0);
gtk_widget_set_size_request (hseparator4, 1, 10);
hbox12 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox12);
gtk_box_pack_start (GTK_BOX (vbox2), hbox12, TRUE, TRUE, 0);
radiobutton_country = gtk_radio_button_new_with_mnemonic (NULL, _("Download team names"));
gtk_widget_show (radiobutton_country);
gtk_box_pack_start (GTK_BOX (hbox12), radiobutton_country, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, radiobutton_country, _("Download official team names (Real Madrid instead of R. Madrid etc.)"), NULL);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_country), radiobutton_src_group);
radiobutton_src_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_country));
hseparator5 = gtk_hseparator_new ();
gtk_widget_show (hseparator5);
gtk_box_pack_start (GTK_BOX (vbox2), hseparator5, FALSE, TRUE, 0);
gtk_widget_set_size_request (hseparator5, 1, 10);
hbox16 = gtk_hbox_new (FALSE, 4);
gtk_widget_show (hbox16);
gtk_box_pack_start (GTK_BOX (vbox2), hbox16, TRUE, TRUE, 0);
radiobutton_download = gtk_radio_button_new_with_mnemonic (NULL, _("DL complete package"));
gtk_widget_show (radiobutton_download);
gtk_box_pack_start (GTK_BOX (hbox16), radiobutton_download, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, radiobutton_download, _("Download a complete Bygfoot package from the website. The file will be stored in the temporary directory."), NULL);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_download), radiobutton_src_group);
radiobutton_src_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_download));
button_version = gtk_button_new ();
gtk_widget_show (button_version);
gtk_box_pack_start (GTK_BOX (hbox16), button_version, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, button_version, _("Fetch the version number of the package on the server. You won't want to download the package you already have, after all."), NULL);
alignment9 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment9);
gtk_container_add (GTK_CONTAINER (button_version), alignment9);
hbox17 = gtk_hbox_new (FALSE, 2);
gtk_widget_show (hbox17);
gtk_container_add (GTK_CONTAINER (alignment9), hbox17);
image9 = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_BUTTON);
gtk_widget_show (image9);
gtk_box_pack_start (GTK_BOX (hbox17), image9, FALSE, FALSE, 0);
label14 = gtk_label_new_with_mnemonic (_("Version"));
gtk_widget_show (label14);
gtk_box_pack_start (GTK_BOX (hbox17), label14, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label14), GTK_JUSTIFY_LEFT);
vbox3 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox3);
gtk_box_pack_start (GTK_BOX (hbox16), vbox3, TRUE, TRUE, 0);
label12 = gtk_label_new (_("Type"));
gtk_widget_show (label12);
gtk_box_pack_start (GTK_BOX (vbox3), label12, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label12), GTK_JUSTIFY_LEFT);
optionmenu_type = gtk_option_menu_new ();
gtk_widget_show (optionmenu_type);
gtk_box_pack_start (GTK_BOX (vbox3), optionmenu_type, FALSE, FALSE, 0);
menu1 = gtk_menu_new ();
stable1 = gtk_menu_item_new_with_mnemonic (_("Stable"));
gtk_widget_show (stable1);
gtk_container_add (GTK_CONTAINER (menu1), stable1);
unstable1 = gtk_menu_item_new_with_mnemonic (_("Unstable"));
gtk_widget_show (unstable1);
gtk_container_add (GTK_CONTAINER (menu1), unstable1);
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu_type), menu1);
vbox4 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox4);
gtk_box_pack_start (GTK_BOX (hbox16), vbox4, TRUE, TRUE, 0);
label13 = gtk_label_new (_("Format"));
gtk_widget_show (label13);
gtk_box_pack_start (GTK_BOX (vbox4), label13, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label13), GTK_JUSTIFY_LEFT);
optionmenu_format = gtk_option_menu_new ();
gtk_widget_show (optionmenu_format);
gtk_box_pack_start (GTK_BOX (vbox4), optionmenu_format, FALSE, FALSE, 0);
menu2 = gtk_menu_new ();
rpm1 = gtk_menu_item_new_with_mnemonic (_("Rpm"));
gtk_widget_show (rpm1);
gtk_container_add (GTK_CONTAINER (menu2), rpm1);
binary1 = gtk_menu_item_new_with_mnemonic (_("Binary"));
gtk_widget_show (binary1);
gtk_container_add (GTK_CONTAINER (menu2), binary1);
source1 = gtk_menu_item_new_with_mnemonic (_("Source"));
gtk_widget_show (source1);
gtk_container_add (GTK_CONTAINER (menu2), source1);
deb1 = gtk_menu_item_new_with_mnemonic (_("Deb"));
gtk_widget_show (deb1);
gtk_container_add (GTK_CONTAINER (menu2), deb1);
srpm1 = gtk_menu_item_new_with_mnemonic (_("Srpm"));
gtk_widget_show (srpm1);
gtk_container_add (GTK_CONTAINER (menu2), srpm1);
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu_format), menu2);
hseparator3 = gtk_hseparator_new ();
gtk_widget_show (hseparator3);
gtk_box_pack_start (GTK_BOX (vbox1), hseparator3, FALSE, TRUE, 0);
gtk_widget_set_size_request (hseparator3, 1, 10);
label1 = gtk_label_new (_("Your Bygfoot source package directory"));
gtk_widget_show (label1);
gtk_box_pack_start (GTK_BOX (vbox1), label1, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label1), GTK_JUSTIFY_LEFT);
gtk_misc_set_padding (GTK_MISC (label1), 0, 5);
hbox2 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox2);
gtk_box_pack_start (GTK_BOX (vbox1), hbox2, FALSE, FALSE, 0);
entry_packdir = gtk_entry_new ();
gtk_widget_show (entry_packdir);
gtk_box_pack_start (GTK_BOX (hbox2), entry_packdir, TRUE, TRUE, 0);
button_packdir_fs = gtk_button_new ();
gtk_widget_show (button_packdir_fs);
gtk_box_pack_start (GTK_BOX (hbox2), button_packdir_fs, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, button_packdir_fs, _("Select a directory"), NULL);
alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment1);
gtk_container_add (GTK_CONTAINER (button_packdir_fs), alignment1);
hbox5 = gtk_hbox_new (FALSE, 2);
gtk_widget_show (hbox5);
gtk_container_add (GTK_CONTAINER (alignment1), hbox5);
image1 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_BUTTON);
gtk_widget_show (image1);
gtk_box_pack_start (GTK_BOX (hbox5), image1, FALSE, FALSE, 0);
label3 = gtk_label_new_with_mnemonic (_("..."));
gtk_widget_show (label3);
gtk_box_pack_start (GTK_BOX (hbox5), label3, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label3), GTK_JUSTIFY_LEFT);
label2 = gtk_label_new (_("A temporary directory I can use (read/write)"));
gtk_widget_show (label2);
gtk_box_pack_start (GTK_BOX (vbox1), label2, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_LEFT);
gtk_misc_set_padding (GTK_MISC (label2), 0, 5);
hbox3 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox3);
gtk_box_pack_start (GTK_BOX (vbox1), hbox3, FALSE, FALSE, 0);
entry_tmpdir = gtk_entry_new ();
gtk_widget_show (entry_tmpdir);
gtk_box_pack_start (GTK_BOX (hbox3), entry_tmpdir, TRUE, TRUE, 0);
button_tempdir_fs = gtk_button_new ();
gtk_widget_show (button_tempdir_fs);
gtk_box_pack_start (GTK_BOX (hbox3), button_tempdir_fs, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, button_tempdir_fs, _("Select a directory"), NULL);
alignment3 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment3);
gtk_container_add (GTK_CONTAINER (button_tempdir_fs), alignment3);
hbox7 = gtk_hbox_new (FALSE, 2);
gtk_widget_show (hbox7);
gtk_container_add (GTK_CONTAINER (alignment3), hbox7);
image3 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_BUTTON);
gtk_widget_show (image3);
gtk_box_pack_start (GTK_BOX (hbox7), image3, FALSE, FALSE, 0);
label5 = gtk_label_new_with_mnemonic (_("..."));
gtk_widget_show (label5);
gtk_box_pack_start (GTK_BOX (hbox7), label5, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label5), GTK_JUSTIFY_LEFT);
label11 = gtk_label_new (_("Team names destination directory (default recommended)"));
gtk_widget_show (label11);
gtk_box_pack_start (GTK_BOX (vbox1), label11, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label11), GTK_JUSTIFY_LEFT);
gtk_misc_set_padding (GTK_MISC (label11), 0, 5);
hbox13 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox13);
gtk_box_pack_start (GTK_BOX (vbox1), hbox13, FALSE, TRUE, 0);
entry_countrydir = gtk_entry_new ();
gtk_widget_show (entry_countrydir);
gtk_box_pack_start (GTK_BOX (hbox13), entry_countrydir, TRUE, TRUE, 0);
button_countrydir_fs = gtk_button_new ();
gtk_widget_show (button_countrydir_fs);
gtk_box_pack_start (GTK_BOX (hbox13), button_countrydir_fs, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, button_countrydir_fs, _("Select a directory"), NULL);
alignment8 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment8);
gtk_container_add (GTK_CONTAINER (button_countrydir_fs), alignment8);
hbox14 = gtk_hbox_new (FALSE, 2);
gtk_widget_show (hbox14);
gtk_container_add (GTK_CONTAINER (alignment8), hbox14);
image8 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_BUTTON);
gtk_widget_show (image8);
gtk_box_pack_start (GTK_BOX (hbox14), image8, FALSE, FALSE, 0);
label10 = gtk_label_new_with_mnemonic (_("..."));
gtk_widget_show (label10);
gtk_box_pack_start (GTK_BOX (hbox14), label10, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label10), GTK_JUSTIFY_LEFT);
hseparator2 = gtk_hseparator_new ();
gtk_widget_show (hseparator2);
gtk_box_pack_start (GTK_BOX (vbox1), hseparator2, FALSE, TRUE, 0);
gtk_widget_set_size_request (hseparator2, 1, 10);
hbox4 = gtk_hbox_new (FALSE, 5);
gtk_widget_show (hbox4);
gtk_box_pack_start (GTK_BOX (vbox1), hbox4, FALSE, FALSE, 0);
button_ok = gtk_button_new ();
gtk_widget_show (button_ok);
gtk_box_pack_start (GTK_BOX (hbox4), button_ok, TRUE, TRUE, 0);
alignment4 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment4);
gtk_container_add (GTK_CONTAINER (button_ok), alignment4);
hbox8 = gtk_hbox_new (FALSE, 2);
gtk_widget_show (hbox8);
gtk_container_add (GTK_CONTAINER (alignment4), hbox8);
image4 = gtk_image_new_from_stock ("gtk-apply", GTK_ICON_SIZE_BUTTON);
gtk_widget_show (image4);
gtk_box_pack_start (GTK_BOX (hbox8), image4, FALSE, FALSE, 0);
label6 = gtk_label_new_with_mnemonic (_("OK"));
gtk_widget_show (label6);
gtk_box_pack_start (GTK_BOX (hbox8), label6, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label6), GTK_JUSTIFY_LEFT);
button_quit = gtk_button_new ();
gtk_widget_show (button_quit);
gtk_box_pack_start (GTK_BOX (hbox4), button_quit, TRUE, TRUE, 0);
gtk_widget_add_accelerator (button_quit, "clicked", accel_group,
GDK_Escape, 0,
GTK_ACCEL_VISIBLE);
alignment7 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment7);
gtk_container_add (GTK_CONTAINER (button_quit), alignment7);
hbox11 = gtk_hbox_new (FALSE, 2);
gtk_widget_show (hbox11);
gtk_container_add (GTK_CONTAINER (alignment7), hbox11);
image7 = gtk_image_new_from_stock ("gtk-quit", GTK_ICON_SIZE_BUTTON);
gtk_widget_show (image7);
gtk_box_pack_start (GTK_BOX (hbox11), image7, FALSE, FALSE, 0);
label9 = gtk_label_new_with_mnemonic (_("Quit"));
gtk_widget_show (label9);
gtk_box_pack_start (GTK_BOX (hbox11), label9, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label9), GTK_JUSTIFY_LEFT);
g_signal_connect ((gpointer) update_window, "delete_event",
G_CALLBACK (on_button_quit_clicked),
NULL);
g_signal_connect ((gpointer) button_version, "clicked",
G_CALLBACK (on_button_version_clicked),
NULL);
g_signal_connect ((gpointer) button_packdir_fs, "clicked",
G_CALLBACK (on_button_packdir_fs_clicked),
NULL);
g_signal_connect ((gpointer) button_tempdir_fs, "clicked",
G_CALLBACK (on_button_tempdir_fs_clicked),
NULL);
g_signal_connect ((gpointer) button_countrydir_fs, "clicked",
G_CALLBACK (on_button_countrydir_fs_clicked),
NULL);
g_signal_connect ((gpointer) button_ok, "clicked",
G_CALLBACK (on_button_ok_clicked),
NULL);
g_signal_connect ((gpointer) button_quit, "clicked",
G_CALLBACK (on_button_quit_clicked),
NULL);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (update_window, update_window, "update_window");
GLADE_HOOKUP_OBJECT (update_window, vbox1, "vbox1");
GLADE_HOOKUP_OBJECT (update_window, scrolledwindow1, "scrolledwindow1");
GLADE_HOOKUP_OBJECT (update_window, textview, "textview");
GLADE_HOOKUP_OBJECT (update_window, hseparator1, "hseparator1");
GLADE_HOOKUP_OBJECT (update_window, vbox2, "vbox2");
GLADE_HOOKUP_OBJECT (update_window, hbox15, "hbox15");
GLADE_HOOKUP_OBJECT (update_window, radiobutton_src, "radiobutton_src");
GLADE_HOOKUP_OBJECT (update_window, checkbutton_recompile, "checkbutton_recompile");
GLADE_HOOKUP_OBJECT (update_window, hseparator4, "hseparator4");
GLADE_HOOKUP_OBJECT (update_window, hbox12, "hbox12");
GLADE_HOOKUP_OBJECT (update_window, radiobutton_country, "radiobutton_country");
GLADE_HOOKUP_OBJECT (update_window, hseparator5, "hseparator5");
GLADE_HOOKUP_OBJECT (update_window, hbox16, "hbox16");
GLADE_HOOKUP_OBJECT (update_window, radiobutton_download, "radiobutton_download");
GLADE_HOOKUP_OBJECT (update_window, button_version, "button_version");
GLADE_HOOKUP_OBJECT (update_window, alignment9, "alignment9");
GLADE_HOOKUP_OBJECT (update_window, hbox17, "hbox17");
GLADE_HOOKUP_OBJECT (update_window, image9, "image9");
GLADE_HOOKUP_OBJECT (update_window, label14, "label14");
GLADE_HOOKUP_OBJECT (update_window, vbox3, "vbox3");
GLADE_HOOKUP_OBJECT (update_window, label12, "label12");
GLADE_HOOKUP_OBJECT (update_window, optionmenu_type, "optionmenu_type");
GLADE_HOOKUP_OBJECT (update_window, menu1, "menu1");
GLADE_HOOKUP_OBJECT (update_window, stable1, "stable1");
GLADE_HOOKUP_OBJECT (update_window, unstable1, "unstable1");
GLADE_HOOKUP_OBJECT (update_window, vbox4, "vbox4");
GLADE_HOOKUP_OBJECT (update_window, label13, "label13");
GLADE_HOOKUP_OBJECT (update_window, optionmenu_format, "optionmenu_format");
GLADE_HOOKUP_OBJECT (update_window, menu2, "menu2");
GLADE_HOOKUP_OBJECT (update_window, rpm1, "rpm1");
GLADE_HOOKUP_OBJECT (update_window, binary1, "binary1");
GLADE_HOOKUP_OBJECT (update_window, source1, "source1");
GLADE_HOOKUP_OBJECT (update_window, deb1, "deb1");
GLADE_HOOKUP_OBJECT (update_window, srpm1, "srpm1");
GLADE_HOOKUP_OBJECT (update_window, hseparator3, "hseparator3");
GLADE_HOOKUP_OBJECT (update_window, label1, "label1");
GLADE_HOOKUP_OBJECT (update_window, hbox2, "hbox2");
GLADE_HOOKUP_OBJECT (update_window, entry_packdir, "entry_packdir");
GLADE_HOOKUP_OBJECT (update_window, button_packdir_fs, "button_packdir_fs");
GLADE_HOOKUP_OBJECT (update_window, alignment1, "alignment1");
GLADE_HOOKUP_OBJECT (update_window, hbox5, "hbox5");
GLADE_HOOKUP_OBJECT (update_window, image1, "image1");
GLADE_HOOKUP_OBJECT (update_window, label3, "label3");
GLADE_HOOKUP_OBJECT (update_window, label2, "label2");
GLADE_HOOKUP_OBJECT (update_window, hbox3, "hbox3");
GLADE_HOOKUP_OBJECT (update_window, entry_tmpdir, "entry_tmpdir");
GLADE_HOOKUP_OBJECT (update_window, button_tempdir_fs, "button_tempdir_fs");
GLADE_HOOKUP_OBJECT (update_window, alignment3, "alignment3");
GLADE_HOOKUP_OBJECT (update_window, hbox7, "hbox7");
GLADE_HOOKUP_OBJECT (update_window, image3, "image3");
GLADE_HOOKUP_OBJECT (update_window, label5, "label5");
GLADE_HOOKUP_OBJECT (update_window, label11, "label11");
GLADE_HOOKUP_OBJECT (update_window, hbox13, "hbox13");
GLADE_HOOKUP_OBJECT (update_window, entry_countrydir, "entry_countrydir");
GLADE_HOOKUP_OBJECT (update_window, button_countrydir_fs, "button_countrydir_fs");
GLADE_HOOKUP_OBJECT (update_window, alignment8, "alignment8");
GLADE_HOOKUP_OBJECT (update_window, hbox14, "hbox14");
GLADE_HOOKUP_OBJECT (update_window, image8, "image8");
GLADE_HOOKUP_OBJECT (update_window, label10, "label10");
GLADE_HOOKUP_OBJECT (update_window, hseparator2, "hseparator2");
GLADE_HOOKUP_OBJECT (update_window, hbox4, "hbox4");
GLADE_HOOKUP_OBJECT (update_window, button_ok, "button_ok");
GLADE_HOOKUP_OBJECT (update_window, alignment4, "alignment4");
GLADE_HOOKUP_OBJECT (update_window, hbox8, "hbox8");
GLADE_HOOKUP_OBJECT (update_window, image4, "image4");
GLADE_HOOKUP_OBJECT (update_window, label6, "label6");
GLADE_HOOKUP_OBJECT (update_window, button_quit, "button_quit");
GLADE_HOOKUP_OBJECT (update_window, alignment7, "alignment7");
GLADE_HOOKUP_OBJECT (update_window, hbox11, "hbox11");
GLADE_HOOKUP_OBJECT (update_window, image7, "image7");
GLADE_HOOKUP_OBJECT (update_window, label9, "label9");
GLADE_HOOKUP_OBJECT_NO_REF (update_window, tooltips, "tooltips");
gtk_window_add_accel_group (GTK_WINDOW (update_window), accel_group);
return update_window;
}
GtkWidget*
create_fileselection (void)
{
GtkWidget *fileselection;
GtkWidget *button_fs_ok;
GtkWidget *button_fs_cancel;
fileselection = gtk_file_selection_new (_("Datei auswählen"));
gtk_container_set_border_width (GTK_CONTAINER (fileselection), 10);
gtk_window_set_position (GTK_WINDOW (fileselection), GTK_WIN_POS_CENTER);
button_fs_ok = GTK_FILE_SELECTION (fileselection)->ok_button;
gtk_widget_show (button_fs_ok);
GTK_WIDGET_SET_FLAGS (button_fs_ok, GTK_CAN_DEFAULT);
button_fs_cancel = GTK_FILE_SELECTION (fileselection)->cancel_button;
gtk_widget_show (button_fs_cancel);
GTK_WIDGET_SET_FLAGS (button_fs_cancel, GTK_CAN_DEFAULT);
g_signal_connect ((gpointer) button_fs_ok, "clicked",
G_CALLBACK (on_button_fs_ok_clicked),
NULL);
g_signal_connect ((gpointer) button_fs_cancel, "clicked",
G_CALLBACK (on_button_fs_cancel_clicked),
NULL);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (fileselection, fileselection, "fileselection");
GLADE_HOOKUP_OBJECT_NO_REF (fileselection, button_fs_ok, "button_fs_ok");
GLADE_HOOKUP_OBJECT_NO_REF (fileselection, button_fs_cancel, "button_fs_cancel");
return fileselection;
}

6
b-u/bu_interface.h Normal file
View File

@ -0,0 +1,6 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
GtkWidget* create_update_window (void);
GtkWidget* create_fileselection (void);

85
b-u/bu_main.c Normal file
View File

@ -0,0 +1,85 @@
/*
* Initial main.c file generated by Glade. Edit as required.
* Glade will not overwrite this file.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
#include "bygfoot-update.h"
#include "bu_interface.h"
#include "bu_support.h"
#include "bu_functions.h"
void
bu_init(void)
{
GtkWidget *textview =
lookup_widget(update_window, "textview");
GtkTextBuffer *textbuffer =
gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview));
GtkWidget *entry_packdir =
lookup_widget(update_window, "entry_packdir");
GtkWidget *entry_tmpdir =
lookup_widget(update_window, "entry_tmpdir");
GtkWidget *entry_countrydir =
lookup_widget(update_window, "entry_countrydir");
GString *text =
g_string_new("");
gchar buf[SMALL];
g_string_printf(text, "NOTE: This GUI uses the 'bygfoot-update' shell script to manage things, an since mixing the shell and the GUI is a rather messy thing, I recommend you use the script itself to manage your updates.\n\n");
g_string_append_printf(text, "NOTE 2: If the program hangs for a long while, the reason could be that wget can't establish connection to the website. Check http://bygfoot.sourceforge.net to find out.\n");
gtk_text_buffer_insert_at_cursor(textbuffer,
text->str, -1);
g_string_free(text, TRUE);
sprintf(buf, "%s", getenv("PWD"));
gtk_entry_set_text(GTK_ENTRY(entry_packdir), buf);
gtk_entry_set_text(GTK_ENTRY(entry_tmpdir), "/tmp");
sprintf(buf, "%s/.bygfoot/text_files", getenv("HOME"));
gtk_entry_set_text(GTK_ENTRY(entry_countrydir), buf);
gtk_widget_show(update_window);
status = STATUS_NORMAL;
}
gint
main (gint argc, gchar *argv[])
{
#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
#endif
update_script = g_string_new("");
command_line = g_string_new("");
if(g_file_test("./bygfoot-update", G_FILE_TEST_EXISTS))
g_string_printf(update_script, "%s/bygfoot-update", g_getenv("PWD"));
else
g_string_printf(update_script, "bygfoot-update");
gtk_set_locale ();
gtk_init (&argc, &argv);
update_window = create_update_window();
bu_init();
gtk_main ();
g_string_free(update_script, TRUE);
g_string_free(command_line, TRUE);
return 0;
}

144
b-u/bu_support.c Normal file
View File

@ -0,0 +1,144 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <gtk/gtk.h>
#include "bu_support.h"
GtkWidget*
lookup_widget (GtkWidget *widget,
const gchar *widget_name)
{
GtkWidget *parent, *found_widget;
for (;;)
{
if (GTK_IS_MENU (widget))
parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
else
parent = widget->parent;
if (!parent)
parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
if (parent == NULL)
break;
widget = parent;
}
found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
widget_name);
if (!found_widget)
g_warning ("Widget not found: %s", widget_name);
return found_widget;
}
static GList *pixmaps_directories = NULL;
/* Use this function to set the directory containing installed pixmaps. */
void
add_pixmap_directory (const gchar *directory)
{
pixmaps_directories = g_list_prepend (pixmaps_directories,
g_strdup (directory));
}
/* This is an internally used function to find pixmap files. */
static gchar*
find_pixmap_file (const gchar *filename)
{
GList *elem;
/* We step through each of the pixmaps directory to find it. */
elem = pixmaps_directories;
while (elem)
{
gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
G_DIR_SEPARATOR_S, filename);
if (g_file_test (pathname, G_FILE_TEST_EXISTS))
return pathname;
g_free (pathname);
elem = elem->next;
}
return NULL;
}
/* This is an internally used function to create pixmaps. */
GtkWidget*
create_pixmap (GtkWidget *widget,
const gchar *filename)
{
gchar *pathname = NULL;
GtkWidget *pixmap;
if (!filename || !filename[0])
return gtk_image_new ();
pathname = find_pixmap_file (filename);
if (!pathname)
{
g_warning (_("Couldn't find pixmap file: %s"), filename);
return gtk_image_new ();
}
pixmap = gtk_image_new_from_file (pathname);
g_free (pathname);
return pixmap;
}
/* This is an internally used function to create pixmaps. */
GdkPixbuf*
create_pixbuf (const gchar *filename)
{
gchar *pathname = NULL;
GdkPixbuf *pixbuf;
GError *error = NULL;
if (!filename || !filename[0])
return NULL;
pathname = find_pixmap_file (filename);
if (!pathname)
{
g_warning (_("Couldn't find pixmap file: %s"), filename);
return NULL;
}
pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
if (!pixbuf)
{
fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
pathname, error->message);
g_error_free (error);
}
g_free (pathname);
return pixbuf;
}
/* This is used to set ATK action descriptions. */
void
glade_set_atk_action_description (AtkAction *action,
const gchar *action_name,
const gchar *description)
{
gint n_actions, i;
n_actions = atk_action_get_n_actions (action);
for (i = 0; i < n_actions; i++)
{
if (!strcmp (atk_action_get_name (action, i), action_name))
atk_action_set_description (action, i, description);
}
}

67
b-u/bu_support.h Normal file
View File

@ -0,0 +1,67 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
/*
* Standard gettext macros.
*/
#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define textdomain(String) (String)
# define gettext(String) (String)
# define dgettext(Domain,Message) (Message)
# define dcgettext(Domain,Message,Type) (Message)
# define bindtextdomain(Domain,Directory) (Domain)
# define _(String) (String)
# define N_(String) (String)
#endif
/*
* Public Functions.
*/
/*
* This function returns a widget in a component created by Glade.
* Call it with the toplevel widget in the component (i.e. a window/dialog),
* or alternatively any widget in the component, and the name of the widget
* you want returned.
*/
GtkWidget* lookup_widget (GtkWidget *widget,
const gchar *widget_name);
/* Use this function to set the directory containing installed pixmaps. */
void add_pixmap_directory (const gchar *directory);
/*
* Private Functions.
*/
/* This is used to create the pixmaps used in the interface. */
GtkWidget* create_pixmap (GtkWidget *widget,
const gchar *filename);
/* This is used to create the pixbufs used in the interface. */
GdkPixbuf* create_pixbuf (const gchar *filename);
/* This is used to set ATK action descriptions. */
void glade_set_atk_action_description (AtkAction *action,
const gchar *action_name,
const gchar *description);

702
b-u/bygfoot-update Executable file
View File

@ -0,0 +1,702 @@
#!/bin/bash
####################################################
# Bygfoot Football Manager #
# AUTHOR: Gyozo Both (gyboth@bygfoot.com) #
# http://www.bygfoot.com #
####################################################
# Skript that updates src packages of the Bygfoot Football Manager
# using wget to retrieve patches from the homepage
# version number
version="0.6"
# the bygfoot release version the script is shipped with
relversion=VERSION
# the current release version on the server
packversion=
# exit codes
EXITOK=0
EXITNOPROG=1
EXITNOREV=2
EXITABORT=3
EXITWGETFAIL=4
EXITUSR=6
EXITNEWSCRIPT=7
EXITCOUNTRY=8
EXITPACKFORMAT=9
EXITDEBIAN=10
# variables
# a variable we sometimes read something into
tempvar=
# the directory containing the Bygfoot src package
packdir=
# a directory we can write to and read from
tmpdir=
# destination for the country files
countrydir=
# the Bygfoot package type, stable or unstable
type_stable=stable
type_unstable=unstable
type=
# the current revision number of the user's package
revnr=
# revision numbers fetched from the homepage
newrevnr=
# number of new revisions found
found=0
# the arguments for the script
args="$*"
# the package format the user wants to download
format_rpm=.i586.rpm
format_bin=-binary.tar.bz2
format_src=.tar.bz2
format_srpm=.src.rpm
format_deb=-1_i386.deb
format=
# options
# whether all new patches should be applied automatically
apply_all=0
# whether we should skip some queries and assume standard values
auto=0
# whether we recompile automatically after patching
recompile=0
# whether we check for auxiliary programs and
# newer update script versions
check=1
# whether we just fetch the latest version number from
# the server
get_version=0
# operation modes
# source update
mode_src=0
# country file download
mode_country=1
# package download
mode_pack=2
# get cvs version
mode_cvs=3
mode=
# print a help text
function print_help()
{
cat <<END
Usage: bygfoot-update [OPTIONS]
Note: You can call bygfoot-update without any options.
MAIN OPTIONS:
-c|--country-files Download country files with official team names
and team definitions file
-n|--new-package Download the latest complete package
-u|--update Update your Bygfoot source package using patches
-b|--cvs Get CVS version
AUXILIARY OPTIONS:
Global:
-A|--auto Assume [y] for all prompts
-h|--help Print help and exit
-t|--temp-dir DIR Set temp directory to DIR
-v|--version Print version information and exit
Relevant for source update mode:
-a|--apply-all Apply all new patches without prompting
-p|--package-dir DIR Set source package directory to DIR
-r|--recompile Run './configure && make' after updating
-R|--no-recompile Don't recompile after updating
Relevant for country files mode:
-C|--country-dir DIR Set destination directory for the
country files and def file to DIR
Relevant for package download mode:
-f|--format FORMAT Set package format to FORMAT:
'src', 'rpm', 'srpm', 'bin' or 'deb.
Note that 'deb' isn't allowed for unstable
packages.
-t|--temp-dir DIR Set download destination directory
to DIR (same as temp directory)
-T|--type TYPE Download latest TYPE package, TYPE
being either 'stable' or 'unstable'.
-V|--get-version Fetch version number of the latest
release from the server and exit.
END
}
# print program version
function print_version()
{
cat <<END
bygfoot-update: A bash script keeping your Bygfoot Football Manager up-to-date.
Version $version.
See the file UPDATE for some more information.
Call bygfoot-update -h|--help for usage information.
END
}
# parse arguments
function parse_args()
{
TEMP=`getopt -o aAbcC:f:hnNp:rRt:T:uvV --long apply-all,auto,country-files,country-dir:,cvs,format:,\
help,new-package,no-check,package-dir:,recompile,no-recompile,temp-dir:,type:,update,version,get-version -- $*`
if [ $? != 0 ]; then
echo "** b-u: There was an error parsing the arguments."
echo "** b-u: The arguments will be ignored."
return
fi
eval set -- "$TEMP"
while true; do
case "$1" in
-a|--apply-all) apply_all=1; shift ;;
-A|--auto) auto=1; apply_all=1; shift ;;
-b|--cvs) mode=$mode_cvs; shift ;;
-c|--country-files) mode=$mode_country; shift ;;
-C|--country-dir) pushd $2 &> /dev/null; countrydir=$PWD; popd &> /dev/null; shift 2 ;;
-f|--format) set_format $2; shift 2 ;;
-h|--help) print_help; exit $EXITOK ;;
-n|--new-package) mode=$mode_pack; shift ;;
-N|--no-check) check=0; shift ;;
-p|--package-dir) pushd $2 &> /dev/null; packdir=$PWD; popd &> /dev/null; shift 2 ;;
-r|--recompile) recompile=1; shift ;;
-R|--no-recompile) recompile=-1; shift ;;
-t|--temp-dir) pushd $2 &> /dev/null; tmpdir=$PWD; popd &> /dev/null; shift 2 ;;
-T|--type) type=$2; shift 2 ;;
-u|--update) mode=$mode_src; shift ;;
-v|--version) print_version; exit $EXITOK ;;
-V|--get-version) mode=$mode_pack; get_version=1; shift ;;
--) shift; break ;;
esac
done
}
# clean up in the temp dir
function cleanup()
{
echo
echo "** b-u: Cleaning up in the temp directory."
rm -rfv $tmpdir/bygfoot-update
}
# wget something, exit if it doesn't work
function my_wget()
{
if ! wget -v $1; then
echo
echo "** b-u: wget failure."
cleanup
exit $EXITWGETFAIL
fi
}
# check for the programs needed
function check_progs()
{
if [ $check -eq 0 ]; then
return
fi
echo
for i in sed tar bzip2 wget patch; do
echo -n "** b-u: checking for $i... "
if $i --help &> /dev/null; then
echo "ok"
else
echo "failed"
echo "** b-u: Didn't find a working $i, maybe it's not in your PATH."
echo "** b-u: Failure."
exit $EXITNOPROG
fi
done
}
# get country files with official team names
function get_country_files()
{
echo
echo "** b-u: Fetching country files with official team names and"
echo "** b-u: team definitions file."
pushd $countrydir &>/dev/null
my_wget http://bygfoot.sourceforge.net/revisions/bygfoot-countries.tar.bz2
for i in country_* teams; do
mv -vf $i $i.old
done
tar xfjv bygfoot-countries.tar.bz2
rm -vf bygfoot-countries.tar.bz2
popd
exit $EXITCOUNTRY
echo "** b-u: done."
}
# get the paths for a temp directory and
# the location of the user's bygfoot src package
function get_paths()
{
if [ $mode -eq $mode_src ]; then
if [ -z $packdir ]; then
if [ $auto -eq 0 ]; then
echo
echo "** b-u: Enter the directory containing your current Bygfoot src"
echo "** b-u: package (e.g. (/home/john/compiled/bygfoot-1.6.1):"
echo "** b-u: [default: $PWD]"
read tempvar
if [ ! -z $tempvar ]; then
pushd $tempvar; packdir=$PWD; popd
else
packdir=$PWD
fi
else
packdir=$PWD
fi
echo
echo "** b-u: Package dir set to"
echo "** b-u: $packdir"
fi
fi
if [ $mode -ne $mode_country ]; then
if [ -z $tmpdir ]; then
if [ $auto -eq 0 ]; then
echo
echo "** b-u: Enter temp directory I can use"
echo "** b-u: (you need read/write permissions there): [/tmp]"
read tempvar
if [ ! -z $tempvar ]; then
pushd $tempvar; tmpdir=$PWD; popd
else
tmpdir=/tmp
fi
else
tmpdir=/tmp
fi
echo
echo "** b-u: Temp dir set to"
echo "** b-u: $tmpdir"
fi
fi
if [ $mode -eq $mode_country ]; then
if [ -z $countrydir ]; then
if [ $auto -eq 0 ]; then
echo
echo "** b-u: Enter the directory I should unpack the country files"
echo "** b-u: to (the default destination is strongly recommended):"
echo "** b-u: [$HOME/.bygfoot/text_files]"
read tempvar
if [ ! -z $tempvar ]; then
pushd $tempvar; countrydir=$PWD; popd
else
countrydir=$HOME/.bygfoot/text_files
fi
else
countrydir=$HOME/.bygfoot/text_files
fi
echo
echo "** b-u: Country dir set to"
echo "** b-u: $countrydir"
fi
fi
}
# find out revision number and type
function get_rev_type()
{
echo
if [ ! -e $packdir/revision_number ]; then
echo "** b-u: I couldn't find the file containing your current"
echo "** b-u: revision number and type ($packdir/revision_number)."
echo
echo "** b-u: Failure."
exit $EXITNOREV
fi
type=$(cat $packdir/revision_number | sed s/[0-9]*//g)
revnr=$(cat $packdir/revision_number | sed s/[a-z]*//g)
echo "** b-u: Your current revision is: $type $revnr."
}
function apply_rev()
{
echo
echo "** b-u: Applying patch revision_$type$newrevnr"
cd $packdir
if [ -e $newrevdir/prepatch ]; then
$newrevdir/prepatch
fi
patch -p1 < $newrevdir/patch*
if [ -e $newrevdir/postpatch ]; then
$newrevdir/postpatch
fi
cd $tmpdir/bygfoot-update
}
# fetch a revision archive from the homepage and
# patch the src package
function get_revision()
{
local newrevdir=$tmpdir/bygfoot-update/revision_$type$newrevnr
echo
echo "** b-u: Retrieving revision_$type$newrevnr.tar.bz2."
my_wget http://bygfoot.sourceforge.net/revisions/$type/revision_$type$newrevnr.tar.bz2
mkdir $newrevdir
cd $newrevdir
tar xfjv ../revision_$type$newrevnr.tar.bz2
echo
echo "** b-u: Here's the revision description:"
echo "##############"
cat README
echo "##############"
echo
if [ $apply_all -eq 0 ]; then
echo "** b-u: Would you like to apply the patch?"
echo "** b-u: (You can't apply newer ones if you don't apply"
echo "** b-u: this one because they depend on each other): ([y]es/(n)o/(a)ll)"
read tempvar
if [ ! -z $tempvar ]; then
if [ $tempvar = "a" ]; then
apply_all=1
elif [ $tempvar != "y" ]; then
echo
cleanup
echo "** b-u: User abort."
exit $EXITUSR
fi
fi
fi
apply_rev
}
# look for new revisions
function get_revs()
{
echo
cd $tmpdir
echo "** b-u: Cleaning up old update directories and creating a new one..."
rm -rfv bygfoot-update
mkdir -v bygfoot-update
cd bygfoot-update
echo
echo "** b-u: Fetching revision list..."
my_wget http://bygfoot.sourceforge.net/revisions/$type/revisions_$type
for i in $(cat revisions_$type); do
echo
newrevnr=$(echo $i | sed s/'[a-z_]*\([0-9]*\).*'/'\1'/g)
if [ $newrevnr -gt $revnr ]; then
found=$[found + 1]
get_revision
else
echo "** b-u: $i is older than your revision..."
fi
done
}
# clean up etc.
function update_end()
{
echo
cleanup
if [ $found -ge 1 ]; then
echo "** b-u: $found new revisions found."
echo "** b-u: Your new revision number should be $[revnr + found]."
echo "** b-u: Have a look at the files README, ChangeLog and"
echo "** b-u: ReleaseNotes to see the changes that were made."
echo
if [ $recompile -eq 0 -a $auto -eq 0 ]; then
echo "** b-u: Would you like me to execute 'configure && make' ? ([y]/n)"
read tempvar
if [ ! -z $tempvar ]; then
if [ $tempvar != "y" ]; then
echo
echo "** b-u: done."
exit $EXITOK
fi
fi
fi
if [ $recompile -ne -1 ]; then
cd $packdir
./configure && make
fi
else
echo "** b-u: No new revisions found. Your package seems"
echo "** b-u: to be up-to-date."
fi
echo
echo "** b-u: done."
exit $EXITOK
}
# set package format from a command line option
function set_format()
{
if [ $1 = "rpm" ]; then
format=$format_rpm
elif [ $1 = "srpm" ]; then
format=$format_srpm
elif [ $1 = "src" ]; then
format=$format_src
elif [ $1 = "bin" ]; then
format=$format_bin
elif [ $1 = "deb" ]; then
format=$format_deb
else
echo "** b-u: Unrecognized package format: $1"
echo "** b-u: Failure."
exit $EXITPACKFORMAT
fi
}
# ask for the package type (stable/unstable)
function get_type()
{
if [ ! -z $type ]; then
return
fi
if [ $auto -ne 1 ];then
echo
echo "** b-u: Please specify the package type you'd like to"
echo "** b-u: download ([s]table / (u)nstable):"
read tempvar
if [ -z $tempvar ]; then
type=$type_stable
return
fi
if [ $type="u" ]; then
type=$type_unstable
else
type=$type_stable
fi
else
type=$type_stable
fi
}
# get package format the user wants to download
function get_format()
{
if [ -z $format ]; then
if [ $auto -ne 1 -a $get_version -ne 1 ]; then
echo
echo "** b-u: Please specify the package format you'd like to download"
echo "** b-u: ([r]pm / (b)inary / (s)ource / (d)ebian / (S)ource rpm):"
read tempvar
if [ -z $tempvar ]; then
format=$format_rpm
return
fi
if [ $tempvar = "b" ]; then
format=$format_bin
elif [ $tempvar = "s" ]; then
format=$format_src
elif [ $tempvar = "S" ]; then
format=$format_srpm
elif [ $tempvar = "d" ]; then
format=$format_deb
else
format=$format_rpm
fi
else
format=$format_rpm
fi
fi
if [ $type = $type_unstable -a $format = $format_deb ]; then
echo
echo "** b-u: There are no unstable packages for Debian. Sorry."
echo "** b-u: Failure."
exit $EXITDEBIAN
fi
}
function get_latest_version()
{
echo
echo "** b-u: Fetching version number of the latest $type release."
pushd $tmpdir &> /dev/null
rm -rfv bygfoot-update
mkdir bygfoot-update
cd bygfoot-update
my_wget http://bygfoot.sourceforge.net/packages/$type/version
packversion=$(cat version)
echo
echo "** b-u: Latest $type version is $packversion."
echo "** b-u: Your version (as far as i know) is $relversion."
if [ $get_version -eq 1 ]; then
cleanup
exit $EXITOK
fi
echo "** b-u: Do you want me to download the package? [y] / (n)"
if [ $auto -eq 1 ]; then
return
fi
read tempvar
if [ ! -z $temp]; then
if [ $tempvar = "n" ]; then
cleanup
popd &> /dev/null
exit $EXITUSR
fi
fi
}
function get_new_package()
{
local separator=-
local file=
if [ $format = $format_rpm -o $format = $format_srpm ]; then
packversion=$(echo $packversion | sed s/'\([0-9]*\.[0-9]*\)\(\.\)\([0-9]*\)'/'\1-\3'/g)
fi
if [ $format = $format_deb ]; then
separator=_
fi
file=bygfoot$separator$packversion$format
my_wget http://bygfoot.sourceforge.net/packages/$type/$file
echo
echo "** b-u: You can find the package $file"
echo "** b-u: in the directory $PWD."
echo "** b-u: Done."
exit $EXITOK
}
# download a bygfoot package
function get_package()
{
get_type
get_format
get_latest_version
get_new_package
}
function get_mode()
{
if [ ! -z $mode ]; then
return
fi
if [ $auto -eq 1 ]; then
mode=$mode_src
return
fi
echo
echo "** b-u: What would you like to do?"
echo "** b-u: - [1] Update your Bygfoot source package using patches"
echo "** b-u: - (2) Download the latest Bygfoot release"
echo "** b-u: - (3) Get country file package with official team names"
echo "** b-u: - (4) Get CVS version (2+ MB 'cause it's not compressed)"
read tempvar
if [ -z $tempvar ]; then
mode=$mode_src
return
fi
if [ $tempvar -eq 2 ]; then
mode=$mode_pack
elif [ $tempvar -eq 3 ]; then
mode=$mode_country
elif [ $tempvar -eq 4 ]; then
mode=$mode_cvs
else
mode=$mode_src
fi
}
function get_cvs()
{
cd $tmpdir
cvs -d:pserver:anonymous@cvs.sf.net:/cvsroot/bygfoot checkout bygfoot-unstable
exit $EXITOK
}
parse_args $*
print_version
check_progs
get_mode
get_paths
# what to do when user presses Ctrl-C
trap 'echo; cleanup; echo "** b-u: User abort." & exit $EXITABORT' 2
if [ $mode -eq $mode_country ]; then
get_country_files
elif [ $mode -eq $mode_pack ]; then
get_package
elif [ $mode -eq $mode_cvs ]; then
get_cvs
else
get_rev_type
get_revs
update_end
fi

BIN
b-u/bygfoot-update-gui Executable file

Binary file not shown.

30
b-u/bygfoot-update.h Normal file
View File

@ -0,0 +1,30 @@
#ifndef BYGFOOT_UPDATE_H
#define BYGFOOT_UPDATE_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
#define SMALL 10000
#define BIG 1000000
gint status;
GtkWidget *update_window;
GString *update_script;
GString *command_line;
enum
{
STATUS_NORMAL = 0,
STATUS_FS_PACK,
STATUS_FS_TMP,
STATUS_FS_COUNTRY,
STATUS_END
};
#endif

2876
bygfoot.glade Normal file

File diff suppressed because it is too large Load Diff

10
bygfoot.gladep Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
<glade-project>
<name>Bygfoot</name>
<program_name>bygfoot</program_name>
<pixmaps_directory>support_files</pixmaps_directory>
<gnome_support>FALSE</gnome_support>
<backup_source_files>FALSE</backup_source_files>
</glade-project>

1936
bygfoot_editor.glade Normal file

File diff suppressed because it is too large Load Diff

17
bygfoot_editor.gladep Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
<glade-project>
<name>bygfoot_editor</name>
<program_name>bygfoot_editor</program_name>
<pixmaps_directory>support_files</pixmaps_directory>
<gnome_support>FALSE</gnome_support>
<output_main_file>FALSE</output_main_file>
<output_support_files>FALSE</output_support_files>
<output_build_files>FALSE</output_build_files>
<backup_source_files>FALSE</backup_source_files>
<main_source_file>editor_interface.c</main_source_file>
<main_header_file>editor_interface.h</main_header_file>
<handler_source_file>editor_callbacks.c</handler_source_file>
<handler_header_file>editor_callbacks.h</handler_header_file>
</glade-project>

1757
bygfoot_misc.glade Normal file

File diff suppressed because it is too large Load Diff

17
bygfoot_misc.gladep Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
<glade-project>
<name>bygfoot_misc</name>
<program_name>bygfoot_misc</program_name>
<pixmaps_directory>support_files</pixmaps_directory>
<gnome_support>FALSE</gnome_support>
<output_main_file>FALSE</output_main_file>
<output_support_files>FALSE</output_support_files>
<output_build_files>FALSE</output_build_files>
<backup_source_files>FALSE</backup_source_files>
<main_source_file>misc_interface.c</main_source_file>
<main_header_file>misc_interface.h</main_header_file>
<handler_source_file>misc_callbacks.c</handler_source_file>
<handler_header_file>misc_callbacks.h</handler_header_file>
</glade-project>

1793
bygfoot_misc2.glade Normal file

File diff suppressed because it is too large Load Diff

17
bygfoot_misc2.gladep Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
<glade-project>
<name>bygfoot_misc2</name>
<program_name>bygfoot_misc2</program_name>
<pixmaps_directory>support_files</pixmaps_directory>
<gnome_support>FALSE</gnome_support>
<output_main_file>FALSE</output_main_file>
<output_support_files>FALSE</output_support_files>
<output_build_files>FALSE</output_build_files>
<backup_source_files>FALSE</backup_source_files>
<main_source_file>misc2_interface.c</main_source_file>
<main_header_file>misc2_interface.h</main_header_file>
<handler_source_file>misc2_callbacks.c</handler_source_file>
<handler_header_file>misc2_callbacks.h</handler_header_file>
</glade-project>

3819
bygfoot_options.glade Normal file

File diff suppressed because it is too large Load Diff

17
bygfoot_options.gladep Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
<glade-project>
<name>bygfoot_options</name>
<program_name>bygfoot_options</program_name>
<pixmaps_directory>support_files</pixmaps_directory>
<gnome_support>FALSE</gnome_support>
<output_main_file>FALSE</output_main_file>
<output_support_files>FALSE</output_support_files>
<output_build_files>FALSE</output_build_files>
<backup_source_files>FALSE</backup_source_files>
<main_source_file>options_interface.c</main_source_file>
<main_header_file>options_interface.h</main_header_file>
<handler_source_file>options_callbacks.c</handler_source_file>
<handler_header_file>options_callbacks.h</handler_header_file>
</glade-project>

32
configure.in Normal file
View File

@ -0,0 +1,32 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(configure.in)
AM_INIT_AUTOMAKE(bygfoot, 0.1)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
pkg_modules="gtk+-2.0 >= 2.0.0"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
GETTEXT_PACKAGE=bygfoot
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
dnl Add the languages which your application supports here.
ALL_LINGUAS="fr de ru ro hu pt_BR"
AM_GLIB_GNU_GETTEXT
AC_OUTPUT([
Makefile
src/Makefile
b-u/Makefile
po/Makefile.in
])

84
man/bygfoot.6 Normal file
View File

@ -0,0 +1,84 @@
.TH "BYGFOOT" 6 "" ""
.P
.SS NAME
\fBBygfoot\fP \- a football management game for Linux and other Unices.
.SS SYNOPSIS
bygfoot [\-e|\-\-editor] [\-d dir] [\-f file] [\-u|\-\-update] game
.SS DESCRIPTION
This man page documents version 1.6 of \fBBygfoot\fP. \fBBygfoot\fP is a
small and simple football (a.k.a. soccer) manager game featuring some of
the world's most important leagues and cups. You manage a team from one
such league: you form the team, buy and sell players, get promoted or
relegated and of course try to be successful.
The game is deliberately kept simple. Players have only one value that
reflects their playing ability, namely their skill value (they have
some other values, though, like age or position). The only thing that
you have to do besides managing your players is to look after your
stadium: keep / make it safe and see that you have enough capacity.
Because of the simplicity of the game, and because most buttons have
tool\-tips you won't need much help while playing.
.SS OPTIONS
\-d [dir] \- allows you to choose another directory to search for
pixmaps and text\-files. Default directories that are searched are
$HOME/.bygfoot, ./support_files and possibly (depending on the package
format you have) /usr/local/share/bygfoot/support_files.
\-f [file] \- allows you to choose a custom country file instead of one
of those included with your \fBBygfoot\fP release. You can omit the full
path if the file's in $HOME/.bygfoot/text_files.
\-e \-\-editor \- allows you to start directly the team editor.
\-u \-\-update \- starts the Bygfoot Online Update Frontend (available
in versions higher than 1.7.0 rev2.
[game] \- allows you to load directly a previously saved game. You can omit the full
path if the file's in $HOME/.bygfoot/saves.
Any other argument is interpreted as [game].
.SS FILES
/usr/share/bygfoot/support_files/ \- directory containing pixmaps
used by the GUI (prefix might be /usr/local if you've compiled
the game yourself).
/usr/share/bygfoot/support_files/text_files/ \- directory containing the
built\-in country files, team definitions and other text data.
/usr/bin/bygfoot \- the standalone executable (depends on GTK+2).
$HOME/.bygfoot \- user configuration directory.
.SS AUTHOR
\fBBygfoot\fP is written and maintained by Gyözö Both (gyboth_at_bygfoot_dot_com), following
suggestions from people all over the world.
.SS COPYRIGHT NOTICE
Copyright (c) 2004 by Gyözö Both. Released under the GNU General Public
Licence. The full text of the licence is available in the source directory
with the name COPYING. If you have not downloaded the source, or if the
file you have downloaded is missing the licence, you can read it online at the
Free Software Foundation site at http://www.gnu.org or at http://www.fsf.org.
A copy of the licence can also be obtained from the author of this software.
.SS DOCUMENTATION AUTHORSHIP
Copyright (c) 2004 by José Geraldo Gouvêa and Gyözö Both.
.SS INVITATION
You are invited to help expand the playability and the functionalities of
this game by sending your patches and contributions. You can also join
the development team at SourceForge.net if you know C programming and
can spare some time.
Even if you are not a programmer you can contribute to the project by sending
new country files, team definitions, artwork or \-\-\- preferably \-\-\- by donating
to the project. See more about this at the official \fBBygfoot\fP website at
http://www.bygfoot.com.
.\" man code generated by txt2tags 1.7 (http://txt2tags.sf.net)
.\" cmdline: txt2tags -t man -t man bygfoot.t2t

254
po/Makefile.in.in Normal file
View File

@ -0,0 +1,254 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
#
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
#
# - Modified by jacob berkman <jacob@ximian.com> to install
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
libdir = @libdir@
localedir = $(libdir)/locale
gnulocaledir = $(datadir)/locale
gettextsrcdir = $(datadir)/glib-2.0/gettext/po
subdir = po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
CC = @CC@
GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
MSGMERGE = msgmerge
DEFS = @DEFS@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
INCLUDES = -I.. -I$(top_srcdir)/intl
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
SOURCES =
POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
$(POFILES) $(GMOFILES) $(SOURCES)
POTFILES = \
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
INSTOBJEXT = @INSTOBJEXT@
.SUFFIXES:
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
.c.o:
$(COMPILE) $<
.po.pox:
$(MAKE) $(GETTEXT_PACKAGE).pot
$(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox
.po.mo:
$(MSGFMT) -o $@ $<
.po.gmo:
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
&& rm -f $@ && $(GENCAT) $@ $*.msg
all: all-@USE_NLS@
all-yes: $(CATALOGS)
all-no:
$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
$(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
--files-from=$(srcdir)/POTFILES.in \
&& test ! -f $(GETTEXT_PACKAGE).po \
|| ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \
&& mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot )
install: install-exec install-data
install-exec:
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
case "$$cat" in \
*.gmo) destdir=$(gnulocaledir);; \
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $$dir; \
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
fi; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
else \
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
fi; \
if test -r $$cat.m; then \
$(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
else \
if test -r $(srcdir)/$$cat.m ; then \
$(INSTALL_DATA) $(srcdir)/$$cat.m \
$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
else \
true; \
fi; \
fi; \
done
if test "$(PACKAGE)" = "glib"; then \
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
# Define this as empty until I found a useful application.
installcheck:
uninstall:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
done
if test "$(PACKAGE)" = "glib"; then \
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
fi
check: all
dvi info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
rm -fr *.o
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f $(GMOFILES)
distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
dist distdir: update-po $(DISTFILES)
dists="$(DISTFILES)"; \
for file in $$dists; do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(GETTEXT_PACKAGE).pot
tmpdir=`pwd`; \
cd $(srcdir); \
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
echo "$$lang:"; \
if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$cat failed!"; \
rm -f $$tmpdir/$$lang.new.po; \
fi; \
done
# POTFILES is created from POTFILES.in by stripping comments, empty lines
# and Intltool tags (enclosed in square brackets), and appending a full
# relative path to them
POTFILES: POTFILES.in
( if test 'x$(srcdir)' != 'x.'; then \
posrcprefix='$(top_srcdir)/'; \
else \
posrcprefix="../"; \
fi; \
rm -f $@-t $@ \
&& (sed -e '/^#/d' \
-e "s/^\[.*\] +//" \
-e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
| sed -e '$$s/\\$$//') > $@-t \
&& chmod a-w $@-t \
&& mv $@-t $@ )
Makefile: Makefile.in.in ../config.status POTFILES
cd .. \
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
$(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

41
po/POTFILES.in Normal file
View File

@ -0,0 +1,41 @@
# List of source files containing translatable strings.
src/callback_func.c
src/callbacks.c
src/editor_callback_func.c
src/editor_callbacks.c
src/editor_interface.c
src/files.c
src/finance.c
src/fixture.c
src/free.c
src/game.c
src/game_gui.c
src/generation.c
src/graph.c
src/gui.c
src/history.c
src/interface.c
src/load_save.c
src/main.c
src/maths.c
src/misc.c
src/misc_callbacks.c
src/misc_interface.c
src/misc2_callbacks.c
src/misc2_interface.c
src/option.c
src/options_callbacks.c
src/options_interface.c
src/player.c
src/startup.c
src/support.c
src/team.c
src/transfer.c
src/treeview.c
src/treeview_cell.c
src/window.c
src/xml_fixtures.c
src/xml_general.c
src/xml_teams.c
src/xml.c

2479
po/bygfoot.pot Normal file

File diff suppressed because it is too large Load Diff

2528
po/de.po Normal file

File diff suppressed because it is too large Load Diff

1372
po/fr.po Normal file

File diff suppressed because it is too large Load Diff

2622
po/hu.po Normal file

File diff suppressed because it is too large Load Diff

2542
po/pt_BR.po Normal file

File diff suppressed because it is too large Load Diff

2572
po/ro.po Normal file

File diff suppressed because it is too large Load Diff

2476
po/ru.po Normal file

File diff suppressed because it is too large Load Diff

1
revision_number Normal file
View File

@ -0,0 +1 @@
unstable10

58
src/Makefile.am Normal file
View File

@ -0,0 +1,58 @@
## Process this file with automake to produce Makefile.in
AM_CFLAGS = -Wall
INCLUDES = \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
@PACKAGE_CFLAGS@
bin_PROGRAMS = bygfoot
bygfoot_SOURCES = \
callback_func.c callback_func.h \
callbacks.c callbacks.h \
editor_callback_func.c editor_callback_func.h \
editor_callbacks.c editor_callbacks.h \
editor_interface.c editor_interface.h \
file.c file.h \
finance.c finance.h \
fixture.c fixture.h \
free.c free.h \
game.c game.h \
game_gui.c game_gui.h \
generation.c generation.h \
graph.c graph.h \
gui.c gui.h \
history.c history.h \
interface.c callbacks.h interface.h support.h \
league.c league.h \
load_save.c load_save.h \
main.c main.h \
maths.c maths.h \
misc.c misc.h \
misc_callbacks.c misc_callbacks.h \
misc_callback_func.c misc_callback_func.h \
misc_interface.c misc_interface.h misc_callbacks.h support.h \
misc2_callbacks.c misc2_callbacks.h \
misc2_interface.c misc2_interface.h misc2_callbacks.h support.h \
option.c option.h \
options_callbacks.c options_callbacks.h \
options_interface.c options_interface.h options_callbacks.h support.h \
player.c player.h \
startup.c startup.h \
support.c support.h \
team.c team.h \
transfer.c transfer.h \
treeview.c treeview.h \
treeview_cell.c treeview_cell.h \
window.c window.h \
xml_fixtures.c xml_fixtures.h \
xml_country.c xml_country.h \
xml_cup.c xml_cup.h \
xml_general.c xml_general.h \
xml_league.c xml_league.h \
xml_teams.c xml_teams.h \
xml.c xml.h
bygfoot_LDADD = @PACKAGE_LIBS@ $(INTLLIBS)

72
src/bygfoot.h Normal file
View File

@ -0,0 +1,72 @@
#ifndef BYGFOOT_H
#define BYGFOOT_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
#include "gettext.h"
/**
* Program version number.
*/
#define VERS "1.9.0"
/**
* Convenience macros, used for string sizes (typically buf[SMALL]).
*/
#define SMALL 10000
#define BIG 1000000
/**
* Exit codes.
*/
enum ExitCodes
{
EXIT_OK = 0, /**< Normal exit. */
EXIT_DIR_OPEN, /**< Exit when the $HOME/.bygfoot/definitions directory can't be opened. */
EXIT_PRINT_ERROR, /**< Exit when the print_error function is called on a set error.*/
EXIT_END
};
typedef struct _Country Country;
/**
* A struct representing a country.
*/
struct _Country
{
GString *name, /**< Name of the country. */
*symbol, /**< Symbol of the country, e.g. a flag pixmap. */
*id; /**< Id of the country, e.g. 'england'. */
/** Leagues, cups and supercups arrays. */
GArray *leagues,
*cups,
*supercups;
};
/** Convenience abbreviation. */
#define ligs country.leagues
/** Convenience abbreviation. */
#define lig(i) g_array_index(country.leagues, League, i)
/** Convenience abbreviation. */
#define cps country.cups
/** Convenience abbreviation. */
#define cp(i) g_array_index(country.cups, Cup, i)
gint my_team;
/** The font used in treeviews. */
GString *font_name;
/** The pointer to the main window of the game. */
GtkWidget *main_window;
#endif

0
src/callback_func.c Normal file
View File

0
src/callback_func.h Normal file
View File

401
src/callbacks.c Normal file
View File

@ -0,0 +1,401 @@
#include "callbacks.h"
gboolean
on_button_quit_clicked (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
return FALSE;
}
void
on_menu_new_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_menu_open_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_menu_save_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_menu_save_as_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_menu_options_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_start_editor_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_start_update_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_menu_quit_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_menu_about_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_menu_team_editor_help_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_button_load_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_save_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_options_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_optionmenu_quick_opt_changed (GtkOptionMenu *optionmenu,
gpointer user_data)
{
}
void
on_button_back_to_main_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_transfers_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_fin_stad_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_preview_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_optionmenu_figures_changed (GtkOptionMenu *optionmenu,
gpointer user_data)
{
}
void
on_button_new_week_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_help_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_show_info_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_show_statistics_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_put_on_transfer_list_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_remove_from_transfer_list_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_fire_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_shoots_penalties_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
gboolean
on_player_list_button_press_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
return FALSE;
}
gboolean
on_player_list2_button_press_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
return FALSE;
}
void
on_style_optionmenu_changed (GtkOptionMenu *optionmenu,
gpointer user_data)
{
}
void
on_checkbutton_boost_toggled (GtkToggleButton *togglebutton,
gpointer user_data)
{
}
void
on_structure_entry_activate (GtkEntry *entry,
gpointer user_data)
{
}
void
on_structure_button_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_rearrange_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_undo_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_scout_optionmenu_changed (GtkOptionMenu *optionmenu,
gpointer user_data)
{
}
void
on_optionmenu_physio_changed (GtkOptionMenu *optionmenu,
gpointer user_data)
{
}
gboolean
on_player_info_button_press_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
return FALSE;
}
void
on_button_browse_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_browse_forward_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_browse_back_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_league_results_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_optionmenu_finstad_changed (GtkOptionMenu *optionmenu,
gpointer user_data)
{
}
void
on_spin_fee_activate (GtkEntry *entry,
gpointer user_data)
{
}
void
on_button_transfer_ok_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_fixtures_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_tables_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_optionmenu_fixtures_changed (GtkOptionMenu *optionmenu,
gpointer user_data)
{
}

209
src/callbacks.h Normal file
View File

@ -0,0 +1,209 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
#include "interface.h"
#include "support.h"
gboolean
on_button_quit_clicked (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
void
on_menu_new_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menu_open_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menu_save_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menu_save_as_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menu_options_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_start_editor_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_start_update_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menu_quit_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menu_about_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menu_team_editor_help_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_button_load_clicked (GtkButton *button,
gpointer user_data);
void
on_button_save_clicked (GtkButton *button,
gpointer user_data);
void
on_button_options_clicked (GtkButton *button,
gpointer user_data);
void
on_optionmenu_quick_opt_changed (GtkOptionMenu *optionmenu,
gpointer user_data);
void
on_button_back_to_main_clicked (GtkButton *button,
gpointer user_data);
void
on_button_transfers_clicked (GtkButton *button,
gpointer user_data);
void
on_button_fin_stad_clicked (GtkButton *button,
gpointer user_data);
void
on_button_preview_clicked (GtkButton *button,
gpointer user_data);
void
on_optionmenu_figures_changed (GtkOptionMenu *optionmenu,
gpointer user_data);
void
on_button_new_week_clicked (GtkButton *button,
gpointer user_data);
void
on_button_help_clicked (GtkButton *button,
gpointer user_data);
void
on_show_info_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_show_statistics_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_put_on_transfer_list_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_remove_from_transfer_list_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_fire_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_shoots_penalties_activate (GtkMenuItem *menuitem,
gpointer user_data);
gboolean
on_player_list_button_press_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
gboolean
on_player_list2_button_press_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
void
on_style_optionmenu_changed (GtkOptionMenu *optionmenu,
gpointer user_data);
void
on_checkbutton_boost_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_structure_entry_activate (GtkEntry *entry,
gpointer user_data);
void
on_structure_button_clicked (GtkButton *button,
gpointer user_data);
void
on_button_rearrange_clicked (GtkButton *button,
gpointer user_data);
void
on_button_undo_clicked (GtkButton *button,
gpointer user_data);
void
on_scout_optionmenu_changed (GtkOptionMenu *optionmenu,
gpointer user_data);
void
on_optionmenu_physio_changed (GtkOptionMenu *optionmenu,
gpointer user_data);
gboolean
on_player_info_button_press_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
void
on_button_browse_clicked (GtkButton *button,
gpointer user_data);
void
on_button_browse_forward_clicked (GtkButton *button,
gpointer user_data);
void
on_button_browse_back_clicked (GtkButton *button,
gpointer user_data);
void
on_button_league_results_clicked (GtkButton *button,
gpointer user_data);
void
on_optionmenu_finstad_changed (GtkOptionMenu *optionmenu,
gpointer user_data);
void
on_spin_fee_activate (GtkEntry *entry,
gpointer user_data);
void
on_button_transfer_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_button_fixtures_clicked (GtkButton *button,
gpointer user_data);
void
on_button_tables_clicked (GtkButton *button,
gpointer user_data);
void
on_optionmenu_fixtures_changed (GtkOptionMenu *optionmenu,
gpointer user_data);

View File

View File

175
src/editor_callbacks.c Normal file
View File

@ -0,0 +1,175 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
#include "editor_callbacks.h"
#include "editor_interface.h"
#include "support.h"
gboolean
on_button_exit_clicked (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
return FALSE;
}
void
on_button_choose_def_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_entry_country_file_changed (GtkEditable *editable,
gpointer user_data)
{
}
void
on_button_browse_team_files_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_entry_team_changed (GtkEditable *editable,
gpointer user_data)
{
}
void
on_button_change_structures_clicked (GtkEntry *entry,
gpointer user_data)
{
}
void
on_spinbutton_average_skill_value_changed
(GtkSpinButton *spinbutton,
gpointer user_data)
{
}
gboolean
on_treeview_players_button_press_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
return FALSE;
}
void
on_button_update_clicked (GtkEntry *entry,
gpointer user_data)
{
}
void
on_button_prev_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_next_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_swap_clicked (GtkEntry *entry,
gpointer user_data)
{
}
void
on_button_up_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_down_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_editor_help_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_save_defs_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_import_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_export_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_play_ws_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_save_play_clicked (GtkButton *button,
gpointer user_data)
{
}

85
src/editor_callbacks.h Normal file
View File

@ -0,0 +1,85 @@
#include <gtk/gtk.h>
gboolean
on_button_exit_clicked (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
void
on_button_choose_def_clicked (GtkButton *button,
gpointer user_data);
void
on_entry_country_file_changed (GtkEditable *editable,
gpointer user_data);
void
on_button_browse_team_files_clicked (GtkButton *button,
gpointer user_data);
void
on_entry_team_changed (GtkEditable *editable,
gpointer user_data);
void
on_button_change_structures_clicked (GtkEntry *entry,
gpointer user_data);
void
on_spinbutton_average_skill_value_changed
(GtkSpinButton *spinbutton,
gpointer user_data);
gboolean
on_treeview_players_button_press_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
void
on_button_update_clicked (GtkEntry *entry,
gpointer user_data);
void
on_button_prev_clicked (GtkButton *button,
gpointer user_data);
void
on_button_next_clicked (GtkButton *button,
gpointer user_data);
void
on_button_swap_clicked (GtkEntry *entry,
gpointer user_data);
void
on_button_up_clicked (GtkButton *button,
gpointer user_data);
void
on_button_down_clicked (GtkButton *button,
gpointer user_data);
void
on_button_editor_help_clicked (GtkButton *button,
gpointer user_data);
void
on_button_save_defs_clicked (GtkButton *button,
gpointer user_data);
void
on_button_import_clicked (GtkButton *button,
gpointer user_data);
void
on_button_export_clicked (GtkButton *button,
gpointer user_data);
void
on_button_play_ws_clicked (GtkButton *button,
gpointer user_data);
void
on_button_save_play_clicked (GtkButton *button,
gpointer user_data);

0
src/editor_defs.h Normal file
View File

1035
src/editor_interface.c Normal file

File diff suppressed because it is too large Load Diff

5
src/editor_interface.h Normal file
View File

@ -0,0 +1,5 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
GtkWidget* create_editor_window (void);

0
src/enums.h Normal file
View File

63
src/file.c Normal file
View File

@ -0,0 +1,63 @@
#include "file.h"
/**
Retrieve those files in the given directory
that start with the given prefix. The file names are stored
in an array of GStrings.
@param dir_name The full path to the directory.
@param prefix The prefix that files must have to be included.
@return A GPtrArray with pointers to the GStrings of the file
names. The GStrings and the array must be freed with file_dir_free_contents().
@see file_dir_free_contents()
*/
GPtrArray*
file_dir_get_contents(const gchar *dir_name, const gchar *prefix)
{
GError *error = NULL;
GDir *dir = g_dir_open(dir_name, 0, &error);
GPtrArray *contents = NULL;
GString *new = NULL;
const gchar *file = NULL;
misc_print_error(error, FALSE);
if(dir == NULL)
return NULL;
file = g_dir_read_name(dir);
if(file != NULL)
contents = g_ptr_array_new();
while(file != NULL)
{
if(g_str_has_prefix(file, prefix))
{
new = g_string_new(file);
g_ptr_array_add(contents, (gpointer)new);
}
file = g_dir_read_name(dir);
}
g_dir_close(dir);
return contents;
}
/**
Free a GPtrArray containing GStrings.
@param dir_contents The array to be freed.
*/
void
file_dir_free_contents(GPtrArray *dir_contents)
{
gint i;
if(dir_contents == NULL)
return;
for(i=0;i<dir_contents->len;i++)
g_string_free((GString*)g_ptr_array_index(dir_contents, i), TRUE);
g_ptr_array_free(dir_contents, TRUE);
}

13
src/file.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef FILE_H
#define FILE_H
#include "bygfoot.h"
#include "misc.h"
GPtrArray*
file_dir_get_contents(const gchar *dir_name, const gchar *prefix);
void
file_dir_free_contents(GPtrArray *dir_contents);
#endif

0
src/finance.c Normal file
View File

0
src/finance.h Normal file
View File

0
src/fixture.c Normal file
View File

0
src/fixture.h Normal file
View File

106
src/free.c Normal file
View File

@ -0,0 +1,106 @@
#include "free.h"
/**
Free all memory allocated by the program.
This mainly means we have to free a lot of GStrings
and GArrays. */
void
free_memory(void)
{
free_country();
if(font_name != NULL)
{
g_string_free(font_name, TRUE);
font_name = NULL;
}
}
/**
Free the main variable of the game, #country.
*/
void
free_country(void)
{
gint i;
GString **strings[3] =
{&country.name, &country.symbol, &country.id};
GArray **arrays[3] =
{&ligs, &cps, &country.supercups};
for(i=0;i<3;i++)
{
if(*strings[i] != NULL)
{
g_string_free(*strings[i], TRUE);
*strings[i] = NULL;
}
}
if(ligs != NULL)
for(i=0;i<ligs->len;i++)
free_league(&(g_array_index(ligs, League, i)));
for(i=0;i<3;i++)
{
if(*arrays[i] != NULL)
{
g_array_free(*arrays[i], TRUE);
*arrays[i] = NULL;
}
}
}
/**
Free the memory occupied by a league.
@param league The pointer to the league we free.
*/
void
free_league(League *league)
{
gint i;
GString **strings[8] =
{&league->name,
&league->short_name,
&league->symbol,
&league->id,
&league->prom_rel.prom_games_cup_id,
&league->prom_rel.prom_games_dest_id,
&league->table.name,
&league->table.league_id};
GArray **arrays[3] =
{&league->teams,
&league->prom_rel.elements,
&league->table.elements};
for(i=0;i<8;i++)
if(*strings[i] != NULL)
{
g_string_free(*strings[i], TRUE);
*strings[i] = NULL;
}
if(league->teams != NULL)
for(i=0;i<league->teams->len;i++)
free_team(&(g_array_index(league->teams, Team, i)));
for(i=0;i<3;i++)
if(*arrays[i] != NULL)
{
g_array_free(*arrays[i], TRUE);
*arrays[i] = NULL;
}
}
/**
Free the memory occupied by a team.
@param team The pointer to the team we free.
*/
void
free_team(Team *team)
{
if(team->name != NULL)
{
g_string_free(team->name, TRUE);
team->name = NULL;
}
}

20
src/free.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef FREE_H
#define FREE_H
#include "bygfoot.h"
#include "league.h"
#include "variables.h"
void
free_memory(void);
void
free_country(void);
void
free_league(League *league);
void
free_team(Team *team);
#endif

0
src/game.c Normal file
View File

0
src/game.h Normal file
View File

0
src/game_gui.c Normal file
View File

0
src/game_gui.h Normal file
View File

0
src/generation.c Normal file
View File

0
src/generation.h Normal file
View File

22
src/gettext.h Normal file
View File

@ -0,0 +1,22 @@
/**
* Standard gettext macros.
*/
#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define textdomain(String) (String)
# define gettext(String) (String)
# define dgettext(Domain,Message) (Message)
# define dcgettext(Domain,Message,Type) (Message)
# define bindtextdomain(Domain,Directory) (Domain)
# define _(String) (String)
# define N_(String) (String)
#endif

0
src/graph.c Normal file
View File

0
src/graph.h Normal file
View File

81
src/gui.c Normal file
View File

@ -0,0 +1,81 @@
#include "gui.h"
/**
The list of directories the find_support_file() function
searches for support files (e.g. pixmaps or text files).
@see find_support_file()
@see add_support_directory_recursive()
*/
static GList *support_directories = NULL;
/**
Add the specified directory to the list of directories find_support_file()
searches for support files.
Any subdirectories are added recursively.
@param directory The full path of the directory to be added.
@see find_support_file()
@see #support_directories
*/
void
add_support_directory_recursive (const gchar *directory)
{
GDir *newdir =
g_dir_open(directory, 0, NULL);
const gchar *file;
gchar *fullpath;
if(newdir == NULL)
return;
add_pixmap_directory(directory);
support_directories = g_list_prepend (support_directories,
g_strdup (directory));
while(TRUE)
{
file = g_dir_read_name(newdir);
if(file == NULL)
break;
fullpath = g_strdup_printf ("%s%s%s", directory,
G_DIR_SEPARATOR_S, file);
if(g_file_test(fullpath, G_FILE_TEST_IS_DIR))
add_support_directory_recursive(fullpath);
g_free(fullpath);
}
g_dir_close(newdir);
}
/**
Search the list of support directories for a given file and return
the full path name.
The return value must be freed.
@param filename The name of the file we look for (without path).
@return A pointer to the full path string of the file or NULL if
we didn't find the file. The gchar* must be freed.
@see #support_directories
@see add_support_directory_recursive()
*/
gchar*
find_support_file (const gchar *filename)
{
GList *elem;
/* We step through each of the pixmaps directory to find it. */
elem = support_directories;
while (elem)
{
gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
G_DIR_SEPARATOR_S, filename);
if (g_file_test (pathname, G_FILE_TEST_EXISTS))
return pathname;
g_free (pathname);
elem = elem->next;
}
return NULL;
}

13
src/gui.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef GUI_H
#define GUI_H
#include "bygfoot.h"
#include "support.h"
void
add_support_directory_recursive (const gchar *directory);
gchar*
find_support_file (const gchar *filename);
#endif

0
src/history.c Normal file
View File

0
src/history.h Normal file
View File

1764
src/interface.c Normal file

File diff suppressed because it is too large Load Diff

5
src/interface.h Normal file
View File

@ -0,0 +1,5 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
GtkWidget* create_main_window (void);

48
src/league.c Normal file
View File

@ -0,0 +1,48 @@
#include "league.h"
/**
Create a new league with some default values.
@return The league we created.
@see League
*/
League
league_new(void)
{
League new;
new.name = g_string_new("");
new.id = g_string_new("");
new.short_name = g_string_new("");
new.symbol = g_string_new("");
new.prom_rel.prom_games_dest_id = g_string_new("");
new.prom_rel.prom_games_cup_id = g_string_new("");
new.prom_rel.elements = g_array_new(FALSE, FALSE, sizeof(PromRelElement));
new.teams = g_array_new(FALSE, FALSE, sizeof(Team));
new.table.name = g_string_new("");
new.table.league_id = g_string_new("");
new.table.elements = g_array_new(FALSE, FALSE, sizeof(TableElement));
new.first_week = new.week_gap = 1;
new.yellow_red = 1000;
return new;
}
/**
Create a new PromRelElement with default values.
@return The PromRelElement we created.
@see PromRelElement
*/
PromRelElement
prom_rel_element_new(void)
{
PromRelElement new;
new.ranks[0] = new.ranks[1] = 0;
new.dest_id = g_string_new("");
return new;
}

121
src/league.h Normal file
View File

@ -0,0 +1,121 @@
#ifndef LEAUGUE_H
#define LEAUGUE_H
#include "bygfoot.h"
#include "team.h"
typedef struct _League League;
typedef struct _Table Table;
typedef struct _TableElement TableElement;
typedef struct _PromRel PromRel;
typedef struct _PromRelElement PromRelElement;
/**
Table element values.
@see _TableElement
@see _Table
*/
enum TableElementValues
{
TABLE_PLAYED = 0,
TABLE_WON,
TABLE_DRAW,
TABLE_LOST,
TABLE_GF,
TABLE_GA,
TABLE_PTS,
TABLE_END
};
/**
An element representing a team in the tables.
@see _Table
@see #TableElementValues
*/
struct _TableElement
{
gint team_id;
gint values[TABLE_END];
};
/**
A table belonging to a league or a cup with round robin.
@see _TableElement
*/
struct _Table
{
GString *name;
GString *league_id;
GArray *elements;
};
/**
An element representing a promotion or relegation rule.
This means, a PromRelElement specifies a range of teams
that get promoted or relegated to a given league.
@see _PromRel
*/
struct _PromRelElement
{
gint ranks[2]; /**< The range of teams; default 0 and 0 */
GString *dest_id; /**< The id of the destination league. Default "" */
};
/**
This structure specifies how promotion and relegation is handled in a league.
It contains promotion and relegation rules in an array and possibly also
a rule about promotion games to be played.
@see _PromRelElement
*/
struct _PromRel
{
/** The id of the league the promotion games winner gets promoted to. Default "" */
GString *prom_games_dest_id;
/** The id of the cup that specifies the promotion games format.
We regard the promotion games as a national cup like any other cup.
@see _Cup
*/
GString *prom_games_cup_id; /* "" */
/** Array with promotion/relegation rules.
@see _PromRelElement
*/
GArray *elements;
};
/**
Representation of a league.
@see _PromRel
@see _Table
*/
struct _League
{
/** Default value "" */
GString *name, *short_name, *id, *symbol;
/** @see _PromRel */
PromRel prom_rel;
/** Numerical id, as opposed to the string id. */
gint nid;
/** The first week games are played. Default 1. */
gint first_week;
/** Weeks between two matchdays. Default 1. */
gint week_gap;
/** Number of yellow cards until a player gets banned.
Default 1000 (which means 'off', basically). */
gint yellow_red;
/** Array of teams in the league.
@see _Team */
GArray *teams;
/** League table.
@see _Table */
Table table;
};
League
league_new(void);
PromRelElement
prom_rel_element_new(void);
#endif

0
src/load_save.c Normal file
View File

0
src/load_save.h Normal file
View File

74
src/main.c Normal file
View File

@ -0,0 +1,74 @@
/*
* Initial main.c file generated by Glade. Edit as required.
* Glade will not overwrite this file.
*/
#include "main.h"
/**
Initialize some global variables. Most of them get nullified.
*/
void
set_variables(void)
{
ligs = cps = country.supercups = NULL;
country.name = country.symbol = country.id = NULL;
font_name = g_string_new("0");
}
/**
Process the command line arguments and do some things
that have to be done at the beginning (like initializing the
random number generator).
@param argc Number of command line arguments.
@param argv Command line arguments array.
*/
void
bygfoot_init(gint argc, gchar *argv[])
{
gchar buf[SMALL];
gchar *pwd = g_get_current_dir();
/* initialize the random nr generator */
srandom((unsigned)time(NULL));
add_support_directory_recursive(PACKAGE_DATA_DIR "/" PACKAGE "/support_files");
sprintf(buf, "%s/support_files", pwd);
g_free(pwd);
add_support_directory_recursive(buf);
sprintf(buf, "%s/.bygfoot", g_get_home_dir());
add_support_directory_recursive(buf);
set_variables();
}
/**
Initialize the GTK stuff and the gettext stuff.
Start the game.
@param argc Number of command line arguments.
@param argv Command line arguments array.
*/
gint
main (gint argc, gchar *argv[])
{
#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
#endif
gtk_set_locale ();
gtk_init (&argc, &argv);
bygfoot_init(argc, argv);
window_show_startup();
gtk_main ();
free_memory();
return 0;
}

18
src/main.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef MAIN_H
#define MAIN_H
/*d*/
#include "bygfoot.h"
#include "gui.h"
#include "support.h"
#include "time.h"
#include "variables.h"
#include "window.h"
void
bygfoot_init(gint argc, gchar *argv[]);
void
set_variables(void);
#endif

132
src/maths.c Normal file
View File

@ -0,0 +1,132 @@
#include "maths.h"
/**
Generate a Gauss-distributed (pseudo)random number.
"By Box and Muller, and recommended by Knuth".
@return A Gauss-distributed random number.
*/
gfloat
gaussrand(void)
{
static gfloat V1, V2, S;
static gint phase = 0;
gfloat X;
if(phase == 0) {
do {
gfloat U1 = (gfloat)rand() / RAND_MAX;
gfloat U2 = (gfloat)rand() / RAND_MAX;
V1 = 2 * U1 - 1;
V2 = 2 * U2 - 1;
S = V1 * V1 + V2 * V2;
} while(S >= 1 || S == 0);
X = V1 * sqrt(-2 * log(S) / S);
} else
X = V2 * sqrt(-2 * log(S) / S);
phase = 1 - phase;
return X;
}
/**
Generate a Gauss-distributed random number within given boundaries
using gaussrand().
Expectation value of the distribution is (upper + lower) / 2,
the variance is so that the number is between the boundaries with probability
99,7 %. If the number isn't between the boundaries, we cut off.
@param lower Lower cutoff boundary.
@param upper Upper cutoff boundary.
@return A Gauss-distributed number
*/
gfloat
gauss_dist(gfloat lower, gfloat upper)
{
gfloat result;
result = (gfloat)(upper - lower) / 6 * gaussrand()
+ (gfloat)(upper + lower) / 2;
if(result < lower)
result = lower;
if(result > upper)
result = upper;
return result;
}
/**
Get a certain part of an integer number.
If 'place' is between 1 and 9, the 'place'th digit beginning
from the right is returned, e.g. if the number = 1234 and
place = 2, the function returns 3.
If 'place' is between 10 and 19, say 10 + x, the first
'x' digits are returned, e.g. number = 8765 and place = 12 leads to
return value 87.
If 'place' is between 20 and 29, say 20 + x, the last
'x' digits are returned, e.g. number = 4869 and place = 22
leads to return value 69.
@param value The number which gets scrutinized.
@param place The number telling the function which part of 'value' to return.
@return A part of the integer 'value'.
*/
gint
get_place(gint value, gint place)
{
if(place < 10)
return (value % (gint)powf(10, place) -
value % (gint)powf(10, place - 1)) /
(gint)powf(10, place - 1);
else if(place < 20)
{
while(value >= (gint)powf(10, place % 10))
value = (value - value % 10) / 10;
return value;
}
return value % (gint)powf(10, place % 10);
}
/**
Round an integer with given precision.
If places > 0, round with precision 'places', e.g.
number = 124566 and places = 2 leads to return value
124600.
If places < 0, precision is length of 'number' minus
'places', e.g. number = 654987 and places = -2 leads to return
value 65000.
@param number The number to be rounded.
@param places The precision.
@return The rounded integer.
*/
gint
round_integer(gint number, gint places)
{
gint length = 0;
gfloat copy = (gfloat)number;
if(places > 0)
return (gint)rint( (gfloat)number / powf(10, places) ) *
powf(10, places);
while(copy >= 1)
{
copy /= 10;
length++;
}
return (gint)rint( (gfloat)number / powf(10, length + places) ) *
powf(10, length + places);
}

26
src/maths.h Normal file
View File

@ -0,0 +1,26 @@
#ifndef MATH_H
#define MATH_H
#include <math.h>
#include "bygfoot.h"
#include "variables.h"
/**
Macros for random number generation (#rnd for float and #rndi for integer).
*/
#define rnd(lower,upper) ((gfloat)random()/(gfloat)0x7fffffff*((upper)-(lower))+(lower))
#define rndi(lower,upper) ((gint)rint( rnd((gfloat)(lower) - 0.499, (gfloat)(upper) + 0.499) ))
gfloat
gaussrand(void);
gfloat
gauss_dist(gfloat lower, gfloat upper);
gint
get_place(gint value, gint place);
gint
round_integer(gint number, gint places);
#endif

34
src/misc.c Normal file
View File

@ -0,0 +1,34 @@
#include "misc.h"
/**
Print the contents of a GError (if it was set).
If abort_program is TRUE, we free the memory
and exit the game.
@param error The GError we check.
@param abort_program Whether or not we continue or exit the program.
*/
void
misc_print_error(GError *error, gboolean abort_program)
{
gchar buf[SMALL];
if(error == NULL)
return;
sprintf(buf, "%s", error->message);
g_warning("error message: %s\n", buf);
/*d*/
/* show_popup_window(buf); */
g_error_free(error);
if(abort_program)
{
free_memory();
if(gtk_main_level() > 0)
gtk_main_quit();
exit(EXIT_PRINT_ERROR);
}
}

10
src/misc.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef MISC_H
#define MISC_H
#include "bygfoot.h"
#include "free.h"
void
misc_print_error(GError *error, gboolean abort_program);
#endif

78
src/misc2_callbacks.c Normal file
View File

@ -0,0 +1,78 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gtk/gtk.h>
#include "misc2_callbacks.h"
#include "misc2_interface.h"
#include "support.h"
gboolean
on_button_cancel_clicked (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
return FALSE;
}
void
on_button_ok_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_offer_ok_clicked (GtkButton *button,
gpointer user_data)
{
}
void
on_button_offer_cancel_clicked (GtkButton *button,
gpointer user_data)
{
}
gboolean
on_graph_window_delete_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
return FALSE;
}
void
on_optionmenu_player_changed (GtkOptionMenu *optionmenu,
gpointer user_data)
{
}
void
on_optionmenu_team_changed (GtkOptionMenu *optionmenu,
gpointer user_data)
{
}
void
on_button_close_clicked (GtkButton *button,
gpointer user_data)
{
}

36
src/misc2_callbacks.h Normal file
View File

@ -0,0 +1,36 @@
#include <gtk/gtk.h>
gboolean
on_button_cancel_clicked (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
void
on_button_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_button_offer_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_button_offer_cancel_clicked (GtkButton *button,
gpointer user_data);
gboolean
on_graph_window_delete_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
void
on_optionmenu_player_changed (GtkOptionMenu *optionmenu,
gpointer user_data);
void
on_optionmenu_team_changed (GtkOptionMenu *optionmenu,
gpointer user_data);
void
on_button_close_clicked (GtkButton *button,
gpointer user_data);

930
src/misc2_interface.c Normal file
View File

@ -0,0 +1,930 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include "misc2_callbacks.h"
#include "misc2_interface.h"
#include "support.h"
#define GLADE_HOOKUP_OBJECT(component,widget,name) \
g_object_set_data_full (G_OBJECT (component), name, \
gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
g_object_set_data (G_OBJECT (component), name, widget)
GtkWidget*
create_stadium_window (void)
{
GtkWidget *stadium_window;
GtkWidget *vbox1;
GtkWidget *hbox1;
GtkWidget *vbox2;
GtkWidget *label1;
GtkWidget *hseparator1;
GtkWidget *radiobutton_seat0;
GSList *radiobutton_seat0_group = NULL;
GtkWidget *radiobutton_seat1;
GtkWidget *radiobutton_seat2;
GtkWidget *radiobutton_seat3;
GtkWidget *vseparator1;
GtkWidget *vbox3;
GtkWidget *label2;
GtkWidget *hseparator2;
GtkWidget *label_cost0;
GtkWidget *label_cost1;
GtkWidget *label_cost2;
GtkWidget *label_cost3;
GtkWidget *vseparator2;
GtkWidget *vbox4;
GtkWidget *label3;
GtkWidget *hseparator3;
GtkWidget *label8;
GtkWidget *label_finished0;
GtkWidget *label_finished1;
GtkWidget *label_finished2;
GtkWidget *hseparator4;
GtkWidget *hbox2;
GtkWidget *button_ok;
GtkWidget *alignment1;
GtkWidget *hbox3;
GtkWidget *image1;
GtkWidget *label12;
GtkWidget *button_cancel;
GtkWidget *alignment2;
GtkWidget *hbox4;
GtkWidget *image2;
GtkWidget *label13;
GtkAccelGroup *accel_group;
GtkTooltips *tooltips;
tooltips = gtk_tooltips_new ();
accel_group = gtk_accel_group_new ();
stadium_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (stadium_window), 5);
gtk_window_set_title (GTK_WINDOW (stadium_window), _("Bygfoot - Stadium improvement"));
gtk_window_set_position (GTK_WINDOW (stadium_window), GTK_WIN_POS_CENTER);
vbox1 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox1);
gtk_container_add (GTK_CONTAINER (stadium_window), vbox1);
hbox1 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox1);
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, TRUE, 0);
vbox2 = gtk_vbox_new (FALSE, 3);
gtk_widget_show (vbox2);
gtk_box_pack_start (GTK_BOX (hbox1), vbox2, TRUE, TRUE, 0);
label1 = gtk_label_new (_("Increase (seats)"));
gtk_widget_show (label1);
gtk_box_pack_start (GTK_BOX (vbox2), label1, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label1), GTK_JUSTIFY_LEFT);
hseparator1 = gtk_hseparator_new ();
gtk_widget_show (hseparator1);
gtk_box_pack_start (GTK_BOX (vbox2), hseparator1, FALSE, TRUE, 0);
gtk_widget_set_size_request (hseparator1, 1, 10);
radiobutton_seat0 = gtk_radio_button_new_with_mnemonic (NULL, _("500"));
gtk_widget_show (radiobutton_seat0);
gtk_box_pack_start (GTK_BOX (vbox2), radiobutton_seat0, FALSE, FALSE, 0);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_seat0), radiobutton_seat0_group);
radiobutton_seat0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_seat0));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiobutton_seat0), TRUE);
radiobutton_seat1 = gtk_radio_button_new_with_mnemonic (NULL, _("1000"));
gtk_widget_show (radiobutton_seat1);
gtk_box_pack_start (GTK_BOX (vbox2), radiobutton_seat1, FALSE, FALSE, 0);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_seat1), radiobutton_seat0_group);
radiobutton_seat0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_seat1));
radiobutton_seat2 = gtk_radio_button_new_with_mnemonic (NULL, _("1500"));
gtk_widget_show (radiobutton_seat2);
gtk_box_pack_start (GTK_BOX (vbox2), radiobutton_seat2, FALSE, FALSE, 0);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_seat2), radiobutton_seat0_group);
radiobutton_seat0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_seat2));
radiobutton_seat3 = gtk_radio_button_new_with_mnemonic (NULL, _("2000"));
gtk_widget_show (radiobutton_seat3);
gtk_box_pack_start (GTK_BOX (vbox2), radiobutton_seat3, FALSE, FALSE, 0);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiobutton_seat3), radiobutton_seat0_group);
radiobutton_seat0_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiobutton_seat3));
vseparator1 = gtk_vseparator_new ();
gtk_widget_show (vseparator1);
gtk_box_pack_start (GTK_BOX (hbox1), vseparator1, FALSE, TRUE, 0);
gtk_widget_set_size_request (vseparator1, 10, 1);
vbox3 = gtk_vbox_new (FALSE, 3);
gtk_widget_show (vbox3);
gtk_box_pack_start (GTK_BOX (hbox1), vbox3, TRUE, TRUE, 0);
label2 = gtk_label_new (_("Costs"));
gtk_widget_show (label2);
gtk_box_pack_start (GTK_BOX (vbox3), label2, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_LEFT);
hseparator2 = gtk_hseparator_new ();
gtk_widget_show (hseparator2);
gtk_box_pack_start (GTK_BOX (vbox3), hseparator2, FALSE, TRUE, 0);
gtk_widget_set_size_request (hseparator2, 1, 10);
label_cost0 = gtk_label_new (_("label4"));
gtk_widget_show (label_cost0);
gtk_box_pack_start (GTK_BOX (vbox3), label_cost0, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label_cost0), GTK_JUSTIFY_LEFT);
gtk_misc_set_padding (GTK_MISC (label_cost0), 0, 4);
label_cost1 = gtk_label_new (_("label5"));
gtk_widget_show (label_cost1);
gtk_box_pack_start (GTK_BOX (vbox3), label_cost1, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label_cost1), GTK_JUSTIFY_LEFT);
gtk_misc_set_padding (GTK_MISC (label_cost1), 0, 4);
label_cost2 = gtk_label_new (_("label6"));
gtk_widget_show (label_cost2);
gtk_box_pack_start (GTK_BOX (vbox3), label_cost2, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label_cost2), GTK_JUSTIFY_LEFT);
gtk_misc_set_padding (GTK_MISC (label_cost2), 0, 4);
label_cost3 = gtk_label_new (_("label7"));
gtk_widget_show (label_cost3);
gtk_box_pack_start (GTK_BOX (vbox3), label_cost3, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label_cost3), GTK_JUSTIFY_LEFT);
gtk_misc_set_padding (GTK_MISC (label_cost3), 0, 4);
vseparator2 = gtk_vseparator_new ();
gtk_widget_show (vseparator2);
gtk_box_pack_start (GTK_BOX (hbox1), vseparator2, FALSE, TRUE, 0);
gtk_widget_set_size_request (vseparator2, 10, 1);
vbox4 = gtk_vbox_new (FALSE, 3);
gtk_widget_show (vbox4);
gtk_box_pack_start (GTK_BOX (hbox1), vbox4, TRUE, TRUE, 0);
label3 = gtk_label_new (_("Finished (weeks)"));
gtk_widget_show (label3);
gtk_box_pack_start (GTK_BOX (vbox4), label3, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label3), GTK_JUSTIFY_LEFT);
hseparator3 = gtk_hseparator_new ();
gtk_widget_show (hseparator3);
gtk_box_pack_start (GTK_BOX (vbox4), hseparator3, FALSE, TRUE, 0);
gtk_widget_set_size_request (hseparator3, 1, 10);
label8 = gtk_label_new (_("Before next match"));
gtk_widget_show (label8);
gtk_box_pack_start (GTK_BOX (vbox4), label8, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label8), GTK_JUSTIFY_LEFT);
gtk_misc_set_padding (GTK_MISC (label8), 0, 3);
label_finished0 = gtk_label_new (_("1-2"));
gtk_widget_show (label_finished0);
gtk_box_pack_start (GTK_BOX (vbox4), label_finished0, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label_finished0), GTK_JUSTIFY_LEFT);
gtk_misc_set_padding (GTK_MISC (label_finished0), 0, 3);
label_finished1 = gtk_label_new (_("3-4"));
gtk_widget_show (label_finished1);
gtk_box_pack_start (GTK_BOX (vbox4), label_finished1, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label_finished1), GTK_JUSTIFY_LEFT);
gtk_misc_set_padding (GTK_MISC (label_finished1), 0, 3);
label_finished2 = gtk_label_new (_("5-6"));
gtk_widget_show (label_finished2);
gtk_box_pack_start (GTK_BOX (vbox4), label_finished2, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label_finished2), GTK_JUSTIFY_LEFT);
gtk_misc_set_padding (GTK_MISC (label_finished2), 0, 3);
hseparator4 = gtk_hseparator_new ();
gtk_widget_show (hseparator4);
gtk_box_pack_start (GTK_BOX (vbox1), hseparator4, FALSE, TRUE, 0);
gtk_widget_set_size_request (hseparator4, 1, 10);
hbox2 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox2);
gtk_box_pack_start (GTK_BOX (vbox1), hbox2, FALSE, TRUE, 0);
button_ok = gtk_button_new ();
gtk_widget_show (button_ok);
gtk_box_pack_start (GTK_BOX (hbox2), button_ok, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (button_ok), 2);
gtk_tooltips_set_tip (tooltips, button_ok, _("Return"), NULL);
gtk_widget_add_accelerator (button_ok, "clicked", accel_group,
GDK_Return, 0,
GTK_ACCEL_VISIBLE);
alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment1);
gtk_container_add (GTK_CONTAINER (button_ok), alignment1);
hbox3 = gtk_hbox_new (FALSE, 2);
gtk_widget_show (hbox3);
gtk_container_add (GTK_CONTAINER (alignment1), hbox3);
image1 = gtk_image_new_from_stock ("gtk-apply", GTK_ICON_SIZE_BUTTON);
gtk_widget_show (image1);
gtk_box_pack_start (GTK_BOX (hbox3), image1, FALSE, FALSE, 0);
label12 = gtk_label_new_with_mnemonic (_("OK"));
gtk_widget_show (label12);
gtk_box_pack_start (GTK_BOX (hbox3), label12, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label12), GTK_JUSTIFY_LEFT);
button_cancel = gtk_button_new ();
gtk_widget_show (button_cancel);
gtk_box_pack_start (GTK_BOX (hbox2), button_cancel, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (button_cancel), 2);
gtk_tooltips_set_tip (tooltips, button_cancel, _("Esc"), NULL);
gtk_widget_add_accelerator (button_cancel, "clicked", accel_group,
GDK_Escape, 0,
GTK_ACCEL_VISIBLE);
alignment2 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment2);
gtk_container_add (GTK_CONTAINER (button_cancel), alignment2);
hbox4 = gtk_hbox_new (FALSE, 2);
gtk_widget_show (hbox4);
gtk_container_add (GTK_CONTAINER (alignment2), hbox4);
image2 = gtk_image_new_from_stock ("gtk-cancel", GTK_ICON_SIZE_BUTTON);
gtk_widget_show (image2);
gtk_box_pack_start (GTK_BOX (hbox4), image2, FALSE, FALSE, 0);
label13 = gtk_label_new_with_mnemonic (_("Cancel"));
gtk_widget_show (label13);
gtk_box_pack_start (GTK_BOX (hbox4), label13, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label13), GTK_JUSTIFY_LEFT);
g_signal_connect ((gpointer) stadium_window, "delete_event",
G_CALLBACK (on_button_cancel_clicked),
NULL);
g_signal_connect ((gpointer) button_ok, "clicked",
G_CALLBACK (on_button_ok_clicked),
NULL);
g_signal_connect ((gpointer) button_cancel, "clicked",
G_CALLBACK (on_button_cancel_clicked),
NULL);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (stadium_window, stadium_window, "stadium_window");
GLADE_HOOKUP_OBJECT (stadium_window, vbox1, "vbox1");
GLADE_HOOKUP_OBJECT (stadium_window, hbox1, "hbox1");
GLADE_HOOKUP_OBJECT (stadium_window, vbox2, "vbox2");
GLADE_HOOKUP_OBJECT (stadium_window, label1, "label1");
GLADE_HOOKUP_OBJECT (stadium_window, hseparator1, "hseparator1");
GLADE_HOOKUP_OBJECT (stadium_window, radiobutton_seat0, "radiobutton_seat0");
GLADE_HOOKUP_OBJECT (stadium_window, radiobutton_seat1, "radiobutton_seat1");
GLADE_HOOKUP_OBJECT (stadium_window, radiobutton_seat2, "radiobutton_seat2");
GLADE_HOOKUP_OBJECT (stadium_window, radiobutton_seat3, "radiobutton_seat3");
GLADE_HOOKUP_OBJECT (stadium_window, vseparator1, "vseparator1");
GLADE_HOOKUP_OBJECT (stadium_window, vbox3, "vbox3");
GLADE_HOOKUP_OBJECT (stadium_window, label2, "label2");
GLADE_HOOKUP_OBJECT (stadium_window, hseparator2, "hseparator2");
GLADE_HOOKUP_OBJECT (stadium_window, label_cost0, "label_cost0");
GLADE_HOOKUP_OBJECT (stadium_window, label_cost1, "label_cost1");
GLADE_HOOKUP_OBJECT (stadium_window, label_cost2, "label_cost2");
GLADE_HOOKUP_OBJECT (stadium_window, label_cost3, "label_cost3");
GLADE_HOOKUP_OBJECT (stadium_window, vseparator2, "vseparator2");
GLADE_HOOKUP_OBJECT (stadium_window, vbox4, "vbox4");
GLADE_HOOKUP_OBJECT (stadium_window, label3, "label3");
GLADE_HOOKUP_OBJECT (stadium_window, hseparator3, "hseparator3");
GLADE_HOOKUP_OBJECT (stadium_window, label8, "label8");
GLADE_HOOKUP_OBJECT (stadium_window, label_finished0, "label_finished0");
GLADE_HOOKUP_OBJECT (stadium_window, label_finished1, "label_finished1");
GLADE_HOOKUP_OBJECT (stadium_window, label_finished2, "label_finished2");
GLADE_HOOKUP_OBJECT (stadium_window, hseparator4, "hseparator4");
GLADE_HOOKUP_OBJECT (stadium_window, hbox2, "hbox2");
GLADE_HOOKUP_OBJECT (stadium_window, button_ok, "button_ok");
GLADE_HOOKUP_OBJECT (stadium_window, alignment1, "alignment1");
GLADE_HOOKUP_OBJECT (stadium_window, hbox3, "hbox3");
GLADE_HOOKUP_OBJECT (stadium_window, image1, "image1");
GLADE_HOOKUP_OBJECT (stadium_window, label12, "label12");
GLADE_HOOKUP_OBJECT (stadium_window, button_cancel, "button_cancel");
GLADE_HOOKUP_OBJECT (stadium_window, alignment2, "alignment2");
GLADE_HOOKUP_OBJECT (stadium_window, hbox4, "hbox4");
GLADE_HOOKUP_OBJECT (stadium_window, image2, "image2");
GLADE_HOOKUP_OBJECT (stadium_window, label13, "label13");
GLADE_HOOKUP_OBJECT_NO_REF (stadium_window, tooltips, "tooltips");
gtk_window_add_accel_group (GTK_WINDOW (stadium_window), accel_group);
return stadium_window;
}
GtkWidget*
create_job_offer_window (void)
{
GtkWidget *job_offer_window;
GtkWidget *vbox5;
GtkWidget *label20;
GtkWidget *hseparator5;
GtkWidget *hbox5;
GtkWidget *vbox6;
GtkWidget *label15;
GtkWidget *label16;
GtkWidget *label17;
GtkWidget *label18;
GtkWidget *label19;
GtkWidget *label14;
GtkWidget *vseparator3;
GtkWidget *vbox7;
GtkWidget *label21;
GtkWidget *label22;
GtkWidget *label23;
GtkWidget *label24;
GtkWidget *label25;
GtkWidget *label26;
GtkWidget *hseparator6;
GtkWidget *label28;
GtkWidget *scrolledwindow1;
GtkWidget *treeview_player_list;
GtkWidget *hseparator7;
GtkWidget *label27;
GtkWidget *hbox6;
GtkWidget *button_ok;
GtkWidget *alignment5;
GtkWidget *hbox9;
GtkWidget *image5;
GtkWidget *label31;
GtkWidget *button_cancel;
GtkWidget *alignment4;
GtkWidget *hbox8;
GtkWidget *image4;
GtkWidget *label30;
job_offer_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (job_offer_window), 6);
gtk_window_set_title (GTK_WINDOW (job_offer_window), _("Job offer"));
gtk_window_set_position (GTK_WINDOW (job_offer_window), GTK_WIN_POS_CENTER);
gtk_window_set_default_size (GTK_WINDOW (job_offer_window), -1, 600);
vbox5 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox5);
gtk_container_add (GTK_CONTAINER (job_offer_window), vbox5);
label20 = gtk_label_new (_("label20"));
gtk_widget_show (label20);
gtk_box_pack_start (GTK_BOX (vbox5), label20, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label20), GTK_JUSTIFY_LEFT);
hseparator5 = gtk_hseparator_new ();
gtk_widget_show (hseparator5);
gtk_box_pack_start (GTK_BOX (vbox5), hseparator5, FALSE, TRUE, 0);
gtk_widget_set_size_request (hseparator5, 1, 10);
hbox5 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox5);
gtk_box_pack_start (GTK_BOX (vbox5), hbox5, FALSE, TRUE, 0);
vbox6 = gtk_vbox_new (FALSE, 3);
gtk_widget_show (vbox6);
gtk_box_pack_start (GTK_BOX (hbox5), vbox6, FALSE, TRUE, 0);
label15 = gtk_label_new (_("Name"));
gtk_widget_show (label15);
gtk_box_pack_start (GTK_BOX (vbox6), label15, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label15), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (label15), 2.23517e-10, 0.5);
label16 = gtk_label_new (_("League"));
gtk_widget_show (label16);
gtk_box_pack_start (GTK_BOX (vbox6), label16, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label16), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (label16), 2.23517e-10, 0.5);
label17 = gtk_label_new (_("Rank"));
gtk_widget_show (label17);
gtk_box_pack_start (GTK_BOX (vbox6), label17, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label17), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (label17), 2.23517e-10, 0.5);
label18 = gtk_label_new (_("Money (approx.)"));
gtk_widget_show (label18);
gtk_box_pack_start (GTK_BOX (vbox6), label18, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label18), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (label18), 2.23517e-10, 0.5);
label19 = gtk_label_new (_("Stadium capacity"));
gtk_widget_show (label19);
gtk_box_pack_start (GTK_BOX (vbox6), label19, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label19), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (label19), 2.23517e-10, 0.5);
label14 = gtk_label_new (_("Stadium safety"));
gtk_widget_show (label14);
gtk_box_pack_start (GTK_BOX (vbox6), label14, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label14), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment (GTK_MISC (label14), 0, 0.5);
vseparator3 = gtk_vseparator_new ();
gtk_widget_show (vseparator3);
gtk_box_pack_start (GTK_BOX (hbox5), vseparator3, FALSE, TRUE, 0);
gtk_widget_set_size_request (vseparator3, 10, 1);
vbox7 = gtk_vbox_new (FALSE, 3);
gtk_widget_show (vbox7);
gtk_box_pack_start (GTK_BOX (hbox5), vbox7, TRUE, TRUE, 0);
label21 = gtk_label_new (_("label21"));
gtk_widget_show (label21);
gtk_box_pack_start (GTK_BOX (vbox7), label21, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label21), GTK_JUSTIFY_LEFT);
label22 = gtk_label_new (_("label22"));
gtk_widget_show (label22);
gtk_box_pack_start (GTK_BOX (vbox7), label22, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label22), GTK_JUSTIFY_LEFT);
label23 = gtk_label_new (_("label23"));
gtk_widget_show (label23);
gtk_box_pack_start (GTK_BOX (vbox7), label23, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label23), GTK_JUSTIFY_LEFT);
label24 = gtk_label_new (_("label24"));
gtk_widget_show (label24);
gtk_box_pack_start (GTK_BOX (vbox7), label24, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label24), GTK_JUSTIFY_LEFT);
label25 = gtk_label_new (_("label25"));
gtk_widget_show (label25);
gtk_box_pack_start (GTK_BOX (vbox7), label25, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label25), GTK_JUSTIFY_LEFT);
label26 = gtk_label_new (_("label26"));
gtk_widget_show (label26);
gtk_box_pack_start (GTK_BOX (vbox7), label26, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label26), GTK_JUSTIFY_LEFT);
hseparator6 = gtk_hseparator_new ();
gtk_widget_show (hseparator6);
gtk_box_pack_start (GTK_BOX (vbox5), hseparator6, FALSE, TRUE, 0);
gtk_widget_set_size_request (hseparator6, 1, 10);
label28 = gtk_label_new (_("Player list"));
gtk_widget_show (label28);
gtk_box_pack_start (GTK_BOX (vbox5), label28, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label28), GTK_JUSTIFY_LEFT);
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (scrolledwindow1);
gtk_box_pack_start (GTK_BOX (vbox5), scrolledwindow1, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow1), 4);
treeview_player_list = gtk_tree_view_new ();
gtk_widget_show (treeview_player_list);
gtk_container_add (GTK_CONTAINER (scrolledwindow1), treeview_player_list);
hseparator7 = gtk_hseparator_new ();
gtk_widget_show (hseparator7);
gtk_box_pack_start (GTK_BOX (vbox5), hseparator7, FALSE, TRUE, 0);
gtk_widget_set_size_request (hseparator7, 1, 10);
label27 = gtk_label_new (_("label27"));
gtk_widget_show (label27);
gtk_box_pack_start (GTK_BOX (vbox5), label27, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label27), GTK_JUSTIFY_LEFT);
gtk_misc_set_padding (GTK_MISC (label27), 0, 5);
hbox6 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox6);
gtk_box_pack_start (GTK_BOX (vbox5), hbox6, FALSE, TRUE, 0);
button_ok = gtk_button_new ();
gtk_widget_show (button_ok);
gtk_box_pack_start (GTK_BOX (hbox6), button_ok, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (button_ok), 2);
alignment5 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment5);
gtk_container_add (GTK_CONTAINER (button_ok), alignment5);
hbox9 = gtk_hbox_new (FALSE, 2);
gtk_widget_show (hbox9);
gtk_container_add (GTK_CONTAINER (alignment5), hbox9);
image5 = gtk_image_new_from_stock ("gtk-apply", GTK_ICON_SIZE_BUTTON);
gtk_widget_show (image5);
gtk_box_pack_start (GTK_BOX (hbox9), image5, FALSE, FALSE, 0);
label31 = gtk_label_new_with_mnemonic (_("OK"));
gtk_widget_show (label31);
gtk_box_pack_start (GTK_BOX (hbox9), label31, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label31), GTK_JUSTIFY_LEFT);
button_cancel = gtk_button_new ();
gtk_widget_show (button_cancel);
gtk_box_pack_start (GTK_BOX (hbox6), button_cancel, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (button_cancel), 2);
alignment4 = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_widget_show (alignment4);
gtk_container_add (GTK_CONTAINER (button_cancel), alignment4);
hbox8 = gtk_hbox_new (FALSE, 2);
gtk_widget_show (hbox8);
gtk_container_add (GTK_CONTAINER (alignment4), hbox8);
image4 = gtk_image_new_from_stock ("gtk-cancel", GTK_ICON_SIZE_BUTTON);
gtk_widget_show (image4);
gtk_box_pack_start (GTK_BOX (hbox8), image4, FALSE, FALSE, 0);
label30 = gtk_label_new_with_mnemonic (_("Cancel"));
gtk_widget_show (label30);
gtk_box_pack_start (GTK_BOX (hbox8), label30, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label30), GTK_JUSTIFY_LEFT);
g_signal_connect ((gpointer) button_ok, "clicked",
G_CALLBACK (on_button_offer_ok_clicked),
NULL);
g_signal_connect ((gpointer) button_cancel, "clicked",
G_CALLBACK (on_button_offer_cancel_clicked),
NULL);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (job_offer_window, job_offer_window, "job_offer_window");
GLADE_HOOKUP_OBJECT (job_offer_window, vbox5, "vbox5");
GLADE_HOOKUP_OBJECT (job_offer_window, label20, "label20");
GLADE_HOOKUP_OBJECT (job_offer_window, hseparator5, "hseparator5");
GLADE_HOOKUP_OBJECT (job_offer_window, hbox5, "hbox5");
GLADE_HOOKUP_OBJECT (job_offer_window, vbox6, "vbox6");
GLADE_HOOKUP_OBJECT (job_offer_window, label15, "label15");
GLADE_HOOKUP_OBJECT (job_offer_window, label16, "label16");
GLADE_HOOKUP_OBJECT (job_offer_window, label17, "label17");
GLADE_HOOKUP_OBJECT (job_offer_window, label18, "label18");
GLADE_HOOKUP_OBJECT (job_offer_window, label19, "label19");
GLADE_HOOKUP_OBJECT (job_offer_window, label14, "label14");
GLADE_HOOKUP_OBJECT (job_offer_window, vseparator3, "vseparator3");
GLADE_HOOKUP_OBJECT (job_offer_window, vbox7, "vbox7");
GLADE_HOOKUP_OBJECT (job_offer_window, label21, "label21");
GLADE_HOOKUP_OBJECT (job_offer_window, label22, "label22");
GLADE_HOOKUP_OBJECT (job_offer_window, label23, "label23");
GLADE_HOOKUP_OBJECT (job_offer_window, label24, "label24");
GLADE_HOOKUP_OBJECT (job_offer_window, label25, "label25");
GLADE_HOOKUP_OBJECT (job_offer_window, label26, "label26");
GLADE_HOOKUP_OBJECT (job_offer_window, hseparator6, "hseparator6");
GLADE_HOOKUP_OBJECT (job_offer_window, label28, "label28");
GLADE_HOOKUP_OBJECT (job_offer_window, scrolledwindow1, "scrolledwindow1");
GLADE_HOOKUP_OBJECT (job_offer_window, treeview_player_list, "treeview_player_list");
GLADE_HOOKUP_OBJECT (job_offer_window, hseparator7, "hseparator7");
GLADE_HOOKUP_OBJECT (job_offer_window, label27, "label27");
GLADE_HOOKUP_OBJECT (job_offer_window, hbox6, "hbox6");
GLADE_HOOKUP_OBJECT (job_offer_window, button_ok, "button_ok");
GLADE_HOOKUP_OBJECT (job_offer_window, alignment5, "alignment5");
GLADE_HOOKUP_OBJECT (job_offer_window, hbox9, "hbox9");
GLADE_HOOKUP_OBJECT (job_offer_window, image5, "image5");
GLADE_HOOKUP_OBJECT (job_offer_window, label31, "label31");
GLADE_HOOKUP_OBJECT (job_offer_window, button_cancel, "button_cancel");
GLADE_HOOKUP_OBJECT (job_offer_window, alignment4, "alignment4");
GLADE_HOOKUP_OBJECT (job_offer_window, hbox8, "hbox8");
GLADE_HOOKUP_OBJECT (job_offer_window, image4, "image4");
GLADE_HOOKUP_OBJECT (job_offer_window, label30, "label30");
return job_offer_window;
}
GtkWidget*
create_graph_window (void)
{
GtkWidget *graph_window;
GtkWidget *vbox8;
GtkWidget *label_title;
GtkWidget *vbox9;
GtkWidget *hbox10;
GtkWidget *vbox12;
GtkWidget *vbox10;
GtkWidget *label36;
GtkWidget *label37;
GtkWidget *label38;
GtkWidget *label39;
GtkWidget *label40;
GtkWidget *label41;
GtkWidget *vbox11;
GtkWidget *curve_graph;
GtkWidget *hruler_week;
GtkWidget *hruler_season;
GtkWidget *label33;
GtkWidget *hseparator8;
GtkWidget *hbox11;
GtkWidget *optionmenu_player;
GtkWidget *menu1;
GtkWidget *player1;
GtkWidget *skill_development1;
GtkWidget *goal_development1;
GtkWidget *wage_development1;
GtkWidget *value_development1;
GtkWidget *optionmenu_team;
GtkWidget *menu2;
GtkWidget *finances1;
GtkWidget *show_money_development1;
GtkWidget *points1;
GtkWidget *goal_difference1;
GtkWidget *goals_for1;
GtkWidget *goals_against1;
GtkWidget *money1;
GtkWidget *average_attendance1;
GtkWidget *button_close;
GtkWidget *alignment6;
GtkWidget *hbox14;
GtkWidget *image6;
GtkWidget *label35;
GtkAccelGroup *accel_group;
GtkTooltips *tooltips;
tooltips = gtk_tooltips_new ();
accel_group = gtk_accel_group_new ();
graph_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (graph_window), 6);
gtk_window_set_title (GTK_WINDOW (graph_window), _("window1"));
gtk_window_set_position (GTK_WINDOW (graph_window), GTK_WIN_POS_CENTER);
gtk_window_set_default_size (GTK_WINDOW (graph_window), 400, 400);
vbox8 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox8);
gtk_container_add (GTK_CONTAINER (graph_window), vbox8);
label_title = gtk_label_new (_("Statistics"));
gtk_widget_show (label_title);
gtk_box_pack_start (GTK_BOX (vbox8), label_title, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label_title), GTK_JUSTIFY_LEFT);
vbox9 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox9);
gtk_box_pack_start (GTK_BOX (vbox8), vbox9, TRUE, TRUE, 0);
hbox10 = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox10);
gtk_box_pack_start (GTK_BOX (vbox9), hbox10, TRUE, TRUE, 0);
vbox12 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox12);
gtk_box_pack_start (GTK_BOX (hbox10), vbox12, FALSE, TRUE, 0);
vbox10 = gtk_vbox_new (TRUE, 50);
gtk_widget_show (vbox10);
gtk_box_pack_start (GTK_BOX (vbox12), vbox10, TRUE, TRUE, 0);
label36 = gtk_label_new (_("label36"));
gtk_widget_show (label36);
gtk_box_pack_start (GTK_BOX (vbox10), label36, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label36), GTK_JUSTIFY_LEFT);
label37 = gtk_label_new (_("label37"));
gtk_widget_show (label37);
gtk_box_pack_start (GTK_BOX (vbox10), label37, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label37), GTK_JUSTIFY_LEFT);
label38 = gtk_label_new (_("label38"));
gtk_widget_show (label38);
gtk_box_pack_start (GTK_BOX (vbox10), label38, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label38), GTK_JUSTIFY_LEFT);
label39 = gtk_label_new (_("label39"));
gtk_widget_show (label39);
gtk_box_pack_start (GTK_BOX (vbox10), label39, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label39), GTK_JUSTIFY_LEFT);
label40 = gtk_label_new (_("label40"));
gtk_widget_show (label40);
gtk_box_pack_start (GTK_BOX (vbox10), label40, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label40), GTK_JUSTIFY_LEFT);
label41 = gtk_label_new ("");
gtk_widget_show (label41);
gtk_box_pack_start (GTK_BOX (vbox12), label41, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label41), GTK_JUSTIFY_LEFT);
vbox11 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox11);
gtk_box_pack_start (GTK_BOX (hbox10), vbox11, TRUE, TRUE, 0);
curve_graph = gtk_curve_new ();
gtk_widget_show (curve_graph);
gtk_box_pack_start (GTK_BOX (vbox11), curve_graph, TRUE, TRUE, 0);
gtk_curve_set_range (GTK_CURVE (curve_graph), 0, 1, 0, 1);
hruler_week = gtk_hruler_new ();
gtk_widget_show (hruler_week);
gtk_box_pack_start (GTK_BOX (vbox11), hruler_week, FALSE, FALSE, 0);
gtk_ruler_set_range (GTK_RULER (hruler_week), 0, 10, 4.75504, 10);
hruler_season = gtk_hruler_new ();
gtk_widget_show (hruler_season);
gtk_box_pack_start (GTK_BOX (vbox11), hruler_season, FALSE, TRUE, 0);
gtk_ruler_set_range (GTK_RULER (hruler_season), 0, 10, 3.83285, 10);
label33 = gtk_label_new (_("Weeks / Seasons"));
gtk_widget_show (label33);
gtk_box_pack_start (GTK_BOX (vbox9), label33, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label33), GTK_JUSTIFY_LEFT);
hseparator8 = gtk_hseparator_new ();
gtk_widget_show (hseparator8);
gtk_box_pack_start (GTK_BOX (vbox8), hseparator8, FALSE, TRUE, 0);
gtk_widget_set_size_request (hseparator8, 1, 10);
hbox11 = gtk_hbox_new (FALSE, 8);
gtk_widget_show (hbox11);
gtk_box_pack_start (GTK_BOX (vbox8), hbox11, FALSE, TRUE, 0);
optionmenu_player = gtk_option_menu_new ();
gtk_widget_show (optionmenu_player);
gtk_box_pack_start (GTK_BOX (hbox11), optionmenu_player, FALSE, FALSE, 0);
menu1 = gtk_menu_new ();
player1 = gtk_menu_item_new_with_mnemonic (_("Player"));
gtk_widget_show (player1);
gtk_container_add (GTK_CONTAINER (menu1), player1);
skill_development1 = gtk_menu_item_new_with_mnemonic (_("Skill"));
gtk_widget_show (skill_development1);
gtk_container_add (GTK_CONTAINER (menu1), skill_development1);
goal_development1 = gtk_menu_item_new_with_mnemonic (_("Goals"));
gtk_widget_show (goal_development1);
gtk_container_add (GTK_CONTAINER (menu1), goal_development1);
wage_development1 = gtk_menu_item_new_with_mnemonic (_("Wage"));
gtk_widget_show (wage_development1);
gtk_container_add (GTK_CONTAINER (menu1), wage_development1);
value_development1 = gtk_menu_item_new_with_mnemonic (_("Value"));
gtk_widget_show (value_development1);
gtk_container_add (GTK_CONTAINER (menu1), value_development1);
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu_player), menu1);
optionmenu_team = gtk_option_menu_new ();
gtk_widget_show (optionmenu_team);
gtk_box_pack_start (GTK_BOX (hbox11), optionmenu_team, FALSE, FALSE, 0);
menu2 = gtk_menu_new ();
finances1 = gtk_menu_item_new_with_mnemonic (_("Team"));
gtk_widget_show (finances1);
gtk_container_add (GTK_CONTAINER (menu2), finances1);
show_money_development1 = gtk_menu_item_new_with_mnemonic (_("Rank"));
gtk_widget_show (show_money_development1);
gtk_container_add (GTK_CONTAINER (menu2), show_money_development1);
points1 = gtk_menu_item_new_with_mnemonic (_("Points"));
gtk_widget_show (points1);
gtk_container_add (GTK_CONTAINER (menu2), points1);
goal_difference1 = gtk_menu_item_new_with_mnemonic (_("Goal difference"));
gtk_widget_show (goal_difference1);
gtk_container_add (GTK_CONTAINER (menu2), goal_difference1);
goals_for1 = gtk_menu_item_new_with_mnemonic (_("Goals for"));
gtk_widget_show (goals_for1);
gtk_container_add (GTK_CONTAINER (menu2), goals_for1);
goals_against1 = gtk_menu_item_new_with_mnemonic (_("Goals against"));
gtk_widget_show (goals_against1);
gtk_container_add (GTK_CONTAINER (menu2), goals_against1);
money1 = gtk_menu_item_new_with_mnemonic (_("Money"));
gtk_widget_show (money1);
gtk_container_add (GTK_CONTAINER (menu2), money1);
average_attendance1 = gtk_menu_item_new_with_mnemonic (_("Average attendance"));
gtk_widget_show (average_attendance1);
gtk_container_add (GTK_CONTAINER (menu2), average_attendance1);
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu_team), menu2);
button_close = gtk_button_new ();
gtk_widget_show (button_close);
gtk_box_pack_start (GTK_BOX (vbox8), button_close, FALSE, FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (button_close), 4);
gtk_tooltips_set_tip (tooltips, button_close, _("Space / Esc"), NULL);
gtk_widget_add_accelerator (button_close, "clicked", accel_group,
GDK_Escape, 0,
GTK_ACCEL_VISIBLE);
gtk_widget_add_accelerator (button_close, "clicked", accel_group,
GDK_space, 0,
GTK_ACCEL_VISIBLE);
alignment6 = gtk_alignment_new (0.5, 0.51, 0, 0);
gtk_widget_show (alignment6);
gtk_container_add (GTK_CONTAINER (button_close), alignment6);
hbox14 = gtk_hbox_new (FALSE, 2);
gtk_widget_show (hbox14);
gtk_container_add (GTK_CONTAINER (alignment6), hbox14);
image6 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_BUTTON);
gtk_widget_show (image6);
gtk_box_pack_start (GTK_BOX (hbox14), image6, FALSE, FALSE, 0);
label35 = gtk_label_new_with_mnemonic (_("Close"));
gtk_widget_show (label35);
gtk_box_pack_start (GTK_BOX (hbox14), label35, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (label35), GTK_JUSTIFY_LEFT);
g_signal_connect ((gpointer) graph_window, "delete_event",
G_CALLBACK (on_graph_window_delete_event),
NULL);
g_signal_connect ((gpointer) optionmenu_player, "changed",
G_CALLBACK (on_optionmenu_player_changed),
NULL);
g_signal_connect ((gpointer) optionmenu_team, "changed",
G_CALLBACK (on_optionmenu_team_changed),
NULL);
g_signal_connect ((gpointer) button_close, "clicked",
G_CALLBACK (on_button_close_clicked),
NULL);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (graph_window, graph_window, "graph_window");
GLADE_HOOKUP_OBJECT (graph_window, vbox8, "vbox8");
GLADE_HOOKUP_OBJECT (graph_window, label_title, "label_title");
GLADE_HOOKUP_OBJECT (graph_window, vbox9, "vbox9");
GLADE_HOOKUP_OBJECT (graph_window, hbox10, "hbox10");
GLADE_HOOKUP_OBJECT (graph_window, vbox12, "vbox12");
GLADE_HOOKUP_OBJECT (graph_window, vbox10, "vbox10");
GLADE_HOOKUP_OBJECT (graph_window, label36, "label36");
GLADE_HOOKUP_OBJECT (graph_window, label37, "label37");
GLADE_HOOKUP_OBJECT (graph_window, label38, "label38");
GLADE_HOOKUP_OBJECT (graph_window, label39, "label39");
GLADE_HOOKUP_OBJECT (graph_window, label40, "label40");
GLADE_HOOKUP_OBJECT (graph_window, label41, "label41");
GLADE_HOOKUP_OBJECT (graph_window, vbox11, "vbox11");
GLADE_HOOKUP_OBJECT (graph_window, curve_graph, "curve_graph");
GLADE_HOOKUP_OBJECT (graph_window, hruler_week, "hruler_week");
GLADE_HOOKUP_OBJECT (graph_window, hruler_season, "hruler_season");
GLADE_HOOKUP_OBJECT (graph_window, label33, "label33");
GLADE_HOOKUP_OBJECT (graph_window, hseparator8, "hseparator8");
GLADE_HOOKUP_OBJECT (graph_window, hbox11, "hbox11");
GLADE_HOOKUP_OBJECT (graph_window, optionmenu_player, "optionmenu_player");
GLADE_HOOKUP_OBJECT (graph_window, menu1, "menu1");
GLADE_HOOKUP_OBJECT (graph_window, player1, "player1");
GLADE_HOOKUP_OBJECT (graph_window, skill_development1, "skill_development1");
GLADE_HOOKUP_OBJECT (graph_window, goal_development1, "goal_development1");
GLADE_HOOKUP_OBJECT (graph_window, wage_development1, "wage_development1");
GLADE_HOOKUP_OBJECT (graph_window, value_development1, "value_development1");
GLADE_HOOKUP_OBJECT (graph_window, optionmenu_team, "optionmenu_team");
GLADE_HOOKUP_OBJECT (graph_window, menu2, "menu2");
GLADE_HOOKUP_OBJECT (graph_window, finances1, "finances1");
GLADE_HOOKUP_OBJECT (graph_window, show_money_development1, "show_money_development1");
GLADE_HOOKUP_OBJECT (graph_window, points1, "points1");
GLADE_HOOKUP_OBJECT (graph_window, goal_difference1, "goal_difference1");
GLADE_HOOKUP_OBJECT (graph_window, goals_for1, "goals_for1");
GLADE_HOOKUP_OBJECT (graph_window, goals_against1, "goals_against1");
GLADE_HOOKUP_OBJECT (graph_window, money1, "money1");
GLADE_HOOKUP_OBJECT (graph_window, average_attendance1, "average_attendance1");
GLADE_HOOKUP_OBJECT (graph_window, button_close, "button_close");
GLADE_HOOKUP_OBJECT (graph_window, alignment6, "alignment6");
GLADE_HOOKUP_OBJECT (graph_window, hbox14, "hbox14");
GLADE_HOOKUP_OBJECT (graph_window, image6, "image6");
GLADE_HOOKUP_OBJECT (graph_window, label35, "label35");
GLADE_HOOKUP_OBJECT_NO_REF (graph_window, tooltips, "tooltips");
gtk_window_add_accel_group (GTK_WINDOW (graph_window), accel_group);
return graph_window;
}
GtkWidget*
create_progressbar_window (void)
{
GtkWidget *progressbar_window;
GtkWidget *progressbar;
progressbar_window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_title (GTK_WINDOW (progressbar_window), _("window1"));
gtk_window_set_position (GTK_WINDOW (progressbar_window), GTK_WIN_POS_CENTER);
progressbar = gtk_progress_bar_new ();
gtk_widget_show (progressbar);
gtk_container_add (GTK_CONTAINER (progressbar_window), progressbar);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (progressbar_window, progressbar_window, "progressbar_window");
GLADE_HOOKUP_OBJECT (progressbar_window, progressbar, "progressbar");
return progressbar_window;
}

8
src/misc2_interface.h Normal file
View File

@ -0,0 +1,8 @@
/*
* DO NOT EDIT THIS FILE - it is generated by Glade.
*/
GtkWidget* create_stadium_window (void);
GtkWidget* create_job_offer_window (void);
GtkWidget* create_graph_window (void);
GtkWidget* create_progressbar_window (void);

14
src/misc_callback_func.c Normal file
View File

@ -0,0 +1,14 @@
#include "misc_callback_func.h"
/* show the teams from the leagues in the country in
the startup window */
void
misc_callback_show_team_list(GtkWidget *widget, const gchar *country_file)
{
GtkWidget *treeview_startup =
lookup_widget(widget, "treeview_startup");
xml_country_read(country_file);
treeview_show_team_list(GTK_TREE_VIEW(treeview_startup), FALSE);
}

12
src/misc_callback_func.h Normal file
View File

@ -0,0 +1,12 @@
#ifndef MISC_CALLBACK_FUNC_H
#define MISC_CALLBACK_FUNC_H
#include "bygfoot.h"
#include "support.h"
#include "treeview.h"
#include "xml_country.h"
void
misc_callback_show_team_list(GtkWidget *widget, const gchar *country_file);
#endif

Some files were not shown because too many files have changed in this diff Show More