1. 01 May, 2013 1 commit
  2. 08 Apr, 2013 1 commit
    • Tristan Van Berkom's avatar
      Work around access to global resources without calling gtk_init() · 4ec6d600
      Tristan Van Berkom authored
      Some utilities such as GIR and gtk-doc, initialize class vtables without
      initializing GTK+, with composite templates accessing resources this
      causes a hand full of unneeded warnings.
      
      The workaround for now is the use a private function _gtk_ensure_resources()
      which is both called while initializing GTK+, and at the beginning of
      gtk_widget_class_set_template_from_resource() (the private function
      ensures that the resource will only ever be registered GOnce).
      4ec6d600
  3. 04 Dec, 2012 1 commit
  4. 03 Sep, 2012 1 commit
    • Carlos Garnacho's avatar
      Add GtkTextHandle · 1f7e375c
      Carlos Garnacho authored
      This is a helper object to allow text widgets to implement
      text selection on touch devices. It allows for both cursor
      placement and text selection, displaying draggable handles
      on/around the cursor and selection bound positions.
      
      Currently, this is private to GTK+, and only available to
      GtkEntry and GtkTextView.
      1f7e375c
  5. 01 Mar, 2012 1 commit
    • Carlos Garcia Campos's avatar
      gtk: Add a way to do event capture · 9f4bfff1
      Carlos Garcia Campos authored
      This patch adds a capture phase to GTK+'s event propagation
      model. Events are first propagated from the toplevel (or the
      grab widget, if a grab is in place) down to the target widget
       and then back up. The second phase is using the existing
      ::event signal, the new capture phase is using a private
      API instead of a public signal for now.
      
      This mechanism can be used in many places where we currently
      have to prevent child widgets from getting events by putting
      an input-only window over them. It will also be used to implement
      kinetic scrolling in subsequent patches.
      
      http://bugzilla.gnome.org/show_bug.cgi?id=641836
      
      We automatically request more motion events in behalf of
      the original widget if it listens to motion hints. So
      the capturing widget doesn't need to handle such
      implementation details.
      
      We are not making event capture part of the public API for 3.4,
      which is why there is no ::captured-event signal.
      9f4bfff1
  6. 27 Feb, 2012 1 commit
  7. 25 Nov, 2011 1 commit
  8. 18 Nov, 2011 2 commits
    • Michael Natterer's avatar
      Turn the private #define for the group-shifting modifier into API · 9c79f9f8
      Michael Natterer authored
      Add GDK_MODIFIER_INTENT_SHIFT_GROUP to enum GdkModifierIntent
      and handle it in gdk_keymap_get_modifier_mask(). Add an X11
      impl of the method and return keymap_x11->group_switch_mask.
      Return 0 from the default impl because we don't know.
      9c79f9f8
    • Michael Natterer's avatar
      Bug 663856 - Make option-foo accelerators use the right symbol · 1c8481a6
      Michael Natterer authored
      If the keyboard group shifting modifier is *also* a normal
      accelerator modifier, we need to special case it when calling
      gdk_keymap_translate_keyboard_state(), so we get the right
      key symbol for accelerators (for example we want Option-O,
      not Option-Ø displayed in menu items). This patch should only
      affect quartz where the Alt key both shifts the group and can
      be used as accel modifier, and not X11 or Win32 where AltGr
      is not used for accelerators.
      
      - fix quartz' gdk_keymap_translate_keyboard_state() to return
        the right consumed_modifiers
      - add _gtk_translate_keyboard_accel_state() which does the
        special casing
      - use it everywhere instead of gdk_keymap_translate_keyboard_state()
      1c8481a6
  9. 02 Nov, 2011 1 commit
  10. 22 Oct, 2011 1 commit
    • Michael Natterer's avatar
      gtk: clean up the private horror · 2688ccdb
      Michael Natterer authored
      - add gtkmodulesprivate.h and move stuff there from gtkprivate.h
      - add gtkprivate.c and move stuff there from gtkmain.c
      - add gtkwin32.c and move stuff there from gtkmain.c
      - don't redefine GTK_DATADIR and friends in gtkprivate.h
      - have _gtk_get_datadir() and friends on all platforms
      - remove the horrid hacks where gtkprivate.h can't be included,
        or must be included later due to redefinition of the compile-time
        directories
      2688ccdb
  11. 08 Oct, 2011 1 commit
  12. 07 Oct, 2011 1 commit
    • Michael Natterer's avatar
      gtk: remove the private GTK_DEFAULT_ACCEL_MOD_MASK define · 5327034c
      Michael Natterer authored
      and finish the port to using the new modifier abstraction API.
      This commit has some evilness, it uses the default display for
      the lack of a widget context, and the change to gtkstock.c
      is very ugly, but I can't think of anything better given
      GtkStockItem needs an accel mask instead of a proper accel
      string.
      5327034c
  13. 27 Sep, 2011 3 commits
  14. 26 Sep, 2011 3 commits
  15. 04 Jan, 2011 1 commit
  16. 20 Oct, 2010 2 commits
  17. 11 Oct, 2010 1 commit
    • Owen W. Taylor's avatar
      Fix handling of the geometry widget · 88cf5470
      Owen W. Taylor authored
      The geometry widget feature of gtk_window_set_geometry_hints() has
      never really worked right because the calculation that GTK+ did to
      compute the base size of the window only worked when the geometry
      widget had a larger minimum size than anything else in the window.
      
      Setup:
      * Move the GtkSizeGroup private functions to a new private header
        gtksizegroup-private.h
      * Add the possibilty to pass flags to _gtk_size_group_queue_resize(),
        with the flag GTK_QUEUE_RESIZE_INVALIDATE_ONLY to suppress adding
        the widget's toplevel to the resize queue.
      * _gtk_container_resize_invalidate() is added to implement that feature
      * _gtk_widget_override_size_request()/_gtk_widget_restore_size_request()
        allow temporarily forcing a large minimum size on the geometry
        widget without creating resize loops.
      
      GtkWindow:
      * Compute the extra width/height around the geometry widget
        correctly; print a warning if the computation fails.
      * Always make the minimum size at least the natural minimum
        size of the toplevel; GTK+ now fails badly with underallocation.
      * Always set the base size hint; we were failing to set it
        properly when the specified minimum size was overriden, but
        it's harmless to always set it.
      
      Tests:
      * New test 'testgeometry' that replaces the 'gridded geometry' test
        from testgtk. The new test is roughly similar but creates a bunch
        of windows showing different possibilities.
      * The testgtk test is removed. No need to have both.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=68668
      88cf5470
  18. 27 Sep, 2010 1 commit
  19. 26 Sep, 2010 1 commit
    • Benjamin Otte's avatar
      Move GtkSizeRequest into GtkWidget · d9c92598
      Benjamin Otte authored
      It doesn't make sense to keep them separate as GtkSizeRequest requires a
      GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
      one without the other.
      It also makes the code a lot easier because no casts are required when
      calling functions.
      
      Also, the names would translate to gtk_widget_get_width() and people
      agreed that this would be a too generic name, so a "preferred" was added
      to the names.
      
      So this patch moves the functions:
      gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
      gtk_size_request_get_width() => gtk_widget_get_preferred_width()
      gtk_size_request_get_height() => gtk_widget_get_preferred_height()
      gtk_size_request_get_size() => gtk_widget_get_preferred_size()
      gtk_size_request_get_width_for_height() =>
        gtk_widget_get_preferred_width_for_height()
      gtk_size_request_get_height_for_width() =>
        gtk_widget_get_preferred_height_for_width()
      ... and moves the corresponding vfuncs to the GtkWidgetClass.
      
      The patch also renames the implementations of the vfuncs in widgets to
      include the word "preferrred".
      d9c92598
  20. 21 Sep, 2010 1 commit
    • Tristan Van Berkom's avatar
      Reduced overall SizeRequestCache size · ca251cf1
      Tristan Van Berkom authored
      This patch changes the 'age' counting previous approach taken
      verbatim from clutter and changes it for a counter of validated
      caches and an index to the last cached value which we use to
      round-robin through the cache if ever a widget is requested
      for more than 3 contextual sizes (cache is reduced by 3 * sizeof (int)
      per widget private data).
      ca251cf1
  21. 09 Sep, 2010 1 commit
    • Tristan Van Berkom's avatar
      Moved GtkSizeRequest cache to GtkWidget->priv · 843be485
      Tristan Van Berkom authored
      Now that we have a private data installed directly on
      the GtkWidget instance it makes no sense to cache the size
      requests on widget qdata. This change will generally make
      GTK+ memory less fragmented as well as significantly speed
      up the size request process.
      843be485
  22. 08 Sep, 2010 1 commit
    • Tristan Van Berkom's avatar
      Completely removed requisition cache from GtkWidget instance structure. · 99340074
      Tristan Van Berkom authored
      Since we have a new mechanism for requesting sizes: GtkSizeRequestIface;
      it makes no sense to maintain this cache on the GtkWidget structure...
      removing the requisition cache however does not break the old "size-request"
      signal which is there for backwards compatability reasons.
      
      In any case widget->requisition should not have been accessed,
      gtk_widget_get_child_requisition() would have been the correct way
      to consult the cache.
      
      This commit also deprecates the newly added gtk_widget_get_requisition()
      API and makes it fallback on gtk_size_request_get_size().
      99340074
  23. 25 May, 2010 1 commit
  24. 13 Apr, 2010 1 commit
    • Tristan Van Berkom's avatar
      Mega commit to change ->get_desired_size() for ->get_desired_width/height(). · d2c35ec6
      Tristan Van Berkom authored
      This commit changes gtk_extended_layout_get_desired_size() for
      per dimension variants. Furthermore this commit reverts the actions
      done in size-groups for now as it needs a different approach.
      
      The natural width/height parameters added to aux_info have been changed
      for a per width cache for heights and a per height cache for widths.
      
      gtk-demo is still working, currently sizegroups are not taken
      into account as mentioned above - size groups need to be alerted both
      when the widths and heights are updated independantly and then that
      information needs to repropagate also to other extended layout implementors.
      d2c35ec6
  25. 25 Oct, 2009 1 commit
  26. 01 Aug, 2008 1 commit
    • Cody Russell's avatar
      Bug 56070 – Can't click button after setting it sensitive. · 4e3c97b3
      Cody Russell authored
      2008-07-31  Cody Russell  <bratsche@gnome.org>
      
              Bug 56070 – Can't click button after setting it sensitive.
      
              * gtk/gtkwidget.[ch] 
              * gtk/gtkwindow.c
              * gtk/gtkmain.c
              * gtk/gtkbutton.c
              * gtk/gtkprivate.h
              * gdk/gdkevents.h: Synthesize crossing events events where necessary.
      
              * gtk/tests/crossingevents.c: Add unit tests for crossing events.
      
              Big thanks to Ed Catmur, Matthias Clasen, and everyone else who
              has worked on and helped out with this.
      
      
      svn path=/trunk/; revision=20924
      4e3c97b3
  27. 01 Jul, 2008 1 commit
  28. 30 Jun, 2008 1 commit
    • Cody Russell's avatar
      Practically everything changed. · fce9c8b7
      Cody Russell authored
      2008-06-30  Cody Russell  <bratsche@gnome.org>
      
              * Practically everything changed.
      
              Change	all references	of GIMP	Toolkit	(and variations	of it)
              to GTK+	Toolkit, showing no mercy at all to our	beloved
      	ancestry. (#540529)
      
      
      svn path=/trunk/; revision=20709
      fce9c8b7
  29. 24 Jun, 2008 1 commit
    • Michael Natterer's avatar
      gtk/gtkassistant.h gtk/gtkcellrenderer.h gtk/gtkfilechooserentry.h · a13f698b
      Michael Natterer authored
      2008-06-24  Michael Natterer  <mitch@imendio.com>
      
      	* gtk/gtkassistant.h
      	* gtk/gtkcellrenderer.h
      	* gtk/gtkfilechooserentry.h
      	* gtk/gtkprivate.h
      	* gtk/gtktooltip.h
      	* gtk/gtktreeview.h
      	* gtk/gtkwindow.h: no need to include gtkwidget.h or gtkobject.h
      	if there is any other widget included, they all have to include
      	their respective parent classes (the is-a relation works for
      	includes too).
      
      
      svn path=/trunk/; revision=20679
      a13f698b
  30. 22 Mar, 2005 1 commit
  31. 02 Jun, 2004 1 commit
    • Federico Mena Quintero's avatar
      Fix #138807. · 3127f29e
      Federico Mena Quintero authored
      2004-06-02  Federico Mena Quintero  <federico@ximian.com>
      
      	Fix #138807.
      
      	* gtk/fnmatch.c (_gtk_fnmatch): Take a no_leading_period argument.
      	(gtk_fnmatch_intern): Likewise; also implement this option.
      
      	* gtk/gtkprivate.h (_gtk_fnmatch): Updated prototype.
      
      	* gtk/gtkfilesel.c (find_completion_dir): Pass TRUE for the
      	no_leading_period argument of _gtk_fnmatch().
      	(attempt_file_completion): Likewise.
      
      	* gtk/gtkfilefilter.c (gtk_file_filter_filter): Pass FALSE for the
      	no_leading_period argument of _gtk_fnmatch().
      3127f29e
  32. 14 Dec, 2003 1 commit
    • Hans Breuer's avatar
      handle GTK_DATADIR similar as the other filesystem placement 'constants' · 4acd98a8
      Hans Breuer authored
      2003-12-14  Hans Breuer  <hans@breuer.org>
      
      	* gtk/gtkprivate.h gtk/gtkmain.c : handle GTK_DATADIR
      	similar as the other filesystem placement 'constants' (dynamic
      	resolving on win32)
      
      	* gtk/gtkfilechooserwidget.c : handle file system to win32
      	renaming here as will
      	* gtk/gtkfilesystemwin32.c : implement render_icon
      
      	* gtk/gtk.def gdk/gdk.def : updated externals
      
      	* gdk/win32/gdkdisplay-win32.c : make it compile without
      	<multimon.h> - i.e. even older sdk
      
      	* gdk/win32/gdkevents-win32.c : match resize_timer_proc
      	with TIMERPROC prototype
      
      	* gdk/win32/gdkwindow-win32.c : older msvc does not know
      	BITMAPV5HEADER (from win xp) either
      
      	* gtk/gtkimmodule.c : make it compile even if GTK_LOCALEDIR is
      	not defined
      
      	* tests/testfilechooser.c : recent GLib crashes on
      	g_print ("%s", NULL) so avoid this
      4acd98a8
  33. 13 Dec, 2002 1 commit
    • Owen Taylor's avatar
      System fnmatch wasn't going to be UTF-8 clean, neither was our version. · 73b15ba3
      Owen Taylor authored
      Fri Dec 13 17:45:40 2002  Owen Taylor  <otaylor@redhat.com>
      
              * gtk/fnmatch.c gtk/gtkprivate.h gtk/gtkfilesel.c:
              System fnmatch wasn't going to be UTF-8 clean, neither
              was our version. Redo our fnmatch.c to be UTF-8, add
              test cases, fix all sorts of bugs inherited
              from the antique GNU fnmatch code. Change interface
              to get rid of fnmatch.h constants. Fixes basic
              non-workingness of filesel with non-ASCII filenames.
      
              * gtk/fnmatch.h: No longer needed.
      73b15ba3
  34. 04 Nov, 2001 1 commit
    • Owen Taylor's avatar
      Add a function gdk_window_invalidate_maybe_recurse() for use in "shallow · 21457ced
      Owen Taylor authored
      Sun Nov  4 16:02:08 2001  Owen Taylor  <otaylor@redhat.com>
      
              * gdk/gdkwindow.[ch]: Add a function gdk_window_invalidate_maybe_recurse()
              for use in "shallow invalidation" of a widget. (Windows belonging
              to the widget, but not to the widget's children)
      
              * gtk/gtkprivate.h gtk/gtkwidget.c gtk/gtksizegroup.c: Add private
              flags GTK_ALLOC_NEEDED, GTK_REQUEST_NEEDED.  These flags are set
              up on ancestors up to the resize container on queue_resize. Size
              requests only actually take place if GTK_REQUEST_NEEDED, size
              allocations only take place if GTK_ALLOC_NEEDED or the size
              changed.
      
              * gtk/gtkcontainer.c gtk/gtkwidget.c: Remove
              container->resize_widgets and the RESIZE_NEEDED flag since the
              above flags are sufficient to figure out what needs to be
              resized/reallocated. Remove code manipulating
              container->resize_widget.
      
              * gtk/gtkwidget.[ch]: Add gtk_widget_set_redraw_on_alloc(); this
              allows widgets to turn off being automatically invalidated is when
              they are resized.
      
              * gtk/gtkwidget.[ch] (gtk_widget_size_allocate): Invalidation when
              a widget is resized or moved is "shallow" as described above -
              only the windows that need to be invalidated are invalidated.
      
              * gtk/gtkbox.c gtk/gtktable.c gtk/gtkalignment.c docs/Changes-2.0.txt:
              Make these widget's init functions call
              gtk_widget_set_redraw_on_allocate(widget,FALSE).
      
              * gtk/gtkwindow.c (gtk_window_configure_event): Call
              _gtk_container_queue_resize(), since we don't want
              redrawing. (Probably could be done for other
              calls to gtk_widget_queue_resize() in gtkwindow.c,
              but this is the most important one.)
      
              * gtk/gtkwindow.c (gtk_window_move_resize): Don't call
              gtk_widget_queue_draw() - size_allocate() handles
              that as appropriate.
      
              * gtk/gtkframe.c (gtk_frame_size_allocate): Invalidate instead
              of queue_clear() to avoid invalidating children.
      21457ced