Compare commits
84 Commits
master
...
GLADE_3_7_
Author | SHA1 | Date | |
---|---|---|---|
|
a6f96e8648 | ||
|
703465fee1 | ||
|
52e604e579 | ||
|
7e38b699a5 | ||
|
506f362439 | ||
|
439a0023ea | ||
|
b7871f94c7 | ||
|
82876113e4 | ||
|
931d990a57 | ||
|
81e607ffe9 | ||
|
01632029de | ||
|
3b687eacd3 | ||
|
a8efde750c | ||
|
7562be851e | ||
|
52718afdab | ||
|
2b0b886a49 | ||
|
433e15951b | ||
|
2206156612 | ||
|
b05518e3f0 | ||
|
3e75c62574 | ||
|
97463172d8 | ||
|
9432e094df | ||
|
062bbde424 | ||
|
af7f4a36e6 | ||
|
20f158b9b0 | ||
|
3f7e53b942 | ||
|
63fe388d55 | ||
|
57901749ee | ||
|
325320f27d | ||
|
b4ab27e262 | ||
|
7f8dc0d8b6 | ||
|
607b0dde4c | ||
|
124736281b | ||
|
d2b6edef65 | ||
|
301a3aa6de | ||
|
327b18ec94 | ||
|
d0a49f682b | ||
|
b38d37e96a | ||
|
480d402d19 | ||
|
61325a5c4c | ||
|
243ab18c43 | ||
|
0b9def155b | ||
|
b0ab43c801 | ||
|
300eeca773 | ||
|
9fd4f17e81 | ||
|
c508145370 | ||
|
495612a733 | ||
|
557b5c67a5 | ||
|
d170b2d1cc | ||
|
f23270380f | ||
|
70dd8d1bf6 | ||
|
3b823d7d6a | ||
|
08e54efcdc | ||
|
cf7931adc5 | ||
|
4effe1cac4 | ||
|
34331cd71b | ||
|
8fb79754c9 | ||
|
97825010ee | ||
|
9582a157a2 | ||
|
ffb7166ef6 | ||
|
3ecf6f0a35 | ||
|
a609d62e17 | ||
|
94b9708039 | ||
|
be7e578b27 | ||
|
d2807e9d69 | ||
|
0c15328aea | ||
|
536dc86f76 | ||
|
d186619925 | ||
|
7ed8ee7730 | ||
|
7b25280b75 | ||
|
3eba9346de | ||
|
21bb93cf75 | ||
|
22e8957174 | ||
|
88024f46f2 | ||
|
93d6327cf5 | ||
|
f2f736731e | ||
|
058a7f5706 | ||
|
ed31894162 | ||
|
719ecc982f | ||
|
754eaa2ec5 | ||
|
c263759544 | ||
|
182217c3e1 | ||
|
2245d7778c | ||
|
478f59e812 |
281
ChangeLog
@ -1,3 +1,279 @@
|
|||||||
|
2011-01-06 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* NEWS: Rolling 3.7.3
|
||||||
|
|
||||||
|
2011-01-03 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* gladeui/glade-project.c, gladeui/glade-id-allocator.c: Dont index unallocated
|
||||||
|
memory when releasing a widget name that was never allocated (this can happen
|
||||||
|
for loaded widgets with a number), fixes crash when setting naming policy for
|
||||||
|
glom_developer.glade.
|
||||||
|
|
||||||
|
2010-12-31 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* gladeui/glade-project.c: Further fixing project dispose cycle, still leaking a little
|
||||||
|
bit of memory for large projects but no crashes.
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c: Fixed loaded state of use-action-appearance so that it always
|
||||||
|
loads as FALSE if there is no "related-action" at load time (closes bug 582882).
|
||||||
|
|
||||||
|
* gladeui/glade-property.c: Fixed glade_property_dup() to not incidentally sync the property
|
||||||
|
object's value as a consequence of dupping (backend uses this to write properties with custom
|
||||||
|
values and does not expect that).
|
||||||
|
|
||||||
|
* m4/python.m4: Applying patch to allow better builds on win32, patch by Dieter Verfaillie,
|
||||||
|
bug 634978.
|
||||||
|
|
||||||
|
* plugins/gtk+/gtk+.xml.in: Setting "can-focus" as "save-always" for all widgets (bug 638079).
|
||||||
|
|
||||||
|
2010-12-30 Christian Persch <chpe@gnome.org>
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-attributes.c: Use locale-independent strtod &
|
||||||
|
dtostr. Fixes bug 616787
|
||||||
|
|
||||||
|
2010-12-30 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* plugins/gtk+/gtk+.xml.in: Updated catalog for 2.22 and 2.24 symbols.
|
||||||
|
|
||||||
|
* gladeui/glade-base-editor.c, gladeui/glade-command.c: Avoid setting a null name on a widget.
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-tool-button-editor.c: Fixed unbalanced refcount of a sizegroup in the
|
||||||
|
toolbutton editor.
|
||||||
|
|
||||||
|
* gladeui/glade-base-editor.c: Remove restriction for only GtkContainer widgets.
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c, plugins/gtk+/gtk+.xml.in: Added editor to edit
|
||||||
|
GtkAction/GtkActionGroup hierarchies.
|
||||||
|
|
||||||
|
2010-12-29 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* gladeui/glade-design-view.c: Made loading progress bar nicer looking and ellipsizing.
|
||||||
|
|
||||||
|
* gladeui/Makefile.am, gladeui/glade-project.c: Changed glade-previewer install name
|
||||||
|
to glade-3-previewer, reserving the former name for parallel installable 3.10.
|
||||||
|
|
||||||
|
2010-12-28 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* gladeui/Makefile.am, gladeui/glade.h, gladeui/glade-clipboard.c, gladeui/glade-app.[ch],
|
||||||
|
src/glade-window.c, gladeui/glade-clipboard-view.[ch]:
|
||||||
|
Removed GladeClipboradView completely.
|
||||||
|
|
||||||
|
2010-12-27 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* gladeui/glade-project.c: Fixed glade-project to unset the loading flag when
|
||||||
|
loading project dependancies are not satisfied and there is an early return.
|
||||||
|
|
||||||
|
2010-12-22 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* gladeui/glade-project.[ch]: Removed dialog and added "load-progress" signal
|
||||||
|
|
||||||
|
* gladeui/glade-app.c: Protect against commands executed on loading projects
|
||||||
|
|
||||||
|
* src/glade-window.c: Added load progressbar to notebook tabs.
|
||||||
|
|
||||||
|
* gladeui/glade-project.c: Added "parse-began" signal
|
||||||
|
|
||||||
|
* gladeui/glade-design-view.c: Hide workspace and show load progress
|
||||||
|
while loading so that one cannot access project widgets during the load
|
||||||
|
(insensitive workspace was problematic and causing some loaded project
|
||||||
|
windows to be permanently insensitive).
|
||||||
|
|
||||||
|
* src/glade-window.c: Avoid any messups during project load, cannot close
|
||||||
|
projects while they are loading, etc.
|
||||||
|
|
||||||
|
2010-12-21 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
Added loading objects dialog with progress and cancel.
|
||||||
|
|
||||||
|
* src/main.c: Display window before loading command line specified projects.
|
||||||
|
|
||||||
|
* gladeui/glade-project.[ch]: Added dialog that pops up when about to load
|
||||||
|
a large project with glade_project_push_project() to push the progress and
|
||||||
|
glade_project_load_cancelled() to check and abort while loading the project.
|
||||||
|
|
||||||
|
* gladeui/glade-widget.c, gladeui/glade-widget-adaptor.c: Push progress and
|
||||||
|
abort loading when project indicates the user cancelled the load.
|
||||||
|
|
||||||
|
2010-12-20 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-label-editor.c: Dont add invisible properties to the editor,
|
||||||
|
instead the invisible editor-property gets tied to the life-cycle of the table
|
||||||
|
it would have been added to (since recently glade_editor_property() explicitly
|
||||||
|
shows/hides properties according to if thier widget actually has an instance
|
||||||
|
of the property).
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c, plugins/gtk+/glade-column-types.[ch]: Added
|
||||||
|
glade_column_type_new() to create a GladeColumnType struct properly using
|
||||||
|
g_slice_new0(). An occurance of allocating the struct with g_new0 was causing
|
||||||
|
Glade to crash when freeing the block with g_slice_free (bug 637563). Many
|
||||||
|
big thanks to Benjamin Otte for tracking down the problem.
|
||||||
|
|
||||||
|
* gladeui/glade-project.c: Applying Marco Diego Aurélio Mesquita's patch to
|
||||||
|
make the project preview only preview toplevels.
|
||||||
|
|
||||||
|
* gladeui/glade-editor.c: Fixed class header of GladeEditor to update when
|
||||||
|
widgets unload (patch by Marco Diego Aurélio Mesquita, bug 637541).
|
||||||
|
|
||||||
|
* gladeui/glade-editor-property.c, gladeui/glade-property.c, gladeui/glade-widget.c,
|
||||||
|
plugins/gtk+/glade-gtk.c: Fixing some discrepincies searching for properties as
|
||||||
|
regular properties or packing properties. Now the conflicting "position" property
|
||||||
|
on a GtkPaned widget packed into a GtkBox widget works properly (bug 637475).
|
||||||
|
|
||||||
|
2010-12-19 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c: Fix alpha_sort_box_children() to give a consistent
|
||||||
|
order to placeholders (bug 637534 fix by Marco Diego Aurélio Mesquita).
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c: Removed alpha_sort_box_children(), project needs to be
|
||||||
|
sorted with box children by position, loading process depends on this.
|
||||||
|
|
||||||
|
* gladeui/glade-widget.[ch]: Hide glade_widget_set_object(), improved reference count
|
||||||
|
balancing and fixed segfaults upon closing projects that contain filechooser dialogs
|
||||||
|
referenced by filechooserbuttons.
|
||||||
|
|
||||||
|
2010-12-18 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* src/Makefile.am, gladeui/Makefile.am, plugins/gtk+/Makefile.am, plugins/gnome/Makefile.am:
|
||||||
|
Fixed makefiles as per bug 521713 (patch initially by Daniel Macks).
|
||||||
|
|
||||||
|
* gladeui/glade-editor-property.c: Hide editor properties when the property is not available
|
||||||
|
on the widget, bug 585299, fix by Marco Diego Aurélio Mesquita.
|
||||||
|
|
||||||
|
* gladeui/glade-editor-property.c: Unload currently loaded property in
|
||||||
|
glade_editor_property_load_by_widget() when a NULL widget is specified or the property
|
||||||
|
is not found.
|
||||||
|
|
||||||
|
2010-12-17 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Added support for deprecated GtkOptionMenu.
|
||||||
|
|
||||||
|
* gladeui/glade-project.c: Restore proper sorting of objects at save time.
|
||||||
|
|
||||||
|
* gladeui/glade-property-class.c: Properly order object properties
|
||||||
|
|
||||||
|
* plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Alphabetically sort GtkBox children for save.
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c, po/*.po: Fixed 'controled' typo with updates to po files, patch
|
||||||
|
by Matt Woelfel for bug 633957.
|
||||||
|
|
||||||
|
2010-12-17 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* NEWS, configure.ac: Rolling 3.7.2.
|
||||||
|
|
||||||
|
2010-12-17 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* gladeui/glade-app.[ch]: Added glade_app_queue_selection_changed()
|
||||||
|
|
||||||
|
* gladeui/glade-command.c: queue selection changes when widgets are added, this
|
||||||
|
avoids synchrounously poking the model when the selection changes various times
|
||||||
|
in a command sequence such as changing a menu item's type.
|
||||||
|
|
||||||
|
* gladeui/glade-base-editor.c: Dont call glade_command_create/delete() directly
|
||||||
|
in change-type, keep delegating this work to build-child/delete-child signals.
|
||||||
|
|
||||||
|
* gladeui/glade-widget.[ch]: Added glade_widget_is_ancestor()
|
||||||
|
|
||||||
|
* gladeui/glade-utils.c: Change glade_util_find_iter_by_widget() to use
|
||||||
|
glade_widget_is_ancestor() and speed up searches a little this way.
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c:
|
||||||
|
- Defensively avoid crash when setting entry icon tooltips
|
||||||
|
- Add version check macro to compile with GTK+ 2.20
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c: Fixed crashes when textview's buffer is deleted, fix
|
||||||
|
by Martin Schlemmer, bug 609748.
|
||||||
|
|
||||||
|
* gladeui/glade-project.c: Fixed crasher when adjusting project naming policy (bug 622528,
|
||||||
|
thanks goes to Sébastien Granjoux and Martin Schlemmer for looking at this one).
|
||||||
|
|
||||||
|
2010-12-16 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c: Avoid using gtk_combo_box_set_entry_text_column directly (build
|
||||||
|
for GTK+ 2.20).
|
||||||
|
|
||||||
|
* gladeui/glade-project.c: Notify iter changes when the widget name changes, increment project
|
||||||
|
iter stamp before notifying row-inserted (old iters are invalid, the new iter persists),
|
||||||
|
fixed leaked GtkTreePath when rows are inserted.
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c, plugins/gtk+/gtk+.xml.in: Fixed GtkComboBox to handle cell-layout
|
||||||
|
children as well as the possible internal entry (fixes bug 581580).
|
||||||
|
|
||||||
|
* gladeui/glade-base-editor.c: Fixed glade_base_editor_dispose to not access the signal
|
||||||
|
editor, it's automatically destroyed as being a child of the editor.
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c: Set added treeviewcolumns to fixed sizing mode if the
|
||||||
|
treeview is set to use fixed height mode (closing bug 596480).
|
||||||
|
|
||||||
|
* gladeui/glade-inspector.c:
|
||||||
|
- Avoid changing project selection when selection is cleared, selection get's cleared
|
||||||
|
when the user changes a widget name and a filter is applied (removing the entry from
|
||||||
|
the filtered model), avoiding syncing project selection avoids making the editor disappear
|
||||||
|
when the user changes a widget name (fixes bug 604322).
|
||||||
|
- Also plugged some leaked objects retrieved by gtk_tree_model_get().
|
||||||
|
|
||||||
|
* gladeui/glade-editor-table.c: Fire a warning when entry is edited with no widget
|
||||||
|
loaded, also change the ->loading flag strategy for blocking signal emission instead.
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c: Fixed floating project menus when context menu is fired (bug 141714).
|
||||||
|
|
||||||
|
* gladeui/glade-project.[ch], gladeui/glade-app.[ch], src/glade-window.c: Removed notion
|
||||||
|
of project "instance_count" which is now unused.
|
||||||
|
|
||||||
|
* plugins/gtk+/gtk+.xml.in: Setting dialog type-hint default to Dialog (closes old bug 459917)
|
||||||
|
|
||||||
|
* gladeui/glade-project.c: Removing frame shadow (and label) from project preferences (bug 574098).
|
||||||
|
|
||||||
|
* plugins/gtk+/gtk+.xml.in: default adjustment page size -> 0 (bug 585085).
|
||||||
|
|
||||||
|
2010-12-15 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* gladeui/glade-project.c: Cleanup glade_project_remove_object(), make sure row_deleted is
|
||||||
|
fired before modifying internal data structures (and dont use the glade_util_ function
|
||||||
|
to find a widget iter).
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c: Fixed errors when undoing the addition of notebook pages.
|
||||||
|
The problem at length was an issue of orphaned project widgets left in the project model.
|
||||||
|
|
||||||
|
* gladeui/glade-widget.[ch], gladeui/glade-project.c, plugins/gtk+/glade-gtk.c: Cleanup
|
||||||
|
object ref count cycles, now GladeProject just releases all widgets from the project
|
||||||
|
and keeps a reference to the GladeWidget instead of the GObject, GladeWidget is now
|
||||||
|
GInitiallyUnowned and GladeProject assumes ownership when objects are added to the
|
||||||
|
project (glade-gtk.c in this patch avoids needlessly adding a widget to the project
|
||||||
|
that will be implicitly added, now glade-gtk.c does not directly manually add any
|
||||||
|
widgets to the project).
|
||||||
|
|
||||||
|
* gladeui/glade-widget.c, gladeui/glade-project.c: Fixed some final things with
|
||||||
|
new GInitiallyUnowned strategy, push superuser mode at dispose time so that
|
||||||
|
the plugin doesnt screw up, also hold a ref to widgets being rebuilt since
|
||||||
|
they can go out and into the project.
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c: Make sure any manually created glade widgets pass
|
||||||
|
through glade_widget_add_child() and get a proper ref from the parent (fixing
|
||||||
|
more last minute crahsers).
|
||||||
|
|
||||||
|
* gladeui/glade-utils.c: Fixed crasher bug 628233 partially using patch by
|
||||||
|
ramz <ramanathan.nitt@gmail.com>.
|
||||||
|
|
||||||
|
* gladeui/glade-project.c: Fix glade_project_fix_object_props() to copy the
|
||||||
|
list which risks changing order while iterating.
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c, plugins/gtk+/gtk+.xml.in: Avoid warnings when
|
||||||
|
loading glade files.
|
||||||
|
|
||||||
|
* plugins/gtk+/gtk+.xml.in: Ignore "resize-mode" property incase of crashes
|
||||||
|
(as reported in bug 622996).
|
||||||
|
|
||||||
|
* gladeui/glade-palette.c: Add a label in a box to the palette items to avoid
|
||||||
|
the evil ellipsization.
|
||||||
|
|
||||||
|
* plugins/gtk+/glade-gtk.c: Fixed crash with notebook rebuilding children (bug 365462).
|
||||||
|
|
||||||
|
2010-12-14 Tristan Van Berkom <tristanvb@openismus.com>
|
||||||
|
|
||||||
|
* Reverted 3.0 commit, now targetting this branch to the final GTK+ 2.x chapter
|
||||||
|
|
||||||
|
* Reverted the commit that removes the old fashioned "Custom Widget" handling.
|
||||||
|
|
||||||
2010-11-12 Johannes Schmid <jhs@gnome.org>
|
2010-11-12 Johannes Schmid <jhs@gnome.org>
|
||||||
|
|
||||||
* gladeui/glade-project.c:
|
* gladeui/glade-project.c:
|
||||||
@ -86,11 +362,6 @@
|
|||||||
* plugins/gtk/gtk+.xml.in, plugins/gtk/glade-gtk.c: Removed all reference to
|
* plugins/gtk/gtk+.xml.in, plugins/gtk/glade-gtk.c: Removed all reference to
|
||||||
deprecated GTK+ widgets (anything removed in 3.0).
|
deprecated GTK+ widgets (anything removed in 3.0).
|
||||||
|
|
||||||
* gladeui/Makefile.am, gladeui/glade-custom.[ch]: Removed support for old
|
|
||||||
fashioned custom widgets from glade-2.
|
|
||||||
|
|
||||||
* plugins/python/Makefile.am: Fixed to link with new core library (libgladeui-2).
|
|
||||||
|
|
||||||
2010-06-10 Javier Jardón <jjardon@gnome.org>
|
2010-06-10 Javier Jardón <jjardon@gnome.org>
|
||||||
|
|
||||||
* m4/python.m4: quote the definition of AM_CHECK_PYMOD
|
* m4/python.m4: quote the definition of AM_CHECK_PYMOD
|
||||||
|
57
NEWS
@ -1,3 +1,60 @@
|
|||||||
|
===========
|
||||||
|
Glade 3.7.3
|
||||||
|
===========
|
||||||
|
- Fixed 'controled' typo with updates to po files, patch
|
||||||
|
by Matt Woelfel for bug 633957
|
||||||
|
- Added support for deprecated GtkOptionMenu.
|
||||||
|
- Restore proper order of glade file at save time.
|
||||||
|
- Hide editor properties when the property is not available
|
||||||
|
on the widget, bug 585299, fix by Marco Diego Aurélio Mesquita.
|
||||||
|
- Fixed makefiles as per bug 521713 (patch initially by Daniel Macks)
|
||||||
|
- Fixed mixups of properties/packing properties bug 637475.
|
||||||
|
- Fixed class header of GladeEditor to update when
|
||||||
|
widgets unload (patch by Marco Diego Aurélio Mesquita, bug 637541).
|
||||||
|
- Fixed nasty crasher with column types, bug 637563, fix by Benjamin Otte.
|
||||||
|
- Added progress bar to notebook tabs while loading projects.
|
||||||
|
- Removed GladeClipboradView completely.
|
||||||
|
- Added custom editor for editing GtkActionGroup and its child actions.
|
||||||
|
- Use locale-independent strtod & dtostr. bug 616787, fix by Christian Persch.
|
||||||
|
- Applying patch to allow better builds on win32, patch by Dieter Verfaillie,
|
||||||
|
bug 634978.
|
||||||
|
- Fixed loaded state of use-action-appearance so that it always
|
||||||
|
loads as FALSE if there is no "related-action" at load time (closes bug 582882).
|
||||||
|
- Fixed other misc bugs.
|
||||||
|
|
||||||
|
|
||||||
|
===========
|
||||||
|
Glade 3.7.2
|
||||||
|
===========
|
||||||
|
- Use gtk_show_uri() instead of previous custom code in place (Javier Jardón)
|
||||||
|
- Fixed user/developer url locations (Javier Jardón)
|
||||||
|
- Fixed ComboBox and IconView to include basic actions in the popup menu
|
||||||
|
- Revived the "misc" column on the project data model (now the inspector shows
|
||||||
|
whether a widget is an internal child or a frame's label or such, again).
|
||||||
|
- Expose GtkAssistant:complete packing property (bug 529595).
|
||||||
|
- Implemented Preview feature, Glade now includes a project previewing program
|
||||||
|
that is accessible in the UI and runs as a child process (Marco Diego Aurélio Mesquita).
|
||||||
|
- Ignore "resize-mode" property incase of crashes (as reported in bug 622996).
|
||||||
|
- Fixed crash with notebook rebuilding children (bug 365462).
|
||||||
|
- Fixed crasher bug 628233 (based on patch by: ramz <ramanathan.nitt@gmail.com>).
|
||||||
|
- GladeWidget is now GInitiallyUnowned (now refcounts balance again at project close time).
|
||||||
|
- Fixed errors when undoing the addition of notebook pages.
|
||||||
|
- Default adjustment page size -> 0 (bug 585085).
|
||||||
|
- Removing frame shadow (and label) from project preferences (bug 574098).
|
||||||
|
- Setting dialog type-hint default to Dialog (closes old bug 459917).
|
||||||
|
- Fixed floating project menus when context menu is fired (bug 141714).
|
||||||
|
- Removed notion of project "instance_count" (which is by now unused).
|
||||||
|
- Avoid clearing the project selection from the inspector (fixing bug 604322).
|
||||||
|
- Set added treeviewcolumns to fixed sizing mode if the treeview is set to use
|
||||||
|
fixed height mode (closing bug 596480).
|
||||||
|
- Fixed GtkComboBox to handle cell-layout children as well as the possible internal
|
||||||
|
entry (fixes bug 581580)
|
||||||
|
- Notify GtkTreeIter changes when the widget name changes (now the inspector updates
|
||||||
|
when a widget name is changed automatically).
|
||||||
|
- Fixed crasher when adjusting project naming policy (bug 622528, thanks goes to
|
||||||
|
Sébastien Granjoux and Martin Schlemmer for looking at this one).
|
||||||
|
- Fixed crashes when textview's buffer is deleted, fix by Martin Schlemmer, bug 609748.
|
||||||
|
- Defensively avoid crash when setting entry icon tooltips on an entry with no icons set.
|
||||||
|
|
||||||
===========
|
===========
|
||||||
Glade 3.7.1
|
Glade 3.7.1
|
||||||
|
69
configure.ac
@ -4,10 +4,10 @@ AC_PREREQ(2.52)
|
|||||||
|
|
||||||
m4_define(glade_major_version, 3)
|
m4_define(glade_major_version, 3)
|
||||||
m4_define(glade_minor_version, 7)
|
m4_define(glade_minor_version, 7)
|
||||||
m4_define(glade_micro_version, 1)
|
m4_define(glade_micro_version, 2)
|
||||||
m4_define(glade_version, glade_major_version.glade_minor_version.glade_micro_version)
|
m4_define(glade_version, glade_major_version.glade_minor_version.glade_micro_version)
|
||||||
|
|
||||||
AC_INIT([glade], [glade_version],
|
AC_INIT([glade3], [glade_version],
|
||||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=glade3])
|
[http://bugzilla.gnome.org/enter_bug.cgi?product=glade3])
|
||||||
|
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
@ -53,7 +53,7 @@ AM_PROG_LIBTOOL
|
|||||||
# If any interfaces have been removed since the last public release, then set GLADE_AGE to 0.
|
# If any interfaces have been removed since the last public release, then set GLADE_AGE to 0.
|
||||||
# Reference: http://www.gnu.org/software/libtool/manual.html#Versioning
|
# Reference: http://www.gnu.org/software/libtool/manual.html#Versioning
|
||||||
GLADE_REVISION=0
|
GLADE_REVISION=0
|
||||||
GLADE_CURRENT=0
|
GLADE_CURRENT=11
|
||||||
GLADE_AGE=0
|
GLADE_AGE=0
|
||||||
GLADE_CURRENT_MINUS_AGE=`expr $GLADE_CURRENT - $GLADE_AGE`
|
GLADE_CURRENT_MINUS_AGE=`expr $GLADE_CURRENT - $GLADE_AGE`
|
||||||
AC_SUBST(GLADE_REVISION)
|
AC_SUBST(GLADE_REVISION)
|
||||||
@ -121,39 +121,9 @@ GTK_DOC_CHECK(1.9)
|
|||||||
dnl ================================================================
|
dnl ================================================================
|
||||||
dnl Check for gtk+
|
dnl Check for gtk+
|
||||||
dnl ================================================================
|
dnl ================================================================
|
||||||
# Which gtk+ API version to compile against
|
PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.20 gthread-2.0 libxml-2.0 >= 2.4.0])
|
||||||
|
|
||||||
AC_MSG_CHECKING([which gtk+ version to compile against])
|
|
||||||
AC_ARG_WITH([gtk],
|
|
||||||
[AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 3.0)])],
|
|
||||||
[case "$with_gtk" in
|
|
||||||
2.0|3.0) ;;
|
|
||||||
*) AC_MSG_ERROR([invalid gtk version specified]) ;;
|
|
||||||
esac],
|
|
||||||
[with_gtk=3.0])
|
|
||||||
AC_MSG_RESULT([$with_gtk])
|
|
||||||
|
|
||||||
case "$with_gtk" in
|
|
||||||
2.0) GTK_API_VERSION=2.0
|
|
||||||
GTK_REQUIRED=2.14.0
|
|
||||||
;;
|
|
||||||
3.0) GTK_API_VERSION=3.0
|
|
||||||
GTK_REQUIRED=2.90.0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_SUBST(GTK_LIBS)
|
AC_SUBST(GTK_LIBS)
|
||||||
AC_SUBST(GTK_CFLAGS)
|
AC_SUBST(GTK_CFLAGS)
|
||||||
AC_SUBST([GTK_API_VERSION])
|
|
||||||
|
|
||||||
AM_CONDITIONAL([HAVE_GTK_2],[test "$with_gtk" = "2.0"])
|
|
||||||
AM_CONDITIONAL([HAVE_GTK_3],[test "$with_gtk" = "3.0"])
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES([GTK],[
|
|
||||||
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
|
|
||||||
libxml-2.0 >= 2.4.0
|
|
||||||
])
|
|
||||||
|
|
||||||
|
|
||||||
dnl ================================================================
|
dnl ================================================================
|
||||||
dnl Check for the unix print widgets in gtk+
|
dnl Check for the unix print widgets in gtk+
|
||||||
@ -162,6 +132,25 @@ LIBS=$GTK_LIBS
|
|||||||
AC_CHECK_FUNCS(gtk_print_unix_dialog_new,[have_unix_print=yes]; break,[have_unix_print=no])
|
AC_CHECK_FUNCS(gtk_print_unix_dialog_new,[have_unix_print=yes]; break,[have_unix_print=no])
|
||||||
AM_CONDITIONAL(HAVE_GTK_UNIX_PRINT, test x"$have_unix_print" = "xyes")
|
AM_CONDITIONAL(HAVE_GTK_UNIX_PRINT, test x"$have_unix_print" = "xyes")
|
||||||
|
|
||||||
|
dnl ================================================================
|
||||||
|
dnl Check for optional gnome libs
|
||||||
|
dnl ================================================================
|
||||||
|
AC_ARG_ENABLE(gnome,
|
||||||
|
AS_HELP_STRING([--disable-gnome], [disable gnome catalog]),
|
||||||
|
check_gnome=$enableval, check_gnome=yes)
|
||||||
|
|
||||||
|
if test x"$check_gnome" = x"yes"; then
|
||||||
|
PKG_CHECK_MODULES(GNOME, [libbonoboui-2.0 libgnomeui-2.0],
|
||||||
|
[have_gnome=yes],[have_gnome=no])
|
||||||
|
AC_SUBST(GNOME_LIBS)
|
||||||
|
AC_SUBST(GNOME_CFLAGS)
|
||||||
|
else
|
||||||
|
have_gnome=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(BUILD_GNOME, test x"$have_gnome" = "xyes")
|
||||||
|
|
||||||
|
|
||||||
dnl ================================================================
|
dnl ================================================================
|
||||||
dnl Python for optional python dev libs
|
dnl Python for optional python dev libs
|
||||||
dnl ================================================================
|
dnl ================================================================
|
||||||
@ -260,10 +249,6 @@ if test "x$_gdk_tgt" = xquartz; then
|
|||||||
AC_SUBST(IGE_MAC_CFLAGS)
|
AC_SUBST(IGE_MAC_CFLAGS)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
AC_SUBST([GLADE_PREFIX])
|
|
||||||
|
|
||||||
|
|
||||||
AC_SUBST([AM_CPPFLAGS])
|
AC_SUBST([AM_CPPFLAGS])
|
||||||
AC_SUBST([AM_CFLAGS])
|
AC_SUBST([AM_CFLAGS])
|
||||||
AC_SUBST([AM_CXXFLAGS])
|
AC_SUBST([AM_CXXFLAGS])
|
||||||
@ -291,12 +276,16 @@ data/icons/hicolor/scalable/apps/Makefile
|
|||||||
gladeui/Makefile
|
gladeui/Makefile
|
||||||
gladeui/gladeui.rc
|
gladeui/gladeui.rc
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/glade.rc
|
src/glade-3.rc
|
||||||
plugins/Makefile
|
plugins/Makefile
|
||||||
plugins/gtk+/Makefile
|
plugins/gtk+/Makefile
|
||||||
plugins/gtk+/icons/Makefile
|
plugins/gtk+/icons/Makefile
|
||||||
plugins/gtk+/icons/16x16/Makefile
|
plugins/gtk+/icons/16x16/Makefile
|
||||||
plugins/gtk+/icons/22x22/Makefile
|
plugins/gtk+/icons/22x22/Makefile
|
||||||
|
plugins/gnome/Makefile
|
||||||
|
plugins/gnome/icons/Makefile
|
||||||
|
plugins/gnome/icons/16x16/Makefile
|
||||||
|
plugins/gnome/icons/22x22/Makefile
|
||||||
plugins/python/Makefile
|
plugins/python/Makefile
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
doc/Makefile
|
doc/Makefile
|
||||||
@ -312,8 +301,8 @@ Configuration:
|
|||||||
|
|
||||||
Source code location: ${srcdir}
|
Source code location: ${srcdir}
|
||||||
Compiler: ${CC}
|
Compiler: ${CC}
|
||||||
GTK+ version: $with_gtk
|
|
||||||
GTK+ UNIX Print Widgets: ${have_unix_print}
|
GTK+ UNIX Print Widgets: ${have_unix_print}
|
||||||
|
GNOME UI Widgets: ${have_gnome}
|
||||||
PYTHON Widgets support: ${have_python}
|
PYTHON Widgets support: ${have_python}
|
||||||
|
|
||||||
Build Reference Manual: ${enable_gtk_doc}
|
Build Reference Manual: ${enable_gtk_doc}
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
glade_app_get_type
|
glade_app_get_type
|
||||||
glade_clipboard_get_type
|
glade_clipboard_get_type
|
||||||
glade_clipboard_view_get_type
|
|
||||||
glade_command_get_type
|
glade_command_get_type
|
||||||
glade_editor_get_type
|
glade_editor_get_type
|
||||||
glade_editor_property_get_type
|
glade_editor_property_get_type
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
## Previewer
|
## Previewer
|
||||||
|
|
||||||
bin_PROGRAMS = glade-previewer
|
bin_PROGRAMS = glade-3-previewer
|
||||||
lib_LTLIBRARIES = libgladeui-2.la
|
lib_LTLIBRARIES = libgladeui-1.la
|
||||||
|
|
||||||
glade_previewer_CPPFLAGS = \
|
glade_3_previewer_CPPFLAGS = \
|
||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
-I$(top_builddir) \
|
-I$(top_builddir) \
|
||||||
-DGLADE_GNOMEHELPDIR="\"$(HELP_DIR)\""
|
-DGLADE_GNOMEHELPDIR="\"$(HELP_DIR)\"" \
|
||||||
$(AM_CPPFLAGS)
|
|
||||||
|
|
||||||
glade_previewer_CFLAGS = \
|
|
||||||
$(GTK_CFLAGS) \
|
$(GTK_CFLAGS) \
|
||||||
$(IGE_MAC_CFLAGS) \
|
$(IGE_MAC_CFLAGS) \
|
||||||
$(WARN_CFLAGS) \
|
$(WARN_CFLAGS) \
|
||||||
|
$(AM_CPPFLAGS)
|
||||||
|
|
||||||
|
glade_3_previewer_CFLAGS = \
|
||||||
$(AM_CFLAGS)
|
$(AM_CFLAGS)
|
||||||
|
|
||||||
glade_previewer_LDFLAGS = $(AM_LDFLAGS)
|
glade_3_previewer_LDFLAGS = $(AM_LDFLAGS)
|
||||||
|
|
||||||
glade_previewer_LDADD = $(top_builddir)/gladeui/libgladeui-2.la $(IGE_MAC_LIBS)
|
glade_3_previewer_LDADD = libgladeui-1.la $(IGE_MAC_LIBS)
|
||||||
|
|
||||||
glade_previewer_SOURCES = \
|
glade_3_previewer_SOURCES = \
|
||||||
glade-previewer.c
|
glade-previewer.c
|
||||||
|
|
||||||
if NATIVE_WIN32
|
if NATIVE_WIN32
|
||||||
glade_previewer_LDADD += glade-win32-res.o
|
glade_3_previewer_LDADD += glade-win32-res.o
|
||||||
if !GLADE_UNSTABLE
|
if !GLADE_UNSTABLE
|
||||||
glade_previewer_LDFLAGS += -mwindows
|
glade_3_previewer_LDFLAGS += -mwindows
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -36,8 +36,11 @@ glade-win32-res.o: glade-previewer.rc
|
|||||||
|
|
||||||
common_defines = \
|
common_defines = \
|
||||||
-DG_LOG_DOMAIN=\"GladeUI\" \
|
-DG_LOG_DOMAIN=\"GladeUI\" \
|
||||||
|
-DGLADE_DATADIR="\"$(pkgdatadir)\"" \
|
||||||
|
-DGLADE_LIBDIR="\"$(pkglibdir)\"" \
|
||||||
-DGLADE_CATALOGSDIR="\"$(pkgdatadir)/catalogs\""\
|
-DGLADE_CATALOGSDIR="\"$(pkgdatadir)/catalogs\""\
|
||||||
-DGLADE_MODULESDIR="\"$(pkglibdir)/modules\"" \
|
-DGLADE_MODULESDIR="\"$(pkglibdir)/modules\"" \
|
||||||
|
-DGLADE_PLUGINSDIR="\"$(pkglibdir)/plugins\"" \
|
||||||
-DGLADE_PIXMAPSDIR="\"$(pkgdatadir)/pixmaps\"" \
|
-DGLADE_PIXMAPSDIR="\"$(pkgdatadir)/pixmaps\"" \
|
||||||
-DGLADE_LOCALEDIR="\"$(datadir)/locale\"" \
|
-DGLADE_LOCALEDIR="\"$(datadir)/locale\"" \
|
||||||
-DGLADE_BINDIR="\"$(bindir)\""
|
-DGLADE_BINDIR="\"$(bindir)\""
|
||||||
@ -47,12 +50,13 @@ BUILT_SOURCES = glade-marshallers.c glade-marshallers.h
|
|||||||
EXTRA_DIST = glade-marshallers.list gladeui.rc.in icon-naming-spec.c glade-previewer.rc.in
|
EXTRA_DIST = glade-marshallers.list gladeui.rc.in icon-naming-spec.c glade-previewer.rc.in
|
||||||
|
|
||||||
# The glade-3 core library
|
# The glade-3 core library
|
||||||
libgladeui_2_la_SOURCES = \
|
libgladeui_1_la_SOURCES = \
|
||||||
glade-widget-adaptor.c \
|
glade-widget-adaptor.c \
|
||||||
glade-debug.c \
|
glade-debug.c \
|
||||||
glade-project.c \
|
glade-project.c \
|
||||||
glade-parameter.c \
|
glade-parameter.c \
|
||||||
glade-placeholder.c \
|
glade-placeholder.c \
|
||||||
|
glade-custom.c \
|
||||||
glade-inspector.c \
|
glade-inspector.c \
|
||||||
glade-xml-utils.c \
|
glade-xml-utils.c \
|
||||||
glade-palette.c \
|
glade-palette.c \
|
||||||
@ -72,7 +76,6 @@ libgladeui_2_la_SOURCES = \
|
|||||||
glade-signal.c \
|
glade-signal.c \
|
||||||
glade-signal-editor.c \
|
glade-signal-editor.c \
|
||||||
glade-clipboard.c \
|
glade-clipboard.c \
|
||||||
glade-clipboard-view.c \
|
|
||||||
glade-command.c \
|
glade-command.c \
|
||||||
glade-id-allocator.c \
|
glade-id-allocator.c \
|
||||||
glade-id-allocator.h \
|
glade-id-allocator.h \
|
||||||
@ -92,24 +95,24 @@ libgladeui_2_la_SOURCES = \
|
|||||||
glade-editor-table.c \
|
glade-editor-table.c \
|
||||||
glade-cell-renderer-icon.c
|
glade-cell-renderer-icon.c
|
||||||
|
|
||||||
libgladeui_2_la_CPPFLAGS = \
|
libgladeui_1_la_CPPFLAGS = \
|
||||||
$(common_defines) \
|
$(common_defines) \
|
||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
-I$(top_builddir) \
|
-I$(top_builddir) \
|
||||||
$(AM_CPPFLAGS)
|
|
||||||
|
|
||||||
libgladeui_2_la_CFLAGS = \
|
|
||||||
$(GTK_CFLAGS) \
|
$(GTK_CFLAGS) \
|
||||||
$(IGE_MAC_BUNDLE_FLAG) \
|
$(IGE_MAC_BUNDLE_FLAG) \
|
||||||
$(IGE_MAC_CFLAGS) \
|
$(IGE_MAC_CFLAGS) \
|
||||||
$(WARN_CFLAGS) \
|
$(WARN_CFLAGS) \
|
||||||
|
$(AM_CPPFLAGS)
|
||||||
|
|
||||||
|
libgladeui_1_la_CFLAGS = \
|
||||||
$(AM_CFLAGS)
|
$(AM_CFLAGS)
|
||||||
|
|
||||||
libgladeui_2_la_LDFLAGS = -version-info $(GLADE_CURRENT):$(GLADE_REVISION):$(GLADE_AGE) $(AM_LDFLAGS)
|
libgladeui_1_la_LDFLAGS = -version-info $(GLADE_CURRENT):$(GLADE_REVISION):$(GLADE_AGE) $(AM_LDFLAGS)
|
||||||
libgladeui_2_la_LIBADD = $(GTK_LIBS) $(IGE_MAC_LIBS)
|
libgladeui_1_la_LIBADD = $(GTK_LIBS) $(IGE_MAC_LIBS)
|
||||||
|
|
||||||
|
|
||||||
libgladeuiincludedir=$(includedir)/libgladeui-2.0/gladeui
|
libgladeuiincludedir=$(includedir)/libgladeui-1.0/gladeui
|
||||||
libgladeuiinclude_HEADERS = \
|
libgladeuiinclude_HEADERS = \
|
||||||
glade.h \
|
glade.h \
|
||||||
glade-debug.h \
|
glade-debug.h \
|
||||||
@ -117,6 +120,7 @@ libgladeuiinclude_HEADERS = \
|
|||||||
glade-inspector.h \
|
glade-inspector.h \
|
||||||
glade-parameter.h \
|
glade-parameter.h \
|
||||||
glade-placeholder.h \
|
glade-placeholder.h \
|
||||||
|
glade-custom.h \
|
||||||
glade-editor.h \
|
glade-editor.h \
|
||||||
glade-editor-property.h \
|
glade-editor-property.h \
|
||||||
glade-signal-editor.h \
|
glade-signal-editor.h \
|
||||||
@ -129,7 +133,6 @@ libgladeuiinclude_HEADERS = \
|
|||||||
glade-property-class.h \
|
glade-property-class.h \
|
||||||
glade-utils.h \
|
glade-utils.h \
|
||||||
glade-clipboard.h \
|
glade-clipboard.h \
|
||||||
glade-clipboard-view.h \
|
|
||||||
glade-command.h \
|
glade-command.h \
|
||||||
glade-app.h \
|
glade-app.h \
|
||||||
glade-builtins.h \
|
glade-builtins.h \
|
||||||
@ -149,12 +152,12 @@ libgladeuiinclude_HEADERS = \
|
|||||||
|
|
||||||
|
|
||||||
if PLATFORM_WIN32
|
if PLATFORM_WIN32
|
||||||
libgladeui_2_la_LDFLAGS += -no-undefined
|
libgladeui_1_la_LDFLAGS += -no-undefined
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if NATIVE_WIN32
|
if NATIVE_WIN32
|
||||||
libgladeui_2_la_LDFLAGS += -Wl,gladeui-win32-res.o -export-symbols gladeui.def
|
libgladeui_1_la_LDFLAGS += -Wl,gladeui-win32-res.o -export-symbols gladeui.def
|
||||||
libgladeui_2_la_DEPENDENCIES = gladeui-win32-res.o gladeui.def
|
libgladeui_1_la_DEPENDENCIES = gladeui-win32-res.o gladeui.def
|
||||||
endif
|
endif
|
||||||
|
|
||||||
gladeui-win32-res.o: gladeui.rc
|
gladeui-win32-res.o: gladeui.rc
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "glade.h"
|
#include "glade.h"
|
||||||
#include "glade-clipboard-view.h"
|
|
||||||
#include "glade-debug.h"
|
#include "glade-debug.h"
|
||||||
#include "glade-cursor.h"
|
#include "glade-cursor.h"
|
||||||
#include "glade-catalog.h"
|
#include "glade-catalog.h"
|
||||||
@ -94,6 +93,8 @@ struct _GladeAppPrivate
|
|||||||
GList *undo_list, *redo_list; /* Lists of buttons to refresh in update-ui signal */
|
GList *undo_list, *redo_list; /* Lists of buttons to refresh in update-ui signal */
|
||||||
|
|
||||||
GladePointerMode pointer_mode; /* Current mode for the pointer in the workspace */
|
GladePointerMode pointer_mode; /* Current mode for the pointer in the workspace */
|
||||||
|
|
||||||
|
guint selection_changed_id; /* for queue_selection_changed() */
|
||||||
};
|
};
|
||||||
|
|
||||||
static guint glade_app_signals[LAST_SIGNAL] = { 0 };
|
static guint glade_app_signals[LAST_SIGNAL] = { 0 };
|
||||||
@ -101,6 +102,7 @@ static guint glade_app_signals[LAST_SIGNAL] = { 0 };
|
|||||||
/* installation paths */
|
/* installation paths */
|
||||||
static gchar *catalogs_dir = NULL;
|
static gchar *catalogs_dir = NULL;
|
||||||
static gchar *modules_dir = NULL;
|
static gchar *modules_dir = NULL;
|
||||||
|
static gchar *plugins_dir = NULL;
|
||||||
static gchar *pixmaps_dir = NULL;
|
static gchar *pixmaps_dir = NULL;
|
||||||
static gchar *locale_dir = NULL;
|
static gchar *locale_dir = NULL;
|
||||||
static gchar *bin_dir = NULL;
|
static gchar *bin_dir = NULL;
|
||||||
@ -302,13 +304,6 @@ glade_app_signal_editor_created_default (GladeApp *app, GladeSignalEditor *signa
|
|||||||
glade_signal_editor_construct_signals_list (signal_editor);
|
glade_signal_editor_construct_signals_list (signal_editor);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
clipboard_view_on_delete_cb (GtkWidget *clipboard_view, GdkEvent *e, GladeApp *app)
|
|
||||||
{
|
|
||||||
glade_util_hide_window (GTK_WINDOW (clipboard_view));
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static GKeyFile *
|
static GKeyFile *
|
||||||
glade_app_config_load (GladeApp *app)
|
glade_app_config_load (GladeApp *app)
|
||||||
{
|
{
|
||||||
@ -340,6 +335,15 @@ glade_app_get_modules_dir (void)
|
|||||||
return modules_dir;
|
return modules_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const gchar *
|
||||||
|
glade_app_get_plugins_dir (void)
|
||||||
|
{
|
||||||
|
glade_init_check ();
|
||||||
|
|
||||||
|
return plugins_dir;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const gchar *
|
const gchar *
|
||||||
glade_app_get_pixmaps_dir (void)
|
glade_app_get_pixmaps_dir (void)
|
||||||
{
|
{
|
||||||
@ -391,6 +395,7 @@ build_package_paths (void)
|
|||||||
#else
|
#else
|
||||||
catalogs_dir = g_strdup (GLADE_CATALOGSDIR);
|
catalogs_dir = g_strdup (GLADE_CATALOGSDIR);
|
||||||
modules_dir = g_strdup (GLADE_MODULESDIR);
|
modules_dir = g_strdup (GLADE_MODULESDIR);
|
||||||
|
plugins_dir = g_strdup (GLADE_PLUGINSDIR);
|
||||||
pixmaps_dir = g_strdup (GLADE_PIXMAPSDIR);
|
pixmaps_dir = g_strdup (GLADE_PIXMAPSDIR);
|
||||||
locale_dir = g_strdup (GLADE_LOCALEDIR);
|
locale_dir = g_strdup (GLADE_LOCALEDIR);
|
||||||
bin_dir = g_strdup (GLADE_BINDIR);
|
bin_dir = g_strdup (GLADE_BINDIR);
|
||||||
@ -453,11 +458,6 @@ glade_app_init (GladeApp *app)
|
|||||||
|
|
||||||
/* Create clipboard */
|
/* Create clipboard */
|
||||||
app->priv->clipboard = glade_clipboard_new ();
|
app->priv->clipboard = glade_clipboard_new ();
|
||||||
app->priv->clipboard->view = glade_clipboard_view_new (app->priv->clipboard);
|
|
||||||
gtk_window_set_title (GTK_WINDOW (app->priv->clipboard->view), _("Clipboard"));
|
|
||||||
g_signal_connect_after (G_OBJECT (app->priv->clipboard->view), "delete_event",
|
|
||||||
G_CALLBACK (clipboard_view_on_delete_cb),
|
|
||||||
app);
|
|
||||||
|
|
||||||
/* Load the configuration file */
|
/* Load the configuration file */
|
||||||
app->priv->config = glade_app_config_load (app);
|
app->priv->config = glade_app_config_load (app);
|
||||||
@ -810,13 +810,6 @@ glade_app_get_clipboard (void)
|
|||||||
return app->priv->clipboard;
|
return app->priv->clipboard;
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
|
||||||
glade_app_get_clipboard_view (void)
|
|
||||||
{
|
|
||||||
GladeApp *app = glade_app_get ();
|
|
||||||
return app->priv->clipboard->view;
|
|
||||||
}
|
|
||||||
|
|
||||||
GladeProject *
|
GladeProject *
|
||||||
glade_app_get_project (void)
|
glade_app_get_project (void)
|
||||||
{
|
{
|
||||||
@ -930,50 +923,6 @@ glade_app_hide_properties (void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
glade_app_update_instance_count (GladeProject *project)
|
|
||||||
{
|
|
||||||
GladeApp *app;
|
|
||||||
GList *l;
|
|
||||||
gint temp, max = 0, i = 0, uncounted_projects = 0;
|
|
||||||
gchar *project_name;
|
|
||||||
|
|
||||||
g_return_if_fail (GLADE_IS_PROJECT (project));
|
|
||||||
|
|
||||||
if (glade_project_get_instance_count (project) > 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
project_name = glade_project_get_name (project);
|
|
||||||
|
|
||||||
app = glade_app_get ();
|
|
||||||
|
|
||||||
for (l = app->priv->projects; l; l = l->next)
|
|
||||||
{
|
|
||||||
GladeProject *prj = GLADE_PROJECT (l->data);
|
|
||||||
gchar *name = glade_project_get_name (project);
|
|
||||||
|
|
||||||
if (prj != project && !g_utf8_collate (name, project_name))
|
|
||||||
{
|
|
||||||
i++;
|
|
||||||
temp = MAX (glade_project_get_instance_count (prj) + 1, i);
|
|
||||||
max = MAX (temp, max);
|
|
||||||
|
|
||||||
if (glade_project_get_instance_count (prj) < 1)
|
|
||||||
uncounted_projects++;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free (name);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free (project_name);
|
|
||||||
|
|
||||||
/* Dont reset the initially opened project */
|
|
||||||
if (uncounted_projects > 1 || g_list_find (app->priv->projects, project) == NULL)
|
|
||||||
{
|
|
||||||
glade_project_set_instance_count (project, MAX (max, i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
glade_app_add_project (GladeProject *project)
|
glade_app_add_project (GladeProject *project)
|
||||||
{
|
{
|
||||||
@ -991,7 +940,6 @@ glade_app_add_project (GladeProject *project)
|
|||||||
glade_app_set_project (project);
|
glade_app_set_project (project);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
glade_app_update_instance_count (project);
|
|
||||||
|
|
||||||
/* Take a reference for GladeApp here... */
|
/* Take a reference for GladeApp here... */
|
||||||
app->priv->projects = g_list_append (app->priv->projects,
|
app->priv->projects = g_list_append (app->priv->projects,
|
||||||
@ -1160,10 +1108,9 @@ glade_app_command_copy (void)
|
|||||||
gboolean failed = FALSE;
|
gboolean failed = FALSE;
|
||||||
|
|
||||||
app = glade_app_get();
|
app = glade_app_get();
|
||||||
if (app->priv->active_project == NULL)
|
if (app->priv->active_project == NULL ||
|
||||||
{
|
glade_project_is_loading (app->priv->active_project))
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
for (list = glade_app_get_selection ();
|
for (list = glade_app_get_selection ();
|
||||||
list && list->data; list = list->next)
|
list && list->data; list = list->next)
|
||||||
@ -1203,7 +1150,8 @@ glade_app_command_cut (void)
|
|||||||
gboolean failed = FALSE;
|
gboolean failed = FALSE;
|
||||||
|
|
||||||
app = glade_app_get();
|
app = glade_app_get();
|
||||||
if (app->priv->active_project == NULL)
|
if (app->priv->active_project == NULL ||
|
||||||
|
glade_project_is_loading (app->priv->active_project))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (list = glade_app_get_selection ();
|
for (list = glade_app_get_selection ();
|
||||||
@ -1245,9 +1193,17 @@ glade_app_command_paste (GladePlaceholder *placeholder)
|
|||||||
GladeFixed *fixed = NULL;
|
GladeFixed *fixed = NULL;
|
||||||
|
|
||||||
app = glade_app_get();
|
app = glade_app_get();
|
||||||
if (app->priv->active_project == NULL)
|
if (app->priv->active_project == NULL ||
|
||||||
|
glade_project_is_loading (app->priv->active_project))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (placeholder)
|
||||||
|
{
|
||||||
|
if (glade_placeholder_get_project (placeholder) == NULL ||
|
||||||
|
glade_project_is_loading (glade_placeholder_get_project (placeholder)))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
list = glade_project_selection_get (app->priv->active_project);
|
list = glade_project_selection_get (app->priv->active_project);
|
||||||
clipboard = glade_app_get_clipboard ();
|
clipboard = glade_app_get_clipboard ();
|
||||||
|
|
||||||
@ -1368,7 +1324,8 @@ glade_app_command_delete (void)
|
|||||||
gboolean failed = FALSE;
|
gboolean failed = FALSE;
|
||||||
|
|
||||||
app = glade_app_get();
|
app = glade_app_get();
|
||||||
if (app->priv->active_project == NULL)
|
if (app->priv->active_project == NULL ||
|
||||||
|
glade_project_is_loading (app->priv->active_project))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (list = glade_app_get_selection ();
|
for (list = glade_app_get_selection ();
|
||||||
@ -1653,6 +1610,25 @@ glade_app_selection_changed (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
selection_change_idle (GladeApp *app)
|
||||||
|
{
|
||||||
|
glade_app_selection_changed ();
|
||||||
|
app->priv->selection_changed_id = 0;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
glade_app_queue_selection_changed (void)
|
||||||
|
{
|
||||||
|
GladeApp *app = glade_app_get ();
|
||||||
|
|
||||||
|
if (app->priv->selection_changed_id == 0)
|
||||||
|
app->priv->selection_changed_id =
|
||||||
|
g_idle_add ((GSourceFunc)selection_change_idle, app);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
GladeApp*
|
GladeApp*
|
||||||
glade_app_new (void)
|
glade_app_new (void)
|
||||||
{
|
{
|
||||||
|
@ -112,8 +112,6 @@ GladePalette* glade_app_get_palette (void);
|
|||||||
|
|
||||||
GladeClipboard* glade_app_get_clipboard (void);
|
GladeClipboard* glade_app_get_clipboard (void);
|
||||||
|
|
||||||
GtkWidget* glade_app_get_clipboard_view (void);
|
|
||||||
|
|
||||||
GladeProject* glade_app_get_project (void);
|
GladeProject* glade_app_get_project (void);
|
||||||
|
|
||||||
GladeProject* glade_app_check_get_project (void);
|
GladeProject* glade_app_check_get_project (void);
|
||||||
@ -166,9 +164,6 @@ void glade_app_set_accel_group (GtkAccelGroup *accel_group);
|
|||||||
|
|
||||||
GtkAccelGroup *glade_app_get_accel_group (void);
|
GtkAccelGroup *glade_app_get_accel_group (void);
|
||||||
|
|
||||||
void glade_app_update_instance_count (GladeProject *project);
|
|
||||||
|
|
||||||
|
|
||||||
GtkWidget *glade_app_undo_button_new (void);
|
GtkWidget *glade_app_undo_button_new (void);
|
||||||
|
|
||||||
GtkWidget *glade_app_redo_button_new (void);
|
GtkWidget *glade_app_redo_button_new (void);
|
||||||
@ -196,6 +191,8 @@ void glade_app_selection_clear (gboolean emit_signal);
|
|||||||
|
|
||||||
void glade_app_selection_changed (void);
|
void glade_app_selection_changed (void);
|
||||||
|
|
||||||
|
void glade_app_queue_selection_changed (void);
|
||||||
|
|
||||||
/* package paths */
|
/* package paths */
|
||||||
|
|
||||||
const gchar *glade_app_get_catalogs_dir (void) G_GNUC_CONST;
|
const gchar *glade_app_get_catalogs_dir (void) G_GNUC_CONST;
|
||||||
|
@ -322,13 +322,38 @@ glade_base_editor_project_widget_name_changed (GladeProject *project,
|
|||||||
GladeWidget *widget,
|
GladeWidget *widget,
|
||||||
GladeBaseEditor *editor);
|
GladeBaseEditor *editor);
|
||||||
|
|
||||||
|
|
||||||
|
static GladeWidget *
|
||||||
|
glade_base_editor_delegate_build_child (GladeBaseEditor *editor,
|
||||||
|
GladeWidget *parent,
|
||||||
|
GType type)
|
||||||
|
{
|
||||||
|
GladeWidget *child = NULL;
|
||||||
|
g_signal_emit (editor, glade_base_editor_signals[SIGNAL_BUILD_CHILD],
|
||||||
|
0, parent, type, &child);
|
||||||
|
return child;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
glade_base_editor_delegate_delete_child (GladeBaseEditor *editor,
|
||||||
|
GladeWidget *parent,
|
||||||
|
GladeWidget *child)
|
||||||
|
{
|
||||||
|
gboolean retval;
|
||||||
|
|
||||||
|
g_signal_emit (editor, glade_base_editor_signals[SIGNAL_DELETE_CHILD],
|
||||||
|
0, parent, child, &retval);
|
||||||
|
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
glade_base_editor_name_activate (GtkEntry *entry, GladeWidget *gchild)
|
glade_base_editor_name_activate (GtkEntry *entry, GladeWidget *gchild)
|
||||||
{
|
{
|
||||||
const gchar *text = gtk_entry_get_text (GTK_ENTRY (entry));
|
const gchar *text = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||||
GladeBaseEditor *editor = g_object_get_data (G_OBJECT (entry), "editor");
|
GladeBaseEditor *editor = g_object_get_data (G_OBJECT (entry), "editor");
|
||||||
|
|
||||||
if (strcmp (glade_widget_get_name (gchild), text))
|
if (text && text[0] && strcmp (glade_widget_get_name (gchild), text))
|
||||||
{
|
{
|
||||||
g_signal_handlers_block_by_func (gchild->project,
|
g_signal_handlers_block_by_func (gchild->project,
|
||||||
glade_base_editor_project_widget_name_changed,
|
glade_base_editor_project_widget_name_changed,
|
||||||
@ -678,8 +703,7 @@ glade_base_editor_add_child (GladeBaseEditor *editor,
|
|||||||
glade_widget_get_name (gparent));
|
glade_widget_get_name (gparent));
|
||||||
|
|
||||||
/* Build Child */
|
/* Build Child */
|
||||||
g_signal_emit (editor, glade_base_editor_signals[SIGNAL_BUILD_CHILD],
|
gchild_new = glade_base_editor_delegate_build_child (editor, gparent, type);
|
||||||
0, gparent, type, &gchild_new);
|
|
||||||
|
|
||||||
if (gchild_new == NULL)
|
if (gchild_new == NULL)
|
||||||
{
|
{
|
||||||
@ -862,7 +886,6 @@ glade_base_editor_delete_child (GladeBaseEditor *e)
|
|||||||
{
|
{
|
||||||
GladeWidget *child, *gparent;
|
GladeWidget *child, *gparent;
|
||||||
GtkTreeIter iter, parent;
|
GtkTreeIter iter, parent;
|
||||||
gboolean retval;
|
|
||||||
|
|
||||||
if (!glade_base_editor_get_child_selected (e, &iter)) return;
|
if (!glade_base_editor_get_child_selected (e, &iter)) return;
|
||||||
|
|
||||||
@ -881,8 +904,7 @@ glade_base_editor_delete_child (GladeBaseEditor *e)
|
|||||||
glade_widget_get_name (gparent));
|
glade_widget_get_name (gparent));
|
||||||
|
|
||||||
/* Emit delete-child signal */
|
/* Emit delete-child signal */
|
||||||
g_signal_emit (e, glade_base_editor_signals[SIGNAL_DELETE_CHILD],
|
glade_base_editor_delegate_delete_child (e, gparent, child);
|
||||||
0, gparent, child, &retval);
|
|
||||||
|
|
||||||
glade_command_pop_group ();
|
glade_command_pop_group ();
|
||||||
}
|
}
|
||||||
@ -1168,7 +1190,6 @@ glade_base_editor_project_disconnect (GladeBaseEditor *editor)
|
|||||||
if (e->properties_idle)
|
if (e->properties_idle)
|
||||||
g_source_remove (e->properties_idle);
|
g_source_remove (e->properties_idle);
|
||||||
e->properties_idle = 0;
|
e->properties_idle = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1246,11 +1267,10 @@ glade_base_editor_dispose (GObject *object)
|
|||||||
{
|
{
|
||||||
GladeBaseEditor *cobj = GLADE_BASE_EDITOR (object);
|
GladeBaseEditor *cobj = GLADE_BASE_EDITOR (object);
|
||||||
|
|
||||||
glade_signal_editor_load_widget (cobj->priv->signal_editor, NULL);
|
|
||||||
|
|
||||||
reset_child_types (cobj);
|
reset_child_types (cobj);
|
||||||
|
|
||||||
glade_base_editor_project_disconnect (cobj);
|
glade_base_editor_project_disconnect (cobj);
|
||||||
|
cobj->priv->project = NULL;
|
||||||
|
|
||||||
if (cobj->priv->group)
|
if (cobj->priv->group)
|
||||||
cobj->priv->group =
|
cobj->priv->group =
|
||||||
@ -1304,10 +1324,8 @@ glade_base_editor_change_type (GladeBaseEditor *editor,
|
|||||||
GladeWidget *gchild,
|
GladeWidget *gchild,
|
||||||
GType type)
|
GType type)
|
||||||
{
|
{
|
||||||
GladeBaseEditorPrivate *e = editor->priv;
|
|
||||||
GladeWidgetAdaptor *adaptor = glade_widget_adaptor_get_by_type (type);
|
|
||||||
GladeWidget *parent, *gchild_new;
|
GladeWidget *parent, *gchild_new;
|
||||||
GList list = {0, }, *children, *l;
|
GList *children, *l;
|
||||||
GObject *child, *child_new;
|
GObject *child, *child_new;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gchar *name, *class_name;
|
gchar *name, *class_name;
|
||||||
@ -1324,11 +1342,12 @@ glade_base_editor_change_type (GladeBaseEditor *editor,
|
|||||||
glade_base_editor_find_child (editor, gchild, &iter);
|
glade_base_editor_find_child (editor, gchild, &iter);
|
||||||
|
|
||||||
/* Create new widget */
|
/* Create new widget */
|
||||||
gchild_new = glade_command_create (adaptor, parent, NULL, e->project);
|
gchild_new = glade_base_editor_delegate_build_child (editor, parent, type);
|
||||||
|
|
||||||
child_new = glade_widget_get_object (gchild_new);
|
child_new = glade_widget_get_object (gchild_new);
|
||||||
|
|
||||||
/* Cut and Paste childrens */
|
/* Cut and Paste childrens */
|
||||||
if ((children = glade_widget_adaptor_get_children (gchild->adaptor, child)))
|
if ((children = glade_widget_get_children (gchild)) != NULL)
|
||||||
{
|
{
|
||||||
GList *gchildren = NULL;
|
GList *gchildren = NULL;
|
||||||
|
|
||||||
@ -1356,10 +1375,13 @@ glade_base_editor_change_type (GladeBaseEditor *editor,
|
|||||||
glade_widget_copy_properties (gchild_new, gchild, TRUE, TRUE);
|
glade_widget_copy_properties (gchild_new, gchild, TRUE, TRUE);
|
||||||
|
|
||||||
/* Delete old widget */
|
/* Delete old widget */
|
||||||
list.data = gchild;
|
glade_base_editor_delegate_delete_child (editor, parent, gchild);
|
||||||
glade_command_delete (&list);
|
|
||||||
|
|
||||||
/* Apply packing properties to the new object */
|
/* Apply packing properties to the new object
|
||||||
|
*
|
||||||
|
* No need to use GladeCommand here on the newly created widget,
|
||||||
|
* they just become the initial state for this object.
|
||||||
|
*/
|
||||||
l = gchild->packing_properties;
|
l = gchild->packing_properties;
|
||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
@ -1850,11 +1872,7 @@ glade_base_editor_new (GObject *container,
|
|||||||
gchar *name;
|
gchar *name;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_CONTAINER (container), NULL);
|
|
||||||
|
|
||||||
gcontainer = glade_widget_get_from_gobject (container);
|
gcontainer = glade_widget_get_from_gobject (container);
|
||||||
g_return_val_if_fail (GLADE_IS_WIDGET (gcontainer), NULL);
|
|
||||||
|
|
||||||
|
|
||||||
editor = GLADE_BASE_EDITOR (g_object_new (GLADE_TYPE_BASE_EDITOR, NULL));
|
editor = GLADE_BASE_EDITOR (g_object_new (GLADE_TYPE_BASE_EDITOR, NULL));
|
||||||
e = editor->priv;
|
e = editor->priv;
|
||||||
|
@ -1,388 +0,0 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
|
||||||
/*
|
|
||||||
* glade-clipboard-view.c - The View for the Clipboard.
|
|
||||||
*
|
|
||||||
* Copyright (C) 2001 The GNOME Foundation.
|
|
||||||
*
|
|
||||||
* Author(s):
|
|
||||||
* Archit Baweja <bighead@users.sourceforge.net>
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include <config.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SECTION:glade-clipboard-view
|
|
||||||
* @Short_Description: A widget to view and control the #GladeClipboard.
|
|
||||||
*
|
|
||||||
* The #GladeClipboardView is a widget to view the #GladeWidget objects
|
|
||||||
* in the #GladeClipboard; the user can paste or delete objects on the clipboard.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <glib/gi18n-lib.h>
|
|
||||||
|
|
||||||
#include "glade.h"
|
|
||||||
#include "glade-clipboard.h"
|
|
||||||
#include "glade-clipboard-view.h"
|
|
||||||
#include "glade-widget.h"
|
|
||||||
#include "glade-widget-adaptor.h"
|
|
||||||
#include "glade-popup.h"
|
|
||||||
|
|
||||||
|
|
||||||
const gint GLADE_CLIPBOARD_VIEW_WIDTH = 230;
|
|
||||||
const gint GLADE_CLIPBOARD_VIEW_HEIGHT = 200;
|
|
||||||
|
|
||||||
static void
|
|
||||||
glade_clipboard_view_class_init (GladeClipboardViewClass *klass)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
glade_clipboard_view_init (GladeClipboardView *view)
|
|
||||||
{
|
|
||||||
view->widget = NULL;
|
|
||||||
view->clipboard = NULL;
|
|
||||||
view->model = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
GType
|
|
||||||
glade_clipboard_view_get_type ()
|
|
||||||
{
|
|
||||||
static GType type = 0;
|
|
||||||
|
|
||||||
if (!type) {
|
|
||||||
static const GTypeInfo info = {
|
|
||||||
sizeof (GladeClipboardViewClass),
|
|
||||||
(GBaseInitFunc) NULL,
|
|
||||||
(GBaseFinalizeFunc) NULL,
|
|
||||||
(GClassInitFunc) glade_clipboard_view_class_init,
|
|
||||||
(GClassFinalizeFunc) NULL,
|
|
||||||
NULL,
|
|
||||||
sizeof (GladeClipboardView),
|
|
||||||
0,
|
|
||||||
(GInstanceInitFunc) glade_clipboard_view_init
|
|
||||||
};
|
|
||||||
|
|
||||||
type = g_type_register_static (GTK_TYPE_WINDOW, "GladeClipboardView", &info, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gcv_foreach_add_selection (GtkTreeModel *model,
|
|
||||||
GtkTreePath *path,
|
|
||||||
GtkTreeIter *iter,
|
|
||||||
gpointer data)
|
|
||||||
{
|
|
||||||
GladeWidget *widget = NULL;
|
|
||||||
GladeClipboardView *view = (GladeClipboardView *)data;
|
|
||||||
gtk_tree_model_get (model, iter, 0, &widget, -1);
|
|
||||||
glade_clipboard_selection_add (view->clipboard, (widget));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
glade_clipboard_view_selection_changed_cb (GtkTreeSelection *sel,
|
|
||||||
GladeClipboardView *view)
|
|
||||||
{
|
|
||||||
if (view->updating == FALSE)
|
|
||||||
{
|
|
||||||
glade_clipboard_selection_clear (view->clipboard);
|
|
||||||
gtk_tree_selection_selected_foreach
|
|
||||||
(sel, gcv_foreach_add_selection, view);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
glade_clipboard_view_populate_model (GladeClipboardView *view)
|
|
||||||
{
|
|
||||||
GladeClipboard *clipboard;
|
|
||||||
GtkTreeModel *model;
|
|
||||||
GladeWidget *widget;
|
|
||||||
GList *list;
|
|
||||||
GtkTreeIter iter;
|
|
||||||
|
|
||||||
clipboard = GLADE_CLIPBOARD (view->clipboard);
|
|
||||||
model = GTK_TREE_MODEL (view->model);
|
|
||||||
|
|
||||||
for (list = clipboard->widgets; list; list = list->next)
|
|
||||||
{
|
|
||||||
widget = list->data;
|
|
||||||
view->updating = TRUE;
|
|
||||||
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
|
|
||||||
gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, widget, -1);
|
|
||||||
view->updating = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
glade_clipboard_view_cell_function (GtkTreeViewColumn *tree_column,
|
|
||||||
GtkCellRenderer *cell,
|
|
||||||
GtkTreeModel *tree_model,
|
|
||||||
GtkTreeIter *iter,
|
|
||||||
gpointer data)
|
|
||||||
{
|
|
||||||
gboolean is_icon = GPOINTER_TO_INT (data);
|
|
||||||
GladeWidget *widget;
|
|
||||||
|
|
||||||
gtk_tree_model_get (tree_model, iter, 0, &widget, -1);
|
|
||||||
|
|
||||||
g_return_if_fail (GLADE_IS_WIDGET (widget));
|
|
||||||
g_return_if_fail (widget->name != NULL);
|
|
||||||
|
|
||||||
if (is_icon)
|
|
||||||
g_object_set (G_OBJECT (cell),
|
|
||||||
"icon-name", widget->adaptor->icon_name,
|
|
||||||
"stock-size", GTK_ICON_SIZE_MENU,
|
|
||||||
NULL);
|
|
||||||
else
|
|
||||||
g_object_set (G_OBJECT (cell),
|
|
||||||
"text", widget->name,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static gint
|
|
||||||
glade_clipboard_view_button_press_cb (GtkWidget *widget,
|
|
||||||
GdkEventButton *event,
|
|
||||||
GladeClipboardView *view)
|
|
||||||
{
|
|
||||||
GtkTreeView *tree_view = GTK_TREE_VIEW (widget);
|
|
||||||
GtkTreePath *path = NULL;
|
|
||||||
gboolean handled = FALSE;
|
|
||||||
|
|
||||||
if (event->window == gtk_tree_view_get_bin_window (tree_view) &&
|
|
||||||
gtk_tree_view_get_path_at_pos (tree_view,
|
|
||||||
(gint) event->x, (gint) event->y,
|
|
||||||
&path, NULL,
|
|
||||||
NULL, NULL) && path != NULL)
|
|
||||||
{
|
|
||||||
GtkTreeIter iter;
|
|
||||||
GladeWidget *widget = NULL;
|
|
||||||
if (gtk_tree_model_get_iter (GTK_TREE_MODEL (view->model),
|
|
||||||
&iter, path))
|
|
||||||
{
|
|
||||||
/* Alright, now we can obtain
|
|
||||||
* the widget from the iter.
|
|
||||||
*/
|
|
||||||
gtk_tree_model_get (GTK_TREE_MODEL (view->model), &iter,
|
|
||||||
0, &widget, -1);
|
|
||||||
if (widget != NULL &&
|
|
||||||
event->button == 3)
|
|
||||||
{
|
|
||||||
glade_popup_clipboard_pop (widget, event);
|
|
||||||
handled = TRUE;
|
|
||||||
}
|
|
||||||
gtk_tree_path_free (path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return handled;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
glade_clipboard_view_create_tree_view (GladeClipboardView *view)
|
|
||||||
{
|
|
||||||
GtkTreeSelection *sel;
|
|
||||||
GtkCellRenderer *renderer;
|
|
||||||
GtkTreeViewColumn *column;
|
|
||||||
|
|
||||||
view->widget =
|
|
||||||
gtk_tree_view_new_with_model (GTK_TREE_MODEL (view->model));
|
|
||||||
|
|
||||||
column = gtk_tree_view_column_new ();
|
|
||||||
gtk_tree_view_column_set_title (column, _("Widget"));
|
|
||||||
|
|
||||||
renderer = gtk_cell_renderer_pixbuf_new ();
|
|
||||||
gtk_tree_view_column_pack_start (column, renderer, FALSE);
|
|
||||||
gtk_tree_view_column_set_cell_data_func (column, renderer,
|
|
||||||
glade_clipboard_view_cell_function,
|
|
||||||
GINT_TO_POINTER (1), NULL);
|
|
||||||
|
|
||||||
renderer = gtk_cell_renderer_text_new ();
|
|
||||||
g_object_set (G_OBJECT (renderer),
|
|
||||||
"xpad", 6, NULL);
|
|
||||||
gtk_tree_view_column_pack_start (column, renderer, TRUE);
|
|
||||||
gtk_tree_view_column_set_cell_data_func (column, renderer,
|
|
||||||
glade_clipboard_view_cell_function,
|
|
||||||
GINT_TO_POINTER (0), NULL);
|
|
||||||
|
|
||||||
gtk_tree_view_append_column (GTK_TREE_VIEW (view->widget), column);
|
|
||||||
|
|
||||||
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view->widget));
|
|
||||||
gtk_tree_selection_set_mode (sel, GTK_SELECTION_MULTIPLE);
|
|
||||||
|
|
||||||
g_signal_connect_data (G_OBJECT (sel), "changed",
|
|
||||||
G_CALLBACK (glade_clipboard_view_selection_changed_cb),
|
|
||||||
view, NULL, 0);
|
|
||||||
|
|
||||||
/* Popup menu */
|
|
||||||
g_signal_connect (G_OBJECT (view->widget), "button-press-event",
|
|
||||||
G_CALLBACK (glade_clipboard_view_button_press_cb), view);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
glade_clipboard_view_construct (GladeClipboardView *view)
|
|
||||||
{
|
|
||||||
GtkWidget *scrolled_window, *viewport;
|
|
||||||
|
|
||||||
view->model = gtk_list_store_new (1, G_TYPE_POINTER);
|
|
||||||
|
|
||||||
glade_clipboard_view_populate_model (view);
|
|
||||||
glade_clipboard_view_create_tree_view (view);
|
|
||||||
glade_clipboard_view_refresh_sel (view);
|
|
||||||
|
|
||||||
viewport = gtk_viewport_new (NULL, NULL);
|
|
||||||
gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_OUT);
|
|
||||||
|
|
||||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
|
||||||
gtk_scrolled_window_set_shadow_type
|
|
||||||
(GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_IN);
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (scrolled_window),
|
|
||||||
6);
|
|
||||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
|
|
||||||
GTK_POLICY_AUTOMATIC,
|
|
||||||
GTK_POLICY_AUTOMATIC);
|
|
||||||
gtk_container_add (GTK_CONTAINER (scrolled_window), view->widget);
|
|
||||||
gtk_container_add (GTK_CONTAINER (viewport), scrolled_window);
|
|
||||||
gtk_container_add (GTK_CONTAINER (view), viewport);
|
|
||||||
|
|
||||||
gtk_window_set_default_size (GTK_WINDOW (view),
|
|
||||||
GLADE_CLIPBOARD_VIEW_WIDTH,
|
|
||||||
GLADE_CLIPBOARD_VIEW_HEIGHT);
|
|
||||||
|
|
||||||
gtk_window_set_type_hint (GTK_WINDOW (view), GDK_WINDOW_TYPE_HINT_UTILITY);
|
|
||||||
|
|
||||||
gtk_widget_show_all (scrolled_window);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* glade_clipboard_view_new:
|
|
||||||
* @clipboard: a #GladeClipboard
|
|
||||||
*
|
|
||||||
* Create a new #GladeClipboardView widget for @clipboard.
|
|
||||||
*
|
|
||||||
* Returns: a new #GladeClipboardView cast to be a #GtkWidget
|
|
||||||
*/
|
|
||||||
GtkWidget *
|
|
||||||
glade_clipboard_view_new (GladeClipboard *clipboard)
|
|
||||||
{
|
|
||||||
GladeClipboardView *view;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GLADE_IS_CLIPBOARD (clipboard), NULL);
|
|
||||||
|
|
||||||
view = g_object_new (GLADE_TYPE_CLIPBOARD_VIEW, NULL);
|
|
||||||
view->clipboard = clipboard;
|
|
||||||
glade_clipboard_view_construct (view);
|
|
||||||
|
|
||||||
return GTK_WIDGET (view);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* glade_clipboard_view_add:
|
|
||||||
* @view: a #GladeClipboardView
|
|
||||||
* @widget: a #GladeWidget
|
|
||||||
*
|
|
||||||
* Adds @widget to @view.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
glade_clipboard_view_add (GladeClipboardView *view, GladeWidget *widget)
|
|
||||||
{
|
|
||||||
GtkTreeIter iter;
|
|
||||||
|
|
||||||
g_return_if_fail (GLADE_IS_CLIPBOARD_VIEW (view));
|
|
||||||
g_return_if_fail (GLADE_IS_WIDGET (widget));
|
|
||||||
|
|
||||||
view->updating = TRUE;
|
|
||||||
gtk_list_store_append (view->model, &iter);
|
|
||||||
gtk_list_store_set (view->model, &iter, 0, widget, -1);
|
|
||||||
view->updating = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* glade_cliboard_view_remove:
|
|
||||||
* @view: a #GladeClipboardView
|
|
||||||
* @widget: a #GladeWidget
|
|
||||||
*
|
|
||||||
* Removes @widget from @view.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
glade_clipboard_view_remove (GladeClipboardView *view, GladeWidget *widget)
|
|
||||||
{
|
|
||||||
GtkTreeIter iter;
|
|
||||||
GtkTreeModel *model;
|
|
||||||
GladeWidget *clip_widget;
|
|
||||||
|
|
||||||
g_return_if_fail (GLADE_IS_CLIPBOARD_VIEW (view));
|
|
||||||
g_return_if_fail (GLADE_IS_WIDGET (widget));
|
|
||||||
|
|
||||||
model = GTK_TREE_MODEL (view->model);
|
|
||||||
if (gtk_tree_model_get_iter_first (model, &iter))
|
|
||||||
{
|
|
||||||
do
|
|
||||||
{
|
|
||||||
gtk_tree_model_get (model, &iter, 0, &clip_widget, -1);
|
|
||||||
if (widget == clip_widget)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
while (gtk_tree_model_iter_next (model, &iter));
|
|
||||||
}
|
|
||||||
|
|
||||||
view->updating = TRUE;
|
|
||||||
gtk_list_store_remove (view->model, &iter);
|
|
||||||
view->updating = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* glade_clipboard_view_refresh_sel:
|
|
||||||
* @view: a #GladeClipboardView
|
|
||||||
*
|
|
||||||
* Synchronizes the treeview selection to the clipboard selection.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
glade_clipboard_view_refresh_sel (GladeClipboardView *view)
|
|
||||||
{
|
|
||||||
GladeWidget *widget;
|
|
||||||
GtkTreeSelection *sel;
|
|
||||||
GList *list;
|
|
||||||
GtkTreeIter *iter;
|
|
||||||
|
|
||||||
g_return_if_fail (GLADE_IS_CLIPBOARD_VIEW (view));
|
|
||||||
|
|
||||||
if (view->updating) return;
|
|
||||||
view->updating = TRUE;
|
|
||||||
|
|
||||||
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (view->widget));
|
|
||||||
|
|
||||||
gtk_tree_selection_unselect_all (sel);
|
|
||||||
for (list = view->clipboard->selection;
|
|
||||||
list && list->data; list = list->next)
|
|
||||||
{
|
|
||||||
widget = list->data;
|
|
||||||
if ((iter = glade_util_find_iter_by_widget
|
|
||||||
(GTK_TREE_MODEL (view->model), widget, 0)) != NULL)
|
|
||||||
{
|
|
||||||
gtk_tree_selection_select_iter (sel, iter);
|
|
||||||
/* gtk_tree_iter_free (iter); */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
view->updating = FALSE;
|
|
||||||
}
|
|
@ -1,52 +0,0 @@
|
|||||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
|
||||||
#ifndef __GLADE_CLIPBOARD_VIEW_H__
|
|
||||||
#define __GLADE_CLIPBOARD_VIEW_H__
|
|
||||||
|
|
||||||
#include <gladeui/glade.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GLADE_TYPE_CLIPBOARD_VIEW (glade_clipboard_view_get_type ())
|
|
||||||
#define GLADE_CLIPBOARD_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_CLIPBOARD_VIEW, GladeClipboardView))
|
|
||||||
#define GLADE_CLIPBOARD_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_CLIPBOARD_VIEW, GladeClipboardViewClass))
|
|
||||||
#define GLADE_IS_CLIPBOARD_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_CLIPBOARD_VIEW))
|
|
||||||
#define GLADE_IS_CLIPBOARD_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_CLIPBOARD_VIEW))
|
|
||||||
#define GLADE_CLIPBOARD_VIEW_GET_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GLADE_TYPE_CLIPBOARD_VIEW, GladeClipboardViewClass))
|
|
||||||
|
|
||||||
typedef struct _GladeClipboardView GladeClipboardView;
|
|
||||||
typedef struct _GladeClipboardViewClass GladeClipboardViewClass;
|
|
||||||
|
|
||||||
struct _GladeClipboardView
|
|
||||||
{
|
|
||||||
GtkWindow parent_instance;
|
|
||||||
|
|
||||||
GtkWidget *widget; /* The GtkTreeView widget */
|
|
||||||
GtkListStore *model; /* The GtkListStore model for the View */
|
|
||||||
GladeClipboard *clipboard; /* The Clipboard for which this is a view */
|
|
||||||
gboolean updating; /* Prevent feedback from treeview when changing
|
|
||||||
* the selecion. */
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GladeClipboardViewClass
|
|
||||||
{
|
|
||||||
GtkWindowClass parent_class;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GType glade_clipboard_view_get_type (void) G_GNUC_CONST;
|
|
||||||
|
|
||||||
|
|
||||||
GtkWidget *glade_clipboard_view_new (GladeClipboard *clipboard);
|
|
||||||
|
|
||||||
void glade_clipboard_view_add (GladeClipboardView *view,
|
|
||||||
GladeWidget *widget);
|
|
||||||
|
|
||||||
void glade_clipboard_view_remove (GladeClipboardView *view,
|
|
||||||
GladeWidget *widget);
|
|
||||||
|
|
||||||
void glade_clipboard_view_refresh_sel (GladeClipboardView *view);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GLADE_CLIPBOARD_VIEW_H__ */
|
|
@ -36,7 +36,6 @@
|
|||||||
|
|
||||||
#include <glib/gi18n-lib.h>
|
#include <glib/gi18n-lib.h>
|
||||||
#include "glade.h"
|
#include "glade.h"
|
||||||
#include "glade-clipboard-view.h"
|
|
||||||
#include "glade-clipboard.h"
|
#include "glade-clipboard.h"
|
||||||
#include "glade-widget.h"
|
#include "glade-widget.h"
|
||||||
#include "glade-placeholder.h"
|
#include "glade-placeholder.h"
|
||||||
@ -89,7 +88,6 @@ static void
|
|||||||
glade_clipboard_init (GladeClipboard *clipboard)
|
glade_clipboard_init (GladeClipboard *clipboard)
|
||||||
{
|
{
|
||||||
clipboard->widgets = NULL;
|
clipboard->widgets = NULL;
|
||||||
clipboard->view = NULL;
|
|
||||||
clipboard->selection = NULL;
|
clipboard->selection = NULL;
|
||||||
clipboard->has_selection = FALSE;
|
clipboard->has_selection = FALSE;
|
||||||
}
|
}
|
||||||
@ -186,17 +184,8 @@ glade_clipboard_add (GladeClipboard *clipboard, GList *widgets)
|
|||||||
clipboard->widgets =
|
clipboard->widgets =
|
||||||
g_list_prepend (clipboard->widgets,
|
g_list_prepend (clipboard->widgets,
|
||||||
g_object_ref (G_OBJECT (widget)));
|
g_object_ref (G_OBJECT (widget)));
|
||||||
/*
|
|
||||||
* Update view.
|
|
||||||
*/
|
|
||||||
glade_clipboard_selection_add (clipboard, widget);
|
glade_clipboard_selection_add (clipboard, widget);
|
||||||
if (clipboard->view)
|
|
||||||
{
|
|
||||||
glade_clipboard_view_add
|
|
||||||
(GLADE_CLIPBOARD_VIEW (clipboard->view), widget);
|
|
||||||
glade_clipboard_view_refresh_sel
|
|
||||||
(GLADE_CLIPBOARD_VIEW (clipboard->view));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -222,13 +211,6 @@ glade_clipboard_remove (GladeClipboard *clipboard, GList *widgets)
|
|||||||
g_list_remove (clipboard->widgets, widget);
|
g_list_remove (clipboard->widgets, widget);
|
||||||
glade_clipboard_selection_remove (clipboard, widget);
|
glade_clipboard_selection_remove (clipboard, widget);
|
||||||
|
|
||||||
/*
|
|
||||||
* If there is a view present, update it.
|
|
||||||
*/
|
|
||||||
if (clipboard->view)
|
|
||||||
glade_clipboard_view_remove
|
|
||||||
(GLADE_CLIPBOARD_VIEW (clipboard->view), widget);
|
|
||||||
|
|
||||||
g_object_unref (G_OBJECT (widget));
|
g_object_unref (G_OBJECT (widget));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,8 +222,6 @@ glade_clipboard_remove (GladeClipboard *clipboard, GList *widgets)
|
|||||||
{
|
{
|
||||||
glade_clipboard_selection_add
|
glade_clipboard_selection_add
|
||||||
(clipboard, GLADE_WIDGET (list->data));
|
(clipboard, GLADE_WIDGET (list->data));
|
||||||
glade_clipboard_view_refresh_sel
|
|
||||||
(GLADE_CLIPBOARD_VIEW (clipboard->view));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -860,7 +860,7 @@ glade_command_set_name (GladeWidget *widget, const gchar* name)
|
|||||||
GladeCommand *cmd;
|
GladeCommand *cmd;
|
||||||
|
|
||||||
g_return_if_fail (GLADE_IS_WIDGET (widget));
|
g_return_if_fail (GLADE_IS_WIDGET (widget));
|
||||||
g_return_if_fail (name != NULL);
|
g_return_if_fail (name && name[0]);
|
||||||
|
|
||||||
/* Dont spam the queue with false name changes.
|
/* Dont spam the queue with false name changes.
|
||||||
*/
|
*/
|
||||||
@ -1401,7 +1401,7 @@ glade_command_add_execute (GladeCommandAddRemove *me)
|
|||||||
|
|
||||||
glade_widget_show (cdata->widget);
|
glade_widget_show (cdata->widget);
|
||||||
}
|
}
|
||||||
glade_app_selection_changed ();
|
glade_app_queue_selection_changed ();
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
@ -1735,11 +1735,10 @@ glade_command_create(GladeWidgetAdaptor *adaptor, GladeWidget *parent, GladePlac
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
widgets = g_list_prepend(widgets, widget);
|
widgets = g_list_prepend(widgets, widget);
|
||||||
glade_command_push_group(_("Create %s"), g_list_length (widgets) == 1 ? widget->name : _("multiple"));
|
glade_command_push_group(_("Create %s"), widget->name);
|
||||||
glade_command_add(widgets, parent, placeholder, FALSE);
|
glade_command_add(widgets, parent, placeholder, FALSE);
|
||||||
glade_command_pop_group();
|
glade_command_pop_group();
|
||||||
|
|
||||||
if (widgets)
|
|
||||||
g_list_free(widgets);
|
g_list_free(widgets);
|
||||||
|
|
||||||
return widget;
|
return widget;
|
||||||
|
281
gladeui/glade-custom.c
Normal file
@ -0,0 +1,281 @@
|
|||||||
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
||||||
|
/*
|
||||||
|
* glade-custom.c - An emulation of a custom widget used to
|
||||||
|
* support the glade-2 style custom widget.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2005 The GNOME Foundation.
|
||||||
|
*
|
||||||
|
* Author(s):
|
||||||
|
* Tristan Van Berkom <tvb@gnome.org>
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <glib/gi18n-lib.h>
|
||||||
|
|
||||||
|
#include "glade-custom.h"
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
PROP_0,
|
||||||
|
PROP_CREATION,
|
||||||
|
PROP_STR1,
|
||||||
|
PROP_STR2,
|
||||||
|
PROP_INT1,
|
||||||
|
PROP_INT2
|
||||||
|
};
|
||||||
|
|
||||||
|
static GtkWidgetClass *parent_class = NULL;
|
||||||
|
|
||||||
|
/* Ignore properties.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
glade_custom_set_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_custom_get_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_custom_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
GladeCustom *custom;
|
||||||
|
|
||||||
|
g_return_if_fail (GLADE_IS_CUSTOM (object));
|
||||||
|
custom = GLADE_CUSTOM (object);
|
||||||
|
|
||||||
|
/* custom->custom_pixmap can be NULL if the custom
|
||||||
|
* widget is destroyed before it's realized */
|
||||||
|
if (custom->custom_pixmap)
|
||||||
|
g_object_unref (custom->custom_pixmap);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_custom_send_configure (GladeCustom *custom)
|
||||||
|
{
|
||||||
|
GtkWidget *widget;
|
||||||
|
GtkAllocation allocation;
|
||||||
|
GdkEvent *event = gdk_event_new (GDK_CONFIGURE);
|
||||||
|
|
||||||
|
widget = GTK_WIDGET (custom);
|
||||||
|
|
||||||
|
event->configure.window = g_object_ref (gtk_widget_get_window (widget));
|
||||||
|
event->configure.send_event = TRUE;
|
||||||
|
gtk_widget_get_allocation (widget, &allocation);
|
||||||
|
event->configure.x = allocation.x;
|
||||||
|
event->configure.y = allocation.y;
|
||||||
|
event->configure.width = allocation.width;
|
||||||
|
event->configure.height = allocation.height;
|
||||||
|
|
||||||
|
gtk_widget_event (widget, event);
|
||||||
|
gdk_event_free (event);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_custom_realize (GtkWidget *widget)
|
||||||
|
{
|
||||||
|
GladeCustom *custom;
|
||||||
|
GtkAllocation allocation;
|
||||||
|
GdkWindow *window;
|
||||||
|
GdkWindowAttr attributes;
|
||||||
|
gint attributes_mask;
|
||||||
|
|
||||||
|
g_return_if_fail (GLADE_IS_CUSTOM (widget));
|
||||||
|
|
||||||
|
custom = GLADE_CUSTOM (widget);
|
||||||
|
|
||||||
|
gtk_widget_set_realized (widget, TRUE);
|
||||||
|
|
||||||
|
attributes.window_type = GDK_WINDOW_CHILD;
|
||||||
|
gtk_widget_get_allocation (widget, &allocation);
|
||||||
|
attributes.x = allocation.x;
|
||||||
|
attributes.y = allocation.y;
|
||||||
|
attributes.width = allocation.width;
|
||||||
|
attributes.height = allocation.height;
|
||||||
|
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||||
|
attributes.visual = gtk_widget_get_visual (widget);
|
||||||
|
attributes.colormap = gtk_widget_get_colormap (widget);
|
||||||
|
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
|
||||||
|
|
||||||
|
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
||||||
|
|
||||||
|
window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask);
|
||||||
|
gtk_widget_set_window (widget, window);
|
||||||
|
gdk_window_set_user_data (window, custom);
|
||||||
|
|
||||||
|
gtk_widget_style_attach (widget);
|
||||||
|
|
||||||
|
glade_custom_send_configure (custom);
|
||||||
|
|
||||||
|
if (!custom->custom_pixmap)
|
||||||
|
{
|
||||||
|
custom->custom_pixmap =
|
||||||
|
gdk_pixmap_colormap_create_from_xpm_d
|
||||||
|
(NULL, gtk_widget_get_colormap (GTK_WIDGET (custom)),
|
||||||
|
NULL, NULL, custom_xpm);
|
||||||
|
|
||||||
|
g_assert(G_IS_OBJECT(custom->custom_pixmap));
|
||||||
|
}
|
||||||
|
gdk_window_set_back_pixmap (gtk_widget_get_window (GTK_WIDGET (custom)), custom->custom_pixmap, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_custom_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GLADE_IS_CUSTOM (widget));
|
||||||
|
g_return_if_fail (allocation != NULL);
|
||||||
|
|
||||||
|
gtk_widget_set_allocation (widget, allocation);
|
||||||
|
|
||||||
|
if (gtk_widget_get_realized (widget))
|
||||||
|
{
|
||||||
|
gdk_window_move_resize (gtk_widget_get_window (widget),
|
||||||
|
allocation->x, allocation->y,
|
||||||
|
allocation->width, allocation->height);
|
||||||
|
|
||||||
|
glade_custom_send_configure (GLADE_CUSTOM (widget));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
glade_custom_expose (GtkWidget *widget, GdkEventExpose *event)
|
||||||
|
{
|
||||||
|
GtkStyle *style;
|
||||||
|
GdkGC *light_gc;
|
||||||
|
GdkGC *dark_gc;
|
||||||
|
gint w, h;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GLADE_IS_CUSTOM (widget), FALSE);
|
||||||
|
|
||||||
|
style = gtk_widget_get_style (widget);
|
||||||
|
light_gc = style->light_gc[GTK_STATE_NORMAL];
|
||||||
|
dark_gc = style->dark_gc[GTK_STATE_NORMAL];
|
||||||
|
gdk_drawable_get_size (event->window, &w, &h);
|
||||||
|
|
||||||
|
gdk_draw_line (event->window, light_gc, 0, 0, w - 1, 0);
|
||||||
|
gdk_draw_line (event->window, light_gc, 0, 0, 0, h - 1);
|
||||||
|
gdk_draw_line (event->window, dark_gc, 0, h - 1, w - 1, h - 1);
|
||||||
|
gdk_draw_line (event->window, dark_gc, w - 1, 0, w - 1, h - 1);
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_custom_init (GladeCustom *custom)
|
||||||
|
{
|
||||||
|
custom->custom_pixmap = NULL;
|
||||||
|
|
||||||
|
gtk_widget_set_size_request (GTK_WIDGET (custom),
|
||||||
|
GLADE_CUSTOM_WIDTH_REQ,
|
||||||
|
GLADE_CUSTOM_HEIGHT_REQ);
|
||||||
|
|
||||||
|
gtk_widget_show (GTK_WIDGET (custom));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_custom_class_init (GladeCustomClass *klass)
|
||||||
|
{
|
||||||
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||||
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
|
parent_class = g_type_class_peek_parent (klass);
|
||||||
|
|
||||||
|
object_class->finalize = glade_custom_finalize;
|
||||||
|
object_class->set_property = glade_custom_set_property;
|
||||||
|
object_class->get_property = glade_custom_get_property;
|
||||||
|
|
||||||
|
widget_class->realize = glade_custom_realize;
|
||||||
|
widget_class->size_allocate = glade_custom_size_allocate;
|
||||||
|
widget_class->expose_event = glade_custom_expose;
|
||||||
|
|
||||||
|
g_object_class_install_property
|
||||||
|
(object_class, PROP_CREATION,
|
||||||
|
g_param_spec_string
|
||||||
|
("creation-function", _("Creation Function"),
|
||||||
|
_("The function which creates this widget"),
|
||||||
|
NULL, G_PARAM_READWRITE));
|
||||||
|
|
||||||
|
g_object_class_install_property
|
||||||
|
(object_class, PROP_STR1,
|
||||||
|
g_param_spec_string
|
||||||
|
("string1", _("String 1"),
|
||||||
|
_("The first string argument to pass to the function"),
|
||||||
|
NULL, G_PARAM_READWRITE));
|
||||||
|
|
||||||
|
g_object_class_install_property
|
||||||
|
(object_class, PROP_STR2,
|
||||||
|
g_param_spec_string
|
||||||
|
("string2", _("String 2"),
|
||||||
|
_("The second string argument to pass to the function"),
|
||||||
|
NULL, G_PARAM_READWRITE));
|
||||||
|
|
||||||
|
g_object_class_install_property
|
||||||
|
(object_class, PROP_INT1,
|
||||||
|
g_param_spec_int
|
||||||
|
("int1", _("Integer 1"),
|
||||||
|
_("The first integer argument to pass to the function"),
|
||||||
|
G_MININT, G_MAXINT, 0, G_PARAM_READWRITE));
|
||||||
|
|
||||||
|
g_object_class_install_property
|
||||||
|
(object_class, PROP_INT2,
|
||||||
|
g_param_spec_int
|
||||||
|
("int2", _("Integer 2"),
|
||||||
|
_("The second integer argument to pass to the function"),
|
||||||
|
G_MININT, G_MAXINT, 0, G_PARAM_READWRITE));
|
||||||
|
}
|
||||||
|
|
||||||
|
GType
|
||||||
|
custom_get_type (void)
|
||||||
|
{
|
||||||
|
static GType custom_type = 0;
|
||||||
|
|
||||||
|
if (!custom_type)
|
||||||
|
{
|
||||||
|
static const GTypeInfo custom_info =
|
||||||
|
{
|
||||||
|
sizeof (GladeCustomClass),
|
||||||
|
(GBaseInitFunc) NULL,
|
||||||
|
(GBaseFinalizeFunc) NULL,
|
||||||
|
(GClassInitFunc) glade_custom_class_init,
|
||||||
|
(GClassFinalizeFunc) NULL,
|
||||||
|
NULL, /* class_data */
|
||||||
|
sizeof (GladeCustom),
|
||||||
|
0, /* n_preallocs */
|
||||||
|
(GInstanceInitFunc) glade_custom_init,
|
||||||
|
};
|
||||||
|
custom_type =
|
||||||
|
g_type_register_static (GTK_TYPE_WIDGET,
|
||||||
|
"Custom",
|
||||||
|
&custom_info, 0);
|
||||||
|
}
|
||||||
|
return custom_type;
|
||||||
|
}
|
62
gladeui/glade-custom.h
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
||||||
|
#ifndef __GLADE_CUSTOM_H__
|
||||||
|
#define __GLADE_CUSTOM_H__
|
||||||
|
|
||||||
|
#include <gladeui/glade.h>
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define GLADE_TYPE_CUSTOM (custom_get_type ())
|
||||||
|
#define GLADE_CUSTOM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_CUSTOM, GladeCustom))
|
||||||
|
#define GLADE_CUSTOM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_CUSTOM, GladeCustomClass))
|
||||||
|
#define GLADE_IS_CUSTOM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_CUSTOM))
|
||||||
|
#define GLADE_IS_CUSTOM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_CUSTOM))
|
||||||
|
#define GLADE_CUSTOM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_TYPE_CUSTOM, GladeCustomClass))
|
||||||
|
|
||||||
|
#define GLADE_CUSTOM_WIDTH_REQ 20
|
||||||
|
#define GLADE_CUSTOM_HEIGHT_REQ 20
|
||||||
|
|
||||||
|
/* taken from glade 2 */
|
||||||
|
static char * custom_xpm[] = {
|
||||||
|
"8 8 4 1",
|
||||||
|
" c None",
|
||||||
|
". c #BBBBBB",
|
||||||
|
"+ c #D6D6D6",
|
||||||
|
"@ c #6B5EFF",
|
||||||
|
".+..+...",
|
||||||
|
"+..@@@..",
|
||||||
|
"..@...++",
|
||||||
|
"..@...++",
|
||||||
|
"+.@..+..",
|
||||||
|
".++@@@..",
|
||||||
|
"..++....",
|
||||||
|
"..++...."};
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _GladeCustom GladeCustom;
|
||||||
|
typedef struct _GladeCustomClass GladeCustomClass;
|
||||||
|
|
||||||
|
struct _GladeCustom
|
||||||
|
{
|
||||||
|
GtkWidget widget;
|
||||||
|
|
||||||
|
GdkPixmap *custom_pixmap;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _GladeCustomClass
|
||||||
|
{
|
||||||
|
GtkWidgetClass parent_class;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Since the class is called Custom and not GladeCustom,
|
||||||
|
* glade-widget-class will search for custom_get_type() instead
|
||||||
|
* if glade_custom_get_type()
|
||||||
|
*/
|
||||||
|
GType custom_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* __GLADE_CUSTOM_H__ */
|
@ -57,6 +57,11 @@ struct _GladeDesignViewPrivate
|
|||||||
GtkWidget *layout;
|
GtkWidget *layout;
|
||||||
|
|
||||||
GladeProject *project;
|
GladeProject *project;
|
||||||
|
|
||||||
|
GtkWidget *scrolled_window;
|
||||||
|
|
||||||
|
GtkWidget *progress;
|
||||||
|
GtkWidget *progress_window;
|
||||||
};
|
};
|
||||||
|
|
||||||
static GtkVBoxClass *parent_class = NULL;
|
static GtkVBoxClass *parent_class = NULL;
|
||||||
@ -64,6 +69,41 @@ static GtkVBoxClass *parent_class = NULL;
|
|||||||
|
|
||||||
G_DEFINE_TYPE(GladeDesignView, glade_design_view, GTK_TYPE_VBOX)
|
G_DEFINE_TYPE(GladeDesignView, glade_design_view, GTK_TYPE_VBOX)
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_design_view_parse_began (GladeProject *project,
|
||||||
|
GladeDesignView *view)
|
||||||
|
{
|
||||||
|
gtk_widget_hide (view->priv->scrolled_window);
|
||||||
|
gtk_widget_show (view->priv->progress_window);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_design_view_parse_finished (GladeProject *project,
|
||||||
|
GladeDesignView *view)
|
||||||
|
{
|
||||||
|
gtk_widget_hide (view->priv->progress_window);
|
||||||
|
gtk_widget_show (view->priv->scrolled_window);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_design_view_load_progress (GladeProject *project,
|
||||||
|
gint total,
|
||||||
|
gint step,
|
||||||
|
GladeDesignView *view)
|
||||||
|
{
|
||||||
|
gchar *path;
|
||||||
|
gchar *str;
|
||||||
|
|
||||||
|
path = glade_utils_replace_home_dir_with_tilde (glade_project_get_path (project));
|
||||||
|
str = g_strdup_printf (_("Loading %s: loaded %d of %d objects"), path, step, total);
|
||||||
|
gtk_progress_bar_set_text (GTK_PROGRESS_BAR (view->priv->progress), str);
|
||||||
|
g_free (str);
|
||||||
|
g_free (path);
|
||||||
|
|
||||||
|
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (view->priv->progress), step * 1.0 / total);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
glade_design_view_set_project (GladeDesignView *view, GladeProject *project)
|
glade_design_view_set_project (GladeDesignView *view, GladeProject *project)
|
||||||
{
|
{
|
||||||
@ -71,8 +111,11 @@ glade_design_view_set_project (GladeDesignView *view, GladeProject *project)
|
|||||||
|
|
||||||
view->priv->project = project;
|
view->priv->project = project;
|
||||||
|
|
||||||
g_object_set_data (G_OBJECT (view->priv->project), GLADE_DESIGN_VIEW_KEY, view);
|
g_signal_connect (project, "parse-began", G_CALLBACK (glade_design_view_parse_began), view);
|
||||||
|
g_signal_connect (project, "parse-finished", G_CALLBACK (glade_design_view_parse_finished), view);
|
||||||
|
g_signal_connect (project, "load-progress", G_CALLBACK (glade_design_view_load_progress), view);
|
||||||
|
|
||||||
|
g_object_set_data (G_OBJECT (view->priv->project), GLADE_DESIGN_VIEW_KEY, view);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -112,28 +155,49 @@ glade_design_view_get_property (GObject *object,
|
|||||||
static void
|
static void
|
||||||
glade_design_view_init (GladeDesignView *view)
|
glade_design_view_init (GladeDesignView *view)
|
||||||
{
|
{
|
||||||
GtkWidget *sw;
|
GtkWidget *viewport, *filler, *align;
|
||||||
GtkWidget *viewport;
|
|
||||||
|
|
||||||
view->priv = GLADE_DESIGN_VIEW_GET_PRIVATE (view);
|
view->priv = GLADE_DESIGN_VIEW_GET_PRIVATE (view);
|
||||||
|
|
||||||
view->priv->project = NULL;
|
view->priv->project = NULL;
|
||||||
view->priv->layout = glade_design_layout_new ();
|
view->priv->layout = glade_design_layout_new ();
|
||||||
|
|
||||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
view->priv->scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (view->priv->scrolled_window),
|
||||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
|
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
||||||
|
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (view->priv->scrolled_window),
|
||||||
|
GTK_SHADOW_IN);
|
||||||
|
|
||||||
viewport = gtk_viewport_new (NULL, NULL);
|
viewport = gtk_viewport_new (NULL, NULL);
|
||||||
gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE);
|
gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport), GTK_SHADOW_NONE);
|
||||||
gtk_container_add (GTK_CONTAINER (viewport), view->priv->layout);
|
gtk_container_add (GTK_CONTAINER (viewport), view->priv->layout);
|
||||||
gtk_container_add (GTK_CONTAINER (sw), viewport);
|
gtk_container_add (GTK_CONTAINER (view->priv->scrolled_window), viewport);
|
||||||
|
|
||||||
gtk_widget_show (sw);
|
gtk_widget_show (view->priv->scrolled_window);
|
||||||
gtk_widget_show (viewport);
|
gtk_widget_show (viewport);
|
||||||
gtk_widget_show (view->priv->layout);
|
gtk_widget_show (view->priv->layout);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (view), sw, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (view), view->priv->scrolled_window, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
/* The progress window */
|
||||||
|
view->priv->progress_window = gtk_vbox_new (FALSE, 0);
|
||||||
|
filler = gtk_label_new (NULL);
|
||||||
|
gtk_widget_show (filler);
|
||||||
|
gtk_box_pack_start (GTK_BOX (view->priv->progress_window), filler, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
align = gtk_alignment_new (0.5, 0.5, 0.75, 1.0);
|
||||||
|
gtk_widget_show (align);
|
||||||
|
gtk_box_pack_start (GTK_BOX (view->priv->progress_window), align, FALSE, TRUE, 0);
|
||||||
|
|
||||||
|
view->priv->progress = gtk_progress_bar_new ();
|
||||||
|
gtk_progress_bar_set_ellipsize (GTK_PROGRESS_BAR (view->priv->progress), PANGO_ELLIPSIZE_END);
|
||||||
|
gtk_widget_show (view->priv->progress);
|
||||||
|
gtk_container_add (GTK_CONTAINER (align), view->priv->progress);
|
||||||
|
|
||||||
|
filler = gtk_label_new (NULL);
|
||||||
|
gtk_widget_show (filler);
|
||||||
|
gtk_box_pack_start (GTK_BOX (view->priv->progress_window), filler, TRUE, TRUE, 0);
|
||||||
|
gtk_box_pack_start (GTK_BOX (view), view->priv->progress_window, TRUE, TRUE, 0);
|
||||||
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (view), 0);
|
gtk_container_set_border_width (GTK_CONTAINER (view), 0);
|
||||||
}
|
}
|
||||||
|
@ -3765,9 +3765,27 @@ glade_editor_property_load_by_widget (GladeEditorProperty *eprop,
|
|||||||
if (widget)
|
if (widget)
|
||||||
{
|
{
|
||||||
/* properties are allowed to be missing on some internal widgets */
|
/* properties are allowed to be missing on some internal widgets */
|
||||||
|
if (eprop->klass->packing)
|
||||||
|
property = glade_widget_get_pack_property (widget, eprop->klass->id);
|
||||||
|
else
|
||||||
property = glade_widget_get_property (widget, eprop->klass->id);
|
property = glade_widget_get_property (widget, eprop->klass->id);
|
||||||
|
|
||||||
glade_editor_property_load (eprop, property);
|
glade_editor_property_load (eprop, property);
|
||||||
|
|
||||||
|
if (property)
|
||||||
|
{
|
||||||
|
g_assert (eprop->klass == property->klass);
|
||||||
|
|
||||||
|
gtk_widget_show (GTK_WIDGET (eprop));
|
||||||
|
gtk_widget_show (GTK_WIDGET (eprop->item_label));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gtk_widget_hide (GTK_WIDGET (eprop));
|
||||||
|
gtk_widget_hide (GTK_WIDGET (eprop->item_label));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
glade_editor_property_load (eprop, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,20 @@ G_DEFINE_TYPE_WITH_CODE (GladeEditorTable, glade_editor_table, GTK_TYPE_TABLE,
|
|||||||
G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE,
|
G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE,
|
||||||
glade_editor_table_editable_init));
|
glade_editor_table_editable_init));
|
||||||
|
|
||||||
|
|
||||||
|
#define BLOCK_NAME_ENTRY_CB(table) \
|
||||||
|
do { if (table->name_entry) \
|
||||||
|
g_signal_handlers_block_by_func (G_OBJECT (table->name_entry), \
|
||||||
|
G_CALLBACK (widget_name_edited), table); \
|
||||||
|
} while (0);
|
||||||
|
|
||||||
|
#define UNBLOCK_NAME_ENTRY_CB(table) \
|
||||||
|
do { if (table->name_entry) \
|
||||||
|
g_signal_handlers_unblock_by_func (G_OBJECT (table->name_entry), \
|
||||||
|
G_CALLBACK (widget_name_edited), table); \
|
||||||
|
} while (0);
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
glade_editor_table_class_init (GladeEditorTableClass *klass)
|
glade_editor_table_class_init (GladeEditorTableClass *klass)
|
||||||
{
|
{
|
||||||
@ -107,6 +121,29 @@ glade_editor_table_grab_focus (GtkWidget *widget)
|
|||||||
GTK_WIDGET_CLASS (glade_editor_table_parent_class)->grab_focus (widget);
|
GTK_WIDGET_CLASS (glade_editor_table_parent_class)->grab_focus (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
widget_name_edited (GtkWidget *editable, GladeEditorTable *table)
|
||||||
|
{
|
||||||
|
GladeWidget *widget;
|
||||||
|
gchar *new_name;
|
||||||
|
|
||||||
|
g_return_if_fail (GTK_IS_EDITABLE (editable));
|
||||||
|
g_return_if_fail (GLADE_IS_EDITOR_TABLE (table));
|
||||||
|
|
||||||
|
if (table->loaded_widget == NULL)
|
||||||
|
{
|
||||||
|
g_warning ("Name entry edited with no loaded widget in editor %p!\n",
|
||||||
|
table);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
widget = table->loaded_widget;
|
||||||
|
new_name = gtk_editable_get_chars (GTK_EDITABLE (editable), 0, -1);
|
||||||
|
|
||||||
|
if (glade_project_available_widget_name (widget->project, widget, new_name))
|
||||||
|
glade_command_set_name (widget, new_name);
|
||||||
|
g_free (new_name);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
widget_name_changed (GladeWidget *widget,
|
widget_name_changed (GladeWidget *widget,
|
||||||
@ -116,10 +153,12 @@ widget_name_changed (GladeWidget *widget,
|
|||||||
if (!gtk_widget_get_mapped (GTK_WIDGET (table)))
|
if (!gtk_widget_get_mapped (GTK_WIDGET (table)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
table->loading = TRUE;
|
|
||||||
if (table->name_entry)
|
if (table->name_entry)
|
||||||
|
{
|
||||||
|
BLOCK_NAME_ENTRY_CB (table);
|
||||||
gtk_entry_set_text (GTK_ENTRY (table->name_entry), table->loaded_widget->name);
|
gtk_entry_set_text (GTK_ENTRY (table->name_entry), table->loaded_widget->name);
|
||||||
table->loading = FALSE;
|
UNBLOCK_NAME_ENTRY_CB (table);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,12 +181,9 @@ glade_editor_table_load (GladeEditable *editable,
|
|||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
/* abort mission */
|
/* abort mission */
|
||||||
if ((!table->loaded_widget && !widget) ||
|
if (table->loaded_widget == widget)
|
||||||
(table->loaded_widget && table->loaded_widget == widget))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
table->loading = TRUE;
|
|
||||||
|
|
||||||
if (table->loaded_widget)
|
if (table->loaded_widget)
|
||||||
{
|
{
|
||||||
g_signal_handlers_disconnect_by_func (G_OBJECT (table->loaded_widget),
|
g_signal_handlers_disconnect_by_func (G_OBJECT (table->loaded_widget),
|
||||||
@ -161,6 +197,8 @@ glade_editor_table_load (GladeEditable *editable,
|
|||||||
|
|
||||||
table->loaded_widget = widget;
|
table->loaded_widget = widget;
|
||||||
|
|
||||||
|
BLOCK_NAME_ENTRY_CB (table);
|
||||||
|
|
||||||
if (table->loaded_widget)
|
if (table->loaded_widget)
|
||||||
{
|
{
|
||||||
g_signal_connect (G_OBJECT (table->loaded_widget), "notify::name",
|
g_signal_connect (G_OBJECT (table->loaded_widget), "notify::name",
|
||||||
@ -178,14 +216,14 @@ glade_editor_table_load (GladeEditable *editable,
|
|||||||
else if (table->name_entry)
|
else if (table->name_entry)
|
||||||
gtk_entry_set_text (GTK_ENTRY (table->name_entry), "");
|
gtk_entry_set_text (GTK_ENTRY (table->name_entry), "");
|
||||||
|
|
||||||
|
UNBLOCK_NAME_ENTRY_CB (table);
|
||||||
|
|
||||||
/* Sync up properties, even if widget is NULL */
|
/* Sync up properties, even if widget is NULL */
|
||||||
for (list = table->properties; list; list = list->next)
|
for (list = table->properties; list; list = list->next)
|
||||||
{
|
{
|
||||||
property = list->data;
|
property = list->data;
|
||||||
glade_editor_property_load_by_widget (property, widget);
|
glade_editor_property_load_by_widget (property, widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
table->loading = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -330,26 +368,6 @@ append_items (GladeEditorTable *table,
|
|||||||
table->properties = g_list_reverse (table->properties);
|
table->properties = g_list_reverse (table->properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
widget_name_edited (GtkWidget *editable, GladeEditorTable *table)
|
|
||||||
{
|
|
||||||
GladeWidget *widget;
|
|
||||||
gchar *new_name;
|
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_EDITABLE (editable));
|
|
||||||
g_return_if_fail (GLADE_IS_EDITOR_TABLE (table));
|
|
||||||
|
|
||||||
if (table->loading) return;
|
|
||||||
|
|
||||||
widget = table->loaded_widget;
|
|
||||||
new_name = gtk_editable_get_chars (GTK_EDITABLE (editable), 0, -1);
|
|
||||||
|
|
||||||
if (glade_project_available_widget_name (widget->project, widget, new_name))
|
|
||||||
glade_command_set_name (widget, new_name);
|
|
||||||
g_free (new_name);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
append_name_field (GladeEditorTable *table)
|
append_name_field (GladeEditorTable *table)
|
||||||
{
|
{
|
||||||
|
@ -69,9 +69,6 @@ struct _GladeEditorTable
|
|||||||
* the general tab, a packing tab or the query popup ?
|
* the general tab, a packing tab or the query popup ?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
gboolean loading; /* Avoid recursion while loading values into widgets
|
|
||||||
*/
|
|
||||||
|
|
||||||
gint rows;
|
gint rows;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -346,6 +346,7 @@ glade_editor_update_class_field (GladeEditor *editor)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
gtk_widget_hide (editor->class_icon);
|
||||||
gtk_widget_hide (editor->warning);
|
gtk_widget_hide (editor->warning);
|
||||||
gtk_label_set_text (GTK_LABEL (editor->class_label), _("Properties"));
|
gtk_label_set_text (GTK_LABEL (editor->class_label), _("Properties"));
|
||||||
}
|
}
|
||||||
@ -722,6 +723,9 @@ glade_editor_load_widget_real (GladeEditor *editor, GladeWidget *widget)
|
|||||||
|
|
||||||
editor->loaded_widget = NULL;
|
editor->loaded_widget = NULL;
|
||||||
|
|
||||||
|
/* Clear class header */
|
||||||
|
glade_editor_update_class_field (editor);
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (editor), "widget");
|
g_object_notify (G_OBJECT (editor), "widget");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -152,10 +152,23 @@ void
|
|||||||
glade_id_allocator_release (GladeIDAllocator *allocator,
|
glade_id_allocator_release (GladeIDAllocator *allocator,
|
||||||
guint id)
|
guint id)
|
||||||
{
|
{
|
||||||
|
guint word_idx;
|
||||||
|
|
||||||
g_return_if_fail (allocator != NULL);
|
g_return_if_fail (allocator != NULL);
|
||||||
|
|
||||||
id = id > 0 ? id - 1 : 0;
|
/* Allocated ids start with 1 */
|
||||||
allocator->data[id >> 5] |= 1 << (id & 31);
|
if (id > 0)
|
||||||
|
{
|
||||||
|
id = id - 1;
|
||||||
|
word_idx = id >> 5;
|
||||||
|
|
||||||
|
/* Tollerate releasing ids that were never allocated with the allocator
|
||||||
|
* or are out of range... when we load Glade files with huge numbers it happens
|
||||||
|
* that loaded unallocated ids are out of range
|
||||||
|
*/
|
||||||
|
if (word_idx < allocator->n_words)
|
||||||
|
allocator->data[word_idx] |= 1 << (id & 31);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GLADE_ID_ALLOCATOR_TEST
|
#ifdef GLADE_ID_ALLOCATOR_TEST
|
||||||
|
@ -578,30 +578,50 @@ static void
|
|||||||
selection_foreach_func (GtkTreeModel *model,
|
selection_foreach_func (GtkTreeModel *model,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
gpointer data)
|
GList **selection)
|
||||||
{
|
{
|
||||||
GObject* object;
|
GObject* object;
|
||||||
|
|
||||||
gtk_tree_model_get (model, iter, GLADE_PROJECT_MODEL_COLUMN_OBJECT, &object, -1);
|
gtk_tree_model_get (model, iter, GLADE_PROJECT_MODEL_COLUMN_OBJECT, &object, -1);
|
||||||
|
|
||||||
if (object)
|
if (object)
|
||||||
glade_app_selection_add (object, FALSE);
|
{
|
||||||
|
*selection = g_list_prepend (*selection, object);
|
||||||
|
g_object_unref (object);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
selection_changed_cb (GtkTreeSelection *selection,
|
selection_changed_cb (GtkTreeSelection *selection,
|
||||||
GladeInspector *inspector)
|
GladeInspector *inspector)
|
||||||
{
|
{
|
||||||
|
GList *sel = NULL, *l;
|
||||||
|
|
||||||
|
gtk_tree_selection_selected_foreach (selection,
|
||||||
|
(GtkTreeSelectionForeachFunc)selection_foreach_func,
|
||||||
|
&sel);
|
||||||
|
|
||||||
|
/* We dont modify the project selection for a change that
|
||||||
|
* leaves us with no selection.
|
||||||
|
*
|
||||||
|
* This is typically because the user is changing the name
|
||||||
|
* of a widget and the filter is active, the new name causes
|
||||||
|
* the row to go out of the model and the selection to be
|
||||||
|
* cleared, if we clear the selection we remove the editor
|
||||||
|
* that the user is trying to type into.
|
||||||
|
*/
|
||||||
|
if (!sel)
|
||||||
|
return;
|
||||||
|
|
||||||
g_signal_handlers_block_by_func (inspector->priv->project,
|
g_signal_handlers_block_by_func (inspector->priv->project,
|
||||||
G_CALLBACK (project_selection_changed_cb),
|
G_CALLBACK (project_selection_changed_cb),
|
||||||
inspector);
|
inspector);
|
||||||
|
|
||||||
glade_app_selection_clear (FALSE);
|
glade_app_selection_clear (FALSE);
|
||||||
|
for (l = sel; l; l = l->next)
|
||||||
gtk_tree_selection_selected_foreach (selection,
|
glade_app_selection_add (G_OBJECT (l->data), FALSE);
|
||||||
selection_foreach_func,
|
|
||||||
inspector);
|
|
||||||
glade_app_selection_changed ();
|
glade_app_selection_changed ();
|
||||||
|
g_list_free (sel);
|
||||||
|
|
||||||
g_signal_handlers_unblock_by_func (inspector->priv->project,
|
g_signal_handlers_unblock_by_func (inspector->priv->project,
|
||||||
G_CALLBACK (project_selection_changed_cb),
|
G_CALLBACK (project_selection_changed_cb),
|
||||||
@ -648,7 +668,8 @@ button_press_cb (GtkWidget *widget,
|
|||||||
GLADE_PROJECT_MODEL_COLUMN_OBJECT, &object, -1);
|
GLADE_PROJECT_MODEL_COLUMN_OBJECT, &object, -1);
|
||||||
|
|
||||||
if (widget != NULL)
|
if (widget != NULL)
|
||||||
glade_popup_widget_pop (glade_widget_get_from_gobject (object), event, TRUE);
|
glade_popup_widget_pop (glade_widget_get_from_gobject (object),
|
||||||
|
event, TRUE);
|
||||||
else
|
else
|
||||||
glade_popup_simple_pop (event);
|
glade_popup_simple_pop (event);
|
||||||
|
|
||||||
@ -864,6 +885,7 @@ glade_inspector_get_selected_items (GladeInspector *inspector)
|
|||||||
gtk_tree_model_get (GTK_TREE_MODEL (priv->project), &iter,
|
gtk_tree_model_get (GTK_TREE_MODEL (priv->project), &iter,
|
||||||
GLADE_PROJECT_MODEL_COLUMN_OBJECT, &object, -1);
|
GLADE_PROJECT_MODEL_COLUMN_OBJECT, &object, -1);
|
||||||
|
|
||||||
|
g_object_unref (object);
|
||||||
items = g_list_prepend (items, glade_widget_get_from_gobject (object));
|
items = g_list_prepend (items, glade_widget_get_from_gobject (object));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ VOID:POINTER
|
|||||||
VOID:STRING,ULONG,UINT,STRING
|
VOID:STRING,ULONG,UINT,STRING
|
||||||
VOID:OBJECT
|
VOID:OBJECT
|
||||||
VOID:STRING
|
VOID:STRING
|
||||||
|
VOID:INT,INT
|
||||||
VOID:OBJECT,OBJECT
|
VOID:OBJECT,OBJECT
|
||||||
VOID:OBJECT,BOOLEAN
|
VOID:OBJECT,BOOLEAN
|
||||||
VOID:STRING,STRING,STRING
|
VOID:STRING,STRING,STRING
|
||||||
|
@ -43,7 +43,7 @@ struct _GladeNameContext {
|
|||||||
GladeNameContext *
|
GladeNameContext *
|
||||||
glade_name_context_new (void)
|
glade_name_context_new (void)
|
||||||
{
|
{
|
||||||
GladeNameContext *context = g_new0 (GladeNameContext, 1);
|
GladeNameContext *context = g_slice_new0 (GladeNameContext);
|
||||||
|
|
||||||
context->name_allocators = g_hash_table_new_full (g_str_hash,
|
context->name_allocators = g_hash_table_new_full (g_str_hash,
|
||||||
g_str_equal,
|
g_str_equal,
|
||||||
@ -65,7 +65,7 @@ glade_name_context_destroy (GladeNameContext *context)
|
|||||||
|
|
||||||
g_hash_table_destroy (context->name_allocators);
|
g_hash_table_destroy (context->name_allocators);
|
||||||
g_hash_table_destroy (context->names);
|
g_hash_table_destroy (context->names);
|
||||||
g_free (context);
|
g_slice_free (GladeNameContext, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
gchar *
|
gchar *
|
||||||
@ -117,9 +117,11 @@ glade_name_context_dual_new_name (GladeNameContext *context,
|
|||||||
const gchar *base_name)
|
const gchar *base_name)
|
||||||
{
|
{
|
||||||
GladeIDAllocator *id_allocator;
|
GladeIDAllocator *id_allocator;
|
||||||
|
GList *free_ids = NULL, *l;
|
||||||
const gchar *number;
|
const gchar *number;
|
||||||
gchar *name = NULL, *freeme = NULL;
|
gchar *name = NULL, *freeme = NULL;
|
||||||
guint i = 1;
|
guint i;
|
||||||
|
gboolean found = FALSE;
|
||||||
|
|
||||||
g_return_val_if_fail (context != NULL, NULL);
|
g_return_val_if_fail (context != NULL, NULL);
|
||||||
g_return_val_if_fail (another_context != NULL, NULL);
|
g_return_val_if_fail (another_context != NULL, NULL);
|
||||||
@ -144,14 +146,27 @@ glade_name_context_dual_new_name (GladeNameContext *context,
|
|||||||
g_strdup (base_name), id_allocator);
|
g_strdup (base_name), id_allocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
do
|
while (!found)
|
||||||
{
|
{
|
||||||
g_free (name);
|
g_free (name);
|
||||||
i = glade_id_allocator_allocate (id_allocator);
|
i = glade_id_allocator_allocate (id_allocator);
|
||||||
name = g_strdup_printf ("%s%u", base_name, i);
|
name = g_strdup_printf ("%s%u", base_name, i);
|
||||||
|
|
||||||
|
if (!(glade_name_context_has_name (context, name) ||
|
||||||
|
glade_name_context_has_name (another_context, name)))
|
||||||
|
found = TRUE;
|
||||||
|
else
|
||||||
|
free_ids = g_list_prepend (free_ids, GUINT_TO_POINTER (i));
|
||||||
}
|
}
|
||||||
while (glade_name_context_has_name (context, name) ||
|
|
||||||
glade_name_context_has_name (another_context, name));
|
/* Release all the ids that were not hits */
|
||||||
|
for (l = free_ids; l; l = l->next)
|
||||||
|
{
|
||||||
|
i = GPOINTER_TO_UINT (l->data);
|
||||||
|
|
||||||
|
glade_id_allocator_release (id_allocator, i);
|
||||||
|
}
|
||||||
|
g_list_free (free_ids);
|
||||||
|
|
||||||
g_free (freeme);
|
g_free (freeme);
|
||||||
return name;
|
return name;
|
||||||
@ -221,17 +236,12 @@ glade_name_context_release_name (GladeNameContext *context,
|
|||||||
}
|
}
|
||||||
while (TRUE);
|
while (TRUE);
|
||||||
|
|
||||||
/* if there is a number - then we have to unallocate it... */
|
|
||||||
if (ch == 0) return;
|
|
||||||
|
|
||||||
|
|
||||||
base_name = g_strdup (name);
|
base_name = g_strdup (name);
|
||||||
*(base_name + (first_number - name)) = 0;
|
*(base_name + (first_number - name)) = 0;
|
||||||
|
|
||||||
if ((id_allocator =
|
if ((id_allocator =
|
||||||
g_hash_table_lookup (context->name_allocators, base_name)) != NULL)
|
g_hash_table_lookup (context->name_allocators, base_name)) != NULL)
|
||||||
{
|
{
|
||||||
|
|
||||||
id = (int) strtol (first_number, &end_number, 10);
|
id = (int) strtol (first_number, &end_number, 10);
|
||||||
if (*end_number == 0)
|
if (*end_number == 0)
|
||||||
glade_id_allocator_release (id_allocator, id);
|
glade_id_allocator_release (id_allocator, id);
|
||||||
|
@ -562,7 +562,10 @@ glade_palette_item_button_press (GtkWidget *button,
|
|||||||
static GtkWidget*
|
static GtkWidget*
|
||||||
glade_palette_new_item (GladePalette *palette, GladeWidgetAdaptor *adaptor)
|
glade_palette_new_item (GladePalette *palette, GladeWidgetAdaptor *adaptor)
|
||||||
{
|
{
|
||||||
GtkWidget *item, *button;
|
GtkWidget *item, *button, *label;
|
||||||
|
#if GTK_CHECK_VERSION (2, 24, 0)
|
||||||
|
GtkWidget *box;
|
||||||
|
#endif
|
||||||
|
|
||||||
item = (GtkWidget *)gtk_toggle_tool_button_new ();
|
item = (GtkWidget *)gtk_toggle_tool_button_new ();
|
||||||
g_object_set_data (G_OBJECT (item), "glade-widget-adaptor", adaptor);
|
g_object_set_data (G_OBJECT (item), "glade-widget-adaptor", adaptor);
|
||||||
@ -570,7 +573,24 @@ glade_palette_new_item (GladePalette *palette, GladeWidgetAdaptor *adaptor)
|
|||||||
button = gtk_bin_get_child (GTK_BIN (item));
|
button = gtk_bin_get_child (GTK_BIN (item));
|
||||||
g_assert (GTK_IS_BUTTON (button));
|
g_assert (GTK_IS_BUTTON (button));
|
||||||
|
|
||||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), adaptor->title);
|
/* Add a box to avoid the ellipsize on the items
|
||||||
|
* (old versions expect a label as the label widget, too bad for them)
|
||||||
|
*/
|
||||||
|
#if GTK_CHECK_VERSION (2, 24, 0)
|
||||||
|
box = gtk_hbox_new (FALSE, 0);
|
||||||
|
label = gtk_label_new (adaptor->title);
|
||||||
|
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||||
|
gtk_widget_show (label);
|
||||||
|
gtk_widget_show (box);
|
||||||
|
gtk_container_add (GTK_CONTAINER (box), label);
|
||||||
|
gtk_tool_button_set_label_widget (GTK_TOOL_BUTTON (item), box);
|
||||||
|
#else
|
||||||
|
label = gtk_label_new (adaptor->title);
|
||||||
|
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||||
|
gtk_widget_show (label);
|
||||||
|
gtk_tool_button_set_label_widget (GTK_TOOL_BUTTON (item), label);
|
||||||
|
#endif
|
||||||
|
|
||||||
glade_palette_item_refresh (item);
|
glade_palette_item_refresh (item);
|
||||||
|
|
||||||
/* Update selection when the item is pushed */
|
/* Update selection when the item is pushed */
|
||||||
@ -761,6 +781,8 @@ glade_palette_init (GladePalette *palette)
|
|||||||
gtk_widget_show (sw);
|
gtk_widget_show (sw);
|
||||||
gtk_widget_show (priv->toolpalette);
|
gtk_widget_show (priv->toolpalette);
|
||||||
|
|
||||||
|
glade_palette_update_appearance (palette);
|
||||||
|
|
||||||
gtk_widget_set_no_show_all (GTK_WIDGET (palette), TRUE);
|
gtk_widget_set_no_show_all (GTK_WIDGET (palette), TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
29
gladeui/glade-previewer.rc.in
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#include <winver.h>
|
||||||
|
|
||||||
|
GLADE_ICON ICON "../data/icons/glade-3.ico"
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION @GLADE_MAJOR_VERSION@,@GLADE_MINOR_VERSION@,@GLADE_MICRO_VERSION@,0
|
||||||
|
PRODUCTVERSION @GLADE_MAJOR_VERSION@,@GLADE_MINOR_VERSION@,@GLADE_MICRO_VERSION@,0
|
||||||
|
FILEOS VOS__WINDOWS32
|
||||||
|
FILETYPE VFT_APP
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904B0"
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", "The GNOME Foundation"
|
||||||
|
VALUE "FileDescription", "Glade Interface Designer @GLADE_MAJOR_VERSION@.@GLADE_MINOR_VERSION@.@GLADE_MICRO_VERSION@"
|
||||||
|
VALUE "FileVersion", "@GLADE_MAJOR_VERSION@.@GLADE_MINOR_VERSION@.@GLADE_MICRO_VERSION@.0"
|
||||||
|
VALUE "LegalCopyright", "Copyright © 2007 The GNOME Foundation"
|
||||||
|
VALUE "OriginalFilename", "glade-previewer.exe"
|
||||||
|
VALUE "ProductName", "Glade Interface Designer"
|
||||||
|
VALUE "ProductVersion", "@GLADE_MAJOR_VERSION@.@GLADE_MINOR_VERSION@.@GLADE_MICRO_VERSION@.0"
|
||||||
|
END
|
||||||
|
END
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1200
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
@ -61,9 +61,11 @@ enum
|
|||||||
SELECTION_CHANGED,
|
SELECTION_CHANGED,
|
||||||
CLOSE,
|
CLOSE,
|
||||||
CHANGED,
|
CHANGED,
|
||||||
|
PARSE_BEGAN,
|
||||||
PARSE_FINISHED,
|
PARSE_FINISHED,
|
||||||
CONVERT_FINISHED,
|
CONVERT_FINISHED,
|
||||||
TARGETS_CHANGED,
|
TARGETS_CHANGED,
|
||||||
|
LOAD_PROGRESS,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -82,8 +84,6 @@ struct _GladeProjectPrivate
|
|||||||
{
|
{
|
||||||
gchar *path; /* The full canonical path of the glade file for this project */
|
gchar *path; /* The full canonical path of the glade file for this project */
|
||||||
|
|
||||||
guint instance_count; /* How many projects with this name */
|
|
||||||
|
|
||||||
gint unsaved_number; /* A unique number for this project if it is untitled */
|
gint unsaved_number; /* A unique number for this project if it is untitled */
|
||||||
|
|
||||||
gboolean readonly; /* A flag that is set if the project is readonly */
|
gboolean readonly; /* A flag that is set if the project is readonly */
|
||||||
@ -159,6 +159,11 @@ struct _GladeProjectPrivate
|
|||||||
GtkWidget *relative_path_entry;
|
GtkWidget *relative_path_entry;
|
||||||
GtkWidget *full_path_button;
|
GtkWidget *full_path_button;
|
||||||
|
|
||||||
|
/* For the loading progress bars ("load-progress" signal) */
|
||||||
|
gint progress_step;
|
||||||
|
gint progress_full;
|
||||||
|
gboolean load_cancel;
|
||||||
|
|
||||||
/* Store preview processes, so we can kill them on close */
|
/* Store preview processes, so we can kill them on close */
|
||||||
GHashTable *preview_channels;
|
GHashTable *preview_channels;
|
||||||
};
|
};
|
||||||
@ -231,6 +236,9 @@ static void glade_project_model_get_iter_for_object (GladeProject* proje
|
|||||||
GObject* object,
|
GObject* object,
|
||||||
GtkTreeIter* iter);
|
GtkTreeIter* iter);
|
||||||
|
|
||||||
|
|
||||||
|
#define GLADE_PROJECT_LARGE_PROJECT 40
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GladeProject, glade_project, G_TYPE_OBJECT,
|
G_DEFINE_TYPE_WITH_CODE (GladeProject, glade_project, G_TYPE_OBJECT,
|
||||||
G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_MODEL,
|
G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_MODEL,
|
||||||
gtk_tree_model_iface_init))
|
gtk_tree_model_iface_init))
|
||||||
@ -259,13 +267,34 @@ glade_project_list_unref (GList *original_list)
|
|||||||
g_list_free (original_list);
|
g_list_free (original_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
unparent_objects_recurse (GladeWidget *widget)
|
||||||
|
{
|
||||||
|
GladeWidget *child;
|
||||||
|
GList *children, *list;
|
||||||
|
|
||||||
|
/* Unparent all children */
|
||||||
|
if ((children =
|
||||||
|
glade_widget_get_children (widget)) != NULL)
|
||||||
|
{
|
||||||
|
for (list = children; list; list = list->next)
|
||||||
|
{
|
||||||
|
child = glade_widget_get_from_gobject (list->data);
|
||||||
|
|
||||||
|
unparent_objects_recurse (child);
|
||||||
|
|
||||||
|
if (child->internal == NULL)
|
||||||
|
glade_widget_remove_child (widget, child);
|
||||||
|
}
|
||||||
|
g_list_free (children);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
glade_project_dispose (GObject *object)
|
glade_project_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
GladeProject *project = GLADE_PROJECT (object);
|
GladeProject *project = GLADE_PROJECT (object);
|
||||||
GList *list;
|
GList *list, *tree;
|
||||||
GladeWidget *gwidget;
|
|
||||||
GladeProperty *property;
|
|
||||||
|
|
||||||
/* Emit close signal */
|
/* Emit close signal */
|
||||||
g_signal_emit (object, glade_project_signals [CLOSE], 0);
|
g_signal_emit (object, glade_project_signals [CLOSE], 0);
|
||||||
@ -275,41 +304,24 @@ glade_project_dispose (GObject *object)
|
|||||||
glade_project_list_unref (project->priv->undo_stack);
|
glade_project_list_unref (project->priv->undo_stack);
|
||||||
project->priv->undo_stack = NULL;
|
project->priv->undo_stack = NULL;
|
||||||
|
|
||||||
/* Unparent all widgets in the heirarchy first
|
|
||||||
* (Since we are bookkeeping exact reference counts, we
|
|
||||||
* dont want the hierarchy to just get destroyed)
|
|
||||||
*/
|
|
||||||
for (list = project->priv->objects; list; list = list->next)
|
|
||||||
{
|
|
||||||
gwidget = glade_widget_get_from_gobject (list->data);
|
|
||||||
|
|
||||||
if (gwidget->parent &&
|
|
||||||
gwidget->internal == NULL &&
|
|
||||||
glade_widget_adaptor_has_child (gwidget->parent->adaptor,
|
|
||||||
gwidget->parent->object,
|
|
||||||
gwidget->object))
|
|
||||||
glade_widget_remove_child (gwidget->parent, gwidget);
|
|
||||||
|
|
||||||
/* Release references by way of object properties... */
|
|
||||||
while (gwidget->prop_refs)
|
|
||||||
{
|
|
||||||
property = GLADE_PROPERTY (gwidget->prop_refs->data);
|
|
||||||
glade_property_set (property, NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Remove objects from the project */
|
/* Remove objects from the project */
|
||||||
for (list = project->priv->objects; list; list = list->next)
|
tree = g_list_copy (project->priv->tree);
|
||||||
|
for (list = tree; list; list = list->next)
|
||||||
{
|
{
|
||||||
gwidget = glade_widget_get_from_gobject (list->data);
|
GladeWidget *gwidget = glade_widget_get_from_gobject (list->data);
|
||||||
g_object_unref (G_OBJECT (list->data)); /* Remove the GladeProject reference */
|
|
||||||
g_object_unref (G_OBJECT (gwidget)); /* Remove the overall "Glade" reference */
|
unparent_objects_recurse (gwidget);
|
||||||
}
|
}
|
||||||
g_list_free (list);
|
g_list_free (tree);
|
||||||
g_list_free (project->priv->objects);
|
|
||||||
g_list_free (project->priv->tree);
|
while (project->priv->tree)
|
||||||
project->priv->tree = NULL;
|
glade_project_remove_object (project, project->priv->tree->data);
|
||||||
project->priv->objects = NULL;
|
|
||||||
|
while (project->priv->objects)
|
||||||
|
glade_project_remove_object (project, project->priv->objects->data);
|
||||||
|
|
||||||
|
g_assert (project->priv->tree == NULL);
|
||||||
|
g_assert (project->priv->objects == NULL);
|
||||||
|
|
||||||
G_OBJECT_CLASS (glade_project_parent_class)->dispose (object);
|
G_OBJECT_CLASS (glade_project_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
@ -321,7 +333,6 @@ glade_project_finalize (GObject *object)
|
|||||||
GList *list;
|
GList *list;
|
||||||
TopLevelInfo *tinfo;
|
TopLevelInfo *tinfo;
|
||||||
|
|
||||||
|
|
||||||
/* XXX FIXME: Destroy dialog related sizegroups here... */
|
/* XXX FIXME: Destroy dialog related sizegroups here... */
|
||||||
gtk_widget_destroy (project->priv->prefs_dialog);
|
gtk_widget_destroy (project->priv->prefs_dialog);
|
||||||
|
|
||||||
@ -679,7 +690,6 @@ glade_project_init (GladeProject *project)
|
|||||||
G_TYPE_INSTANCE_GET_PRIVATE ((project), GLADE_TYPE_PROJECT, GladeProjectPrivate);
|
G_TYPE_INSTANCE_GET_PRIVATE ((project), GLADE_TYPE_PROJECT, GladeProjectPrivate);
|
||||||
|
|
||||||
priv->path = NULL;
|
priv->path = NULL;
|
||||||
priv->instance_count = 0;
|
|
||||||
priv->readonly = FALSE;
|
priv->readonly = FALSE;
|
||||||
priv->tree = NULL;
|
priv->tree = NULL;
|
||||||
priv->toplevels = NULL;
|
priv->toplevels = NULL;
|
||||||
@ -864,6 +874,21 @@ glade_project_class_init (GladeProjectClass *klass)
|
|||||||
2,
|
2,
|
||||||
GLADE_TYPE_COMMAND, G_TYPE_BOOLEAN);
|
GLADE_TYPE_COMMAND, G_TYPE_BOOLEAN);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GladeProject::parse-began:
|
||||||
|
* @gladeproject: the #GladeProject which received the signal.
|
||||||
|
*
|
||||||
|
* Emitted when @gladeproject parsing starts.
|
||||||
|
*/
|
||||||
|
glade_project_signals[PARSE_BEGAN] =
|
||||||
|
g_signal_new ("parse-began",
|
||||||
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
G_SIGNAL_RUN_FIRST,
|
||||||
|
0, NULL, NULL,
|
||||||
|
g_cclosure_marshal_VOID__VOID,
|
||||||
|
G_TYPE_NONE,
|
||||||
|
0);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GladeProject::parse-finished:
|
* GladeProject::parse-finished:
|
||||||
* @gladeproject: the #GladeProject which received the signal.
|
* @gladeproject: the #GladeProject which received the signal.
|
||||||
@ -901,7 +926,6 @@ glade_project_class_init (GladeProjectClass *klass)
|
|||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GladeProject::targets-changed:
|
* GladeProject::targets-changed:
|
||||||
* @gladeproject: the #GladeProject which received the signal.
|
* @gladeproject: the #GladeProject which received the signal.
|
||||||
@ -917,6 +941,22 @@ glade_project_class_init (GladeProjectClass *klass)
|
|||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GladeProject::load-progress:
|
||||||
|
* @gladeproject: the #GladeProject which received the signal.
|
||||||
|
* @objects_total: the total amount of objects to load
|
||||||
|
* @objects_loaded: the current amount of loaded objects
|
||||||
|
*
|
||||||
|
* Emitted while @project is loading.
|
||||||
|
*/
|
||||||
|
glade_project_signals[LOAD_PROGRESS] =
|
||||||
|
g_signal_new ("load-progress",
|
||||||
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
G_SIGNAL_RUN_FIRST,
|
||||||
|
0, NULL, NULL,
|
||||||
|
glade_marshal_VOID__INT_INT,
|
||||||
|
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
|
||||||
|
|
||||||
g_object_class_install_property (object_class,
|
g_object_class_install_property (object_class,
|
||||||
PROP_MODIFIED,
|
PROP_MODIFIED,
|
||||||
g_param_spec_boolean ("modified",
|
g_param_spec_boolean ("modified",
|
||||||
@ -995,13 +1035,14 @@ glade_project_new (void)
|
|||||||
static void
|
static void
|
||||||
glade_project_fix_object_props (GladeProject *project)
|
glade_project_fix_object_props (GladeProject *project)
|
||||||
{
|
{
|
||||||
GList *l, *ll;
|
GList *l, *ll, *objects;
|
||||||
GValue *value;
|
GValue *value;
|
||||||
GladeWidget *gwidget;
|
GladeWidget *gwidget;
|
||||||
GladeProperty *property;
|
GladeProperty *property;
|
||||||
gchar *txt;
|
gchar *txt;
|
||||||
|
|
||||||
for (l = project->priv->objects; l; l = l->next)
|
objects = g_list_copy (project->priv->objects);
|
||||||
|
for (l = objects; l; l = l->next)
|
||||||
{
|
{
|
||||||
gwidget = glade_widget_get_from_gobject (l->data);
|
gwidget = glade_widget_get_from_gobject (l->data);
|
||||||
|
|
||||||
@ -1030,6 +1071,7 @@ glade_project_fix_object_props (GladeProject *project)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
g_list_free (objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
@ -1409,8 +1451,53 @@ glade_project_introspect_gtk_version (GladeProject *project)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static gint
|
||||||
|
glade_project_count_xml_objects (GladeProject *project, GladeXmlNode *root, gint count)
|
||||||
|
{
|
||||||
|
GladeXmlNode *node;
|
||||||
|
|
||||||
|
for (node = glade_xml_node_get_children (root);
|
||||||
|
node; node = glade_xml_node_next (node))
|
||||||
|
{
|
||||||
|
if (glade_xml_node_verify_silent
|
||||||
|
(node, GLADE_XML_TAG_WIDGET (project->priv->format)))
|
||||||
|
count = glade_project_count_xml_objects (project, node, ++count);
|
||||||
|
else if (glade_xml_node_verify_silent (node, GLADE_XML_TAG_CHILD))
|
||||||
|
count = glade_project_count_xml_objects (project, node, count);
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
glade_project_cancel_load (GladeProject *project)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GLADE_IS_PROJECT (project));
|
||||||
|
|
||||||
|
project->priv->load_cancel = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
glade_project_load_cancelled (GladeProject *project)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GLADE_IS_PROJECT (project), FALSE);
|
||||||
|
|
||||||
|
return project->priv->load_cancel;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
glade_project_push_progress (GladeProject *project)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GLADE_IS_PROJECT (project));
|
||||||
|
|
||||||
|
project->priv->progress_step++;
|
||||||
|
|
||||||
|
g_signal_emit (project, glade_project_signals [LOAD_PROGRESS], 0,
|
||||||
|
project->priv->progress_full,
|
||||||
|
project->priv->progress_step);
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
glade_project_load_from_file (GladeProject *project, const gchar *path)
|
glade_project_load_internal (GladeProject *project)
|
||||||
{
|
{
|
||||||
GladeXmlContext *context;
|
GladeXmlContext *context;
|
||||||
GladeXmlDoc *doc;
|
GladeXmlDoc *doc;
|
||||||
@ -1418,24 +1505,26 @@ glade_project_load_from_file (GladeProject *project, const gchar *path)
|
|||||||
GladeXmlNode *node;
|
GladeXmlNode *node;
|
||||||
GladeWidget *widget;
|
GladeWidget *widget;
|
||||||
gboolean has_gtk_dep = FALSE;
|
gboolean has_gtk_dep = FALSE;
|
||||||
|
gint count;
|
||||||
|
|
||||||
project->priv->selection = NULL;
|
project->priv->selection = NULL;
|
||||||
project->priv->toplevels = NULL;
|
project->priv->toplevels = NULL;
|
||||||
project->priv->objects = NULL;
|
project->priv->objects = NULL;
|
||||||
project->priv->loading = TRUE;
|
project->priv->loading = TRUE;
|
||||||
|
|
||||||
project->priv->path = glade_util_canonical_path (path);
|
|
||||||
|
|
||||||
/* get the context & root node of the catalog file */
|
/* get the context & root node of the catalog file */
|
||||||
if (!(context =
|
if (!(context =
|
||||||
glade_xml_context_new_from_path (path,
|
glade_xml_context_new_from_path (project->priv->path,
|
||||||
NULL,
|
NULL,
|
||||||
NULL)))
|
NULL)))
|
||||||
{
|
{
|
||||||
g_warning ("Couldn't open glade file [%s].", path);
|
g_warning ("Couldn't open glade file [%s].", project->priv->path);
|
||||||
|
project->priv->loading = FALSE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
project->priv->mtime = glade_util_get_file_mtime (project->priv->path, NULL);
|
||||||
|
|
||||||
doc = glade_xml_context_get_doc (context);
|
doc = glade_xml_context_get_doc (context);
|
||||||
root = glade_xml_doc_get_root (doc);
|
root = glade_xml_doc_get_root (doc);
|
||||||
|
|
||||||
@ -1445,16 +1534,22 @@ glade_project_load_from_file (GladeProject *project, const gchar *path)
|
|||||||
glade_project_set_format (project, GLADE_PROJECT_FORMAT_GTKBUILDER);
|
glade_project_set_format (project, GLADE_PROJECT_FORMAT_GTKBUILDER);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Couldnt determine project format, skipping %s", path);
|
g_warning ("Couldnt determine project format, skipping %s",
|
||||||
|
project->priv->path);
|
||||||
glade_xml_context_free (context);
|
glade_xml_context_free (context);
|
||||||
|
project->priv->loading = FALSE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Emit "parse-began" signal */
|
||||||
|
g_signal_emit (project, glade_project_signals [PARSE_BEGAN], 0);
|
||||||
|
|
||||||
/* XXX Need to load project->priv->comment ! */
|
/* XXX Need to load project->priv->comment ! */
|
||||||
glade_project_read_comment (project, doc);
|
glade_project_read_comment (project, doc);
|
||||||
|
|
||||||
if (glade_project_read_requires (project, root, path, &has_gtk_dep) == FALSE)
|
if (glade_project_read_requires (project, root, project->priv->path, &has_gtk_dep) == FALSE)
|
||||||
{
|
{
|
||||||
|
project->priv->loading = FALSE;
|
||||||
glade_xml_context_free (context);
|
glade_xml_context_free (context);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -1463,6 +1558,12 @@ glade_project_load_from_file (GladeProject *project, const gchar *path)
|
|||||||
|
|
||||||
glade_project_read_resource_path (project, root);
|
glade_project_read_resource_path (project, root);
|
||||||
|
|
||||||
|
/* Launch a dialog if it's going to take enough time to be
|
||||||
|
* worth showing at all */
|
||||||
|
count = glade_project_count_xml_objects (project, root, 0);
|
||||||
|
project->priv->progress_full = count;
|
||||||
|
project->priv->progress_step = 0;
|
||||||
|
|
||||||
for (node = glade_xml_node_get_children (root);
|
for (node = glade_xml_node_get_children (root);
|
||||||
node; node = glade_xml_node_next (node))
|
node; node = glade_xml_node_next (node))
|
||||||
{
|
{
|
||||||
@ -1472,9 +1573,19 @@ glade_project_load_from_file (GladeProject *project, const gchar *path)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((widget = glade_widget_read (project, NULL, node, NULL)) != NULL)
|
if ((widget = glade_widget_read (project, NULL, node, NULL)) != NULL)
|
||||||
{
|
|
||||||
glade_project_add_object (project, NULL, widget->object);
|
glade_project_add_object (project, NULL, widget->object);
|
||||||
|
|
||||||
|
if (project->priv->load_cancel)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Finished with the xml context */
|
||||||
|
glade_xml_context_free (context);
|
||||||
|
|
||||||
|
if (project->priv->load_cancel)
|
||||||
|
{
|
||||||
|
project->priv->loading = FALSE;
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!has_gtk_dep)
|
if (!has_gtk_dep)
|
||||||
@ -1483,11 +1594,6 @@ glade_project_load_from_file (GladeProject *project, const gchar *path)
|
|||||||
if (glade_util_file_is_writeable (project->priv->path) == FALSE)
|
if (glade_util_file_is_writeable (project->priv->path) == FALSE)
|
||||||
glade_project_set_readonly (project, TRUE);
|
glade_project_set_readonly (project, TRUE);
|
||||||
|
|
||||||
/* Finished with the xml context */
|
|
||||||
glade_xml_context_free (context);
|
|
||||||
|
|
||||||
project->priv->mtime = glade_util_get_file_mtime (project->priv->path, NULL);
|
|
||||||
|
|
||||||
/* Reset project status here too so that you get a clean
|
/* Reset project status here too so that you get a clean
|
||||||
* slate after calling glade_project_open().
|
* slate after calling glade_project_open().
|
||||||
*/
|
*/
|
||||||
@ -1499,19 +1605,47 @@ glade_project_load_from_file (GladeProject *project, const gchar *path)
|
|||||||
*/
|
*/
|
||||||
glade_project_fix_object_props (project);
|
glade_project_fix_object_props (project);
|
||||||
|
|
||||||
|
|
||||||
/* Emit "parse-finished" signal */
|
/* Emit "parse-finished" signal */
|
||||||
g_signal_emit (project, glade_project_signals [PARSE_FINISHED], 0);
|
g_signal_emit (project, glade_project_signals [PARSE_FINISHED], 0);
|
||||||
|
|
||||||
|
|
||||||
/* Update ui with versioning info
|
/* Update ui with versioning info
|
||||||
*/
|
*/
|
||||||
glade_project_verify_project_for_ui (project);
|
glade_project_verify_project_for_ui (project);
|
||||||
|
|
||||||
|
/* Update various things in the UI */
|
||||||
|
glade_app_update_ui ();
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
glade_project_load_from_file (GladeProject *project,
|
||||||
|
const gchar *path)
|
||||||
|
{
|
||||||
|
gboolean retval;
|
||||||
|
|
||||||
|
g_return_val_if_fail (path != NULL, FALSE);
|
||||||
|
g_return_val_if_fail (GLADE_IS_PROJECT (project), FALSE);
|
||||||
|
|
||||||
|
project->priv->path = glade_util_canonical_path (path);
|
||||||
|
|
||||||
|
retval = glade_project_load_internal (project);
|
||||||
|
|
||||||
|
if (retval)
|
||||||
|
{
|
||||||
|
gchar *name, *title;
|
||||||
|
|
||||||
|
/* Update prefs dialogs here... */
|
||||||
|
name = glade_project_get_name (project);
|
||||||
|
title = g_strdup_printf (_("%s preferences"), name);
|
||||||
|
gtk_window_set_title (GTK_WINDOW (project->priv->prefs_dialog), title);
|
||||||
|
g_free (title);
|
||||||
|
g_free (name);
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* glade_project_load:
|
* glade_project_load:
|
||||||
* @path:
|
* @path:
|
||||||
@ -1531,7 +1665,9 @@ glade_project_load (const gchar *path)
|
|||||||
|
|
||||||
project = g_object_new (GLADE_TYPE_PROJECT, NULL);
|
project = g_object_new (GLADE_TYPE_PROJECT, NULL);
|
||||||
|
|
||||||
retval = glade_project_load_from_file (project, path);
|
project->priv->path = glade_util_canonical_path (path);
|
||||||
|
|
||||||
|
retval = glade_project_load_internal (project);
|
||||||
|
|
||||||
if (retval)
|
if (retval)
|
||||||
{
|
{
|
||||||
@ -1706,6 +1842,22 @@ glade_project_write_resource_path (GladeProject *project,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gint
|
||||||
|
sort_project_dependancies (GObject *a, GObject *b)
|
||||||
|
{
|
||||||
|
GladeWidget *ga, *gb;
|
||||||
|
|
||||||
|
ga = glade_widget_get_from_gobject (a);
|
||||||
|
gb = glade_widget_get_from_gobject (b);
|
||||||
|
|
||||||
|
if (glade_widget_adaptor_depends (ga->adaptor, ga, gb))
|
||||||
|
return 1;
|
||||||
|
else if (glade_widget_adaptor_depends (gb->adaptor, gb, ga))
|
||||||
|
return -1;
|
||||||
|
else
|
||||||
|
return strcmp (ga->name, gb->name);
|
||||||
|
}
|
||||||
|
|
||||||
static GladeXmlContext *
|
static GladeXmlContext *
|
||||||
glade_project_write (GladeProject *project)
|
glade_project_write (GladeProject *project)
|
||||||
{
|
{
|
||||||
@ -1731,6 +1883,11 @@ glade_project_write (GladeProject *project)
|
|||||||
|
|
||||||
glade_project_write_resource_path (project, context, root);
|
glade_project_write_resource_path (project, context, root);
|
||||||
|
|
||||||
|
/* Sort the whole thing */
|
||||||
|
project->priv->objects =
|
||||||
|
g_list_sort (project->priv->objects,
|
||||||
|
(GCompareFunc)sort_project_dependancies);
|
||||||
|
|
||||||
for (list = project->priv->objects; list; list = list->next)
|
for (list = project->priv->objects; list; list = list->next)
|
||||||
{
|
{
|
||||||
GladeWidget *widget;
|
GladeWidget *widget;
|
||||||
@ -1766,6 +1923,11 @@ glade_project_save (GladeProject *project, const gchar *path, GError **error)
|
|||||||
gchar *canonical_path;
|
gchar *canonical_path;
|
||||||
gint ret;
|
gint ret;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GLADE_IS_PROJECT (project), FALSE);
|
||||||
|
|
||||||
|
if (glade_project_is_loading (project))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (!glade_project_verify (project, TRUE))
|
if (!glade_project_verify (project, TRUE))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@ -1825,9 +1987,9 @@ glade_project_launch_preview (GladeProject *project, gchar *buffer, GtkWidget *w
|
|||||||
|
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
argv[0] = g_build_filename (glade_app_get_bin_dir(), "glade-previewer.exe", NULL);
|
argv[0] = g_build_filename (glade_app_get_bin_dir(), "glade-3-previewer.exe", NULL);
|
||||||
#else
|
#else
|
||||||
argv[0] = g_build_filename (glade_app_get_bin_dir(), "glade-previewer", NULL);
|
argv[0] = g_build_filename (glade_app_get_bin_dir(), "glade-3-previewer", NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -1909,15 +2071,18 @@ glade_project_preview (GladeProject *project, GladeWidget *gwidget)
|
|||||||
{
|
{
|
||||||
GladeXmlContext *context;
|
GladeXmlContext *context;
|
||||||
gchar *text;
|
gchar *text;
|
||||||
GtkWidget *widget = GTK_WIDGET (gwidget->object);
|
GtkWidget *widget;
|
||||||
|
|
||||||
g_return_if_fail (GTK_WIDGET (widget));
|
|
||||||
g_return_if_fail (GLADE_IS_PROJECT (project));
|
g_return_if_fail (GLADE_IS_PROJECT (project));
|
||||||
|
|
||||||
context = glade_project_write (project);
|
context = glade_project_write (project);
|
||||||
|
|
||||||
text = glade_xml_dump_from_context (context);
|
text = glade_xml_dump_from_context (context);
|
||||||
|
|
||||||
|
gwidget = glade_widget_get_toplevel (gwidget);
|
||||||
|
if (!GTK_IS_WIDGET (gwidget->object)) return;
|
||||||
|
widget = GTK_WIDGET (gwidget->object);
|
||||||
|
|
||||||
glade_project_launch_preview (project, text, widget);
|
glade_project_launch_preview (project, text, widget);
|
||||||
|
|
||||||
g_free (text);
|
g_free (text);
|
||||||
@ -2672,7 +2837,6 @@ glade_project_release_widget_name (GladeProject *project, GladeWidget *gwidget,
|
|||||||
g_free (tinfo);
|
g_free (tinfo);
|
||||||
project->priv->toplevels = g_list_remove (project->priv->toplevels, tinfo);
|
project->priv->toplevels = g_list_remove (project->priv->toplevels, tinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2806,6 +2970,8 @@ glade_project_set_widget_name (GladeProject *project,
|
|||||||
const gchar *name)
|
const gchar *name)
|
||||||
{
|
{
|
||||||
gchar *new_name;
|
gchar *new_name;
|
||||||
|
GtkTreeIter iter;
|
||||||
|
GtkTreePath *path;
|
||||||
|
|
||||||
g_return_if_fail (GLADE_IS_PROJECT (project));
|
g_return_if_fail (GLADE_IS_PROJECT (project));
|
||||||
g_return_if_fail (GLADE_IS_WIDGET (widget));
|
g_return_if_fail (GLADE_IS_WIDGET (widget));
|
||||||
@ -2832,22 +2998,12 @@ glade_project_set_widget_name (GladeProject *project,
|
|||||||
0, widget);
|
0, widget);
|
||||||
|
|
||||||
g_free (new_name);
|
g_free (new_name);
|
||||||
}
|
|
||||||
|
|
||||||
static gint
|
/* Notify views about the iter change */
|
||||||
sort_project_dependancies (GObject *a, GObject *b)
|
glade_project_model_get_iter_for_object (project, widget->object, &iter);
|
||||||
{
|
path = gtk_tree_model_get_path (GTK_TREE_MODEL (project), &iter);
|
||||||
GladeWidget *ga, *gb;
|
gtk_tree_model_row_changed (GTK_TREE_MODEL (project), path, &iter);
|
||||||
|
gtk_tree_path_free (path);
|
||||||
ga = glade_widget_get_from_gobject (a);
|
|
||||||
gb = glade_widget_get_from_gobject (b);
|
|
||||||
|
|
||||||
if (glade_widget_adaptor_depends (ga->adaptor, ga, gb))
|
|
||||||
return 1;
|
|
||||||
else if (glade_widget_adaptor_depends (gb->adaptor, gb, ga))
|
|
||||||
return -1;
|
|
||||||
else
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -2878,6 +3034,47 @@ glade_project_update_previewable (GladeProject *project)
|
|||||||
g_object_notify (G_OBJECT (project), "previewable");
|
g_object_notify (G_OBJECT (project), "previewable");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_project_notify_row_inserted (GladeProject *project,
|
||||||
|
GladeWidget *gwidget)
|
||||||
|
{
|
||||||
|
GtkTreeIter iter;
|
||||||
|
GtkTreePath *path;
|
||||||
|
|
||||||
|
/* The state of old iters go invalid and then the new iter is valid
|
||||||
|
* until the next change */
|
||||||
|
project->priv->stamp++;
|
||||||
|
|
||||||
|
glade_project_model_get_iter_for_object (project, gwidget->object, &iter);
|
||||||
|
path = gtk_tree_model_get_path (GTK_TREE_MODEL (project), &iter);
|
||||||
|
gtk_tree_model_row_inserted (GTK_TREE_MODEL (project), path, &iter);
|
||||||
|
gtk_tree_path_free (path);
|
||||||
|
|
||||||
|
/* XXX Need to check and call this
|
||||||
|
* gtk_tree_model_row_has_child_toggled
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
glade_project_notify_row_deleted (GladeProject *project,
|
||||||
|
GladeWidget *gwidget)
|
||||||
|
{
|
||||||
|
GtkTreeIter iter;
|
||||||
|
GtkTreePath *path;
|
||||||
|
|
||||||
|
glade_project_model_get_iter_for_object (project, gwidget->object, &iter);
|
||||||
|
path = gtk_tree_model_get_path (GTK_TREE_MODEL (project), &iter);
|
||||||
|
gtk_tree_model_row_deleted (GTK_TREE_MODEL (project), path);
|
||||||
|
gtk_tree_path_free (path);
|
||||||
|
|
||||||
|
/* XXX Need to check and call this
|
||||||
|
* gtk_tree_model_row_has_child_toggled
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
project->priv->stamp++;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* glade_project_add_object:
|
* glade_project_add_object:
|
||||||
* @project: the #GladeProject the widget is added to
|
* @project: the #GladeProject the widget is added to
|
||||||
@ -2895,8 +3092,6 @@ glade_project_add_object (GladeProject *project,
|
|||||||
GladeWidget *gwidget;
|
GladeWidget *gwidget;
|
||||||
GList *list, *children;
|
GList *list, *children;
|
||||||
gchar *name;
|
gchar *name;
|
||||||
GtkTreeIter iter;
|
|
||||||
GtkTreePath *path;
|
|
||||||
|
|
||||||
g_return_if_fail (GLADE_IS_PROJECT (project));
|
g_return_if_fail (GLADE_IS_PROJECT (project));
|
||||||
g_return_if_fail (G_IS_OBJECT (object));
|
g_return_if_fail (G_IS_OBJECT (object));
|
||||||
@ -2912,9 +3107,14 @@ glade_project_add_object (GladeProject *project,
|
|||||||
if ((gwidget = glade_widget_get_from_gobject (object)) == NULL)
|
if ((gwidget = glade_widget_get_from_gobject (object)) == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* set the project */
|
if (glade_project_has_object (project, object))
|
||||||
if (gwidget->project != project)
|
{
|
||||||
glade_widget_set_project (gwidget, project);
|
/* FIXME: It's possible we need to notify the model iface if this
|
||||||
|
* happens to make sure the hierarchy is the same, I dont know, this
|
||||||
|
* happens when message dialogs with children are rebuilt but the
|
||||||
|
* hierarchy still looks good afterwards. */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Create a name context for newly added toplevels... */
|
/* Create a name context for newly added toplevels... */
|
||||||
if (!gwidget->parent)
|
if (!gwidget->parent)
|
||||||
@ -2938,26 +3138,15 @@ glade_project_add_object (GladeProject *project,
|
|||||||
glade_project_reserve_widget_name (project, gwidget, gwidget->name);
|
glade_project_reserve_widget_name (project, gwidget, gwidget->name);
|
||||||
|
|
||||||
glade_widget_set_project (gwidget, (gpointer)project);
|
glade_widget_set_project (gwidget, (gpointer)project);
|
||||||
g_object_ref (object);
|
g_object_ref_sink (gwidget);
|
||||||
|
|
||||||
|
/* Be sure to update the lists before emitting signals */
|
||||||
if (glade_widget_get_parent (gwidget) == NULL)
|
if (glade_widget_get_parent (gwidget) == NULL)
|
||||||
{
|
project->priv->tree = g_list_append (project->priv->tree, object);
|
||||||
project->priv->tree = g_list_insert_sorted (project->priv->tree, object,
|
|
||||||
(GCompareFunc)sort_project_dependancies);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Be sure to update the list before emitting signals */
|
project->priv->objects = g_list_prepend (project->priv->objects, object);
|
||||||
project->priv->objects = g_list_prepend (project->priv->objects,
|
|
||||||
object);
|
|
||||||
|
|
||||||
if (!project->priv->loading)
|
glade_project_notify_row_inserted (project, gwidget);
|
||||||
{
|
|
||||||
glade_project_model_get_iter_for_object (project, object, &iter);
|
|
||||||
path = gtk_tree_model_get_path (GTK_TREE_MODEL (project), &iter);
|
|
||||||
|
|
||||||
gtk_tree_model_row_inserted (GTK_TREE_MODEL (project), path, &iter);
|
|
||||||
project->priv->stamp++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* NOTE: Sensitive ordering here, we need to recurse after updating
|
/* NOTE: Sensitive ordering here, we need to recurse after updating
|
||||||
* the tree model listeners (and update those listeners after our
|
* the tree model listeners (and update those listeners after our
|
||||||
@ -2996,7 +3185,6 @@ glade_project_has_object (GladeProject *project, GObject *object)
|
|||||||
return (g_list_find (project->priv->objects, object)) != NULL;
|
return (g_list_find (project->priv->objects, object)) != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* glade_project_remove_object:
|
* glade_project_remove_object:
|
||||||
* @project: a #GladeProject
|
* @project: a #GladeProject
|
||||||
@ -3013,8 +3201,6 @@ glade_project_remove_object (GladeProject *project, GObject *object)
|
|||||||
{
|
{
|
||||||
GladeWidget *gwidget;
|
GladeWidget *gwidget;
|
||||||
GList *list, *children;
|
GList *list, *children;
|
||||||
GtkTreeIter* iter;
|
|
||||||
GtkTreePath* path;
|
|
||||||
|
|
||||||
g_return_if_fail (GLADE_IS_PROJECT (project));
|
g_return_if_fail (GLADE_IS_PROJECT (project));
|
||||||
g_return_if_fail (G_IS_OBJECT (object));
|
g_return_if_fail (G_IS_OBJECT (object));
|
||||||
@ -3025,6 +3211,7 @@ glade_project_remove_object (GladeProject *project, GObject *object)
|
|||||||
if ((gwidget = glade_widget_get_from_gobject (object)) == NULL)
|
if ((gwidget = glade_widget_get_from_gobject (object)) == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* Recurse and remove deepest children first */
|
||||||
if ((children =
|
if ((children =
|
||||||
glade_widget_get_children (gwidget)) != NULL)
|
glade_widget_get_children (gwidget)) != NULL)
|
||||||
{
|
{
|
||||||
@ -3033,37 +3220,23 @@ glade_project_remove_object (GladeProject *project, GObject *object)
|
|||||||
g_list_free (children);
|
g_list_free (children);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Notify views that the row is being deleted *before* deleting it */
|
||||||
|
glade_project_notify_row_deleted (project, gwidget);
|
||||||
|
|
||||||
|
/* Remove selection and release name from the name context */
|
||||||
glade_project_selection_remove (project, object, TRUE);
|
glade_project_selection_remove (project, object, TRUE);
|
||||||
|
|
||||||
project->priv->objects = g_list_remove (project->priv->objects, object);
|
|
||||||
|
|
||||||
iter = glade_util_find_iter_by_widget (GTK_TREE_MODEL (project), gwidget,
|
|
||||||
GLADE_PROJECT_MODEL_COLUMN_OBJECT);
|
|
||||||
if (iter)
|
|
||||||
{
|
|
||||||
GList *link = g_list_find (project->priv->tree, object);
|
|
||||||
|
|
||||||
path = gtk_tree_model_get_path (GTK_TREE_MODEL (project),
|
|
||||||
iter);
|
|
||||||
gtk_tree_model_row_deleted (GTK_TREE_MODEL (project),
|
|
||||||
path);
|
|
||||||
project->priv->stamp++;
|
|
||||||
g_object_unref (object);
|
|
||||||
glade_project_release_widget_name (project, gwidget,
|
glade_project_release_widget_name (project, gwidget,
|
||||||
glade_widget_get_name (gwidget));
|
glade_widget_get_name (gwidget));
|
||||||
|
|
||||||
|
|
||||||
if (link)
|
|
||||||
{
|
|
||||||
project->priv->tree = g_list_delete_link (project->priv->tree, link);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_signal_emit (G_OBJECT (project),
|
g_signal_emit (G_OBJECT (project),
|
||||||
glade_project_signals [REMOVE_WIDGET],
|
glade_project_signals [REMOVE_WIDGET],
|
||||||
0,
|
0,
|
||||||
gwidget);
|
gwidget);
|
||||||
gtk_tree_iter_free (iter);
|
|
||||||
}
|
/* Update internal data structure (remove from lists) */
|
||||||
|
project->priv->tree = g_list_remove (project->priv->tree, object);
|
||||||
|
project->priv->objects = g_list_remove (project->priv->objects, object);
|
||||||
|
g_object_unref (gwidget);
|
||||||
|
|
||||||
glade_project_update_previewable (project);
|
glade_project_update_previewable (project);
|
||||||
}
|
}
|
||||||
@ -3075,28 +3248,31 @@ adjust_naming_policy (GladeProject *project,
|
|||||||
GList *list, *objects;
|
GList *list, *objects;
|
||||||
GladeWidget *widget;
|
GladeWidget *widget;
|
||||||
|
|
||||||
objects = project->priv->tree;
|
/* Ref *all* objects */
|
||||||
|
for (list = project->priv->objects; list; list = list->next)
|
||||||
/* Remove all toplevels (recursive operation) */
|
|
||||||
for (list = objects; list; list = list->next)
|
|
||||||
{
|
{
|
||||||
widget = glade_widget_get_from_gobject (list->data);
|
widget = glade_widget_get_from_gobject (list->data);
|
||||||
g_object_ref (widget->object);
|
|
||||||
g_object_ref (widget);
|
g_object_ref (widget);
|
||||||
glade_project_remove_object (project, widget->object);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Remove all toplevels (recursive operation) */
|
||||||
|
objects = g_list_copy (project->priv->tree);
|
||||||
|
for (list = objects; list; list = list->next)
|
||||||
|
glade_project_remove_object (project, G_OBJECT (list->data));
|
||||||
|
|
||||||
project->priv->naming_policy = policy;
|
project->priv->naming_policy = policy;
|
||||||
|
|
||||||
/* Put the toplevels back with the new policy (recursive operation) */
|
/* Put the toplevels back with the new policy (recursive operation) */
|
||||||
for (list = objects; list; list = list->next)
|
for (list = objects; list; list = list->next)
|
||||||
{
|
glade_project_add_object (project, project, G_OBJECT (list->data));
|
||||||
glade_project_add_object (project, project, widget->object);
|
|
||||||
g_object_unref (widget->object);
|
|
||||||
g_object_unref (widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_list_free (objects);
|
g_list_free (objects);
|
||||||
|
|
||||||
|
/* Unref them now */
|
||||||
|
for (list = project->priv->objects; list; list = list->next)
|
||||||
|
{
|
||||||
|
widget = glade_widget_get_from_gobject (list->data);
|
||||||
|
g_object_ref (widget);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
@ -3779,22 +3955,6 @@ glade_project_get_objects (GladeProject *project)
|
|||||||
return project->priv->objects;
|
return project->priv->objects;
|
||||||
}
|
}
|
||||||
|
|
||||||
guint
|
|
||||||
glade_project_get_instance_count (GladeProject *project)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (GLADE_IS_PROJECT (project), 0);
|
|
||||||
|
|
||||||
return project->priv->instance_count;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
glade_project_set_instance_count (GladeProject *project, guint instance_count)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GLADE_IS_PROJECT (project));
|
|
||||||
|
|
||||||
project->priv->instance_count = instance_count;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* glade_project_get_modified:
|
* glade_project_get_modified:
|
||||||
* @project: a #GladeProject
|
* @project: a #GladeProject
|
||||||
@ -4126,18 +4286,13 @@ glade_project_build_prefs_box (GladeProject *project)
|
|||||||
*sizegroup2 = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL),
|
*sizegroup2 = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL),
|
||||||
*sizegroup3 = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
|
*sizegroup3 = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
|
||||||
|
|
||||||
string = g_strdup_printf ("<big><b>%s</b></big>", _("Set options in your project"));
|
|
||||||
main_frame = gtk_frame_new (NULL);
|
main_frame = gtk_frame_new (NULL);
|
||||||
|
gtk_frame_set_shadow_type (GTK_FRAME (main_frame), GTK_SHADOW_NONE);
|
||||||
main_alignment = gtk_alignment_new (0.5F, 0.5F, 0.8F, 0.8F);
|
main_alignment = gtk_alignment_new (0.5F, 0.5F, 0.8F, 0.8F);
|
||||||
main_box = gtk_vbox_new (FALSE, 0);
|
main_box = gtk_vbox_new (FALSE, 0);
|
||||||
|
|
||||||
gtk_alignment_set_padding (GTK_ALIGNMENT (main_alignment), 12, 0, 4, 0);
|
gtk_alignment_set_padding (GTK_ALIGNMENT (main_alignment), 0, 0, 4, 0);
|
||||||
|
|
||||||
label = gtk_label_new (string);
|
|
||||||
g_free (string);
|
|
||||||
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
|
|
||||||
|
|
||||||
gtk_frame_set_label_widget (GTK_FRAME (main_frame), label);
|
|
||||||
gtk_container_add (GTK_CONTAINER (main_alignment), main_box);
|
gtk_container_add (GTK_CONTAINER (main_alignment), main_box);
|
||||||
gtk_container_add (GTK_CONTAINER (main_frame), main_alignment);
|
gtk_container_add (GTK_CONTAINER (main_frame), main_alignment);
|
||||||
|
|
||||||
@ -4650,9 +4805,12 @@ glade_project_model_get_path (GtkTreeModel* model,
|
|||||||
/* Get the index for the top-level list */
|
/* Get the index for the top-level list */
|
||||||
top = g_list_find (project->priv->tree,
|
top = g_list_find (project->priv->tree,
|
||||||
glade_widget_get_object (toplevel));
|
glade_widget_get_object (toplevel));
|
||||||
g_assert (top != NULL);
|
|
||||||
gtk_tree_path_prepend_index (path, g_list_position (project->priv->tree,
|
/* While the project is disposing widgets are unparented and sometimes no longer in the tree */
|
||||||
top));
|
if (top)
|
||||||
|
gtk_tree_path_prepend_index (path, g_list_position (project->priv->tree, top));
|
||||||
|
else
|
||||||
|
gtk_tree_path_prepend_index (path, 0);
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,8 @@ GType glade_project_get_type (void) G_GNUC_CONST;
|
|||||||
GladeProject *glade_project_new (void);
|
GladeProject *glade_project_new (void);
|
||||||
|
|
||||||
GladeProject *glade_project_load (const gchar *path);
|
GladeProject *glade_project_load (const gchar *path);
|
||||||
|
gboolean glade_project_load_from_file (GladeProject *project,
|
||||||
|
const gchar *path);
|
||||||
|
|
||||||
gboolean glade_project_save (GladeProject *project,
|
gboolean glade_project_save (GladeProject *project,
|
||||||
const gchar *path,
|
const gchar *path,
|
||||||
@ -182,10 +184,6 @@ gboolean glade_project_is_loading (GladeProject *project);
|
|||||||
|
|
||||||
time_t glade_project_get_file_mtime (GladeProject *project);
|
time_t glade_project_get_file_mtime (GladeProject *project);
|
||||||
|
|
||||||
guint glade_project_get_instance_count (GladeProject *project);
|
|
||||||
|
|
||||||
void glade_project_set_instance_count (GladeProject *project, guint instance_count);
|
|
||||||
|
|
||||||
gboolean glade_project_get_modified (GladeProject *project);
|
gboolean glade_project_get_modified (GladeProject *project);
|
||||||
|
|
||||||
gboolean glade_project_get_previewable (GladeProject *project);
|
gboolean glade_project_get_previewable (GladeProject *project);
|
||||||
@ -221,6 +219,10 @@ void glade_project_update_signal_support_warning (GladeWidget *widget,
|
|||||||
|
|
||||||
gchar *glade_project_display_dependencies (GladeProject *project);
|
gchar *glade_project_display_dependencies (GladeProject *project);
|
||||||
|
|
||||||
|
void glade_project_push_progress (GladeProject *project);
|
||||||
|
gboolean glade_project_load_cancelled (GladeProject *project);
|
||||||
|
void glade_project_cancel_load (GladeProject *project);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GLADE_PROJECT_H__ */
|
#endif /* __GLADE_PROJECT_H__ */
|
||||||
|
@ -674,7 +674,7 @@ glade_property_class_make_objects_from_string (GladePropertyClass *property_clas
|
|||||||
}
|
}
|
||||||
g_strfreev (split);
|
g_strfreev (split);
|
||||||
}
|
}
|
||||||
return objects;
|
return g_list_reverse (objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -111,8 +111,9 @@ glade_property_dup_impl (GladeProperty *template_prop, GladeWidget *widget)
|
|||||||
else
|
else
|
||||||
g_value_copy (template_prop->value, property->value);
|
g_value_copy (template_prop->value, property->value);
|
||||||
|
|
||||||
/* Need value in place here ... */
|
property->enabled = template_prop->enabled;
|
||||||
glade_property_set_enabled (property, template_prop->enabled);
|
property->state = template_prop->state;
|
||||||
|
|
||||||
glade_property_set_sensitive (property, template_prop->sensitive,
|
glade_property_set_sensitive (property, template_prop->sensitive,
|
||||||
template_prop->insensitive_tooltip);
|
template_prop->insensitive_tooltip);
|
||||||
|
|
||||||
@ -245,7 +246,8 @@ glade_property_set_value_impl (GladeProperty *property, const GValue *value)
|
|||||||
#if 0
|
#if 0
|
||||||
{
|
{
|
||||||
g_print ("***************************************************\n");
|
g_print ("***************************************************\n");
|
||||||
g_print ("Setting property %s on %s ..\n",
|
g_print ("Setting %s property %s on %s ..\n",
|
||||||
|
property->klass->packing ? "packing" : "normal",
|
||||||
property->klass->id,
|
property->klass->id,
|
||||||
property->widget ? property->widget->name : "unknown");
|
property->widget ? property->widget->name : "unknown");
|
||||||
|
|
||||||
@ -351,8 +353,8 @@ glade_property_sync_impl (GladeProperty *property)
|
|||||||
* (other properties may be used for convenience in the plugin).
|
* (other properties may be used for convenience in the plugin).
|
||||||
*/
|
*/
|
||||||
if ((property->klass->packing &&
|
if ((property->klass->packing &&
|
||||||
property != glade_widget_get_pack_property (property->widget, property->klass->id)) ||
|
!glade_widget_get_pack_property (property->widget, property->klass->id)) ||
|
||||||
property != glade_widget_get_property (property->widget, property->klass->id))
|
!glade_widget_get_property (property->widget, property->klass->id))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
property->syncing++;
|
property->syncing++;
|
||||||
|
@ -420,6 +420,77 @@ glade_util_compare_stock_labels (gconstpointer a, gconstpointer b)
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* glade_util_gtk_combo_func:
|
||||||
|
* @data:
|
||||||
|
*
|
||||||
|
* TODO: write me
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
*/
|
||||||
|
gchar *
|
||||||
|
glade_util_gtk_combo_func (gpointer data)
|
||||||
|
{
|
||||||
|
GtkListItem * listitem = data;
|
||||||
|
|
||||||
|
/* I needed to pinch this as well - Damon. */
|
||||||
|
static const gchar *gtk_combo_string_key = "gtk-combo-string-value";
|
||||||
|
|
||||||
|
GtkWidget *label;
|
||||||
|
gchar *ltext = NULL;
|
||||||
|
|
||||||
|
ltext = (gchar *) g_object_get_data (G_OBJECT (listitem),
|
||||||
|
gtk_combo_string_key);
|
||||||
|
if (!ltext) {
|
||||||
|
label = gtk_bin_get_child (GTK_BIN (listitem));
|
||||||
|
if (!label || !GTK_IS_LABEL (label))
|
||||||
|
return NULL;
|
||||||
|
ltext = (gchar*) gtk_label_get_text (GTK_LABEL (label));
|
||||||
|
}
|
||||||
|
|
||||||
|
return ltext;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* These are pinched from gtkcombo.c */
|
||||||
|
/**
|
||||||
|
* glade_util_gtk_combo_find:
|
||||||
|
* @combo:
|
||||||
|
*
|
||||||
|
* TODO: write me
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
*/
|
||||||
|
gpointer /* GtkListItem * */
|
||||||
|
glade_util_gtk_combo_find (GtkCombo * combo)
|
||||||
|
{
|
||||||
|
gchar *text;
|
||||||
|
gchar *ltext;
|
||||||
|
GList *clist;
|
||||||
|
gsize len;
|
||||||
|
|
||||||
|
int (*string_compare) (const char *, const char *, gsize);
|
||||||
|
|
||||||
|
if (combo->case_sensitive)
|
||||||
|
string_compare = strncmp;
|
||||||
|
else
|
||||||
|
string_compare = g_ascii_strncasecmp;
|
||||||
|
|
||||||
|
text = (gchar*) gtk_entry_get_text (GTK_ENTRY (combo->entry));
|
||||||
|
len = text ? strlen (text) : 0;
|
||||||
|
clist = GTK_LIST (combo->list)->children;
|
||||||
|
|
||||||
|
while (clist && clist->data) {
|
||||||
|
ltext = glade_util_gtk_combo_func (GTK_LIST_ITEM (clist->data));
|
||||||
|
if (!ltext)
|
||||||
|
continue;
|
||||||
|
if (!(*string_compare) (ltext, text, len))
|
||||||
|
return (GtkListItem *) clist->data;
|
||||||
|
clist = clist->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* glade_util_hide_window:
|
* glade_util_hide_window:
|
||||||
* @window: a #GtkWindow
|
* @window: a #GtkWindow
|
||||||
@ -1023,7 +1094,7 @@ glade_util_find_iter (GtkTreeModel *model,
|
|||||||
gint column)
|
gint column)
|
||||||
{
|
{
|
||||||
GtkTreeIter *retval = NULL;
|
GtkTreeIter *retval = NULL;
|
||||||
GObject* object;
|
GObject* object = NULL;
|
||||||
GtkTreeIter *next;
|
GtkTreeIter *next;
|
||||||
|
|
||||||
g_return_val_if_fail (GTK_IS_TREE_MODEL (model), NULL);
|
g_return_val_if_fail (GTK_IS_TREE_MODEL (model), NULL);
|
||||||
@ -1034,13 +1105,23 @@ glade_util_find_iter (GtkTreeModel *model,
|
|||||||
|
|
||||||
while (retval == NULL)
|
while (retval == NULL)
|
||||||
{
|
{
|
||||||
|
GladeWidget *widget;
|
||||||
|
|
||||||
gtk_tree_model_get (model, next, column, &object, -1);
|
gtk_tree_model_get (model, next, column, &object, -1);
|
||||||
if (object == glade_widget_get_object (findme))
|
if (object &&
|
||||||
|
gtk_tree_model_get_column_type (model, column) == G_TYPE_OBJECT)
|
||||||
|
g_object_unref (object);
|
||||||
|
|
||||||
|
widget = glade_widget_get_from_gobject (object);
|
||||||
|
|
||||||
|
if (widget == findme)
|
||||||
{
|
{
|
||||||
retval = gtk_tree_iter_copy (next);
|
retval = gtk_tree_iter_copy (next);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (gtk_tree_model_iter_has_child (model, next))
|
else if (glade_widget_is_ancestor (findme, widget))
|
||||||
|
{
|
||||||
|
if (gtk_tree_model_iter_has_child (model, next))
|
||||||
{
|
{
|
||||||
GtkTreeIter child;
|
GtkTreeIter child;
|
||||||
gtk_tree_model_iter_children (model, &child, next);
|
gtk_tree_model_iter_children (model, &child, next);
|
||||||
@ -1049,7 +1130,12 @@ glade_util_find_iter (GtkTreeModel *model,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_object_unref (object);
|
/* Only search the branches where the searched widget
|
||||||
|
* is actually a child of the this row, optimize the
|
||||||
|
* searching this way
|
||||||
|
*/
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (!gtk_tree_model_iter_next (model, next))
|
if (!gtk_tree_model_iter_next (model, next))
|
||||||
break;
|
break;
|
||||||
@ -2186,52 +2272,6 @@ glade_utils_hijack_key_press (GtkWindow *win,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* copied from gedit */
|
|
||||||
gchar *
|
|
||||||
glade_utils_replace_home_dir_with_tilde (const gchar *uri)
|
|
||||||
{
|
|
||||||
gchar *tmp;
|
|
||||||
gchar *home;
|
|
||||||
|
|
||||||
g_return_val_if_fail (uri != NULL, NULL);
|
|
||||||
|
|
||||||
/* Note that g_get_home_dir returns a const string */
|
|
||||||
tmp = (gchar *)g_get_home_dir ();
|
|
||||||
|
|
||||||
if (tmp == NULL)
|
|
||||||
return g_strdup (uri);
|
|
||||||
|
|
||||||
home = g_filename_to_utf8 (tmp, -1, NULL, NULL, NULL);
|
|
||||||
if (home == NULL)
|
|
||||||
return g_strdup (uri);
|
|
||||||
|
|
||||||
if (strcmp (uri, home) == 0)
|
|
||||||
{
|
|
||||||
g_free (home);
|
|
||||||
|
|
||||||
return g_strdup ("~");
|
|
||||||
}
|
|
||||||
|
|
||||||
tmp = home;
|
|
||||||
home = g_strdup_printf ("%s/", tmp);
|
|
||||||
g_free (tmp);
|
|
||||||
|
|
||||||
if (g_str_has_prefix (uri, home))
|
|
||||||
{
|
|
||||||
gchar *res;
|
|
||||||
|
|
||||||
res = g_strdup_printf ("~/%s", uri + strlen (home));
|
|
||||||
|
|
||||||
g_free (home);
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free (home);
|
|
||||||
|
|
||||||
return g_strdup (uri);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
glade_utils_cairo_draw_line (cairo_t *cr,
|
glade_utils_cairo_draw_line (cairo_t *cr,
|
||||||
@ -2276,3 +2316,54 @@ glade_utils_cairo_draw_rectangle (cairo_t *cr,
|
|||||||
cairo_stroke (cr);
|
cairo_stroke (cr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* copied from gedit */
|
||||||
|
gchar *
|
||||||
|
glade_utils_replace_home_dir_with_tilde (const gchar *path)
|
||||||
|
{
|
||||||
|
#ifdef G_OS_UNIX
|
||||||
|
gchar *tmp;
|
||||||
|
gchar *home;
|
||||||
|
|
||||||
|
g_return_val_if_fail (path != NULL, NULL);
|
||||||
|
|
||||||
|
/* Note that g_get_home_dir returns a const string */
|
||||||
|
tmp = (gchar *) g_get_home_dir ();
|
||||||
|
|
||||||
|
if (tmp == NULL)
|
||||||
|
return g_strdup (path);
|
||||||
|
|
||||||
|
home = g_filename_to_utf8 (tmp, -1, NULL, NULL, NULL);
|
||||||
|
if (home == NULL)
|
||||||
|
return g_strdup (path);
|
||||||
|
|
||||||
|
if (strcmp (path, home) == 0)
|
||||||
|
{
|
||||||
|
g_free (home);
|
||||||
|
|
||||||
|
return g_strdup ("~");
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp = home;
|
||||||
|
home = g_strdup_printf ("%s/", tmp);
|
||||||
|
g_free (tmp);
|
||||||
|
|
||||||
|
if (g_str_has_prefix (path, home))
|
||||||
|
{
|
||||||
|
gchar *res;
|
||||||
|
|
||||||
|
res = g_strdup_printf ("~/%s", path + strlen (home));
|
||||||
|
|
||||||
|
g_free (home);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_free (home);
|
||||||
|
|
||||||
|
return g_strdup (path);
|
||||||
|
#else
|
||||||
|
return g_strdup (path);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
@ -49,6 +49,10 @@ gint glade_util_compare_stock_labels (gconstpointer a, gconstpointe
|
|||||||
|
|
||||||
void glade_util_hide_window (GtkWindow *window);
|
void glade_util_hide_window (GtkWindow *window);
|
||||||
|
|
||||||
|
gchar *glade_util_gtk_combo_func (gpointer data);
|
||||||
|
|
||||||
|
gpointer glade_util_gtk_combo_find (GtkCombo *combo);
|
||||||
|
|
||||||
|
|
||||||
GtkWidget *glade_util_file_dialog_new (const gchar *title,
|
GtkWidget *glade_util_file_dialog_new (const gchar *title,
|
||||||
GladeProject *project,
|
GladeProject *project,
|
||||||
@ -155,8 +159,6 @@ gint glade_utils_hijack_key_press (GtkWindow *win,
|
|||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
|
|
||||||
gchar *glade_utils_replace_home_dir_with_tilde (const gchar *uri);
|
|
||||||
|
|
||||||
void glade_utils_cairo_draw_line (cairo_t *cr,
|
void glade_utils_cairo_draw_line (cairo_t *cr,
|
||||||
GdkColor *color,
|
GdkColor *color,
|
||||||
gint x1,
|
gint x1,
|
||||||
@ -173,6 +175,8 @@ void glade_utils_cairo_draw_rectangle (cairo_t *cr,
|
|||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
|
||||||
|
gchar *glade_utils_replace_home_dir_with_tilde (const gchar *path);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GLADE_UTILS_H__ */
|
#endif /* __GLADE_UTILS_H__ */
|
||||||
|
@ -930,6 +930,9 @@ glade_widget_adaptor_object_read_widget (GladeWidgetAdaptor *adaptor,
|
|||||||
{
|
{
|
||||||
if (glade_xml_node_verify_silent (iter_node, GLADE_XML_TAG_CHILD))
|
if (glade_xml_node_verify_silent (iter_node, GLADE_XML_TAG_CHILD))
|
||||||
glade_widget_read_child (widget, iter_node);
|
glade_widget_read_child (widget, iter_node);
|
||||||
|
|
||||||
|
if (glade_project_load_cancelled (widget->project))
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,6 +65,9 @@ static void glade_widget_set_properties (GladeWidget *w
|
|||||||
GList *properties);
|
GList *properties);
|
||||||
static gboolean glade_window_is_embedded (GtkWindow *window);
|
static gboolean glade_window_is_embedded (GtkWindow *window);
|
||||||
static gboolean glade_widget_embed (GladeWidget *widget);
|
static gboolean glade_widget_embed (GladeWidget *widget);
|
||||||
|
static void glade_widget_set_object (GladeWidget *gwidget,
|
||||||
|
GObject *new_object,
|
||||||
|
gboolean destroy);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@ -102,7 +105,7 @@ static guint glade_widget_signals[LAST_SIGNAL] = {0};
|
|||||||
static GQuark glade_widget_name_quark = 0;
|
static GQuark glade_widget_name_quark = 0;
|
||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GladeWidget, glade_widget, G_TYPE_OBJECT)
|
G_DEFINE_TYPE (GladeWidget, glade_widget, G_TYPE_INITIALLY_UNOWNED)
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
GladeWidget class methods
|
GladeWidget class methods
|
||||||
@ -126,6 +129,8 @@ glade_widget_add_child_impl (GladeWidget *widget,
|
|||||||
GladeWidget *child,
|
GladeWidget *child,
|
||||||
gboolean at_mouse)
|
gboolean at_mouse)
|
||||||
{
|
{
|
||||||
|
g_object_ref (child);
|
||||||
|
|
||||||
/* Safe to set the parent first... setting it afterwards
|
/* Safe to set the parent first... setting it afterwards
|
||||||
* creates packing properties, and that is not always
|
* creates packing properties, and that is not always
|
||||||
* desirable.
|
* desirable.
|
||||||
@ -162,6 +167,10 @@ glade_widget_remove_child_impl (GladeWidget *widget,
|
|||||||
{
|
{
|
||||||
glade_widget_adaptor_remove
|
glade_widget_adaptor_remove
|
||||||
(widget->adaptor, widget->object, child->object);
|
(widget->adaptor, widget->object, child->object);
|
||||||
|
|
||||||
|
child->parent = NULL;
|
||||||
|
|
||||||
|
g_object_unref (child);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -174,6 +183,8 @@ glade_widget_replace_child_impl (GladeWidget *widget,
|
|||||||
|
|
||||||
if (gnew_widget)
|
if (gnew_widget)
|
||||||
{
|
{
|
||||||
|
g_object_ref (gnew_widget);
|
||||||
|
|
||||||
gnew_widget->parent = widget;
|
gnew_widget->parent = widget;
|
||||||
|
|
||||||
/* Set packing actions first so we have access from the plugin
|
/* Set packing actions first so we have access from the plugin
|
||||||
@ -181,8 +192,13 @@ glade_widget_replace_child_impl (GladeWidget *widget,
|
|||||||
glade_widget_set_packing_actions (gnew_widget, widget);
|
glade_widget_set_packing_actions (gnew_widget, widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gold_widget && gold_widget != gnew_widget)
|
if (gold_widget)
|
||||||
|
{
|
||||||
|
g_object_unref (gold_widget);
|
||||||
|
|
||||||
|
if (gold_widget != gnew_widget)
|
||||||
gold_widget->parent = NULL;
|
gold_widget->parent = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
glade_widget_adaptor_replace_child
|
glade_widget_adaptor_replace_child
|
||||||
(widget->adaptor, widget->object,
|
(widget->adaptor, widget->object,
|
||||||
@ -521,7 +537,7 @@ glade_widget_build_object (GladeWidget *widget,
|
|||||||
if (reason == GLADE_CREATE_LOAD)
|
if (reason == GLADE_CREATE_LOAD)
|
||||||
{
|
{
|
||||||
object = glade_widget_adaptor_construct_object (widget->adaptor, 0, NULL);
|
object = glade_widget_adaptor_construct_object (widget->adaptor, 0, NULL);
|
||||||
glade_widget_set_object (widget, object);
|
glade_widget_set_object (widget, object, TRUE);
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -536,7 +552,8 @@ glade_widget_build_object (GladeWidget *widget,
|
|||||||
|
|
||||||
free_params (params, n_params);
|
free_params (params, n_params);
|
||||||
|
|
||||||
glade_widget_set_object (widget, object);
|
/* Dont destroy toplevels when rebuilding, handle that separately */
|
||||||
|
glade_widget_set_object (widget, object, reason != GLADE_CREATE_REBUILD);
|
||||||
|
|
||||||
if (template)
|
if (template)
|
||||||
params = glade_widget_template_params (widget, FALSE, &n_params);
|
params = glade_widget_template_params (widget, FALSE, &n_params);
|
||||||
@ -802,6 +819,11 @@ glade_widget_finalize (GObject *object)
|
|||||||
|
|
||||||
g_return_if_fail (GLADE_IS_WIDGET (object));
|
g_return_if_fail (GLADE_IS_WIDGET (object));
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* A good way to check if refcounts are balancing at project close time */
|
||||||
|
g_print ("Finalizing widget %s\n", widget->name);
|
||||||
|
#endif
|
||||||
|
|
||||||
g_free (widget->name);
|
g_free (widget->name);
|
||||||
g_free (widget->internal);
|
g_free (widget->internal);
|
||||||
g_free (widget->support_warning);
|
g_free (widget->support_warning);
|
||||||
@ -815,51 +837,66 @@ glade_widget_finalize (GObject *object)
|
|||||||
G_OBJECT_CLASS (glade_widget_parent_class)->finalize(object);
|
G_OBJECT_CLASS (glade_widget_parent_class)->finalize(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
reset_object_property (GladeProperty *property,
|
||||||
|
GladeProject *project)
|
||||||
|
{
|
||||||
|
if (glade_property_class_is_object (property->klass,
|
||||||
|
glade_project_get_format (project)))
|
||||||
|
glade_property_reset (property);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
glade_widget_dispose (GObject *object)
|
glade_widget_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
GladeWidget *widget = GLADE_WIDGET (object);
|
GladeWidget *widget = GLADE_WIDGET (object);
|
||||||
|
|
||||||
g_return_if_fail (GLADE_IS_WIDGET (object));
|
glade_widget_push_superuser ();
|
||||||
|
|
||||||
/* At this point, any callbacks on "object" generated by destroy
|
/* Release references by way of object properties... */
|
||||||
* wont come with a GladeWidget
|
while (widget->prop_refs)
|
||||||
*/
|
|
||||||
g_object_set_qdata (G_OBJECT (object), glade_widget_name_quark, NULL);
|
|
||||||
|
|
||||||
/* We do not keep a reference to internal widgets */
|
|
||||||
if (widget->internal == NULL)
|
|
||||||
{
|
{
|
||||||
if (GTK_IS_OBJECT (widget->object))
|
GladeProperty *property = GLADE_PROPERTY (widget->prop_refs->data);
|
||||||
gtk_object_destroy (GTK_OBJECT (widget->object));
|
glade_property_set (property, NULL);
|
||||||
else
|
|
||||||
g_object_unref (widget->object);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (widget->properties)
|
||||||
|
g_list_foreach (widget->properties, (GFunc)reset_object_property, widget->project);
|
||||||
|
|
||||||
|
/* We have to make sure properties release thier references on other widgets first
|
||||||
|
* hence the reset (for object properties) */
|
||||||
if (widget->properties)
|
if (widget->properties)
|
||||||
{
|
{
|
||||||
g_list_foreach (widget->properties, (GFunc)g_object_unref, NULL);
|
g_list_foreach (widget->properties, (GFunc)g_object_unref, NULL);
|
||||||
g_list_free (widget->properties);
|
g_list_free (widget->properties);
|
||||||
|
widget->properties = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glade_widget_set_object (widget, NULL, TRUE);
|
||||||
|
|
||||||
if (widget->packing_properties)
|
if (widget->packing_properties)
|
||||||
{
|
{
|
||||||
g_list_foreach (widget->packing_properties, (GFunc)g_object_unref, NULL);
|
g_list_foreach (widget->packing_properties, (GFunc)g_object_unref, NULL);
|
||||||
g_list_free (widget->packing_properties);
|
g_list_free (widget->packing_properties);
|
||||||
|
widget->packing_properties = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (widget->actions)
|
if (widget->actions)
|
||||||
{
|
{
|
||||||
g_list_foreach (widget->actions, (GFunc)g_object_unref, NULL);
|
g_list_foreach (widget->actions, (GFunc)g_object_unref, NULL);
|
||||||
g_list_free (widget->actions);
|
g_list_free (widget->actions);
|
||||||
|
widget->actions = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (widget->packing_actions)
|
if (widget->packing_actions)
|
||||||
{
|
{
|
||||||
g_list_foreach (widget->packing_actions, (GFunc)g_object_unref, NULL);
|
g_list_foreach (widget->packing_actions, (GFunc)g_object_unref, NULL);
|
||||||
g_list_free (widget->packing_actions);
|
g_list_free (widget->packing_actions);
|
||||||
|
widget->packing_actions = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glade_widget_pop_superuser ();
|
||||||
|
|
||||||
G_OBJECT_CLASS (glade_widget_parent_class)->dispose (object);
|
G_OBJECT_CLASS (glade_widget_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -886,7 +923,7 @@ glade_widget_set_real_property (GObject *object,
|
|||||||
break;
|
break;
|
||||||
case PROP_OBJECT:
|
case PROP_OBJECT:
|
||||||
if (g_value_get_object (value))
|
if (g_value_get_object (value))
|
||||||
glade_widget_set_object (widget, g_value_get_object (value));
|
glade_widget_set_object (widget, g_value_get_object (value), TRUE);
|
||||||
break;
|
break;
|
||||||
case PROP_PROJECT:
|
case PROP_PROJECT:
|
||||||
glade_widget_set_project (widget, GLADE_PROJECT (g_value_get_object (value)));
|
glade_widget_set_project (widget, GLADE_PROJECT (g_value_get_object (value)));
|
||||||
@ -1298,8 +1335,7 @@ glade_widget_copy_packing_props (GladeWidget *parent,
|
|||||||
for (l = child->packing_properties; l && l->data; l = l->next)
|
for (l = child->packing_properties; l && l->data; l = l->next)
|
||||||
{
|
{
|
||||||
dup_prop = GLADE_PROPERTY(l->data);
|
dup_prop = GLADE_PROPERTY(l->data);
|
||||||
orig_prop =
|
orig_prop = glade_widget_get_pack_property (template_widget, dup_prop->klass->id);
|
||||||
glade_widget_get_property (template_widget, dup_prop->klass->id);
|
|
||||||
glade_property_set_value (dup_prop, orig_prop->value);
|
glade_property_set_value (dup_prop, orig_prop->value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1889,57 +1925,6 @@ glade_widget_get_from_gobject (gpointer object)
|
|||||||
return g_object_get_qdata (G_OBJECT (object), glade_widget_name_quark);
|
return g_object_get_qdata (G_OBJECT (object), glade_widget_name_quark);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
glade_widget_debug_real (GladeWidget *widget, int indent)
|
|
||||||
{
|
|
||||||
g_print ("%*sGladeWidget at %p\n", indent, "", widget);
|
|
||||||
g_print ("%*sname = [%s]\n", indent, "", widget->name ? widget->name : "-");
|
|
||||||
g_print ("%*sinternal = [%s]\n", indent, "", widget->internal ? widget->internal : "-");
|
|
||||||
g_print ("%*sgobject = %p [%s]\n",
|
|
||||||
indent, "", widget->object, G_OBJECT_TYPE_NAME (widget->object));
|
|
||||||
if (GTK_IS_WIDGET (widget->object))
|
|
||||||
g_print ("%*sgtkwidget->parent = %p\n", indent, "",
|
|
||||||
gtk_widget_get_parent (GTK_WIDGET(widget->object)));
|
|
||||||
if (GTK_IS_CONTAINER (widget->object)) {
|
|
||||||
GList *children, *l;
|
|
||||||
children = glade_util_container_get_all_children
|
|
||||||
(GTK_CONTAINER (widget->object));
|
|
||||||
for (l = children; l; l = l->next) {
|
|
||||||
GtkWidget *widget_gtk = GTK_WIDGET (l->data);
|
|
||||||
GladeWidget *widget = glade_widget_get_from_gobject (widget_gtk);
|
|
||||||
if (widget) {
|
|
||||||
glade_widget_debug_real (widget, indent + 2);
|
|
||||||
} else if (GLADE_IS_PLACEHOLDER (widget_gtk)) {
|
|
||||||
g_print ("%*sGtkWidget child %p is a placeholder.\n",
|
|
||||||
indent + 2, "", widget_gtk);
|
|
||||||
} else {
|
|
||||||
g_print ("%*sGtkWidget child %p [%s] has no glade widget.\n",
|
|
||||||
indent + 2, "",
|
|
||||||
widget_gtk, G_OBJECT_TYPE_NAME (widget_gtk));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!children)
|
|
||||||
g_print ("%*shas no children\n", indent, "");
|
|
||||||
g_list_free (children);
|
|
||||||
} else {
|
|
||||||
g_print ("%*snot a container\n", indent, "");
|
|
||||||
}
|
|
||||||
g_print ("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* glade_widget_debug:
|
|
||||||
* @widget: a #GladeWidget
|
|
||||||
*
|
|
||||||
* Prints some information about a #GladeWidget, currently
|
|
||||||
* this is unmaintained.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
glade_widget_debug (GladeWidget *widget)
|
|
||||||
{
|
|
||||||
glade_widget_debug_real (widget, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
glade_widget_add_to_layout (GladeWidget *widget, GtkWidget *layout)
|
glade_widget_add_to_layout (GladeWidget *widget, GtkWidget *layout)
|
||||||
{
|
{
|
||||||
@ -2358,6 +2343,11 @@ glade_widget_rebuild (GladeWidget *gwidget)
|
|||||||
|
|
||||||
adaptor = gwidget->adaptor;
|
adaptor = gwidget->adaptor;
|
||||||
|
|
||||||
|
g_object_ref (gwidget);
|
||||||
|
|
||||||
|
/* Extract and keep the child hierarchies aside... */
|
||||||
|
children = glade_widget_extract_children (gwidget);
|
||||||
|
|
||||||
/* Here we take care removing the widget from the project and
|
/* Here we take care removing the widget from the project and
|
||||||
* the selection before rebuilding the instance.
|
* the selection before rebuilding the instance.
|
||||||
*/
|
*/
|
||||||
@ -2377,10 +2367,8 @@ glade_widget_rebuild (GladeWidget *gwidget)
|
|||||||
glade_project_remove_object (gwidget->project, gwidget->object);
|
glade_project_remove_object (gwidget->project, gwidget->object);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Extract and keep the child hierarchies aside... */
|
/* parentless_widget and object properties that reffer to this widget
|
||||||
children = glade_widget_extract_children (gwidget);
|
* should be unset before transfering */
|
||||||
|
|
||||||
/* parentless_widget and object properties that reffer to this widget should be unset before transfering */
|
|
||||||
l = g_list_copy (gwidget->properties);
|
l = g_list_copy (gwidget->properties);
|
||||||
save_properties = g_list_copy (gwidget->prop_refs);
|
save_properties = g_list_copy (gwidget->prop_refs);
|
||||||
save_properties = g_list_concat (l, save_properties);
|
save_properties = g_list_concat (l, save_properties);
|
||||||
@ -2426,10 +2414,10 @@ glade_widget_rebuild (GladeWidget *gwidget)
|
|||||||
old_object, new_object);
|
old_object, new_object);
|
||||||
|
|
||||||
/* Must call dispose for cases like dialogs and toplevels */
|
/* Must call dispose for cases like dialogs and toplevels */
|
||||||
if (g_type_is_a (adaptor->type, GTK_TYPE_OBJECT))
|
if (GTK_IS_WINDOW (old_object))
|
||||||
gtk_object_destroy (GTK_OBJECT (old_object));
|
gtk_widget_destroy (GTK_WIDGET (old_object));
|
||||||
else
|
else
|
||||||
g_object_run_dispose (G_OBJECT (old_object));
|
g_object_unref (old_object);
|
||||||
|
|
||||||
/* Reparent any children of the old object to the new object
|
/* Reparent any children of the old object to the new object
|
||||||
* (this function will consume and free the child list).
|
* (this function will consume and free the child list).
|
||||||
@ -2465,6 +2453,7 @@ glade_widget_rebuild (GladeWidget *gwidget)
|
|||||||
|
|
||||||
/* Sync packing.
|
/* Sync packing.
|
||||||
*/
|
*/
|
||||||
|
if (gwidget->parent)
|
||||||
glade_widget_sync_packing_props (gwidget);
|
glade_widget_sync_packing_props (gwidget);
|
||||||
|
|
||||||
/* If the widget was in a project (and maybe the selection), then
|
/* If the widget was in a project (and maybe the selection), then
|
||||||
@ -2482,6 +2471,8 @@ glade_widget_rebuild (GladeWidget *gwidget)
|
|||||||
/* We shouldnt show if its not already visible */
|
/* We shouldnt show if its not already visible */
|
||||||
if (gwidget->visible)
|
if (gwidget->visible)
|
||||||
glade_widget_show (gwidget);
|
glade_widget_show (gwidget);
|
||||||
|
|
||||||
|
g_object_unref (gwidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -3320,38 +3311,34 @@ glade_widget_event_private (GtkWidget *widget,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
static void
|
||||||
* glade_widget_set_object:
|
glade_widget_set_object (GladeWidget *gwidget, GObject *new_object, gboolean destroy)
|
||||||
* @gwidget: A #GladeWidget
|
|
||||||
* @new_object: the new #GObject for @gwidget
|
|
||||||
*
|
|
||||||
* Set the runtime object for this GladeWidget wrapper
|
|
||||||
* (this is used deep in the core and is probably unsafe
|
|
||||||
* to use elsewhere).
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
glade_widget_set_object (GladeWidget *gwidget, GObject *new_object)
|
|
||||||
{
|
{
|
||||||
GladeWidgetAdaptor *adaptor;
|
GladeWidgetAdaptor *adaptor;
|
||||||
GObject *old_object;
|
GObject *old_object;
|
||||||
|
|
||||||
g_return_if_fail (GLADE_IS_WIDGET (gwidget));
|
g_return_if_fail (GLADE_IS_WIDGET (gwidget));
|
||||||
g_return_if_fail (G_IS_OBJECT (new_object));
|
g_return_if_fail (new_object == NULL ||
|
||||||
g_return_if_fail (g_type_is_a (G_OBJECT_TYPE (new_object),
|
g_type_is_a (G_OBJECT_TYPE (new_object),
|
||||||
gwidget->adaptor->type));
|
gwidget->adaptor->type));
|
||||||
|
|
||||||
|
if (gwidget->object == new_object)
|
||||||
|
return;
|
||||||
|
|
||||||
adaptor = gwidget->adaptor;
|
adaptor = gwidget->adaptor;
|
||||||
old_object = gwidget->object;
|
old_object = gwidget->object;
|
||||||
|
|
||||||
/* Add internal reference to new widget if its not internal */
|
|
||||||
if (gwidget->internal)
|
|
||||||
gwidget->object = G_OBJECT(new_object);
|
|
||||||
else if (GTK_IS_OBJECT (new_object))
|
|
||||||
gwidget->object = g_object_ref (G_OBJECT(new_object));
|
|
||||||
else
|
|
||||||
/* If this is a base GObject; assume ownership of the initial ref count */
|
|
||||||
gwidget->object = new_object;
|
gwidget->object = new_object;
|
||||||
|
|
||||||
|
if (new_object)
|
||||||
|
{
|
||||||
|
/* Add internal reference to new widget if its not internal */
|
||||||
|
if (gwidget->internal == NULL)
|
||||||
|
{
|
||||||
|
/* Assume ownership of floating objects */
|
||||||
|
if (g_object_is_floating (new_object))
|
||||||
|
g_object_ref_sink (new_object);
|
||||||
|
}
|
||||||
|
|
||||||
g_object_set_qdata (G_OBJECT (new_object), glade_widget_name_quark, gwidget);
|
g_object_set_qdata (G_OBJECT (new_object), glade_widget_name_quark, gwidget);
|
||||||
|
|
||||||
if (g_type_is_a (gwidget->adaptor->type, GTK_TYPE_WIDGET))
|
if (g_type_is_a (gwidget->adaptor->type, GTK_TYPE_WIDGET))
|
||||||
@ -3369,11 +3356,28 @@ glade_widget_set_object (GladeWidget *gwidget, GObject *new_object)
|
|||||||
G_CALLBACK (glade_widget_event_private),
|
G_CALLBACK (glade_widget_event_private),
|
||||||
gwidget);
|
gwidget);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Remove internal reference to old widget */
|
/* Remove internal reference to old widget */
|
||||||
if (gwidget->internal == NULL && old_object) {
|
if (old_object)
|
||||||
|
{
|
||||||
|
/* From this point on, the GladeWidget is no longer retrievable with
|
||||||
|
* glade_widget_get_from_gobject() */
|
||||||
g_object_set_qdata (G_OBJECT (old_object), glade_widget_name_quark, NULL);
|
g_object_set_qdata (G_OBJECT (old_object), glade_widget_name_quark, NULL);
|
||||||
g_object_unref (G_OBJECT (old_object));
|
|
||||||
|
if (gwidget->internal == NULL)
|
||||||
|
{
|
||||||
|
#if _YOU_WANT_TO_LOOK_AT_PROJECT_REFCOUNT_BALANCING_
|
||||||
|
g_print ("Killing '%s::%s' widget's object with reference count %d\n",
|
||||||
|
gwidget->adaptor->name, gwidget->name ? gwidget->name : "(unknown)",
|
||||||
|
old_object->ref_count);
|
||||||
|
#endif
|
||||||
|
if (GTK_IS_WINDOW (old_object) && destroy)
|
||||||
|
gtk_widget_destroy (GTK_WIDGET (old_object));
|
||||||
|
else
|
||||||
|
g_object_unref (old_object);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
g_object_notify (G_OBJECT (gwidget), "object");
|
g_object_notify (G_OBJECT (gwidget), "object");
|
||||||
}
|
}
|
||||||
@ -3744,6 +3748,9 @@ void
|
|||||||
glade_widget_read_child (GladeWidget *widget,
|
glade_widget_read_child (GladeWidget *widget,
|
||||||
GladeXmlNode *node)
|
GladeXmlNode *node)
|
||||||
{
|
{
|
||||||
|
if (glade_project_load_cancelled (widget->project))
|
||||||
|
return;
|
||||||
|
|
||||||
glade_widget_adaptor_read_child (widget->adaptor, widget, node);
|
glade_widget_adaptor_read_child (widget->adaptor, widget, node);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3765,6 +3772,9 @@ glade_widget_read (GladeProject *project,
|
|||||||
GladeWidget *widget = NULL;
|
GladeWidget *widget = NULL;
|
||||||
gchar *klass, *id;
|
gchar *klass, *id;
|
||||||
|
|
||||||
|
if (glade_project_load_cancelled (project))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
glade_widget_push_superuser ();
|
glade_widget_push_superuser ();
|
||||||
|
|
||||||
if (!glade_xml_node_verify
|
if (!glade_xml_node_verify
|
||||||
@ -3831,6 +3841,8 @@ glade_widget_read (GladeProject *project,
|
|||||||
|
|
||||||
glade_widget_pop_superuser ();
|
glade_widget_pop_superuser ();
|
||||||
|
|
||||||
|
glade_project_push_progress (project);
|
||||||
|
|
||||||
return widget;
|
return widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3999,6 +4011,35 @@ glade_widget_write (GladeWidget *widget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gtk_widget_is_ancestor:
|
||||||
|
* @widget: a #GladeWidget
|
||||||
|
* @ancestor: another #GladeWidget
|
||||||
|
*
|
||||||
|
* Determines whether @widget is somewhere inside @ancestor, possibly with
|
||||||
|
* intermediate containers.
|
||||||
|
*
|
||||||
|
* Return value: %TRUE if @ancestor contains @widget as a child,
|
||||||
|
* grandchild, great grandchild, etc.
|
||||||
|
**/
|
||||||
|
gboolean
|
||||||
|
glade_widget_is_ancestor (GladeWidget *widget,
|
||||||
|
GladeWidget *ancestor)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GLADE_IS_WIDGET (widget), FALSE);
|
||||||
|
g_return_val_if_fail (GLADE_IS_WIDGET (ancestor), FALSE);
|
||||||
|
|
||||||
|
while (widget)
|
||||||
|
{
|
||||||
|
if (widget->parent == ancestor)
|
||||||
|
return TRUE;
|
||||||
|
widget = widget->parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static gint glade_widget_su_stack = 0;
|
static gint glade_widget_su_stack = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,7 +23,7 @@ typedef struct _GladeWidgetClass GladeWidgetClass;
|
|||||||
|
|
||||||
struct _GladeWidget
|
struct _GladeWidget
|
||||||
{
|
{
|
||||||
GObject parent_instance;
|
GInitiallyUnowned parent_instance;
|
||||||
|
|
||||||
GladeWidgetAdaptor *adaptor; /* An adaptor class for the object type */
|
GladeWidgetAdaptor *adaptor; /* An adaptor class for the object type */
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ struct _GladeWidget
|
|||||||
|
|
||||||
struct _GladeWidgetClass
|
struct _GladeWidgetClass
|
||||||
{
|
{
|
||||||
GObjectClass parent_class;
|
GInitiallyUnownedClass parent_class;
|
||||||
|
|
||||||
void (*add_child) (GladeWidget *, GladeWidget *, gboolean);
|
void (*add_child) (GladeWidget *, GladeWidget *, gboolean);
|
||||||
void (*remove_child) (GladeWidget *, GladeWidget *);
|
void (*remove_child) (GladeWidget *, GladeWidget *);
|
||||||
@ -273,6 +273,10 @@ GladeEditorProperty *glade_widget_create_editor_property (GladeWidget *w
|
|||||||
gboolean use_command);
|
gboolean use_command);
|
||||||
|
|
||||||
gchar *glade_widget_generate_path_name (GladeWidget *widget);
|
gchar *glade_widget_generate_path_name (GladeWidget *widget);
|
||||||
|
|
||||||
|
gboolean glade_widget_is_ancestor (GladeWidget *widget,
|
||||||
|
GladeWidget *ancestor);
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
Project, object property references
|
Project, object property references
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
@ -395,9 +399,6 @@ void glade_widget_set_internal (GladeWidget *widget,
|
|||||||
|
|
||||||
G_CONST_RETURN gchar *glade_widget_get_internal (GladeWidget *widget);
|
G_CONST_RETURN gchar *glade_widget_get_internal (GladeWidget *widget);
|
||||||
|
|
||||||
void glade_widget_set_object (GladeWidget *gwidget,
|
|
||||||
GObject *new_object);
|
|
||||||
|
|
||||||
GObject *glade_widget_get_object (GladeWidget *widget);
|
GObject *glade_widget_get_object (GladeWidget *widget);
|
||||||
|
|
||||||
void glade_widget_set_project (GladeWidget *widget,
|
void glade_widget_set_project (GladeWidget *widget,
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
#include <gladeui/glade-editor-property.h>
|
#include <gladeui/glade-editor-property.h>
|
||||||
#include <gladeui/glade-palette.h>
|
#include <gladeui/glade-palette.h>
|
||||||
#include <gladeui/glade-clipboard.h>
|
#include <gladeui/glade-clipboard.h>
|
||||||
#include <gladeui/glade-clipboard-view.h>
|
|
||||||
#include <gladeui/glade-inspector.h>
|
#include <gladeui/glade-inspector.h>
|
||||||
#include <gladeui/glade-placeholder.h>
|
#include <gladeui/glade-placeholder.h>
|
||||||
#include <gladeui/glade-utils.h>
|
#include <gladeui/glade-utils.h>
|
||||||
|
@ -45,10 +45,12 @@ AC_MSG_CHECKING(for headers required to compile python extensions)
|
|||||||
dnl deduce PYTHON_INCLUDES
|
dnl deduce PYTHON_INCLUDES
|
||||||
py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
|
py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
|
||||||
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
|
py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
|
||||||
|
if test "x$PYTHON_INCLUDES" == x; then
|
||||||
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
|
PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
|
||||||
if test "$py_prefix" != "$py_exec_prefix"; then
|
if test "$py_prefix" != "$py_exec_prefix"; then
|
||||||
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
|
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
AC_SUBST(PYTHON_INCLUDES)
|
AC_SUBST(PYTHON_INCLUDES)
|
||||||
dnl check if the headers exist:
|
dnl check if the headers exist:
|
||||||
save_CPPFLAGS="$CPPFLAGS"
|
save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
SUBDIRS = gtk+
|
SUBDIRS = gtk+
|
||||||
|
|
||||||
|
if BUILD_GNOME
|
||||||
|
SUBDIRS += gnome
|
||||||
|
endif
|
||||||
|
|
||||||
if BUILD_PYTHON
|
if BUILD_PYTHON
|
||||||
SUBDIRS += python
|
SUBDIRS += python
|
||||||
endif
|
endif
|
||||||
|
47
plugins/gnome/Makefile.am
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
|
SUBDIRS = icons
|
||||||
|
|
||||||
|
libgladeui = $(top_builddir)/gladeui/libgladeui-1.la
|
||||||
|
|
||||||
|
|
||||||
|
# libgladegnome
|
||||||
|
|
||||||
|
gladegnome_LTLIBRARIES = libgladegnome.la
|
||||||
|
gladegnomedir = $(pkglibdir)/modules
|
||||||
|
|
||||||
|
libgladegnome_la_SOURCES = glade-gnome.c
|
||||||
|
libgladegnome_la_CPPFLAGS = \
|
||||||
|
-DG_LOG_DOMAIN=\"GladeUI-GNOME\" \
|
||||||
|
-I$(top_srcdir) \
|
||||||
|
-I$(top_builddir) \
|
||||||
|
-I$(top_srcdir)/plugins/gtk+ \
|
||||||
|
$(GNOME_CFLAGS) \
|
||||||
|
$(PLUGINS_WARN_CFLAGS) \
|
||||||
|
$(AM_CPPFLAGS)
|
||||||
|
|
||||||
|
libgladegnome_la_CFLAGS = \
|
||||||
|
$(AM_CFLAGS)
|
||||||
|
libgladegnome_la_LDFLAGS = -module -avoid-version $(GNOME_LIBS) $(AM_LDFLAGS)
|
||||||
|
libgladegnome_la_LIBADD = $(libgladeui) $(GLADE_LIBS)
|
||||||
|
|
||||||
|
if PLATFORM_WIN32
|
||||||
|
libgladegnome_la_LDFLAGS += -no-undefined
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
# catalog data
|
||||||
|
|
||||||
|
catalogsdir = $(pkgdatadir)/catalogs
|
||||||
|
catalogs_DATA = bonobo.xml \
|
||||||
|
canvas.xml \
|
||||||
|
gnome.xml \
|
||||||
|
bonobo.xml.in \
|
||||||
|
canvas.xml.in \
|
||||||
|
gnome.xml.in
|
||||||
|
@INTLTOOL_XML_NOMERGE_RULE@
|
||||||
|
|
||||||
|
|
||||||
|
CLEANFILES = bonobo.xml canvas.xml gnome.xml
|
||||||
|
|
||||||
|
EXTRA_DIST = $(catalogs_DATA)
|
56
plugins/gnome/bonobo.xml.in
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<glade-catalog name="bonobo"
|
||||||
|
library="gladegnome"
|
||||||
|
supports="libglade"
|
||||||
|
depends="gnome"
|
||||||
|
domain="glade3">
|
||||||
|
<glade-widget-classes>
|
||||||
|
<glade-widget-class name="BonoboDock" generic-name="dock" title="Bonobo Dock">
|
||||||
|
<set-property-function>glade_gnome_bonobodock_set_property</set-property-function>
|
||||||
|
<add-child-function>glade_gnome_bonobodock_add_child</add-child-function>
|
||||||
|
<remove-child-function>glade_gnome_bonobodock_remove_child</remove-child-function>
|
||||||
|
<replace-child-function>glade_gnome_bonobodock_replace_child</replace-child-function>
|
||||||
|
<get-children-function>glade_gnome_bonobodock_get_children</get-children-function>
|
||||||
|
<child-set-property-function>glade_gnome_bonobodock_set_child_property</child-set-property-function>
|
||||||
|
<child-get-property-function>glade_gnome_bonobodock_get_child_property</child-get-property-function>
|
||||||
|
<properties>
|
||||||
|
<property id="allow-floating" name="Allow Floating">
|
||||||
|
<tooltip>If floating dock iteam are allowed</tooltip>
|
||||||
|
<spec>glade_standard_boolean_spec</spec>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<packing-properties>
|
||||||
|
<property id="placement">
|
||||||
|
<spec>glade_gnome_bonobo_dock_placement_spec</spec>
|
||||||
|
<displayable-values>
|
||||||
|
<value id="BONOBO_DOCK_LEFT" _name="Left"/>
|
||||||
|
<value id="BONOBO_DOCK_RIGHT" _name="Right"/>
|
||||||
|
<value id="BONOBO_DOCK_TOP" _name="Top"/>
|
||||||
|
<value id="BONOBO_DOCK_BOTTOM" _name="Bottom"/>
|
||||||
|
<value id="BONOBO_DOCK_FLOATING" _name="Floating"/>
|
||||||
|
</displayable-values>
|
||||||
|
</property>
|
||||||
|
<property id="band" name="Band">
|
||||||
|
<spec>glade_standard_int_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="position" name="Position">
|
||||||
|
<spec>glade_standard_int_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="offset" name="Offset">
|
||||||
|
<spec>glade_standard_int_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="behavior">
|
||||||
|
<spec>glade_gnome_bonobo_dock_item_behavior_spec</spec>
|
||||||
|
<displayable-values>
|
||||||
|
<value id="BONOBO_DOCK_ITEM_BEH_EXCLUSIVE" _name="Exclusive"/>
|
||||||
|
<value id="BONOBO_DOCK_ITEM_BEH_NEVER_FLOATING" _name="Never Floating"/>
|
||||||
|
<value id="BONOBO_DOCK_ITEM_BEH_NEVER_VERTICAL" _name="Never Vertical"/>
|
||||||
|
<value id="BONOBO_DOCK_ITEM_BEH_NEVER_HORIZONTAL" _name="Never Horizontal"/>
|
||||||
|
<value id="BONOBO_DOCK_ITEM_BEH_LOCKED" _name="Locked"/>
|
||||||
|
</displayable-values>
|
||||||
|
</property>
|
||||||
|
</packing-properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
<glade-widget-class name="BonoboDockItem" generic-name="dockitem" title="Bonobo Dock Item"/>
|
||||||
|
</glade-widget-classes>
|
||||||
|
</glade-catalog>
|
88
plugins/gnome/canvas.xml.in
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<glade-catalog name="canvas"
|
||||||
|
icon-prefix="gnome"
|
||||||
|
library="gladegnome"
|
||||||
|
supports="libglade"
|
||||||
|
depends="gnome"
|
||||||
|
domain="glade3">
|
||||||
|
<glade-widget-classes>
|
||||||
|
<glade-widget-class name="GnomeCanvas" generic-name="canvas" _title="GNOME Canvas">
|
||||||
|
<set-property-function>glade_gnome_canvas_set_property</set-property-function>
|
||||||
|
<properties>
|
||||||
|
<property id="scroll-x1" _name="Min X">
|
||||||
|
<_tooltip>The minimum X coordinate</_tooltip>
|
||||||
|
<spec>glade_standard_float_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="scroll-y1" _name="Min Y">
|
||||||
|
<_tooltip>The minimum Y coordinate</_tooltip>
|
||||||
|
<spec>glade_standard_float_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="scroll-x2" _name="Max X">
|
||||||
|
<_tooltip>The maximum X coordinate</_tooltip>
|
||||||
|
<spec>glade_standard_float_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="scroll-y2" _name="Max Y">
|
||||||
|
<_tooltip>The maximum Y coordinate</_tooltip>
|
||||||
|
<spec>glade_standard_float_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="pixels-per-unit" _name="Pixels per unit">
|
||||||
|
<_tooltip>The number of pixels corresponding to one unit</_tooltip>
|
||||||
|
<spec>glade_standard_float_spec</spec>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<!-- This is deprecated -->
|
||||||
|
<glade-widget-class name="GnomeIconList" generic-name="iconlist" _title="GNOME Icon List">
|
||||||
|
<post-create-function>glade_gnome_icon_list_post_create</post-create-function>
|
||||||
|
<set-property-function>glade_gnome_icon_list_set_property</set-property-function>
|
||||||
|
<properties>
|
||||||
|
<property id="scroll-x1" disabled="True"/>
|
||||||
|
<property id="scroll-y1" disabled="True"/>
|
||||||
|
<property id="scroll-x2" disabled="True"/>
|
||||||
|
<property id="scroll-y2" disabled="True"/>
|
||||||
|
<property id="pixels-per-unit" disabled="True"/>
|
||||||
|
<property id="selection-mode" _name="Selection Mode">
|
||||||
|
<parameter-spec>
|
||||||
|
<type>GParamEnum</type>
|
||||||
|
<value-type>GnomeIconListMode</value-type>
|
||||||
|
</parameter-spec>
|
||||||
|
<_tooltip>The selection mode</_tooltip>
|
||||||
|
<displayable-values>
|
||||||
|
<value id="GNOME_ICON_LIST_ICONS" _name="List Icons"/>
|
||||||
|
<value id="GNOME_ICON_LIST_TEXT_BELOW" _name="Text Below"/>
|
||||||
|
<value id="GNOME_ICON_LIST_TEXT_RIGHT" _name="Text Right"/>
|
||||||
|
</displayable-values>
|
||||||
|
</property>
|
||||||
|
<property id="icon-width" _name="Icon Width" default="78">
|
||||||
|
<_tooltip>The width of each icon</_tooltip>
|
||||||
|
<spec>glade_standard_int_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="row-spacing" _name="Row Spacing" default="4">
|
||||||
|
<_tooltip>The number of pixels between rows of icons</_tooltip>
|
||||||
|
<spec>glade_standard_int_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="column-spacing" _name="Column Spacing" default="2">
|
||||||
|
<_tooltip>The number of pixels between columns of icons</_tooltip>
|
||||||
|
<spec>glade_standard_int_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="text-spacing" _name="Text Spacing" default="2">
|
||||||
|
<_tooltip>The number of pixels between the text and the icon</_tooltip>
|
||||||
|
<spec>glade_standard_int_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="text-editable" _name="Text Editable" ignore="True">
|
||||||
|
<_tooltip>If the icon text can be edited by the user</_tooltip>
|
||||||
|
<spec>glade_standard_boolean_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="text-static" _name="Text Static" ignore="True">
|
||||||
|
<_tooltip>If the icon text is static, in which case it will not be copied by the GnomeIconList</_tooltip>
|
||||||
|
<spec>glade_standard_boolean_spec</spec>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
</glade-widget-classes>
|
||||||
|
|
||||||
|
<glade-widget-group name="gnome-canvas" _title="GNOME Canvas">
|
||||||
|
<glade-widget-class-ref name="GnomeCanvas"/>
|
||||||
|
<glade-widget-class-ref name="GnomeIconList"/>
|
||||||
|
</glade-widget-group>
|
||||||
|
</glade-catalog>
|
1736
plugins/gnome/glade-gnome.c
Normal file
384
plugins/gnome/gnome.xml.in
Normal file
@ -0,0 +1,384 @@
|
|||||||
|
<glade-catalog name="gnome"
|
||||||
|
library="gladegnome"
|
||||||
|
supports="libglade"
|
||||||
|
depends="gtk+"
|
||||||
|
domain="glade3"
|
||||||
|
book="libgnomeui">
|
||||||
|
<init-function>glade_gnomeui_init</init-function>
|
||||||
|
<glade-widget-classes>
|
||||||
|
<glade-widget-class name="GnomeApp" generic-name="app" _title="GNOME App" default-width="440" default-height="250">
|
||||||
|
<post-create-function>glade_gnome_app_post_create</post-create-function>
|
||||||
|
<get-internal-child-function>glade_gnome_app_get_internal_child</get-internal-child-function>
|
||||||
|
<get-children-function>glade_gnome_app_get_children</get-children-function>
|
||||||
|
<child-set-property-function>glade_gnome_app_set_child_property</child-set-property-function>
|
||||||
|
<child-get-property-function>glade_gnome_app_get_child_property</child-get-property-function>
|
||||||
|
<set-property-function>glade_gnome_app_set_property</set-property-function>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<property id="has-statusbar" _name="StatusBar" save="False">
|
||||||
|
<tooltip>If the window has a statusbar</tooltip>
|
||||||
|
<spec>glade_standard_boolean_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="enable-layout-config" _name="Store Config">
|
||||||
|
<tooltip>If the layout is saved and restored automatically</tooltip>
|
||||||
|
<spec>glade_standard_boolean_spec</spec>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
<packing-properties>
|
||||||
|
<property id="position" _name="Position">
|
||||||
|
<spec>glade_standard_int_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="padding" _name="Padding">
|
||||||
|
<spec>glade_standard_int_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="expand" _name="Expand">
|
||||||
|
<spec>glade_standard_boolean_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="fill" _name="Fill">
|
||||||
|
<spec>glade_standard_boolean_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="pack-type">
|
||||||
|
<spec>glade_gnome_gtk_pack_type_spec</spec>
|
||||||
|
</property>
|
||||||
|
</packing-properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomeDruid" generic-name="druid" _title="GNOME Druid">
|
||||||
|
<post-create-function>glade_gnome_druid_post_create</post-create-function>
|
||||||
|
<add-child-function>glade_gnome_druid_add_child</add-child-function>
|
||||||
|
<remove-child-function>glade_gnome_druid_remove_child</remove-child-function>
|
||||||
|
<child-set-property-function>glade_gnome_druid_set_child_property</child-set-property-function>
|
||||||
|
<child-get-property-function>glade_gnome_druid_get_child_property</child-get-property-function>
|
||||||
|
|
||||||
|
<packing-properties>
|
||||||
|
<property id="position" _name="Position" default="-1" save="False">
|
||||||
|
<spec>glade_standard_int_spec</spec>
|
||||||
|
</property>
|
||||||
|
</packing-properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomeDruidPageEdge" generic-name="druidpageedge" _title="GNOME Druid Page Edge">
|
||||||
|
<set-property-function>glade_gnome_dpe_set_property</set-property-function>
|
||||||
|
<properties>
|
||||||
|
<property id="position" _name="Position">
|
||||||
|
<spec>glade_gnome_dpe_position_spec</spec>
|
||||||
|
<_tooltip>Used to pass around information about the position of a GnomeDruidPage within the overall GnomeDruid. This enables the correct "surrounding" content for the page to be drawn</_tooltip>
|
||||||
|
<displayable-values>
|
||||||
|
<value id="GNOME_EDGE_START" _name="Start"/>
|
||||||
|
<value id="GNOME_EDGE_FINISH" _name="End"/>
|
||||||
|
<value id="GNOME_EDGE_OTHER" _name="Other"/>
|
||||||
|
</displayable-values>
|
||||||
|
</property>
|
||||||
|
<property id="title" _name="Title" translatable="True">
|
||||||
|
<spec>glade_standard_string_spec</spec>
|
||||||
|
<visible-lines>2</visible-lines>
|
||||||
|
</property>
|
||||||
|
<property id="text" _name="Text" translatable="True">
|
||||||
|
<spec>glade_standard_string_spec</spec>
|
||||||
|
<visible-lines>4</visible-lines>
|
||||||
|
</property>
|
||||||
|
<property id="title-foreground" _name="Title Foreground Color" default="#FFFFFF">
|
||||||
|
<spec>glade_standard_gdkcolor_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="text-foreground" _name="Text Foreground Color" default="#000000">
|
||||||
|
<spec>glade_standard_gdkcolor_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="background" _name="Background Color" default="#4B6983">
|
||||||
|
<spec>glade_standard_gdkcolor_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="contents-background" _name="Contents Background Color" default="#DCDAD5">
|
||||||
|
<spec>glade_standard_gdkcolor_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="logo-background" _name="Logo Background Color" default="#4B6983">
|
||||||
|
<spec>glade_standard_gdkcolor_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="logo" _name="Logo">
|
||||||
|
<spec>glade_standard_pixbuf_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="watermark" _name="Watermark">
|
||||||
|
<spec>glade_standard_pixbuf_spec</spec>
|
||||||
|
</property>
|
||||||
|
<property id="top-watermark" _name="Top Watermark">
|
||||||
|
<spec>glade_standard_pixbuf_spec</spec>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomeDruidPageStandard" generic-name="druidpagestandard" _title="GNOME Druid Page Standard">
|
||||||
|
<post-create-function>glade_gnome_dps_post_create</post-create-function>
|
||||||
|
<get-internal-child-function>glade_gnome_dps_get_internal_child</get-internal-child-function>
|
||||||
|
<get-children-function>glade_gnome_dps_get_children</get-children-function>
|
||||||
|
<set-property-function>glade_gnome_dps_set_property</set-property-function>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<property id="title" translatable="True">
|
||||||
|
<visible-lines>2</visible-lines>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<property id="background-set" disabled="True"/>
|
||||||
|
<property id="background" visible="False" save="False" default="#4B6983"/>
|
||||||
|
<property id="contents-background-set" disabled="True"/>
|
||||||
|
<property id="contents-background" visible="False" save="False" default="#DCDAD5"/>
|
||||||
|
<property id="logo-background-set" disabled="True"/>
|
||||||
|
<property id="logo-background" visible="False" save="False" default="#4B6983"/>
|
||||||
|
<property id="title-foreground-set" disabled="True"/>
|
||||||
|
<property id="title-foreground" visible="False" save="False" default="#FFFFFF"/>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomeIconSelection" generic-name="iconselection" _title="GNOME Icon Selection">
|
||||||
|
<properties>
|
||||||
|
<property id="size" visible="False" query="False" ignore="True"/>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
<glade-widget-class name="GnomeIconEntry" generic-name="iconentry" _title="GNOME Icon Entry">
|
||||||
|
<set-property-function>glade_gnome_icon_entry_set_property</set-property-function>
|
||||||
|
<properties>
|
||||||
|
<property id="max-saved" _name="Max Saved">
|
||||||
|
<spec>glade_standard_uint_spec</spec>
|
||||||
|
<tooltip>The maximum number of history entries saved.</tooltip>
|
||||||
|
</property>
|
||||||
|
<property id="size" visible="False" query="False" ignore="True"/>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomeHRef" generic-name="href" _title="GNOME HRef"/>
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomeDateEdit" generic-name="dateedit" _title="GNOME Date Edit">
|
||||||
|
<post-create-function>glade_gnome_date_edit_post_create</post-create-function>
|
||||||
|
<properties>
|
||||||
|
<property id="time" disabled="True"/>
|
||||||
|
<property id="size" visible="False" query="False" ignore="True"/>
|
||||||
|
<property id="dateedit-flags">
|
||||||
|
<displayable-values>
|
||||||
|
<value id="GNOME_DATE_EDIT_SHOW_TIME" _name="Show Time"/>
|
||||||
|
<value id="GNOME_DATE_EDIT_24_HR" _name="24-Hour Format"/>
|
||||||
|
<value id="GNOME_DATE_EDIT_WEEK_STARTS_ON_MONDAY" _name="Monday First"/>
|
||||||
|
<value id="GNOME_DATE_EDIT_DISPLAY_SECONDS" _name="Display Seconds"/>
|
||||||
|
</displayable-values>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomeAppBar" generic-name="appbar" _title="GNOME App Bar">
|
||||||
|
<post-create-function>glade_gnome_app_bar_post_create</post-create-function>
|
||||||
|
<properties>
|
||||||
|
<property id="has-progress" default="True" ignore="True"/>
|
||||||
|
<property id="has-status" default="True" ignore="True"/>
|
||||||
|
<property id="size" visible="False" query="False" ignore="True"/>
|
||||||
|
<property id="interactivity">
|
||||||
|
<displayable-values>
|
||||||
|
<value id="GNOME_PREFERENCES_NEVER" _name="Never"/>
|
||||||
|
<value id="GNOME_PREFERENCES_USER" _name="User"/>
|
||||||
|
<value id="GNOME_PREFERENCES_ALWAYS" _name="Always"/>
|
||||||
|
</displayable-values>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<!-- Deprecated Widget Classes :) -->
|
||||||
|
<glade-widget-class name="GnomeDialog" generic-name="dialog" _title="GNOME Dialog">
|
||||||
|
<post-create-function>glade_gnome_dialog_post_create</post-create-function>
|
||||||
|
<get-internal-child-function>glade_gnome_dialog_get_internal_child</get-internal-child-function>
|
||||||
|
<get-children-function>glade_gnome_dialog_get_children</get-children-function>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomeAbout" generic-name="about" _title="GNOME About">
|
||||||
|
<post-create-function>glade_gnome_about_dialog_post_create</post-create-function>
|
||||||
|
<set-property-function>glade_gnome_about_dialog_set_property</set-property-function>
|
||||||
|
<properties>
|
||||||
|
<property id="name" _name="Program Name"/>
|
||||||
|
<property id="version" _name="Program Version"/>
|
||||||
|
<property id="comments" translatable="True">
|
||||||
|
<visible-lines>4</visible-lines>
|
||||||
|
</property>
|
||||||
|
<property id="copyright" translatable="True">
|
||||||
|
<visible-lines>4</visible-lines>
|
||||||
|
</property>
|
||||||
|
<property id="translator-credits" translatable="True">
|
||||||
|
<visible-lines>4</visible-lines>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomeMessageBox" generic-name="messagebox" _title="GNOME Message Box">
|
||||||
|
<set-property-function>glade_gnome_message_box_set_property</set-property-function>
|
||||||
|
<properties>
|
||||||
|
<property id="message-box-type">
|
||||||
|
<spec>glade_gnome_message_box_type_spec</spec>
|
||||||
|
<displayable-values>
|
||||||
|
<value id="GNOME_MESSAGE_BOX_INFO" _name="Information"/>
|
||||||
|
<value id="GNOME_MESSAGE_BOX_WARNING" _name="Warning"/>
|
||||||
|
<value id="GNOME_MESSAGE_BOX_ERROR" _name="Error"/>
|
||||||
|
<value id="GNOME_MESSAGE_BOX_QUESTION" _name="Question"/>
|
||||||
|
<value id="GNOME_MESSAGE_BOX_GENERIC" _name="Generic"/>
|
||||||
|
</displayable-values>
|
||||||
|
</property>
|
||||||
|
<property id="message" _name="Message">
|
||||||
|
<spec>glade_standard_string_spec</spec>
|
||||||
|
<tooltip>The message to display</tooltip>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
<glade-widget-class name="GnomePropertyBox" generic-name="propertybox" _title="GNOME Property Box"/>
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomeEntry" generic-name="entry" title="GNOME Entry">
|
||||||
|
<post-create-function>glade_gnome_entry_post_create</post-create-function>
|
||||||
|
<get-internal-child-function>glade_gnome_entry_get_internal_child</get-internal-child-function>
|
||||||
|
<get-children-function>glade_gnome_entry_get_children</get-children-function>
|
||||||
|
<set-property-function>glade_gnome_entry_set_property</set-property-function>
|
||||||
|
<properties>
|
||||||
|
<property id="gtk-entry" disabled="True"/>
|
||||||
|
<property id="max-saved" _name="Max Saved">
|
||||||
|
<spec>glade_standard_int_spec</spec>
|
||||||
|
<_tooltip>The maximum number of history entries saved</_tooltip>
|
||||||
|
</property>
|
||||||
|
<property id="size" visible="False" query="False" ignore="True"/>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<packing-properties>
|
||||||
|
<property id="expand" disabled="True"/>
|
||||||
|
<property id="fill" disabled="True"/>
|
||||||
|
<property id="pack-type" disabled="True"/>
|
||||||
|
<property id="padding" disabled="True"/>
|
||||||
|
<property id="position" disabled="True"/>
|
||||||
|
</packing-properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomeFileEntry" generic-name="fileentry" _title="GNOME File Entry">
|
||||||
|
<post-create-function>glade_gnome_entry_post_create</post-create-function>
|
||||||
|
<get-internal-child-function>glade_gnome_entry_get_internal_child</get-internal-child-function>
|
||||||
|
<get-children-function>glade_gnome_entry_get_children</get-children-function>
|
||||||
|
<set-property-function>glade_gnome_file_entry_set_property</set-property-function>
|
||||||
|
<properties>
|
||||||
|
<property id="max-saved" _name="Max Saved">
|
||||||
|
<spec>glade_standard_int_spec</spec>
|
||||||
|
<_tooltip>The maximum number of history entries saved</_tooltip>
|
||||||
|
</property>
|
||||||
|
<property id="size" visible="False" query="False" ignore="True"/>
|
||||||
|
</properties>
|
||||||
|
<packing-properties>
|
||||||
|
<property id="expand" disabled="True"/>
|
||||||
|
<property id="fill" disabled="True"/>
|
||||||
|
<property id="pack-type" disabled="True"/>
|
||||||
|
<property id="padding" disabled="True"/>
|
||||||
|
<property id="position" disabled="True"/>
|
||||||
|
</packing-properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomePixmapEntry" generic-name="pixmapentry" _title="GNOME Pixmap Entry">
|
||||||
|
<packing-properties>
|
||||||
|
<property id="expand" disabled="True"/>
|
||||||
|
<property id="fill" disabled="True"/>
|
||||||
|
<property id="pack-type" disabled="True"/>
|
||||||
|
<property id="padding" disabled="True"/>
|
||||||
|
<property id="position" disabled="True"/>
|
||||||
|
</packing-properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomeColorPicker" generic-name="colorpicker" _title="GNOME Color Picker">
|
||||||
|
<post-create-function>empty</post-create-function>
|
||||||
|
<properties>
|
||||||
|
<property id="use-underline" disabled="True"/>
|
||||||
|
<property id="label" disabled="True"/>
|
||||||
|
<property id="glade-type" disabled="True"/>
|
||||||
|
<property id="stock" disabled="True"/>
|
||||||
|
<property id="red" disabled="True"/>
|
||||||
|
<property id="green" disabled="True"/>
|
||||||
|
<property id="blue" disabled="True"/>
|
||||||
|
<property id="alpha" disabled="True"/>
|
||||||
|
<property id="dither" _name="Dither"/>
|
||||||
|
<property id="use-alpha" _name="Use Alpha"/>
|
||||||
|
<property id="title" _name="Title"/>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomeFontPicker" generic-name="fontpicker" _title="GNOME Font Picker">
|
||||||
|
<post-create-function>empty</post-create-function>
|
||||||
|
<get-children-function>glade_gnome_font_picker_get_children</get-children-function>
|
||||||
|
<add-child-function>glade_gnome_font_picker_add_child</add-child-function>
|
||||||
|
<remove-child-function>glade_gnome_font_picker_remove_child</remove-child-function>
|
||||||
|
<replace-child-function>glade_gnome_font_picker_replace_child</replace-child-function>
|
||||||
|
<set-property-function>glade_gnome_font_picker_set_property</set-property-function>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<property id="use-underline" disabled="True"/>
|
||||||
|
<property id="label" disabled="True"/>
|
||||||
|
<property id="glade-type" disabled="True"/>
|
||||||
|
<property id="stock" disabled="True"/>
|
||||||
|
<property id="font-name" disabled="True"/>
|
||||||
|
<property id="mode">
|
||||||
|
<displayable-values>
|
||||||
|
<value id="GNOME_FONT_PICKER_MODE_PIXMAP" _name="Pixmap"/>
|
||||||
|
<value id="GNOME_FONT_PICKER_MODE_FONT_INFO" _name="Font Information"/>
|
||||||
|
<value id="GNOME_FONT_PICKER_MODE_USER_WIDGET" _name="User Widget"/>
|
||||||
|
<value id="GNOME_FONT_PICKER_MODE_UNKNOWN" _name="Unknown"/>
|
||||||
|
</displayable-values>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GnomePixmap" generic-name="pixmap" _title="GNOME Pixmap">
|
||||||
|
<post-create-function>empty</post-create-function>
|
||||||
|
<set-property-function>glade_gnome_pixmap_set_property</set-property-function>
|
||||||
|
<properties>
|
||||||
|
<property id="stock" disabled="True"/>
|
||||||
|
<property id="icon-name" disabled="True"/>
|
||||||
|
<property id="glade-stock" disabled="True"/>
|
||||||
|
<property id="glade-type" disabled="True"/>
|
||||||
|
<property id="pixbuf" disabled="True"/>
|
||||||
|
<property id="icon-size" disabled="True"/>
|
||||||
|
<property id="pixel-size" disabled="True"/>
|
||||||
|
<property id="filename" _name="File">
|
||||||
|
<spec>glade_standard_pixbuf_spec</spec>
|
||||||
|
<_tooltip>The pixmap file</_tooltip>
|
||||||
|
</property>
|
||||||
|
<property id="scaled-width" _name="Scaled Width">
|
||||||
|
<spec>glade_standard_int_spec</spec>
|
||||||
|
<_tooltip>The width to scale the pixmap to</_tooltip>
|
||||||
|
</property>
|
||||||
|
<property id="scaled-height" _name="Scaled Height">
|
||||||
|
<spec>glade_standard_int_spec</spec>
|
||||||
|
<_tooltip>The height to scale the pixmap to</_tooltip>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<!-- Unsupported Classes
|
||||||
|
Deprecated and not suported by libglade:
|
||||||
|
* GnomeScores
|
||||||
|
|
||||||
|
These are not widget classes:
|
||||||
|
* GnomeClient
|
||||||
|
* GnomeMdi, GnomeMdiChild, GnomeMdiGenericChild
|
||||||
|
* GnomeCanvasItem, GnomeIconTextItem -->
|
||||||
|
</glade-widget-classes>
|
||||||
|
|
||||||
|
<glade-widget-group name="gnomeui-base" _title="GNOME User Interface">
|
||||||
|
|
||||||
|
<glade-widget-class-ref name="GnomeApp"/>
|
||||||
|
<glade-widget-class-ref name="GnomeDruid"/>
|
||||||
|
<glade-widget-class-ref name="GnomeIconSelection"/>
|
||||||
|
<glade-widget-class-ref name="GnomeHRef"/>
|
||||||
|
<glade-widget-class-ref name="GnomeDateEdit"/>
|
||||||
|
<glade-widget-class-ref name="GnomeIconEntry"/>
|
||||||
|
<glade-widget-class-ref name="GnomeAppBar"/>
|
||||||
|
</glade-widget-group>
|
||||||
|
|
||||||
|
<glade-widget-group name="gnomeui-obsolete" _title="GNOME UI Obsolete">
|
||||||
|
|
||||||
|
<default-palette-state expanded="False" />
|
||||||
|
|
||||||
|
<glade-widget-class-ref name="GnomeDialog"/>
|
||||||
|
<glade-widget-class-ref name="GnomeAbout"/>
|
||||||
|
<glade-widget-class-ref name="GnomeMessageBox"/>
|
||||||
|
<glade-widget-class-ref name="GnomePropertyBox"/>
|
||||||
|
<glade-widget-class-ref name="GnomeEntry"/>
|
||||||
|
<glade-widget-class-ref name="GnomeFileEntry"/>
|
||||||
|
<glade-widget-class-ref name="GnomePixmapEntry"/>
|
||||||
|
<glade-widget-class-ref name="GnomeColorPicker"/>
|
||||||
|
<glade-widget-class-ref name="GnomeFontPicker"/>
|
||||||
|
<glade-widget-class-ref name="GnomePixmap"/>
|
||||||
|
</glade-widget-group>
|
||||||
|
</glade-catalog>
|
30
plugins/gnome/icons/16x16/Makefile.am
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
|
iconsdir = $(pkgdatadir)/pixmaps/hicolor/16x16/actions
|
||||||
|
|
||||||
|
icons_DATA = \
|
||||||
|
widget-gnome-about.png \
|
||||||
|
widget-gnome-app.png \
|
||||||
|
widget-gnome-appbar.png \
|
||||||
|
widget-bonobo-dock.png \
|
||||||
|
widget-bonobo-dockitem.png \
|
||||||
|
widget-gnome-canvas.png \
|
||||||
|
widget-gnome-colorpicker.png \
|
||||||
|
widget-gnome-dateedit.png \
|
||||||
|
widget-gnome-dialog.png \
|
||||||
|
widget-gnome-druid.png \
|
||||||
|
widget-gnome-druidpageedge.png \
|
||||||
|
widget-gnome-druidpagestandard.png \
|
||||||
|
widget-gnome-entry.png \
|
||||||
|
widget-gnome-fileentry.png \
|
||||||
|
widget-gnome-fontpicker.png \
|
||||||
|
widget-gnome-href.png \
|
||||||
|
widget-gnome-iconentry.png \
|
||||||
|
widget-gnome-iconlist.png \
|
||||||
|
widget-gnome-iconselection.png \
|
||||||
|
widget-gnome-messagebox.png \
|
||||||
|
widget-gnome-pixmap.png \
|
||||||
|
widget-gnome-pixmapentry.png \
|
||||||
|
widget-gnome-propertybox.png
|
||||||
|
|
||||||
|
EXTRA_DIST = $(icons_DATA)
|
BIN
plugins/gnome/icons/16x16/widget-bonobo-dock.png
Normal file
After Width: | Height: | Size: 142 B |
BIN
plugins/gnome/icons/16x16/widget-bonobo-dockitem.png
Normal file
After Width: | Height: | Size: 156 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-about.png
Normal file
After Width: | Height: | Size: 221 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-app.png
Normal file
After Width: | Height: | Size: 168 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-appbar.png
Normal file
After Width: | Height: | Size: 113 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-canvas.png
Normal file
After Width: | Height: | Size: 108 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-colorpicker.png
Normal file
After Width: | Height: | Size: 199 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-dateedit.png
Normal file
After Width: | Height: | Size: 164 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-dialog.png
Normal file
After Width: | Height: | Size: 206 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-druid.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-druidpageedge.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-druidpagestandard.png
Normal file
After Width: | Height: | Size: 155 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-entry.png
Normal file
After Width: | Height: | Size: 153 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-fileentry.png
Normal file
After Width: | Height: | Size: 164 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-fontpicker.png
Normal file
After Width: | Height: | Size: 291 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-href.png
Normal file
After Width: | Height: | Size: 121 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-iconentry.png
Normal file
After Width: | Height: | Size: 204 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-iconlist.png
Normal file
After Width: | Height: | Size: 241 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-iconselection.png
Normal file
After Width: | Height: | Size: 224 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-messagebox.png
Normal file
After Width: | Height: | Size: 229 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-pixmap.png
Normal file
After Width: | Height: | Size: 268 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-pixmapentry.png
Normal file
After Width: | Height: | Size: 164 B |
BIN
plugins/gnome/icons/16x16/widget-gnome-propertybox.png
Normal file
After Width: | Height: | Size: 224 B |
31
plugins/gnome/icons/22x22/Makefile.am
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
|
iconsdir = $(pkgdatadir)/pixmaps/hicolor/22x22/actions
|
||||||
|
|
||||||
|
icons_DATA = \
|
||||||
|
widget-gnome-about.png \
|
||||||
|
widget-gnome-app.png \
|
||||||
|
widget-gnome-appbar.png \
|
||||||
|
widget-bonobo-dock.png \
|
||||||
|
widget-bonobo-dockitem.png \
|
||||||
|
widget-gnome-canvas.png \
|
||||||
|
widget-gnome-colorpicker.png \
|
||||||
|
widget-gnome-dateedit.png \
|
||||||
|
widget-gnome-dialog.png \
|
||||||
|
widget-gnome-druid.png \
|
||||||
|
widget-gnome-druidpageedge.png \
|
||||||
|
widget-gnome-druidpagestandard.png \
|
||||||
|
widget-gnome-entry.png \
|
||||||
|
widget-gnome-fileentry.png \
|
||||||
|
widget-gnome-fontpicker.png \
|
||||||
|
widget-gnome-href.png \
|
||||||
|
widget-gnome-iconentry.png \
|
||||||
|
widget-gnome-iconlist.png \
|
||||||
|
widget-gnome-iconselection.png \
|
||||||
|
widget-gnome-messagebox.png \
|
||||||
|
widget-gnome-pixmap.png \
|
||||||
|
widget-gnome-pixmapentry.png \
|
||||||
|
widget-gnome-propertybox.png
|
||||||
|
|
||||||
|
|
||||||
|
EXTRA_DIST = $(icons_DATA)
|
BIN
plugins/gnome/icons/22x22/widget-bonobo-dock.png
Normal file
After Width: | Height: | Size: 147 B |
BIN
plugins/gnome/icons/22x22/widget-bonobo-dockitem.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-about.png
Normal file
After Width: | Height: | Size: 236 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-app.png
Normal file
After Width: | Height: | Size: 181 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-appbar.png
Normal file
After Width: | Height: | Size: 122 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-canvas.png
Normal file
After Width: | Height: | Size: 115 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-colorpicker.png
Normal file
After Width: | Height: | Size: 168 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-dateedit.png
Normal file
After Width: | Height: | Size: 177 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-dialog.png
Normal file
After Width: | Height: | Size: 283 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-druid.png
Normal file
After Width: | Height: | Size: 143 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-druidpageedge.png
Normal file
After Width: | Height: | Size: 143 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-druidpagestandard.png
Normal file
After Width: | Height: | Size: 143 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-entry.png
Normal file
After Width: | Height: | Size: 170 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-fileentry.png
Normal file
After Width: | Height: | Size: 177 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-fontpicker.png
Normal file
After Width: | Height: | Size: 175 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-href.png
Normal file
After Width: | Height: | Size: 150 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-iconentry.png
Normal file
After Width: | Height: | Size: 226 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-iconlist.png
Normal file
After Width: | Height: | Size: 265 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-iconselection.png
Normal file
After Width: | Height: | Size: 274 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-messagebox.png
Normal file
After Width: | Height: | Size: 310 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-pixmap.png
Normal file
After Width: | Height: | Size: 269 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-pixmapentry.png
Normal file
After Width: | Height: | Size: 177 B |
BIN
plugins/gnome/icons/22x22/widget-gnome-propertybox.png
Normal file
After Width: | Height: | Size: 263 B |
3
plugins/gnome/icons/Makefile.am
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
|
SUBDIRS = 16x16 22x22
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
SUBDIRS = icons
|
SUBDIRS = icons
|
||||||
|
|
||||||
libgladeui = $(top_builddir)/gladeui/libgladeui-2.la
|
libgladeui = $(top_builddir)/gladeui/libgladeui-1.la
|
||||||
|
|
||||||
|
|
||||||
# libgladegtk
|
# libgladegtk
|
||||||
@ -10,18 +10,15 @@ libgladeui = $(top_builddir)/gladeui/libgladeui-2.la
|
|||||||
gladegtk_LTLIBRARIES = libgladegtk.la
|
gladegtk_LTLIBRARIES = libgladegtk.la
|
||||||
gladegtkdir = $(pkglibdir)/modules
|
gladegtkdir = $(pkglibdir)/modules
|
||||||
|
|
||||||
libgladegtk_la_CPPLAGS = \
|
libgladegtk_la_CPPFLAGS = \
|
||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
-I$(top_builddir) \
|
-I$(top_builddir) \
|
||||||
$(AM_CPPFLAGS)
|
|
||||||
|
|
||||||
libgladegtk_la_CFLAGS = \
|
|
||||||
-DG_LOG_DOMAIN=\"GladeUI-GTK\" \
|
-DG_LOG_DOMAIN=\"GladeUI-GTK\" \
|
||||||
-I$(top_srcdir) \
|
|
||||||
-I$(top_builddir) \
|
|
||||||
$(GTK_CFLAGS) \
|
$(GTK_CFLAGS) \
|
||||||
$(PLUGINS_WARN_CFLAGS) \
|
$(PLUGINS_WARN_CFLAGS) \
|
||||||
$(AM_CFLAGS)
|
$(AM_CPPFLAGS)
|
||||||
|
|
||||||
|
libgladegtk_la_CFLAGS = $(AM_CFLAGS)
|
||||||
|
|
||||||
libgladegtk_la_SOURCES = glade-gtk.c glade-accels.c glade-attributes.c glade-convert.c fixed-bg.xpm \
|
libgladegtk_la_SOURCES = glade-gtk.c glade-accels.c glade-attributes.c glade-convert.c fixed-bg.xpm \
|
||||||
glade-column-types.c glade-model-data.c glade-text-button.c \
|
glade-column-types.c glade-model-data.c glade-text-button.c \
|
||||||
|
@ -474,11 +474,14 @@ glade_gtk_string_from_attr (GladeAttribute *gattr)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/* PangoAttrFloat */
|
/* PangoAttrFloat */
|
||||||
case PANGO_ATTR_SCALE:
|
case PANGO_ATTR_SCALE: {
|
||||||
/* doubles */
|
/* doubles */
|
||||||
|
gchar buf[G_ASCII_DTOSTR_BUF_SIZE];
|
||||||
|
|
||||||
fval = g_value_get_double (&(gattr->value));
|
fval = g_value_get_double (&(gattr->value));
|
||||||
ret = g_strdup_printf ("%f", fval);
|
ret = g_strdup (g_ascii_dtostr (buf, sizeof (buf), fval));
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* PangoAttrColor */
|
/* PangoAttrColor */
|
||||||
case PANGO_ATTR_FOREGROUND:
|
case PANGO_ATTR_FOREGROUND:
|
||||||
@ -579,7 +582,7 @@ glade_gtk_attribute_from_string (PangoAttrType type,
|
|||||||
case PANGO_ATTR_SCALE:
|
case PANGO_ATTR_SCALE:
|
||||||
/* doubles */
|
/* doubles */
|
||||||
g_value_init (&(gattr->value), G_TYPE_DOUBLE);
|
g_value_init (&(gattr->value), G_TYPE_DOUBLE);
|
||||||
g_value_set_double (&(gattr->value), strtod (strval, NULL));
|
g_value_set_double (&(gattr->value), g_ascii_strtod (strval, NULL));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* PangoAttrColor */
|
/* PangoAttrColor */
|
||||||
|
@ -145,11 +145,9 @@ glade_column_list_copy (GList *list)
|
|||||||
|
|
||||||
for (l = list; l; l = g_list_next (l))
|
for (l = list; l; l = g_list_next (l))
|
||||||
{
|
{
|
||||||
GladeColumnType *new_data = g_slice_new0 (GladeColumnType);
|
|
||||||
GladeColumnType *data = l->data;
|
GladeColumnType *data = l->data;
|
||||||
|
GladeColumnType *new_data =
|
||||||
new_data->type_name = g_strdup (data->type_name);
|
glade_column_type_new (data->type_name, data->column_name);
|
||||||
new_data->column_name = g_strdup (data->column_name);
|
|
||||||
|
|
||||||
retval = g_list_prepend (retval, new_data);
|
retval = g_list_prepend (retval, new_data);
|
||||||
}
|
}
|
||||||
@ -157,6 +155,18 @@ glade_column_list_copy (GList *list)
|
|||||||
return g_list_reverse (retval);
|
return g_list_reverse (retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GladeColumnType *
|
||||||
|
glade_column_type_new (const gchar *type_name,
|
||||||
|
const gchar *column_name)
|
||||||
|
{
|
||||||
|
GladeColumnType *column = g_slice_new0 (GladeColumnType);
|
||||||
|
|
||||||
|
column->type_name = g_strdup (type_name);
|
||||||
|
column->column_name = g_strdup (column_name);
|
||||||
|
|
||||||
|
return column;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
glade_column_type_free (GladeColumnType *column)
|
glade_column_type_free (GladeColumnType *column)
|
||||||
{
|
{
|
||||||
@ -323,9 +333,7 @@ eprop_column_append (GladeEditorProperty *eprop,
|
|||||||
if (columns)
|
if (columns)
|
||||||
columns = glade_column_list_copy (columns);
|
columns = glade_column_list_copy (columns);
|
||||||
|
|
||||||
data = g_slice_new0 (GladeColumnType);
|
data = glade_column_type_new (type_name, column_name);
|
||||||
data->column_name = g_strdup (column_name);
|
|
||||||
data->type_name = g_strdup (type_name);
|
|
||||||
|
|
||||||
columns = g_list_append (columns, data);
|
columns = g_list_append (columns, data);
|
||||||
|
|
||||||
|
@ -41,6 +41,8 @@ GType glade_eprop_column_types_get_type (void) G_GNUC_CONST;
|
|||||||
void glade_column_list_free (GList *list);
|
void glade_column_list_free (GList *list);
|
||||||
GList *glade_column_list_copy (GList *list);
|
GList *glade_column_list_copy (GList *list);
|
||||||
|
|
||||||
|
GladeColumnType *glade_column_type_new (const gchar *type_name,
|
||||||
|
const gchar *column_name);
|
||||||
void glade_column_type_free (GladeColumnType *column);
|
void glade_column_type_free (GladeColumnType *column);
|
||||||
GladeColumnType *glade_column_list_find_column (GList *list, const gchar *column_name);
|
GladeColumnType *glade_column_list_find_column (GList *list, const gchar *column_name);
|
||||||
|
|
||||||
|
@ -589,10 +589,9 @@ append_label_appearance (GladeLabelEditor *label_editor,
|
|||||||
table_attach (table, GTK_WIDGET (eprop), 1, 3, label_editor->appearance_group);
|
table_attach (table, GTK_WIDGET (eprop), 1, 3, label_editor->appearance_group);
|
||||||
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
|
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
|
||||||
|
|
||||||
/* Add invisible eprops at the end of this table... */
|
/* Tie the invisible editor property to the table's life-cycle */
|
||||||
gtk_widget_set_no_show_all (GTK_WIDGET (markup_property), TRUE);
|
g_object_set_data_full (G_OBJECT (table), "glade-markup-property-destroy-me",
|
||||||
gtk_widget_hide (GTK_WIDGET (markup_property));
|
markup_property, (GDestroyNotify)gtk_widget_destroy);
|
||||||
table_attach (table, GTK_WIDGET (markup_property), 0, 4, label_editor->appearance_group);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -718,10 +717,9 @@ append_label_wrapping (GladeLabelEditor *label_editor,
|
|||||||
table_attach (table, GTK_WIDGET (eprop), 1, row++, label_editor->wrap_group);
|
table_attach (table, GTK_WIDGET (eprop), 1, row++, label_editor->wrap_group);
|
||||||
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
|
label_editor->properties = g_list_prepend (label_editor->properties, eprop);
|
||||||
|
|
||||||
/* Add invisible eprops at the end of this table... */
|
/* Tie the invisible editor property to the table's life-cycle */
|
||||||
gtk_widget_set_no_show_all (GTK_WIDGET (single_line_eprop), TRUE);
|
g_object_set_data_full (G_OBJECT (table), "glade-single-line-property-destroy-me",
|
||||||
gtk_widget_hide (GTK_WIDGET (single_line_eprop));
|
single_line_eprop, (GDestroyNotify)gtk_widget_destroy);
|
||||||
table_attach (table, GTK_WIDGET (single_line_eprop), 0, row, label_editor->wrap_group);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
|
@ -507,7 +507,7 @@ glade_tool_button_editor_new (GladeWidgetAdaptor *adaptor,
|
|||||||
button_editor->image_table = table = gtk_table_new (0, 0, FALSE);
|
button_editor->image_table = table = gtk_table_new (0, 0, FALSE);
|
||||||
gtk_container_add (GTK_CONTAINER (alignment), table);
|
gtk_container_add (GTK_CONTAINER (alignment), table);
|
||||||
|
|
||||||
gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||||
|
|
||||||
/* Stock image... */
|
/* Stock image... */
|
||||||
eprop = glade_widget_adaptor_create_eprop_by_name (adaptor, "stock-id", FALSE, TRUE);
|
eprop = glade_widget_adaptor_create_eprop_by_name (adaptor, "stock-id", FALSE, TRUE);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<glade-catalog name="gtk+"
|
<glade-catalog name="gtk+"
|
||||||
version="2.20"
|
version="2.24"
|
||||||
targetable="2.18,2.16,2.14,2.12,2.10,2.8"
|
targetable="2.22,2.20,2.18,2.16,2.14,2.12,2.10,2.8"
|
||||||
supports="libglade,gtkbuilder"
|
supports="libglade,gtkbuilder"
|
||||||
icon-prefix="gtk"
|
icon-prefix="gtk"
|
||||||
library="gladegtk"
|
library="gladegtk"
|
||||||
@ -57,6 +57,9 @@
|
|||||||
<visible-lines>2</visible-lines>
|
<visible-lines>2</visible-lines>
|
||||||
</property>
|
</property>
|
||||||
<property id="tooltip-markup" since="2.12" weight="4.1" libglade-unsupported="True"/>
|
<property id="tooltip-markup" since="2.12" weight="4.1" libglade-unsupported="True"/>
|
||||||
|
<property id="can-focus" common="True" save-always="True"/>
|
||||||
|
<property id="has-default" common="True" ignore="True"/>
|
||||||
|
<property id="can-default" common="True" />
|
||||||
<property id="visible" default="True" common="True" ignore="True"/>
|
<property id="visible" default="True" common="True" ignore="True"/>
|
||||||
<property id="width-request" common="True" optional="True" optional-default="False" default="0"/>
|
<property id="width-request" common="True" optional="True" optional-default="False" default="0"/>
|
||||||
<property id="height-request" common="True" optional="True" optional-default="False" default="0"/>
|
<property id="height-request" common="True" optional="True" optional-default="False" default="0"/>
|
||||||
@ -111,7 +114,6 @@
|
|||||||
<property id="parent" disabled="True"/>
|
<property id="parent" disabled="True"/>
|
||||||
<property id="style" disabled="True"/>
|
<property id="style" disabled="True"/>
|
||||||
<property id="sensitive" ignore="True"/>
|
<property id="sensitive" ignore="True"/>
|
||||||
<property id="has-default" ignore="True" common="True"/>
|
|
||||||
<property id="double-buffered" since="2.18"/>
|
<property id="double-buffered" since="2.18"/>
|
||||||
|
|
||||||
<!-- Accelerators -->
|
<!-- Accelerators -->
|
||||||
@ -282,7 +284,7 @@ embedded in another object</_tooltip>
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<property id="border-width" common="True" weight="2.5"/>
|
<property id="border-width" common="True" weight="2.5"/>
|
||||||
<property id="resize-mode" common="True" weight="4.7">
|
<property id="resize-mode" ignore="True" common="True" weight="4.7">
|
||||||
<displayable-values>
|
<displayable-values>
|
||||||
<value id="GTK_RESIZE_PARENT" _name="Parent"/>
|
<value id="GTK_RESIZE_PARENT" _name="Parent"/>
|
||||||
<value id="GTK_RESIZE_QUEUE" _name="Queue"/>
|
<value id="GTK_RESIZE_QUEUE" _name="Queue"/>
|
||||||
@ -296,6 +298,7 @@ embedded in another object</_tooltip>
|
|||||||
<glade-widget-class name="GtkBox" _title="Box" fixed="True">
|
<glade-widget-class name="GtkBox" _title="Box" fixed="True">
|
||||||
<post-create-function>glade_gtk_box_post_create</post-create-function>
|
<post-create-function>glade_gtk_box_post_create</post-create-function>
|
||||||
<get-internal-child-function>glade_gtk_box_get_internal_child</get-internal-child-function>
|
<get-internal-child-function>glade_gtk_box_get_internal_child</get-internal-child-function>
|
||||||
|
<get-children-function>glade_gtk_box_get_children</get-children-function>
|
||||||
<set-property-function>glade_gtk_box_set_property</set-property-function>
|
<set-property-function>glade_gtk_box_set_property</set-property-function>
|
||||||
<get-property-function>glade_gtk_box_get_property</get-property-function>
|
<get-property-function>glade_gtk_box_get_property</get-property-function>
|
||||||
<verify-function>glade_gtk_box_verify_property</verify-function>
|
<verify-function>glade_gtk_box_verify_property</verify-function>
|
||||||
@ -801,7 +804,6 @@ embedded in another object</_tooltip>
|
|||||||
</signals>
|
</signals>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<property id="can-focus" save-always="True"/>
|
|
||||||
<property id="text" translatable="True" custom-layout="True"/>
|
<property id="text" translatable="True" custom-layout="True"/>
|
||||||
<property id="buffer" libglade-unsupported="True" create-type="GtkEntryBuffer" since="2.18" custom-layout="True"/>
|
<property id="buffer" libglade-unsupported="True" create-type="GtkEntryBuffer" since="2.18" custom-layout="True"/>
|
||||||
|
|
||||||
@ -898,7 +900,6 @@ embedded in another object</_tooltip>
|
|||||||
<write-widget-function>glade_gtk_button_write_widget</write-widget-function>
|
<write-widget-function>glade_gtk_button_write_widget</write-widget-function>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<property id="can-focus" save-always="True"/>
|
|
||||||
<property id="receives-default" save-always="True"/>
|
<property id="receives-default" save-always="True"/>
|
||||||
<property id="image" parentless-widget="True" create-type="GtkImage"
|
<property id="image" parentless-widget="True" create-type="GtkImage"
|
||||||
libglade-unsupported="True" custom-layout="True"/>
|
libglade-unsupported="True" custom-layout="True"/>
|
||||||
@ -992,7 +993,6 @@ embedded in another object</_tooltip>
|
|||||||
<properties>
|
<properties>
|
||||||
<property id="text" disabled="True"/>
|
<property id="text" disabled="True"/>
|
||||||
<property id="value" disabled="True"/>
|
<property id="value" disabled="True"/>
|
||||||
<property id="can-focus" default="True"/>
|
|
||||||
<property id="adjustment" default="0 0 100 1 10 0"/>
|
<property id="adjustment" default="0 0 100 1 10 0"/>
|
||||||
<property id="update-policy">
|
<property id="update-policy">
|
||||||
<displayable-values>
|
<displayable-values>
|
||||||
@ -1011,6 +1011,7 @@ embedded in another object</_tooltip>
|
|||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
<glade-widget-class name="GtkFileChooserButton" generic-name="filechooserbutton" _title="File Chooser Button">
|
<glade-widget-class name="GtkFileChooserButton" generic-name="filechooserbutton" _title="File Chooser Button">
|
||||||
|
<set-property-function>glade_gtk_file_chooser_button_set_property</set-property-function>
|
||||||
|
|
||||||
<signals>
|
<signals>
|
||||||
<signal id="file-set" since="2.12"/>
|
<signal id="file-set" since="2.12"/>
|
||||||
@ -1033,6 +1034,7 @@ embedded in another object</_tooltip>
|
|||||||
<property id="preview-widget" parentless-widget="True" libglade-unsupported="True"/>
|
<property id="preview-widget" parentless-widget="True" libglade-unsupported="True"/>
|
||||||
<property id="filter" libglade-unsupported="True"/>
|
<property id="filter" libglade-unsupported="True"/>
|
||||||
<property id="create-folders" since="2.18"/>
|
<property id="create-folders" since="2.18"/>
|
||||||
|
<property id="select-multiple" disabled="True"/>
|
||||||
</properties>
|
</properties>
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
@ -1103,7 +1105,7 @@ embedded in another object</_tooltip>
|
|||||||
<set-property-function>glade_gtk_combo_box_set_property</set-property-function>
|
<set-property-function>glade_gtk_combo_box_set_property</set-property-function>
|
||||||
<add-child-function>glade_gtk_cell_layout_add_child</add-child-function>
|
<add-child-function>glade_gtk_cell_layout_add_child</add-child-function>
|
||||||
<remove-child-function>glade_gtk_cell_layout_remove_child</remove-child-function>
|
<remove-child-function>glade_gtk_cell_layout_remove_child</remove-child-function>
|
||||||
<get-children-function>glade_gtk_cell_layout_get_children</get-children-function>
|
<get-children-function>glade_gtk_combo_box_get_children</get-children-function>
|
||||||
<read-child-function>glade_gtk_cell_layout_read_child</read-child-function>
|
<read-child-function>glade_gtk_cell_layout_read_child</read-child-function>
|
||||||
<write-child-function>glade_gtk_cell_layout_write_child</write-child-function>
|
<write-child-function>glade_gtk_cell_layout_write_child</write-child-function>
|
||||||
<action-activate-function>glade_gtk_cell_layout_action_activate_as_widget</action-activate-function>
|
<action-activate-function>glade_gtk_cell_layout_action_activate_as_widget</action-activate-function>
|
||||||
@ -1126,6 +1128,8 @@ embedded in another object</_tooltip>
|
|||||||
<property id="active" ignore="True"/>
|
<property id="active" ignore="True"/>
|
||||||
<property id="column-span-column" ignore="True"/>
|
<property id="column-span-column" ignore="True"/>
|
||||||
<property id="row-span-column" ignore="True"/>
|
<property id="row-span-column" ignore="True"/>
|
||||||
|
<property id="entry-text-column" since="2.24"/>
|
||||||
|
<property id="has-entry" since="2.24"/>
|
||||||
<property id="items" _name="Items" translatable="True" libglade-only="True">
|
<property id="items" _name="Items" translatable="True" libglade-only="True">
|
||||||
<parameter-spec>
|
<parameter-spec>
|
||||||
<type>GParamBoxed</type>
|
<type>GParamBoxed</type>
|
||||||
@ -1153,7 +1157,8 @@ embedded in another object</_tooltip>
|
|||||||
</properties>
|
</properties>
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
<glade-widget-class name="GtkComboBoxEntry" generic-name="comboboxentry" _title="Combo Box Entry">
|
<glade-widget-class name="GtkComboBoxEntry" generic-name="comboboxentry" _title="Combo Box Entry"
|
||||||
|
deprecated="True">
|
||||||
<post-create-function>glade_gtk_combo_box_entry_post_create</post-create-function>
|
<post-create-function>glade_gtk_combo_box_entry_post_create</post-create-function>
|
||||||
<get-internal-child-function>glade_gtk_combo_box_entry_get_internal_child</get-internal-child-function>
|
<get-internal-child-function>glade_gtk_combo_box_entry_get_internal_child</get-internal-child-function>
|
||||||
<set-property-function>glade_gtk_combo_box_entry_set_property</set-property-function>
|
<set-property-function>glade_gtk_combo_box_entry_set_property</set-property-function>
|
||||||
@ -1232,7 +1237,7 @@ embedded in another object</_tooltip>
|
|||||||
<property id="default-width" default="320" optional="True" optional-default="False"/>
|
<property id="default-width" default="320" optional="True" optional-default="False"/>
|
||||||
<property id="default-height" default="260" optional="True" optional-default="False"/>
|
<property id="default-height" default="260" optional="True" optional-default="False"/>
|
||||||
<property id="has-separator" default="False"/>
|
<property id="has-separator" default="False"/>
|
||||||
<property id="type-hint" save-always="True"/>
|
<property id="type-hint" default="GDK_WINDOW_TYPE_HINT_DIALOG" save-always="True"/>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
@ -1352,6 +1357,7 @@ embedded in another object</_tooltip>
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<property id="group" since="2.12"/>
|
<property id="group" since="2.12"/>
|
||||||
|
<property id="group-name" since="2.24"/>
|
||||||
<property id="page" save="False">
|
<property id="page" save="False">
|
||||||
<_tooltip>Set the current page (strictly for editing purposes)</_tooltip>
|
<_tooltip>Set the current page (strictly for editing purposes)</_tooltip>
|
||||||
</property>
|
</property>
|
||||||
@ -1576,7 +1582,6 @@ embedded in another object</_tooltip>
|
|||||||
|
|
||||||
<glade-widget-class name="GtkScrolledWindow" generic-name="scrolledwindow" _title="Scrolled Window">
|
<glade-widget-class name="GtkScrolledWindow" generic-name="scrolledwindow" _title="Scrolled Window">
|
||||||
<properties>
|
<properties>
|
||||||
<property id="can-focus" save-always="True"/>
|
|
||||||
<property id="window-placement-set" since="2.10" ignore="True"/>
|
<property id="window-placement-set" since="2.10" ignore="True"/>
|
||||||
<property id="hscrollbar-policy" default="GTK_POLICY_AUTOMATIC">
|
<property id="hscrollbar-policy" default="GTK_POLICY_AUTOMATIC">
|
||||||
<displayable-values>
|
<displayable-values>
|
||||||
@ -1624,6 +1629,9 @@ embedded in another object</_tooltip>
|
|||||||
<visible-lines>2</visible-lines>
|
<visible-lines>2</visible-lines>
|
||||||
</property>
|
</property>
|
||||||
</properties>
|
</properties>
|
||||||
|
<signals>
|
||||||
|
<signal id="activate-link" since="2.24"/>
|
||||||
|
</signals>
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
<glade-widget-class name="GtkColorSelectionDialog" generic-name="colorselectiondialog" _title="Color Selection Dialog">
|
<glade-widget-class name="GtkColorSelectionDialog" generic-name="colorselectiondialog" _title="Color Selection Dialog">
|
||||||
@ -1651,6 +1659,12 @@ embedded in another object</_tooltip>
|
|||||||
</properties>
|
</properties>
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GtkInputDialog" generic-name="inputdialog" deprecated="True" _title="Input Dialog">
|
||||||
|
<properties>
|
||||||
|
<property id="has-separator" disabled="True"/>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
<glade-widget-class name="GtkMessageDialog" generic-name="messagedialog" _title="Message Dialog" default-width="400" default-height="115">
|
<glade-widget-class name="GtkMessageDialog" generic-name="messagedialog" _title="Message Dialog" default-width="400" default-height="115">
|
||||||
<set-property-function>glade_gtk_message_dialog_set_property</set-property-function>
|
<set-property-function>glade_gtk_message_dialog_set_property</set-property-function>
|
||||||
<get-property-function>glade_gtk_message_dialog_get_property</get-property-function>
|
<get-property-function>glade_gtk_message_dialog_get_property</get-property-function>
|
||||||
@ -1663,9 +1677,6 @@ embedded in another object</_tooltip>
|
|||||||
<property id="default-height" default="115" optional="True" optional-default="False"/>
|
<property id="default-height" default="115" optional="True" optional-default="False"/>
|
||||||
|
|
||||||
<property common="True" id="sensitive"/>
|
<property common="True" id="sensitive"/>
|
||||||
<property common="True" id="can-default"/>
|
|
||||||
<property common="True" id="has-default"/>
|
|
||||||
<property common="True" id="can-focus"/>
|
|
||||||
|
|
||||||
<property id="image" since="2.10" parentless-widget="True"/>
|
<property id="image" since="2.10" parentless-widget="True"/>
|
||||||
<property id="secondary-text" translatable="True" since="2.10"/>
|
<property id="secondary-text" translatable="True" since="2.10"/>
|
||||||
@ -1721,10 +1732,114 @@ embedded in another object</_tooltip>
|
|||||||
</properties>
|
</properties>
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GtkCombo" generic-name="combo" _title="Combo" deprecated="True" libglade-only="True">
|
||||||
|
<post-create-function>glade_gtk_combo_post_create</post-create-function>
|
||||||
|
<get-internal-child-function>glade_gtk_combo_get_internal_child</get-internal-child-function>
|
||||||
|
<get-children-function>glade_gtk_combo_get_children</get-children-function>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<property id="size" disabled="True"/>
|
||||||
|
|
||||||
|
<!-- Atk press property -->
|
||||||
|
<property id="atk-press" _name="Press" ignore="True" atk-property="True" save="False">
|
||||||
|
<parameter-spec>
|
||||||
|
<type>GParamString</type>
|
||||||
|
</parameter-spec>
|
||||||
|
<_tooltip>Set the description of the Press atk action</_tooltip>
|
||||||
|
<visible-lines>2</visible-lines>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GtkOptionMenu" generic-name="optionmenu" _title="Option Menu" deprecated="True" libglade-only="True">
|
||||||
|
<post-create-function>empty</post-create-function>
|
||||||
|
<add-child-function>glade_gtk_option_menu_add_child</add-child-function>
|
||||||
|
<remove-child-function>glade_gtk_option_menu_remove_child</remove-child-function>
|
||||||
|
<get-children-function>glade_gtk_option_menu_get_children</get-children-function>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<property id="menu" disabled="True"/>
|
||||||
|
|
||||||
|
<!-- Atk press property -->
|
||||||
|
<property id="atk-press" _name="Press" ignore="True" atk-property="True" save="False">
|
||||||
|
<parameter-spec>
|
||||||
|
<type>GParamString</type>
|
||||||
|
</parameter-spec>
|
||||||
|
<_tooltip>Set the description of the Press atk action</_tooltip>
|
||||||
|
<visible-lines>2</visible-lines>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GtkList" generic-name="list" _title="List" deprecated="True" libglade-only="True">
|
||||||
|
<add-child-function>glade_gtk_listitem_add_child</add-child-function>
|
||||||
|
<remove-child-function>glade_gtk_listitem_remove_child</remove-child-function>
|
||||||
|
<properties>
|
||||||
|
<property id="selection-mode">
|
||||||
|
<displayable-values>
|
||||||
|
<value id="GTK_SELECTION_NONE" _name="None"/>
|
||||||
|
<value id="GTK_SELECTION_SINGLE" _name="Single"/>
|
||||||
|
<value id="GTK_SELECTION_BROWSE" _name="Browse"/>
|
||||||
|
<value id="GTK_SELECTION_MULTIPLE" _name="Multiple"/>
|
||||||
|
<value id="GTK_SELECTION_EXTENDED" _name="Extended"/>
|
||||||
|
</displayable-values>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GtkListItem" generic-name="listitem" _title="List Item" deprecated="True" libglade-only="True">
|
||||||
|
<post-create-function>glade_gtk_list_item_post_create</post-create-function>
|
||||||
|
<set-property-function>glade_gtk_list_item_set_property</set-property-function>
|
||||||
|
<get-property-function>glade_gtk_list_item_get_property</get-property-function>
|
||||||
|
<properties>
|
||||||
|
<property id="label" _name="Label" translatable="True">
|
||||||
|
<parameter-spec>
|
||||||
|
<type>GParamString</type>
|
||||||
|
</parameter-spec>
|
||||||
|
<_tooltip>The text to display</_tooltip>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GtkCList" generic-name="clist" _title="Columned List" deprecated="True" libglade-only="True">
|
||||||
|
<properties>
|
||||||
|
<property id="sort-type">
|
||||||
|
<displayable-values>
|
||||||
|
<value id="GTK_SORT_ASCENDING" _name="Ascending"/>
|
||||||
|
<value id="GTK_SORT_DESCENDING" _name="Descending"/>
|
||||||
|
</displayable-values>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
<glade-widget-class name="GtkColorSelection" generic-name="colorselection" _title="Color Selection"/>
|
<glade-widget-class name="GtkColorSelection" generic-name="colorselection" _title="Color Selection"/>
|
||||||
|
|
||||||
<glade-widget-class name="GtkFontSelection" generic-name="fontselection" _title="Font Selection"/>
|
<glade-widget-class name="GtkFontSelection" generic-name="fontselection" _title="Font Selection"/>
|
||||||
|
|
||||||
|
<glade-widget-class name="GtkCurve" generic-name="curve" _title="Curve" deprecated="True">
|
||||||
|
<properties>
|
||||||
|
<property id="curve-type" default="GTK_CURVE_TYPE_SPLINE">
|
||||||
|
<displayable-values>
|
||||||
|
<value id="GTK_CURVE_TYPE_LINEAR" _name="Linear"/>
|
||||||
|
<value id="GTK_CURVE_TYPE_SPLINE" _name="Spline"/>
|
||||||
|
<value id="GTK_CURVE_TYPE_FREE" _name="Free"/>
|
||||||
|
</displayable-values>
|
||||||
|
</property>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
|
<glade-widget-class name="GtkGammaCurve" generic-name="gammacurve" _title="Gamma Curve" deprecated="True"/>
|
||||||
|
|
||||||
|
<glade-widget-class name="GtkFileSelection" generic-name="fileselection" _title="File Selection" deprecated="True" libglade-only="True"/>
|
||||||
|
<glade-widget-class name="Custom" generic-name="custom" _title="Custom widget" deprecated="True" libglade-only="True">
|
||||||
|
<properties>
|
||||||
|
<property id="creation-function"/>
|
||||||
|
<property id="string1"/>
|
||||||
|
<property id="string2"/>
|
||||||
|
</properties>
|
||||||
|
</glade-widget-class>
|
||||||
|
|
||||||
<glade-widget-class name="GtkAssistant" generic-name="assistant" _title="Assistant" since="2.10">
|
<glade-widget-class name="GtkAssistant" generic-name="assistant" _title="Assistant" since="2.10">
|
||||||
<post-create-function>glade_gtk_assistant_post_create</post-create-function>
|
<post-create-function>glade_gtk_assistant_post_create</post-create-function>
|
||||||
<add-child-function>glade_gtk_assistant_add_child</add-child-function>
|
<add-child-function>glade_gtk_assistant_add_child</add-child-function>
|
||||||
@ -1846,7 +1961,7 @@ embedded in another object</_tooltip>
|
|||||||
<property id="upper" default="100.0" save="False"/>
|
<property id="upper" default="100.0" save="False"/>
|
||||||
<property id="page-increment" default="10.0"/>
|
<property id="page-increment" default="10.0"/>
|
||||||
<property id="step-increment" default="1.0"/>
|
<property id="step-increment" default="1.0"/>
|
||||||
<property id="page-size" default="10.0"/>
|
<property id="page-size" default="0.0"/>
|
||||||
</properties>
|
</properties>
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
@ -1855,6 +1970,11 @@ embedded in another object</_tooltip>
|
|||||||
<post-create-function>glade_gtk_action_post_create</post-create-function>
|
<post-create-function>glade_gtk_action_post_create</post-create-function>
|
||||||
<create-editor-property-function>glade_gtk_widget_create_eprop</create-editor-property-function>
|
<create-editor-property-function>glade_gtk_widget_create_eprop</create-editor-property-function>
|
||||||
<string-from-value-function>glade_gtk_widget_string_from_value</string-from-value-function>
|
<string-from-value-function>glade_gtk_widget_string_from_value</string-from-value-function>
|
||||||
|
<action-activate-function>glade_gtk_action_action_activate</action-activate-function>
|
||||||
|
<actions>
|
||||||
|
<action id="launch_editor" _name="Edit…" stock="gtk-edit" important="True"/>
|
||||||
|
</actions>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<property id="name" disabled="True"/>
|
<property id="name" disabled="True"/>
|
||||||
<property id="label" translatable="True"/>
|
<property id="label" translatable="True"/>
|
||||||
@ -1893,6 +2013,10 @@ embedded in another object</_tooltip>
|
|||||||
<replace-child-function>glade_gtk_action_group_replace_child</replace-child-function>
|
<replace-child-function>glade_gtk_action_group_replace_child</replace-child-function>
|
||||||
<read-child-function>glade_gtk_action_group_read_child</read-child-function>
|
<read-child-function>glade_gtk_action_group_read_child</read-child-function>
|
||||||
<write-child-function>glade_gtk_action_group_write_child</write-child-function>
|
<write-child-function>glade_gtk_action_group_write_child</write-child-function>
|
||||||
|
<action-activate-function>glade_gtk_action_action_activate</action-activate-function>
|
||||||
|
<actions>
|
||||||
|
<action id="launch_editor" _name="Edit…" stock="gtk-edit" important="True"/>
|
||||||
|
</actions>
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
<glade-widget-class name="GtkEntryCompletion" generic-name="entrycompletion" _title="Entry Completion"
|
<glade-widget-class name="GtkEntryCompletion" generic-name="entrycompletion" _title="Entry Completion"
|
||||||
@ -2070,6 +2194,7 @@ embedded in another object</_tooltip>
|
|||||||
</actions>
|
</actions>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
<property id="item-orientation" since="2.22"/>
|
||||||
<property id="item-padding" since="2.18"/>
|
<property id="item-padding" since="2.18"/>
|
||||||
<property id="text-column" disabled="True"/>
|
<property id="text-column" disabled="True"/>
|
||||||
<property id="markup-column" disabled="True"/>
|
<property id="markup-column" disabled="True"/>
|
||||||
@ -3304,6 +3429,7 @@ embedded in another object</_tooltip>
|
|||||||
<glade-widget-class-ref name="GtkColorSelectionDialog"/>
|
<glade-widget-class-ref name="GtkColorSelectionDialog"/>
|
||||||
<glade-widget-class-ref name="GtkFileChooserDialog"/>
|
<glade-widget-class-ref name="GtkFileChooserDialog"/>
|
||||||
<glade-widget-class-ref name="GtkFontSelectionDialog"/>
|
<glade-widget-class-ref name="GtkFontSelectionDialog"/>
|
||||||
|
<glade-widget-class-ref name="GtkInputDialog"/>
|
||||||
<glade-widget-class-ref name="GtkMessageDialog"/>
|
<glade-widget-class-ref name="GtkMessageDialog"/>
|
||||||
<glade-widget-class-ref name="GtkRecentChooserDialog"/>
|
<glade-widget-class-ref name="GtkRecentChooserDialog"/>
|
||||||
<glade-widget-class-ref name="GtkAssistant"/>
|
<glade-widget-class-ref name="GtkAssistant"/>
|
||||||
@ -3428,6 +3554,20 @@ embedded in another object</_tooltip>
|
|||||||
|
|
||||||
<glade-widget-class-ref name="GtkHRuler"/>
|
<glade-widget-class-ref name="GtkHRuler"/>
|
||||||
<glade-widget-class-ref name="GtkVRuler"/>
|
<glade-widget-class-ref name="GtkVRuler"/>
|
||||||
|
<glade-widget-class-ref name="GtkCurve"/>
|
||||||
|
<glade-widget-class-ref name="GtkGammaCurve"/>
|
||||||
|
<glade-widget-class-ref name="Custom"/>
|
||||||
</glade-widget-group>
|
</glade-widget-group>
|
||||||
|
|
||||||
|
<glade-widget-group name="gtk-obsolete" _title="Gtk+ Obsolete">
|
||||||
|
|
||||||
|
<default-palette-state expanded="False"/>
|
||||||
|
|
||||||
|
<glade-widget-class-ref name="GtkCombo"/>
|
||||||
|
<glade-widget-class-ref name="GtkOptionMenu"/>
|
||||||
|
<glade-widget-class-ref name="GtkList"/>
|
||||||
|
<glade-widget-class-ref name="GtkCList"/>
|
||||||
|
<glade-widget-class-ref name="GtkFileSelection"/>
|
||||||
|
<glade-widget-class-ref name="Custom"/>
|
||||||
|
</glade-widget-group>
|
||||||
</glade-catalog>
|
</glade-catalog>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
## Process this file with automake to produce Makefile.in
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
libgladeui = $(top_builddir)/gladeui/libgladeui-2.la
|
libgladeui = $(top_builddir)/gladeui/libgladeui-1.la
|
||||||
|
|
||||||
|
|
||||||
# libgladepython
|
# libgladepython
|
||||||
|