1872 Commits

Author SHA1 Message Date
adamboduch
a730ae553d Removed deprecated imports from the file manager service. 2010-08-27 09:29:00 -04:00
adamboduch
2a39d81de8 Did some general cleanup in parse_file(). Added some documentation, Using
better variable names, removed commented-out code, better if-statement.
2010-08-27 08:53:27 -04:00
adamboduch
00d05b13ce Starting experimenting with a new ProgressGenerator class. This is intended
to read a buffer from the input and feed to to the output while yielding
the progress percentage.

It is just an experiment because it is intended to be generic enough to work
with several input and output types.  Currently, it needs an open file
object as input and a SAX parser as output.
2010-08-26 12:45:44 -04:00
Arjan Molenaar
39c70c34bd Revert "Added a new app property to the Element class. This will return the"
This reverts commit f38404380a441afffeb2cf4b298bec854567b8c7.
2010-08-26 10:22:25 +02:00
adamboduch
b4eaab3564 Merge branch 'master' of http://github.com/amolenaar/gaphor 2010-08-20 06:31:29 -04:00
adamboduch
6a579fb028 Created a generic FileDialog UI class used for saving and opening files.
This class takes a number of parameters that alter the way it is displayed
or behaves.

The selection property returns the file selection.  Accessing this property
is what displays the dialog, tests the response, and returns the file
selection if any.

The file manager service uses this new class for displaying dialogs.
2010-08-19 14:06:00 -04:00
Arjan Molenaar
7ea738bd92 Do explicit pygtk initialization on application startup. 2010-08-19 18:31:09 +02:00
adamboduch
f38404380a Added a new app property to the Element class. This will return the
Gaphor application instance if the element has been bound to a factory.
If the application instance exists, we can use its component methods
instead of calling zope.component directly.
2010-08-19 10:08:39 -04:00
adamboduch
dc9a2c2705 The pynsource plugin now uses a GTK FileChooserDialog instead of
a FileSelection dialog.  This is a better widget for all intents
and purposes.

Fixed an issue with a non-existent execute_button.
2010-08-18 16:13:16 -04:00
adamboduch
9438b3285d Improved the ElementFactory.flush() method by adding some documentation.
Also removed some manual garbage collection and assertions as they seemed
to serve no real purpose.

The ElementFactory.lselect() method is used for element retrieval instead
of wrapping select() in a list instance or accessing _elements directly.

The Gaphor application instance, if supplied, will handle the
ElementDeleteEvent instead of calling the _element_deleted component
adapter directly.
2010-08-18 15:04:22 -04:00
adamboduch
3fdf2e1558 Refactored the save() method of the file manager service. The method name
has changed from _save() to save().

The save() method verifies orphan references in the model before saving.
This functionality has been moved to its own method, verify_orphans().

The filename validation, which makes sure the filename has a valid
extension, has also been moved to a separate method - verify_filename().

The save() method has also been cleaned up.  If there is no supplied filename,
the method fails immediately.  It is no longer wrapped in a large if
statement.  The try/finally statement has also been removed.
2010-08-18 10:02:56 -04:00
adamboduch
b14b407048 Refactored the file manager service load() method. Removed the manual garbage
collection.  Removed the large try except that wrapped around the entire
method body.  Cleaned up some variables and expanded the documentation.
2010-08-17 14:34:14 -04:00
adamboduch
02ae821240 Cleaned up the file manager service initialization by adding more
documentation and using better variable names.  The initialization
also uses the MAX_RECENT constant.

Fixed the get_filename() method used by the filename property.  It
wasn't actually returning anything.

Added some documentation to the set_filename() method.
2010-08-17 13:53:51 -04:00
adamboduch
fe44606ef9 Grouped the file manager service actions together and added an
"action" prefix.
2010-08-17 09:28:51 -04:00
adamboduch
8ecdcead6f Added a MAX_RECENT constant to the file manager service. This used by
update_recent_files() instead of a hard-coded integer.
2010-08-17 08:51:36 -04:00
adamboduch
b5277a11f9 FileManager.load_recent() now uses the recent_files property. 2010-08-17 08:42:34 -04:00
Adam Boduch
54ddf2a9ac Made some small improvements to the FileManager.update_recent_files() method.
Better documentation and better variable names.
2010-08-16 18:58:48 -04:00
Adam Boduch
d0866a314b Made a new recent_files property in the file manager service. This property
makes it easier to access the list of recent files from the properties
service.
2010-08-16 18:41:51 -04:00
Adam Boduch
af0d6d0b5a Created a new QuestionDialog UI class. This is part of the UI package and
can be resued by any Gaphor service.  It is used by the file manager service
instead of creating the GTK MessageDialog directly.
2010-08-16 16:45:31 -04:00
Adam Boduch
ac364d9593 Added a new StatusWindow class to replace the show_status_window() function
in the file manager service.  The class is used in the same way as the
function was, with the exact same signature.

The reason for factoring this function into the ui package is that it is
generic enough to be used by services other than the file manager.  The
new StatusWindow is strictly a ui component.
2010-08-13 14:26:01 -04:00
Adam Boduch
d6cbe53aed Added a new logging level command line option. This allows the logging level
to be specified during startup.  Added a logging level map dictionary to the
Logger class.  This is used to check the supplied logging level from the
command line.

The parsed command line options are now passed to the launch() function.
Hopefully they can be set in the main application object so that they are
accessible to services and plugins.
2010-08-13 07:15:06 -04:00
Adam Boduch
adae81ac27 Using optparse to parse options. 2010-08-12 17:38:26 -04:00
Adam Boduch
4ca58cd63c Added some logging to the file manager service. 2010-08-12 16:28:53 -04:00
Adam Boduch
d5cd254ceb Added some small doc strings to the file manager service. 2010-08-12 15:23:16 -04:00
Arjan Molenaar
5389ac1265 Separated highlight from background drawing. 2010-07-01 08:14:50 +02:00
Arjan Molenaar
522b3bd5d6 Factored out font.py. Now just use styles 2010-07-01 07:52:31 +02:00
Arjan Molenaar
c204971675 Added Color button for property page. 2010-06-30 18:53:13 +02:00
Arjan Molenaar
9e2c3f0792 Started small experiment with gradient. 2010-06-30 07:42:33 +02:00
Arjan Molenaar
8ca235ac58 Removed old TODO file. 2010-06-30 07:40:53 +02:00
Arjan Molenaar
a1e9f3154f Added French language 2010-06-30 07:26:56 +02:00
Arjan Molenaar
743ed1b6f5 Merged groupingtools and diagramtools. 2010-06-30 07:26:43 +02:00
Arjan Molenaar
da2b39fbc1 Make Dependency type normally selectable when connected.
[[#44] state:resolved]
2010-06-29 18:03:14 +02:00
Arjan Molenaar
517f50974e Simplify GroupPlacementTool 2010-06-29 08:03:34 +02:00
Arjan Molenaar
984c26dd3c Translated GroupItemTool to aspect. 2010-06-29 07:49:31 +02:00
Arjan Molenaar
3739de9190 Added Abstract toggle button to operation listing. 2010-06-28 07:26:32 +02:00
Arjan Molenaar
ace56c1cb7 Updates setup.cfg to run all tests using nose 2010-06-24 20:00:37 +02:00
Arjan Molenaar
06e3ebd0d5 Added sphinx build_doc target. 2010-06-24 08:06:23 +02:00
Arjan Molenaar
3a8f2da56c Perform reconnecting only on reconnect (otherwise loading of flow instances
will fail).
2010-06-23 06:55:16 +02:00
Antonin Delpeuch
874a5c3f69 Added French translation. 2010-06-21 07:03:17 +02:00
Arjan Molenaar
c6ae9c1bca Updated ez_setup 2010-06-18 10:18:32 +02:00
Arjan Molenaar
bca7e0ce13 Extra check for empty subject in compartment 2010-06-16 19:12:10 +02:00
Arjan Molenaar
2e29868a92 Analyzed and resolved:#53. Now can savely delete package with stereotype
definitions.
2010-06-16 19:11:28 +02:00
Arjan Molenaar
3e581744e1 Fixed typo in model. Removed operations. 2010-06-16 18:50:11 +02:00
Arjan Molenaar
2087e14789 Updated NEWS 2010-06-16 09:09:40 +02:00
Arjan Molenaar
43235bb442 Changed comment line shortcur to "K" 2010-06-16 08:01:06 +02:00
Arjan Molenaar
6c22f475b3 Fixed undo manager rollback. 2010-06-16 07:32:56 +02:00
Arjan Molenaar
966835ce9d Simplified property pages by putting visibility in the text box (no more combo) 2010-06-16 07:18:27 +02:00
Arjan Molenaar
6cb216989a Make sure property formatting works nicely when editing associations. 2010-06-16 07:04:46 +02:00
Arjan Molenaar
d7e852741c Removed debug statements 2010-06-15 06:30:27 +02:00
Arjan Molenaar
caf8f953f8 Simplified undo manager. It does not need to keep track of recursion depth. That's done by the
Transaction logic.
2010-06-14 23:05:01 +02:00