| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Avoid returning a value on a 'void' function, which is considered an error when
building against GLib-2.68.x or later on Visual Studio when
msvc_recommended_pragmas.h is force-included.
|
|
|
|
|
|
| |
On Visual Studio-style builds, we can check for warnings that we really want to
look out for and silence the ones that we can really not worry about. This
header comes with GLib, which we are already using, anyways.
|
|
|
|
|
|
|
|
|
|
| |
...and mark the symbols (except the private ones) with GD_API. This way, on
compilers that do not have an auto-export mechanism, we can export symbols by
defining GD_API as needed to use compiler directives to export the symbols.
This has been tested by generating the introspection files, as well as building
the two sample programs against a shared build of libgd with all features
enabled.
|
|
|
|
|
|
|
|
| |
This is the macro that will be used to decorate the symbols in the various
headers so that we can use compiler directives to export the symbols as
we incorporate libgd items in our GNOME items, as necessary. This will
enable items such as gedit to work properly as they expect libgd items to
be exported as well during runtime.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds an option that is enabled by default so that we can make Visual
Studio-style builds (which also includes clang-cl) export symbols from the
libgd copy that we incorporate into various things that we build or when
libgd is built standalone as a shared library. Items such as gedit relies on
items in its included libgd parts to be exported in order to function
correctly.
This commit is the first part that adds a compiler macro which will activate
parts of the code so that symbols will be built with the needed symbols marked
for export, which will be in the subsequent commit(s).
|
|
|
|
|
|
|
|
|
| |
Move up the declaration of the '_GdMarginContainerPrivate' struct so that
Visual Studio will not complain that the stryct is undefined when we use
'G_DEFINE_TYPE_WITH_CODE (GdMarginContainer...)' with that private struct.
Also stop trying to include config.h since the code has nothing that requires
configuration macros.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This commit removes the usage of g_type_class_add_private function and
starts to use G_DEFINE_TYPE_WITH_PRIVATE or G_DEFINE_TYPE_WITH_CODE
(... G_ADD_PRIVATE ...) in order to define a class with private members.
g_type_class_add_private is being deprecated since glib 2.58.
|
|
|
|
|
|
|
|
|
| |
We no longer have a priv pointer inside the struct, and
G_DECLARE_DERIVABLE_TYPE has removed the need for the instance and
class typedefs. Therefore, this is a good time to clean up the header
and move the typedef for GdTwoLinesRendererPrivate into the .c file.
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
|
|
|
|
|
|
| |
The current GObject recommendation is to use the generated
get_instance_private function instead of a separate priv pointer in the
instance struct. The saves one pointer per class in the heirarchy
multiplied by the number of instances of the type, and the function is
fast enough because it only does pointer arithmetic.
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
|
|
|
|
|
|
| |
This paves the way for improving our GObject use and reducing the
amount of boilerplate.
G_DEFINE_WITH_WITH_PRIVATE was introduced in GLib 2.38, which should be
old enough for all users.
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
|
|
|
|
|
| |
The code is trying to draw the border around a rubberband selection,
that's represented by a Cairo path. It's not necessarily a simple
rectangle, and, therefore, cannot be replaced by gtk_render_frame.
Let's disable the deprecation instead.
https://bugzilla.gnome.org/show_bug.cgi?id=742910
|
|
|
|
|
|
|
|
|
|
| |
Generated files go in $(builddir), not $(srcdir).
(That was a trick to avoid requiring gir & vapi generation at build
time. But since libgd already requires vapigen & g-i at configure
time, it shouldn't be a problem to require them too at build-time)
https://bugzilla.gnome.org/show_bug.cgi?id=690972
|
|
|
|
|
|
|
|
| |
There's no need to initialize an unsigned integer private member
variable to zero, because the entire struct is zero-initialized by
GObject.
Fallout from 4b7f3139345adee740adc0a4e5bf74d9b7d22d0f
|
|
|
|
|
|
| |
main-box directly depends on main-icon-box, and indirectly on gtk-hacks
through main-icon-box. Therefore, only specifying with-main-box should
include both main-icon-box and gtk-hacks.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
|
|
|
|
|
| |
We no longer have a priv pointer inside the struct, and
G_DECLARE_DERIVABLE_TYPE has removed the need for the instance and
class typedefs. Therefore, this is a good time to clean up the header
and move the typedef for GdTwoLinesRendererPrivate into the .c file.
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
|
|
|
|
|
|
| |
The current GObject recommendation is to use the generated
get_instance_private function instead of a separate priv pointer in the
instance struct. The saves one pointer per class in the heirarchy
multiplied by the number of instances of the type, and the function is
fast enough because it only does pointer arithmetic.
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
|
|
|
|
|
|
| |
This paves the way for improving our GObject use and reducing the
amount of boilerplate.
G_DEFINE_WITH_WITH_PRIVATE was introduced in GLib 2.38, which should be
old enough for all users.
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
|
|
|
|
|
| |
We no longer have a priv pointer inside the struct, and
G_DECLARE_DERIVABLE_TYPE has removed the need for the instance and
class typedefs. Therefore, this is a good time to clean up the header
and move the typedef for GdStyledTextRendererPrivate into the .c file.
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
|
|
|
|
|
|
| |
The current GObject recommendation is to use the generated
get_instance_private function instead of a separate priv pointer in the
instance struct. The saves one pointer per class in the heirarchy
multiplied by the number of instances of the type, and the function is
fast enough because it only does pointer arithmetic.
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
|
|
|
|
|
|
| |
This paves the way for improving our GObject use and reducing the
amount of boilerplate.
G_DEFINE_WITH_WITH_PRIVATE was introduced in GLib 2.38, which should be
old enough for all users.
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
|
|
|
|
|
| |
We no longer have a priv pointer inside the struct, and
G_DECLARE_DERIVABLE_TYPE has removed the need for the instance and
class typedefs. Therefore, this is a good time to clean up the header
and move the typedef for GdMainIconViewPrivate into the .c file.
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=774709
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The g_clear_pointer macro in GLib gained a bit of type safety when
using GCC and GCC-compatible compilers. It checks if the function
pointer is meant to accept a pointer to the type that the first
argument refers to. Now, GCC doesn't like it if the function pointer is
cast to GDestroyNotify, and emits this warning:
warning: function called through a non-compatible type
Since the macro, even the earlier version of it, was explicitly
designed to avoid the need to cast the arguments, these redundant casts
should be removed.
https://gitlab.gnome.org/GNOME/glib/issues/1425
|
|
|
|
|
| |
Both main-icon-box and main-view need gtk-hacks during build time. Make
these widgets depend on gtk-hacks by default.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=793295
|
|
|
|
|
|
| |
This will make the subsequent commit easier to read.
https://bugzilla.gnome.org/show_bug.cgi?id=793295
|
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise, currently, the text is oddly biased towards the upper edge
of the cell. This is very clearly noticeable when there's no sub-title,
but is also discernable, although to a lesser degree, when there is.
This also matches what GtkCellRendererText does.
Some changes by Debarshi Ray.
https://bugzilla.gnome.org/show_bug.cgi?id=792665
|
|
|
|
|
|
| |
This also matches what GtkCellRendererText does.
https://bugzilla.gnome.org/show_bug.cgi?id=792665
|
|
|
|
|
|
|
| |
The PangoLayouts are only needed for gd_two_lines_renderer_get_size,
which can prepare them itself.
https://bugzilla.gnome.org/show_bug.cgi?id=792665
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The text rendered by the TwoLinesRenderer is vertically aligned to
touch its border with the TogglePixbufRenderer. This was only working
this way because TwoLinesRenderer was ignoring its y-offset and always
treating it as zero.
Ignoring the y-offset causes problems when the TwoLinesRenderer needs
to obey some other alignment, and will, therefore, be fixed in the
subsequent commits. To prevent those fixes from breaking the
MainIconView it is necessary to specify the desired vertical alignment.
https://bugzilla.gnome.org/show_bug.cgi?id=792665
|
|
|
|
|
|
|
|
|
|
| |
Order gtk-hacks below widgets requiring it in the macro.
Apparently the order of conditional dependencies matter for m4 macros.
For example, main-view is depending on gtk-hacks, but gtk-hacks is
defined before main-view and did not get picked up. This resulted in
linking errors when gtk-hacks itself was omitted from the superprojects
init.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=780692
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=786197
|
| |
|
| |
|
|
|
|
|
|
| |
Libgd itself neither has a config.h, nor does it need one. Including
config.h risks conflicting with pre-processor macros that might be
defined by both libgd and the code that's using it. Eg., G_LOG_DOMAIN.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=785159
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This code was previously trying to alter the color of the second
line by manipulating the foreground color. Now that gtk+ 3.22
is our stable branch, we can rely on more recent stable features
such as Pango's alpha attribute.
The problem with the code previously is that it would not
respect the GTK_CELL_RENDERER_SELECTED state. It would draw the
altered non-selected state with a dim-level on top of a
selected row.
By simply avoiding the foreground color altogether (and
inheriting it from the PangoLayout state when rendering), we
get the appropriate color and also blend into the selected row
state properly.
|
|
|
|
| |
See 0179badc1d5986dd3868351e4a59b95e1cac9854
|
|
|
|
|
| |
Useful for testing of libgd. Also means it is no longer an error to
build libgd as a standalone project.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=782468
|
|
|
|
|
|
|
|
|
|
| |
It relies on the deprecated gtk_paint_spinner, and it cannot be
replaced with gtk_renderer_activity. Let's disable the deprecation
instead.
For what it is worth, this is also what GtkCellRendererSpinner does.
https://bugzilla.gnome.org/show_bug.cgi?id=782023
|
|
|
|
|
|
| |
One can use gtk_entry_grab_focus_without_selecting these days.
https://bugzilla.gnome.org/show_bug.cgi?id=781672
|
|
|
|
|
|
|
|
|
|
| |
The dark and light variants of the CSS for GdTaggedEntryTag were still
scattered across applications and libgd as the photos-entry-tag and
documents-entry-tag style classes. It has been decided to consolidate
all that in Adwaita, like we do for the other libgd style classes, as
the "entry-tag" style class.
https://bugzilla.gnome.org/show_bug.cgi?id=781671
|