Commit Graph

7408 Commits

Author SHA1 Message Date
Matthias Clasen
73696ef8be Don't ignore errors from g_option_context_parse().
2005-12-06  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.c (gdk_parse_args):
	* gtk/gtkmain.c (gtk_parse_args): Don't ignore errors
	from g_option_context_parse().
2005-12-06 16:44:31 +00:00
Tim Janik
83344dae85 fix missing hash table initialization.
Tue Dec  6 11:37:59 2005  Tim Janik  <timj@gtk.org>

        * gdk/gdkevents.c (gdk_event_new): fix missing hash table
        initialization.
2005-12-06 10:40:09 +00:00
Tim Janik
eed3357e6c ported memchunk uses to g_slice, so the code compiles again.
Tue Dec  6 10:32:17 2005  Tim Janik  <timj@gtk.org>

        * gtk/gtkstatusbar.c: ported memchunk uses to g_slice, so the code
        compiles again.
2005-12-06 09:34:27 +00:00
Federico Mena Quintero
446d1edbdb "event->state & modifiers", not "event->state && modifiers". Patch by
2005-12-05  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (trap_activate_cb): "event->state &
	modifiers", not "event->state && modifiers".  Patch by Sadrul
	Habib Chowdhury <imadil@gmail.com>.  Fixes bug #323073.
2005-12-06 03:11:43 +00:00
Matthias Clasen
7dc70fba99 Use g_slice instead of mem chunks.
2005-12-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c:
	* gtk/gtkuimanager.c:
	* gtk/gtktreedatalist.c:
	* gtk/gtktext.c:
	* gtk/gtkmain.c:
	* gtk/gtkitemfactory.c:
	* gtk/gtkseparator.[hc]:
	* gtk/gtkclist.[hc]:
	* gtk/gtkctree.c:
	* gtk/gtkgc.c: Use g_slice instead of mem chunks.
2005-12-05 21:28:32 +00:00
Michael Natterer
40894e9a49 map the new GtkSettings properties "timeout-initial", "timeout-repeat",
2005-12-05  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkevents-x11.c: map the new GtkSettings properties
	"timeout-initial", "timeout-repeat", "color-scheme" and
	"enable-enimations" to X settings.
2005-12-05 21:06:57 +00:00
Matthias Clasen
3353d528b4 Use g_slice instead of mem chunks.
2005-12-05  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkevents.c:
	* gdk/gdkcolor.c: Use g_slice instead of mem chunks.
2005-12-05 20:51:18 +00:00
Matthias Clasen
eb79da2f53 Free new_event after sending it to the search entry. (#323209, Crispin
2005-12-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_key_press): Free new_event
	after sending it to the search entry.  (#323209, Crispin Flowerday)
2005-12-05 20:12:33 +00:00
Matthias Clasen
30b574374c Add a note about GTK_FLOATING.
2005-12-05  Matthias Clasen  <mclasen@redhat.com>

	* README.in: Add a note about GTK_FLOATING.
2005-12-05 16:39:29 +00:00
Matthias Clasen
2ed17574f9 Use g_object_is_floating.
2005-12-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkobject.h (GTK_OBJECT_FLOATING): Use g_object_is_floating.
2005-12-05 15:49:55 +00:00
Matthias Clasen
3852054fd2 Don't leak a pixbuf. (#323024, Paolo Borelli)
2005-12-02  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktoolbutton.c (clone_image_menu_size): Don't leak
        a pixbuf.  (#323024, Paolo Borelli)
2005-12-02 20:57:45 +00:00
Matthias Clasen
0b1fa236fd Don't crash if mime_type is NULL. (#322998, Sadrul Habib Chowdhury)
2005-12-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesystemunix.c (get_icon_for_mime_type): Don't crash
	if mime_type is NULL.  (#322998, Sadrul Habib Chowdhury)
2005-12-02 19:57:36 +00:00
Michael Natterer
b3f1be3b56 applied modified patch from maemo-gtk which adds a "horizontal-padding"
2005-12-02  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkmenu.c: applied modified patch from maemo-gtk which
	adds a "horizontal-padding" style property. Fixes bug #323036.
2005-12-02 19:49:10 +00:00
Michael Natterer
dd7c0d77b1 Merged modified patch from maemo-gtk that allows to disable toolbar
2005-12-01  Michael Natterer  <mitch@imendio.com>

	Merged modified patch from maemo-gtk that allows to disable
	toolbar animations. Addresses bug #142582.

	* gtk/gtksettings.c: added boolean property "gtk-enable-animations".
	(patch from Christian Neumair)

	* gtk/gtktoolbar.c: don't animate toolbar changes if the settings
	property is FALSE. Replaced the individual "notify::foo"
	connections to GtkSettings by a single "notify" callback and
	dispatch internally.
2005-12-01 20:49:17 +00:00
Michael Natterer
5e1335376f removed redundant assignment of widget_class->motion_notify_event.
2005-12-01  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkmenu.c (gtk_menu_class_init): removed redundant
	assignment of widget_class->motion_notify_event.
2005-12-01 13:03:43 +00:00
Matthias Clasen
d29ec308bd Add an active property. (#322673, Jorn Baayen)
2005-11-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktoggleaction.c (gtk_toggle_action_class_init): Add
	an active property.  (#322673, Jorn Baayen)
2005-11-30 04:25:34 +00:00
Matthias Clasen
924765a2fe Properly handle model changes in GtkTreeSelection: (#322569, Milosz
2005-11-29  Matthias Clasen  <mclasen@redhat.com>

	Properly handle model changes in GtkTreeSelection: (#322569,
	Milosz Derezynski)

	* gtk/gtktreeselection.c (gtk_tree_selection_selected_foreach):
	Get a reference to the model, and stop the iteration if the model
	of the treeview is changed on the way.

	* gtk/gtktreeprivate.h:
	* gtk/gtktreeselection.c (_gtk_tree_selection_emit_changed): New
	private function to emit the GtkTreeSelection::changed signal.

	* gtk/gtktreeview.c (gtk_tree_view_set_model): Call
	_gtk_tree_selection_emit_changed() when the model changes.
2005-11-29 19:34:15 +00:00
Federico Mena Quintero
62ed8cb115 Fixes the critical warnings from bug #317999, thus fixing the bug
2005-11-28  Federico Mena Quintero  <federico@ximian.com>

	Fixes the critical warnings from bug #317999, thus fixing the bug
	completely:

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_get_paths): In SELECT_FOLDER mode,
	use _gtk_file_chooser_get_current_folder_path() instead of fetching the
	impl->current_folder directly.  The latter may be null if we are
	in RELOAD_NONE state.
2005-11-29 01:15:13 +00:00
Federico Mena Quintero
4ac1632f10 Fix bug #321560, based on a patch by Bogdan Nicula (bogdanni@hotmail.com):
2005-11-28  Federico Mena Quintero  <federico@ximian.com>

	Fix bug #321560, based on a patch by Bogdan Nicula (bogdanni@hotmail.com):

	* gtk/gtkfilechooserdefault.c (up_folder_handler): Don't add the
	current_folder to the pending select paths here; the path bar will
	give it to us now.
	(path_bar_clicked): Add the child_path to the pending select paths
	here.
	(show_and_select_paths): Don't filter out folders.
	(show_and_select_paths): Don't take separate arguments for
	only_one_path and multiple paths.

	* tests/autotestfilechooser.c (test_folder_switch_and_filters):
	New test about preserving the filters when we change folders.
2005-11-28 22:25:03 +00:00
Matthias Clasen
5eb2aac947 Insert an LRM, to prevent -20 to come out as 20- in RTL locales. (#322571,
2005-11-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkscale.c (_gtk_scale_format_value): Insert an LRM, to prevent
	-20 to come out as 20- in RTL locales.  (#322571, Tze'ela Hebron)
2005-11-28 16:00:26 +00:00
Matthias Clasen
be2dc85cc1 Buttons use the label property for stock ids. (#322565, Milosz Derezynski)
2005-11-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaction.c (gtk_action_sync_button_stock_id)
	(connect_proxy): Buttons use the label property for stock ids.  (#322565,
	Milosz Derezynski)
2005-11-28 15:42:00 +00:00
Matthias Clasen
4edf06d016 Correctly handle the cell list and indices into it. (#321856)
2005-11-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (update_text_cell, update_pixbuf_cell): Correctly
	handle the cell list and indices into it.  (#321856)
2005-11-28 15:32:44 +00:00
Matthias Clasen
6be42231b8 Set timer_tag to 0 when the timeout is done. (#322291, Jean-Yves Lefort)
2005-11-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktooltips.c (gtk_tooltips_timeout): Set timer_tag to 0 when
	the timeout is done.  (#322291, Jean-Yves Lefort)
2005-11-28 14:17:06 +00:00
Matthias Clasen
9228dcee29 Make F2 work for renaming bookmarks. (#320822, Jaap A. Haitsma, patch by
2005-11-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_key_press_event_cb): Make
	F2 work for renaming bookmarks.  (#320822, Jaap A. Haitsma, patch
	by Paolo Borelli)
2005-11-28 14:03:20 +00:00
Tor Lillqvist
2aadb2dff2 Implement the conditional use of FlashWindowEx() properly for MSVC
2005-11-28  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_urgency_hint):
	Implement the conditional use of FlashWindowEx() properly for MSVC
	compilations. The code was confusingly assuming that if compiled
	with a "new" compiler, it will only be run on "new" Windows
	versions. We want it to run on "old" versions, too, even if
	compiled with a "new" compiler. There are two orthogonal issues:
	whether the compiler defines the necessary API in its headers, and
	whether it is present at run-time. (#318077)
2005-11-28 08:40:56 +00:00
Tor Lillqvist
954deb7bf3 Use GetLocaleInfo() on Windows to get the localized weekday and month
2005-11-28  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkcalendar.c (gtk_calendar_init): Use GetLocaleInfo() on
	Windows to get the localized weekday and month names. strftime()
	in the Microsoft C library returns strings in the default codepage
	for the locale of the process, not the system codepage. Thus
	g_locale_to_utf8() isn't useable on the return value from
	strftime(). (#322603)
2005-11-28 01:51:08 +00:00
Matthias Clasen
d3a05fe03c Fix an example. (#322493, Elie De Brauwer)
2005-11-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmessagedialog.c (gtk_message_dialog_new_with_markup):
	Fix an example.  (#322493, Elie De Brauwer)
2005-11-27 20:48:41 +00:00
Matthias Clasen
7014ef0032 Fix two memory handling problems in GtkTreeView: (#322350, Søren
2005-11-27  Matthias Clasen  <mclasen@redhat.com>

	Fix two memory handling problems in GtkTreeView: (#322350,
	Søren Sandmann)

	* gtk/gtktreeview.c (gtk_tree_view_destroy)
	(gtk_tree_view_set_model): Remove all references to nodes in
	the old model.
	(gtk_tree_view_real_collapse_row): Unmark expanded_collapsed_node
	before removing the children.
2005-11-27 20:36:15 +00:00
Matthias Clasen
6662729301 Don't leak a PangoLayout here. (#322505, Paolo Borelli)
2005-11-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcolorbutton.c (gtk_color_button_init): Don't leak a
	PangoLayout here.  (#322505, Paolo Borelli)
2005-11-27 20:23:46 +00:00
Tor Lillqvist
3ff34d06e8 Once again rework Win32 window decoration code. Doesn't break #104514. The
2005-11-27  Tor Lillqvist  <tml@novell.com>

	Once again rework Win32 window decoration code. Doesn't break
	#104514. The dialogs in gtk-demo now have the same decorations and
	behaviour as on X11. Tried to fix #322516 but it seems very hard
	to make the trivial sample program there behave as expected. OTOH,
	simply moving the gtk_window_decorate() call in the #322516 sample
	program after the call to gtk_widget_show() helps...

	* gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
	the correct semantics. Each call to gdk_window_set_decorations()
	which calls this function is supposed to affect all decorations.

	(decorate_based_on_hints): New function, looks at both geometry
	hints and type hint and sets window decorations based on
	that. Consolidate code from gdk_window_set_geometry_hints() and
	gdk_window_set_type_hint() here.

	(gdk_window_set_geometry_hints, gdk_window_set_type_hint): Call
	decorate_based_on_hints().
2005-11-27 02:58:09 +00:00
Tor Lillqvist
575149342b Revert to the correct semantics. (#322516)
2005-11-27  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (set_or_clear_style_bits): Revert to
	the correct semantics. (#322516)
	(gdk_window_set_geometry_hints): Adjust call correspondingly.
2005-11-27 00:20:55 +00:00
Dom Lachowicz
735d98916e Merge with gtk-wimp's CVS. Includes improved menu icon spacing, [+]/[-]
* modules/engines/ms-windows/*.[ch]: Merge with gtk-wimp's CVS.
	Includes improved menu icon spacing, [+]/[-] expander drawing,
	status-bar gippie drawing, and notebook tab drawing.
2005-11-25 23:47:46 +00:00
Michael Natterer
ff7a092232 changed two private guint that used to hold signal handler IDs to two
2005-11-24  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktoolbar.h (struct _GtkToolbar): changed two private guint
	that used to hold signal handler IDs to two guint of padding.

	* gtk/gtktoolbar.c (struct _GtkToolbarPrivate): added them as
	gulong here.

	(gtk_toolbar_screen_changed): changed accordingly.
2005-11-24 16:51:22 +00:00
Tim Janik
fbb2e3f4f5 deprecated floating/sink API and implemented it in terms of the GObject
Wed Nov 23 18:55:47 2005  Tim Janik  <timj@imendio.com>

        * gtk/gtkobject.[hc]: deprecated floating/sink API and implemented it
        in terms of the GObject floating/sink API.

        * gtk/gtkaboutdialog.c:
        * gtk/gtkaction.c:
        * gtk/gtkcellview.c:
        * gtk/gtkclist.c:
        * gtk/gtkcolorsel.c:
        * gtk/gtkcombobox.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkiconview.c:
        * gtk/gtkinvisible.c:
        * gtk/gtkitemfactory.c:
        * gtk/gtklayout.c:
        * gtk/gtkmenu.c:
        * gtk/gtkmenutoolbutton.c:
        * gtk/gtknotebook.c:
        * gtk/gtkprogress.c:
        * gtk/gtkrange.c:
        * gtk/gtkspinbutton.c:
        * gtk/gtkstatusicon.c:
        * gtk/gtktext.c:
        * gtk/gtktextview.c:
        * gtk/gtktoolbar.c:
        * gtk/gtktoolbutton.c:
        * gtk/gtktoolitem.c:
        * gtk/gtktreeitem.c:
        * gtk/gtktreeview.c:
        * gtk/gtktreeviewcolumn.c:
        * gtk/gtkuimanager.c:
        * gtk/gtkviewport.c:
        * gtk/gtkwidget.c:
        * gtk/gtkwindow.c:
        ported to use GObject's g_object_ref_sink().

        * gtk/gtkcolorsel.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkaboutdialog.c:
        fixed compiler warnings.
2005-11-23 18:06:58 +00:00
Matthias Clasen
9856c1b25a Document symbolic colors and color expressions.
2005-11-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/tmpl/gtkrc.sgml: Document symbolic colors and
	color expressions.
2005-11-23 17:11:36 +00:00
Behdad Esfahbod
124f1d7116 Fix typo when checking libtool config deplibs_check_method. Moreover,
2005-11-23  Behdad Esfahbod  <behdad@gnome.org>

        * configure.in (enable_explicit_deps): Fix typo when checking
        libtool config deplibs_check_method. Moreover, enable explicit
        deps if we get anything other than pass_all from libtool. (part of
        #318750)
2005-11-23 16:51:23 +00:00
Matthias Clasen
8007463815 Don't create a big string, since Visual C++ doesn't like strings longer
2005-11-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/updateiconcache.c (write_csource): Don't create a big
	string, since Visual C++ doesn't like strings longer than 64k.
	(#322238, Kazuki IWAMOTO
2005-11-23 15:09:47 +00:00
Matthias Clasen
fce9359e47 Include gtkimcontextsimple.h (#322235, Kazuki IWAMOTO)
2005-11-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c: Include gtkimcontextsimple.h  (#322235,
	Kazuki IWAMOTO)
2005-11-23 14:35:05 +00:00
Michael Natterer
a2f1956865 don't leak all toplevel windows on other screens (correctly remove all
2005-11-23  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkrc.c (gtk_rc_reset_widgets): don't leak all toplevel
	windows on other screens (correctly remove all temporary
	references).
2005-11-23 14:23:26 +00:00
Michael Natterer
de3155a4c2 Added symbolic themable colors. Patch is a merged version of proposals
2005-11-23  Michael Natterer  <mitch@imendio.com>

	Added symbolic themable colors. Patch is a merged version of
	proposals from Matthias and maemo-gtk. Fixes bug #114355.

	* configure.in: require glib >= 2.9.1 for refcountable hashtables.

	* gtk/gtksettings.c: added property "color-scheme" which is a
	string defining colors like "foreground:black\nbackground:grey".
	Automatically provide a name->GdkColor hash table mapping for the
	color scheme.

	* gtk/gtkrc.[ch]: added list of color hashes that works like the
	list of icon factories. Append the color scheme hash from
	GtkSettings if it exists. Extended gtkrc syntax to allow defining
	and referencing of logical colors. Also allow to modulate colors
	in gtkrc by using arbitrary expressions of mix(), shade(),
	lighter() and darker(). Added internal function
	_gtk_rc_style_get_color_hashes().

	* gtk/gtkstyle.[ch]: keep a private list of color hashes around.
	Get the list from _gtk_rc_style_get_color_hashes(). Export
	internal function _gtk_style_shade() (used by above color
	expressions). Added public API gtk_style_lookup_color() which
	looks up a logical color by name.

	* gtk/gtk.symbols: add gtk_style_lookup_color

	* tests/testgtkrc: use symbolic colors for making
	the scrollbars red.
2005-11-23 10:33:58 +00:00
Michael Natterer
dfa4870b74 Made button-press timeouts which work like key repeat timeouts
2005-11-22  Michael Natterer  <mitch@imendio.com>

	Made button-press timeouts which work like key repeat timeouts
	configurable. Addresses bug #142582:

	* gtk/gtksettings.c: added properties "gtk-timeout-initial" and
	"gtk-timeout-repeat" which defalt to 200/20 (ms).

	Use the values from GtkSettings instead of hardcoding them
	(the repeat value is either taken as-is for fast repeat or
	multiplied by 5 for slow repeat). Changed all places to use these
	two standard initial/repeat timings:

	* gtk/gtkcalendar.c (unchanged 200/20)
	* gtk/gtknotebook.c (unchanged 200/100)
	* gtk/gtkpathbar.c (changed from 300/150 to 200/100)
	* gtk/gtkrange.c (changed from 250/100 to 200/100)
	* gtk/gtkspinbutton.c (unchanged 200/20)
2005-11-22 12:40:15 +00:00
Anders Carlsson
1097260aa7 Add quartz backend.
2005-11-21  Anders Carlsson  <andersca@imendio.com>

        * configure.in:
        * gtk/Makefile.am:
        * gdk/Makefile.am:
	* gdk/quartz/*:
	Add quartz backend.

        * docs/tools/Makefile.am:
	Only build docshooter when the X11 backend is used.

        * gtk/gtkplug-stub.c:
	Include gtkplug.h here.

        * gtk/gtksocket-stub.c:
	Include gtksocket.h here.
2005-11-22 10:03:32 +00:00
Anders Carlsson
fbebb232db Add quartz backend.
2005-11-21  Anders Carlsson  <andersca@imendio.com>

        * configure.in:
        * gtk/Makefile.am:
        * gdk/Makefile.am:
        * gdk/quartz/*:
        Add quartz backend.

        * docs/tools/Makefile.am:
        Only build docshooter when the X11 backend is used.

        * gtk/gtkplug-stub.c:
        Include gtkplug.h here.

        * gtk/gtksocket-stub.c:
        Include gtksocket.h here.
2005-11-22 10:01:03 +00:00
Matthias Clasen
7844a006f4 Convert GtkSocket to g_type_class_add_private.
2005-11-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtksocket.c: Convert GtkSocket to g_type_class_add_private.
2005-11-21 16:24:59 +00:00
Matthias Clasen
c613c6bef7 Convert GtkMenu to g_type_class_add_private.
2005-11-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenu.c: Convert GtkMenu to g_type_class_add_private.
2005-11-21 16:15:11 +00:00
Matthias Clasen
adcf33fa4d Add a tearoff-title property, with getter and setter. (#316482, Olexiy
2005-11-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkcombobox.[hc]: Add a tearoff-title property,
	with getter and setter.  (#316482, Olexiy Avramchenko)

	* tests/testcombo.c (main): Test gtk_combo_box_set_title
2005-11-21 16:01:56 +00:00
Matthias Clasen
72f709a864 Merge remaining fixes from the 2.8 branch, pointed out by Michael
2005-11-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkpathbar.c: Merge remaining fixes from the 2.8 branch,
	pointed out by Michael Natterer.
2005-11-21 15:00:57 +00:00
Matthias Clasen
02663e7121 Fix for bug #321542, Benedikt Meurer:
2005-11-21  Matthias Clasen  <mclasen@redhat.com>

	Fix for bug #321542, Benedikt Meurer:

	* gtk/gtkcombobox.c (gtk_combo_box_set_active_internal):
	Emit notify::active.

	(gtk_combo_box_child_show, gtk_combo_box_child_hide): Use
	g_signal_emit, not g_signal_emit_by_name.
2005-11-21 14:34:52 +00:00
Matthias Clasen
6e4a379e93 Fix crashes in connection with pathbar scrolling (#321560, Bogdan Nicula)
2005-11-18  Matthias Clasen  <mclasen@redhat.com>

	Fix crashes in connection with pathbar scrolling (#321560,
	Bogdan Nicula)

	* gtk/gtkpathbar.c (gtk_path_bar_update_slider_buttons):
	Stop scrolling when desensitising slider buttons.
	(gtk_path_bar_scroll_timeout, gtk_path_bar_slider_button_press):
	And use it here.

	* gtk/gtkpathbar.h (struct _GtkPathBar): Add a separate
	scrolling_down flag.
2005-11-19 03:46:04 +00:00
Matthias Clasen
478043a1ed Fix a C99ism. (#321777, Jens Granseuer)
2005-11-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkpathbar.c (button_clicked_cb): Fix a C99ism.
	(#321777, Jens Granseuer)
2005-11-18 19:56:52 +00:00
Matthias Clasen
58e6fcba9d Disconnect the sync callback for the visibility property. (#321761, Philip
2005-11-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaction.c (disconnect_proxy): Disconnect the
	sync callback for the visibility property.  (#321761,
	Philip Langdale)
2005-11-18 19:47:57 +00:00
Matthias Clasen
c8bab6c3d5 Turn off input methods in invisible entries, since they are confusing.
2005-11-18  Matthias Clasen  <mclasen@redhat.com>

	Turn off input methods in invisible entries, since
	they are confusing.  (#317002, James Su)

	* gtk/gtkentry.c (gtk_entry_set_visibility): Toggle input
	methods if visibility changes.
	(popup_targets_received): Don't show the input method
	menu if the entry is invisible.
2005-11-18 19:13:11 +00:00
Matthias Clasen
47a06a247f Add a note about range arrow sensitivity.
2005-11-17  Matthias Clasen  <mclasen@redhat.com>

	* README.in: Add a note about range arrow sensitivity.
2005-11-17 15:04:21 +00:00
Matthias Clasen
9b593427aa const correctness fixes
found by Arjan van de Ven and gcc.
2005-11-17 14:57:24 +00:00
Michael Natterer
81be0b4311 call gtk_window_process_updates() so the animation keeps running even if
2005-11-16  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkimage.c (animation_timeout): call
	gtk_window_process_updates() so the animation keeps running even
	if the main loop is busy with sources that eat a lot of cpu with
	high priority. Fixes bug #321444.

	(gtk_image_new_from_animation): document the fact that the
	animation will stop running if the main loop is busy with sources
	that have priorities higher than G_PRIORITY_DEFAULT.

	* tests/testimage.c: added test case that shows an animation even
	though a cpu-eating idle function is running.
2005-11-16 14:40:41 +00:00
Michael Natterer
6e802acd48 new internal function which destroys the display's event source. Also
2005-11-16  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkevents-x11.c (_gdk_events_uninit): new internal
	function which destroys the display's event source. Also removes
	the source from the global display_sources list and unrefs it.

	* gdk/x11/gdkprivate-x11.h: declare the function.

	* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_dispose): call it
	instead of half-destroying the source here.
2005-11-16 12:36:22 +00:00
Matthias Clasen
f3f1bdc2f0 Fix a memory leak. (#321032, Peter Zelezny)
* gtk/gtktreestore.c (gtk_tree_store_move): Fix a memory
	leak.  (#321032, Peter Zelezny)
2005-11-15 15:38:53 +00:00
Michael Natterer
1500848841 destroy display->xid_ht as late as possible (right before XCloseDisplay)
2005-11-15  Michael Natterer  <mitch@imendio.com>

	* gdk/x11/gdkdisplay-x11.c (gdk_display_x11_finalize): destroy
	display->xid_ht as late as possible (right before XCloseDisplay)
	because it still needs to be around when the display's screens are
	finalized. (#85715)
2005-11-15 14:42:48 +00:00
Matthias Clasen
c66f47d451 Plug a leak 2005-11-15 05:11:24 +00:00
Matthias Clasen
e00ef950ed Avoid a crash 2005-11-14 18:49:41 +00:00
Michael Natterer
35de5c5b78 removed redundant calls to g_object_notify().
2005-11-14  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_set_property):
	removed redundant calls to g_object_notify().
2005-11-14 11:28:33 +00:00
Matthias Clasen
c0b7b9e651 Documentation improvements. (#321338)
2005-11-13  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkcolor.c (gdk_color_parse): Documentation
	improvements.  (#321338)
2005-11-14 04:34:43 +00:00
Matthias Clasen
caf8be159a Make limit an inclusive boundary. (#321299)
2005-11-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextiter.c (gtk_text_iter_forward_search): Make
	limit an inclusive boundary.  (#321299)
2005-11-14 04:25:25 +00:00
Michael Natterer
0068cec5d3 fixed icon rules so gtkbuiltincache.h is only rebuilt if needed.
2005-11-12  Michael Natterer  <mitch@imendio.com>

	* gtk/Makefile.am: fixed icon rules so gtkbuiltincache.h is only
	rebuilt if needed.
2005-11-12 20:08:12 +00:00
Dom Lachowicz
5411a3a1a2 Bug #313627. Make win32 theme's handling of toolbars, handleboxes, and
2005-11-12  Dom Lachowicz <cinamod@hotmail.com>

	* modules/engines/ms-windows/msw_style.c: Bug #313627. Make win32
	theme's handling of toolbars, handleboxes, and menubars more in-line
	with Microsoft's IE style.
	* modules/engines/ms-windows/*.c: Indentation cleanups
2005-11-12 14:20:51 +00:00
Matthias Clasen
82f12b610d Make builtin icons work in gtk_window_set_icon_name() (#321046, Maxim
2005-11-12  Matthias Clasen  <mclasen@redhat.com>

	Make builtin icons work in gtk_window_set_icon_name()
	(#321046, Maxim Udushlivy)

	* gtk/gtkicontheme.c (insert_theme): Always insert the default
	theme.
	(ensure_valid_themes): Call _gtk_icon_theme_ensure_builtin_cache()
	from here.
	(theme_lookup_icon, find_builtin_icon): ...and not from here.
	(gtk_icon_theme_lookup_icon): Remove an unncessary assert.
	(gtk_icon_theme_get_icon_sizes): Also check builtin icons.
2005-11-12 06:59:49 +00:00
Tor Lillqvist
de28325959 Don't hide dotfiles, no such convention on Win32. Just hide files with the
2005-11-12  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkfilesystemwin32.c (filename_get_info): Don't hide
	dotfiles, no such convention on Win32. Just hide files with the
	hidden attribute. (#314627)
2005-11-12 01:12:08 +00:00
Federico Mena Quintero
c100ebd2da Do not check whether the path is a folder. It is useful to bookmark files
2005-11-11  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Do not
	check whether the path is a folder.  It is useful to bookmark
	files as well (e.g. todo.txt), and this will also help
	performance.
	(shortcuts_add_bookmark_from_path): Likewise.
	(shortcuts_activate_iter): Change folders or select files, as
	appropriate.
2005-11-11 22:29:09 +00:00
Federico Mena Quintero
0fa618282f Use g_log_set_default_handler() instead of explicitly setting a handler
2005-11-11  Federico Mena Quintero  <federico@ximian.com>

	* tests/autotestfilechooser.c (main): Use
	g_log_set_default_handler() instead of explicitly setting a
	handler for each domain.
2005-11-11 19:35:35 +00:00
Federico Mena Quintero
287dee48be Only get the base path of the volume if it is mounted.
2005-11-11  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_add_volumes): Only get
	the base path of the volume if it is mounted.
2005-11-11 19:29:44 +00:00
Michael Natterer
fc7c8bbeb4 Added per-stepper API for GtkRange's stepper sensitivity as discussed in
2005-11-11  Michael Natterer  <mitch@imendio.com>

	Added per-stepper API for GtkRange's stepper sensitivity as
	discussed in bug #321056:

	* gtk/gtkenums.h: added GtkSensitivityType which can be
	{ AUTO, ON, OFF }.

	* gtk/gtkrange.[ch]: added properties "lower-stepper-sensitivity"
	and "upper-stepper-sensitivity" and public getters/setters for
	them. Changed stepper drawing to honor the new properties.

	* gtk/gtk.symbols: added the new symbols.
2005-11-11 12:48:29 +00:00
Matthias Clasen
e0cad47afc Add show-popup and hide-popup signals and emit them when the popup is
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c: Add show-popup and hide-popup signals and
	emit them when the popup is shown or hidden.  (#162531, Tommi
	Komulainen)
2005-11-10 21:17:19 +00:00
Matthias Clasen
b94e9ee56a Another erroneous semicolon.
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_motion_resize_column): Another
	erroneous semicolon.
2005-11-10 17:57:14 +00:00
Matthias Clasen
6556787e0a Remove an erroneous semicolon.
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkcolor-x11.c (gdkx_colormap_get): Remove an erroneous
	semicolon.
2005-11-10 17:42:48 +00:00
Matthias Clasen
83e2e23fe1 Don't corrupt odd keymaps (#316638, Kean Johnston)
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	Don't corrupt odd keymaps (#316638, Kean Johnston)

	* gdk/x11/gdkkeys-x11.c (set_symbol): Auxiliary function to
	handle frobbing keymaps with odd numbers of syms/code.

	* gdk/x11/gdkkeys-x11.c (update_keymaps): Use set_symbol() to
	frob the keymap.
2005-11-10 17:38:09 +00:00
Matthias Clasen
938d34c059 Improve navigation to parent folders. (#318444, Andrei Yurkevich)
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	Improve navigation to parent folders.  (#318444, Andrei Yurkevich)

	* gtk/gtkpathbar.[hc]: Add a child_path argument to
	the path_clicked signal.
	* gtk/gtkfilechooserdefault.c (path_bar_clicked): Select the
	child_path, if it is provided.
	* gtk/marshalers.list (path_bar_clicked): Add the necessary
	glue.
2005-11-10 15:17:40 +00:00
Matthias Clasen
14c284c37e Fix some compiler warnings. (#321141, Kjartan Maraas)
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenu.c: Fix some compiler warnings. (#321141,
	Kjartan Maraas)
2005-11-10 14:33:51 +00:00
Matthias Clasen
cfd7c13b6c Implement a getter for headers-clickable. (#163851, Richard Hult)
2005-11-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c: Implement a getter for headers-clickable.
	(#163851, Richard Hult)
2005-11-10 14:18:45 +00:00
Michael Natterer
8bdc0bf97c Applied patch from maemo-gtk that addresses many issues wrt display
2005-11-10  Michael Natterer  <mitch@imendio.com>

	Applied patch from maemo-gtk that addresses many issues wrt
	display migration and display closing (bug #85715).

	* gdk/gdkdisplay.c (gdk_display_dispose): don't just set the
	default display to NULL when it's closed. Instead set the most
	recently opened display as new default (if one exists).

	* gdk/gdkpango.c (on_renderer_display_closed): fixed signature
	of this callback.

	* gdk/gdkscreen.c (gdk_screen_dispose): check if the GCs still
	exist before unrefing them.

	* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): if the screen
	is closed, allow destruction of the root window.

	* gdk/x11/gdkdisplay-x11.c: moved some stuff from finalize() to
	dispose(), free stuff that was leaked before.

	* gdk/x11/gdkevents-x11.c (_gdk_x11_events_uninit_screen): check if
	the xsettings_client still exists before destroying it.

	* gdk/x11/gdkkeys-x11.c: added finalization and free the allocated
	X resources.

	* gdk/x11/gdkpixmap-x11.c: moved stuff from finalize() to new
	dispose() implementation.

	* gdk/x11/gdkscreen-x11.c: moved stuff from finalize() to
	dispose() and check if it still exists before unrefing it. Set
	their pointers to NULL/None *after* upchaining in dispose(),
	because X11 implementations of members of the parent class still
	need them for their own destruction.

	* gdk/x11/gdkvisual-x11.c: removed finalize() implementation which
	was g_error()ing when finalizing a visual.

	* gtk/gtkclipboard.c (gtk_clipboard_finalize): don't use
	get_clipboard_widget() because it would create the widget if it
	doesn't exist. Use g_object_get_data() directly instead.

	* gtk/gtktextdisplay.c (on_renderer_display_closed): fixed signature
	of this callback.
2005-11-10 12:09:42 +00:00
Simos Xenitellis
1571574ced Added Tatar translation by Albert Fazlí 2005-11-10 00:35:31 +00:00
Tim Janik
401468a9f8 patch from maemo-gtk that changes GtkRange to render its arrows
Wed Nov  9 16:29:42 2005  Tim Janik  <timj@imendio.com>

        * gtk/gtkrange.c: patch from maemo-gtk that changes GtkRange
        to render its arrows insensitive when the adjustment is in
        its min or max position. this makes range arrow behaviour
        consistent with spin button behaviour. (#321056)
2005-11-09 15:32:51 +00:00
Tor Lillqvist
3b9a63ec6e gdk/gdkinternals.h Add new GDK_DEBUG_DRAW flag to the GdkDebugFlag enum.
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/gdkinternals.h
	* gdk/gdk.c (gdk_debug_keys[]): Add new GDK_DEBUG_DRAW flag to
	the GdkDebugFlag enum.

	* gdk/win32/gdkdrawable-win32.c: Use DRAW to trigger GDK_NOTEs in
	this file instead of MISC. Now asking for MISC will give mainly
	window manipulation debugging output.
2005-11-09 13:10:27 +00:00
Tor Lillqvist
9b5c5f9db5 Remove unnecessary includes.
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c: Remove unnecessary includes.

	(_gdk_win32_get_adjusted_client_rect): Remove this two-line
	function which was used only in one place.

	(get_outer_rect): Use _gdk_win32_adjust_client_rect().

	(gdk_window_set_geometry_hints): If we have identical minimum and
	maximum size hints, remove the resize and maximize
	decorations/functions. (#104514)

	If we have a maximum size hint, remove the maximize
	decoration/function but ensure the resize decoration/function is
	available. Otherwise ensure both resize and maximize
	decorations/functions are there.

	(set_or_clear_style_bits): Factored out common code from
	gdk_window_set_decorations() and gdk_window_set_functions().

	Hack the window style setting once more: Only touch the window
	style bits corresponding to the GdkWMDecoration or GdkWMFunction
	parameter bitmasks. Hopefully this finally is the correct thing to
	do. We used to clear all other bits than those that were being
	set, or set all other bits than those that were being cleared.

	Take into account that adding or removing decorations leaves the
	window's outer size unchanged, i.e., the client area's size and
	position change. This is apparently not what we want, so change
	also the window's (outer) position and size appropriately so that
	the client area's position and size stay constant.

	gtk-demo's color selector dialog is now non-resizable like on X11
	(I tested with metacity in GNOME). Torn off menus are shrinkable
	vertically but have a maximum size, and are not maximizable or
	minimizable, like on X11.

	(gdk_window_set_decorations, gdk_window_set_functions): Let
	set_or_clear_decorations() do most of the job.

	* gdk/win32/gdkprivate-win32.h: Remove declaration of
	_gdk_win32_get_adjusted_client_rect().
2005-11-09 12:35:56 +00:00
Tor Lillqvist
64f1e8378b gdk/win32/gdkwindow-win32.h (struct _GdkWindowImplWin32) Store the type
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.h (struct _GdkWindowImplWin32)
	* gdk/win32/gdkwindow-win32.c (gdk_window_impl_win32_init,
	gdk_window_get_type_hint, gdk_window_get_type_hint): Store the
	type hint. Implement gdk_window_get_type_hint() by just returning
	the hint stored.
2005-11-09 02:13:35 +00:00
Tor Lillqvist
d08d2c2bd4 Remove code that has been permanently ifdeffed out for two years.
2005-11-09  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints):
	Remove code that has been permanently ifdeffed out for two years.
2005-11-08 22:27:47 +00:00
Matthias Clasen
15d5ffae32 Unref tile and stipple when finalizing a gc. (#320789, Nickolay V.
2005-11-08  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkgc.c (gdk_gc_finalize): Unref tile and stipple when
	finalizing a gc.  (#320789, Nickolay V. Shmyrev)
2005-11-08 21:46:34 +00:00
Matthias Clasen
3514077069 Ignore icons if they would make the request large enough to cause Xlib to
2005-11-08  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Ignore
	icons if they would make the request large enough to cause
	Xlib to loose the connection.  (#320909, Claudio Saavedra)
2005-11-08 18:26:37 +00:00
Michael Natterer
8cec420a71 gdk/gdk.symbols gdk/gdkwindow.h added gdk_window_get_type_hint() (patch
2005-11-08  Michael Natterer  <mitch@imendio.com>

	* gdk/gdk.symbols
	* gdk/gdkwindow.h
	* gdk/x11/gdkwindow-x11.c: added gdk_window_get_type_hint() (patch
	extracted from maemo-gtk). Fixes bug #320872.
2005-11-08 14:45:32 +00:00
Matthias Clasen
0c7e1c1624 Don't looks the bookmark label when reordering. (#320720, Jeremy Cook)
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_reorder): Don't
	looks the bookmark label when reordering.  (#320720, Jeremy Cook)
2005-11-07 20:31:10 +00:00
Matthias Clasen
fb02547e1e Set focus-on-click to FALSE for all buttons. Don't grab focus when a
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkpathbar.[hc]: Set focus-on-click to FALSE for all buttons.
	Don't grab focus when a slider button is pressed, instead, use
	a bit in the pathbar struct to determine whether to scroll up
	or down.  (#314486, Carlos Garnacho)
2005-11-07 20:10:04 +00:00
Matthias Clasen
4309a349b5 Don't popup the completions if the focus has already been moved somewhere
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup):
	Don't popup the completions if the focus has already been
	moved somewhere else.  (#319914, Christian Persch)
2005-11-07 17:28:37 +00:00
Matthias Clasen
ee26e0f17d Raise the drag_window after reconfiguring the toolbar. (#320803, Christian
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktoolitem.c (_gtk_tool_item_toolbar_reconfigured):
	Raise the drag_window after reconfiguring the
	toolbar.  (#320803, Christian Persch)
2005-11-07 16:31:48 +00:00
Matthias Clasen
0ce29ee614 Add a focus-on-click property with setter and getter. (#318945, Christian
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkfilechooserbutton.h:
	* gtk/gtkfilechooserbutton.c: Add a focus-on-click property
	with setter and getter.  (#318945, Christian Persch)
2005-11-07 15:57:19 +00:00
Tim Janik
30ddf7deed fixed missing $X_CFLAGS setup in case x11.pc is present.
Mon Nov  7 16:15:16 2005  Tim Janik  <timj@imendio.com>

        * configure.in: fixed missing $X_CFLAGS setup in case x11.pc is present.
2005-11-07 15:17:13 +00:00
Matthias Clasen
57904c8ce6 Adjust to the stock icon changes.
2005-11-07  Matthias Clasen  <mclasen@redhat.com>

	* configure.in: Adjust to the stock icon changes.
2005-11-07 14:30:35 +00:00
Tor Lillqvist
449f16b238 Correct the calculation of maskstride. (#320152, Peter Zelezny)
2005-11-07  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_normal):
	Correct the calculation of maskstride. (#320152, Peter Zelezny)
2005-11-07 08:16:29 +00:00
Michael Natterer
097038c3e1 fixed rule to actually create the symlinks, erroring out if anything goes
2005-11-06  Michael Natterer  <mitch@imendio.com>

	* gtk/Makefile.am (icons): fixed rule to actually create the
	symlinks, erroring out if anything goes wrong.
2005-11-06 22:40:30 +00:00
Tor Lillqvist
30edb63134 Can't rename a file if the target exists on Win32. First rename the target
2005-11-06  Tor Lillqvist  <tml@novell.com>

	* gtk/updateiconcache.c (build_cache): Can't rename a file if the
	target exists on Win32. First rename the target temporarily, then
	if the renaming of the source to target fails, restore the
	original name for the target.

	* gtk/Makefile.am: Use EXEEXT in the dependency on gtk-update-icon-cache.
2005-11-06 06:27:01 +00:00
Tor Lillqvist
bd9e367de7 (pixbuf_to_hbitmaps_alpha_winxp): Use an 1-bit mask bitmap, like
2005-11-06  Tor Lillqvist  <tml@novell.com>

	(pixbuf_to_hbitmaps_alpha_winxp): Use an 1-bit mask bitmap,
	like pixbuf_to_hbitmaps_normal().
	(_gdk_win32_pixbuf_to_hicon_supports_alpha): Check
	G_WIN32_IS_NT_BASED() first, so we can pretend being on Win9x by
	setting the G_WIN32_PRETEND_WIN9X environment variable.

2005-11-06  Tor Lillqvist  <tml@novell.com>

	Make icon masks work on Win98 (#320152, Peter Zelezny)

	* gdk/win32/gdkcursor-win32.c (create_color_bitmap): Take also a
	parameter for the depth of the bitmap, so that this function can
	be used to create 1-bit bitmaps, too.
	(pixbuf_to_hbitmaps_normal): Create an 1-bit bitmap for the mask,
	and initialize it properly.
2005-11-06 05:36:49 +00:00
Matthias Clasen
b983d1c6a7 Store builtin stock icons in an icon cache, instead of populating a hash
2005-11-04  Matthias Clasen  <mclasen@redhat.com>

        Store builtin stock icons in an icon cache, instead of
        populating a hash table with pixbufs at startup, to save both
        memory and startup time.

        * gtk/stock-icons/*: Reorganize the icons in a directory structure
        suitable for gtk-update-icon-cache, and rename them to match the
        stock ids.

        * gtk/gtkiconcache.[hc]: Support non-mmapped icon caches, and
        add _gtk_icon_cache_has_icon_in_directory().

        * gtk/updateiconcache.c: Support a --source <VARIABLE> argument
        to store the contents of the icon cache in a C header.

        * gtk/gtkbuiltincache.h: Generated private header which contains
        the icon cache for the builtin icons.

        * gtk/gtkicontheme.c: Create a GtkIconCache for the builtin
        icons, and use that in addition to the hash table whenever
        builtin icons are searched.

        * gtk/gtkiconfactory.c: Add GTK_ICON_SOURCE_STATIC_ICON_NAME and
        use it for static stock ids.
        (get_default_icons): Don't add the builtin
        icons to the icon theme, just register the stock ids.
        (render_fallback_image): Take the fallback image out of the
        builtin icon cache.

        * gtk/Makefile.am: Remove stock-icons from SUBDIRS and add
        the necessary machinery to rebuild gtkbuiltincache.h.
2005-11-04 15:43:40 +00:00
Michael Natterer
e087a3bc51 applied patch from maemo-gtk that changes the mtime check for rc files
2005-11-04  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): applied patch
	from maemo-gtk that changes the mtime check for rc files from
	'>' to '!=', otherwise theme changes go unnoticed when turning
	back the clock (Tommi Komulainen).
2005-11-04 12:24:36 +00:00
Tor Lillqvist
36e1f67ac2 Plug memory leak on Win32.
2005-11-04  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkstatusicon.c (gtk_status_icon_set_tooltip): Plug memory
	leak on Win32.
2005-11-04 00:37:31 +00:00
Tor Lillqvist
3f49474ebc Typo. 2005-11-03 13:56:13 +00:00
Tor Lillqvist
5dbd2b163a Formatting fix. 2005-11-03 13:54:10 +00:00
Tor Lillqvist
72ea12fec0 As there is only one GdkDisplay in the Win32 backend, check that
2005-11-03  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in
	the Win32 backend, check that GdkDisplay* parameters are equal to
	_gdk_display instead of using the unnecessarily general
	GDK_IS_DISPLAY().
2005-11-03 13:44:37 +00:00
Tor Lillqvist
5551fc6754 Rename the variables for the color bitmap to have "color" in their name,
2005-11-03  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcursor-win32.c (pixbuf_to_hbitmaps_alpha_winxp):
	Rename the variables for the color bitmap to have "color" in their
	name, for similarity with pixbuf_to_hbitmaps_normal(). Create a
	color bitmap for the mask, too, instead of creating a b&w bitmap
	with CreateBitmap(). Set up the mask bitmap's contents, ones for
	those pixels in the color bitmap where the alpha is zero, zero for
	other pixels. We used to use an unitialized mask bitmap! This
	meant that icons and cursors created presumably worked more or
	less by accident. Totally blank icons with zero alpha everywhere
	(as used by gtktrayicon.c) definitely did not work as expected.
2005-11-03 13:29:30 +00:00
Tor Lillqvist
3d18823ae1 Include gtkstatusicon.c on all platforms.
2005-11-03  Tor Lillqvist  <tml@novell.com>

	* gtk/Makefile.am: Include gtkstatusicon.c on all platforms.

	* gtk/gtkstatusicon.c: Implement for Win32. Use code from
	gtktrayicon-win32.c as applicable. (gtktrayicon-win32.c is not
	necessary and can be removed from CVS. It has never been mentioned
	in gtk/Makefile.am.) No tray icon widget, GtkImage or GtkTooltips
	are used on Win32. One label widget is used (but never shown) as
	gtk_widget_render_icon() needs a widget.

	Ifdefs used as necessary in several places. It might be cleaner to
	split out the backend-specific parts to separate files, or at
	least collect them into separate blocks in the file.

	(wndproc): New function. Window procedure to monitor mouse events
	in the system tray icon. Call gtk_status_icon_button_press() as
	needed.
	(create_tray_observer): New function. Creates a hidden window that
	only serves as a tray icon message observer.
2005-11-03 13:17:01 +00:00
Tor Lillqvist
542aedc182 Position the dialog with GTK_WIN_POS_CENTER. (do_quit): New function, hide
2005-11-03  Tor Lillqvist  <tml@novell.com>

	* tests/teststatusicon.c (icon_activated): Position the dialog
	with GTK_WIN_POS_CENTER.
	(do_quit): New function, hide and unref the GtkStatusIcon, and
	call gtk_main_quit().
	(popup_menu): Add a Quit menu item that calls do_quit().
2005-11-03 12:09:49 +00:00
Tor Lillqvist
c2c55f8385 gdk/win32/gdkcolor-win32.c gdk/win32/gdkscreen-win32.c Whitespace
2005-11-02  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkcolor-win32.c
	* gdk/win32/gdkscreen-win32.c
	* gdk/win32/gdkwindow-win32.c: Whitespace consistency
	fixes. Remove superfluous test for GdkWindow* parameters being
	non-NULL. Testing GDK_IS_WINDOW() is enough. As there is only one
	GdkScreen and one GdkDisplay in the Win32 backend, use those
	variables instead of the getter functions. For GdkDisplay* and
	GdkScreen* parameters, check that they are equal to the
	corresponding singleton variables instead of the more general
	GDK_IS_DISPLAY() or GDK_IS_SCREEN().
2005-11-02 13:33:27 +00:00
Matthias Clasen
aa70008f0b Remove some g_return_if_fail() from static functions, replace some others
2005-11-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextview.c: Remove some g_return_if_fail() from
	static functions, replace some others by g_assert().

	* gtk/gtktextview.c (selection_motion_event_handler)
	(gtk_text_view_start_selection_drag): Keep track of the original
	selection boundaries during a drag selection, in order to correctly
	decide when to extend or shrink the selection.  (#320167,
	reported by Arvind S N, patch by Paolo Borelli)
2005-11-02 06:26:07 +00:00
Matthias Clasen
6002bc6582 Replace manual offset calculations by g_utf8_offset_to_pointer().
2005-11-02  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbtree.c (_gtk_text_line_char_to_byte_offsets):
	* gtk/gtktextiter.c (gtk_text_iter_backward_chars): Replace
	manual offset calculations by g_utf8_offset_to_pointer().
	(#320360, Paolo Borelli)
2005-11-02 05:08:31 +00:00
Tim Janik
d6a9db9095 get rid of GAllocator usage, allocate and free nodes via the g_slice_*()
Tue Nov  1 16:18:24 2005  Tim Janik  <timj@imendio.com>

        * gtk/gtkrbtree.[hc]: get rid of GAllocator usage, allocate and free
        nodes via the g_slice_*() API.
        _gtk_rbtree_new(): fixed wrong node allocation via g_new().
2005-11-01 18:10:51 +00:00
Tor Lillqvist
4d1b5589c5 gdk/win32/gdkprivate-win32.h gdk/win32/gdkglobals-win32.c Add more
2005-11-01  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkprivate-win32.h
	* gdk/win32/gdkglobals-win32.c
	* gdk/win32/gdkmain-win32.c (_gdk_windowing_init): Add more
	pre-interned GdkAtoms and pre-registered clipboard formats. Sort
	their declarations, definitions and assignments into a more
	logical and consistent order.

	* gdk/win32/gdkmain-win32.c (_gdk_win32_cf_to_string): Include the
	CF_ prefix for the predefined clipboard format names. Put quotes
	around registered format names to distinguish them.

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): Return
	immediately with a warning if the property type is STRING, TEXT,
	COMPOUND_TEXT or SAVE_TARGETS, as these are X11-specific that we
	should never pretend to handle on Win32. Handle only UTF8_STRING
	here, other formats with delayed rendering. Use \uc1 instead of
	\uc0 when generating Rich Text Format for easier testability on
	XP, where WordPad misinterprets \uc0 encoded characters. Add more
	GDK_NOTE debugging output for Clipboard operations.

	* gdk/win32/gdkselection-win32.c: Debugging printout improvements.
	(gdk_selection_convert): Don't pretent to handle STRING, just
	UTF8_STRING. Streamline error handling, don't unnecessarily have a
	GError which then isn't used for anything anyway if it gets set.
	(gdk_win32_selection_add_targets): Skip also STRING, TEXT,
	COMPOUND_TEXT and SAVE_TARGETS in addition to UTF8_STRING.
2005-11-01 15:29:59 +00:00
Tor Lillqvist
77769e2eeb Sync with what configure produces.
2005-11-01  Tor Lillqvist  <tml@novell.com>

	* config.h.win32.in: Sync with what configure produces.
2005-11-01 09:48:46 +00:00
Tor Lillqvist
b3175d1982 Don't look for X_PACKAGES unless building for x11. (#313986, John
2005-11-01  Tor Lillqvist  <tml@novell.com>

	* configure.in: Don't look for X_PACKAGES unless building for
	x11. (#313986, John Ehresman)
2005-11-01 09:26:59 +00:00
Erdal Ronahi
6f85760bb0 Added Kurdish translation to po-properties 2005-10-28 22:08:11 +00:00
Matthias Clasen
6a40c2488b Add the popup window to the toplevels window group. (#319912, Christian
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Add the popup
	window to the toplevels window group.  (#319912, Christian Persch)
2005-10-28 20:35:11 +00:00
Kristian Rietveld
c50df41b52 fix stupid thinko.
2005-10-28  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_row_deleted): fix
	stupid thinko.
2005-10-28 17:15:15 +00:00
Matthias Clasen
04f94a98f2 Fix the anchor of the default drag cursors. (#319200, Federico Mena
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdnd.c (gtk_drag_get_cursor): Fix the anchor of the default
	drag cursors.  (#319200, Federico Mena Quintero)
2005-10-28 17:06:43 +00:00
Matthias Clasen
96335d4326 Handle Shift-G to go to the previous match, like firefox. (#320061,
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_search_key_press_event): Handle
	Shift-G to go to the previous match, like firefox.  (#320061, Christian
	Neumair)
2005-10-28 15:13:54 +00:00
Matthias Clasen
feb5ffb032 Fix a C99ism. (#320000, Kazuki Iwamoto)
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_build_level): Fix a
	C99ism.  (#320000, Kazuki Iwamoto)
2005-10-28 14:16:45 +00:00
Matthias Clasen
eac8eb4d99 Add the little stars. (#319985, Bastien Nocera)
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaboutdialog.c (gtk_about_dialog_init): Add the little
	stars.  (#319985, Bastien Nocera)
2005-10-28 14:04:04 +00:00
Matthias Clasen
cfaa87847a Return FALSE, so we don't flush repeatedly. (#319151, Alexander Larsson)
2005-10-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_search_entry_flush_timeout): Return
	FALSE, so we don't flush repeatedly.  (#319151, Alexander Larsson)
2005-10-28 13:53:16 +00:00
Michael Natterer
194e8daff9 Fix bug #319974:
2005-10-26  Michael Natterer  <mitch@imendio.com>

	Fix bug #319974:

	* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_set_property):
	make sure that setting any of pixbuf/stock-id/icon-name resets the
	others because they are mutually exclusive, and that unsetting any
	of them only resets the pixbuf and nothing else. Also added
	some missing g_object_notify().

	(gtk_cell_renderer_pixbuf_get_property): simplified calls to
	g_value_set_object().

	(gtk_cell_renderer_pixbuf_create_stock_pixbuf)
	(gtk_cell_renderer_pixbuf_create_named_icon_pixbuf): added
	g_object_notify ("pixbuf").
2005-10-27 13:16:23 +00:00
Matthias Clasen
18f32d04d2 Be more careful about initializing cell_area. (#319382, Tommi Komulainen)
2005-10-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_button_press): Be more
	careful about initializing cell_area.  (#319382, Tommi
	Komulainen)
2005-10-27 04:51:25 +00:00
Matthias Clasen
7de0d97271 Don't eat Ctrl-PageUp/PageDown. (#318670, Christian Neumair)
2005-10-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcombobox.c (gtk_combo_box_key_press): Don't eat
	Ctrl-PageUp/PageDown.  (#318670, Christian Neumair)
2005-10-27 04:38:55 +00:00
Matthias Clasen
bc41f73c4c Only set the text if it is not NULL. (#319930, Thomas Klausner)
2005-10-27  Matthias Clasen  <mclasen@redhat.com>

	* demos/gtk-demo/clipboard.c (paste_received): Only set the
	text if it is not NULL.  (#319930, Thomas Klausner)

	* gtk/gtkselection.c (gtk_selection_data_get_pixbuf): Close the
	loader before trying to get the pixbuf.  (#319930, Thomas Klausner)
2005-10-27 04:31:33 +00:00
Matthias Clasen
e80f12b676 Use G_MODULE_BIND_LAZY when dlopening modules. (#319557, Laszlo Peter)
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilesystem.c (gtk_file_system_module_load):
	* gtk/gtkthemes.c (gtk_theme_engine_load):
	* gtk/gtkimmodule.c (gtk_im_module_load): Use G_MODULE_BIND_LAZY
	when dlopening modules.  (#319557, Laszlo Peter)
2005-10-27 03:16:00 +00:00
Matthias Clasen
87129bab87 Only use text segments when determining text direction. (#319065, Tommi
* gtk/gtktextbtree.c (gtk_text_btree_resolve_bidi): Only use text
	segments when determining text direction.  (#319065, Tommi Komulainen)
2005-10-26 20:47:04 +00:00
Matthias Clasen
ec76057b9b Don't crash on duplicate destroy. (#318953, Gustavo Carneiro)
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_destroy): Don't crash
	on duplicate destroy.  (#318953, Gustavo Carneiro)
2005-10-26 19:47:48 +00:00
Matthias Clasen
60ec536ce3 Doc updates 2005-10-26 19:10:08 +00:00
Matthias Clasen
d2a58a39bd use $(GLIB_MKENUMS) instead of glib-mkenums. (#318582, Damien Carbery)
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

        * */Makefile.am: use $(GLIB_MKENUMS) instead of
        glib-mkenums.  (#318582, Damien Carbery)
2005-10-26 18:01:05 +00:00
Matthias Clasen
87ffaabc2c Clarify docs. (#317682, Christian - Manny Calavera - Neumair)
2005-10-26  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Clarify
        docs.  (#317682, Christian - Manny Calavera - Neumair)
2005-10-26 14:43:10 +00:00
Matthias Clasen
653a6dd9db Fix #317844 2005-10-26 13:42:53 +00:00
Matthias Clasen
15f5226ed6 Fix some issues with background drawing in RTL. (#318781, Eric Cazeaux)
2005-10-25  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
        Fix some issues with background drawing in RTL.  (#318781,
        Eric Cazeaux)
2005-10-26 04:23:46 +00:00
Matthias Clasen
b8bc9a3ed3 Add property editors 2005-10-26 03:55:35 +00:00
Matthias Clasen
80b528bfeb Activate status icons on single click 2005-10-26 03:18:09 +00:00
Kristian Rietveld
af86cec5e1 Fixes #311955, reported by Markku Vire; and a lot more.
2005-10-25  Kristian Rietveld  <kris@gtk.org>

	Fixes #311955, reported by Markku Vire; and a lot more.

	* gtk/gtktreemodelfilter.c: Made this thing work correctly.
	Levels can now have invisible nodes cached, functions have been
	rewritten/refactored to take this into account; also the logic in
	some functions has been corrected.

	Each referenced node now references all visible children or a single
	invisible child, in order to be able to monitor all changes in the
	child model required for correct operation.

	When a virtual root is set, all nodes on the virtual root level are
	referenced.

	At last, a bunch of random bug fixes and comment updates.
2005-10-25 21:00:40 +00:00
Matthias Clasen
86b656aa52 Add some more docs. (#319722, Paolo Borelli)
2005-10-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktexttagtable.c (gtk_text_tag_table_foreach): Add some
	more docs.  (#319722, Paolo Borelli)
2005-10-25 18:28:35 +00:00
Matthias Clasen
f10f85793d Make the initialization of screen_x11->xft_rgba more explicit. (#319627,
2005-10-25  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkxftdefaults.c (init_xft_settings): Make the
	initialization of screen_x11->xft_rgba more explicit.  (#319627,
	Bogdan Nicula)
2005-10-25 18:11:57 +00:00
Matthias Clasen
d77bc26a82 Fix whitespace in a blurb. (#319499, Francisco Javier F. Serrador)
2005-10-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Fix whitespace
	in a blurb.  (#319499, Francisco Javier F. Serrador)
2005-10-25 17:57:35 +00:00
Matthias Clasen
f2724a2515 Add settings to hide the input method and Unicode control character
2005-10-24  Matthias Clasen  <mclasen@redhat.com>

        Add settings to hide the input method and Unicode control character
        submenus in the context menus of GtkEntry and GtkTextView.

        * gdk/x11/gdkevents-x11.c: Map GTK+ settings to X settings.

        * gtk/gtksettings.c (gtk_settings_class_init): Declare GTK+ settings here.

        * gtk/gtktextview.c (popup_targets_received):
        * gtk/gtkentry.c (popup_targets_received): Use the settings here.
2005-10-24 20:01:57 +00:00
Kristian Rietveld
3fe6e98689 emitting row-has-child-toggled when the level is not in the cache does not
2005-10-24  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_inserted): emitting
	row-has-child-toggled when the level is not in the cache does not
	make sense.  (This bug probably crept in during the early stages
	of GtkTreeModelSort when there wasn't a correct row-has-child-toggled
	implementation yet),
	(gtk_tree_model_sort_real_unref_node): only get the child iter
	when we will actually also use it.
2005-10-24 19:01:36 +00:00
Michael Natterer
d25d65852f check for the widget being realized, in addition to being visible, to
2005-10-22  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktreeview.c (gtk_tree_view_scroll_to_cell): check for the
	widget being realized, in addition to being visible, to avoid
	running into precondition check in gtk_tree_view_get_cell_area().
	(approved by Kris).
2005-10-22 21:08:23 +00:00
Dom Lachowicz
f9365c3747 Experimentally, scrollbar steppers can shrink to 8 pixels on Win32.
* modules/engines/ms-windows/msw_style.c (setup_msw_rc_style):
	Experimentally, scrollbar steppers can shrink to 8 pixels on
	Win32. Reflect that in the theme.
	* modules/engines/ms-windows/Theme/gtk-2.0/gtkrc: Experimentally,
	there is a 1-pixel border between a scrollbar and its child
	in ScrolledWindows on Win32. Reflect that in the theme.
2005-10-22 15:53:00 +00:00
Matthias Clasen
a086076057 Use GDK_WINDOW_CHILD for the selection window. (#318806, Alex Larsson)
2005-10-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_create_window): Use GDK_WINDOW_CHILD
	for the selection window.  (#318806, Alex Larsson)
2005-10-20 20:40:54 +00:00
Federico Mena Quintero
647ba5b40d Fixes bug #317999:
2005-10-18  Federico Mena Quintero  <federico@ximian.com>

	Fixes bug #317999:

	* tests/autotestfilechooser.c
	(test_button_folder_states_for_action): Test that we have either
	$cwd or the explicitly-set folder.
	(test_reload_sequence): Likewise.

	* gtk/gtkfilechooserdefault.c
	(gtk_file_chooser_default_get_current_folder): If our reload_state
	is RELOAD_EMPTY, return a GtkFilePath corresponding to $cwd.
2005-10-19 16:25:42 +00:00
Tor Lillqvist
e6fa7394ba Remove the clipboard viewer code. It didn't really do anything useful, and
2005-10-14  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkdisplay-win32.c: Remove the clipboard viewer code.
	It didn't really do anything useful, and was just confusing and
	incomplete. Comments claimed we don't do delayed rendering, but in
	fact we do, for images. (The delayed rendering code has other
	problems, though, see #168173.) The clipboard viewer code was
	probably even buggy (the WM_CHANGECBCHAIN handled didn't propagate
	the message when necessary). It was just test code, it said so in
	a comment. Add something similar back later if necessary.

	(_win32_on_clipboard_change,
	_gdk_win32_register_clipboard_notification): Remove.

	(gdk_display_supports_selection_notification,
	gdk_display_request_selection_notification): Always just return
	FALSE. We didn't generate any GDK_OWNER_CHANGE events anywhere.
2005-10-14 00:08:14 +00:00
Tor Lillqvist
d297ff329f Don't treat Alt-Enter specially. It does not have any special meaning and
2005-10-13  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkevents-win32.c (gdk_event_translate): Don't treat
	Alt-Enter specially. It does not have any special meaning and
	should be passed on to the application. (#318378, Tim Evans)
2005-10-13 07:21:00 +00:00
Tor Lillqvist
b25e6c5b05 Set visual depth to 24 for 32 bits-per-pixel devices on Win32. This allows
2005-10-13  Tor Lillqvist  <tml@novell.com>

	Set visual depth to 24 for 32 bits-per-pixel devices on
	Win32. This allows gdk_drawable_real_draw_pixbuf() to use the
	optimized composite_0888() function rather than the slower image
	dithering functions to draw pixbufs (#313993, John Ehresman)

	* gdk/win32/gdkimage-win32.c (_gdk_win32_new_image): Use
	_gdk_windowing_get_bits_for_depth() to initialize
	GdkImage::bits_per_pixel.
	(_gdk_windowing_get_bits_for_depth): Return 32 bits for depth 24.

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use
	_gdk_windowing_get_bits_for_depth() to initialize
	BITMAPINFOHEADER::biBitCount.

	* gdk/win32/gdkvisual-win32.c (_gdk_visual_init): Set
	GdkVisual::depth to 24 even if GetDeviceCaps(BITSPIXEL) returns
	32.
2005-10-13 07:08:49 +00:00