Compare commits
179 Commits
main
...
GTK_2_10_5
| Author | SHA1 | Date | |
|---|---|---|---|
| ee8628b3a6 | |||
| c246b5f740 | |||
| 43c3c79029 | |||
| 775539ef1d | |||
| e1447f1f95 | |||
| a122c33eda | |||
| 8bf4caf83c | |||
| 26366d713d | |||
| 60d34ea94f | |||
| f06c2a4daa | |||
| 9daaf9022b | |||
| d0a6ca795c | |||
| 6b6cbd183d | |||
| 4001a629d7 | |||
| 9660d080a4 | |||
| 5956de6e07 | |||
| a9dcd9f0a9 | |||
| 11cfcef2b5 | |||
| 3f7a54b141 | |||
| 48a616d351 | |||
| 101a718279 | |||
| 34b99286d5 | |||
| 8620115255 | |||
| 84742b9f0b | |||
| 63ef81fdc9 | |||
| 80d2f3ffc8 | |||
| 124473aa06 | |||
| 6fc802603e | |||
| a8d1216f40 | |||
| 4f481fd16a | |||
| 14ae061932 | |||
| 1363f15ffb | |||
| 1f09278371 | |||
| d322b8ee97 | |||
| 510e51ec63 | |||
| c6d7d38bfd | |||
| 2a9b1d0ec8 | |||
| cf6bf669f0 | |||
| d2b4ac86a8 | |||
| b84cd44c43 | |||
| 4c63cd580b | |||
| 7a66a31427 | |||
| 0e21c332c9 | |||
| 76b94bdffa | |||
| bb517d5994 | |||
| 1b970b5d1b | |||
| 641da23dbc | |||
| 166287cfa7 | |||
| 5919606776 | |||
| 4a2b65ba47 | |||
| a162b00071 | |||
| 716cc206ab | |||
| 8e61150ee6 | |||
| 1643096a72 | |||
| 0777d8b0f8 | |||
| 642bc4ea02 | |||
| 40c8c6e7d1 | |||
| cc8974213b | |||
| c6b51549a6 | |||
| c3a804c24b | |||
| 69eec539a0 | |||
| e3ab5e9c55 | |||
| 953750da7f | |||
| a743b14354 | |||
| 72d3fbc7c9 | |||
| 57b08805e3 | |||
| 3e2a24892a | |||
| a1eb50a2ab | |||
| da05f10d2d | |||
| 40fd8e6cc3 | |||
| aa08e0d9cc | |||
| 5af3a64c9e | |||
| 4dc8359235 | |||
| 5087ef4102 | |||
| 174da39bc4 | |||
| c9b15d54f9 | |||
| f2775b533c | |||
| 4ea89f0897 | |||
| a193fda540 | |||
| 746aed53f8 | |||
| 6cd79b7b8f | |||
| 72146b2f04 | |||
| 894a2429b9 | |||
| b956599653 | |||
| 18ae687952 | |||
| 773873d9e7 | |||
| 24b3f069bf | |||
| d667d39aa2 | |||
| 2fc7eb5f8b | |||
| c7fd94f84d | |||
| be92f481e8 | |||
| fd08669049 | |||
| ed167226a0 | |||
| 791828790a | |||
| 66fa3d512e | |||
| 37da199d52 | |||
| eba91c5800 | |||
| 90fae608af | |||
| 84a0d8c855 | |||
| 1e78692f9f | |||
| 5555e27619 | |||
| 0a07b6b912 | |||
| dfd717aacd | |||
| efa03b3777 | |||
| 4c841fdbf3 | |||
| 661fa8a11a | |||
| 1c5403b23e | |||
| 676cf00c82 | |||
| 2c52434bee | |||
| d893111cd7 | |||
| fa466a8dba | |||
| 6bcfa449c3 | |||
| 41e5a93efa | |||
| 3b887ee70a | |||
| 16ad4f3158 | |||
| 63165f9e76 | |||
| 4381382c31 | |||
| 4592936719 | |||
| b910aefe38 | |||
| d8605bd70a | |||
| f7572cc6ec | |||
| 28310575d4 | |||
| 1d7fcdaf6c | |||
| 90038e9f1b | |||
| 2902ac2b7b | |||
| 13e73a97eb | |||
| ca6415e2e5 | |||
| 3bfbc93228 | |||
| 001078df1e | |||
| 34199573d7 | |||
| 3dc068d85e | |||
| d86048284d | |||
| 91afef3a6e | |||
| 8b1ac94b61 | |||
| 7b984a6b13 | |||
| 2ca3e82651 | |||
| 585efae27e | |||
| 4180f905ac | |||
| 67373466d0 | |||
| 64c0648248 | |||
| 44356c97a6 | |||
| a60bbbd8c5 | |||
| 8140a1f0d0 | |||
| 02c8458ba9 | |||
| c4b0735767 | |||
| e130d50bdf | |||
| a203bebe44 | |||
| c4474c62c4 | |||
| f06a9cb837 | |||
| b12c1748d8 | |||
| 1e04b9eb04 | |||
| a033828c62 | |||
| b72141606f | |||
| e0e8a51964 | |||
| aa3340afa1 | |||
| 2f080857e0 | |||
| 78789a5e0a | |||
| ced0be686f | |||
| a66016df2c | |||
| c3b3696b5c | |||
| 3d99a27f0e | |||
| dc91cce4c2 | |||
| 4f9d9ef3bd | |||
| 2b343d143f | |||
| 2b0c63edda | |||
| fc092f6f08 | |||
| 482f74d636 | |||
| 063ff75ae5 | |||
| fdf9274476 | |||
| 809358f3fa | |||
| 152cb78d4d | |||
| 67b2f9bdac | |||
| f9f34aef79 | |||
| 12382e191a | |||
| 8dc75116e1 | |||
| 153bfe9617 | |||
| e3a70e1790 | |||
| 87fb4e55ba | |||
| 53c0a2e9e1 |
@@ -1,3 +1,373 @@
|
||||
2006-10-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.5 ===
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
* modules/printbackends/cups/gtkprintbackendcups.c (available_choices):
|
||||
Only use the group name field if cups is new enough. (#357280)
|
||||
|
||||
* gtk/gtksizegroup.c: Make sure that the quarks are
|
||||
initialized before using them. (#353736)
|
||||
|
||||
* gtk/Makefile.am (stamp-icons): Use rm instead of ln -f to
|
||||
replace existing links. (#354849, James Evans)
|
||||
|
||||
2006-10-01 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkexpander.c (gtk_expander_realize)
|
||||
(gtk_expander_size_allocate): Make the event_window large
|
||||
enough to cover the full height of the label_widget. (#358351,
|
||||
Scott Horowitz)
|
||||
|
||||
* gtk/gtktreeselection.c (gtk_tree_selection_get_selected_rows):
|
||||
Set model in all cases. (#357791, Andreas Köhler)
|
||||
|
||||
2006-10-01 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gtk/gtkfilesystemwin32.c: Same change as to gtkfilesystemunix.c.
|
||||
|
||||
2006-09-30 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilechooserbutton.c (update_combo_box): Protect
|
||||
against base_path being NULL. (#358405, many reporters)
|
||||
|
||||
2006-09-29 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilesystemunix.c: Apply a patch by Padraig O'Briain
|
||||
to avoid a deadlock.
|
||||
|
||||
2006-09-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkuimanager.c (_gtk_menu_is_empty): Don't leak
|
||||
the list of children (#357454, Paolo Borelli)
|
||||
|
||||
2006-09-25 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): free
|
||||
display->input_windows with g_free(), not g_object_unref()
|
||||
(#357566, Tommi Komulainen).
|
||||
|
||||
2006-09-23 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gtk/Makefile.am: Use EXEEXT.
|
||||
|
||||
2006-09-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Bump version
|
||||
|
||||
* === Released 2.10.4 ===
|
||||
|
||||
2006-09-22 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gtk/gtkstyle.c (gtk_style_real_copy): also copy icon factories
|
||||
and color hashes. Fixes bug #357132.
|
||||
|
||||
2006-09-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
2006-09-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Make remote bookmarks work better (#354887)
|
||||
String addition !
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (shortcuts_reload_icons):
|
||||
(shortcuts_insert_path):
|
||||
* gtk/gtkfilechooserbutton.c (change_icon_theme):
|
||||
(model_add_bookmarks):
|
||||
(model_update_current_folder):
|
||||
(update_label_and_image):
|
||||
If the bookmark points to a remote file, don't call get_info(),
|
||||
since that may a) take a long time and b) pop up an auth dialog.
|
||||
Instead, just use a folder icon and create a display name
|
||||
from the uri.
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (_gtk_file_chooser_label_for_uri):
|
||||
New function to create a suitable display name for a remote
|
||||
uri. This should really be done in GtkFileSystem.
|
||||
|
||||
2006-09-20 Behnam Esfahbod <behnam@zwnj.org>
|
||||
|
||||
* gdk/x11/gdkkeys-x11.c:
|
||||
(get_direction): just check the first shift-level of keyboard
|
||||
layout for RTL and LTR keysyms() (compliment to #116626)
|
||||
|
||||
2006-09-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
|
||||
Display an error when we come to the root.
|
||||
|
||||
2006-09-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilechooserbutton.c: Use bookmark labels in
|
||||
the combobox.
|
||||
|
||||
2006-09-16 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilechooserbutton.c: Don't add remote volumes and
|
||||
bookmarks to the model in local-only mode, to avoid
|
||||
authentication dialogs pop up for invisible bookmarks, and
|
||||
to fix issues with separators not being hidden when
|
||||
they should. (#354887, Dennis Cranston)
|
||||
|
||||
* gtk/gtkcombobox.c (gtk_combo_box_finalize): Unref the
|
||||
treeview use in list mode. (#355732, Richard Hult)
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_set_grid_lines): Send
|
||||
change notification for the right property. (#355308,
|
||||
Torsten Schoenfeld)
|
||||
|
||||
2006-09-13 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkcolorsel.c: Use a GtkWindow instead of a GtkInvisible
|
||||
for the grab widget, to make the color picker work with window
|
||||
groups.
|
||||
|
||||
2006-09-12 Hong Jen Yee <pcman.tw@gmail.com>
|
||||
|
||||
signed off by: Dom Lachowicz
|
||||
|
||||
* modules/engines/ms-windows/msw_style.c: Bug 340201. This contains
|
||||
a large number of improvements to the Microsoft Windows theme engine
|
||||
which are fully described in the bug report.
|
||||
|
||||
2006-09-10 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilechooserbutton.c (model_add_special): Request
|
||||
the display name too, otherwise "Desktop" does not appear
|
||||
in the file chooser button.
|
||||
|
||||
* Commit a patch by Behdad to fix typos, omissions and other
|
||||
errors in the symbol aliasing, and add checks for local PLT
|
||||
entries. (#354687, Behdad Esfahbod)
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_search_scroll_event): Renew
|
||||
the flush timeout. (#354043, Nelson Benitez)
|
||||
|
||||
* gtk/paper_names_offsets.c: Fix a typo. String change! (#355134,
|
||||
David Lodge)
|
||||
|
||||
2006-09-09 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/x11/gdkfonts-x11.c: Fix small theoretical memory leaks.
|
||||
(#353916, Chris Wilson)
|
||||
|
||||
* gtk/gtksettings.c (_gtk_settings_reset_rc_values):
|
||||
Don't leak the to_reset list. (#353914, Chris Wilson)
|
||||
|
||||
* gtk/gtkentry.c: Don't unnecessarily reset the im context
|
||||
when deleting the selection. (#353803, Alex Larsson)
|
||||
|
||||
* gtk/gtkwidget.c: Add docs for the parent-set signal.
|
||||
(#353772, Mariano Suárez-Alvarez)
|
||||
|
||||
2006-09-08 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtktextbuffer.c (remove_all_selection_clipboards):
|
||||
Don't clear clipboards here, since we are called from finalize
|
||||
and can't emit signals.
|
||||
|
||||
2006-09-06 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilesystemwin32.c: Copy what Kris did to
|
||||
gtkfilesystemunix.c
|
||||
|
||||
2006-09-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* configure.in: Bump version
|
||||
|
||||
* === Released 2.10.3 ===
|
||||
|
||||
* NEWS: Updates
|
||||
|
||||
2006-09-04 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (update_current_folder_get_info_cb):
|
||||
if setting the given folder failed, try setting the parent folder
|
||||
until we succeed; display an error box at the end.
|
||||
|
||||
2006-09-04 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkpathbar.c (gtk_path_bar_dispose): don't cancel the
|
||||
operations spawned by buttons here,
|
||||
(set_button_image_get_info_cb): bail out if button is NULL, but
|
||||
do free button_data,
|
||||
(button_data_free): only free the data if non NULL (since this
|
||||
function can be called multiple times for the same data), cancel
|
||||
handle if pending but don't free button_data in this case (will
|
||||
happen in the callback).
|
||||
|
||||
2006-09-04 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (save_entry_get_info_cb),
|
||||
(file_exists_get_info_cb), (gtk_file_chooser_default_should_respond):
|
||||
change file_exists_and_is_not_folder checks to get the file info
|
||||
for the path directly instead of querying the current file folder
|
||||
of the save entry.
|
||||
|
||||
* gtk/gtkfilechooserprivate.h (struct _GtkFileChooserDefault): add
|
||||
new field.
|
||||
|
||||
* tests/autotestfilechooser.c (wait_for_idle_idle), (wait_for_idle),
|
||||
(test_reload_sequence), (test_button_folder_states_for_action): wait
|
||||
for idle after setting a folder to ensure the async operations to load
|
||||
the folder are finished,
|
||||
(test_confirm_overwrite), (test_confirm_overwrite_for_path):
|
||||
factor out test_confirm_overwrite code so we can add tests for more
|
||||
paths more easily.
|
||||
|
||||
2006-09-04 Kristian Rietveld <kris@imendio.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
First part of file chooser fixes.
|
||||
|
||||
* gtk/gtkfilechooserbutton.c (model_add_special): also set the
|
||||
handle in the model for the desktopdir case.
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (shortcuts_add_current_folder): free
|
||||
volume in case we retrieved it but don't pass it on to insert_path,
|
||||
(shortcuts_model_create): change the column type for the handles
|
||||
to pointer instead of GObject so our handle ref counting is not
|
||||
disturbed,
|
||||
(show_and_select_paths_finished_loading): don't forget to unref
|
||||
the dialog.
|
||||
|
||||
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_class_init),
|
||||
(gtk_file_system_unix_init), (gtk_file_system_unix_dispose):
|
||||
remove pending execute_callbacks_idle during dispose, also
|
||||
execute all callbacks waiting to be run in the next idle,
|
||||
(queue_*callback), (execute_callbacks_idle): refactor to maintain
|
||||
a list of callbacks to call per file system instead of globally,
|
||||
guard the file system during callback invocation,
|
||||
(gtk_file_system_unix_get_folder): only add load folder idle if
|
||||
none has been added yet.
|
||||
|
||||
2006-09-04 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtkrc.c (rc_parse_token_or_compound)
|
||||
(gtk_rc_parse_assignment): serialize floating point values using
|
||||
locale-independent functions. (#346751, Frederic Crozat)
|
||||
|
||||
2006-09-03 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_class_init): Fix a typo.
|
||||
(#354035, Mariano Suárez-Alvarez)
|
||||
|
||||
* gtk/gtkmain.c (post_parse_hook):
|
||||
* gdk/gdk.c (gdk_init): Handle display_name being NULL.
|
||||
(#354004, Chris Wilson)
|
||||
|
||||
2006-09-01 Abel Cheung <abel@oaka.org>
|
||||
|
||||
* configure.in: Added 'ang' 'dz' to ALL_LINGUAS.
|
||||
|
||||
2006-08-31 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* modules/printbackends/cups/gtkprintbackendcups.c (cups_request_printer_list_cb): Send printer-list-done on error.
|
||||
|
||||
2006-08-29 Emmanuele Bassi <ebassi@gnome.org>
|
||||
|
||||
Backport from HEAD
|
||||
|
||||
* gtk/gtkrecentchoosermenu.c
|
||||
(gtk_recent_chooser_menu_set_current_uri): Break when an item
|
||||
is found and activated. (#353449, based on a patch from Jan Arne
|
||||
Petersen)
|
||||
|
||||
2006-08-29 Paolo Borelli <pborelli@katamail.com>
|
||||
|
||||
* tests/autotestfilesystem.c: add this file from HEAD to fix
|
||||
the build.
|
||||
|
||||
2006-08-28 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* modules/printbackend/cups/gtkprintbackendcups.c: Use a
|
||||
resonable timeout of 3 seconds when polling for printer
|
||||
list updates, instead of 300000 seconds...
|
||||
|
||||
2006-08-28 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
Merged from HEAD:
|
||||
|
||||
* gtk/gtktextbufferserialize.c (serialize_text): don't write out
|
||||
</apply_tag> for tags that have already been closed by the logic
|
||||
which turns overlapping spans into XML-able trees. Fixes broken
|
||||
XML when there are overlapping tags in the buffer. Also free two
|
||||
leaked GLists and did some cleanup.
|
||||
|
||||
* tests/Makefile.am
|
||||
* tests/testrichtext.c: new test which creates randomly tagged
|
||||
GtkTextBuffers and serializes/deserializes them.
|
||||
|
||||
2006-08-26 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkstatusicon.c (gtk_status_icon_reset_image_data):
|
||||
Don't leak pixbufs. (#352264, Ross Burton)
|
||||
|
||||
* gtk/gtklinkbutton.c (set_link_underline): Don't leak
|
||||
PangoAttributes. (#352391, Paolo Borelli)
|
||||
|
||||
2006-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* demos/gtk-demo/Makefile.am:
|
||||
* demos/gtk-demo/textscroll.c: Add an example of automatic
|
||||
scrolling, thanks to Yevgen Muntyan. (#351206)
|
||||
|
||||
2006-08-23 Federico Mena Quintero <federico@novell.com>
|
||||
|
||||
* gtk/gtkfilesystem.[ch] (_gtk_file_system_create): Renamed to
|
||||
gtk_file_system_create() so that it will get exported and we can
|
||||
use it in the test program.
|
||||
|
||||
* gtk/gtk.symbols: Added gtk_file_system_create.
|
||||
|
||||
* gtk/gtkfilechooserdefault.c (set_file_system_backend): Use
|
||||
gtk_file_system_create().
|
||||
|
||||
* tests/autotestfilesystem.c: New file with automatic tests for
|
||||
the async callbacks and cancelation policy of GtkFileSystem.
|
||||
|
||||
* tests/Makefile.am: Added autotestfilesystem.
|
||||
|
||||
2006-08-23 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkprinteroptionwidget.[hc]: Fix confusion about
|
||||
names and values in comboboxes, and clean up some
|
||||
coding style issues.
|
||||
|
||||
2006-08-23 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* gtk/gtkfilesystemwin32.c (gtk_file_system_win32_make_path):
|
||||
Revert unintended translatable string addition. Use same string
|
||||
in GError as in gtkfilesystemunix.c.
|
||||
|
||||
* gtk/gtkfilesystemwin32.c (_gtk_file_system_win32_path_compare):
|
||||
Fix logic at the end of strings.
|
||||
|
||||
* gtk/gtkfilesystemwin32.c: Maintain a hash table of live
|
||||
handles and check that we have no outstanding handles at
|
||||
finalization time. (Copying what Matthias did for
|
||||
gtkfilesystemunix.c)
|
||||
|
||||
2006-08-23 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkfilesystemunix.c: Maintain a hash table
|
||||
of live handles and check that we have no outstanding
|
||||
handles at finalization time. (Copying what
|
||||
Federico did for gtkfilesystemgnomevfs.c)
|
||||
|
||||
2006-08-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* Branch for 2.10
|
||||
|
||||
@@ -4,7 +4,7 @@ Prerequisites
|
||||
GTK+ requires the following packages:
|
||||
|
||||
- The GLib, Pango, ATK and cairo libraries, available at the same
|
||||
location as GTK+. GTK+ 2.10.2 requires at least GLib 2.12,
|
||||
location as GTK+. GTK+ 2.10.5 requires at least GLib 2.12,
|
||||
Pango 1.13, ATK 1.9 and cairo 1.2.
|
||||
|
||||
- The TIFF, PNG, and JPEG image loading libraries. You most
|
||||
@@ -18,8 +18,8 @@ GTK+ requires the following packages:
|
||||
Simple install procedure
|
||||
========================
|
||||
|
||||
% gzip -cd gtk+-2.10.2.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.10.2 # change to the toplevel directory
|
||||
% gzip -cd gtk+-2.10.5.tar.gz | tar xvf - # unpack the sources
|
||||
% cd gtk+-2.10.5 # change to the toplevel directory
|
||||
% ./configure # run the `configure' script
|
||||
% make # build GTK+
|
||||
[ Become root if necessary ]
|
||||
|
||||
@@ -1,3 +1,81 @@
|
||||
Overview of Changes from GTK+ 2.10.4 to 2.10.5
|
||||
==============================================
|
||||
|
||||
* Bugs fixed:
|
||||
358405 gtk_file_chooser_button_new
|
||||
353736 crash in Document Viewer: I had just viewed the pr...
|
||||
354849 Unable to build gtk+ under Solaris 9
|
||||
357280 Compile crashes
|
||||
357454 leak in _gtk_menu_is_empty()
|
||||
357566 [x11] Invalid unref for input windows
|
||||
357791 gtk_tree_selection_get_selected_rows does not always fill model
|
||||
358351 expander with multi-line label doesn't properly respond to mouse
|
||||
|
||||
* Updated translations (dz,et,gl,ka)
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.10.3 to 2.10.4
|
||||
==============================================
|
||||
|
||||
* GtkFileChooser works better with remote bookmarks
|
||||
|
||||
* Windows theme engine improvements
|
||||
|
||||
* Bugs fixed:
|
||||
116626 Use keyboard map contents to detect RTL groups
|
||||
353772 Add doc blurb for GtkWidget::parent-set
|
||||
353803 GtkEntry unneccesarily resets im context at commit
|
||||
353914 Leak of to_reset list from _gtk_settings_reset_rc_values
|
||||
354043 Renew the typeahead search timeout when using scrollwheel
|
||||
354687 PLT-reduction stuff not quite working
|
||||
354887 GtkFileChooserButton displays unnecessary authentication
|
||||
dialogs
|
||||
355308 gtk_tree_view_set_grid_lines notifies wrong property
|
||||
355732 Combobox leaks treeview in list mode
|
||||
355134 Type in string
|
||||
355961 Typo in documentation for GtkPrintContext
|
||||
340201 Enhancement of Wimp theme engine.
|
||||
357132 Setting an RGBA colormap using gtk_widget_set_colormap()
|
||||
on any widget at application start (before other widgets
|
||||
are used) causes the running app to revert to the stock
|
||||
icon theme
|
||||
|
||||
* Updated translations (bg,bn,bn_IN,de,dz,el,
|
||||
en_GB,et,fi,gu,hi,id,ka,lt,lv,mk,nb,nl,nn,or,
|
||||
ru,sl,sv,ta,th)
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.10.2 to 2.10.3
|
||||
==============================================
|
||||
|
||||
* GtkFileChooser:
|
||||
- Fix several Win32-specific problems
|
||||
- Add automated tests for GtkFileSystem
|
||||
- Make overwrite confirmation work again
|
||||
|
||||
* Printing support:
|
||||
- Fix confusion between names and values in combo boxes
|
||||
- Poll for printer list updates in the cups backend
|
||||
|
||||
* Add an automatic scrolling example to gtk-demo
|
||||
|
||||
* Bugs fixed:
|
||||
354004 Use of g_warning("%s", NULL) after failing to
|
||||
open a display
|
||||
346751 symbolic colors can't be use in properties
|
||||
352264 gtk_status_icon_set_from_pixbuf leaks the old
|
||||
pixbuf
|
||||
352391 small link button leak
|
||||
353449 A break is missing in
|
||||
gtk_recent_chooser_menu_set_current_uri
|
||||
329604 do not scroll on copy to clipboard
|
||||
354035 Typo in the GtkWidget::drag-drop doc blurb
|
||||
|
||||
* Translation updates (ang,bn_IN,ca,de,dz,el,eu,fi,
|
||||
fr,hi,hu,it,ja,lt,ml,mr,nn,or,pl,pt_BR,ro,ru,sl,
|
||||
sr,sr@Latn,sv,ta,th,tr,vi,zh_CN,zh_HK,zh_TW)
|
||||
|
||||
|
||||
Overview of Changes from GTK+ 2.10.1 to 2.10.2
|
||||
==============================================
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
General Information
|
||||
===================
|
||||
|
||||
This is GTK+ version 2.10.2. GTK+ is a multi-platform toolkit for
|
||||
This is GTK+ version 2.10.5. GTK+ is a multi-platform toolkit for
|
||||
creating graphical user interfaces. Offering a complete set of widgets,
|
||||
GTK+ is suitable for projects ranging from small one-off projects to
|
||||
complete application suites.
|
||||
|
||||
+3
-3
@@ -12,10 +12,10 @@ AC_PREREQ(2.54)
|
||||
|
||||
m4_define([gtk_major_version], [2])
|
||||
m4_define([gtk_minor_version], [10])
|
||||
m4_define([gtk_micro_version], [3])
|
||||
m4_define([gtk_micro_version], [5])
|
||||
m4_define([gtk_version],
|
||||
[gtk_major_version.gtk_minor_version.gtk_micro_version])
|
||||
m4_define([gtk_interface_age], [3])
|
||||
m4_define([gtk_interface_age], [5])
|
||||
m4_define([gtk_binary_age],
|
||||
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
|
||||
# This is the X.Y used in -lgtk-FOO-X.Y
|
||||
@@ -469,7 +469,7 @@ fi
|
||||
# sure that both po/ and po-properties/ have .po files that correspond
|
||||
# to your language. If you only add one to po/, the build will break
|
||||
# in po-properties/.
|
||||
ALL_LINGUAS="af am ar az az_IR be bg bn bn_IN br bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu hy ia id is it ja ka ko ku li lt lv mi mk ml mn mr ms nb ne nl nn nso or pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sr@ije sv ta te th tk tr tt uk ur uz uz@Latn vi wa xh yi zh_CN zh_HK zh_TW"
|
||||
ALL_LINGUAS="af am ang ar az az_IR be bg bn bn_IN br bs ca cs cy da de dz el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu hy ia id is it ja ka ko ku li lt lv mi mk ml mn mr ms nb ne nl nn nso or pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sr@ije sv ta te th tk tr tt uk ur uz uz@Latn vi wa xh yi zh_CN zh_HK zh_TW"
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
LIBS="$LIBS $INTLLIBS"
|
||||
AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
2006-10-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.5 ===
|
||||
|
||||
2006-09-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.4 ===
|
||||
|
||||
2006-09-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.3 ===
|
||||
|
||||
2006-08-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.2 ===
|
||||
|
||||
@@ -31,6 +31,7 @@ demos = \
|
||||
sizegroup.c \
|
||||
stock_browser.c \
|
||||
textview.c \
|
||||
textscroll.c \
|
||||
tree_store.c \
|
||||
ui_manager.c
|
||||
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
/* Text Widget/Automatic scrolling
|
||||
*
|
||||
* This example demonstrates how to use the gravity of
|
||||
* GtkTextMarks to keep a text view scrolled to the bottom
|
||||
* while appending text.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "demo-common.h"
|
||||
|
||||
/* Scroll to the end of the buffer.
|
||||
*/
|
||||
static gboolean
|
||||
scroll_to_end (GtkTextView *textview)
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter iter;
|
||||
GtkTextMark *mark;
|
||||
char *spaces;
|
||||
static int count;
|
||||
|
||||
buffer = gtk_text_view_get_buffer (textview);
|
||||
|
||||
/* Get "end" mark. It's located at the end of buffer because
|
||||
* of right gravity
|
||||
*/
|
||||
mark = gtk_text_buffer_get_mark (buffer, "end");
|
||||
gtk_text_buffer_get_iter_at_mark (buffer, &iter, mark);
|
||||
|
||||
/* and insert some text at its position, the iter will be
|
||||
* revalidated after insertion to point to the end of inserted text
|
||||
*/
|
||||
spaces = g_strnfill (count++, ' ');
|
||||
gtk_text_buffer_insert (buffer, &iter, "\n", -1);
|
||||
gtk_text_buffer_insert (buffer, &iter, spaces, -1);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"Scroll to end scroll to end scroll "
|
||||
"to end scroll to end ",
|
||||
-1);
|
||||
g_free (spaces);
|
||||
|
||||
/* Now scroll the end mark onscreen.
|
||||
*/
|
||||
gtk_text_view_scroll_mark_onscreen (textview, mark);
|
||||
|
||||
/* Emulate typewriter behavior, shift to the left if we
|
||||
* are far enough to the right.
|
||||
*/
|
||||
if (count > 150)
|
||||
count = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Scroll to the bottom of the buffer.
|
||||
*/
|
||||
static gboolean
|
||||
scroll_to_bottom (GtkTextView *textview)
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter iter;
|
||||
GtkTextMark *mark;
|
||||
char *spaces;
|
||||
static int count;
|
||||
|
||||
buffer = gtk_text_view_get_buffer (textview);
|
||||
|
||||
/* Get end iterator */
|
||||
gtk_text_buffer_get_end_iter (buffer, &iter);
|
||||
|
||||
/* and insert some text at it, the iter will be revalidated
|
||||
* after insertion to point to the end of inserted text
|
||||
*/
|
||||
spaces = g_strnfill (count++, ' ');
|
||||
gtk_text_buffer_insert (buffer, &iter, "\n", -1);
|
||||
gtk_text_buffer_insert (buffer, &iter, spaces, -1);
|
||||
gtk_text_buffer_insert (buffer, &iter,
|
||||
"Scroll to bottom scroll to bottom scroll "
|
||||
"to bottom scroll to bottom",
|
||||
-1);
|
||||
g_free (spaces);
|
||||
|
||||
/* Move the iterator to the beginning of line, so we don't scroll
|
||||
* in horizontal direction
|
||||
*/
|
||||
gtk_text_iter_set_line_offset (&iter, 0);
|
||||
|
||||
/* and place the mark at iter. the mark will stay there after we
|
||||
* insert some text at the end because it has right gravity.
|
||||
*/
|
||||
mark = gtk_text_buffer_get_mark (buffer, "scroll");
|
||||
gtk_text_buffer_move_mark (buffer, mark, &iter);
|
||||
|
||||
/* Scroll the mark onscreen.
|
||||
*/
|
||||
gtk_text_view_scroll_mark_onscreen (textview, mark);
|
||||
|
||||
/* Shift text back if we got enough to the right.
|
||||
*/
|
||||
if (count > 40)
|
||||
count = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static guint
|
||||
setup_scroll (GtkTextView *textview,
|
||||
gboolean to_end)
|
||||
{
|
||||
GtkTextBuffer *buffer;
|
||||
GtkTextIter iter;
|
||||
GtkTextMark *mark;
|
||||
|
||||
buffer = gtk_text_view_get_buffer (textview);
|
||||
gtk_text_buffer_get_end_iter (buffer, &iter);
|
||||
|
||||
if (to_end)
|
||||
{
|
||||
/* If we want to scroll to the end, including horizontal scrolling,
|
||||
* then we just create a mark with right gravity at the end of the
|
||||
* buffer. It will stay at the end unless explicitely moved with
|
||||
* gtk_text_buffer_move_mark.
|
||||
*/
|
||||
gtk_text_buffer_create_mark (buffer, "end", &iter, FALSE);
|
||||
|
||||
/* Add scrolling timeout. */
|
||||
return g_timeout_add (50, (GSourceFunc) scroll_to_end, textview);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If we want to scroll to the bottom, but not scroll horizontally,
|
||||
* then an end mark won't do the job. Just create a mark so we can
|
||||
* use it with gtk_text_view_scroll_mark_onscreen, we'll position it
|
||||
* explicitely when needed. Use left gravity so the mark stays where
|
||||
* we put it after inserting new text.
|
||||
*/
|
||||
gtk_text_buffer_create_mark (buffer, "scroll", &iter, TRUE);
|
||||
|
||||
/* Add scrolling timeout. */
|
||||
return g_timeout_add (100, (GSourceFunc) scroll_to_bottom, textview);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
remove_timeout (GtkWidget *window,
|
||||
gpointer timeout)
|
||||
{
|
||||
g_source_remove (GPOINTER_TO_UINT (timeout));
|
||||
}
|
||||
|
||||
static void
|
||||
create_text_view (GtkWidget *hbox,
|
||||
gboolean to_end)
|
||||
{
|
||||
GtkWidget *swindow;
|
||||
GtkWidget *textview;
|
||||
guint timeout;
|
||||
|
||||
swindow = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_box_pack_start_defaults (GTK_BOX (hbox), swindow);
|
||||
textview = gtk_text_view_new ();
|
||||
gtk_container_add (GTK_CONTAINER (swindow), textview);
|
||||
|
||||
timeout = setup_scroll (GTK_TEXT_VIEW (textview), to_end);
|
||||
|
||||
/* Remove the timeout in destroy handler, so we don't try to
|
||||
* scroll destroyed widget.
|
||||
*/
|
||||
g_signal_connect (textview, "destroy",
|
||||
G_CALLBACK (remove_timeout),
|
||||
GUINT_TO_POINTER (timeout));
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_textscroll (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *swindow;
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
|
||||
hbox = gtk_hbox_new (TRUE, 6);
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
|
||||
create_text_view (hbox, TRUE);
|
||||
create_text_view (hbox, FALSE);
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_VISIBLE (window))
|
||||
gtk_widget_show_all (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -1,3 +1,26 @@
|
||||
2006-10-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.5 ===
|
||||
|
||||
2006-09-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.4 ===
|
||||
|
||||
2006-09-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/tmpl/gtkprintcontext.sgml:
|
||||
* gtk/tmpl/gtkpagesetup.sgml: Apply a patch
|
||||
to fix some typos. (#355961, Claudio Saavedra)
|
||||
|
||||
2006-09-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.3 ===
|
||||
|
||||
2006-08-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/question_index.sgml: Rewrite the answer for
|
||||
automatic scrolling.
|
||||
|
||||
2006-08-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.2 ===
|
||||
|
||||
@@ -757,18 +757,21 @@ How do I make a text view scroll to the end of the buffer automatically ?
|
||||
|
||||
<answer>
|
||||
<para>
|
||||
The "insert" <link linkend="GtkTextMark">mark</link> marks the insertion point
|
||||
where gtk_text_buffer_insert() inserts new text into the buffer. The text is inserted
|
||||
<emphasis>before</emphasis> the "insert" mark, so that it generally stays
|
||||
at the end of the buffer. If it gets explicitly moved to some other position,
|
||||
e.g. when the user selects some text, use gtk_text_buffer_move_mark() to set it to
|
||||
the desired location before inserting more text. The "insert" mark of a buffer can be
|
||||
obtained with gtk_text_buffer_get_insert().
|
||||
A good way to keep a text buffer scrolled to the end is to place a
|
||||
<link linkend="GtkTextMark">mark</link> at the end of the buffer, and
|
||||
give it right gravity. The gravity has the effect that text inserted
|
||||
at the mark gets inserted <emphasis>before</emphasis>, keeping the mark
|
||||
at the end.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To ensure that the end of the buffer remains visible, use
|
||||
gtk_text_view_scroll_to_mark() to scroll to the "insert" mark after inserting new text.
|
||||
gtk_text_view_scroll_to_mark() to scroll to the mark after
|
||||
inserting new text.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The gtk-demo application contains an example of this technique.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
|
||||
@@ -8,7 +8,7 @@ Stores page setup information
|
||||
<para>
|
||||
A GtkPageSetup object stores the page size, orientation and margins.
|
||||
The idea is that you can get one of these from the page setup dialog
|
||||
and then pass it to the #GtkPrittntOperation when printing.
|
||||
and then pass it to the #GtkPrintOperation when printing.
|
||||
The benefit of splitting this out of the #GtkPrintSettings is that
|
||||
these affect the actual layout of the page, and thus need to be set
|
||||
long before user prints.
|
||||
|
||||
@@ -29,7 +29,7 @@ draw_page (GtkPrintOperation *operation,
|
||||
PangoLayout *layout;
|
||||
PangoFontDescription *desc;
|
||||
|
||||
cr = gtk_print_context_get_cairo (context);
|
||||
cr = gtk_print_context_get_cairo_context (context);
|
||||
|
||||
/* Draw a red rectangle, as wide as the paper (inside the margins) */
|
||||
cairo_set_source_rgb (cr, 1.0, 0, 0);
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
2006-10-02 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.5 ===
|
||||
|
||||
2006-09-22 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.4 ===
|
||||
|
||||
2006-09-06 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* io-pnm.c: Simplify and fix reading of ASCII images.
|
||||
|
||||
2006-09-04 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.3 ===
|
||||
|
||||
2006-08-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.10.2 ===
|
||||
|
||||
@@ -50,7 +50,7 @@ gdk-pixbuf-aliasdef.c: gdk-pixbuf.symbols
|
||||
$(PERL) $(srcdir)/makegdkpixbufalias.pl -def < $(srcdir)/gdk-pixbuf.symbols > gdk-pixbuf-aliasdef.c
|
||||
|
||||
if OS_LINUX
|
||||
TESTS = abicheck.sh
|
||||
TESTS = abicheck.sh pltcheck.sh
|
||||
endif
|
||||
|
||||
lib_LTLIBRARIES = \
|
||||
@@ -273,7 +273,6 @@ INCLUDES = \
|
||||
-DGTK_SYSCONFDIR=\"$(sysconfdir)\" \
|
||||
-DGTK_VERSION=\"$(GTK_VERSION)\" \
|
||||
-DGTK_BINARY_VERSION=\"$(GTK_BINARY_VERSION)\" \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGTK_PREFIX=\"$(prefix)\" \
|
||||
$(INCLUDED_LOADER_DEFINE) \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
@@ -433,6 +432,7 @@ EXTRA_DIST = \
|
||||
gdk-pixbuf.symbols \
|
||||
makegdkpixbufalias.pl \
|
||||
abicheck.sh \
|
||||
pltcheck.sh \
|
||||
gdk_pixbuf.def \
|
||||
gdk_pixbuf.rc \
|
||||
gdk-pixbuf-marshal.c \
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
cpp -DINCLUDE_VARIABLES -P -DALL_FILES ${srcdir:-.}/gdk-pixbuf.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE$//' | sort > expected-abi
|
||||
nm -D -g --defined-only .libs/libgdk_pixbuf-2.0.so | cut -d ' ' -f 3 | sort > actual-abi
|
||||
diff -u expected-abi actual-abi && rm expected-abi actual-abi
|
||||
diff -u expected-abi actual-abi && rm -f expected-abi actual-abi
|
||||
|
||||
@@ -2277,7 +2277,3 @@ gdk_pixbuf_get_formats (void)
|
||||
|
||||
#define __GDK_PIXBUF_IO_C__
|
||||
#include "gdk-pixbuf-aliasdef.c"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
#define GDK_PIXBUF_COMPILATION
|
||||
#include "gdk-pixbuf.h"
|
||||
#include "gdk-pixbuf-private.h"
|
||||
/* Include the marshallers */
|
||||
#include <glib-object.h>
|
||||
#include "gdk-pixbuf-marshal.c"
|
||||
#include "gdk-pixbuf-alias.h"
|
||||
|
||||
static void gdk_pixbuf_finalize (GObject *object);
|
||||
@@ -753,11 +756,5 @@ gdk_pixbuf_get_property (GObject *object,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Include the marshallers */
|
||||
#include <glib-object.h>
|
||||
#include "gdk-pixbuf-marshal.c"
|
||||
|
||||
#define __GDK_PIXBUF_C__
|
||||
#include "gdk-pixbuf-aliasdef.c"
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include "gdk-pixdata.h"
|
||||
|
||||
#include "gdk-pixbuf-private.h"
|
||||
#include "gdk-pixdata.h"
|
||||
#include "gdk-pixbuf-alias.h"
|
||||
#include <string.h>
|
||||
|
||||
|
||||
+67
-82
@@ -527,109 +527,90 @@ pnm_read_raw_scanline (PnmLoaderContext *context)
|
||||
}
|
||||
|
||||
static gint
|
||||
pnm_read_ascii_scanline (PnmLoaderContext *context)
|
||||
pnm_read_ascii_mono_scanline (PnmLoaderContext *context)
|
||||
{
|
||||
PnmIOBuffer *inbuf;
|
||||
guint offset;
|
||||
guint value, numval, i;
|
||||
guchar data;
|
||||
guchar mask;
|
||||
guint value;
|
||||
gint retval;
|
||||
guchar *dptr;
|
||||
gint max_length;
|
||||
|
||||
if (context->type == PNM_FORMAT_PBM)
|
||||
max_length = 1;
|
||||
else
|
||||
max_length = -1;
|
||||
|
||||
inbuf = &context->inbuf;
|
||||
|
||||
context->dptr = context->pixels + context->output_row * context->rowstride;
|
||||
|
||||
dptr = context->dptr + context->output_col * 3;
|
||||
|
||||
while (TRUE) {
|
||||
retval = pnm_read_next_value (inbuf, max_length, &value, context->error);
|
||||
if (retval != PNM_OK)
|
||||
return retval;
|
||||
|
||||
if (context->type == PNM_FORMAT_PBM) {
|
||||
value = value ? 0 : 0xff;
|
||||
}
|
||||
else {
|
||||
/* scale the color up or down to an 8-bit color depth */
|
||||
if (value > context->maxval)
|
||||
value = 255;
|
||||
else
|
||||
value = (guchar)(255 * value / context->maxval);
|
||||
}
|
||||
|
||||
*dptr++ = value;
|
||||
*dptr++ = value;
|
||||
*dptr++ = value;
|
||||
|
||||
context->output_col++;
|
||||
|
||||
if (context->output_col == context->width) {
|
||||
context->output_col = 0;
|
||||
context->output_row++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return PNM_OK;
|
||||
}
|
||||
|
||||
static gint
|
||||
pnm_read_ascii_color_scanline (PnmLoaderContext *context)
|
||||
{
|
||||
PnmIOBuffer *inbuf;
|
||||
guint value, i;
|
||||
guchar *dptr;
|
||||
gint retval;
|
||||
gint max_length;
|
||||
|
||||
g_return_val_if_fail (context != NULL, PNM_FATAL_ERR);
|
||||
|
||||
data = mask = 0;
|
||||
|
||||
inbuf = &context->inbuf;
|
||||
|
||||
context->dptr = context->pixels + context->output_row * context->rowstride;
|
||||
|
||||
switch (context->type) {
|
||||
case PNM_FORMAT_PBM:
|
||||
max_length = 1;
|
||||
numval = MIN (8, context->width - context->output_col);
|
||||
offset = context->output_col / 8;
|
||||
break;
|
||||
case PNM_FORMAT_PGM:
|
||||
max_length = -1;
|
||||
numval = 1;
|
||||
offset = context->output_col;
|
||||
break;
|
||||
case PNM_FORMAT_PPM:
|
||||
max_length = -1;
|
||||
numval = 3;
|
||||
offset = context->output_col * 3;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_set_error (context->error,
|
||||
GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
||||
_("PNM image format is invalid"));
|
||||
|
||||
return PNM_FATAL_ERR;
|
||||
}
|
||||
|
||||
dptr = context->dptr + offset + context->scan_state;
|
||||
dptr = context->dptr + context->output_col * 3 + context->scan_state;
|
||||
|
||||
while (TRUE) {
|
||||
if (context->type == PNM_FORMAT_PBM) {
|
||||
mask = 0x80;
|
||||
data = 0;
|
||||
numval = MIN (8, context->width - context->output_col);
|
||||
}
|
||||
|
||||
for (i = context->scan_state; i < numval; i++) {
|
||||
retval = pnm_read_next_value (inbuf, max_length,
|
||||
&value, context->error);
|
||||
for (i = context->scan_state; i < 3; i++) {
|
||||
retval = pnm_read_next_value (inbuf, -1, &value, context->error);
|
||||
if (retval != PNM_OK) {
|
||||
/* save state and return */
|
||||
context->scan_state = i;
|
||||
return retval;
|
||||
}
|
||||
|
||||
switch (context->type) {
|
||||
case PNM_FORMAT_PBM:
|
||||
if (value)
|
||||
data |= mask;
|
||||
mask >>= 1;
|
||||
|
||||
break;
|
||||
case PNM_FORMAT_PGM:
|
||||
case PNM_FORMAT_PPM:
|
||||
/* scale the color up or down to an 8-bit color depth */
|
||||
if (value > context->maxval)
|
||||
*dptr++ = 255;
|
||||
else
|
||||
*dptr++ = (guchar)(255 * value / context->maxval);
|
||||
break;
|
||||
default:
|
||||
g_set_error (context->error,
|
||||
GDK_PIXBUF_ERROR,
|
||||
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
|
||||
_("PNM image format is invalid"));
|
||||
return PNM_FATAL_ERR;
|
||||
break;
|
||||
}
|
||||
if (value > context->maxval)
|
||||
*dptr++ = 255;
|
||||
else
|
||||
*dptr++ = (guchar)(255 * value / context->maxval);
|
||||
}
|
||||
|
||||
context->scan_state = 0;
|
||||
|
||||
if (context->type == PNM_FORMAT_PBM) {
|
||||
*dptr++ = data;
|
||||
context->output_col += numval;
|
||||
} else {
|
||||
context->output_col++;
|
||||
}
|
||||
context->output_col++;
|
||||
|
||||
if (context->output_col == context->width) {
|
||||
if (context->type == PNM_FORMAT_PBM)
|
||||
explode_bitmap_into_buf (context);
|
||||
else if (context->type == PNM_FORMAT_PGM)
|
||||
explode_gray_into_buf (context);
|
||||
|
||||
context->output_col = 0;
|
||||
context->output_row++;
|
||||
break;
|
||||
@@ -659,8 +640,12 @@ pnm_read_scanline (PnmLoaderContext *context)
|
||||
break;
|
||||
case PNM_FORMAT_PBM:
|
||||
case PNM_FORMAT_PGM:
|
||||
retval = pnm_read_ascii_mono_scanline (context);
|
||||
if (retval != PNM_OK)
|
||||
return retval;
|
||||
break;
|
||||
case PNM_FORMAT_PPM:
|
||||
retval = pnm_read_ascii_scanline (context);
|
||||
retval = pnm_read_ascii_color_scanline (context);
|
||||
if (retval != PNM_OK)
|
||||
return retval;
|
||||
break;
|
||||
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
LANG=C
|
||||
|
||||
status=0
|
||||
|
||||
if ! which readelf 2>/dev/null >/dev/null; then
|
||||
echo "'readelf' not found; skipping test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for so in .libs/libgdk_pixbuf*.so; do
|
||||
echo Checking $so for local PLT entries
|
||||
readelf -r $so | grep 'JU\?MP_SLOT' | grep 'gdk_pixbuf' && status=1
|
||||
done
|
||||
|
||||
exit $status
|
||||
+4
-4
@@ -16,7 +16,8 @@ EXTRA_DIST = \
|
||||
gdk.symbols \
|
||||
makegdkalias.pl \
|
||||
gdkaliasdef.c \
|
||||
abicheck.sh
|
||||
abicheck.sh \
|
||||
pltcheck.sh
|
||||
|
||||
INCLUDES = \
|
||||
-DG_LOG_DOMAIN=\"Gdk\" \
|
||||
@@ -24,8 +25,7 @@ INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir)/gdk \
|
||||
-I$(top_srcdir)/gdk-pixbuf \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GDK_DEP_CFLAGS)
|
||||
|
||||
@@ -202,7 +202,7 @@ gdkaliasdef.c: gdk.symbols
|
||||
$(PERL) $(srcdir)/makegdkalias.pl -def < $(srcdir)/gdk.symbols > gdkaliasdef.c
|
||||
|
||||
if OS_LINUX
|
||||
TESTS = abicheck.sh
|
||||
TESTS = pltcheck.sh abicheck.sh
|
||||
endif
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@
|
||||
|
||||
cpp -DINCLUDE_VARIABLES -P -DALL_FILES -DGDK_ENABLE_BROKEN -DGDK_WINDOWING_X11 ${srcdir:-.}/gdk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' | sort | uniq > expected-abi
|
||||
nm -D -g --defined-only .libs/libgdk-x11-2.0.so | cut -d ' ' -f 3 | sort > actual-abi
|
||||
diff -u expected-abi actual-abi && rm expected-abi actual-abi
|
||||
diff -u expected-abi actual-abi && rm -f expected-abi actual-abi
|
||||
|
||||
@@ -328,7 +328,8 @@ gdk_init (int *argc, char ***argv)
|
||||
{
|
||||
if (!gdk_init_check (argc, argv))
|
||||
{
|
||||
g_warning ("cannot open display: %s", gdk_get_display_arg_name ());
|
||||
const char *display_name = gdk_get_display_arg_name ();
|
||||
g_warning ("cannot open display: %s", display_name ? display_name : "");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
+7
-7
@@ -137,15 +137,12 @@ gdk_threads_set_lock_functions
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GDK_H__)
|
||||
#if IN_FILE(__GDK_INPUT_C__)
|
||||
#if IN_FILE(__GDK_EVENTS_C__)
|
||||
#ifndef GDK_DISABLE_DEPRECATED
|
||||
gdk_input_add
|
||||
gdk_input_remove
|
||||
gdk_input_add_full
|
||||
#endif
|
||||
#ifdef GTK_COMPILATION
|
||||
gdk_input_add_full
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -642,9 +639,6 @@ gdk_window_clear_area
|
||||
gdk_window_clear_area_e
|
||||
gdk_window_constrain_size
|
||||
gdk_window_destroy
|
||||
#ifndef GDK_DISABLE_DEPRECATED
|
||||
gdk_window_destroy_notify
|
||||
#endif
|
||||
gdk_window_end_paint
|
||||
gdk_window_foreign_new
|
||||
gdk_window_freeze_updates
|
||||
@@ -1091,6 +1085,12 @@ gdk_synthesize_window_state
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GDK_PRIVATE_H__)
|
||||
#if IN_FILE(__GDK_WINDOW_X11_C__)
|
||||
gdk_window_destroy_notify
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
#if IN_HEADER(__GDK_WIN32_H__)
|
||||
#if IN_FILE(__GDK_WIN32ID_C__)
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "gdktypes.h"
|
||||
#include "gdkprivate.h"
|
||||
#include "gdkalias.h"
|
||||
|
||||
guint _gdk_debug_flags = 0;
|
||||
gint _gdk_error_code = 0;
|
||||
|
||||
+1
-2
@@ -28,9 +28,8 @@
|
||||
#include "gdkrgb.h"
|
||||
#include "gdkprivate.h"
|
||||
#include "gdkscreen.h"
|
||||
#include "gdkalias.h"
|
||||
|
||||
#include "gdkintl.h"
|
||||
#include "gdkalias.h"
|
||||
|
||||
#define GDK_INFO_KEY "gdk-info"
|
||||
|
||||
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
LANG=C
|
||||
|
||||
status=0
|
||||
|
||||
if ! which readelf 2>/dev/null >/dev/null; then
|
||||
echo "'readelf' not found; skipping test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for so in .libs/lib*.so; do
|
||||
echo Checking $so for local PLT entries
|
||||
readelf -r $so | grep 'JU\?MP_SLOT' | grep -v 'gdk_pixbuf' | grep gdk && status=1
|
||||
done
|
||||
|
||||
exit $status
|
||||
@@ -9,7 +9,6 @@ INCLUDES = \
|
||||
-I$(top_srcdir)/gdk \
|
||||
-I$(top_builddir)/gdk \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
$(GDK_DEP_CFLAGS)
|
||||
|
||||
|
||||
@@ -785,7 +785,7 @@ gdk_display_x11_finalize (GObject *object)
|
||||
g_list_free (display_x11->input_devices);
|
||||
|
||||
/* input GdkWindow list */
|
||||
g_list_foreach (display_x11->input_windows, (GFunc) g_object_unref, NULL);
|
||||
g_list_foreach (display_x11->input_windows, (GFunc) g_free, NULL);
|
||||
g_list_free (display_x11->input_windows);
|
||||
|
||||
/* Free all GdkScreens */
|
||||
|
||||
@@ -67,7 +67,8 @@ gdk_font_name_hash_get (GdkDisplay *display)
|
||||
if (!result)
|
||||
{
|
||||
result = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
g_object_set_qdata (G_OBJECT (display), font_name_quark, result);
|
||||
g_object_set_qdata_full (G_OBJECT (display),
|
||||
font_name_quark, result, (GDestroyNotify) g_hash_table_destroy);
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -87,7 +88,9 @@ gdk_fontset_name_hash_get (GdkDisplay *display)
|
||||
if (!result)
|
||||
{
|
||||
result = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
g_object_set_qdata (G_OBJECT (display), fontset_name_quark, result);
|
||||
|
||||
g_object_set_qdata_full (G_OBJECT (display),
|
||||
fontset_name_quark, result, (GDestroyNotify) g_hash_table_destroy);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "gdktypes.h"
|
||||
#include "gdkprivate-x11.h"
|
||||
#include "gdkalias.h"
|
||||
|
||||
gboolean _gdk_use_xshm = TRUE; /* used as a cmd line arg */
|
||||
Display *gdk_display = NULL;
|
||||
|
||||
+14
-18
@@ -561,27 +561,23 @@ get_direction (XkbDescRec *xkb,
|
||||
|
||||
for (code = xkb->min_key_code; code <= xkb->max_key_code; code++)
|
||||
{
|
||||
gint width = XkbKeyGroupWidth (xkb, code, group);
|
||||
gint level;
|
||||
for (level = 0; level < width; level++)
|
||||
{
|
||||
KeySym sym = XkbKeySymEntry (xkb, code, level, group);
|
||||
PangoDirection dir = pango_unichar_direction (gdk_keyval_to_unicode (sym));
|
||||
gint level = 0;
|
||||
KeySym sym = XkbKeySymEntry (xkb, code, level, group);
|
||||
PangoDirection dir = pango_unichar_direction (gdk_keyval_to_unicode (sym));
|
||||
|
||||
switch (dir)
|
||||
{
|
||||
case PANGO_DIRECTION_RTL:
|
||||
rtl_minus_ltr++;
|
||||
break;
|
||||
case PANGO_DIRECTION_LTR:
|
||||
rtl_minus_ltr--;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (dir)
|
||||
{
|
||||
case PANGO_DIRECTION_RTL:
|
||||
rtl_minus_ltr++;
|
||||
break;
|
||||
case PANGO_DIRECTION_LTR:
|
||||
rtl_minus_ltr--;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (rtl_minus_ltr > 0)
|
||||
return PANGO_DIRECTION_RTL;
|
||||
else
|
||||
|
||||
+79
-46
@@ -33,7 +33,6 @@ INCLUDES = \
|
||||
-I$(top_srcdir)/gdk-pixbuf -I../gdk-pixbuf \
|
||||
-DGDK_PIXBUF_DISABLE_DEPRECATED \
|
||||
-DGDK_DISABLE_DEPRECATED \
|
||||
-DGTK_DISABLE_DEPRECATED \
|
||||
-DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED \
|
||||
-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED \
|
||||
$(GTK_DEBUG_FLAGS) \
|
||||
@@ -89,8 +88,15 @@ gtkalias.h: gtk.symbols
|
||||
gtkaliasdef.c: gtk.symbols
|
||||
$(PERL) $(srcdir)/makegtkalias.pl -def < $(srcdir)/gtk.symbols > gtkaliasdef.c
|
||||
|
||||
check-aliases:
|
||||
@$(TESTS_ENVIRONMENT) $(srcdir)/aliasfilescheck.sh
|
||||
|
||||
.PHONY: check-aliases
|
||||
|
||||
TESTS_ENVIRONMENT = gtk_all_c_sources="$(gtk_all_c_sources)"
|
||||
TESTS = aliasfilescheck.sh
|
||||
if OS_LINUX
|
||||
TESTS = abicheck.sh
|
||||
TESTS += abicheck.sh pltcheck.sh
|
||||
endif
|
||||
|
||||
# libtool stuff: set version and export symbols for resolving
|
||||
@@ -319,7 +325,7 @@ gtk_unix_print_public_h_sources = \
|
||||
|
||||
|
||||
# Installed header files without compatibility guarantees
|
||||
# that are not include in gtk/gtk.h
|
||||
# that are not included in gtk/gtk.h
|
||||
gtk_semi_private_h_sources = \
|
||||
gtktextlayout.h \
|
||||
gtkfilesystem.h
|
||||
@@ -336,7 +342,11 @@ gtk_private_h_sources = \
|
||||
gtkfilechooserutils.h \
|
||||
gtkfilesystemmodel.h \
|
||||
gtkfilesystemunix.h \
|
||||
gtkhsv.h \
|
||||
gtkiconcache.h \
|
||||
gtkintl.h \
|
||||
gtkkeyhash.h \
|
||||
gtkmnemonichash.h \
|
||||
gtkpathbar.h \
|
||||
gtkplugprivate.h \
|
||||
gtkprintoperation-private.h\
|
||||
@@ -348,6 +358,7 @@ gtk_private_h_sources = \
|
||||
gtksequence.h \
|
||||
gtksocketprivate.h \
|
||||
gtktextbtree.h \
|
||||
gtktextbufferserialize.h\
|
||||
gtktextchildprivate.h \
|
||||
gtktextiterprivate.h \
|
||||
gtktextmarkprivate.h \
|
||||
@@ -362,7 +373,7 @@ gtk_private_h_sources = \
|
||||
gtkwindow-decorate.h
|
||||
|
||||
# GTK+ C sources to build the library from
|
||||
gtk_c_sources = \
|
||||
gtk_base_c_sources = \
|
||||
fnmatch.c \
|
||||
gtkaboutdialog.c \
|
||||
gtkaccelgroup.c \
|
||||
@@ -440,7 +451,6 @@ gtk_c_sources = \
|
||||
gtkhscrollbar.c \
|
||||
gtkhseparator.c \
|
||||
gtkhsv.c \
|
||||
gtkhsv.h \
|
||||
gtkiconcache.c \
|
||||
gtkiconfactory.c \
|
||||
gtkicontheme.c \
|
||||
@@ -452,12 +462,10 @@ gtk_c_sources = \
|
||||
gtkimmodule.c \
|
||||
gtkimmulticontext.c \
|
||||
gtkinputdialog.c \
|
||||
gtkintl.h \
|
||||
gtkinvisible.c \
|
||||
gtkitem.c \
|
||||
gtkitemfactory.c \
|
||||
gtkkeyhash.c \
|
||||
gtkkeyhash.h \
|
||||
gtklabel.c \
|
||||
gtklayout.c \
|
||||
gtklinkbutton.c \
|
||||
@@ -475,7 +483,6 @@ gtk_c_sources = \
|
||||
gtkmessagedialog.c \
|
||||
gtkmisc.c \
|
||||
gtkmnemonichash.c \
|
||||
gtkmnemonichash.h \
|
||||
gtkmodules.c \
|
||||
gtknotebook.c \
|
||||
gtkobject.c \
|
||||
@@ -535,14 +542,11 @@ gtk_c_sources = \
|
||||
gtktextbuffer.c \
|
||||
gtktextbufferrichtext.c \
|
||||
gtktextbufferserialize.c\
|
||||
gtktextbufferserialize.h\
|
||||
gtktextchild.c \
|
||||
gtktextdisplay.c \
|
||||
gtktextiter.c \
|
||||
gtktextiterprivate.h \
|
||||
gtktextlayout.c \
|
||||
gtktextmark.c \
|
||||
gtktextmarkprivate.h \
|
||||
gtktextsegment.c \
|
||||
gtktexttag.c \
|
||||
gtktexttagtable.c \
|
||||
@@ -584,19 +588,11 @@ gtk_c_sources = \
|
||||
gtkwidget.c \
|
||||
gtkwindow-decorate.c \
|
||||
gtkwindow.c \
|
||||
xembed.h \
|
||||
$(gtk_clipboard_dnd_c_sources)
|
||||
gtk_c_sources = $(gtk_base_c_sources)
|
||||
gtk_all_c_sources = $(gtk_base_c_sources)
|
||||
|
||||
if OS_UNIX
|
||||
gtk_private_h_sources += \
|
||||
gtkfilesystemunix.h \
|
||||
gtkprintbackend.h \
|
||||
gtkprinter-private.h \
|
||||
gtkprinteroption.h \
|
||||
gtkprinteroptionset.h \
|
||||
gtkprinteroptionwidget.h
|
||||
|
||||
gtk_c_sources += \
|
||||
gtk_os_unix_c_sources = \
|
||||
gtkfilesystemunix.c \
|
||||
gtkpagesetupunixdialog.c \
|
||||
gtkprinter.c \
|
||||
@@ -607,30 +603,51 @@ gtk_c_sources += \
|
||||
gtkprintoperation-unix.c \
|
||||
gtkprintunixdialog.c \
|
||||
gtkprintbackend.c
|
||||
gtk_all_c_sources += $(gtk_os_unix_c_sources)
|
||||
if OS_UNIX
|
||||
gtk_private_h_sources += \
|
||||
gtkfilesystemunix.h \
|
||||
gtkprintbackend.h \
|
||||
gtkprinter-private.h \
|
||||
gtkprinteroption.h \
|
||||
gtkprinteroptionset.h \
|
||||
gtkprinteroptionwidget.h
|
||||
gtk_c_sources += $(gtk_os_unix_c_sources)
|
||||
endif
|
||||
|
||||
if OS_WIN32
|
||||
gtk_private_h_sources += gtkfilesystemwin32.h gtkprint-win32.h
|
||||
|
||||
gtk_c_sources += \
|
||||
gtk_os_win32_c_sources = \
|
||||
gtkfilesystemwin32.c \
|
||||
gtkprint-win32.c \
|
||||
gtkprintoperation-win32.c
|
||||
gtk_all_c_sources += $(gtk_os_win32_c_sources)
|
||||
if OS_WIN32
|
||||
gtk_private_h_sources += gtkfilesystemwin32.h gtkprint-win32.h
|
||||
gtk_c_sources += $(gtk_os_win32_c_sources)
|
||||
endif
|
||||
|
||||
if USE_X11
|
||||
gtk_private_h_sources += gtkxembed.h gtktrayicon.h
|
||||
gtk_c_sources += \
|
||||
gtk_use_x11_c_sources = \
|
||||
gtkplug-x11.c \
|
||||
gtksocket-x11.c \
|
||||
gtkxembed.c \
|
||||
gtktrayicon-x11.c
|
||||
gtk_use_win32_c_sources = \
|
||||
gtkplug-win32.c \
|
||||
gtksocket-win32.c \
|
||||
gtkwin32embed.c \
|
||||
gtkwin32embedwidget.c
|
||||
gtk_use_stuc_c_sources = \
|
||||
gtkplug-stub.c \
|
||||
gtksocket-stub.c
|
||||
gtk_all_c_sources += $(gtk_use_x11_c_sources) $(gtk_use_win32_c_sources) $(gtk_use_stuc_c_sources)
|
||||
if USE_X11
|
||||
gtk_private_h_sources += gtkxembed.h gtktrayicon.h xembed.h
|
||||
gtk_c_sources += $(gtk_use_x11_c_sources)
|
||||
else
|
||||
if USE_WIN32
|
||||
gtk_private_h_sources += gtkwin32embed.h gtkwin32embedwidget.h
|
||||
gtk_c_sources += gtkplug-win32.c gtksocket-win32.c gtkwin32embed.c gtkwin32embedwidget.c
|
||||
gtk_c_sources += $(gtk_use_win32_c_sources)
|
||||
else
|
||||
gtk_c_sources += gtkplug-stub.c gtksocket-stub.c
|
||||
gtk_c_sources += $(gtk_use_stub_c_sources)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -653,7 +670,7 @@ gtk_built_public_sources = \
|
||||
gtkmarshal.h \
|
||||
gtktypebuiltins.h
|
||||
|
||||
# built sources that don't get installed
|
||||
# built headers that don't get installed
|
||||
gtk_built_private_headers = \
|
||||
gtkalias.h \
|
||||
gtkmarshalers.h \
|
||||
@@ -663,7 +680,6 @@ gtk_built_sources = \
|
||||
gtkaliasdef.c \
|
||||
gtktypebuiltins.c \
|
||||
gtkmarshalers.c \
|
||||
gtkmarshalers.h \
|
||||
gtkmarshal.c \
|
||||
${gtk_built_private_headers} \
|
||||
${gtk_built_public_sources}
|
||||
@@ -717,7 +733,9 @@ stamp-gtkmarshalers.h: @REBUILD@ gtkmarshalers.list
|
||||
&& rm -f xgen-gmlh \
|
||||
&& echo timestamp > $(@F)
|
||||
gtkmarshalers.c: @REBUILD@ gtkmarshalers.list
|
||||
(echo "#include \"gtkalias.h\""; $(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/gtkmarshalers.list --body) >> xgen-gmlc \
|
||||
(echo "#include \"gtkmarshalers.h\""; \
|
||||
echo "#include \"gtkalias.h\""; \
|
||||
$(GLIB_GENMARSHAL) --prefix=_gtk_marshal $(srcdir)/gtkmarshalers.list --body) >> xgen-gmlc \
|
||||
&& cp xgen-gmlc gtkmarshalers.c \
|
||||
&& rm -f xgen-gmlc
|
||||
|
||||
@@ -731,7 +749,11 @@ stamp-gtkmarshal.h: @REBUILD@ gtkmarshal.list
|
||||
&& rm -f xgen-gmh \
|
||||
&& echo timestamp > $(@F)
|
||||
gtkmarshal.c: @REBUILD@ gtkmarshal.list
|
||||
(echo "#include \"gtkalias.h\""; $(GLIB_GENMARSHAL) --prefix=gtk_marshal $(srcdir)/gtkmarshal.list --body) >> xgen-gmc \
|
||||
(echo "#include \"gtkmarshal.h\""; \
|
||||
echo "#include \"gtkalias.h\""; \
|
||||
$(GLIB_GENMARSHAL) --prefix=gtk_marshal $(srcdir)/gtkmarshal.list --body; \
|
||||
echo "#define __gtk_marshal_MARSHAL_C__"; \
|
||||
echo "#include \"gtkaliasdef.c\"") >> xgen-gmc \
|
||||
&& cp xgen-gmc gtkmarshal.c \
|
||||
&& rm -f xgen-gmc
|
||||
|
||||
@@ -1072,20 +1094,29 @@ stamp-icons: $(STOCK_ICONS)
|
||||
fi && \
|
||||
for i in 16 24; do \
|
||||
(cd stock-icons/$$i \
|
||||
&& $(LN_S) -f gtk-go-forward-ltr.png gtk-go-back-rtl.png \
|
||||
&& $(LN_S) -f gtk-go-back-ltr.png gtk-go-forward-rtl.png \
|
||||
&& $(LN_S) -f gtk-goto-last-ltr.png gtk-goto-first-rtl.png \
|
||||
&& $(LN_S) -f gtk-goto-first-ltr.png gtk-goto-last-rtl.png \
|
||||
&& $(LN_S) -f gtk-media-rewind-ltr.png gtk-media-forward-rtl.png \
|
||||
&& $(LN_S) -f gtk-media-previous-ltr.png gtk-media-next-rtl.png \
|
||||
&& $(LN_S) -f gtk-media-next-ltr.png gtk-media-previous-rtl.png \
|
||||
&& $(LN_S) -f gtk-media-forward-ltr.png gtk-media-rewind-rtl.png \
|
||||
&& $(LN_S) -f gtk-floppy.png gtk-save.png) \
|
||||
&& $(RM) gtk-go-back-rtl.png \
|
||||
&& $(LN_S) gtk-go-forward-ltr.png gtk-go-back-rtl.png \
|
||||
&& $(RM) gtk-go-forward-rtl.png \
|
||||
&& $(LN_S) gtk-go-back-ltr.png gtk-go-forward-rtl.png \
|
||||
&& $(RM) gtk-goto-first-rtl.png \
|
||||
&& $(LN_S) gtk-goto-last-ltr.png gtk-goto-first-rtl.png \
|
||||
&& $(RM) gtk-goto-last-rtl.png \
|
||||
&& $(LN_S) gtk-goto-first-ltr.png gtk-goto-last-rtl.png \
|
||||
&& $(RM) gtk-media-forward-rtl.png \
|
||||
&& $(LN_S) gtk-media-rewind-ltr.png gtk-media-forward-rtl.png \
|
||||
&& $(RM) gtk-mdedia-next-rtl.png \
|
||||
&& $(LN_S) gtk-media-previous-ltr.png gtk-media-next-rtl.png \
|
||||
&& $(RM) gtk-media-previous-rtl.png \
|
||||
&& $(LN_S) gtk-media-next-ltr.png gtk-media-previous-rtl.png \
|
||||
&& $(RM) gtk-media-rewind-rtl.png \
|
||||
&& $(LN_S) gtk-media-forward-ltr.png gtk-media-rewind-rtl.png \
|
||||
&& $(RM) gtk-save.png \
|
||||
&& $(LN_S) gtk-floppy.png gtk-save.png) \
|
||||
done \
|
||||
&& touch stamp-icons
|
||||
|
||||
gtkbuiltincache.h: @REBUILD@ stamp-icons
|
||||
$(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache
|
||||
$(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT)
|
||||
GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders \
|
||||
./gtk-update-icon-cache --force --ignore-theme-index \
|
||||
--source builtin_icons stock-icons > gtkbuiltincache.h
|
||||
@@ -1115,6 +1146,8 @@ EXTRA_DIST += \
|
||||
makefile.msc \
|
||||
makefile.msc.in \
|
||||
makegtkalias.pl \
|
||||
abicheck.sh
|
||||
abicheck.sh \
|
||||
aliasfilescheck.sh \
|
||||
pltcheck.sh
|
||||
|
||||
install-data-local:
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@
|
||||
|
||||
cpp -DINCLUDE_VARIABLES -P -DG_OS_UNIX -DGTK_WINDOWING_X11 -DALL_FILES ${srcdir:-.}/gtk.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE//' | sort > expected-abi
|
||||
nm -D -g --defined-only .libs/libgtk-x11-2.0.so | cut -d ' ' -f 3 | sort > actual-abi
|
||||
diff -u expected-abi actual-abi && rm expected-abi actual-abi
|
||||
diff -u expected-abi actual-abi && rm -f expected-abi actual-abi
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#! /bin/sh
|
||||
|
||||
if test "x$gtk_all_c_sources" = x; then
|
||||
echo gtk_all_c_sources variable not defined
|
||||
exit 1
|
||||
fi
|
||||
|
||||
grep 'IN_FILE' gtk.symbols | sed 's/.*(//;s/).*//' | grep __ | sort -u > expected-files
|
||||
grep '^ *# *define __' $gtk_all_c_sources | sed 's/.*define //;s/ *$//' | sort > actual-files
|
||||
|
||||
diff expected-files actual-files && rm -f expected-files actual-files
|
||||
|
||||
+26
-14
@@ -596,8 +596,8 @@ gtk_check_button_new_with_mnemonic
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_MENU_CHECK_ITEM_H__)
|
||||
#if IN_FILE(__GTK_MENU_CHECK_ITEM_C__)
|
||||
#if IN_HEADER(__GTK_CHECK_MENU_ITEM_H__)
|
||||
#if IN_FILE(__GTK_CHECK_MENU_ITEM_C__)
|
||||
gtk_check_menu_item_get_active
|
||||
gtk_check_menu_item_get_draw_as_radio
|
||||
gtk_check_menu_item_get_inconsistent
|
||||
@@ -884,8 +884,8 @@ gtk_container_unset_focus_chain
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__C_TREE_H__)
|
||||
#if IN_FILE(__G_TREE_C__)
|
||||
#if IN_HEADER(__GTK_CTREE_H__)
|
||||
#if IN_FILE(__GTK_CTREE_C__)
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
gtk_ctree_collapse
|
||||
gtk_ctree_collapse_recursive
|
||||
@@ -1431,6 +1431,7 @@ gtk_file_path_get_type G_GNUC_CONST
|
||||
gtk_file_paths_copy
|
||||
gtk_file_paths_free
|
||||
gtk_file_paths_sort
|
||||
gtk_file_system_create
|
||||
gtk_file_system_cancel_operation
|
||||
gtk_file_system_create_folder
|
||||
gtk_file_system_error_quark
|
||||
@@ -1477,7 +1478,6 @@ gtk_file_system_unix_new
|
||||
#ifdef G_OS_WIN32
|
||||
gtk_file_system_win32_get_type G_GNUC_CONST
|
||||
gtk_file_system_win32_new
|
||||
_gtk_file_system_win32_path_compare
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
@@ -1537,8 +1537,8 @@ gtk_font_button_set_use_size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_FONSEL_H__)
|
||||
#if IN_FILE(__GTK_FONSEL_C__)
|
||||
#if IN_HEADER(__GTK_FONTSEL_H__)
|
||||
#if IN_FILE(__GTK_FONTSEL_C__)
|
||||
gtk_font_selection_dialog_get_font_name
|
||||
gtk_font_selection_dialog_get_preview_text
|
||||
gtk_font_selection_dialog_get_type G_GNUC_CONST
|
||||
@@ -1939,7 +1939,7 @@ gtk_item_toggle
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_ITEM__FACTORY_H__)
|
||||
#if IN_HEADER(__GTK_ITEM_FACTORY_H__)
|
||||
#if IN_FILE(__GTK_ITEM_FACTORY_C__)
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
gtk_item_factories_path_delete
|
||||
@@ -2189,6 +2189,7 @@ gtk_input_dialog_new
|
||||
|
||||
#if IN_HEADER(__gtk_marshal_MARSHAL_H__)
|
||||
#if IN_FILE(__gtk_marshal_MARSHAL_C__)
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
gtk_marshal_BOOLEAN__POINTER
|
||||
gtk_marshal_BOOLEAN__POINTER_INT_INT
|
||||
gtk_marshal_BOOLEAN__POINTER_INT_INT_UINT
|
||||
@@ -2217,6 +2218,7 @@ gtk_marshal_VOID__UINT_POINTER_UINT_UINT_ENUM
|
||||
gtk_marshal_VOID__UINT_STRING
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_MENU_BAR_H__)
|
||||
#if IN_FILE(__GTK_MENU_BAR_C__)
|
||||
@@ -4371,19 +4373,21 @@ gtk_vbox_new
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_VBUTTONBOX_H__)
|
||||
#if IN_FILE(__GTK_VBUTTONBOX_C__)
|
||||
#if IN_HEADER(__GTK_VBBOX_H__)
|
||||
#if IN_FILE(__GTK_VBBOX_C__)
|
||||
#ifndef GTK_DISABLE_DEPRECATED
|
||||
gtk_vbutton_box_get_layout_default
|
||||
gtk_vbutton_box_get_spacing_default
|
||||
gtk_vbutton_box_get_type G_GNUC_CONST
|
||||
gtk_vbutton_box_new
|
||||
gtk_vbutton_box_set_layout_default
|
||||
gtk_vbutton_box_set_spacing_default
|
||||
#endif
|
||||
gtk_vbutton_box_get_type G_GNUC_CONST
|
||||
gtk_vbutton_box_new
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_VIEPORT_H__)
|
||||
#if IN_FILE(__GTK_VIEPORT_C__)
|
||||
#if IN_HEADER(__GTK_VIEWPORT_H__)
|
||||
#if IN_FILE(__GTK_VIEWPORT_C__)
|
||||
gtk_viewport_get_hadjustment
|
||||
gtk_viewport_get_shadow_type
|
||||
gtk_viewport_get_type G_GNUC_CONST
|
||||
@@ -4687,6 +4691,14 @@ gtk_window_unstick
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if IN_HEADER(__GTK_WIN32_EMBED_WIDGET_H__)
|
||||
#if IN_FILE(__GTK_WIN32_EMBED_WIDGET_C__)
|
||||
#ifdef G_OS_WIN32
|
||||
gtk_win32_embed_widget_get_type G_GNUC_CONST
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_VARIABLES
|
||||
gtk_binary_age
|
||||
gtk_interface_age
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
#include "gtkcalendar.h"
|
||||
#define GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include "gtkdnd.h"
|
||||
#include "gtkintl.h"
|
||||
|
||||
@@ -30,10 +30,9 @@
|
||||
#include "gtkmain.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
#include "gtktextbuffer.h"
|
||||
|
||||
#include "gtkquartz.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
enum {
|
||||
OWNER_CHANGE,
|
||||
|
||||
+17
-6
@@ -1427,20 +1427,31 @@ get_screen_color (GtkWidget *button)
|
||||
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (button));
|
||||
GdkCursor *picker_cursor;
|
||||
GdkGrabStatus grab_status;
|
||||
GtkWidget *grab_widget, *toplevel;
|
||||
|
||||
guint32 time = gtk_get_current_event_time ();
|
||||
|
||||
if (priv->dropper_grab_widget == NULL)
|
||||
{
|
||||
priv->dropper_grab_widget = gtk_invisible_new_for_screen (screen);
|
||||
grab_widget = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
gtk_window_set_screen (GTK_WINDOW (grab_widget), screen);
|
||||
gtk_window_resize (GTK_WINDOW (grab_widget), 1, 1);
|
||||
gtk_window_move (GTK_WINDOW (grab_widget), -100, -100);
|
||||
gtk_widget_show (grab_widget);
|
||||
|
||||
gtk_widget_add_events (priv->dropper_grab_widget,
|
||||
gtk_widget_add_events (grab_widget,
|
||||
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK);
|
||||
|
||||
gtk_widget_set_parent_window (priv->dropper_grab_widget,
|
||||
GTK_WIDGET (colorsel)->window);
|
||||
gtk_widget_show (priv->dropper_grab_widget);
|
||||
toplevel = gtk_widget_get_toplevel (colorsel);
|
||||
|
||||
if (GTK_IS_WINDOW (toplevel))
|
||||
{
|
||||
if (GTK_WINDOW (toplevel)->group)
|
||||
gtk_window_group_add_window (GTK_WINDOW (toplevel)->group,
|
||||
GTK_WINDOW (grab_widget));
|
||||
}
|
||||
|
||||
gdk_window_set_user_data (priv->dropper_grab_widget->window, colorsel);
|
||||
priv->dropper_grab_widget = grab_widget;
|
||||
}
|
||||
|
||||
if (gdk_keyboard_grab (priv->dropper_grab_widget->window,
|
||||
|
||||
+1
-2
@@ -43,9 +43,8 @@
|
||||
#include "gtkstock.h"
|
||||
#include "gtkwindow.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
#include "gtkquartz.h"
|
||||
#include "gtkalias.h"
|
||||
#include "gdk/quartz/gdkquartz.h"
|
||||
|
||||
typedef struct _GtkDragSourceSite GtkDragSourceSite;
|
||||
|
||||
+1
-2
@@ -43,6 +43,7 @@
|
||||
#include "gtkstock.h"
|
||||
#include "gtkwindow.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkdndcursors.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
static GSList *source_widgets = NULL;
|
||||
@@ -300,8 +301,6 @@ static void set_icon_stock_pixbuf (GdkDragContext *context,
|
||||
* Cursor and Icon data *
|
||||
************************/
|
||||
|
||||
#include "gtkdndcursors.h"
|
||||
|
||||
static struct {
|
||||
GdkDragAction action;
|
||||
const gchar *name;
|
||||
|
||||
+12
-13
@@ -2177,29 +2177,22 @@ gtk_entry_get_chars (GtkEditable *editable,
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_entry_set_position_internal (GtkEntry *entry,
|
||||
gint position,
|
||||
gboolean reset_im)
|
||||
gtk_entry_real_set_position (GtkEditable *editable,
|
||||
gint position)
|
||||
{
|
||||
GtkEntry *entry = GTK_ENTRY (editable);
|
||||
|
||||
if (position < 0 || position > entry->text_length)
|
||||
position = entry->text_length;
|
||||
|
||||
if (position != entry->current_pos ||
|
||||
position != entry->selection_bound)
|
||||
{
|
||||
if (reset_im)
|
||||
_gtk_entry_reset_im_context (entry);
|
||||
_gtk_entry_reset_im_context (entry);
|
||||
gtk_entry_set_positions (entry, position, position);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_entry_real_set_position (GtkEditable *editable,
|
||||
gint position)
|
||||
{
|
||||
gtk_entry_set_position_internal (GTK_ENTRY (editable), position, TRUE);
|
||||
}
|
||||
|
||||
static gint
|
||||
gtk_entry_get_position (GtkEditable *editable)
|
||||
{
|
||||
@@ -2920,6 +2913,10 @@ gtk_entry_enter_text (GtkEntry *entry,
|
||||
{
|
||||
GtkEditable *editable = GTK_EDITABLE (entry);
|
||||
gint tmp_pos;
|
||||
gboolean old_need_im_reset;
|
||||
|
||||
old_need_im_reset = entry->need_im_reset;
|
||||
entry->need_im_reset = FALSE;
|
||||
|
||||
if (gtk_editable_get_selection_bounds (editable, NULL, NULL))
|
||||
gtk_editable_delete_selection (editable);
|
||||
@@ -2931,7 +2928,9 @@ gtk_entry_enter_text (GtkEntry *entry,
|
||||
|
||||
tmp_pos = entry->current_pos;
|
||||
gtk_editable_insert_text (editable, str, strlen (str), &tmp_pos);
|
||||
gtk_entry_set_position_internal (entry, tmp_pos, FALSE);
|
||||
gtk_editable_set_position (editable, tmp_pos);
|
||||
|
||||
entry->need_im_reset = old_need_im_reset;
|
||||
}
|
||||
|
||||
/* All changes to entry->current_pos and entry->selection_bound
|
||||
|
||||
+18
-5
@@ -32,8 +32,8 @@
|
||||
#include "gtkintl.h"
|
||||
#include "gtkprivate.h"
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
#include "gtkalias.h"
|
||||
#include "gtkdnd.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
#define GTK_EXPANDER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_EXPANDER, GtkExpanderPrivate))
|
||||
|
||||
@@ -370,6 +370,7 @@ gtk_expander_realize (GtkWidget *widget)
|
||||
gint attributes_mask;
|
||||
gint border_width;
|
||||
GdkRectangle expander_rect;
|
||||
gint label_height;
|
||||
|
||||
priv = GTK_EXPANDER (widget)->priv;
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
|
||||
@@ -378,11 +379,21 @@ gtk_expander_realize (GtkWidget *widget)
|
||||
|
||||
get_expander_bounds (GTK_EXPANDER (widget), &expander_rect);
|
||||
|
||||
if (priv->label_widget && GTK_WIDGET_VISIBLE (priv->label_widget))
|
||||
{
|
||||
GtkRequisition label_requisition;
|
||||
|
||||
gtk_widget_get_child_requisition (priv->label_widget, &label_requisition);
|
||||
label_height = label_requisition.height;
|
||||
}
|
||||
else
|
||||
label_height = 0;
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.x = widget->allocation.x + border_width;
|
||||
attributes.y = expander_rect.y;
|
||||
attributes.y = widget->allocation.y + border_width;
|
||||
attributes.width = MAX (widget->allocation.width - 2 * border_width, 1);
|
||||
attributes.height = expander_rect.width;
|
||||
attributes.height = MAX (expander_rect.height, label_height - 2 * border_width);
|
||||
attributes.wclass = GDK_INPUT_ONLY;
|
||||
attributes.event_mask = gtk_widget_get_events (widget) |
|
||||
GDK_BUTTON_PRESS_MASK |
|
||||
@@ -636,8 +647,10 @@ gtk_expander_size_allocate (GtkWidget *widget,
|
||||
get_expander_bounds (expander, &rect);
|
||||
|
||||
gdk_window_move_resize (priv->event_window,
|
||||
allocation->x + border_width, rect.y,
|
||||
MAX (allocation->width - 2 * border_width, 1), rect.width);
|
||||
allocation->x + border_width,
|
||||
allocation->y + border_width,
|
||||
MAX (allocation->width - 2 * border_width, 1),
|
||||
MAX (rect.height, label_height - 2 * border_width));
|
||||
}
|
||||
|
||||
if (child_visible)
|
||||
|
||||
+256
-90
@@ -797,7 +797,6 @@ gtk_file_chooser_button_set_property (GObject *object,
|
||||
priv->has_title = TRUE;
|
||||
/* Intentionally fall through instead of breaking here, to actually set the property. */
|
||||
case GTK_FILE_CHOOSER_PROP_FILTER:
|
||||
case GTK_FILE_CHOOSER_PROP_LOCAL_ONLY:
|
||||
case GTK_FILE_CHOOSER_PROP_PREVIEW_WIDGET:
|
||||
case GTK_FILE_CHOOSER_PROP_PREVIEW_WIDGET_ACTIVE:
|
||||
case GTK_FILE_CHOOSER_PROP_USE_PREVIEW_LABEL:
|
||||
@@ -807,6 +806,12 @@ gtk_file_chooser_button_set_property (GObject *object,
|
||||
g_object_set_property (G_OBJECT (priv->dialog), pspec->name, value);
|
||||
break;
|
||||
|
||||
case GTK_FILE_CHOOSER_PROP_LOCAL_ONLY:
|
||||
g_object_set_property (G_OBJECT (priv->dialog), pspec->name, value);
|
||||
fs_volumes_changed_cb (priv->fs, button);
|
||||
fs_bookmarks_changed_cb (priv->fs, button);
|
||||
break;
|
||||
|
||||
case GTK_FILE_CHOOSER_PROP_FILE_SYSTEM_BACKEND:
|
||||
/* Construct-only */
|
||||
priv->backend = g_value_dup_string (value);
|
||||
@@ -1285,23 +1290,34 @@ change_icon_theme (GtkFileChooserButton *button)
|
||||
case ROW_TYPE_CURRENT_FOLDER:
|
||||
if (data)
|
||||
{
|
||||
GtkTreePath *path;
|
||||
GtkFileSystemHandle *handle;
|
||||
struct ChangeIconThemeData *info;
|
||||
|
||||
info = g_new0 (struct ChangeIconThemeData, 1);
|
||||
info->button = g_object_ref (button);
|
||||
path = gtk_tree_model_get_path (priv->model, &iter);
|
||||
info->row_ref = gtk_tree_row_reference_new (priv->model, path);
|
||||
gtk_tree_path_free (path);
|
||||
|
||||
handle =
|
||||
gtk_file_system_get_info (priv->fs, data, GTK_FILE_INFO_ICON,
|
||||
change_icon_theme_get_info_cb,
|
||||
info);
|
||||
button->priv->change_icon_theme_handles =
|
||||
g_slist_append (button->priv->change_icon_theme_handles, handle);
|
||||
pixbuf = NULL;
|
||||
if (gtk_file_system_path_is_local (priv->fs, (GtkFilePath *)data))
|
||||
{
|
||||
GtkTreePath *path;
|
||||
GtkFileSystemHandle *handle;
|
||||
struct ChangeIconThemeData *info;
|
||||
|
||||
info = g_new0 (struct ChangeIconThemeData, 1);
|
||||
info->button = g_object_ref (button);
|
||||
path = gtk_tree_model_get_path (priv->model, &iter);
|
||||
info->row_ref = gtk_tree_row_reference_new (priv->model, path);
|
||||
gtk_tree_path_free (path);
|
||||
|
||||
handle =
|
||||
gtk_file_system_get_info (priv->fs, data, GTK_FILE_INFO_ICON,
|
||||
change_icon_theme_get_info_cb,
|
||||
info);
|
||||
button->priv->change_icon_theme_handles =
|
||||
g_slist_append (button->priv->change_icon_theme_handles, handle);
|
||||
pixbuf = NULL;
|
||||
}
|
||||
else
|
||||
/* Don't call get_info for remote paths to avoid latency and
|
||||
* auth dialogs.
|
||||
* If we switch to a better bookmarks file format (XBEL), we
|
||||
* should use mime info to get a better icon.
|
||||
*/
|
||||
pixbuf = gtk_icon_theme_load_icon (theme, "gnome-fs-regular",
|
||||
priv->icon_size, 0, NULL);
|
||||
}
|
||||
else
|
||||
pixbuf = gtk_icon_theme_load_icon (theme, FALLBACK_ICON_NAME,
|
||||
@@ -1381,6 +1397,7 @@ get_icon_theme (GtkWidget *widget)
|
||||
struct SetDisplayNameData
|
||||
{
|
||||
GtkFileChooserButton *button;
|
||||
char *label;
|
||||
GtkTreeRowReference *row_ref;
|
||||
};
|
||||
|
||||
@@ -1427,9 +1444,12 @@ set_info_get_info_cb (GtkFileSystemHandle *handle,
|
||||
pixbuf = gtk_file_info_render_icon (info, GTK_WIDGET (data->button),
|
||||
data->button->priv->icon_size, NULL);
|
||||
|
||||
if (!data->label)
|
||||
data->label = g_strdup (gtk_file_info_get_display_name (info));
|
||||
|
||||
gtk_list_store_set (GTK_LIST_STORE (data->button->priv->model), &iter,
|
||||
ICON_COLUMN, pixbuf,
|
||||
DISPLAY_NAME_COLUMN, gtk_file_info_get_display_name (info),
|
||||
DISPLAY_NAME_COLUMN, data->label,
|
||||
IS_FOLDER_COLUMN, gtk_file_info_get_is_folder (info),
|
||||
-1);
|
||||
|
||||
@@ -1438,6 +1458,7 @@ set_info_get_info_cb (GtkFileSystemHandle *handle,
|
||||
|
||||
out:
|
||||
g_object_unref (data->button);
|
||||
g_free (data->label);
|
||||
gtk_tree_row_reference_free (data->row_ref);
|
||||
g_free (data);
|
||||
|
||||
@@ -1455,6 +1476,7 @@ set_info_for_path_at_iter (GtkFileChooserButton *button,
|
||||
|
||||
data = g_new0 (struct SetDisplayNameData, 1);
|
||||
data->button = g_object_ref (button);
|
||||
data->label = gtk_file_system_get_bookmark_label (button->priv->fs, path);
|
||||
|
||||
tree_path = gtk_tree_model_get_path (button->priv->model, iter);
|
||||
data->row_ref = gtk_tree_row_reference_new (button->priv->model, tree_path);
|
||||
@@ -1692,7 +1714,7 @@ model_add_special (GtkFileChooserButton *button)
|
||||
gtk_tree_path_free (tree_path);
|
||||
|
||||
handle = gtk_file_system_get_info (button->priv->fs, path,
|
||||
GTK_FILE_INFO_ICON,
|
||||
GTK_FILE_INFO_DISPLAY_NAME | GTK_FILE_INFO_ICON,
|
||||
model_add_special_get_info_cb, info);
|
||||
|
||||
gtk_list_store_set (store, &iter,
|
||||
@@ -1701,6 +1723,7 @@ model_add_special (GtkFileChooserButton *button)
|
||||
DISPLAY_NAME_COLUMN, _(DESKTOP_DISPLAY_NAME),
|
||||
DATA_COLUMN, path,
|
||||
IS_FOLDER_COLUMN, TRUE,
|
||||
HANDLE_COLUMN, handle,
|
||||
-1);
|
||||
|
||||
button->priv->n_special++;
|
||||
@@ -1713,33 +1736,61 @@ model_add_volumes (GtkFileChooserButton *button,
|
||||
{
|
||||
GtkListStore *store;
|
||||
gint pos;
|
||||
|
||||
gboolean local_only;
|
||||
GtkFileSystem *file_system;
|
||||
GSList *l;
|
||||
|
||||
if (!volumes)
|
||||
return;
|
||||
|
||||
store = GTK_LIST_STORE (button->priv->model);
|
||||
pos = model_get_type_position (button, ROW_TYPE_VOLUME);
|
||||
local_only = gtk_file_chooser_get_local_only (GTK_FILE_CHOOSER (button->priv->dialog));
|
||||
file_system = button->priv->fs;
|
||||
|
||||
do
|
||||
for (l = volumes; l; l = l->next)
|
||||
{
|
||||
GtkFileSystemVolume *volume;
|
||||
GtkTreeIter iter;
|
||||
GdkPixbuf *pixbuf;
|
||||
gchar *display_name;
|
||||
|
||||
pixbuf = gtk_file_system_volume_render_icon (button->priv->fs,
|
||||
volumes->data,
|
||||
volume = l->data;
|
||||
|
||||
if (local_only)
|
||||
{
|
||||
if (gtk_file_system_volume_get_is_mounted (file_system, volume))
|
||||
{
|
||||
GtkFilePath *base_path;
|
||||
|
||||
base_path = gtk_file_system_volume_get_base_path (file_system, volume);
|
||||
if (base_path != NULL)
|
||||
{
|
||||
gboolean is_local = gtk_file_system_path_is_local (file_system, base_path);
|
||||
gtk_file_path_free (base_path);
|
||||
|
||||
if (!is_local)
|
||||
{
|
||||
gtk_file_system_volume_free (file_system, volume);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pixbuf = gtk_file_system_volume_render_icon (file_system,
|
||||
volume,
|
||||
GTK_WIDGET (button),
|
||||
button->priv->icon_size,
|
||||
NULL);
|
||||
display_name = gtk_file_system_volume_get_display_name (button->priv->fs,
|
||||
volumes->data);
|
||||
display_name = gtk_file_system_volume_get_display_name (file_system, volume);
|
||||
|
||||
gtk_list_store_insert (store, &iter, pos);
|
||||
gtk_list_store_set (store, &iter,
|
||||
ICON_COLUMN, pixbuf,
|
||||
DISPLAY_NAME_COLUMN, display_name,
|
||||
TYPE_COLUMN, ROW_TYPE_VOLUME,
|
||||
DATA_COLUMN, volumes->data,
|
||||
DATA_COLUMN, volume,
|
||||
IS_FOLDER_COLUMN, TRUE,
|
||||
-1);
|
||||
|
||||
@@ -1749,11 +1800,11 @@ model_add_volumes (GtkFileChooserButton *button,
|
||||
|
||||
button->priv->n_volumes++;
|
||||
pos++;
|
||||
volumes = volumes->next;
|
||||
}
|
||||
while (volumes);
|
||||
}
|
||||
|
||||
extern gchar * _gtk_file_chooser_label_for_uri (const gchar *uri);
|
||||
|
||||
static void
|
||||
model_add_bookmarks (GtkFileChooserButton *button,
|
||||
GSList *bookmarks)
|
||||
@@ -1761,15 +1812,84 @@ model_add_bookmarks (GtkFileChooserButton *button,
|
||||
GtkListStore *store;
|
||||
GtkTreeIter iter;
|
||||
gint pos;
|
||||
gboolean local_only;
|
||||
GSList *l;
|
||||
|
||||
if (!bookmarks)
|
||||
return;
|
||||
|
||||
store = GTK_LIST_STORE (button->priv->model);
|
||||
pos = model_get_type_position (button, ROW_TYPE_BOOKMARK_SEPARATOR);
|
||||
pos = model_get_type_position (button, ROW_TYPE_BOOKMARK);
|
||||
local_only = gtk_file_chooser_get_local_only (GTK_FILE_CHOOSER (button->priv->dialog));
|
||||
|
||||
if (!button->priv->has_bookmark_separator)
|
||||
for (l = bookmarks; l; l = l->next)
|
||||
{
|
||||
GtkFilePath *path;
|
||||
|
||||
path = l->data;
|
||||
|
||||
if (gtk_file_system_path_is_local (button->priv->fs, path))
|
||||
{
|
||||
gtk_list_store_insert (store, &iter, pos);
|
||||
gtk_list_store_set (store, &iter,
|
||||
ICON_COLUMN, NULL,
|
||||
DISPLAY_NAME_COLUMN, _(FALLBACK_DISPLAY_NAME),
|
||||
TYPE_COLUMN, ROW_TYPE_BOOKMARK,
|
||||
DATA_COLUMN, gtk_file_path_copy (path),
|
||||
IS_FOLDER_COLUMN, FALSE,
|
||||
-1);
|
||||
set_info_for_path_at_iter (button, path, &iter);
|
||||
}
|
||||
else
|
||||
{
|
||||
gchar *label;
|
||||
GtkIconTheme *icon_theme;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
if (local_only)
|
||||
continue;
|
||||
|
||||
/* Don't call get_info for remote paths to avoid latency and
|
||||
* auth dialogs.
|
||||
* If we switch to a better bookmarks file format (XBEL), we
|
||||
* should use mime info to get a better icon.
|
||||
*/
|
||||
label = gtk_file_system_get_bookmark_label (button->priv->fs, path);
|
||||
if (!label)
|
||||
{
|
||||
gchar *uri;
|
||||
|
||||
uri = gtk_file_system_path_to_uri (button->priv->fs, path);
|
||||
label = _gtk_file_chooser_label_for_uri (uri);
|
||||
g_free (uri);
|
||||
}
|
||||
|
||||
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (button)));
|
||||
pixbuf = gtk_icon_theme_load_icon (icon_theme, "gnome-fs-directory",
|
||||
button->priv->icon_size, 0, NULL);
|
||||
|
||||
gtk_list_store_insert (store, &iter, pos);
|
||||
gtk_list_store_set (store, &iter,
|
||||
ICON_COLUMN, pixbuf,
|
||||
DISPLAY_NAME_COLUMN, label,
|
||||
TYPE_COLUMN, ROW_TYPE_BOOKMARK,
|
||||
DATA_COLUMN, gtk_file_path_copy (path),
|
||||
IS_FOLDER_COLUMN, TRUE,
|
||||
-1);
|
||||
|
||||
g_free (label);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
|
||||
button->priv->n_bookmarks++;
|
||||
pos++;
|
||||
}
|
||||
|
||||
if (button->priv->n_bookmarks > 0 &&
|
||||
!button->priv->has_bookmark_separator)
|
||||
{
|
||||
pos = model_get_type_position (button, ROW_TYPE_BOOKMARK_SEPARATOR);
|
||||
|
||||
gtk_list_store_insert (store, &iter, pos);
|
||||
gtk_list_store_set (store, &iter,
|
||||
ICON_COLUMN, NULL,
|
||||
@@ -1780,25 +1900,6 @@ model_add_bookmarks (GtkFileChooserButton *button,
|
||||
-1);
|
||||
button->priv->has_bookmark_separator = TRUE;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
pos++;
|
||||
|
||||
gtk_list_store_insert (store, &iter, pos);
|
||||
gtk_list_store_set (store, &iter,
|
||||
ICON_COLUMN, NULL,
|
||||
DISPLAY_NAME_COLUMN, _(FALLBACK_DISPLAY_NAME),
|
||||
TYPE_COLUMN, ROW_TYPE_BOOKMARK,
|
||||
DATA_COLUMN, gtk_file_path_copy (bookmarks->data),
|
||||
IS_FOLDER_COLUMN, FALSE,
|
||||
-1);
|
||||
set_info_for_path_at_iter (button, bookmarks->data, &iter);
|
||||
|
||||
button->priv->n_bookmarks++;
|
||||
bookmarks = bookmarks->next;
|
||||
}
|
||||
while (bookmarks);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1840,14 +1941,53 @@ model_update_current_folder (GtkFileChooserButton *button,
|
||||
model_free_row_data (button, &iter);
|
||||
}
|
||||
|
||||
gtk_list_store_set (store, &iter,
|
||||
ICON_COLUMN, NULL,
|
||||
DISPLAY_NAME_COLUMN, _(FALLBACK_DISPLAY_NAME),
|
||||
TYPE_COLUMN, ROW_TYPE_CURRENT_FOLDER,
|
||||
DATA_COLUMN, gtk_file_path_copy (path),
|
||||
IS_FOLDER_COLUMN, FALSE,
|
||||
-1);
|
||||
set_info_for_path_at_iter (button, path, &iter);
|
||||
if (gtk_file_system_path_is_local (button->priv->fs, path))
|
||||
{
|
||||
gtk_list_store_set (store, &iter,
|
||||
ICON_COLUMN, NULL,
|
||||
DISPLAY_NAME_COLUMN, _(FALLBACK_DISPLAY_NAME),
|
||||
TYPE_COLUMN, ROW_TYPE_CURRENT_FOLDER,
|
||||
DATA_COLUMN, gtk_file_path_copy (path),
|
||||
IS_FOLDER_COLUMN, FALSE,
|
||||
-1);
|
||||
set_info_for_path_at_iter (button, path, &iter);
|
||||
}
|
||||
else
|
||||
{
|
||||
gchar *label;
|
||||
GtkIconTheme *icon_theme;
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
/* Don't call get_info for remote paths to avoid latency and
|
||||
* auth dialogs.
|
||||
* If we switch to a better bookmarks file format (XBEL), we
|
||||
* should use mime info to get a better icon.
|
||||
*/
|
||||
label = gtk_file_system_get_bookmark_label (button->priv->fs, path);
|
||||
if (!label)
|
||||
{
|
||||
gchar *uri;
|
||||
|
||||
uri = gtk_file_system_path_to_uri (button->priv->fs, path);
|
||||
label = _gtk_file_chooser_label_for_uri (uri);
|
||||
g_free (uri);
|
||||
}
|
||||
|
||||
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (button)));
|
||||
pixbuf = gtk_icon_theme_load_icon (icon_theme, "gnome-fs-directory",
|
||||
button->priv->icon_size, 0, NULL);
|
||||
|
||||
gtk_list_store_set (store, &iter,
|
||||
ICON_COLUMN, pixbuf,
|
||||
DISPLAY_NAME_COLUMN, label,
|
||||
TYPE_COLUMN, ROW_TYPE_CURRENT_FOLDER,
|
||||
DATA_COLUMN, gtk_file_path_copy (path),
|
||||
IS_FOLDER_COLUMN, TRUE,
|
||||
-1);
|
||||
|
||||
g_free (label);
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
@@ -1959,17 +2099,27 @@ filter_model_visible_func (GtkTreeModel *model,
|
||||
break;
|
||||
case ROW_TYPE_VOLUME:
|
||||
{
|
||||
GtkFilePath *base_path;
|
||||
|
||||
base_path = gtk_file_system_volume_get_base_path (priv->fs, data);
|
||||
if (base_path)
|
||||
retval = TRUE;
|
||||
if (local_only)
|
||||
{
|
||||
retval = (!local_only ||
|
||||
gtk_file_system_path_is_local (priv->fs, base_path));
|
||||
gtk_file_path_free (base_path);
|
||||
if (gtk_file_system_volume_get_is_mounted (priv->fs, data))
|
||||
{
|
||||
GtkFilePath *base_path;
|
||||
|
||||
base_path = gtk_file_system_volume_get_base_path (priv->fs, data);
|
||||
if (base_path)
|
||||
{
|
||||
gboolean is_local = gtk_file_system_path_is_local (priv->fs, base_path);
|
||||
|
||||
gtk_file_path_free (base_path);
|
||||
|
||||
if (!is_local)
|
||||
retval = FALSE;
|
||||
}
|
||||
else
|
||||
retval = FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
retval = FALSE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -2057,10 +2207,13 @@ update_combo_box (GtkFileChooserButton *button)
|
||||
GtkFilePath *base_path;
|
||||
|
||||
base_path = gtk_file_system_volume_get_base_path (priv->fs, data);
|
||||
row_found = (paths &&
|
||||
paths->data &&
|
||||
gtk_file_path_compare (base_path, paths->data) == 0);
|
||||
gtk_file_path_free (base_path);
|
||||
if (base_path)
|
||||
{
|
||||
row_found = (paths &&
|
||||
paths->data &&
|
||||
gtk_file_path_compare (base_path, paths->data) == 0);
|
||||
gtk_file_path_free (base_path);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -2185,13 +2338,34 @@ update_label_and_image (GtkFileChooserButton *button)
|
||||
}
|
||||
|
||||
if (priv->update_button_handle)
|
||||
gtk_file_system_cancel_operation (priv->update_button_handle);
|
||||
{
|
||||
gtk_file_system_cancel_operation (priv->update_button_handle);
|
||||
priv->update_button_handle = NULL;
|
||||
}
|
||||
|
||||
if (gtk_file_system_path_is_local (priv->fs, path))
|
||||
{
|
||||
priv->update_button_handle =
|
||||
gtk_file_system_get_info (priv->fs, path,
|
||||
GTK_FILE_INFO_DISPLAY_NAME | GTK_FILE_INFO_ICON,
|
||||
update_label_get_info_cb,
|
||||
g_object_ref (button));
|
||||
}
|
||||
else
|
||||
{
|
||||
GdkPixbuf *pixbuf;
|
||||
|
||||
priv->update_button_handle =
|
||||
gtk_file_system_get_info (priv->fs, path,
|
||||
GTK_FILE_INFO_DISPLAY_NAME | GTK_FILE_INFO_ICON,
|
||||
update_label_get_info_cb,
|
||||
g_object_ref (button));
|
||||
label_text = gtk_file_system_get_bookmark_label (button->priv->fs, path);
|
||||
|
||||
pixbuf = gtk_icon_theme_load_icon (get_icon_theme (GTK_WIDGET (priv->image)),
|
||||
"gnome-fs-regular",
|
||||
priv->icon_size, 0, NULL);
|
||||
|
||||
gtk_image_set_from_pixbuf (GTK_IMAGE (priv->image), pixbuf);
|
||||
|
||||
if (pixbuf)
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
}
|
||||
out:
|
||||
gtk_file_paths_free (paths);
|
||||
@@ -2244,19 +2418,11 @@ fs_bookmarks_changed_cb (GtkFileSystem *fs,
|
||||
GSList *bookmarks;
|
||||
|
||||
bookmarks = gtk_file_system_list_bookmarks (fs);
|
||||
if (!bookmarks)
|
||||
{
|
||||
model_remove_rows (user_data,
|
||||
model_get_type_position (user_data,
|
||||
ROW_TYPE_BOOKMARK_SEPARATOR),
|
||||
(priv->n_bookmarks + priv->has_bookmark_separator));
|
||||
priv->has_bookmark_separator = FALSE;
|
||||
}
|
||||
else
|
||||
model_remove_rows (user_data,
|
||||
model_get_type_position (user_data, ROW_TYPE_BOOKMARK),
|
||||
priv->n_bookmarks);
|
||||
|
||||
model_remove_rows (user_data,
|
||||
model_get_type_position (user_data,
|
||||
ROW_TYPE_BOOKMARK_SEPARATOR),
|
||||
(priv->n_bookmarks + priv->has_bookmark_separator));
|
||||
priv->has_bookmark_separator = FALSE;
|
||||
priv->n_bookmarks = 0;
|
||||
model_add_bookmarks (user_data, bookmarks);
|
||||
gtk_file_paths_free (bookmarks);
|
||||
|
||||
+237
-51
@@ -1177,7 +1177,7 @@ shortcuts_reload_icons (GtkFileChooserDefault *impl)
|
||||
if (pixbuf)
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
else
|
||||
else if (gtk_file_system_path_is_local (impl->file_system, (GtkFilePath *)data))
|
||||
{
|
||||
const GtkFilePath *path;
|
||||
struct ReloadIconsData *info;
|
||||
@@ -1198,6 +1198,26 @@ shortcuts_reload_icons (GtkFileChooserDefault *impl)
|
||||
info);
|
||||
impl->reload_icon_handles = g_slist_append (impl->reload_icon_handles, handle);
|
||||
}
|
||||
else
|
||||
{
|
||||
GtkIconTheme *icon_theme;
|
||||
|
||||
/* Don't call get_info for remote paths to avoid latency and
|
||||
* auth dialogs.
|
||||
* If we switch to a better bookmarks file format (XBEL), we
|
||||
* should use mime info to get a better icon.
|
||||
*/
|
||||
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (impl)));
|
||||
pixbuf = gtk_icon_theme_load_icon (icon_theme, "gnome-fs-directory",
|
||||
impl->icon_size, 0, NULL);
|
||||
|
||||
gtk_list_store_set (impl->shortcuts_model, &iter,
|
||||
SHORTCUTS_COL_PIXBUF, pixbuf,
|
||||
-1);
|
||||
|
||||
if (pixbuf)
|
||||
g_object_unref (pixbuf);
|
||||
}
|
||||
}
|
||||
}
|
||||
while (gtk_tree_model_iter_next (GTK_TREE_MODEL (impl->shortcuts_model),&iter));
|
||||
@@ -1430,6 +1450,54 @@ out:
|
||||
g_object_unref (handle);
|
||||
}
|
||||
|
||||
/* FIXME: GtkFileSystem needs a function to split a remote path
|
||||
* into hostname and path components, or maybe just have a
|
||||
* gtk_file_system_path_get_display_name().
|
||||
*
|
||||
* This function is also used in gtkfilechooserbutton.c
|
||||
*/
|
||||
gchar *
|
||||
_gtk_file_chooser_label_for_uri (const gchar *uri)
|
||||
{
|
||||
const gchar *path, *start, *end, *p;
|
||||
gchar *host, *label;
|
||||
|
||||
start = strstr (uri, "://");
|
||||
start += 3;
|
||||
path = strchr (start, '/');
|
||||
|
||||
if (path)
|
||||
end = path;
|
||||
else
|
||||
{
|
||||
end = uri + strlen (uri);
|
||||
path = "/";
|
||||
}
|
||||
|
||||
/* strip username */
|
||||
p = strchr (start, '@');
|
||||
if (p && p < end)
|
||||
{
|
||||
start = p + 1;
|
||||
}
|
||||
|
||||
p = strchr (start, ':');
|
||||
if (p && p < end)
|
||||
end = p;
|
||||
|
||||
host = g_strndup (start, end - start);
|
||||
|
||||
/* Translators: the first string is a path and the second string
|
||||
* is a hostname. Nautilus and the panel contain the same string
|
||||
* to translate.
|
||||
*/
|
||||
label = g_strdup_printf (_("%1$s on %2$s"), path, host);
|
||||
|
||||
g_free (host);
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
/* Inserts a path in the shortcuts tree, making a copy of it; alternatively,
|
||||
* inserts a volume. A position of -1 indicates the end of the tree.
|
||||
*/
|
||||
@@ -1447,6 +1515,7 @@ shortcuts_insert_path (GtkFileChooserDefault *impl,
|
||||
GdkPixbuf *pixbuf = NULL;
|
||||
gpointer data = NULL;
|
||||
GtkTreeIter iter;
|
||||
GtkIconTheme *icon_theme;
|
||||
|
||||
profile_start ("start", is_volume ? "volume" : (char *) path);
|
||||
|
||||
@@ -1457,7 +1526,7 @@ shortcuts_insert_path (GtkFileChooserDefault *impl,
|
||||
pixbuf = gtk_file_system_volume_render_icon (impl->file_system, volume, GTK_WIDGET (impl),
|
||||
impl->icon_size, NULL);
|
||||
}
|
||||
else
|
||||
else if (gtk_file_system_path_is_local (impl->file_system, path))
|
||||
{
|
||||
struct ShortcutsInsertRequest *request;
|
||||
GtkFileSystemHandle *handle;
|
||||
@@ -1496,9 +1565,32 @@ shortcuts_insert_path (GtkFileChooserDefault *impl,
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Don't call get_info for remote paths to avoid latency and
|
||||
* auth dialogs.
|
||||
*/
|
||||
data = gtk_file_path_copy (path);
|
||||
if (label)
|
||||
label_copy = g_strdup (label);
|
||||
else
|
||||
{
|
||||
gchar *uri;
|
||||
|
||||
if (!data)
|
||||
data = gtk_file_path_copy (path);
|
||||
uri = gtk_file_system_path_to_uri (impl->file_system, path);
|
||||
|
||||
label_copy = _gtk_file_chooser_label_for_uri (uri);
|
||||
|
||||
g_free (uri);
|
||||
}
|
||||
|
||||
/* If we switch to a better bookmarks file format (XBEL), we
|
||||
* should use mime info to get a better icon.
|
||||
*/
|
||||
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (impl)));
|
||||
pixbuf = gtk_icon_theme_load_icon (icon_theme, "gnome-fs-directory",
|
||||
impl->icon_size, 0, NULL);
|
||||
}
|
||||
|
||||
if (pos == -1)
|
||||
gtk_list_store_append (impl->shortcuts_model, &iter);
|
||||
@@ -1711,6 +1803,7 @@ shortcuts_add_volumes (GtkFileChooserDefault *impl)
|
||||
|
||||
profile_start ("start", NULL);
|
||||
|
||||
|
||||
old_changing_folders = impl->changing_folder;
|
||||
impl->changing_folder = TRUE;
|
||||
|
||||
@@ -1797,7 +1890,6 @@ shortcuts_add_bookmarks (GtkFileChooserDefault *impl)
|
||||
|
||||
profile_start ("start", NULL);
|
||||
|
||||
|
||||
old_changing_folders = impl->changing_folder;
|
||||
impl->changing_folder = TRUE;
|
||||
|
||||
@@ -1905,7 +1997,11 @@ shortcuts_add_current_folder (GtkFileChooserDefault *impl)
|
||||
shortcuts_insert_path (impl, pos, TRUE, volume, NULL, NULL, FALSE, SHORTCUTS_CURRENT_FOLDER);
|
||||
}
|
||||
else
|
||||
shortcuts_insert_path (impl, pos, FALSE, NULL, impl->current_folder, NULL, FALSE, SHORTCUTS_CURRENT_FOLDER);
|
||||
{
|
||||
shortcuts_insert_path (impl, pos, FALSE, NULL, impl->current_folder, NULL, FALSE, SHORTCUTS_CURRENT_FOLDER);
|
||||
if (volume)
|
||||
gtk_file_system_volume_free (impl->file_system, volume);
|
||||
}
|
||||
|
||||
if (base_path)
|
||||
gtk_file_path_free (base_path);
|
||||
@@ -1965,7 +2061,7 @@ shortcuts_model_create (GtkFileChooserDefault *impl)
|
||||
G_TYPE_BOOLEAN, /* is the previous column a volume? */
|
||||
G_TYPE_BOOLEAN, /* removable */
|
||||
G_TYPE_BOOLEAN, /* pixbuf cell visibility */
|
||||
G_TYPE_OBJECT); /* GtkFileSystemHandle */
|
||||
G_TYPE_POINTER); /* GtkFileSystemHandle */
|
||||
|
||||
if (impl->file_system)
|
||||
{
|
||||
@@ -4732,7 +4828,7 @@ set_file_system_backend (GtkFileChooserDefault *impl,
|
||||
|
||||
impl->file_system = NULL;
|
||||
if (backend)
|
||||
impl->file_system = _gtk_file_system_create (backend);
|
||||
impl->file_system = gtk_file_system_create (backend);
|
||||
else
|
||||
{
|
||||
GtkSettings *settings = gtk_settings_get_default ();
|
||||
@@ -4741,7 +4837,7 @@ set_file_system_backend (GtkFileChooserDefault *impl,
|
||||
g_object_get (settings, "gtk-file-chooser-backend", &default_backend, NULL);
|
||||
if (default_backend)
|
||||
{
|
||||
impl->file_system = _gtk_file_system_create (default_backend);
|
||||
impl->file_system = gtk_file_system_create (default_backend);
|
||||
g_free (default_backend);
|
||||
}
|
||||
}
|
||||
@@ -5783,6 +5879,7 @@ show_and_select_paths_finished_loading (GtkFileFolder *folder,
|
||||
|
||||
browse_files_center_selected_row (data->impl);
|
||||
|
||||
g_object_unref (data->impl);
|
||||
gtk_file_paths_free (data->paths);
|
||||
g_free (data);
|
||||
}
|
||||
@@ -6133,6 +6230,8 @@ struct UpdateCurrentFolderData
|
||||
GtkFileChooserDefault *impl;
|
||||
GtkFilePath *path;
|
||||
gboolean keep_trail;
|
||||
GtkFilePath *original_path;
|
||||
GError *original_error;
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -6158,8 +6257,52 @@ update_current_folder_get_info_cb (GtkFileSystemHandle *handle,
|
||||
|
||||
if (error)
|
||||
{
|
||||
error_changing_folder_dialog (impl, data->path, g_error_copy (error));
|
||||
goto out;
|
||||
GtkFilePath *parent_path;
|
||||
|
||||
if (!data->original_path)
|
||||
{
|
||||
data->original_path = gtk_file_path_copy (data->path);
|
||||
data->original_error = g_error_copy (error);
|
||||
}
|
||||
|
||||
/* get parent path and try to change the folder to that */
|
||||
if (gtk_file_system_get_parent (impl->file_system, data->path, &parent_path, NULL) &&
|
||||
parent_path)
|
||||
{
|
||||
gtk_file_path_free (data->path);
|
||||
data->path = parent_path;
|
||||
|
||||
g_object_unref (handle);
|
||||
|
||||
/* restart the update current folder operation */
|
||||
impl->reload_state = RELOAD_HAS_FOLDER;
|
||||
|
||||
impl->update_current_folder_handle =
|
||||
gtk_file_system_get_info (impl->file_system, data->path,
|
||||
GTK_FILE_INFO_IS_FOLDER,
|
||||
update_current_folder_get_info_cb,
|
||||
data);
|
||||
|
||||
set_busy_cursor (impl, TRUE);
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* error and bail out */
|
||||
error_changing_folder_dialog (impl, data->original_path, data->original_error);
|
||||
|
||||
gtk_file_path_free (data->original_path);
|
||||
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (data->original_path)
|
||||
{
|
||||
error_changing_folder_dialog (impl, data->original_path, data->original_error);
|
||||
|
||||
gtk_file_path_free (data->original_path);
|
||||
}
|
||||
|
||||
if (!gtk_file_info_get_is_folder (info))
|
||||
@@ -7322,7 +7465,7 @@ out:
|
||||
g_object_unref (handle);
|
||||
}
|
||||
|
||||
struct SaveEntryData
|
||||
struct FileExistsData
|
||||
{
|
||||
GtkFileChooserDefault *impl;
|
||||
gboolean file_exists_and_is_not_folder;
|
||||
@@ -7338,7 +7481,7 @@ save_entry_get_info_cb (GtkFileSystemHandle *handle,
|
||||
{
|
||||
gboolean parent_is_folder;
|
||||
gboolean cancelled = handle->cancelled;
|
||||
struct SaveEntryData *data = user_data;
|
||||
struct FileExistsData *data = user_data;
|
||||
|
||||
if (handle != data->impl->should_respond_get_info_handle)
|
||||
goto out;
|
||||
@@ -7401,6 +7544,72 @@ out:
|
||||
g_object_unref (handle);
|
||||
}
|
||||
|
||||
static void
|
||||
file_exists_get_info_cb (GtkFileSystemHandle *handle,
|
||||
const GtkFileInfo *info,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
gboolean data_ownership_taken = FALSE;
|
||||
gboolean cancelled = handle->cancelled;
|
||||
gboolean file_exists_and_is_not_folder;
|
||||
struct FileExistsData *data = user_data;
|
||||
|
||||
if (handle != data->impl->file_exists_get_info_handle)
|
||||
goto out;
|
||||
|
||||
data->impl->file_exists_get_info_handle = NULL;
|
||||
|
||||
set_busy_cursor (data->impl, FALSE);
|
||||
|
||||
if (cancelled)
|
||||
goto out;
|
||||
|
||||
file_exists_and_is_not_folder = info && !gtk_file_info_get_is_folder (info);
|
||||
|
||||
if (data->impl->action == GTK_FILE_CHOOSER_ACTION_OPEN)
|
||||
/* user typed a filename; we are done */
|
||||
g_signal_emit_by_name (data->impl, "response-requested");
|
||||
else if (data->impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
|
||||
&& file_exists_and_is_not_folder)
|
||||
{
|
||||
/* Oops, the user typed the name of an existing path which is not
|
||||
* a folder
|
||||
*/
|
||||
error_creating_folder_over_existing_file_dialog (data->impl, data->path,
|
||||
g_error_copy (error));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* check that everything up to the last component exists */
|
||||
|
||||
data->file_exists_and_is_not_folder = file_exists_and_is_not_folder;
|
||||
data_ownership_taken = TRUE;
|
||||
|
||||
if (data->impl->should_respond_get_info_handle)
|
||||
gtk_file_system_cancel_operation (data->impl->should_respond_get_info_handle);
|
||||
|
||||
data->impl->should_respond_get_info_handle =
|
||||
gtk_file_system_get_info (data->impl->file_system,
|
||||
data->parent_path,
|
||||
GTK_FILE_INFO_IS_FOLDER,
|
||||
save_entry_get_info_cb,
|
||||
data);
|
||||
set_busy_cursor (data->impl, TRUE);
|
||||
}
|
||||
|
||||
out:
|
||||
if (!data_ownership_taken)
|
||||
{
|
||||
g_object_unref (data->impl);
|
||||
gtk_file_path_free (data->path);
|
||||
gtk_file_path_free (data->parent_path);
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
g_object_unref (handle);
|
||||
}
|
||||
|
||||
static void
|
||||
paste_text_received (GtkClipboard *clipboard,
|
||||
const gchar *text,
|
||||
@@ -7588,46 +7797,26 @@ gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed)
|
||||
}
|
||||
else
|
||||
{
|
||||
gboolean file_exists_and_is_not_folder;
|
||||
struct FileExistsData *data;
|
||||
|
||||
file_exists_and_is_not_folder = g_error_matches (error, GTK_FILE_SYSTEM_ERROR, GTK_FILE_SYSTEM_ERROR_NOT_FOLDER);
|
||||
/* We need to check whether path exists and is not a folder */
|
||||
|
||||
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN)
|
||||
retval = TRUE; /* user typed a filename; we are done */
|
||||
else if (impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER && file_exists_and_is_not_folder)
|
||||
{
|
||||
/* Oops, the user typed the name of an existing path which is not a folder */
|
||||
error_creating_folder_over_existing_file_dialog (impl, path, error);
|
||||
error = NULL; /* as it will be freed below for the general case */
|
||||
retval = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
GtkFilePath *parent_path;
|
||||
struct SaveEntryData *data;
|
||||
data = g_new0 (struct FileExistsData, 1);
|
||||
data->impl = g_object_ref (impl);
|
||||
data->path = gtk_file_path_copy (path);
|
||||
data->parent_path = gtk_file_path_copy (_gtk_file_chooser_entry_get_current_folder (entry));
|
||||
|
||||
/* check that everything up to the last component exists */
|
||||
if (impl->file_exists_get_info_handle)
|
||||
gtk_file_system_cancel_operation (impl->file_exists_get_info_handle);
|
||||
|
||||
parent_path = gtk_file_path_copy (_gtk_file_chooser_entry_get_current_folder (entry));
|
||||
impl->file_exists_get_info_handle =
|
||||
gtk_file_system_get_info (impl->file_system, path,
|
||||
GTK_FILE_INFO_IS_FOLDER,
|
||||
file_exists_get_info_cb,
|
||||
data);
|
||||
|
||||
data = g_new0 (struct SaveEntryData, 1);
|
||||
data->impl = g_object_ref (impl);
|
||||
data->file_exists_and_is_not_folder = file_exists_and_is_not_folder;
|
||||
data->parent_path = parent_path; /* Takes ownership */
|
||||
data->path = gtk_file_path_copy (path);
|
||||
|
||||
if (impl->should_respond_get_info_handle)
|
||||
gtk_file_system_cancel_operation (impl->should_respond_get_info_handle);
|
||||
|
||||
impl->should_respond_get_info_handle =
|
||||
gtk_file_system_get_info (impl->file_system, parent_path,
|
||||
GTK_FILE_INFO_IS_FOLDER,
|
||||
save_entry_get_info_cb,
|
||||
data);
|
||||
set_busy_cursor (impl, TRUE);
|
||||
|
||||
retval = FALSE;
|
||||
}
|
||||
set_busy_cursor (impl, TRUE);
|
||||
retval = FALSE;
|
||||
|
||||
if (error != NULL)
|
||||
g_error_free (error);
|
||||
@@ -8574,6 +8763,3 @@ shortcuts_model_filter_new (GtkFileChooserDefault *impl,
|
||||
|
||||
return GTK_TREE_MODEL (model);
|
||||
}
|
||||
|
||||
#define __GTK_FILE_CHOOSER_DEFAULT_C__
|
||||
#include "gtkaliasdef.c"
|
||||
|
||||
@@ -219,6 +219,3 @@ _gtk_file_chooser_embed_get_resizable_hints (GtkFileChooserEmbed *chooser_embed,
|
||||
|
||||
GTK_FILE_CHOOSER_EMBED_GET_IFACE (chooser_embed)->get_resizable_hints (chooser_embed, resize_horizontally, resize_vertically);
|
||||
}
|
||||
|
||||
#define __GTK_FILE_CHOOSER_EMBED_C__
|
||||
#include "gtkaliasdef.c"
|
||||
|
||||
@@ -1075,6 +1075,3 @@ _gtk_file_chooser_entry_get_is_folder (GtkFileChooserEntry *chooser_entry,
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
#define __GTK_FILE_CHOOSER_ENTRY_C__
|
||||
#include "gtkaliasdef.c"
|
||||
|
||||
@@ -206,6 +206,7 @@ struct _GtkFileChooserDefault
|
||||
GtkFileSystemHandle *update_current_folder_handle;
|
||||
GtkFileSystemHandle *show_and_select_paths_handle;
|
||||
GtkFileSystemHandle *should_respond_get_info_handle;
|
||||
GtkFileSystemHandle *file_exists_get_info_handle;
|
||||
GtkFileSystemHandle *update_from_entry_handle;
|
||||
GtkFileSystemHandle *shortcuts_activate_iter_handle;
|
||||
GSList *pending_handles;
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <string.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include "gtkfilechoosersettings.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
/* Increment this every time you change the configuration format */
|
||||
#define CONFIG_VERSION 0
|
||||
|
||||
@@ -360,6 +360,3 @@ delegate_confirm_overwrite (GtkFileChooser *chooser,
|
||||
g_signal_emit_by_name (data, "confirm-overwrite", &conf);
|
||||
return conf;
|
||||
}
|
||||
|
||||
#define __GTK_FILE_CHOOSER_UTILS_C__
|
||||
#include "gtkaliasdef.c"
|
||||
|
||||
@@ -78,7 +78,6 @@
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
#include "gtkoptionmenu.h"
|
||||
#define GTK_DISABLE_DEPRECATED
|
||||
|
||||
#define WANT_HPANED 1
|
||||
#include "gtkhpaned.h"
|
||||
|
||||
+2
-2
@@ -24,8 +24,8 @@
|
||||
#include "gtkicontheme.h"
|
||||
#include "gtkmodules.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
#include "gtkstock.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -1364,7 +1364,7 @@ _gtk_file_system_module_create (GtkFileSystemModule *fs_module)
|
||||
|
||||
|
||||
GtkFileSystem *
|
||||
_gtk_file_system_create (const char *file_system_name)
|
||||
gtk_file_system_create (const char *file_system_name)
|
||||
{
|
||||
GSList *l;
|
||||
char *module_path;
|
||||
|
||||
+1
-1
@@ -441,7 +441,7 @@ void gtk_file_paths_free (GSList *paths);
|
||||
|
||||
/* GtkFileSystem modules support */
|
||||
|
||||
GtkFileSystem *_gtk_file_system_create (const char *file_system_name);
|
||||
GtkFileSystem *gtk_file_system_create (const char *file_system_name);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
@@ -2021,6 +2021,3 @@ root_files_removed_callback (GtkFileFolder *folder,
|
||||
{
|
||||
do_files_removed (model, NULL, paths);
|
||||
}
|
||||
|
||||
#define __GTK_FILE_SYSTEM_MODEL_C__
|
||||
#include "gtkaliasdef.c"
|
||||
|
||||
+155
-21
@@ -18,6 +18,11 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* #define this if you want the program to crash when a file system gets
|
||||
* finalized while async handles are still outstanding.
|
||||
*/
|
||||
#undef HANDLE_ME_HARDER
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "gtkfilesystem.h"
|
||||
@@ -68,6 +73,11 @@ struct _GtkFileSystemUnix
|
||||
struct stat afs_statbuf;
|
||||
struct stat net_statbuf;
|
||||
|
||||
GHashTable *handles;
|
||||
|
||||
guint execute_callbacks_idle_id;
|
||||
GSList *callbacks;
|
||||
|
||||
guint have_afs : 1;
|
||||
guint have_net : 1;
|
||||
};
|
||||
@@ -133,6 +143,7 @@ static const GtkFileInfoType STAT_NEEDED_MASK = (GTK_FILE_INFO_IS_FOLDER |
|
||||
GTK_FILE_INFO_ICON);
|
||||
|
||||
static void gtk_file_system_unix_iface_init (GtkFileSystemIface *iface);
|
||||
static void gtk_file_system_unix_dispose (GObject *object);
|
||||
static void gtk_file_system_unix_finalize (GObject *object);
|
||||
|
||||
static GSList * gtk_file_system_unix_list_volumes (GtkFileSystem *file_system);
|
||||
@@ -243,6 +254,9 @@ static GtkFileInfo *create_file_info (GtkFileFolderUnix *folder_uni
|
||||
struct stat *statbuf,
|
||||
const char *mime_type);
|
||||
|
||||
static gboolean execute_callbacks_idle (gpointer data);
|
||||
static void execute_callbacks (gpointer data);
|
||||
|
||||
static gboolean fill_in_names (GtkFileFolderUnix *folder_unix,
|
||||
GError **error);
|
||||
static void fill_in_stats (GtkFileFolderUnix *folder_unix);
|
||||
@@ -293,6 +307,7 @@ gtk_file_system_unix_class_init (GtkFileSystemUnixClass *class)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
|
||||
|
||||
gobject_class->dispose = gtk_file_system_unix_dispose;
|
||||
gobject_class->finalize = gtk_file_system_unix_finalize;
|
||||
}
|
||||
|
||||
@@ -339,6 +354,100 @@ gtk_file_system_unix_init (GtkFileSystemUnix *system_unix)
|
||||
system_unix->have_net = TRUE;
|
||||
else
|
||||
system_unix->have_net = FALSE;
|
||||
|
||||
system_unix->handles = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||
|
||||
system_unix->execute_callbacks_idle_id = 0;
|
||||
system_unix->callbacks = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
check_handle_fn (gpointer key, gpointer value, gpointer data)
|
||||
{
|
||||
GtkFileSystemHandle *handle;
|
||||
int *num_live_handles;
|
||||
|
||||
handle = key;
|
||||
num_live_handles = data;
|
||||
|
||||
(*num_live_handles)++;
|
||||
|
||||
g_warning ("file_system_unix=%p still has handle=%p at finalization which is %s!",
|
||||
handle->file_system,
|
||||
handle,
|
||||
handle->cancelled ? "CANCELLED" : "NOT CANCELLED");
|
||||
}
|
||||
|
||||
static void
|
||||
check_handles_at_finalization (GtkFileSystemUnix *system_unix)
|
||||
{
|
||||
int num_live_handles;
|
||||
|
||||
num_live_handles = 0;
|
||||
|
||||
g_hash_table_foreach (system_unix->handles, check_handle_fn, &num_live_handles);
|
||||
#ifdef HANDLE_ME_HARDER
|
||||
g_assert (num_live_handles == 0);
|
||||
#endif
|
||||
|
||||
g_hash_table_destroy (system_unix->handles);
|
||||
system_unix->handles = NULL;
|
||||
}
|
||||
|
||||
#define GTK_TYPE_FILE_SYSTEM_HANDLE_UNIX (_gtk_file_system_handle_unix_get_type ())
|
||||
|
||||
typedef struct _GtkFileSystemHandle GtkFileSystemHandleUnix;
|
||||
typedef struct _GtkFileSystemHandleClass GtkFileSystemHandleUnixClass;
|
||||
|
||||
G_DEFINE_TYPE (GtkFileSystemHandleUnix, _gtk_file_system_handle_unix, GTK_TYPE_FILE_SYSTEM_HANDLE)
|
||||
|
||||
static void
|
||||
_gtk_file_system_handle_unix_init (GtkFileSystemHandleUnix *handle)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
_gtk_file_system_handle_unix_finalize (GObject *object)
|
||||
{
|
||||
GtkFileSystemHandleUnix *handle;
|
||||
GtkFileSystemUnix *system_unix;
|
||||
|
||||
handle = (GtkFileSystemHandleUnix *)object;
|
||||
|
||||
system_unix = GTK_FILE_SYSTEM_UNIX (GTK_FILE_SYSTEM_HANDLE (handle)->file_system);
|
||||
|
||||
g_assert (g_hash_table_lookup (system_unix->handles, handle) != NULL);
|
||||
g_hash_table_remove (system_unix->handles, handle);
|
||||
|
||||
if (G_OBJECT_CLASS (_gtk_file_system_handle_unix_parent_class)->finalize)
|
||||
G_OBJECT_CLASS (_gtk_file_system_handle_unix_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
_gtk_file_system_handle_unix_class_init (GtkFileSystemHandleUnixClass *class)
|
||||
{
|
||||
GObjectClass *gobject_class = (GObjectClass *) class;
|
||||
|
||||
gobject_class->finalize = _gtk_file_system_handle_unix_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_file_system_unix_dispose (GObject *object)
|
||||
{
|
||||
GtkFileSystemUnix *system_unix;
|
||||
|
||||
system_unix = GTK_FILE_SYSTEM_UNIX (object);
|
||||
|
||||
if (system_unix->execute_callbacks_idle_id)
|
||||
{
|
||||
g_source_remove (system_unix->execute_callbacks_idle_id);
|
||||
system_unix->execute_callbacks_idle_id = 0;
|
||||
|
||||
/* call pending callbacks */
|
||||
execute_callbacks (system_unix);
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gtk_file_system_unix_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -348,6 +457,8 @@ gtk_file_system_unix_finalize (GObject *object)
|
||||
|
||||
system_unix = GTK_FILE_SYSTEM_UNIX (object);
|
||||
|
||||
check_handles_at_finalization (system_unix);
|
||||
|
||||
/* FIXME: assert that the hash is empty? */
|
||||
g_hash_table_destroy (system_unix->folder_hash);
|
||||
|
||||
@@ -398,7 +509,7 @@ enum callback_types
|
||||
CALLBACK_VOLUME_MOUNT
|
||||
};
|
||||
|
||||
static void queue_callback (enum callback_types type, gpointer data);
|
||||
static void queue_callback (GtkFileSystemUnix *system_unix, enum callback_types type, gpointer data);
|
||||
|
||||
struct get_info_callback
|
||||
{
|
||||
@@ -441,7 +552,7 @@ queue_get_info_callback (GtkFileSystemGetInfoCallback callback,
|
||||
info->error = error;
|
||||
info->data = data;
|
||||
|
||||
queue_callback (CALLBACK_GET_INFO, info);
|
||||
queue_callback (GTK_FILE_SYSTEM_UNIX (handle->file_system), CALLBACK_GET_INFO, info);
|
||||
}
|
||||
|
||||
|
||||
@@ -483,7 +594,7 @@ queue_get_folder_callback (GtkFileSystemGetFolderCallback callback,
|
||||
info->error = error;
|
||||
info->data = data;
|
||||
|
||||
queue_callback (CALLBACK_GET_FOLDER, info);
|
||||
queue_callback (GTK_FILE_SYSTEM_UNIX (handle->file_system), CALLBACK_GET_FOLDER, info);
|
||||
}
|
||||
|
||||
|
||||
@@ -528,7 +639,7 @@ queue_create_folder_callback (GtkFileSystemCreateFolderCallback callback,
|
||||
info->error = error;
|
||||
info->data = data;
|
||||
|
||||
queue_callback (CALLBACK_CREATE_FOLDER, info);
|
||||
queue_callback (GTK_FILE_SYSTEM_UNIX (handle->file_system), CALLBACK_CREATE_FOLDER, info);
|
||||
}
|
||||
|
||||
|
||||
@@ -570,7 +681,7 @@ queue_volume_mount_callback (GtkFileSystemVolumeMountCallback callback,
|
||||
info->error = error;
|
||||
info->data = data;
|
||||
|
||||
queue_callback (CALLBACK_VOLUME_MOUNT, info);
|
||||
queue_callback (GTK_FILE_SYSTEM_UNIX (handle->file_system), CALLBACK_VOLUME_MOUNT, info);
|
||||
}
|
||||
|
||||
|
||||
@@ -588,17 +699,20 @@ struct callback_info
|
||||
};
|
||||
|
||||
|
||||
static guint execute_callbacks_idle_id = 0;
|
||||
static GSList *callbacks = NULL;
|
||||
|
||||
static gboolean
|
||||
execute_callbacks_idle (gpointer data)
|
||||
static void
|
||||
execute_callbacks (gpointer data)
|
||||
{
|
||||
GSList *l;
|
||||
gboolean unref_file_system = TRUE;
|
||||
GtkFileSystemUnix *system_unix = GTK_FILE_SYSTEM_UNIX (data);
|
||||
|
||||
GDK_THREADS_ENTER ();
|
||||
if (!system_unix->execute_callbacks_idle_id)
|
||||
unref_file_system = FALSE;
|
||||
else
|
||||
g_object_ref (system_unix);
|
||||
|
||||
for (l = callbacks; l; l = l->next)
|
||||
for (l = system_unix->callbacks; l; l = l->next)
|
||||
{
|
||||
struct callback_info *info = l->data;
|
||||
|
||||
@@ -624,10 +738,21 @@ execute_callbacks_idle (gpointer data)
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
g_slist_free (callbacks);
|
||||
callbacks = NULL;
|
||||
g_slist_free (system_unix->callbacks);
|
||||
system_unix->callbacks = NULL;
|
||||
|
||||
execute_callbacks_idle_id = 0;
|
||||
if (unref_file_system)
|
||||
g_object_unref (system_unix);
|
||||
|
||||
system_unix->execute_callbacks_idle_id = 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
execute_callbacks_idle (gpointer data)
|
||||
{
|
||||
GDK_THREADS_ENTER ();
|
||||
|
||||
execute_callbacks(data);
|
||||
|
||||
GDK_THREADS_LEAVE ();
|
||||
|
||||
@@ -635,7 +760,9 @@ execute_callbacks_idle (gpointer data)
|
||||
}
|
||||
|
||||
static void
|
||||
queue_callback (enum callback_types type, gpointer data)
|
||||
queue_callback (GtkFileSystemUnix *system_unix,
|
||||
enum callback_types type,
|
||||
gpointer data)
|
||||
{
|
||||
struct callback_info *info;
|
||||
|
||||
@@ -661,20 +788,26 @@ queue_callback (enum callback_types type, gpointer data)
|
||||
break;
|
||||
}
|
||||
|
||||
callbacks = g_slist_append (callbacks, info);
|
||||
system_unix->callbacks = g_slist_append (system_unix->callbacks, info);
|
||||
|
||||
if (!execute_callbacks_idle_id)
|
||||
execute_callbacks_idle_id = g_idle_add (execute_callbacks_idle, NULL);
|
||||
if (!system_unix->execute_callbacks_idle_id)
|
||||
system_unix->execute_callbacks_idle_id = g_idle_add (execute_callbacks_idle, system_unix);
|
||||
}
|
||||
|
||||
static GtkFileSystemHandle *
|
||||
create_handle (GtkFileSystem *file_system)
|
||||
{
|
||||
GtkFileSystemUnix *system_unix;
|
||||
GtkFileSystemHandle *handle;
|
||||
|
||||
handle = g_object_new (GTK_TYPE_FILE_SYSTEM_HANDLE, NULL);
|
||||
system_unix = GTK_FILE_SYSTEM_UNIX (file_system);
|
||||
|
||||
handle = g_object_new (GTK_TYPE_FILE_SYSTEM_HANDLE_UNIX, NULL);
|
||||
handle->file_system = file_system;
|
||||
|
||||
g_assert (g_hash_table_lookup (system_unix->handles, handle) == NULL);
|
||||
g_hash_table_insert (system_unix->handles, handle, handle);
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
@@ -885,8 +1018,9 @@ gtk_file_system_unix_get_folder (GtkFileSystem *file_system,
|
||||
queue_get_folder_callback (callback, handle, GTK_FILE_FOLDER (folder_unix), NULL, data);
|
||||
|
||||
/* Start loading the folder contents in an idle */
|
||||
folder_unix->load_folder_id =
|
||||
g_idle_add ((GSourceFunc) load_folder, folder_unix);
|
||||
if (!folder_unix->load_folder_id)
|
||||
folder_unix->load_folder_id =
|
||||
g_idle_add ((GSourceFunc) load_folder, folder_unix);
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
+171
-26
@@ -19,6 +19,11 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* #define this if you want the program to crash when a file system gets
|
||||
* finalized while async handles are still outstanding.
|
||||
*/
|
||||
#undef HANDLE_ME_HARDER
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "gtkfilesystem.h"
|
||||
@@ -66,6 +71,11 @@ struct _GtkFileSystemWin32
|
||||
guint32 drives; /* bitmask as returned by GetLogicalDrives() */
|
||||
GHashTable *folder_hash;
|
||||
guint timeout;
|
||||
|
||||
GHashTable *handles;
|
||||
|
||||
guint execute_callbacks_idle_id;
|
||||
GSList *callbacks;
|
||||
};
|
||||
|
||||
/* Icon type, supplemented by MIME type
|
||||
@@ -122,8 +132,9 @@ static const GtkFileInfoType STAT_NEEDED_MASK = (GTK_FILE_INFO_IS_FOLDER |
|
||||
GTK_FILE_INFO_SIZE |
|
||||
GTK_FILE_INFO_ICON);
|
||||
|
||||
static void gtk_file_system_win32_iface_init (GtkFileSystemIface *iface);
|
||||
static void gtk_file_system_win32_finalize (GObject *object);
|
||||
static void gtk_file_system_win32_iface_init (GtkFileSystemIface *iface);
|
||||
static void gtk_file_system_win32_dispose (GObject *object);
|
||||
static void gtk_file_system_win32_finalize (GObject *object);
|
||||
|
||||
static GSList * gtk_file_system_win32_list_volumes (GtkFileSystem *file_system);
|
||||
static GtkFileSystemVolume *gtk_file_system_win32_get_volume_for_path (GtkFileSystem *file_system,
|
||||
@@ -228,6 +239,9 @@ static GtkFileInfo *create_file_info (GtkFileFolderWin32 *folder_wi
|
||||
WIN32_FILE_ATTRIBUTE_DATA *wfad,
|
||||
const char *mime_type);
|
||||
|
||||
static gboolean execute_callbacks_idle (gpointer data);
|
||||
static void execute_callbacks (gpointer data);
|
||||
|
||||
static gboolean fill_in_names (GtkFileFolderWin32 *folder_win32,
|
||||
GError **error);
|
||||
static void fill_in_stats (GtkFileFolderWin32 *folder_win32);
|
||||
@@ -281,6 +295,7 @@ gtk_file_system_win32_class_init (GtkFileSystemWin32Class *class)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
|
||||
|
||||
gobject_class->dispose = gtk_file_system_win32_dispose;
|
||||
gobject_class->finalize = gtk_file_system_win32_finalize;
|
||||
}
|
||||
|
||||
@@ -356,6 +371,100 @@ gtk_file_system_win32_init (GtkFileSystemWin32 *system_win32)
|
||||
* be enough.
|
||||
*/
|
||||
system_win32->timeout = g_timeout_add_full (0, 1000, check_volumes, system_win32, NULL);
|
||||
|
||||
system_win32->handles = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||
|
||||
system_win32->execute_callbacks_idle_id = 0;
|
||||
system_win32->callbacks = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
check_handle_fn (gpointer key, gpointer value, gpointer data)
|
||||
{
|
||||
GtkFileSystemHandle *handle;
|
||||
int *num_live_handles;
|
||||
|
||||
handle = key;
|
||||
num_live_handles = data;
|
||||
|
||||
(*num_live_handles)++;
|
||||
|
||||
g_warning ("file_system_win32=%p still has handle=%p at finalization which is %s!",
|
||||
handle->file_system,
|
||||
handle,
|
||||
handle->cancelled ? "CANCELLED" : "NOT CANCELLED");
|
||||
}
|
||||
|
||||
static void
|
||||
check_handles_at_finalization (GtkFileSystemWin32 *system_win32)
|
||||
{
|
||||
int num_live_handles;
|
||||
|
||||
num_live_handles = 0;
|
||||
|
||||
g_hash_table_foreach (system_win32->handles, check_handle_fn, &num_live_handles);
|
||||
#ifdef HANDLE_ME_HARDER
|
||||
g_assert (num_live_handles == 0);
|
||||
#endif
|
||||
|
||||
g_hash_table_destroy (system_win32->handles);
|
||||
system_win32->handles = NULL;
|
||||
}
|
||||
|
||||
#define GTK_TYPE_FILE_SYSTEM_HANDLE_WIN32 (_gtk_file_system_handle_win32_get_type ())
|
||||
|
||||
typedef struct _GtkFileSystemHandle GtkFileSystemHandleWin32;
|
||||
typedef struct _GtkFileSystemHandleClass GtkFileSystemHandleWin32Class;
|
||||
|
||||
G_DEFINE_TYPE (GtkFileSystemHandleWin32, _gtk_file_system_handle_win32, GTK_TYPE_FILE_SYSTEM_HANDLE)
|
||||
|
||||
static void
|
||||
_gtk_file_system_handle_win32_init (GtkFileSystemHandleWin32 *handle)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
_gtk_file_system_handle_win32_finalize (GObject *object)
|
||||
{
|
||||
GtkFileSystemHandleWin32 *handle;
|
||||
GtkFileSystemWin32 *system_win32;
|
||||
|
||||
handle = (GtkFileSystemHandleWin32 *)object;
|
||||
|
||||
system_win32 = GTK_FILE_SYSTEM_WIN32 (GTK_FILE_SYSTEM_HANDLE (handle)->file_system);
|
||||
|
||||
g_assert (g_hash_table_lookup (system_win32->handles, handle) != NULL);
|
||||
g_hash_table_remove (system_win32->handles, handle);
|
||||
|
||||
if (G_OBJECT_CLASS (_gtk_file_system_handle_win32_parent_class)->finalize)
|
||||
G_OBJECT_CLASS (_gtk_file_system_handle_win32_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
_gtk_file_system_handle_win32_class_init (GtkFileSystemHandleWin32Class *class)
|
||||
{
|
||||
GObjectClass *gobject_class = (GObjectClass *) class;
|
||||
|
||||
gobject_class->finalize = _gtk_file_system_handle_win32_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_file_system_win32_dispose (GObject *object)
|
||||
{
|
||||
GtkFileSystemWin32 *system_win32;
|
||||
|
||||
system_win32 = GTK_FILE_SYSTEM_WIN32 (object);
|
||||
|
||||
if (system_win32->execute_callbacks_idle_id)
|
||||
{
|
||||
g_source_remove (system_win32->execute_callbacks_idle_id);
|
||||
system_win32->execute_callbacks_idle_id = 0;
|
||||
|
||||
/* call pending callbacks */
|
||||
execute_callbacks (system_win32);
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gtk_file_system_win32_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -367,6 +476,8 @@ gtk_file_system_win32_finalize (GObject *object)
|
||||
|
||||
g_source_remove (system_win32->timeout);
|
||||
|
||||
check_handles_at_finalization (system_win32);
|
||||
|
||||
/* FIXME: assert that the hash is empty? */
|
||||
g_hash_table_destroy (system_win32->folder_hash);
|
||||
|
||||
@@ -507,7 +618,7 @@ enum callback_types
|
||||
CALLBACK_VOLUME_MOUNT
|
||||
};
|
||||
|
||||
static void queue_callback (enum callback_types type, gpointer data);
|
||||
static void queue_callback (GtkFileSystemWin32 *system_win32, enum callback_types type, gpointer data);
|
||||
|
||||
struct get_info_callback
|
||||
{
|
||||
@@ -550,7 +661,7 @@ queue_get_info_callback (GtkFileSystemGetInfoCallback callback,
|
||||
info->error = error;
|
||||
info->data = data;
|
||||
|
||||
queue_callback (CALLBACK_GET_INFO, info);
|
||||
queue_callback (GTK_FILE_SYSTEM_WIN32 (handle->file_system), CALLBACK_GET_INFO, info);
|
||||
}
|
||||
|
||||
|
||||
@@ -592,7 +703,7 @@ queue_get_folder_callback (GtkFileSystemGetFolderCallback callback,
|
||||
info->error = error;
|
||||
info->data = data;
|
||||
|
||||
queue_callback (CALLBACK_GET_FOLDER, info);
|
||||
queue_callback (GTK_FILE_SYSTEM_WIN32 (handle->file_system), CALLBACK_GET_FOLDER, info);
|
||||
}
|
||||
|
||||
|
||||
@@ -637,7 +748,7 @@ queue_create_folder_callback (GtkFileSystemCreateFolderCallback callback,
|
||||
info->error = error;
|
||||
info->data = data;
|
||||
|
||||
queue_callback (CALLBACK_CREATE_FOLDER, info);
|
||||
queue_callback (GTK_FILE_SYSTEM_WIN32 (handle->file_system), CALLBACK_CREATE_FOLDER, info);
|
||||
}
|
||||
|
||||
|
||||
@@ -679,7 +790,7 @@ queue_volume_mount_callback (GtkFileSystemVolumeMountCallback callback,
|
||||
info->error = error;
|
||||
info->data = data;
|
||||
|
||||
queue_callback (CALLBACK_VOLUME_MOUNT, info);
|
||||
queue_callback (GTK_FILE_SYSTEM_WIN32 (handle->file_system), CALLBACK_VOLUME_MOUNT, info);
|
||||
}
|
||||
|
||||
|
||||
@@ -697,17 +808,20 @@ struct callback_info
|
||||
};
|
||||
|
||||
|
||||
static guint execute_callbacks_idle_id = 0;
|
||||
static GSList *callbacks = NULL;
|
||||
|
||||
static gboolean
|
||||
execute_callbacks_idle (gpointer data)
|
||||
static void
|
||||
execute_callbacks (gpointer data)
|
||||
{
|
||||
GSList *l;
|
||||
gboolean unref_file_system = TRUE;
|
||||
GtkFileSystemWin32 *system_win32 = GTK_FILE_SYSTEM_WIN32 (data);
|
||||
|
||||
GDK_THREADS_ENTER ();
|
||||
if (!system_win32->execute_callbacks_idle_id)
|
||||
unref_file_system = FALSE;
|
||||
else
|
||||
g_object_ref (system_win32);
|
||||
|
||||
for (l = callbacks; l; l = l->next)
|
||||
for (l = system_win32->callbacks; l; l = l->next)
|
||||
{
|
||||
struct callback_info *info = l->data;
|
||||
|
||||
@@ -733,10 +847,21 @@ execute_callbacks_idle (gpointer data)
|
||||
g_free (info);
|
||||
}
|
||||
|
||||
g_slist_free (callbacks);
|
||||
callbacks = NULL;
|
||||
g_slist_free (system_win32->callbacks);
|
||||
system_win32->callbacks = NULL;
|
||||
|
||||
execute_callbacks_idle_id = 0;
|
||||
if (unref_file_system)
|
||||
g_object_unref (system_win32);
|
||||
|
||||
system_win32->execute_callbacks_idle_id = 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
execute_callbacks_idle (gpointer data)
|
||||
{
|
||||
GDK_THREADS_ENTER ();
|
||||
|
||||
execute_callbacks(data);
|
||||
|
||||
GDK_THREADS_LEAVE ();
|
||||
|
||||
@@ -744,7 +869,9 @@ execute_callbacks_idle (gpointer data)
|
||||
}
|
||||
|
||||
static void
|
||||
queue_callback (enum callback_types type, gpointer data)
|
||||
queue_callback (GtkFileSystemWin32 *system_win32,
|
||||
enum callback_types type,
|
||||
gpointer data)
|
||||
{
|
||||
struct callback_info *info;
|
||||
|
||||
@@ -770,20 +897,26 @@ queue_callback (enum callback_types type, gpointer data)
|
||||
break;
|
||||
}
|
||||
|
||||
callbacks = g_slist_append (callbacks, info);
|
||||
system_win32->callbacks = g_slist_append (system_win32->callbacks, info);
|
||||
|
||||
if (!execute_callbacks_idle_id)
|
||||
execute_callbacks_idle_id = g_idle_add (execute_callbacks_idle, NULL);
|
||||
if (!system_win32->execute_callbacks_idle_id)
|
||||
system_win32->execute_callbacks_idle_id = g_idle_add (execute_callbacks_idle, system_win32);
|
||||
}
|
||||
|
||||
static GtkFileSystemHandle *
|
||||
create_handle (GtkFileSystem *file_system)
|
||||
{
|
||||
GtkFileSystemWin32 *system_win32;
|
||||
GtkFileSystemHandle *handle;
|
||||
|
||||
handle = g_object_new (GTK_TYPE_FILE_SYSTEM_HANDLE, NULL);
|
||||
system_win32 = GTK_FILE_SYSTEM_WIN32 (file_system);
|
||||
|
||||
handle = g_object_new (GTK_TYPE_FILE_SYSTEM_HANDLE_WIN32, NULL);
|
||||
handle->file_system = file_system;
|
||||
|
||||
g_assert (g_hash_table_lookup (system_win32->handles, handle) == NULL);
|
||||
g_hash_table_insert (system_win32->handles, handle, handle);
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
@@ -1001,8 +1134,9 @@ gtk_file_system_win32_get_folder (GtkFileSystem *file_system,
|
||||
queue_get_folder_callback (callback, handle, GTK_FILE_FOLDER (folder_win32), NULL, data);
|
||||
|
||||
/* Start loading the folder contents in an idle */
|
||||
folder_win32->load_folder_id =
|
||||
g_idle_add ((GSourceFunc) load_folder, folder_win32);
|
||||
if (!folder_win32->load_folder_id)
|
||||
folder_win32->load_folder_id =
|
||||
g_idle_add ((GSourceFunc) load_folder, folder_win32);
|
||||
|
||||
return handle;
|
||||
}
|
||||
@@ -1317,13 +1451,17 @@ gtk_file_system_win32_make_path (GtkFileSystem *file_system,
|
||||
|
||||
if ((p = strpbrk (display_name, "<>\"/\\|")))
|
||||
{
|
||||
gchar badchar[2];
|
||||
|
||||
badchar[0] = *p; /* We know it is a single-byte char */
|
||||
badchar[1] = '\0';
|
||||
g_set_error (error,
|
||||
GTK_FILE_SYSTEM_ERROR,
|
||||
GTK_FILE_SYSTEM_ERROR_BAD_FILENAME,
|
||||
_("The name \"%s\" is not valid because it contains the character \"%c\". "
|
||||
_("The name \"%s\" is not valid because it contains the character \"%s\". "
|
||||
"Please use a different name."),
|
||||
display_name,
|
||||
*p);
|
||||
badchar);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -2736,7 +2874,14 @@ _gtk_file_system_win32_path_compare (const gchar *path1,
|
||||
else
|
||||
break;
|
||||
}
|
||||
return *path1 - *path2;
|
||||
if (!*path1 && !*path2)
|
||||
return 0;
|
||||
else if (!*path1)
|
||||
return -1;
|
||||
else if (!*path2)
|
||||
return 1;
|
||||
else
|
||||
return g_unichar_toupper (g_utf8_get_char (path1)) - g_unichar_toupper (g_utf8_get_char (path2));
|
||||
}
|
||||
|
||||
#define __GTK_FILE_SYSTEM_WIN32_C__
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
#include "gtkdebug.h"
|
||||
#include "gtkiconcache.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
#include <glib/gstdio.h>
|
||||
#include <gdk-pixbuf/gdk-pixdata.h>
|
||||
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
#include "gtkoptionmenu.h"
|
||||
#define GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
#include "gtkitemfactory.h"
|
||||
#include "gtkoptionmenu.h"
|
||||
#define GTK_DISABLE_DEPRECATED
|
||||
#include "gtkmenubar.h"
|
||||
#include "gtkmenu.h"
|
||||
#include "gtkmenuitem.h"
|
||||
@@ -54,7 +53,7 @@
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
#include "gtkalias.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
/* --- defines --- */
|
||||
#define ITEM_FACTORY_STRING ((gchar*) item_factory_string)
|
||||
|
||||
@@ -265,6 +265,7 @@ set_link_underline (GtkLinkButton *link_button)
|
||||
attributes = pango_attr_list_new ();
|
||||
pango_attr_list_insert (attributes, uline);
|
||||
gtk_label_set_attributes (GTK_LABEL (label), attributes);
|
||||
pango_attr_list_unref (attributes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -551,11 +551,12 @@ post_parse_hook (GOptionContext *context,
|
||||
{
|
||||
if (gdk_display_open_default_libgtk_only () == NULL)
|
||||
{
|
||||
const char *display_name = gdk_get_display_arg_name ();
|
||||
g_set_error (error,
|
||||
G_OPTION_ERROR,
|
||||
G_OPTION_ERROR_FAILED,
|
||||
"cannot open display: %s",
|
||||
gdk_get_display_arg_name ());
|
||||
display_name ? display_name : "" );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "gtkmnemonichash.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
struct _GtkMnemnonicHash
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "gtkdebug.h"
|
||||
#include "gtkprivate.h" /* GTK_LIBDIR */
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
#include <gmodule.h>
|
||||
#include <pango/pango-utils.h> /* For pango_split_file_list */
|
||||
|
||||
+1
-1
@@ -37,8 +37,8 @@
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtkbindings.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "gtkalias.h"
|
||||
#include "gtkdnd.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
#define SCROLL_DELAY_FACTOR 5
|
||||
#define SCROLL_THRESHOLD 12
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
#include "gtkoptionmenu.h"
|
||||
#define GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include "gtkprivate.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
+21
-13
@@ -259,15 +259,6 @@ gtk_path_bar_dispose (GObject *object)
|
||||
gtk_file_system_cancel_operation (path_bar->set_path_handle);
|
||||
path_bar->set_path_handle = NULL;
|
||||
|
||||
for (list = path_bar->button_list; list; list = list->next)
|
||||
{
|
||||
ButtonData *button_data = BUTTON_DATA (list->data);
|
||||
|
||||
if (button_data->handle)
|
||||
gtk_file_system_cancel_operation (button_data->handle);
|
||||
button_data->handle = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gtk_path_bar_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
@@ -1020,6 +1011,12 @@ set_button_image_get_info_cb (GtkFileSystemHandle *handle,
|
||||
|
||||
data->button_data->handle = NULL;
|
||||
|
||||
if (!data->button_data->button)
|
||||
{
|
||||
g_free (data->button_data);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (cancelled || error)
|
||||
goto out;
|
||||
|
||||
@@ -1134,12 +1131,20 @@ set_button_image (GtkPathBar *path_bar,
|
||||
static void
|
||||
button_data_free (ButtonData *button_data)
|
||||
{
|
||||
if (button_data->path)
|
||||
gtk_file_path_free (button_data->path);
|
||||
button_data->path = NULL;
|
||||
|
||||
if (button_data->dir_name)
|
||||
g_free (button_data->dir_name);
|
||||
button_data->dir_name = NULL;
|
||||
|
||||
button_data->button = NULL;
|
||||
|
||||
if (button_data->handle)
|
||||
gtk_file_system_cancel_operation (button_data->handle);
|
||||
|
||||
gtk_file_path_free (button_data->path);
|
||||
g_free (button_data->dir_name);
|
||||
g_free (button_data);
|
||||
else
|
||||
g_free (button_data);
|
||||
}
|
||||
|
||||
static const char *
|
||||
@@ -1653,3 +1658,6 @@ _gtk_path_bar_down (GtkPathBar *path_bar)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define __GTK_PATH_BAR_C__
|
||||
#include "gtkaliasdef.c"
|
||||
|
||||
+3
-3
@@ -17,8 +17,8 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_PATH_BAR__
|
||||
#define __GTK_PATH_BAR__
|
||||
#ifndef __GTK_PATH_BAR_H__
|
||||
#define __GTK_PATH_BAR_H__
|
||||
|
||||
#include "gtkcontainer.h"
|
||||
#include "gtkfilesystem.h"
|
||||
@@ -91,4 +91,4 @@ void _gtk_path_bar_down (GtkPathBar *path_bar);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_PATH_BAR__ */
|
||||
#endif /* __GTK_PATH_BAR_H__ */
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "gtkplug.h"
|
||||
#include "gtkplugprivate.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
GdkNativeWindow
|
||||
_gtk_plug_windowing_get_id (GtkPlug *plug)
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "win32/gdkwin32.h"
|
||||
|
||||
#include "gtkwin32embed.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
#if defined(_MSC_VER) && (WINVER < 0x0500)
|
||||
#ifndef GA_PARENT
|
||||
|
||||
+1
-1
@@ -25,7 +25,6 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "gtkalias.h"
|
||||
#include "gtkmain.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtkplug.h"
|
||||
@@ -35,6 +34,7 @@
|
||||
#include "x11/gdkx.h"
|
||||
|
||||
#include "gtkxembed.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
static void xembed_set_info (GdkWindow *window,
|
||||
unsigned long flags);
|
||||
|
||||
@@ -89,7 +89,7 @@ static void gtk_printer_option_widget_get_property (GObject *object,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
static gboolean gtk_printer_option_widget_mnemonic_activate (GtkWidget *widget,
|
||||
gboolean group_cycling);
|
||||
gboolean group_cycling);
|
||||
|
||||
static void
|
||||
gtk_printer_option_widget_class_init (GtkPrinterOptionWidgetClass *class)
|
||||
@@ -229,8 +229,8 @@ source_changed_cb (GtkPrinterOption *source,
|
||||
}
|
||||
|
||||
void
|
||||
gtk_printer_option_widget_set_source (GtkPrinterOptionWidget *widget,
|
||||
GtkPrinterOption *source)
|
||||
gtk_printer_option_widget_set_source (GtkPrinterOptionWidget *widget,
|
||||
GtkPrinterOption *source)
|
||||
{
|
||||
GtkPrinterOptionWidgetPrivate *priv = widget->priv;
|
||||
|
||||
@@ -256,12 +256,18 @@ gtk_printer_option_widget_set_source (GtkPrinterOptionWidget *widget,
|
||||
g_object_notify (G_OBJECT (widget), "source");
|
||||
}
|
||||
|
||||
enum {
|
||||
NAME_COLUMN,
|
||||
VALUE_COLUMN,
|
||||
N_COLUMNS
|
||||
};
|
||||
|
||||
static void
|
||||
combo_box_set_model (GtkWidget *combo_box)
|
||||
{
|
||||
GtkListStore *store;
|
||||
|
||||
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
||||
store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING);
|
||||
gtk_combo_box_set_model (GTK_COMBO_BOX (combo_box), GTK_TREE_MODEL (store));
|
||||
g_object_unref (store);
|
||||
}
|
||||
@@ -274,7 +280,7 @@ combo_box_set_view (GtkWidget *combo_box)
|
||||
cell = gtk_cell_renderer_text_new ();
|
||||
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), cell, TRUE);
|
||||
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), cell,
|
||||
"text", 1,
|
||||
"text", NAME_COLUMN,
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -286,7 +292,7 @@ combo_box_entry_new (void)
|
||||
|
||||
combo_box_set_model (combo_box);
|
||||
|
||||
gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (combo_box), 1);
|
||||
gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (combo_box), NAME_COLUMN);
|
||||
|
||||
return combo_box;
|
||||
}
|
||||
@@ -304,9 +310,9 @@ combo_box_new (void)
|
||||
}
|
||||
|
||||
static void
|
||||
combo_box_append (GtkWidget *combo,
|
||||
const char *display_text,
|
||||
const char *value)
|
||||
combo_box_append (GtkWidget *combo,
|
||||
const gchar *display_text,
|
||||
const gchar *value)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
GtkListStore *store;
|
||||
@@ -317,24 +323,27 @@ combo_box_append (GtkWidget *combo,
|
||||
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
0, display_text,
|
||||
1, value,
|
||||
NAME_COLUMN, display_text,
|
||||
VALUE_COLUMN, value,
|
||||
-1);
|
||||
}
|
||||
|
||||
struct ComboSet {
|
||||
GtkComboBox *combo;
|
||||
const char *value;
|
||||
const gchar *value;
|
||||
};
|
||||
|
||||
static gboolean
|
||||
set_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
|
||||
set_cb (GtkTreeModel *model,
|
||||
GtkTreePath *path,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
struct ComboSet *set_data = data;
|
||||
gboolean found;
|
||||
char *value;
|
||||
|
||||
gtk_tree_model_get (model, iter, 1, &value, -1);
|
||||
gtk_tree_model_get (model, iter, VALUE_COLUMN, &value, -1);
|
||||
found = (strcmp (value, set_data->value) == 0);
|
||||
g_free (value);
|
||||
|
||||
@@ -345,8 +354,8 @@ set_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data
|
||||
}
|
||||
|
||||
static void
|
||||
combo_box_set (GtkWidget *combo,
|
||||
const char *value)
|
||||
combo_box_set (GtkWidget *combo,
|
||||
const gchar *value)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
GtkListStore *store;
|
||||
@@ -364,24 +373,23 @@ static char *
|
||||
combo_box_get (GtkWidget *combo)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
char *val;
|
||||
gchar *value;
|
||||
GtkTreeIter iter;
|
||||
|
||||
if (GTK_IS_COMBO_BOX_ENTRY (combo))
|
||||
{
|
||||
val = gtk_combo_box_get_active_text(GTK_COMBO_BOX (combo));
|
||||
value = gtk_combo_box_get_active_text(GTK_COMBO_BOX (combo));
|
||||
}
|
||||
else
|
||||
{
|
||||
model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
|
||||
|
||||
val = NULL;
|
||||
value = NULL;
|
||||
if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter))
|
||||
gtk_tree_model_get (model, &iter,
|
||||
1, &val,
|
||||
-1);
|
||||
gtk_tree_model_get (model, &iter, VALUE_COLUMN, &value, -1);
|
||||
}
|
||||
return val;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
@@ -430,7 +438,7 @@ deconstruct_widgets (GtkPrinterOptionWidget *widget)
|
||||
}
|
||||
|
||||
static void
|
||||
check_toggled_cb (GtkToggleButton *toggle_button,
|
||||
check_toggled_cb (GtkToggleButton *toggle_button,
|
||||
GtkPrinterOptionWidget *widget)
|
||||
{
|
||||
GtkPrinterOptionWidgetPrivate *priv = widget->priv;
|
||||
@@ -443,7 +451,7 @@ check_toggled_cb (GtkToggleButton *toggle_button,
|
||||
}
|
||||
|
||||
static void
|
||||
filesave_changed_cb (GtkWidget *w,
|
||||
filesave_changed_cb (GtkWidget *button,
|
||||
GtkPrinterOptionWidget *widget)
|
||||
{
|
||||
GtkPrinterOptionWidgetPrivate *priv = widget->priv;
|
||||
@@ -487,11 +495,11 @@ filesave_changed_cb (GtkWidget *w,
|
||||
emit_changed (widget);
|
||||
}
|
||||
|
||||
static char *
|
||||
filter_numeric (const char *val,
|
||||
gboolean allow_neg,
|
||||
gboolean allow_dec,
|
||||
gboolean *changed_out)
|
||||
static gchar *
|
||||
filter_numeric (const gchar *val,
|
||||
gboolean allow_neg,
|
||||
gboolean allow_dec,
|
||||
gboolean *changed_out)
|
||||
{
|
||||
gchar *filtered_val;
|
||||
int i, j;
|
||||
@@ -530,8 +538,9 @@ filter_numeric (const char *val,
|
||||
|
||||
return filtered_val;
|
||||
}
|
||||
|
||||
static void
|
||||
combo_changed_cb (GtkWidget *combo,
|
||||
combo_changed_cb (GtkWidget *combo,
|
||||
GtkPrinterOptionWidget *widget)
|
||||
{
|
||||
GtkPrinterOptionWidgetPrivate *priv = widget->priv;
|
||||
@@ -582,11 +591,11 @@ combo_changed_cb (GtkWidget *combo,
|
||||
}
|
||||
|
||||
static void
|
||||
entry_changed_cb (GtkWidget *entry,
|
||||
entry_changed_cb (GtkWidget *entry,
|
||||
GtkPrinterOptionWidget *widget)
|
||||
{
|
||||
GtkPrinterOptionWidgetPrivate *priv = widget->priv;
|
||||
const char *value;
|
||||
const gchar *value;
|
||||
|
||||
g_signal_handler_block (priv->source, priv->source_changed_handler);
|
||||
value = gtk_entry_get_text (GTK_ENTRY (entry));
|
||||
@@ -602,7 +611,7 @@ radio_changed_cb (GtkWidget *button,
|
||||
GtkPrinterOptionWidget *widget)
|
||||
{
|
||||
GtkPrinterOptionWidgetPrivate *priv = widget->priv;
|
||||
char *value;
|
||||
gchar *value;
|
||||
|
||||
g_signal_handler_block (priv->source, priv->source_changed_handler);
|
||||
value = g_object_get_data (G_OBJECT (button), "value");
|
||||
@@ -616,7 +625,7 @@ static void
|
||||
select_maybe (GtkWidget *widget,
|
||||
const gchar *value)
|
||||
{
|
||||
char *v = g_object_get_data (G_OBJECT (widget), "value");
|
||||
gchar *v = g_object_get_data (G_OBJECT (widget), "value");
|
||||
|
||||
if (strcmp (value, v) == 0)
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
|
||||
@@ -632,11 +641,11 @@ alternative_set (GtkWidget *box,
|
||||
}
|
||||
|
||||
static GSList *
|
||||
alternative_append (GtkWidget *box,
|
||||
const gchar *label,
|
||||
const gchar *value,
|
||||
alternative_append (GtkWidget *box,
|
||||
const gchar *label,
|
||||
const gchar *value,
|
||||
GtkPrinterOptionWidget *widget,
|
||||
GSList *group)
|
||||
GSList *group)
|
||||
{
|
||||
GtkWidget *button;
|
||||
|
||||
@@ -875,7 +884,7 @@ update_widgets (GtkPrinterOptionWidget *widget)
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_printer_option_widget_has_external_label (GtkPrinterOptionWidget *widget)
|
||||
gtk_printer_option_widget_has_external_label (GtkPrinterOptionWidget *widget)
|
||||
{
|
||||
return widget->priv->label != NULL;
|
||||
}
|
||||
@@ -886,8 +895,8 @@ gtk_printer_option_widget_get_external_label (GtkPrinterOptionWidget *widget)
|
||||
return widget->priv->label;
|
||||
}
|
||||
|
||||
const char *
|
||||
gtk_printer_option_widget_get_value (GtkPrinterOptionWidget *widget)
|
||||
const gchar *
|
||||
gtk_printer_option_widget_get_value (GtkPrinterOptionWidget *widget)
|
||||
{
|
||||
GtkPrinterOptionWidgetPrivate *priv = widget->priv;
|
||||
|
||||
|
||||
@@ -50,14 +50,14 @@ struct _GtkPrinterOptionWidgetClass
|
||||
void (*changed) (GtkPrinterOptionWidget *widget);
|
||||
};
|
||||
|
||||
GType gtk_printer_option_widget_get_type (void) G_GNUC_CONST;
|
||||
GType gtk_printer_option_widget_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget * gtk_printer_option_widget_new (GtkPrinterOption *source);
|
||||
void gtk_printer_option_widget_set_source (GtkPrinterOptionWidget *setting,
|
||||
GtkPrinterOption *source);
|
||||
gboolean gtk_printer_option_widget_has_external_label (GtkPrinterOptionWidget *setting);
|
||||
GtkWidget * gtk_printer_option_widget_get_external_label (GtkPrinterOptionWidget *setting);
|
||||
const char *gtk_printer_option_widget_get_value (GtkPrinterOptionWidget *setting);
|
||||
GtkWidget *gtk_printer_option_widget_new (GtkPrinterOption *source);
|
||||
void gtk_printer_option_widget_set_source (GtkPrinterOptionWidget *setting,
|
||||
GtkPrinterOption *source);
|
||||
gboolean gtk_printer_option_widget_has_external_label (GtkPrinterOptionWidget *setting);
|
||||
GtkWidget *gtk_printer_option_widget_get_external_label (GtkPrinterOptionWidget *setting);
|
||||
const gchar *gtk_printer_option_widget_get_value (GtkPrinterOptionWidget *setting);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
#include "gtkprinter-private.h"
|
||||
#include "gtkprintjob.h"
|
||||
#include "gtklabel.h"
|
||||
#include "gtkalias.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
#include "gtkinvisible.h"
|
||||
#include "gtkplug.h"
|
||||
#include "gtkstock.h"
|
||||
#include "gtkalias.h"
|
||||
#include "gtk.h"
|
||||
#include "gtkwin32embedwidget.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
#define MAX_PAGE_RANGES 20
|
||||
#define STATUS_POLLING_TIME 2000
|
||||
@@ -1909,3 +1909,6 @@ gtk_print_run_page_setup_dialog_async (GtkWindow *parent,
|
||||
done_cb (new_page_setup, data);
|
||||
g_object_unref (new_page_setup);
|
||||
}
|
||||
|
||||
#define __GTK_PRINT_OPERATION_WIN32_C__
|
||||
#include "gtkaliasdef.c"
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "gtkprintutils.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
gdouble
|
||||
_gtk_print_convert_to_mm (gdouble len,
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <string.h>
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
#include "gtkprogress.h"
|
||||
#define GTK_DISABLE_DEPRECATED
|
||||
#include "gtkprivate.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "gtkquartz.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
NSImage *
|
||||
_gtk_quartz_create_image_from_pixbuf (GdkPixbuf *pixbuf)
|
||||
|
||||
+27
-8
@@ -2514,6 +2514,9 @@ rc_parse_token_or_compound (GScanner *scanner,
|
||||
if (g_scanner_peek_next_token (scanner) == G_TOKEN_IDENTIFIER)
|
||||
{
|
||||
GdkColor color;
|
||||
gchar rbuf[G_ASCII_DTOSTR_BUF_SIZE];
|
||||
gchar gbuf[G_ASCII_DTOSTR_BUF_SIZE];
|
||||
gchar bbuf[G_ASCII_DTOSTR_BUF_SIZE];
|
||||
|
||||
g_scanner_get_next_token (scanner);
|
||||
|
||||
@@ -2525,10 +2528,17 @@ rc_parse_token_or_compound (GScanner *scanner,
|
||||
return G_TOKEN_IDENTIFIER;
|
||||
}
|
||||
|
||||
g_string_append_printf (gstring, " { %0.4f, %0.4f, %0.4f }",
|
||||
(gdouble) color.red / 65535.0,
|
||||
(gdouble) color.green / 65535.0,
|
||||
(gdouble) color.blue / 65535.0);
|
||||
|
||||
g_string_append_printf (gstring, " { %s, %s, %s }",
|
||||
g_ascii_formatd (rbuf, sizeof (rbuf),
|
||||
"%0.4f",
|
||||
color.red / 65535.0),
|
||||
g_ascii_formatd (gbuf, sizeof (gbuf),
|
||||
"%0.4f",
|
||||
color.green / 65535.0),
|
||||
g_ascii_formatd (bbuf, sizeof (bbuf),
|
||||
"%0.4f",
|
||||
color.blue / 65535.0));
|
||||
break;
|
||||
}
|
||||
else
|
||||
@@ -2642,6 +2652,9 @@ gtk_rc_parse_assignment (GScanner *scanner,
|
||||
if (is_color)
|
||||
{
|
||||
GdkColor color;
|
||||
gchar rbuf[G_ASCII_DTOSTR_BUF_SIZE];
|
||||
gchar gbuf[G_ASCII_DTOSTR_BUF_SIZE];
|
||||
gchar bbuf[G_ASCII_DTOSTR_BUF_SIZE];
|
||||
GString *gstring;
|
||||
|
||||
g_scanner_get_next_token (scanner);
|
||||
@@ -2657,10 +2670,16 @@ gtk_rc_parse_assignment (GScanner *scanner,
|
||||
|
||||
gstring = g_string_new (NULL);
|
||||
|
||||
g_string_append_printf (gstring, " { %0.4f, %0.4f, %0.4f } ",
|
||||
(gdouble) color.red / 65535.0,
|
||||
(gdouble) color.green / 65535.0,
|
||||
(gdouble) color.blue / 65535.0);
|
||||
g_string_append_printf (gstring, " { %s, %s, %s }",
|
||||
g_ascii_formatd (rbuf, sizeof (rbuf),
|
||||
"%0.4f",
|
||||
color.red / 65535.0),
|
||||
g_ascii_formatd (gbuf, sizeof (gbuf),
|
||||
"%0.4f",
|
||||
color.green / 65535.0),
|
||||
g_ascii_formatd (bbuf, sizeof (bbuf),
|
||||
"%0.4f",
|
||||
color.blue / 65535.0));
|
||||
|
||||
g_value_init (&prop->value, G_TYPE_GSTRING);
|
||||
g_value_take_boxed (&prop->value, gstring);
|
||||
|
||||
@@ -2069,6 +2069,3 @@ _gtk_recent_chooser_default_new (GtkRecentManager *manager)
|
||||
"recent-manager", manager,
|
||||
NULL);
|
||||
}
|
||||
|
||||
#define __GTK_RECENT_CHOOSER_DEFAULT_C__
|
||||
#include "gtkaliasdef.c"
|
||||
|
||||
+12
-10
@@ -411,26 +411,28 @@ gtk_recent_chooser_menu_set_current_uri (GtkRecentChooser *chooser,
|
||||
if (!info)
|
||||
continue;
|
||||
|
||||
if (0 == strcmp (uri, gtk_recent_info_get_uri (info)))
|
||||
found = TRUE;
|
||||
if (strcmp (uri, gtk_recent_info_get_uri (info)) == 0)
|
||||
{
|
||||
gtk_menu_shell_activate_item (GTK_MENU_SHELL (menu),
|
||||
menu_item,
|
||||
TRUE);
|
||||
found = TRUE;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
g_list_free (children);
|
||||
|
||||
if (!found)
|
||||
if (!found)
|
||||
{
|
||||
g_set_error (error, GTK_RECENT_CHOOSER_ERROR,
|
||||
GTK_RECENT_CHOOSER_ERROR_NOT_FOUND,
|
||||
_("No recently used resource found with URI `%s'"),
|
||||
uri);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_menu_shell_activate_item (GTK_MENU_SHELL (menu), menu_item, TRUE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
static gchar *
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include "gtkrecentchooserutils.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
/* Methods */
|
||||
static void delegate_set_sort_func (GtkRecentChooser *chooser,
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <glib.h>
|
||||
|
||||
#include "gtksequence.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
typedef struct _GtkSequenceNode GtkSequenceNode;
|
||||
|
||||
|
||||
@@ -1450,6 +1450,8 @@ _gtk_settings_reset_rc_values (GtkSettings *settings)
|
||||
g_datalist_id_remove_data (&settings->queued_settings, key_id);
|
||||
}
|
||||
|
||||
g_slist_free (to_reset);
|
||||
|
||||
/* Now reset the active settings
|
||||
*/
|
||||
pspecs = g_object_class_list_properties (G_OBJECT_GET_CLASS (settings), NULL);
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include "gtksignal.h"
|
||||
#include "gtkalias.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
/* the real parameter limit is of course given by GSignal, bu we need
|
||||
* an upper limit for the implementations. so this should be adjusted
|
||||
|
||||
+22
-7
@@ -253,6 +253,16 @@ queue_resize_on_group (GtkSizeGroup *size_group)
|
||||
queue_resize_on_widget (size_group->widgets->data, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
initialize_size_group_quarks (void)
|
||||
{
|
||||
if (!size_groups_quark)
|
||||
{
|
||||
size_groups_quark = g_quark_from_static_string (size_groups_tag);
|
||||
visited_quark = g_quark_from_string (visited_tag);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_size_group_class_init (GtkSizeGroupClass *klass)
|
||||
{
|
||||
@@ -286,9 +296,8 @@ gtk_size_group_class_init (GtkSizeGroupClass *klass)
|
||||
"when determining the size of the group"),
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
size_groups_quark = g_quark_from_static_string (size_groups_tag);
|
||||
visited_quark = g_quark_from_string (visited_tag);
|
||||
|
||||
initialize_size_group_quarks ();
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -356,7 +365,7 @@ gtk_size_group_get_property (GObject *object,
|
||||
* Return value: a newly created #GtkSizeGroup
|
||||
**/
|
||||
GtkSizeGroup *
|
||||
gtk_size_group_new (GtkSizeGroupMode mode)
|
||||
gtk_size_group_new (GtkSizeGroupMode mode)
|
||||
{
|
||||
GtkSizeGroup *size_group = g_object_new (GTK_TYPE_SIZE_GROUP, NULL);
|
||||
|
||||
@@ -510,8 +519,8 @@ gtk_size_group_add_widget (GtkSizeGroup *size_group,
|
||||
* Removes a widget from a #GtkSizeGroup.
|
||||
**/
|
||||
void
|
||||
gtk_size_group_remove_widget (GtkSizeGroup *size_group,
|
||||
GtkWidget *widget)
|
||||
gtk_size_group_remove_widget (GtkSizeGroup *size_group,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
GSList *groups;
|
||||
|
||||
@@ -548,7 +557,7 @@ gtk_size_group_remove_widget (GtkSizeGroup *size_group,
|
||||
GSList *
|
||||
gtk_size_group_get_widgets (GtkSizeGroup *size_group)
|
||||
{
|
||||
return size_group->widgets;
|
||||
return size_group->widgets;
|
||||
}
|
||||
|
||||
static gint
|
||||
@@ -732,6 +741,8 @@ void
|
||||
_gtk_size_group_get_child_requisition (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
{
|
||||
initialize_size_group_quarks ();
|
||||
|
||||
if (requisition)
|
||||
{
|
||||
if (get_size_groups (widget))
|
||||
@@ -761,6 +772,8 @@ _gtk_size_group_compute_requisition (GtkWidget *widget,
|
||||
gint width;
|
||||
gint height;
|
||||
|
||||
initialize_size_group_quarks ();
|
||||
|
||||
if (get_size_groups (widget))
|
||||
{
|
||||
/* Only do the full computation if we actually have size groups */
|
||||
@@ -792,6 +805,8 @@ _gtk_size_group_compute_requisition (GtkWidget *widget,
|
||||
void
|
||||
_gtk_size_group_queue_resize (GtkWidget *widget)
|
||||
{
|
||||
initialize_size_group_quarks ();
|
||||
|
||||
queue_resize_on_widget (widget, TRUE);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "gtksocket.h"
|
||||
#include "gtksocketprivate.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
GdkNativeWindow
|
||||
_gtk_socket_windowing_get_id (GtkSocket *socket)
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "win32/gdkwin32.h"
|
||||
|
||||
#include "gtkwin32embed.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
GdkNativeWindow
|
||||
_gtk_socket_windowing_get_id (GtkSocket *socket)
|
||||
|
||||
+5
-5
@@ -39,8 +39,6 @@
|
||||
#include "gtkprivate.h"
|
||||
#include "gtkwidget.h"
|
||||
|
||||
#include "gtkalias.h"
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
#include "gtkicontheme.h"
|
||||
#include "gtklabel.h"
|
||||
@@ -49,6 +47,8 @@
|
||||
#define WM_GTK_TRAY_NOTIFICATION (WM_USER+1)
|
||||
#endif
|
||||
|
||||
#include "gtkalias.h"
|
||||
|
||||
#define BLINK_TIMEOUT 500
|
||||
|
||||
enum
|
||||
@@ -981,9 +981,6 @@ gtk_status_icon_reset_image_data (GtkStatusIcon *status_icon)
|
||||
{
|
||||
GtkStatusIconPrivate *priv = status_icon->priv;
|
||||
|
||||
priv->storage_type = GTK_IMAGE_EMPTY;
|
||||
g_object_notify (G_OBJECT (status_icon), "storage-type");
|
||||
|
||||
switch (priv->storage_type)
|
||||
{
|
||||
case GTK_IMAGE_PIXBUF:
|
||||
@@ -1013,6 +1010,9 @@ gtk_status_icon_reset_image_data (GtkStatusIcon *status_icon)
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
}
|
||||
|
||||
priv->storage_type = GTK_IMAGE_EMPTY;
|
||||
g_object_notify (G_OBJECT (status_icon), "storage-type");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+12
-1
@@ -32,7 +32,6 @@
|
||||
#include "gtkmarshalers.h"
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
#include "gtkoptionmenu.h"
|
||||
#define GTK_DISABLE_DEPRECATED
|
||||
#include "gtkrc.h"
|
||||
#include "gtkspinbutton.h"
|
||||
#include "gtkstyle.h"
|
||||
@@ -1584,6 +1583,8 @@ static void
|
||||
gtk_style_real_copy (GtkStyle *style,
|
||||
GtkStyle *src)
|
||||
{
|
||||
GtkStylePrivate *priv = GTK_STYLE_GET_PRIVATE (style);
|
||||
GtkStylePrivate *src_priv = GTK_STYLE_GET_PRIVATE (src);
|
||||
gint i;
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
@@ -1622,6 +1623,16 @@ gtk_style_real_copy (GtkStyle *style,
|
||||
if (src->rc_style)
|
||||
g_object_ref (src->rc_style);
|
||||
|
||||
g_slist_foreach (style->icon_factories, (GFunc) g_object_unref, NULL);
|
||||
g_slist_free (style->icon_factories);
|
||||
style->icon_factories = g_slist_copy (src->icon_factories);
|
||||
g_slist_foreach (style->icon_factories, (GFunc) g_object_ref, NULL);
|
||||
|
||||
g_slist_foreach (priv->color_hashes, (GFunc) g_hash_table_unref, NULL);
|
||||
g_slist_free (priv->color_hashes);
|
||||
priv->color_hashes = g_slist_copy (src_priv->color_hashes);
|
||||
g_slist_foreach (priv->color_hashes, (GFunc) g_hash_table_ref, NULL);
|
||||
|
||||
/* don't copy, just clear cache */
|
||||
clear_property_cache (style);
|
||||
}
|
||||
|
||||
+3
-15
@@ -567,10 +567,10 @@ gtk_text_buffer_finalize (GObject *object)
|
||||
|
||||
buffer = GTK_TEXT_BUFFER (object);
|
||||
|
||||
remove_all_selection_clipboards (buffer);
|
||||
|
||||
priv = GTK_TEXT_BUFFER_GET_PRIVATE (buffer);
|
||||
|
||||
remove_all_selection_clipboards (buffer);
|
||||
|
||||
if (buffer->tag_table)
|
||||
{
|
||||
_gtk_text_tag_table_remove_buffer (buffer->tag_table, buffer);
|
||||
@@ -3509,19 +3509,7 @@ gtk_text_buffer_remove_selection_clipboard (GtkTextBuffer *buffer,
|
||||
static void
|
||||
remove_all_selection_clipboards (GtkTextBuffer *buffer)
|
||||
{
|
||||
GSList *tmp_list = buffer->selection_clipboards;
|
||||
while (tmp_list)
|
||||
{
|
||||
SelectionClipboard *selection_clipboard = tmp_list->data;
|
||||
|
||||
if (gtk_clipboard_get_owner (selection_clipboard->clipboard) == G_OBJECT (buffer))
|
||||
gtk_clipboard_clear (selection_clipboard->clipboard);
|
||||
|
||||
g_free (selection_clipboard);
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
|
||||
g_slist_foreach (buffer->selection_clipboards, (GFunc)g_free, NULL);
|
||||
g_slist_free (buffer->selection_clipboards);
|
||||
buffer->selection_clipboards = NULL;
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
#include "gtktextbufferrichtext.h"
|
||||
#include "gtktextbufferserialize.h"
|
||||
#include "gtkalias.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
#include "gdk-pixbuf/gdk-pixdata.h"
|
||||
#include "gtktextbufferserialize.h"
|
||||
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
@@ -434,14 +434,13 @@ serialize_text (GtkTextBuffer *buffer,
|
||||
{
|
||||
GtkTextIter iter, old_iter;
|
||||
GSList *tag_list, *new_tag_list;
|
||||
GQueue *active_tags;
|
||||
int i;
|
||||
GSList *active_tags;
|
||||
|
||||
g_string_append (context->text_str, "<text>");
|
||||
|
||||
iter = context->start;
|
||||
tag_list = NULL;
|
||||
active_tags = g_queue_new ();
|
||||
active_tags = NULL;
|
||||
|
||||
do
|
||||
{
|
||||
@@ -453,29 +452,33 @@ serialize_text (GtkTextBuffer *buffer,
|
||||
find_list_delta (tag_list, new_tag_list, &added, &removed);
|
||||
|
||||
/* Handle removed tags */
|
||||
tmp = removed;
|
||||
while (tmp)
|
||||
for (tmp = removed; tmp; tmp = tmp->next)
|
||||
{
|
||||
GtkTextTag *tag = tmp->data;
|
||||
|
||||
g_string_append (context->text_str, "</apply_tag>");
|
||||
/* Only close the tag if we didn't close it before (by using
|
||||
* the stack logic in the while() loop below)
|
||||
*/
|
||||
if (g_slist_find (active_tags, tag))
|
||||
{
|
||||
g_string_append (context->text_str, "</apply_tag>");
|
||||
|
||||
/* We might need to drop some of the tags and re-add them afterwards */
|
||||
while (g_queue_peek_head (active_tags) != tag &&
|
||||
!g_queue_is_empty (active_tags))
|
||||
{
|
||||
added = g_list_prepend (added, g_queue_pop_head (active_tags));
|
||||
g_string_append_printf (context->text_str, "</apply_tag>");
|
||||
}
|
||||
/* Drop all tags that were opened after this one (which are
|
||||
* above this on in the stack)
|
||||
*/
|
||||
while (active_tags->data != tag)
|
||||
{
|
||||
added = g_list_prepend (added, active_tags->data);
|
||||
active_tags = g_slist_remove (active_tags, active_tags->data);
|
||||
g_string_append_printf (context->text_str, "</apply_tag>");
|
||||
}
|
||||
|
||||
g_queue_pop_head (active_tags);
|
||||
|
||||
tmp = tmp->next;
|
||||
active_tags = g_slist_remove (active_tags, active_tags->data);
|
||||
}
|
||||
}
|
||||
|
||||
/* Handle added tags */
|
||||
tmp = added;
|
||||
while (tmp)
|
||||
for (tmp = added; tmp; tmp = tmp->next)
|
||||
{
|
||||
GtkTextTag *tag = tmp->data;
|
||||
gchar *tag_name;
|
||||
@@ -505,14 +508,16 @@ serialize_text (GtkTextBuffer *buffer,
|
||||
|
||||
g_string_append_printf (context->text_str, "<apply_tag id=\"%d\">", GPOINTER_TO_INT (tag_id));
|
||||
}
|
||||
g_queue_push_head (active_tags, tag);
|
||||
|
||||
tmp = tmp->next;
|
||||
active_tags = g_slist_prepend (active_tags, tag);
|
||||
}
|
||||
|
||||
g_slist_free (tag_list);
|
||||
tag_list = new_tag_list;
|
||||
|
||||
g_list_free (added);
|
||||
g_list_free (removed);
|
||||
|
||||
old_iter = iter;
|
||||
|
||||
/* Now try to go to either the next tag toggle, or if a pixbuf appears */
|
||||
@@ -570,10 +575,10 @@ serialize_text (GtkTextBuffer *buffer,
|
||||
while (!gtk_text_iter_equal (&iter, &context->end));
|
||||
|
||||
/* Close any open tags */
|
||||
for (i = 0; i < g_queue_get_length (active_tags); i++) {
|
||||
for (tag_list = active_tags; tag_list; tag_list = tag_list->next)
|
||||
g_string_append (context->text_str, "</apply_tag>");
|
||||
}
|
||||
g_queue_free (active_tags);
|
||||
|
||||
g_slist_free (active_tags);
|
||||
g_string_append (context->text_str, "</text>\n</text_view_markup>\n");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@
|
||||
#include "gtkmain.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkalias.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -27,8 +27,8 @@
|
||||
#include "gtkseparatormenuitem.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkmain.h"
|
||||
#include "gtkalias.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "gtkalias.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#include "gtktreemodelfilter.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtktreednd.h"
|
||||
#include "gtkalias.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "gtkalias.h"
|
||||
#include <string.h>
|
||||
|
||||
/* ITER FORMAT:
|
||||
|
||||
@@ -402,8 +402,8 @@ gtk_tree_selection_get_selected (GtkTreeSelection *selection,
|
||||
* Since: 2.2
|
||||
**/
|
||||
GList *
|
||||
gtk_tree_selection_get_selected_rows (GtkTreeSelection *selection,
|
||||
GtkTreeModel **model)
|
||||
gtk_tree_selection_get_selected_rows (GtkTreeSelection *selection,
|
||||
GtkTreeModel **model)
|
||||
{
|
||||
GList *list = NULL;
|
||||
GtkRBTree *tree = NULL;
|
||||
@@ -413,13 +413,13 @@ gtk_tree_selection_get_selected_rows (GtkTreeSelection *selection,
|
||||
g_return_val_if_fail (GTK_IS_TREE_SELECTION (selection), NULL);
|
||||
g_return_val_if_fail (selection->tree_view != NULL, NULL);
|
||||
|
||||
if (model)
|
||||
*model = selection->tree_view->priv->model;
|
||||
|
||||
if (selection->tree_view->priv->tree == NULL ||
|
||||
selection->tree_view->priv->tree->root == NULL)
|
||||
return NULL;
|
||||
|
||||
if (model)
|
||||
*model = selection->tree_view->priv->model;
|
||||
|
||||
if (selection->type == GTK_SELECTION_NONE)
|
||||
return NULL;
|
||||
else if (selection->type != GTK_SELECTION_MULTIPLE)
|
||||
|
||||
+12
-1
@@ -13853,6 +13853,17 @@ gtk_tree_view_search_scroll_event (GtkWidget *widget,
|
||||
retval = TRUE;
|
||||
}
|
||||
|
||||
/* renew the flush timeout */
|
||||
if (retval && tree_view->priv->typeselect_flush_timeout
|
||||
&& !tree_view->priv->search_custom_entry_set)
|
||||
{
|
||||
g_source_remove (tree_view->priv->typeselect_flush_timeout);
|
||||
tree_view->priv->typeselect_flush_timeout =
|
||||
g_timeout_add (GTK_TREE_VIEW_SEARCH_DIALOG_TIMEOUT,
|
||||
(GSourceFunc) gtk_tree_view_search_entry_flush_timeout,
|
||||
tree_view);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -14648,7 +14659,7 @@ gtk_tree_view_set_grid_lines (GtkTreeView *tree_view,
|
||||
{
|
||||
gtk_widget_queue_draw (GTK_WIDGET (tree_view));
|
||||
|
||||
g_object_notify (G_OBJECT (tree_view), "grid-lines");
|
||||
g_object_notify (G_OBJECT (tree_view), "enable-grid-lines");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+6
-2
@@ -1941,6 +1941,7 @@ gboolean
|
||||
_gtk_menu_is_empty (GtkWidget *menu)
|
||||
{
|
||||
GList *children, *cur;
|
||||
gboolean result = TRUE;
|
||||
|
||||
g_return_val_if_fail (menu == NULL || GTK_IS_MENU (menu), TRUE);
|
||||
|
||||
@@ -1956,13 +1957,16 @@ _gtk_menu_is_empty (GtkWidget *menu)
|
||||
{
|
||||
if (!GTK_IS_TEAROFF_MENU_ITEM (cur->data) &&
|
||||
!g_object_get_data (cur->data, "gtk-empty-menu-item"))
|
||||
return FALSE;
|
||||
{
|
||||
result = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
cur = cur->next;
|
||||
}
|
||||
g_list_free (children);
|
||||
|
||||
return TRUE;
|
||||
return result;
|
||||
}
|
||||
|
||||
enum {
|
||||
|
||||
+1
-1
@@ -277,5 +277,5 @@ gtk_vbutton_box_size_allocate (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
#define __GTK_VBBOX_C__
|
||||
#define __GTK_VBBOX_C__
|
||||
#include "gtkaliasdef.c"
|
||||
|
||||
+3
-3
@@ -24,8 +24,8 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_VBUTTON_BOX_H__
|
||||
#define __GTK_VBUTTON_BOX_H__
|
||||
#ifndef __GTK_VBBOX_H__
|
||||
#define __GTK_VBBOX_H__
|
||||
|
||||
|
||||
#include <gtk/gtkbbox.h>
|
||||
@@ -73,4 +73,4 @@ void gtk_vbutton_box_set_layout_default (GtkButtonBoxStyle layout);
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
#endif /* __GTK_VBUTTON_BOX_H__ */
|
||||
#endif /* __GTK_VBBOX_H__ */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user