summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'fix_hyphen_regression' into 'master'HEADmasterMarc-André Lureau2023-01-171-0/+11
|\ | | | | | | | | | | | | Fix regression in Pango >= 1.44 Hypens shown at end of first line Closes evince#1242 and totem#349 See merge request GNOME/libgd!3
| * Pango 1.44 got the ability to automatically hyphenate on line breaks,Nelson Benítez León2023-01-081-0/+11
|/ | | | | | | | | | | | | | | | | | which is enabled by default, but can be set off by a new attribute. As a result, GdTwoLinesRenderer is now showing a hyphen in some cases at end of first line, which is bad for filenames (like Totem or Evince recent files view) because a filename may already include hyphens so showing an extra hyphen which is not part of the filename is confusing. This is a regression that Pango devs are not going to fix but instead provided a new attribute to set this off. So to fix this regression, let's restore previous behaviour when using Pango >= 1.44 Fixes evince#1242 Fixes totem#349
* Comment invalid <category> in DOAP file to pass git pre-receive hookAndre Klapper2018-12-161-0/+2
|
* Replace Bugzilla by Gitlab URL in DOAP fileAndre Klapper2018-12-151-1/+1
|
* Merge branch 'wip/igaldino/fix-private-warning' into 'master'Cosimo Cecchi2018-10-214-20/+10
|\ | | | | | | | | | | | | Resolve "Remove warning about g_type_class_add_private being deprecated" Closes #2 See merge request GNOME/libgd!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
* main-box, main-icon-box: Emit selection-changed with updated selectionDebarshi Ray2017-03-062-25/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes, GdMainBox::selection-changed is emitted before the list of selected child widgets has been updated. This can happen when a selected GdMainBoxItem was removed from the GListModel. GdMainBox was monitoring removals from the GListModel in order to emit selection-changed. However, since it had connected to GListModel::items-changed before GdMainIconBox, it was emitting the signal before the list of selected children got updated. This can be problematic for an application. An application should be able to use gd_main_box_get_selection from its GdMainBox::selection-changed handler and have the updated list of selected child widgets. One option is to have GdMainBox connect to the GListModel after GdMainIconBox. However, it would be better to move this logic to GdMainIconBox which deals with all the other cases where selection-changed needs to be emitted. It is easier to ensure that the implementation of a single class stays consistent, as opposed to trying to keep two different classes in sync. GtkFlowBox, the parent of GdMainIconBox, uses the GtkContainer::removed virtual method to handle this case. Therefore, it is a natural choice for us to hook in and emit the signal. https://bugzilla.gnome.org/show_bug.cgi?id=779589
* main-icon-box: Remove unused variablesDebarshi Ray2017-03-041-12/+0
| | | | | | Fallout from ee1dcc7a555a9cfc7790c517414aa51e84e6abbe https://bugzilla.gnome.org/show_bug.cgi?id=774914
* main-icon-box-child: Make the icon expand horizontallyDebarshi Ray2017-03-021-7/+5
| | | | | | | | Use GdMainIconBoxIcon, instead of GtkImage, to ensure that the icons expand horizontally as the GtkFlowBox gets resized. For this to work, the GtkGrid can no longer be horizontally centred. https://bugzilla.gnome.org/show_bug.cgi?id=779032