Commit Graph

7090 Commits

Author SHA1 Message Date
Emmanuele Bassi
d3aeccf774 Add search file support in the GtkFileChooser. Original patch by Federico
2007-05-02  Emmanuele Bassi  <ebassi@gnome.org>

	Add search file support in the GtkFileChooser. Original patch
	by Federico Mena Quintero; patch updated by Matthias Clasen.
	See bug #344785.

	* gtk/gtksearchengine.[ch]: Private search engine abstraction
	object.

	* gtk/gtksearchenginebeagle.[ch]: Private search engine
	implementation using libbeagle (via g_module_open()).

	* gtk/gtksearchenginesimple.[ch]: Private search engine
	implementation using file tree walking.

	* gtk/gtksearchenginetracker.[ch]: Private earch engine
	implementation using libtracker (via g_module_open()).

	* gtk/gtkquery.[ch]: Private query object for the search
	engines.

	* gtk/gtkfilechooserprivate.h:
	* gtk/gtkfilechooserdefault.c: Use the GtkSearchEngine to
	query a search engine backend using GtkQuery; create a new
	operating mode, OPERATION_MODE_SEARCH, and call the common
	operating mode OPERATION_MODE_BROWSE; add support for virtual
	shortcuts inside the shortcuts model and create a new "Search"
	virtual shortcut.

	* gtk/Makefile.am: Update the build with the new files

svn path=/trunk/; revision=17783
2007-05-02 22:51:43 +00:00
Armin Burgmeier
e82e337ee9 Destroy the menu in dispose instead of finalize, because the menu might
2007-05-02  Armin Burgmeier  <armin@openismus.com>

	* gtk/gtkcombobox.c: Destroy the menu in dispose instead of
	finalize, because the menu might unparent itself from its parent and
	cause a signal emission on a finalized object. (#430746)

svn path=/trunk/; revision=17782
2007-05-02 22:19:45 +00:00
Kristian Rietveld
ba51caa966 stop the rubber band if it's active.
2007-05-02  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktreeview.c (gtk_tree_view_grab_notify): stop the rubber band
	if it's active.


svn path=/trunk/; revision=17770
2007-05-02 08:08:39 +00:00
Matthias Clasen
fdd5aa6e5b Don't be too strict when checking icon flags. (#435062)
2007-05-01  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkiconcachevalidator.c: Don't be too strict when checking
        icon flags.  (#435062)



svn path=/trunk/; revision=17767
2007-05-02 02:19:08 +00:00
Matthias Clasen
321817db53 Only copy pngs when generating builtin cache
svn path=/trunk/; revision=17766
2007-05-02 02:15:36 +00:00
Matthias Clasen
098f74dfb1 Don't ignore the fact that gtk_file_system_get_parent() may return NULL.
2007-05-01  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilesystemmodel.c (_gtk_file_system_model_path_do):
        Don't ignore the fact that gtk_file_system_get_parent()
        may return NULL.  (#424042, Jan Martinek)



svn path=/trunk/; revision=17764
2007-05-02 01:19:59 +00:00
Christian Persch
5f7249557a Use GSlice for gtk_tree_iter_copy. Bug #434863.
2007-05-02  Christian Persch  <chpe@gnome.org>

	* gtk/gtktreemodel.c: (gtk_tree_iter_copy), (gtk_tree_iter_free): Use
	GSlice for gtk_tree_iter_copy. Bug #434863.

svn path=/trunk/; revision=17761
2007-05-01 22:32:57 +00:00
Christian Persch
77c55d66ef Put only GtkPaperSizes into the list, don't mix it with GtkPageSetups. Bug
2007-05-02  Christian Persch  <chpe@gnome.org>

	* gtk/gtkpapersize.c: (gtk_paper_size_get_paper_sizes): Put only
	GtkPaperSizes into the list, don't mix it with GtkPageSetups. Bug
	#434861.

svn path=/trunk/; revision=17760
2007-05-01 22:31:29 +00:00
Christian Persch
014994ce96 Use GSlice to allocate GtkPaperSize. Bug #434862.
2007-05-02  Christian Persch  <chpe@gnome.org>

	* gtk/gtkpapersize.c: (gtk_paper_size_new_from_info),
	(gtk_paper_size_new), (gtk_paper_size_new_custom),
	(gtk_paper_size_copy), (gtk_paper_size_free): Use GSlice to allocate
	GtkPaperSize. Bug #434862.

svn path=/trunk/; revision=17759
2007-05-01 22:26:00 +00:00
Christian Persch
f55cccb696 No need to allocate a guint; just stuff the ID into the pointer directly.
2007-05-02  Christian Persch  <chpe@gnome.org>

	* gtk/gtkstatusbar.c: (gtk_statusbar_get_context_id),
	(gtk_statusbar_expose_event): No need to allocate a guint; just stuff
	the ID into the pointer directly. Bug #434865.

svn path=/trunk/; revision=17758
2007-05-01 22:22:49 +00:00
Matthias Clasen
a5cbbdef91 Remove debug spew
svn path=/trunk/; revision=17756
2007-05-01 22:01:16 +00:00
Matthias Clasen
a9423f4964 add a new struct field to clear the file entry after the current folder
2007-05-01  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilechooserdefault.c (struct UpdateCurrentFolderData),
        (update_current_folder_get_info_cb): add a new struct field to clear
        the file entry after the current folder has been updated.

        (gtk_file_chooser_default_update_current_folder),
        (change_folder_and_display_error): Add a new function parameter to
        trigger file entry clearing.

        (edited_idle_create_folder_cb),
        (file_list_drag_data_received_get_info_cb),
        (gtk_file_chooser_default_map),
        (gtk_file_chooser_default_set_current_folder),
        (switch_to_selected_folder), (save_entry_get_info_cb),
        (shortcuts_activate_volume_mount_cb), (shortcuts_activate_volume),
        (shortcuts_activate_get_info_cb), (list_row_activated),
        (path_bar_clicked): use new function parameter appropriately.

        (gtk_file_chooser_default_should_respond): trigger file entry clearing
        after the directory is updated instead of clearing it before, this way
        we avoid reloading the completion model with the soon to be old folder,
        causing a warning and a glitch in the folder where completion happens.
        (#379414, Carlos Garnacho)


svn path=/trunk/; revision=17754
2007-05-01 20:35:33 +00:00
Matthias Clasen
2a80113304 Add an icon cache validator.
2007-05-01  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkiconcachvalidator.[hc]: Add an icon cache validator.

        * gtk/updateiconcache.c: Validate the generated cache before
        moving it in place. Also add a --validate option to validate
        an existing icon cache.

        * gtk/gtkiconcache.c: Validate icon caches before using them.

        * gtk/Makefile.am: Integrate it.


svn path=/trunk/; revision=17753
2007-05-01 20:00:17 +00:00
Christian Persch
a1b53272fd Also move gtk_print_capabilities_get_type() to the new location. Bug
2007-05-01  Christian Persch  <chpe@gnome.org>

	* gtk/gtkprinter.h:
	* gtk/gtkprintjob.h: Also move gtk_print_capabilities_get_type() to
	the new location. Bug #390437.

svn path=/trunk/; revision=17751
2007-05-01 13:33:47 +00:00
Matthias Clasen
c3d16b2780 Make sure we always have a color_hash. (#423916, Jens Granseuer)
2007-04-30  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtksettings.c (settings_update_color_scheme):
        Make sure we always have a color_hash.  (#423916, Jens Granseuer)



svn path=/trunk/; revision=17748
2007-04-30 19:27:08 +00:00
Christian Persch
1aa8a09fc2 Make gtk_printer_get_capabilities public, and move the
2007-04-30  Christian Persch  <chpe@gnome.org>

	* docs/reference/gtk/gtk-sections.txt:
	* gtk/gtk.symbols:
	* gtk/gtkprinter-private.h:
	* gtk/gtkprinter.c: (gtk_printer_get_capabilities),
	(gtk_print_capabilities_get_type):
	* gtk/gtkprinter.h:
	* gtk/gtkprintjob.c:
	* gtk/gtkprintjob.h:
	* gtk/gtkprintunixdialog.c: (selected_printer_changed):
	Make gtk_printer_get_capabilities public, and move the
	GtkPrintCapabilities definition to gtkprinter.h. Bug #390437.

svn path=/trunk/; revision=17747
2007-04-30 19:14:27 +00:00
Christian Persch
be87e9a8cd Make gtk_printer_get_capabilities public, and move the
2007-04-30  Christian Persch  <chpe@gnome.org>

	* docs/reference/gtk/gtk-sections.txt:
	* gtk/gtk.symbols:
	* gtk/gtkprinter-private.h:
	* gtk/gtkprinter.c: (gtk_printer_get_capabilities),
	(gtk_print_capabilities_get_type):
	* gtk/gtkprinter.h:
	* gtk/gtkprintunixdialog.c: (selected_printer_changed):
	Make gtk_printer_get_capabilities public, and move the
	GtkPrintCapabilities definition to gtkprinter.h. Bug #390437.

svn path=/trunk/; revision=17746
2007-04-30 19:12:00 +00:00
Matthias Clasen
3cc1085d97 A NO_WINDOW widget must not set the background of its window. (#433972,
2007-04-30  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkexpander.c (gtk_expander_realize): A NO_WINDOW widget
        must not set the background of its window.  (#433972,
        Guilherme Polo)


svn path=/trunk/; revision=17744
2007-04-30 17:57:53 +00:00
Matthias Clasen
6573ed5f12 Fix some compiler warnings. (#433642, Kjartan Maraas)
2007-04-30  Matthias Clasen  <mclasen@redhat.com>

        Fix some compiler warnings.  (#433642, Kjartan Maraas)

        * gtk/gtkfilesystemwin32.c (gtk_file_system_win32_get_info):
        (gtk_file_system_win32_create_folder):
        * gtk/gtkaction.c (gtk_action_create_menu): Fix NULL/FALSE confusion.

        * gtk/gtklinkbutton.c (gtk_link_button_clicked): Pass
        the right type to uri_func.

        * gtk/gtktext.c (gtk_text_key_press):
        * gtk/gtkstatusicon.c (gtk_status_icon_get_property):
        * gtk/gtkxembed.c (_gtk_xembed_send_message): Add casts.

        * gtk/gtktrayicon-x11.c (gtk_tray_icon_manager_window_destroyed):
        (gtk_tray_icon_delete):
        * gtk/gtkprintunixdialog.c (create_main_page):
        * gtk/gtkhsv.c (gtk_hsv_motion): Remove unused variables.

        * gtk/gtkliststore.c: Adapt callbacks to GSequence types.


svn path=/trunk/; revision=17739
2007-04-30 16:18:54 +00:00
Matthias Clasen
d2ab216455 Allow indents to be negative. (#Bug 434308)
2007-04-30  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktextview.c: Allow indents to be negative.  (#Bug 434308)


svn path=/trunk/; revision=17736
2007-04-30 15:17:45 +00:00
Michael Natterer
1a3b0b486c pop up the submenu explicitely only in touchscreen mode since otherwise
2007-04-30  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkmenushell.c (gtk_menu_shell_enter_notify): pop up the
	submenu explicitely only in touchscreen mode since otherwise
	selecting the item already pops up the submenu. Restores the
	drag-selection timeout (spotted by Søren Sandmann, #128968).


svn path=/trunk/; revision=17735
2007-04-30 13:00:07 +00:00
Michael Natterer
2e184cebef really rename gtk_paper_size_get_builtins() to
2007-04-30  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkpapersize.h: really rename gtk_paper_size_get_builtins()
	to gtk_paper_size_get_paper_sizes().


svn path=/trunk/; revision=17734
2007-04-30 09:55:14 +00:00
Tor Lillqvist
6398a264e9 _gtk_load_custom_papers() exists only on Unix.
2007-04-30  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkpapersize.c (gtk_paper_size_get_paper_sizes):
	_gtk_load_custom_papers() exists only on Unix.


svn path=/trunk/; revision=17733
2007-04-30 07:42:12 +00:00
Tor Lillqvist
26d179fa25 Add functionality to set overall opacity of a top-level window. (#405316)
2007-04-30  Tor Lillqvist  <tml@novell.com>

	Add functionality to set overall opacity of a top-level
	window. (#405316)

	* gtk/gtk.symbols: Add gtk_window_set_opacity and
	gtk_window_get_opacity.

	* gtk/gtkwindow.c (struct _GtkWindowPrivate,
	(gtk_window_class_init): Add opacity property, a double in the
	range [0, 1].
	(gtk_window_set_opacity, gtk_window_get_opacity): Implement.
	(gtk_window_realize): If opacity is set, call
	gdk_window_set_opacity().

	* gtk/gtkwindow.h: Declare gtk_window_set_opacity() and
	gtk_window_get_opacity().


svn path=/trunk/; revision=17731
2007-04-30 07:37:24 +00:00
Matthias Clasen
10862a344a Fix a compiler warning.
svn path=/trunk/; revision=17729
2007-04-30 06:04:48 +00:00
Matthias Clasen
7253a5a292 Rename gtk_paper_size_get_builtins() to gtk_paper_size_get_paper_sizes()
2007-04-30  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtk.symbols:
        * gtk/gtkpapersize.[hc]: Rename gtk_paper_size_get_builtins()
        to gtk_paper_size_get_paper_sizes() and optionally include
        custom paper sizes.

        * gtk/gtkpagesetupunixdialog.c: Internally export a function
        to load custom paper sizes.

        * modules/printbackends/file/gtkprintbackendfile.c: Implement
        printer_list_papers, returning all paper sizes.  (#434329,
        Christian Persch)


svn path=/trunk/; revision=17728
2007-04-30 06:03:01 +00:00
Matthias Clasen
23263cd43c Translate the default job name, and don't utf8-validate the job name in
2007-04-30  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkprintoperation.c: Translate the default job
        name, and don't utf8-validate the job name in the
        setter.  (#421993, Morten Welinder)



svn path=/trunk/; revision=17726
2007-04-30 05:08:26 +00:00
Matthias Clasen
a8698a24c7 Use g_unlink. (#421990, Morten Welinder)
2007-04-30  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkprintjob.c (gtk_print_job_get_surface): Use
        g_unlink.  (#421990, Morten Welinder)



svn path=/trunk/; revision=17724
2007-04-30 04:55:25 +00:00
Matthias Clasen
a788ef97a4 Fix some issues with reference handling in the printing code. (#429902,
2007-04-29  Matthias Clasen <mclasen@redhat.com>

        Fix some issues with reference handling in the printing
        code.  (#429902, Mathias Hasselmann)

        * gtk/gtkprintoperation.c (gtk_print_operation_finalize):
        Unref the print context, if we have one.
        (gtk_print_operation_done): Add a default ::done handler
        that unrefs the print context.
        (preview_ready): Take a reference on the print operation
        preview here.
        (print_pages_idle): ...not here,
        (preview_print_idle_done): ...and release it here.

        * tests/print-editor.c (preview_cb): Take a reference
        on the print operation here.

svn path=/trunk/; revision=17722
2007-04-30 04:45:33 +00:00
Matthias Clasen
7f95ef5ef3 Don't get stuck in a recursive mainloop if a synchronous preview is
2007-04-29  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkprintoperation.c (print_pages_idle): Don't get
        stuck in a recursive mainloop if a synchronous preview
        is cancelled.

svn path=/trunk/; revision=17721
2007-04-30 02:47:41 +00:00
Matthias Clasen
b9856ac887 Make the emission of ::end-print and ::done consistent for previews.
2007-04-29  Matthias Clasen <mclasen@redhat.com>

        Make the emission of ::end-print and ::done consistent
        for previews.  (#347567, Yevgen Muntyan)

        * gtk/gtkprintoperation.c (preview_iface_end_preview): Set
        the finished status here.
        (preview_end_run): ...and not here.
        (print_pages_idle_done): Emit ::done for a cancelled preview.
        (print_pages_idle): If a preview has been cancelled, don't
        emit ::ready, but emit ::end-print.

        tests/print-editor.c: Use ::end-print to undo allocations
        from ::begin-print.


svn path=/trunk/; revision=17719
2007-04-30 02:18:36 +00:00
Matthias Clasen
177f9aec9c Mark paper sizes in the PWG "custom" namespace as custom. Add a link to
2007-04-29  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkpapersize.c (gtk_paper_size_new): Mark paper sizes
        in the PWG "custom" namespace as custom. Add a link to
        the spec in the docs.  (#426416, Andreas Guelzow)



svn path=/trunk/; revision=17718
2007-04-30 00:19:19 +00:00
Matthias Clasen
69b57df8ce Remove leftover debugging spew
svn path=/trunk/; revision=17717
2007-04-29 23:21:32 +00:00
Matthias Clasen
86b19df30c Document that a print operation can be run only once, and add a
2007-04-29  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkprintoperation.c (gtk_print_operation_run): Document
        that a print operation can be run only once, and add a
        corresponding g_return_if_fail().   (#379399, Masao Mutoh)



svn path=/trunk/; revision=17715
2007-04-29 18:55:12 +00:00
Matthias Clasen
53931bcf21 Better version of the previous patch
svn path=/trunk/; revision=17712
2007-04-29 18:22:27 +00:00
Mattthias Clasen
99e8b92b6a Don't leak a file descriptor, and don't make the error dialog modal.
2007-04-29  Mattthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintoperation-unix.c 
        (_gtk_print_operation_platform_backend_launch_preview):
        Don't leak a file descriptor, and don't make the error
        dialog modal.  (#421985, Morten Welinder)



svn path=/trunk/; revision=17708
2007-04-29 18:03:35 +00:00
Matthias Clasen
b3b619cabf Only strip parentheses of the form (_x). (#434261, Brian Wellington)
2007-04-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores):
        Only strip parentheses of the form (_x).  (#434261,
        Brian Wellington)


svn path=/trunk/; revision=17705
2007-04-29 07:20:50 +00:00
Matthias Clasen
034ec57184 Support passing a print settings file to the preview command. (#403717,
2007-04-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintoperation-unix.c
        (_gtk_print_operation_platform_backend_launch_preview):
        Support passing a print settings file to the preview
        command.  (#403717, Christian Persch)

        * gtk/gtksettings.c: Document %s in the
        gtk-print-preview-command setting.


svn path=/trunk/; revision=17704
2007-04-29 06:59:27 +00:00
Matthias Clasen
924d9163b4 Fix the build
svn path=/trunk/; revision=17701
2007-04-29 06:50:42 +00:00
Matthias Clasen
557ff70925 Also check the default handler when deciding whether to emit the paginate
2007-04-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintoperation.c (print_pages_idle): Also check
        the default handler when deciding whether to emit the
        paginate signal.  (#345345, Yevgen Muntyan)



svn path=/trunk/; revision=17698
2007-04-29 06:34:12 +00:00
Matthias Clasen
3c5bd522b3 Add a new error code
2007-04-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintoperation.h: Add a new error code

        * gtk/gtk.symbols:
        * gtk/gtkpagesetup.[hc]:
        * gtk/gtkpapersize.[hc]:
        * gtk/gtkprintsettings.[hc]: Add functions to serialize
        and deserialize page setups and print settings to files
        and key files.  (#344515, Christian Persch)

        * gtk/gtkpagesetupunixdialog.c: Adapt to the new functions.

        * tests/print-editor.c: Use the new functions to persist
        page setup and print settings.


svn path=/trunk/; revision=17697
2007-04-29 06:23:58 +00:00
Matthias Clasen
ea3667c49c Free the custom paper list. (#403267, Felix Riemann)
2007-04-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkpagesetupunixdialog.c (gtk_page_setup_unix_dialog_finalize):
        Free the custom paper list.  (#403267, Felix Riemann)



svn path=/trunk/; revision=17695
2007-04-29 05:06:06 +00:00
Matthias Clasen
6f8d92f369 Fix a small memory leak. (#403251, Felix Riemann)
2007-04-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprintjob.c (gtk_print_job_get_surface): Fix a
        small memory leak.  (#403251, Felix Riemann)



svn path=/trunk/; revision=17693
2007-04-29 04:58:20 +00:00
Matthias Clasen
4e316dd99e Add a function to list the builtin paper sizes. (#382355, Christian
2007-04-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtk.symbols:
        * gtk/gtkpapersize.[hc]: Add a function to list the
        builtin paper sizes.  (#382355, Christian Persch)



svn path=/trunk/; revision=17691
2007-04-29 04:50:28 +00:00
Matthias Clasen
bcbbbe5101 Make gtk_printer_has_details() and gtk_printer_request_details() public.
2007-04-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtk.symbols:
        * gtk/gtkprinter-private.h:
        * gtk/gtkprinter.[hc]: Make gtk_printer_has_details() and
        gtk_printer_request_details() public.

        * gtk/gtkpagesetupunixdialog.c:
        * gtk/gtkprintunixdialog.c: Update callers.  (#389203,
        Christian Persch)



svn path=/trunk/; revision=17690
2007-04-29 04:42:13 +00:00
Matthias Clasen
6a3a43ddcc Add a way to specify accumulative margins. (#344499, Nate Nielsen)
2007-04-28  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktexttag.[hc]: Add a way to specify accumulative
        margins.  (#344499, Nate Nielsen)



svn path=/trunk/; revision=17685
2007-04-29 01:14:29 +00:00
Matthias Clasen
8dd48ab148 Fix the offsets of the input-only window if we also have a visible window.
2007-04-28  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkeventbox.c (gtk_event_box_realize): Fix the offsets
        of the input-only window if we also have a visible window.
        (#405089)


svn path=/trunk/; revision=17683
2007-04-28 21:45:39 +00:00
Matthias Clasen
6c98ef3356 Recognize negative column indices as invalid. (#415260, Chris Wilson)
2007-04-28  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkliststore.c (gtk_list_store_set_valist_internal):
        * gtk/gtktreestore.c (gtk_tree_store_set_valist_internal):
        Recognize negative column indices as invalid.  (#415260,
        Chris Wilson)


svn path=/trunk/; revision=17681
2007-04-28 21:29:05 +00:00
Matthias Clasen
0b4b5d5ee0 Same fix for gtk_entry_real_insert_text
svn path=/trunk/; revision=17679
2007-04-28 18:04:00 +00:00
Matthias Clasen
08c05b1bcc Only call g_object_get() when necessary. (#373137, Morten Welinder, patch
2007-04-28  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkentry.c (gtk_entry_grab_focus): Only call
        g_object_get() when necessary.  (#373137, Morten Welinder,
        patch by Xan Lopez)


svn path=/trunk/; revision=17678
2007-04-28 17:53:50 +00:00