Commit Graph

70 Commits

Author SHA1 Message Date
Matthias Clasen
424433f1a4 Add support for EWMH "Above" and "Below" window states. (105100, Manuel Clos) 2003-08-10 23:37:37 +00:00
Matthias Clasen
eaae0a6b61 Add a new keybinding signal, move_viewport. (gtk_text_view_move_viewport):
2003-07-18  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextview.c (gtk_text_view_class_init): Add a new keybinding signal, move_viewport.
	(gtk_text_view_move_viewport): New function which implements the move_viewport functionality.
	(gtk_text_view_move_cursor_internal): If the cursor is not visible, move the viewport. (#78669)

	* gtk/gtkenums.h (GtkScrollStep): New enumeration, used for move_viewport argument.

	* gtk/gtkstatusbar.c (gtk_statusbar_class_init): Add a has_resize_grip property.  (#111779)

	* gtk/gtkwindow.h:
	* gtk/gtkwindow.c (gtk_window_set_default_icon): New method.  (#95816)

	* gtk/gtkmessagedialog.h:
	* gtk/gtkmessagedialog.c (gtk_message_dialog_add_buttons): New method.
	(#65501, Sebastian Rittau)
2003-07-18 18:52:03 +00:00
Owen Taylor
ff9c2c5669 Add _gtk_window_unset_focus_and_default(), use to clear the focus and
Tue Nov 12 15:13:58 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.c gtk/gtkwindow.[ch]: Add
        _gtk_window_unset_focus_and_default(), use to clear
        the focus and default out of parts of the widget
        heirarchy that we are hiding.

        * gtk/gtkwidget.c (gtk_widget_propagate_screen_changed_recurse):
        Fix typo that was resulting in missed screen-change
        notifies.

        * gtk/gtkwindow.c (do_focus_change): Allow for
        widget->window == NULL.

        * gtk/gtklabel.c (gtk_label_screen_changed): Clear the
        layout here not in hierarchy changed to handle the case
        where the toplevel was moved between screens.
2002-11-12 21:08:29 +00:00
Owen Taylor
accc3a3365 Add startup notification hooks - mostly based on patch by Havoc Pennington
Sat Nov  2 00:22:33 2002  Owen Taylor  <otaylor@redhat.com>

        Add startup notification hooks - mostly based on patch
        by Havoc Pennington in #96772.

        * gdk/gdk.h gdk/x11/gdkdisplay-x11.c
        gdk/{win32,linux-fb}/gdkmain-*.c: (gdk_notify_startup_complete):
        new function that indicates an application has finished starting
        up.

        * gdk/x11/gdkmain-x11.c gdk/x11/gdkdisplay-x11.c
        (_gdk_windowing_set_default_display): store value of
        DESKTOP_STARTUP_ID on the default screen, and clear it from the
        environment.

        * gdk/x11/gdkdisplay-x11.c:
        Set _NET_STARTUP_ID hint on display's group leader window.

        * gtk/gtkwindow.c (gtk_window_set_auto_startup_notification):
        function to toggle whether we automatically broadcast that we've
        started up, after mapping the first toplevel window.
        (gtk_window_map): call gdk_screen_notify_startup_complete() by
        default, unless enabled by above.

        * gtk/gtkmain.c gtk/gtkcombo.c gtk/gtktoolbar.c:
        Couple of warning fixes.
2002-11-02 05:37:04 +00:00
Manish Singh
2eb145c26f Deprecation cleanup
Tue Oct  1 12:53:44 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkwindow-decorate.c gtkwindow.[ch]: Deprecation cleanup
2002-10-01 19:55:08 +00:00
Owen Taylor
41030b43c6 Add gtk_window_set_icon_from_file(),
Mon Sep 30 14:28:58 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.[ch]: Add gtk_window_set_icon_from_file(),
        gtk_window_set_default_icon_from_file() convenience
        functions (#75178, suggestion from Havoc Pennington)
2002-09-30 18:58:27 +00:00
Havoc Pennington
1689117cf7 fix GtkWindowMnemonic to have a separate typedef
2002-09-24  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkwindow.c: fix GtkWindowMnemonic to have a separate
	typedef

	* gdk/x11/gdkevents-x11.c (gdk_check_wm_state_changed): monitor
	FULLSCREEN state

	* tests/testgtk.c (get_state_controls): add
	fullscreen/unfullscreen test

	* gdk/gdkdisplay.c (gdk_display_finalize): fix unused variable

	* gdk/x11/gdkscreen-x11.c (init_xinerama_support): fix unused
	variable

	* gdk/x11/gdkevents-x11.c (gdk_xsettings_watch_cb): mop up unused
	variable

	* gdk/x11/gdkscreen-x11.c
	(_gdk_x11_screen_window_manager_changed): emit
	window_manager_changed signal

	* gdk/x11/gdkscreen-x11.h (struct _GdkScreenX11Class): add
	window_manager_changed signal

	* gdk/x11/gdkevents-x11.c
	(gdk_x11_screen_get_window_manager_name): new function

	* gtk/gtkwindow.c (gtk_window_class_init): add type_hint,
	skip_taskbar_hint, skip_pager_hint properties
	(gtk_window_set_skip_taskbar_hint):
	(gtk_window_get_skip_taskbar_hint):
	(gtk_window_set_skip_pager_hint):
	(gtk_window_get_skip_pager_hint):
	(gtk_window_fullscreen):
	(gtk_window_unfullscreen): new functions

	* gdk/gdkevents.h (GdkWindowState): add FULLSCREEN state

	* gdk/gdkwindow.h (GdkWindowTypeHint): add missing type hint
	values

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_skip_taskbar_hint):
	(gdk_window_set_skip_pager_hint):
	(gdk_window_fullscreen):
	(gdk_window_unfullscreen): new functions
	(set_initial_hints): set fullscreen here if appropriate
2002-09-25 19:16:46 +00:00
Owen Taylor
c0f78ae00e Add a "is_focus" property indicating whether a widget is the focus widget
Fri May 17 17:27:21 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwindow.c gtk/gtkwidget.c: Add a "is_focus"
        property indicating whether a widget is the focus
        widget within the toplevel.

        * gtk/gtkwindow.[ch]: Add "is_active" "has_toplevel_focus"
        properties to indicate (separately) the idea of
        being the part of the toplevel with the input focus
        and being the active widget. (Needed for full XEMBED
        compliance.)

        * gtk/gtkplug.c gtk/gtksocket.c: Update to work
        in terms of is_active/has_toplevel_focus, and thus
        handle the active/focused XEMBED distinction
        correctly.

        * gtk/gtkplug.c (gtk_plug_realize): Remove
        FOCUS_CHANGE_MASK, since we don't need it.

Fri May 17 18:07:34 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtksocket.c (gtk_socket_add_window): Send
        XEMBED_EMBEDDED_NOTIFY.

        * gtk/gtksocket.c: Assume windows without _XEMBED_INFO
        property want to be mapped, for better
        current-Qt compatibility.
2002-06-06 15:38:39 +00:00
Alex Larsson
4632fb81c7 Integrate Erwann Chenede's multihead changes for the gtk/ directory.
Mon Apr 29 18:28:00 2002  Owen Taylor  <otaylor@redhat.com>

	Integrate Erwann Chenede's multihead changes for the gtk/ directory.

	* gtk/gtkclipboard.[ch]: Add gtk_clipboard_get_for_display(),
	make internals multihead aware.

	* gtk/gtkcolorsel.[ch]: Add
	gtk_color_selection_set_change_palette_with_screen_hook () [ugh!]
	make up for non-multihead safety of
	gtk_color_selection_set_change_palette_hook()

	* gtk/gtkinvisible.[ch] gtk/gtkmenu.[ch] gtkwindow.[ch]: Add
	gtk_{invisible,menu,window}_set_screen(); add "screen" properties
	for GtkWindow and GtkMenu.

	* gtk/gtkplug.[ch]: Add gtk_plug_construct_for_display(),
	gtk_plug_new_for_display(). Multihead fixes.

	* gtk/gtkselection.[ch]: Add gtk_selection_owner_set_for_display(),
	make internals multihead aware.

	* gtk/gtksettings.[ch]: Add gtk_settings_get_for_screen(), get
	rid of now-useless gtk_settings_constructor().

	* gtk/gtkstyle.[ch]: Add gtk_style_get_font_for_display(), fix
	check/radio button indicators bitmap handling to be multihead
	safe.

	* gtk/gtkwidget.[ch]: Add gtk_widget_get_screen(), gtk_widget_has_screen(),
	gtk_widget_get_display(), gtk_widget_get_clipboard(),
	gtk_widget_get_root_window().

	* gtk/gtkbindings.c gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkcombo.c
	gtk/gtkctree.c gtk/gtkdnd.c gtk/gtkfilesel.c gtk/gtkgamma.c
	gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtkimcontext.c gtk/gtklabel.c
	gtk/gtklist.c gtk/gtkmain.c gtk/gtkmenuitem.c gtk/gtkmenushell.c
	gtk/gtknotebook.c gtk/gtkoldeditable.c gtk/gtkoptionmenu.c
	gtk/gtkpaned.c gtk/gtkpreview.c gtk/gtksocket.c gtk/gtktext.c
	gtk/gtktextbuffer.c gtk/gtktextview.c gtk/gtktipsquery.c
	gtk/gtktooltips.c gtk/gtktreeview.c gtk/gtktreeviewcolumn.c:
	misc mechanical multihead-safety fixes.

	* gtk/gtkclipboard.c: Use a GtkImage rather than a pixmap for
	the dropper, look up the color palette only at realization time,
	other multihead fixes.

	* gtk/gtkcombo.c (gtk_combo_unrealize): Popdown the list when
	unrealizing.

	* gtk/gtkentry.c: Only claim ownership of the primary selection
	when realized, misc multihead fixes.

	* gtk/gtkfontsel.c: Only fill in fonts when attached to a screen,
	fix gtk_font_selection_get_font() for multihead.

	* gtk/gtkgc.c: make the depth => drawable hash per-screen.

	* gtk/gtkinvisible.c: Add a constructor that realizes the
	widget, so we get a realized widget with g_object_new() as
	well gtk_invisible_new() as before.

	* gtk/gtkmain.c: Get rid of unused gtk_visual/gtk_colormap
	variables.

	* gtk/gtktextdisplay.c: Add warnings if stipple bitmaps
	are used on the wrong screen.

	* gtk/gtktoolbar.c: Make handling of GtkSettings-based layout
	read properties and connect to settings when the screen is changed,
	rather than on init/finalize.

	* gtk/gtkwindow.c: Fix icon handing to be multihead safe ...
	default icon pixmaps/mask are only shared between windows on the
	same screen. Misc multihead fixes.

Sat Apr 27 13:49:53 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkclipboard.c (gtk_clipboard_get_for_display):
	Update docs to reference GDK_SELECTION_CLIPBOARD rather GDK_NONE.

2002-04-29  Alex Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkproperty-fb.c (gdk_property_get):
	Fix silly bug, noticed by Sven Neumann.

Sun Apr 28 22:43:55 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_sort_func): Fix
	so that you can set a new sort func.
2002-04-29 22:53:45 +00:00
Owen Taylor
6a802b24b3 Implement accelerator propagation using a custom XEMBED_GTK_KEY_GRAB
Sat Feb 23 20:33:29 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkplug.[ch] gtk/gtksocket.[ch] gtk/xembed.h: Implement
        accelerator propagation using a custom XEMBED_GTK_KEY_GRAB
        XEMBED_GTK_KEY_UNGRAB pair of messages.

        * gtk/gtkwindow.[ch]: private export _gtk_window_keys_foreach().

        * gtk/gtkplug.c (gtk_plug_set_is_child): Clear focus and default
        widgets.
2002-02-24 01:52:14 +00:00
Owen Taylor
e5d1ea8cfe Massive padding addition to class structures.
Sat Feb 23 11:54:12 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/*.h gdk/*.h: Massive padding addition to class structures.

        * gtk/gtktextmark.h: Fix a FIXME about G_CONST_RETURN.
2002-02-23 20:22:05 +00:00
Owen Taylor
a504db9e83 Fixes for AIX compilation from Miroslaw Dobrzanski-Neumann, #72182.
Fri Feb 22 18:36:45 2002  Owen Taylor  <otaylor@redhat.com>

	Fixes for AIX compilation from Miroslaw Dobrzanski-Neumann,
	#72182.

	* demos/gtk-demo/main.c gtk/gtktreeview.c gtk/gtktoolbar.c
	gtk/gtkpaned.c gtk/gtkobject.c gtk/gtkcontainer.c
	gtk/gtkcolorsel.c gtk/gtkcellrender.c gdk/x11/xsettings-client.h:
	Squash trailing commas on enumerations.

	* gdk/gdktypes.h: Drop GDK_RELEASE_MASK to 1 << 30 instead
	of 1 << 31 to work around AIX compiler problem. (C standard
	seems to imply that compiler is required to use an unsigned
	type for the enum value in this case.)

	* gdk/gdkpixbuf-drawable.c: Fix lvalue casts.

	* gtk/gtkwindow.h: Fix use of enum types for bitfields ...
	compilers may choose to use a signed type for bitfields.
2002-02-23 00:13:17 +00:00
Owen Taylor
e5e5a52112 Add GDK_ISO_Next_Group/Prev_Group/Level3_Shift/ First_Group/Last_Group to
Thu Feb 21 16:51:17 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkaccelgroup.c (gtk_accelerator_valid): Add
        GDK_ISO_Next_Group/Prev_Group/Level3_Shift/
        First_Group/Last_Group to list of invalid accelerators.
        (A lot more that should be added, but probably would
        want a range mechanism. These are the ones found in
        the standard XFree86 config files.)

        * gtk/gtkbindings.c (gtk_bindings_activate): Fix problem
        that broke bindings for menus.

        * gtk/gtkwindow.[ch]: Export _gtk_window_activate_key()
        privately.

        * gtk/gtkmenushell.c (gtk_menu_shell_key_press): Use
        _gtk_window_activate_key(), gtk_bindings_activate_event().
2002-02-21 22:03:09 +00:00
Owen Taylor
708e1a9574 Implement "fuzzy" key binding lookups; allow matches on key and level but
Wed Feb 20 14:26:47 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkkeyhash.[ch]: Implement "fuzzy" key binding lookups;
        allow matches on key and level but not group. Also, implement
        ignoring "consumed modifiers correctly."

        * gtk/gtkaccelgroup.c gtk/gtkbindings.c: Convert to using
        GtkKeyHash.

        * gtk/gtkdebug.h gtk/gtkmain.c: Support GTK_DEBUG=keybindings

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Fill in
        the group for key release events as well as key press events.

        * gdk/gdkkeys.h gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        Rename unused_modifiers to consumed_modifiers, make the docs and
        non-Xkb implementation match the Xkb implementation.

        * gdk/linux-fb/gdkkeyboard-fb.c gdk/win32/gdkkeys-win32.c: Propagate
        doc and parameter name changes.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        XkbTranslateKeyCode doesn't handle LockMask, we need to handle
        it ourselves.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Force
        <Shift>Tab to give GDK_ISO_Left_Tab, since we need consistency
        to allow dealing with ISO_Left_Tab.

        * gtk/gtkwindow.c gtk/gtktextview.c gtk/gtkscrolledwindow.c
        gtk/gtkpaned.c gtk/gtkcombo.c  gtk/gtknotebook.c:
        Remove inappropriate uses of GDK_ISO_Left_Tab. (GDK_ISO_Left_Tab
        or <Shift>Tab both are equivalent as a binding specifier.)

        * gtk/gtkbutton.c (gtk_button_class_init): Make ::activate
        GTK_RUN_ACTION, so you can bind an accelerator to it.

        * gtk/gtklabel.c (gtk_label_set_uline_text_internal): Call
        gdk_unicode_to_keyval on the mnemonic character.

        * tests/testgtk.c: Add a test for the new fuzzy key binding matching.
2002-02-21 17:14:10 +00:00
Tim Janik
9800f731e0 applied patch from owen to get rid of accel map notifiers. changed things
Tue Nov 20 21:25:08 2001  Tim Janik  <timj@gtk.org>

	* applied patch from owen to get rid of accel map notifiers.
	changed things to fix reentrancy and API as discussed on gtk-devel.

	* gtk/gtkaccelgroup.[hc]:
	(gtk_accel_group_finalize): unregister this accel group from all
	accel map paths.
	(accel_closure_invalidate): handle invalidation of closures by
	disconnecting their accelerators.
	(quick_accel_add): move closure connection and changed notification
	into this function to reduce code duplication. don't emit change
	notification on closurers without accelerators.
	(quick_accel_remove): rewrite, do the exact opposite of quick_accel_add
	for a GtkAccelGroupEntry.
	(gtk_accel_group_connect): get rid of the accel_path_quark argument.
	(gtk_accel_group_connect_by_path): new function to add accelerators
	with an accel path.
	(gtk_accel_group_disconnect_closure): new function, disconnect a
	closure from of an accel group.
	(gtk_accel_group_disconnect): loop over all closure for a accel_ley,
	accel_mods pair and remove them.
	(_gtk_accel_group_reconnect): new function that basically does
	gtk_accel_group_disconnect_closure() and
	gtk_accel_group_connect_by_path() once an accel path changed.
	(gtk_accel_groups_disconnect_closure): remove this, there's
	gtk_accel_group_disconnect_closure().

	* gtk/gtkaccelmap.[hc]: keep list of accel groups per entry now,
	nuke notifiers.
	(_gtk_accel_path_is_valid): make this non-static for
	gtkwidget.c and gtkaccelgroup.c assertions.
	(gtk_accel_map_add_notifer): removed this function.
	(gtk_accel_map_remove_notifer): same.
	(_gtk_accel_map_add_group):
	(_gtk_accel_map_remove_group): (un-)register accel groups, with
	accel paths for correct propagation.
	(gtk_accel_map_add_entry): return void.
	(gtk_accel_map_lookup): return gboolean instead of GQuark.

	* gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): always
	set accel_path on widgets.

	* gtk/gtkwidget.[hc]:
	(accel_path_changed): got rid of this, changes are handled by
	accel maps internally now.
	(_gtk_widget_set_accel_path): get things to work without notifiers.
	(gtk_widget_list_accel_closures): list accel closures of a widget.

	* gtk/gtkwindow.[hc]: rename ::accels_changed, to ::keys_changed.
2001-11-20 23:43:03 +00:00
Owen Taylor
61b2f259e5 Move notification of "has_default" to here, so it is safe to call
Fri Nov 16 19:44:35 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c (gtk_window_set_default): Move
	notification of "has_default" to here, so it
	is safe to call gtk_window_set_default() instead
	of gtk_widget_grab_default().

	* gtk/gtkwindow.c (gtk_window_set_focus): Make it call
	gtk_widget_grab_focus(), which then calls
	_gtk_widget_internal_set_focus(). This makes
	gtk_window_set_focus() a safe way of both setting
	and unsetting the focus widget.

	* gtk/gtkwidget.c (gtk_widget_propagate_state): Use
	gtk_widget_get_toplevel(), instead of gtk_widget_ancestor
	to find the toplevel.

	* gtk/gtkwindow.h: Move gtk_window_set_focus/default
	from the "internal functions" section.
2001-11-17 01:18:49 +00:00
Tim Janik
d07573c090 added gtkaccelmap.sgml. other updates.
Mon Nov 12 23:06:38 2001  Tim Janik  <timj@gtk.org>

        * added gtkaccelmap.sgml. other updates.

Mon Nov 12 23:08:37 2001  Tim Janik  <timj@gtk.org>

	* gtk/maketypes.awk: fix type utils generation on unix.

	* gtk/gtkaccelmap.[hc]: new files, implementing a global accelerator
	registry.

	* gtk/gtkaccelgroup.[hc]: major API/implementation revamp:
	removed GTK_ACCEL_SIGNAL_VISIBLE, gtk_accel_group_get_default,
	gtk_accel_group_get_entry, gtk_accel_group_(un)lock_entry,
	gtk_accel_group_add/remove, gtk_accel_group_handle_add/remove,
	gtk_accel_group_create_add/remove, gtk_accel_group_entries_from_object.
	introduced ::accel_changed signal for change notification, and
	gtk_accel_group_connect/disconnect to connect closures to accel groups.
	made gtk_accel_group_attach/detach and gtk_accel_group_activate private
	functions.
	deprecated gtk_accel_group_ref/unref.

	* gtk/gtkaccellabel.[hc]: changes to make accellabels pay attention
	to accel group changed notification and basically operate on closures.
	removed gtk_accel_label_get_accel_object and
	gtk_accel_label_set_accel_object.
	introduced gtk_accel_label_set_accel_closure, and for convenience,
	gtk_accel_label_set_accel_widget.

	* gtk/gtkitemfactory.[hc]: removed accelerator propagation code
	which mostly moved into gtkaccelmap.[hc].
	removed gtk_item_factory_parse_rc*, gtk_item_factory_dump_*
	and gtk_item_factory_print_func.

	* gtk/gtkmain.c: call _gtk_accel_map_init().

	* gtk/gtkmenuitem.[hc]: introduced gtk_menu_item_set_accel_path(),
	that associates an accelerator path with menu items, through which
	persistent accelerator settings on menu items are enabled.

	* gtk/gtkmenu.[hc]: added gtk_menu_set_accel_path() so accelerator
	paths of menu item can be default constructed to allow installation
	of accelerators on menu items that don't come with an accelerator
	binding by default.

	* gtk/gtksettings.c: fix STRING type rc settings by special casing
	them appropriately in the parser.

	* gtk/gtksignal.[hc]: allow a class function offset of 0 for
	gtk_signal_newv().

	* gtk/gtkwidget.[hc]: accelerator API revamp.
	removed ::accelerator_add/remove signals, gtk_widget_accelerator_signal,
	gtk_widget_accelerators_locked, gtk_widget_remove_accelerators and
	gtk_widget_(un)lock_accelerators.
	accelerators maintained through gtk_widget_add/remove_accelerator()
	are not runtime changable now, the correct sequence to setup a
	widget for runtime changable accelerators is now:
	  gtk_accel_map_add_entry(accel_path, key, mods);
	  _gtk_widget_set_accel_path(widget, accel_path, accel_group);

	* gtk/gtkwindow.[hc]: accelerator changes, proxy and coalesce accel
	group changes (as well as mnemonic changes) through the new signal
	::accels_changed.

Sat Nov 10 12:08:56 2001  Tim Janik  <timj@gtk.org>

	* gtk/gtksettings.c (_gtk_settings_parse_convert): properly handle
	GString->string conversions.
2001-11-13 00:53:47 +00:00
Daniel Elstner
ac81252161 Use GtkWindow* as first signal argument (was GtkWidget*).
2001-11-03  Daniel Elstner  <daniel.elstner@gmx.net>

	* gtk/gtkwindow.h (frame_event): Use GtkWindow* as first
	signal argument (was GtkWidget*).

	* gtk/gtkwindow.c (gtk_window_frame_event),
	  gtk/gtkwindow-decorate.c (gtk_decorated_window_frame_event):
	Fixed argument types as above, removed GTK_WINDOW casts and
	added some GTK_WIDGET casts instead.
2001-11-03 23:02:40 +00:00
Owen Taylor
328d834e6d Add a gtk_window_get_focus() getter to determine the currently focused
Wed Oct 31 15:38:14 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.[ch] (gtk_window_get_focus): Add a
	gtk_window_get_focus() getter to determine the currently
	focused widget within the window. (#63145, request
	from Damian Ivereigh)
2001-10-31 20:41:02 +00:00
Owen Taylor
5a43a59ff3 Fix incorrect parameter to compute_double_length (#58680, patch from
Tue Sep 18 20:47:16 2001  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkspinbutton.c (gtk_spin_button_size_request): Fix
        incorrect parameter to compute_double_length
        (#58680, patch from Matthias Clasen)

        Fixes for compilation with Forte cc. (#59734, Derek Rafter)

        * gtk/gtkwindow.h gtk/gtksizegroup.h: Remove extra ;.

        * gdk/gdktypes.h (GdkModifierType): Write 1u << 31
        for GDK_RELEASE_MASK to avoid warnings with Forte.

        * gtk/gtktexttag.c gtk/gtkcellrendertext.c: Add some missing
        break; statements.
2001-09-19 00:58:09 +00:00
Havoc Pennington
372853b107 put GtkPacker back in here so it won't be in gtk-unused.txt, but don't put
2001-09-08  Havoc Pennington  <hp@pobox.com>

	* gtk/gtk-sections.txt: put GtkPacker back in here so it won't be
	in gtk-unused.txt, but don't put it back in gtk-docs.sgml.

	Tons of other additions from gtk-unused.txt, but mostly skipping
	all the tree stuff for now.

2001-09-08  Havoc Pennington  <hp@pobox.com>

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_add_attribute):
	docs fixes

	* gtk/gtktable.c (gtk_table_get_col_spacing): docs fixes

	* gtk/gtkspinbutton.c (gtk_spin_button_get_increments): docs fixes

	* gtk/gtksocket.c (gtk_socket_steal): docs fixes

	* gtk/gtkscrolledwindow.h: docs fixes

	* gtk/gtkimage.c (gtk_image_new): docs fixes
2001-09-08 06:24:46 +00:00
Owen Taylor
1bbf2ac7ee Make gdkx.h the only installed header from gdk/x11. All structures in
Fri Sep  7 11:51:44 2001  Owen Taylor  <otaylor@redhat.com>

      Make gdkx.h the only installed header from gdk/x11.
      All structures in gdk/x11 are opaque.

	* gdk/x11/Makefile.am gdk/x11/gdkx.h gdk/x11/gdkprivate-x11.h:
	Don't install gdk{drawable,pixmap,window}-x11.h.

	* gdk/x11/{gdkcolormap-x11.c, gdkfont-x11.c, gdkx.h, gdkvisual-x11.c:
	Move GdkColormapPrivateX11, GdkFontPrivateX GdkImagePrivateX11,
	GdkVisualClass into C files.

	* gdk/gdkpixmap-x11.[ch]: Make gdk_pixmap_impl_get_type() static.

	* gdk/x11/{gdkcolor-x11.c, gdkcursor-x11.c, gdkdrawable-x11.c,
	gdkfont-x11.c, gdkgc-x11.c, gdkx.h, gdkimage-x11,gdkvisual-x11.c}
	Add public functions to replace previously exported direct
	structure access.
	gdk_x11_colormap_get_{xdisplay,xcolormap}
	gdk_x11_cursor_get_{xdisplay,xcursor},
	gdk_x11_drawable_get_{xdisplay,xcursor,gdk_x11_visual_get_xvisual,
	gdk_x11_font_get_{xdisplay,xfont}, gdk_x11_image_get_{xdisplay,ximage},
	gdk_x11_gc_get_{xdisplay,ximage}

	* gdk/gdkprivate.h gdk/gdkinternals.h: Move GdkColorInfo,
	GdkEventFilter, GdkClientFilter, GdkFontPrivate to gdkinternals.

      Fix a number of variables and functions that were exported
      "accidentally" from GDK.

	* gdk/**.[ch]: gdk => _gdk for gdk_visual_init,
	gdk_events_init, gdk_input_init, gdk_dnd_init, gdk_image_exit,
	gdk_input_exit,	gdk_windowing_exit, gdk_event_func, gdk_event_data,
	gdk_event_notify, gdk_queued_events, gdk_queued_tail,
	gdk_event_new, gdk_events_queue, gdk_events_unqueue,
	gdk_event_queue_find_first, gdk_event_queue_remove_link,
	gdk_event_queue_append, gdk_event_button_generate,
	gdk_debug_flags, gdk_default_filters, gdk_parent_root.

	* gdk/x11/{gdkevents-x11.c, gdkglobals-x11.c, gdkimage-x11.c,
	   gdkmain-x11.c, gdkprivate-x11.h, gdk/x11/gdkwindow-x11.c}:
	gdk => _gdk for gdk_event_mask_table, gkd_nevent_masks,
	gdk_wm_window_protocols, gdk_leader_window, gdk_xgrab_window,
	gdk_use_xshm, gdk_input_ignore_core.

	* gdk/x11/xsettings-common.h (xsettings_list_insert): Add
	#defines to namespace functions into the private _gdk_
	namespace.

	* gdk/gdkwindow.[ch] gdk/x11/gdkx.h: Add gdk_get_default_root_window ()
	to replace gdk_parent_root exported variable. Adjust and
	deprecate GDK_ROOT_PARENT().

	* demos/{testpixbuf-drawable.c,testpixbuf-save.c}: Fix
	GDK_ROOT_PARENT usage, remove includes of port-specific
	headers.

	* gdk/{win32,x11,fb}/gdkinput*.[ch]: s/gdk/_gdk/ for
	_gdk_input_gxid_host, _gdk_input_gxid_port, _gdk_input_ignore_core,
	gdk_input_devices, _gdk_input_windows, gdk_init_input_core.

	* gdk/x11/{gdkevents-x11.,c gdkglobals-x11.c, gdkmain-x11.c}
	docs/Changes-2.0.txt: Remove gdk_wm_protocols,
	gdk_wm_delete_window functions, gdk_wm_take_focus,
	use gdk_atom_intern() instead.

	* gdk/linux-fb/{gdkselection-fb.c, gdkmain-fb.c, gdkprivatefb.h}
	  gdk/win32/{gdkselection-win32.c, gdkmgdkwin32.h, gdkprivate-win32.h}
	  gdk/x11/{gdkselection-x11.c gdkx.h, gtkprivate-x11.h}
	  gtk/gtkselection.c
        Unexport gdk_selection_property, just use
	gdk_atom_intern ("GDK_SELECTION").

	* gdk/x11/{gdkprivate-x11.h,gdkdrawable-x11h,gdkgc-x11.c,gdkx.h}:
	Unexport gdk_drawable_impl_x11_get_type, gdk_gc_x11_get_type,
	GDK_GC_X11 cast macros, GdkGCX11 structures, GdkCursorPrivate,
	GdkVisualprivate, gdk_x11_gc_flush.

      Make a number of public exports of variables into functions
      to increase encapsulation.

	* gdk/gdkinternals.h gdk/gdkinput.h gdk/gdkevents.h
	gdk/linux-fb/gdkmouse-fb.c: gdk_core_pointer => _gdk_core_pointer,
	move to gdkinternals.h. Add gdk_device_get_core_pointer ().

	* gdk/gdkprivate.h gdk/gdkpango.c gdk/gdkinternals.h
	docs/Changes-2.0.txt: Unexport gdk_parent_root, gdk_error_code,
	gdk_error_warnings.

	* gdk/x11/{gdkcolormap-x11.c, gdkmain-x11.c, gdkx.h}
	  docs/Changes-2.0.txt:
	s/gdk_screen/_gdk_screen/, add gdk_x11_get_default_screen()
	s/gdk_root_window/_gdk_root_window/, add gdk_x11_get_default_root_xwindow()
	Add gdk_x11_get_default_xdisplay().

	* gdk/gdk.h gdk/gdk.c linux-fb/gdkfb.h linux-fb/gdkglobals-fb.c
	win32/gdkwin32.h x11/gdkglobals-x11.c gdk/x11/gdkmain-x11.c
	gdk/x11/gdkx.h: gdk/gdk.def: Add gdk_get/set_program_class,
	Don't export gdk_progclass, move --class command line
	option and handling to common portion of GDK.

      Miscellaneous fixes:

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): Fix
	g_return_val_if_fail that should have been g_return_if_fail.

	* gdk/gdkinternals.h gdk/gdkprivate.h: Move
	gdk_synthesize_window_state() to the semi-public gdkprivate.h.

	* gtk/gtkdnd.c (_gtk_drag_source_handle_event): Remove uneeded
	X11 dependency.

	* gdk/linux-fb/gdkmain-fb.c gdk/win32/gdkmain-win32.c gdk/TODO:
	Remove unused gdk_key_repeat_disable/restore.

	* linux-fb/gdkglobals-fb.c win32/gdkglobals-win32.c
	x11/gdkglobals-x11.c x11/gdkprivate-x11.h gdk/gdk.def:
	Remove unused gdk_null_window_warnings variable.

	* gdk/Makefile.am (DIST_SUBDIRS) nanox/*: cvs remove nanox;
	it can be retrieved from the repository; it is too far
	from functional to be worth having people check out;
	it would be easier to start from scratch, I suspect.

	* gdk/x11/gdkpixmap-x11.c: Fix lvalue usage of GDK_PIXMAP_XID().

	* gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c
	gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c:
	Fix some accidentally global variables and unused global variables.

	* gdk/x11/gdkkeys-x11.c gdk/gdkrgb.c gdk/gdkwindow.c
	gdk/x11/gdkpango-x11.c gdk/x11/gdkselection-x11.c:
	Fix some accidentally global variables and unused global variables.

      Add some space for future expansion to multihead.

	* gdk/gdkdrawable.h: Add four reserved function pointers
	for future expansion of GdkDrawableClass.

	* gtk/gtkwindow.h gtk/gtkinvisible.h: Add reserved pointer
	where we can put a GdkScreen * later.
2001-09-07 21:50:20 +00:00
Havoc Pennington
9df0074685 add default icon
2001-08-28  Havoc Pennington  <hp@pobox.com>

	* demos/gtk-demo/main.c (setup_default_icon): add default icon

	* gtk/gtkradiobutton.c (gtk_radio_button_new_with_mnemonic):
	warning fix
	(gtk_radio_button_new_with_label): warning fix

	* gtk/gtkdnd.c: used some random GtkImage private structs,
	update to reflect GtkImage changes

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_icon_list): don't check
	whether the hint is supported, just always set the icon. A task
	list might want to use it even if the WM doesn't, and the WM may
	change over time. Also, XDeleteProperty() if list == NULL.

	* gtk/gtkwindow.c (gtk_window_set_icon_list)
	(gtk_window_get_icon_list)
	(gtk_window_set_icon)
	(gtk_window_get_icon)
	(gtk_window_set_default_icon_list)
	(gtk_window_get_default_icon_list):
	new functions

	* gtk/gtk-boxed.defs (GtkIconSet): add GtkIconSet

	* gtk/gtkimage.c: Implement property support, bug #59408

	* gtk/gtkcontainer.c (gtk_container_add): make the warning message
	on reparent-without-removing-first a bit more helpful.
	Let's just destroy this FAQ.
2001-08-29 02:20:02 +00:00
Owen Taylor
a2d60d44b1 [ Patch from Sebastian Wilhelmi, 52790 ]
Wed Aug 22 19:15:39 2001  Owen Taylor  <otaylor@redhat.com>

	[ Patch from Sebastian Wilhelmi, 52790 ]

	* gtk/gtkversion.h.in gtk/gtk.h: New file replacing gtkcompat.h

	* gdk/gdkcompat.h gdk/gdk*.h gtk/gtkcompat.h.in gtk/gtk*.h:
	Move compatibility macros from g[dt]kcompat.h to within
	#ifndef G[DT]K_DISABLE_DEPRECATED in each file.

	* gdk/gdk-pixbuf-csource.c: Fix up include of gtkcompat.h.

	* demos/Makefile.am demos/gtk-demo/Makefile.am
          docs/reference/gdk-pixbuf/Makefile.am modules/input/Makefile.am
          tests/Makefile.am: Remove references to -G[DT]K_DISABLE_DEPRECATED.

	* demos/{pixbuf-demo.c,testpixbuf-drawable.c,testpixbuf-save.c,
                 testpixbuf.c}: Fix usages of deprecated functions.
2001-08-23 15:26:49 +00:00
Havoc Pennington
f37a0627fc fix a typo.
2001-08-07  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkfilesel.c (open_ref_dir): fix a typo.

	* gtk/gtkplug.c (gtk_plug_init): remove setting of auto_shrink;
	some fixage is needed here, but nothing simple. Owen understands
	it. ;-)

        * gtk/gtkwindow.h, gtk/gtkwindow.c: Rework code and API for window
	sizing and positioning.  Also, fix bug in compute_geometry_hints
	(width/height confusion for setting min size).
	(gtk_window_move): new function
	(gtk_window_resize): new function
	(gtk_window_get_size): new function
	(gtk_window_get_position): new function
	(gtk_window_parse_geometry): new function

 	* gtk/gtkwidget.c (gtk_widget_set_size_request): new function
 	(gtk_widget_get_size_request): new function
 	(gtk_widget_get_usize): delete, that was a short-lived function
 	;-)
 	(gtk_widget_set_usize): deprecate
 	(gtk_widget_set_uposition): deprecate, make it a trivial
	gtk_window_move() wrapper
	(gtk_widget_class_init): remove x/y/width/height properties,
	add width_request height_request

        * demos/*: update to avoid deprecated functions

	* gtk/gtklayout.c: add x/y child properties

	* gtk/gtkfixed.c: add x/y child properties, and get rid of
	uses of "gint16"

	* tests/testgtk.c (create_window_sizing): lots of tweaks to window
	sizing test

	* gdk/x11/gdkevents-x11.c (gdk_event_translate): Ensure that
	configure events on toplevel windows are always in root window
	coordinates, following ICCCM spec that all synthetic events
	are in root window coords already, while real events are
	in parent window coords. Previously the code assumed that
	coords of 0,0 were parent window coords, which was
	really broken.

 	* gtk/gtkcontainer.c (gtk_container_get_focus_chain): fix
 	warning

 	* gdk/gdkwindow.h (GdkWindowHints): add GDK_HINT_USER_POS
 	and GDK_HINT_USER_SIZE so we can set USSize and USPosition
 	hints in gtk_window_parse_geometry()

 	* gdk/x11/gdkwindow-x11.c (gdk_window_set_geometry_hints): support
 	new USER_POS USER_SIZE hints
2001-08-10 03:46:08 +00:00
Havoc Pennington
0e0ee24bea s/RESIZEABLE/RESIZABLE/
2001-06-25  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktreeviewcolumn.h, gtk/gtktreeviewcolumn.c:
	s/RESIZEABLE/RESIZABLE/

	* gtk/gtkwindow.c, gtk/gtkwindow.h: s/resizeable/resizable/
2001-06-25 23:48:51 +00:00
Owen Taylor
cc223eeff6 Fix stupid error introduced last night that was making things decidedly
Sun Jun 24 11:29:35 2001  Owen Taylor  <otaylor@redhat.com>

	* gdk/x11/gdkimage-x11.c (gdk_image_new): Fix stupid error
	introduced last night that was making things decidedly not work.

	* gtk/*.[ch]: Patch from Kristian Rietveld adding 80 getters
	so that we have getter/setter pairing everywhere it makes
	sense. (#55767)

	* gtk/gtkradiobutton.[ch] gtk/gtktoolbar.c tests/testgtk.:
	Rename gtk_radio_button_group to gtk_radio_button_get_group, add a
	deprecated compat macro. (#55516)

	* gtk/gtklabel.[ch]: Add functions
	gtk_label_set/get_use_underline(), gtk_label_set/get_use_markup(),
	gtk_label_set_label(), which mirror the property API for GtkLabel.
	Make gtk_label_get_attributes() only reflect the attributes
	set by gtk_label_set_attributes.

	* gtk/gtknotebook.c (gtk_notebook_set_current_page) gtk/gtkcompat.h: Rename
	from gtk_notebook_set_page().
2001-06-24 15:34:48 +00:00
Jonas Borgstrm
6adcae811b Fixed a small typo, it should be GTK_WINDOW_GROUP_GET_CLASS and not
2001-06-15  Jonas Borgstrm  <jonas@codefactory.se>

	* gtk/gtkwindow.h: Fixed a small typo, it should be
	GTK_WINDOW_GROUP_GET_CLASS and not GTK_WINDOW_GET_CLASS
	on line 134.
2001-06-15 18:58:58 +00:00
Alexander Larsson
46880b96cf Update to new PangoLanguage changes.
2001-06-15  Alexander Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkfont-fb.c (gdk_font_from_description):
	Update to new PangoLanguage changes.

	* gtk/gtkwindow-decorate.c:
	* gtk/gtkwindow.[ch]:
	Added setting argument to gtk_window_set_has_frame ()
2001-06-15 15:58:26 +00:00
Owen Taylor
cf2fab9077 Add a GtkWindowGroup struct that allows grouping together multiple windows
Fri Jun  8 17:56:52 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.[ch] gtk/gtkmain.c: Add a GtkWindowGroup struct
	that allows grouping together multiple windows so that grabs
	within that set of windows only affect those windows.

	* gtk/gtkmain.c gtk/gtkwidget.[ch]: Add a "grab_notify"
	signal for notification when a widget becomes shadowed
	by a grab or is no longer shadowed by a grab.

	* gtk/gtkwidget.c (gtk_widget_propagate_state)
	  gtk/gtkmain.c: (gtk_widget_grab_add): Don't allow
	insenstive widgets to maintain a grab.
2001-06-14 21:44:01 +00:00
Owen Taylor
604828e8d5 Remove deprecation of gtk_window_set_default_size() until patch adding
Thu Apr 26 10:40:41 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.h: Remove deprecation of gtk_window_set_default_size()
	until patch adding gtk_window_set_size() is recommitted.

	* **Makefile.am configure.in gdk/x11/gdkim-11.c
	  gtk/gtkmain.c gtk/gtkimmulticontext.c gtk/gtkmain.c
	  gtk/gtkrc.c: Remove all traces of -DX_LOCALE support.
	  (#10784)
2001-04-26 14:42:41 +00:00
Havoc Pennington
a48055e08c set_decorations_hint and set_functions_hint were still in the header
2001-04-25  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkwindow.h: set_decorations_hint and set_functions_hint
	were still in the header
2001-04-25 14:15:04 +00:00
Owen Taylor
bf660df987 File containing #defines for XEMBED protocol.
Thu Apr 19 16:11:07 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am xembed.h: File containing #defines
	for XEMBED protocol.

	* gtk/gtkplug.[ch] gtk/gtksocket.[ch]:

	- Change protocol from old plug/socket specific protocol
	  to XEMBED draft
	- Various fixes to work with GTK+-2.0

	Still quite a bit of work to do here to handle initiation
	from the socket side (as specified by XEMBED), to handle
	the more advanced features of XEMBED, and to figure out
	a good way to handle same-app embedding with less overhead
	than using full XEMBED.
2001-04-19 20:36:46 +00:00
Havoc Pennington
e13ec2098a add signals and binding set, so keybindings are configurable
2001-04-18  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkwindow.c (gtk_window_class_init): add signals and binding
	set, so keybindings are configurable
	(gtk_window_activate_default): Change to activate the focus widget
	instead if there's a focus widget, to be consistent with the
	behavior that previously existed in key_press_event
2001-04-18 22:21:45 +00:00
Tim Janik
770938bf2f got rid of gtk_widget_popup(), a function that bad needs to be nuked, not
Sun Apr  1 08:00:13 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.[hc]: got rid of gtk_widget_popup(), a function that
        bad needs to be nuked, not just deprecated.

        * gtk/gtktooltips.c (gtk_tooltips_draw_tips): don't use
        gtk_widget_popup().

        * gtk/*.[hc]: s/activate_mnemonic/mnemonic_activate/g;

        * gtk/gtkmenufactory.[hc]: removed this long-standingly deprecated
        widget.

        * docs/Changes-2.0.txt: updates.
2001-04-01 07:32:41 +00:00
Tim Janik
1f7e5c0610 fixed a bunch of notifications, added reference counts around emissions
Sun Apr  1 03:28:14 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtkwidget.c: fixed a bunch of notifications, added
        reference counts around emissions where the widget is used afterwards.
        added freeze/thaws around multiple properties being notified.
        (_gtk_widget_get_aux_info): cleanups.

        * gtk/gtksettings.c (gtk_settings_install_property): provide
        default parsing functions for gdkcolor, enums and flags.

        * gtk/gtkwindow.[hc]: partially reverted patch from havoc,
        applied by owen.
        kept a flag in GtkWindowGeometryInfo to handle user
        resetting default sizes.
        cleaned up ZVT comments.
        bunch of assorted bug fixes, notification fixes.
        (_gtk_window_reposition): make this a really internal function.

        * gtk/testgtk.c: fixups.
2001-04-01 04:05:42 +00:00
Owen Taylor
f67ae736ee Add private function to get the aux info structure fo the widget.
Wed Mar 28 20:30:26 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.[ch] (_gtk_widget_get_aux_info): Add private function
	to get the aux info structure fo the widget.

	* gtk/gtklabel.c gtk/gtkscrolledwindow.c gtk/gtkwindow.c: Use
	above function.

        [ Patch from  Havoc Pennington  <hp@redhat.com> ]

	* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): function
	to get the size of the window manager frame, basically the same
	code that gdk_window_get_root_origin() had
	(gdk_window_get_root_origin): use gdk_window_get_frame_extents()

	* gtk/gtkwindow.c (gtk_window_set_default_size): use
	gdk_window_resize() if the window is realized and resizeable

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_geometry_hints): fix
	typo so that setting gravity works

	* gtk/gtkwindow.c (gtk_window_move_resize): don't ever use
	allocation if auto_shrink is on, even if the default size
	has not changed.

	* gtk/gtkwidget.c (gtk_widget_render_icon): remove bogus
	g_return_if_fail
2001-03-29 23:02:30 +00:00
Owen Taylor
c61a8f282f *** empty log message *** 2001-03-29 21:17:45 +00:00
Tim Janik
c2c98d9e12 some cleanups, fixed mnemonic_widget handling, added PROP_MNEMONIC_WIDGET.
Thu Mar 22 13:01:44 2001  Tim Janik  <timj@gtk.org>

        * gtk/gtklabel.[hc]: some cleanups, fixed mnemonic_widget handling,
        added PROP_MNEMONIC_WIDGET.

        * gtk/gtkwindow.c (gtk_window_activate_mnemonic):
        (gtk_window_remove_mnemonic):
        (gtk_window_add_mnemonic): fixed assertions.
        (gtk_window_activate_mnemonic): constrain modifier checks to those
        permitted by gtk_accelerator_get_default_mod_mask().
        got rid of gtk_window_get_default_accel_group().

        * gtk/gtkwidget.c (gtk_widget_real_activate_mnemonic): handle non
        activatable widgets either by focussing or a warning.
        added a signal accumulator to ::activate_mnemonic which stops the
        emission once a handler returned TRUE.
2001-03-22 13:44:00 +00:00
Alexander Larsson
de5eafede2 Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed
2001-03-21  Alexander Larsson  <alexl@redhat.com>

        * gtk/gtkbutton.[ch]:
	* gtk/gtkdialog.c:
	Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and
	removed accel_group argument. Renamed gtk_button_new_accel() to
	gtk_button_new_with_mnemonic() and removed accel_group argument.

	* gtk/gtkcheckbutton.[ch]:
	New function gtk_check_button_new_with_mnemonic().

	* gtk/gtkentry.c:
	Override activate_mnemonic and just grab focus.

	* gtk/gtkitemfactory.c:
	Don't add menu uline accel group, instead use mnemonics support.

	* gtk/gtklabel.[ch]:
	New support for mnemonics.

	* gtk/gtkmarshal.list:
	Needed BOOLEAN:BOOLEAN for activate_mnemonic.

	* gtk/gtkmenu.[c]:
	* gtkmenushell.c:
	Use mnemonics instead of accel groups for uline
	support in menu items.
	Removed gtk_menu_get_uline_accel_group() and
	gtk_menu_ensure_uline_accel_group().

	* gtk/gtkmenuitem.c:
	Override activate_mnemonic to handle switching between
	menu items if there are collisions.

	* gtk/gtknotebook.c:
	Connect to activate_mnemonic on the tab_label, so that
	activating it switches to that notebook page.

	* gtk/gtkwidget.[ch]:
	Add activate_mnemonic signal. New function
	gtk_widget_activate_mnemonic() to emit it.
	Default implementation does activate/grab_focus.

	* gtk/gtkwindow.[ch]:
	Add support for mnemonics in windows.
	New functions:
	gtk_window_add_mnemonic, gtk_window_remove_mnemonic,
	gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier

	* gtk/testgtk.c:
	Update to function name changes.
2001-03-21 18:58:28 +00:00
Havoc Pennington
52658cd3dc Applied patch from Nils Barth (bug # 51041) to replace "gint" with
2001-03-16  Havoc Pennington  <hp@redhat.com>

	* Applied patch from Nils Barth (bug # 51041) to
	replace "gint" with "gboolean" and 0/1 with TRUE/FALSE
	in various places.
2001-03-16 20:12:40 +00:00
Hans Breuer
f4cd3854c5 updated
2001-03-09  Hans Breuer  <hans@breuer.org>

	* gdk/gdk.def : updated

	* gdk/win32/gdkevents-win32.c : don't ask input_only windows
	for their palette

	* gdk/win32/gdkgeometry-win32.c : reflect GdkWindowObject::mapped
	removing

	* gdk/win32/gdkwindow-win32.c : reflect GdkWindowObject::mapped
	removing and implemented Havoc's GdkWindow state functions;
	stick/unstick only as no-op, cause I don't know how to emulate
	on win32 ...

	* gtk/gtk.def : updated

	* gtk/gtkbox.c (gtk_box_get_spacing) : use g_return_val_if_fail ()

	* gtk/gtktypeutils.c : #include <string.h>

	* gtk/gtkwindow.h : declare gtk_window_set_decorated ()
2001-03-09 16:43:19 +00:00
Havoc Pennington
9d1e2a1323 new function, turns off decorations for a window.
2001-03-07  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns
	off decorations for a window.

	* demos/gtk-demo/button_box.c (create_bbox): adapt to button box
	changes

	* gtk/gtklabel.c (gtk_label_get_layout_offsets): new function
	to get location of PangoLayout inside the label, closes #51198

	* gtk/testgtk.c (create_bbox): fix up button box usage

	* gtk/testcalendar.c (create_calendar): fix up button box usage

	* gtk/gtkfilesel.c (gtk_file_selection_init): fixup buttonbox usage

	* gtk/gtkdialog.c (gtk_dialog_init): fixup buttonbox usage

	* gtk/gtkhbbox.h: deprecations

	* gtk/gtkvbbox.h: deprecations

	* gtk/gtkbox.c (gtk_box_get_spacing): new function, used to
	emulate deprecated gtk_button_box_get_spacing

	* gtk/gtkbbox.h: deprecate some useless functions, remove entirely
	the "set global default" functions
	(struct _GtkButtonBox): remove "spacing" field, use the one from
	GtkBox base class

	* gtk/gtkbbox.c (_gtk_button_box_child_requisition): rename with uscore

	* gtk/gtkiconfactory.c (gtk_icon_set_render_icon): If we fail to
	render the icon, return the missing image icon.

	* gtk/gtkimage.c (gtk_image_set_from_file): fall back to missing
	image icon if the load fails.

	* gtk/gtkstock.h (GTK_STOCK_MISSING_IMAGE): Add stock icon for use
	when no image is found; should be the Netscape "missing image"
	icon eventually but for now is a random image

	* gtk/gtkwindow.c (gtk_window_set_role): new function, sets the
	role for the session manager

	* gtk/testgtk.c (dnd_drop): remove use of GTK_WINDOW_DIALOG

	* gtk/gtkcompat.h (GTK_WINDOW_DIALOG): compat #define
	GTK_WINDOW_DIALOG GTK_WINDOW_TOPLEVEL

	* gtk/gtkenums.h (enum GtkWindowType): remove GTK_WINDOW_DIALOG
2001-03-07 21:10:44 +00:00
Alexander Larsson
83c3e076ef Added GdkWindowTypeHint type. Added modal_hint field to GdkWindindow. New
2001-03-05  Alexander Larsson  <alexl@redhat.com>

	* gdk/gdkwindow.h:
	Added GdkWindowTypeHint type. Added modal_hint field to GdkWindindow.
	New functions gdk_window_set_type_hint, gdk_window_set_modal_hint and
	gdk_window_set_icon_list for net wmspec functionality.

	* gdk/x11/gdkwindow-x11.c:
	Set _NEW_WM_STATE_MODAL from window->modal_hint in set_inital_hints.
	Implement gdk_window_set_type_hint, gdk_window_set_modal_hint and
	gdk_window_set_icon_list.
	Added gdk_wmspec_change_state helper function and used it in the code.
	Set _NET_WM_ICON_NAME in gdk_window_set_title and gdk_window_set_icon_name.

	* gtk/gtkdialog.c (gtk_dialog_init):
	Set GDK_WINDOW_TYPE_HINT_DIALOG.

	* gtk/gtkhandlebox.c (gtk_handle_box_realize):
	Set GDK_WINDOW_TYPE_HINT_TOOLBAR.

	* gtk/gtkwindow.c:
	new function gtk_window_set_type_hint.
	On realize, set type hint and modal hint.

	* gtk/gtkwindow.h:
	Added type_hint field and gtk_window_set_type_hint.
2001-03-05 15:09:02 +00:00
Havoc Pennington
75d79abf98 test the window state stuff
2001-02-26  Havoc Pennington  <hp@redhat.com>

	* gtk/testgtk.c: test the window state stuff

	* gtk/gtkwindow.c (gtk_window_present): new function, makes a
	window come to the user's attention as if it were just created
	(gtk_window_iconify): new function
	(gtk_window_deiconify): new function
	(gtk_window_stick): new function
	(gtk_window_unstick): new function
	(gtk_window_maximize): new function
	(gtk_window_unmaximize): new function

	* gtk/gtkwidget.h, gtk/gtkwidget.c: add window_state_event signal

	* gtk/gtkmain.c (gtk_main_do_event): handle GDK_WINDOW_STATE

	* gdk/x11/gdkevents-x11.c: create window state events when
	appropriate
	(gdk_wmspec_supported): new function

	* gdk/x11/gdkwindow-x11.c (gdk_window_iconify): handle
	iconification before showing the window
	(gdk_window_deiconify): new function
	(gdk_window_stick): new function
	(gdk_window_unstick): new function
	(gdk_window_maximize): new function
	(gdk_window_unmaximize): new function

	* gdk/gdkwindow.c: store the window state in the window;
	change to using the GDK_WINDOW_STATE_WITHDRAWN flag instead of
	window->mapped.
	(gdk_window_get_state): return the current window state

	* gdk/gdkevents.c (gdk_event_get_time): handle GDK_WINDOW_STATE
	(gdk_event_get_state): handle GDK_WINDOW_STATE
	(gdk_synthesize_window_state): function to create the window state
	events

	* gdk/gdkevents.h (struct _GdkEventWindowState): new type of
	event, for changes to "window state" such as maximized, sticky,
	etc.

	* gdk/x11/gdkwindow-x11.c (gdk_window_focus): new function,
	focuses a window

	* gdk/x11/gdkmain-x11.c (_gdk_wmspec_supported): new function,
	finds out if we support a given WM spec hint
2001-02-27 20:40:15 +00:00
Alexander Larsson
59b6bf3863 New files. Contains an implementation of a minimal WM for linux-fb.
2001-01-08  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkwindow-decorate.[hc]:
	* gtk/Makefile.am:
	New files. Contains an implementation of a minimal WM for
	linux-fb.

	* gtk/gtkwindow.h:
	Add the possibility for GtkWindows to specify a frame. This
	is used for the window decoration code, but could concievably
	be used for X programs too (xmms style windows).
	GtkWindow->frame is the toplevel window if the window is framed.
	The signal frame_event gets all events that are targeted to
	GtkWindow->frame.
	(_gtk_window_constrain_size): Exported for usage by gtkwindow-decorate.c.

	* gtk/gtkwindow.c:
	Implement gtk_window_set_has_frame and gtk_window_set_frame_dimensions.
	Call out to gtkwindow-decorate.c for WM support in linx-fb.
2001-01-08 17:04:17 +00:00
Havoc Pennington
1c9f0c0bac create some stock buttons with the default accel group (create_image):
2000-10-04  Havoc Pennington  <hp@redhat.com>

	* gtk/testgtk.c (create_buttons): create some stock buttons
	with the default accel group
	(create_image): test some new GtkImage features
	(make_message_dialog): test GtkMessageDialog
	(create_modal_window): fix someone's bizzarro indentation

        * gtk/gtkwindow.h, gtk/gtkwindow.c: Implement
	GTK_WIN_POS_CENTER_ON_PARENT.
	Add "destroy with parent" setting, which means the window goes
	away with its transient parent.
	(gtk_window_get_default_accel_group): get the default accel group
	for the window.
	(gtk_window_set_destroy_with_parent): set/unset destroy with
	parent flag
	(gtk_window_read_rcfiles): invalidate icon set caches
	after reloading rcfiles

	* gtk/gtkenums.h (GtkWindowPosition): add
	GTK_WIN_POS_CENTER_ON_PARENT, which centers a dialog
	on its parent window when the dialog is mapped for the first time.

        * gtk/gtkmessagedialog.h, gtk/gtkmessagedialog.c: Add
	a simple message dialog class

	* gtk/gtkdialog.c (gtk_dialog_init): Connect delete event
	handler to emit response signal, and maybe later it would
	honor a hide_on_delete flag - though that isn't there yet.
	Set border width on the vbox to 2, so we get some padding.
	Use a button box for the action area.
	(gtk_dialog_key_press): synthesize a delete event if Esc
	is pressed and the GtkWidget key press handler didn't
	handle the escape key.
	(gtk_dialog_new_with_buttons): new function creates a dialog
	with some default buttons in it.
	(gtk_dialog_add_action_widget): add an activatable widget
	as a button in the dialog - you can also add a non-activatable
	widget by accessing the action area directly.
	(gtk_dialog_add_button): add a simple button - stock ID or
	label - to the action area
	(gtk_dialog_response): emit response signal
	(gtk_dialog_run): block waiting for the dialog, return
	the response. Override normal delete_event behavior, so that
	delete_event does nothing inside gtk_dialog_run().

	* gtk/gtkdialog.h, gtk/gtkdialog.c: Add "response" signal
	emitted when an action widget is clicked or the dialog gets
	delete_event

	* gtk/gtk.h: add gtkmessagedialog.h

	* gtk/Makefile.am: add gtkmessagedialog.[hc]

2000-10-20  Havoc Pennington  <hp@redhat.com>

	* gtk/gtk-sections.txt: Add dialog docs
2000-10-20 23:14:41 +00:00
Elliot Lee
0176b387c8 Use G_GNUC_CONST.
Use G_GNUC_CONST.
2000-08-30 00:33:38 +00:00
Tim Janik
afee2c67c5 applied patch from Andreas Persenius <ndap@swipnet.se> that updates the
Wed Jul 26 12:59:31 2000  Tim Janik  <timj@gtk.org>

        * *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
        updates the license headers to the GNU Lesser General Public License,
        as well as updating the copyright year to 2000.
2000-07-26 11:33:08 +00:00
Tim Janik
9595c55184 documented necessary changes for 1.4 transition.
Fri May 12 17:13:32 2000  Tim Janik  <timj@gtk.org>

	* docs/Changes-1.4.txt: documented necessary changes for 1.4 transition.

	* gtk/gtktext.c: made the adjustments no-construct args, simply
	provide default adjustments.
	(gtk_text_destroy): release adjustments.

	* gtk/gtkprogressbar.c (gtk_progress_bar_class_init): made the
	adjustment argument non-construct.

	* gtk/gtkprogress.c (gtk_progress_destroy): release adjustment here,
	instead of in finalize.
	(gtk_progress_get_text_from_value):
	(gtk_progress_get_current_text):
	(gtk_progress_set_value):
	(gtk_progress_get_percentage_from_value):
	(gtk_progress_get_current_percentage):
	(gtk_progress_set_percentage):
	(gtk_progress_configure): ensure an adjustment is present.

Thu May 11 01:24:08 2000  Tim Janik  <timj@gtk.org>

	* gtk/gtkcolorsel.[hc]:
	* gtk/gtkcolorseldialog.[hc]:
	* gtk/gtkhsv.[hc]: major code cleanups, destroy handlers need to chain
	their parent implementation, use bit fields for boolean values, don't
	create unused widgets, usage of glib types, braces go on their own
	lines, function argument alignment, #include directives etc. etc. etc..

	* gtk/Makefile.am (gtk_public_h_sources): install gtkhsv.h.

Wed May 10 23:29:52 2000  Tim Janik  <timj@gtk.org>

	* gtk/gtktoolbar.c (gtk_toolbar_destroy): don't unref a NULL tooltips.

	* gtk/gtkfilesel.c (gtk_file_selection_destroy): don't free a cmpl_state
	of NULL.

	* gtk/gtkcombo.c (gtk_combo_item_destroy): don#t keep references
	to freed data.
	(gtk_combo_destroy): don't keep a pointer to a destroyed window.

	* gtk/gtkmenu.c (gtk_menu_init): reset the menu's toplevel pointer
	to NULL when the toplevel is getting destroyed.
	(gtk_menu_set_tearoff_state): same here for the tearoff_window.
	(gtk_menu_destroy):
	(gtk_menu_init): store the information of whether we have to
	readd the initial child ref_count during destruction in a new
	GtkMenu field needs_destruction_ref_count.

	* gtk/gtkviewport.c: SHAME! ok this one is tricky, so i note it
	here, those reading: learn from my mistake! ;)
	in order for set_?adjustment to support a default adjustemnt if
	invoked with an adjustment pointer of NULL, the code read (pseudo):
	if (v->adjustment) unref (v->adjustment);
	if (!adjustment) adjustment = adjustment_new ();
	if (v->adjustment != adjustment) v->adjustment = ref (adjustment);
	now imagine the first unref to actually free the old adjustment and
	adjustment_new() creating a new adjustment from the very same memory
	portion. here, the latter comparision will unintendedly fail, and
	all hell breaks loose.
	(gtk_viewport_set_hadjustment):
	(gtk_viewport_set_vadjustment): reset viewport->?adjustment to NULL
	after unreferencing it.

	* gtk/gtkcontainer.[hc]: removed toplevel registration
	functions: gtk_container_register_toplevel(),
	gtk_container_unregister_toplevel() and
	gtk_container_get_toplevels() which had wrong semantics
	anyways: it didn't reference and copy the list.

	* gtk/gtkwindow.c: we take over the container toplevel registration
	bussiness now. windows are registered across multiple destructions,
	untill they are finalized. the initial implicit reference count
	users are holding on windows is removed with the first destruction
	though.
	(gtk_window_init): ref & sink and set has_user_ref_count, got
	rid of gtk_container_register_toplevel() call. add window to
	toplevel_list.
	(gtk_window_destroy): unref the window if has_user_ref_count
	is still set, got rid of call to
	gtk_container_unregister_toplevel().
	(gtk_window_finalize): remove window from toplevel list.
	(gtk_window_list_toplevels): new function to return a newly
	created list with referenced toplevels.
	(gtk_window_read_rcfiles): use gtk_window_list_toplevels().

	* gtk/gtkhscale.c (gtk_hscale_class_init): made the GtkRange
	adjustment a non-construct arg.
	* gtk/gtkvscale.c (gtk_vscale_class_init): likewise.
	* gtk/gtkhscrollbar.c (gtk_vscrollbar_class_init): likewise.
	* gtk/gtkvscrollbar.c (gtk_vscrollbar_class_init): likewise.

	* gtk/gtkrange.c: added some realized checks.
	(gtk_range_destroy): get rid of the h/v adjustments in the
	destroy handler instead of finalize. remove timer.
	(gtk_range_get_adjustment): demand create adjustment.

	* gtk/gtkviewport.c: made h/v adjustment non-construct args.
	we simply create them on demand now and get rid of them in
	the destroy handler.
	(gtk_viewport_destroy): get rid of the h/v adjustments in the
	destroy handler instead of finalize.
	(gtk_viewport_get_hadjustment):
	(gtk_viewport_get_vadjustment):
	(gtk_viewport_size_allocate): demand create h/v adjustment
	if required.

	* gtk/gtkwidget.c (gtk_widget_finalize): duplicate part of the
	gtk_widget_real_destroy () functionality.
	(gtk_widget_real_destroy): reinitialize with a new style, instead
	of setting widget->style to NULL.

Fri May  5 13:02:09 2000  Tim Janik  <timj@gtk.org>

	* gtk/gtkcalendar.c:
	* gtk/gtkbutton.c: ported _get_type() implementation over to
	GType, either to preserve memchunks allocation facilities,
	or because Gtk+ 1.0 GtkTypeInfo was still being used.

	* gtk/gtkobject.[hc]: derive from GObject. ported various functions
	over. prepare for ::destroy to be emitted multiple times.
	removed reference tracer magic. chain into GObjectClass.shutdown()
	to emit ::destroy signal.

	* gtk/gtksignal.c: removed assumptions about GTK_TYPE_OBJECT being
	fundamental.

	* gtk/gtkmain.c: removed gtk_object_post_arg_parsing_init()
	cludge.

	* gtk/gtksocket.c:
	* gtk/gtkplug.c:
	* gtk/gtklayout.c:
	* gtk/gtklabel.c:
	* gtk/gtkargcollector.c:
	* gtk/gtkarg.c: various fixups to work with GTK_TYPE_OBJECT
	not being a fundamental anymore, and to work with the new
	type system (nuked fundamental type varargs clutter).

	* gtk/*.c: install finalize handlers in the GObjectClass
	part of the class structure.
	changed direct GTK_OBJECT()->klass accesses to
	GTK_*_GET_CLASS().
	changed direct object_class->type accesses to GTK_CLASS_TYPE().

	* gtktypeutils.[hc]: use the reserved fundamental ids provided by
	GType. made most of the GTK_*() type macros and Gtk* typedefs
	simple wrappers around macros and types provided by GType.
	most notably, a significant portion of the old API vanished:
	GTK_TYPE_MAKE(),
	GTK_TYPE_SEQNO(),
	GTK_TYPE_FLAT_FIRST, GTK_TYPE_FLAT_LAST,
	GTK_TYPE_STRUCTURED_FIRST, GTK_TYPE_STRUCTURED_LAST,
	GTK_TYPE_ARGS,
	GTK_TYPE_CALLBACK,
	GTK_TYPE_C_CALLBACK,
	GTK_TYPE_FOREIGN,
	GtkTypeQuery,
	gtk_type_query(),
	gtk_type_set_varargs_type(),
	gtk_type_get_varargs_type(),
	gtk_type_check_object_cast(),
	gtk_type_check_class_cast(),
	gtk_type_describe_tree(),
	gtk_type_describe_heritage(),
	gtk_type_free(),
	gtk_type_children_types(),
	gtk_type_set_chunk_alloc(),
	gtk_type_register_enum(),
	gtk_type_register_flags(),
	gtk_type_parent_class().
	replacements, where available are described in ../docs/Changes-1.4.txt.
	implemented compatibility functions for the remaining API.

	* configure.in: depend on glib 1.3.1, use gobject module.
2000-05-12 15:25:50 +00:00