summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gd-main-box-child.c: Fix builds against newer GLib releasesgd.msvcChun-wei Fan2021-08-111-1/+1
| | | | | | 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.
* Meson: Force-include msvc_recommended_pragmas.h as neededChun-wei Fan2021-08-111-2/+5
| | | | | | 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.
* libgd headers: Include gd-macros.hChun-wei Fan2021-08-1120-7/+150
| | | | | | | | | | ...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.
* libgd: Add header to define GD_APIChun-wei Fan2021-08-113-2/+35
| | | | | | | | 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.
* meson: Add option to export symbols on MSVC-style buildsChun-wei Fan2021-08-112-1/+9
| | | | | | | | | | | | | 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).
* gd-margin-container.c: Fix build on Visual StudioChun-wei Fan2021-08-111-7/+5
| | | | | | | | | 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.
* Comment invalid <category> in DOAP file to pass git pre-receive hookAndre Klapper2021-08-111-0/+2
|
* Replace Bugzilla by Gitlab URL in DOAP fileAndre Klapper2021-08-111-1/+1
|
* compile: Fix obsolete warningsIsaque Galdino2018-10-194-20/+10
| | | | | | | | 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.
* toggle-pixbuf-renderer: Don't export the private typedefwip/rishi/modernize-gobjectDebarshi Ray2018-10-062-2/+2
| | | | | | | | | 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
* toggle-pixbuf-renderer: Use G_DECLARE_DERIVABLE_TYPEDebarshi Ray2018-10-061-29/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=774709
* toggle-pixbuf-renderer: Drop the priv pointerDebarshi Ray2018-10-062-13/+21
| | | | | | | | | | 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
* toggle-pixbuf-renderer: Use G_DEFINE_WITH_PRIVATEDebarshi Ray2018-10-061-5/+3
| | | | | | | | | | 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
* main-icon-view: Ignore deprecation warningsDebarshi Ray2018-10-061-0/+4
| | | | | | | | | 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
* Fix srcdir != builddir build, don't dist vapi and gir.Giovanni Campagna2018-10-061-7/+5
| | | | | | | | | | 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
* toggle-pixbuf-renderer: Remove redundant codeDebarshi Ray2018-10-061-1/+0
| | | | | | | | 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
* build: Fix missing implicit dependencies in the Meson buildDebarshi Ray2018-08-301-1/+3
| | | | | | 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.
* Remove trailing semi-colons from G_DEFINE_TYPE* callsDebarshi Ray2018-08-233-3/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=774709
* two-lines-renderer: Don't export the private typedefDebarshi Ray2018-08-232-2/+2
| | | | | | | | | 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
* two-lines-renderer: Use G_DECLARE_DERIVABLE_TYPEDebarshi Ray2018-08-231-29/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=774709
* two-lines-renderer: Drop the priv pointerDebarshi Ray2018-08-222-16/+30
| | | | | | | | | | 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
* two-lines-renderer: Use G_DEFINE_WITH_PRIVATEDebarshi Ray2018-08-221-5/+3
| | | | | | | | | | 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
* styled-text-renderer: Don't export the private typedefDebarshi Ray2018-08-172-2/+2
| | | | | | | | | 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
* styled-text-renderer: Use G_DECLARE_DERIVABLE_TYPEDebarshi Ray2018-08-171-29/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=774709
* styled-text-renderer: Drop the priv pointerDebarshi Ray2018-08-172-12/+21
| | | | | | | | | | 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
* styled-test-renderer: Use G_DEFINE_WITH_PRIVATEDebarshi Ray2018-08-171-6/+3
| | | | | | | | | | 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
* main-icon-view: Don't export the typedef for the private structureDebarshi Ray2018-08-172-2/+2
| | | | | | | | | 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
* main-icon-view: Use G_DECLARE_DERIVABLE_TYPEDebarshi Ray2018-08-171-29/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=774709
* main-icon-box, main-icon-box-icon: Silence warnings with GLib 2.57.2Debarshi Ray2018-08-172-12/+12
| | | | | | | | | | | | | | | 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
* meson: Fix missing implicit dependency on gtk-hacksfosero2018-02-231-1/+3
| | | | | Both main-icon-box and main-view need gtk-hacks during build time. Make these widgets depend on gtk-hacks by default.
* main-icon-box-child: Show a spinner to reflect GdMainBoxItem::pulseDebarshi Ray2018-02-121-0/+30
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=793295
* main-icon-box-child: Shuffle some code aroundDebarshi Ray2018-02-121-82/+82
| | | | | | This will make the subsequent commit easier to read. https://bugzilla.gnome.org/show_bug.cgi?id=793295
* two-lines-renderer: Don't ignore the y-offset when renderingIsaque Galdino2018-02-011-1/+2
| | | | | | | | | | | | 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
* two-lines-renderer: Don't ignore the aligned area's y-offsetDebarshi Ray2018-02-011-1/+1
| | | | | | This also matches what GtkCellRendererText does. https://bugzilla.gnome.org/show_bug.cgi?id=792665
* two-lines-renderer: Simplify codeDebarshi Ray2018-02-011-7/+1
| | | | | | | 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
* main-icon-view: Explicitly specify the vertical alignment of the textDebarshi Ray2018-02-011-0/+1
| | | | | | | | | | | | | | 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
* libgd.m4: Fix order for gtk-hacksMarinus Schraal2017-12-151-6/+6
| | | | | | | | | | 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.
* main-icon-box-child: Show the labels only if there's some textDebarshi Ray2017-08-131-0/+35
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=780692
* main-icon-box-child: Don't set use-markup on the GtkLabelsDebarshi Ray2017-08-121-2/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=786197
* main-icon-box: Silence -WparenthesesDebarshi Ray2017-08-011-1/+1
|
* main-box, main-icon-box-icon, main-icon-box: Silence -Wunused-variableDebarshi Ray2017-08-013-4/+0
|
* Don't include config.hDebarshi Ray2017-07-212-8/+0
| | | | | | 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.
* icon-utils: Use GTK macro instead of hardcoded intastian2017-07-201-1/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=785159
* gd-two-lines-renderer: use Pango alpha attributeChristian Hergert2017-07-011-12/+5
| | | | | | | | | | | | | | | | | 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.
* meson: Add GdMainIconBoxIcon to main-boxNirbheek Chauhan2017-05-181-0/+2
| | | | See 0179badc1d5986dd3868351e4a59b95e1cac9854
* meson: Build test-tagged-entry manual testsNirbheek Chauhan2017-05-181-1/+7
| | | | | Useful for testing of libgd. Also means it is no longer an error to build libgd as a standalone project.
* Add GdTaggedEntry test case to mimic gnome-documents' widget hierarchyDebarshi Ray2017-05-123-1/+145
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=782468
* toggle-pixbuf-renderer: Ignore deprecation warningsDebarshi Ray2017-05-101-0/+2
| | | | | | | | | | 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
* Remove gd_entry_focus_hackDebarshi Ray2017-04-255-124/+0
| | | | | | One can use gtk_entry_grab_focus_without_selecting these days. https://bugzilla.gnome.org/show_bug.cgi?id=781672
* tagged-entry: Use the entry-tag CSS style class from AdwaitaDebarshi Ray2017-04-256-86/+2
| | | | | | | | | | 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