Commit Graph

144 Commits

Author SHA1 Message Date
c9f518a65c display: Fix statusbar tool icon offset
The Y offset of the statusbar tool icon is too large, which pushes it
off-screen. This scales the offset by the size of the icon to
prevent this problem.
2023-02-09 14:19:23 +00:00
Ell
f19ebb6269 app: revert combo-box drop-down changes
Revert the use of gtk_combo_box_set_wrap_width() to change the
combo-box drop-down style, except for the status-bar unit combo.
See https://gitlab.gnome.org/GNOME/gimp/issues/2828#note_421312 for
the rationale.

This reverts commits 1d984542e9,
68a33ab5bd, and
6dfca83c2a.

(cherry picked from commit 846d242f30)
2019-03-27 20:14:45 -04:00
10aa988afa Issue #2828: Scrolling up with a mouse within a drop-down list.
We were doing it all the wrong way, fixing one combo box object at a
time. So this commit basically reverses commits 68a33ab5bd, 6dfca83c2a
and a9a979b2d0 and instead runs the same code in the class code. This
way, all objects based on these base classes will have the fix from
scratch.
These improved various other drop-down lists (I found some of them, and
probably not all) as I fixed all GIMP custom widgets based on
GtkComboBox.

Note that it has to be run after filling the list apparently (I had the
problem especially with GimpIntComboBox if running in the _init() code,
then the list widget showed wrong).

(cherry picked from commit 1d984542e9)
2019-01-20 13:48:33 +01:00
487c01f8d1 app: fix type warning.
I missed this warning when reviewing commit a9a979b2d0.
My bad!

(cherry picked from commit 182786b4fb)
2018-12-19 16:24:50 +01:00
e17daf66e2 app: add gtk_combo_box_set_wrap_width for scale menu
(cherry picked from commit a9a979b2d0)
2018-12-19 13:46:34 +01:00
a88c0ffb93 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:47:19 +02:00
a33b9e96d7 Issue #1560 - invisible canvas flip/rotation buttons...
...at the bottom of image window

Need to show/hide the event box, not just the labels/icons inside.

(cherry picked from commit 1806b66c5a)
2018-06-04 15:16:41 +02:00
Ell
bea27171ad app: throttle statusbar progress updates
Statusbar progress updates that update the progress bar are
relatively expensive, slowing down operations that report progress
frequently.  Only update the progress bar if a certain amount of
time has passed since the last update, to counter that.
2018-04-07 12:05:59 -04:00
3f7afd5494 Bug 792439 - Status bar: Rotated angle is too close to zoom arrow. 2018-01-12 01:50:51 +01:00
80b04d06da Bug 789173 - Make canvas rotation information visible on the main window
Now add also flip information in the status bar so that one knows that
the canvas is flipped horizontally and/or vertically. Especially if you
often flip and rotate the canvas (or if you did it by mistake), at some
point, it may become confusing to remember whether this is the case. Now
it will be possible to check in a single glimpse at the status bar.
Similarly to what I previously did for the rotation information, hitting
the flip icons in status will allow to unflip easily without having to
go in menus or remember all shortcuts.
These information will be visible only when the canvas is flipped or
rotated.
2017-11-15 20:04:19 +01:00
953a095563 Bug 789173 - Make canvas rotation information visible on the main window
The rotation angle is made visible in the status bar.
Clicking the angle label also opens the "Select Rotation Angle" dialog.
2017-11-15 20:02:54 +01:00
Ell
b2bc33bdf1 app: blink the statusbar on warnings and errors
Statusbar messages are too easy to miss.  Blink the statusbar when
showing a warning or an error, to attract attention.
2017-10-28 10:08:10 -04:00
0cb3e75f79 app: use a lot of g_clear_object() and g_clear_pointer()
More than 2000 lines of code less in app/, instead of

if (instance->member)
  {
    g_object_unref/g_free/g_whatever (instance->member);
    instance->member = NULL;
  }

we now simply use

g_clear_object/pointer (&instance->member);
2017-07-15 18:42:44 +02:00
2762662ca9 app: use gimp_unit_get_accurate_digits() in a few places. 2017-01-23 20:59:28 +01:00
f836892314 Bug 763734 - better decimal places for physical units.
Compute the ideal decimal precision for cursor position and length
status so that you get the best precision on physical units depending
on the current resolution, yet avoiding over-precision (which can be
misleading). The unit's "digits" value is now used as a minimum
precision only.
2017-01-20 00:40:27 +01:00
88ff45eb05 app: keep the statusbar progress from drawing over the right docks
In a blocking operation we don't give the main loop time to lay out
the statusbar correctly after showing the progress bar. Force a size
on the progress bar using gtk_widget_size_allocate(). This sucks.
2016-09-28 00:44:14 +02:00
4df9a1d568 Get rid of gtk_misc_set_alignment(label) and use gtk_label_set_x,yalign() 2016-09-08 19:11:20 +02:00
6c674e973c app, libgimp*, plug-ins, icons: revert icon names into freedesktop...
... standard icon names and GTK+ icon names as second choice.
We should only use GIMP specific icon names as last resort, when there
is no standard or GTK+ names dedicated to the function.
This is made possible thanks to commit 3cc77b0.

s/gimp-document-recent/document-open-recent/
s/gimp-indent/format-indent-more/
s/gimp-next/go-next/
s/gimp-previous/go-previous/
s/gimp-save/document-save/
s/gimp-save-as/document-save-as/
s/gimp-revert/document-revert/
s/gimp-open/document-open/
s/gimp-document-recent/document-open-recent/
s/gimp-quit/window-close/ ou s/gimp-quit/application-exit/
s/gimp-warning/dialog-warning/
s/gimp-edit-clear/edit-clear/

s/gimp-justify-.*/gtk-justify-.*/
s/gimp-font/gtk-select-font/
s/gimp-color-palette/gtk-select-color/
s/gimp-cancel/gtk-cancel/
2016-09-03 15:49:29 +02:00
8b1ea3cc13 icons: Bug 759904
add
gimp-cancel
gimp-save

patch
gimpstatusbar.c
fil-pdf-save.c
gimpicons.c
gimpicons.h
2016-06-10 13:50:45 +02:00
Ell
48c2038951 Bug 765326 - Status bar progress messages aren't always updated
Keep GimpStatusbar progress messages at the front of the list.

Previously, gimp_statusbar_push() and friends would push progress
messages behind temporary messages, and would push normal messages,
added after a progress had started, in front of progress messages.
This resulted in the progress bar text not being updated if a
temporary message was active at the time the progress started, or
if a normal message was pushed after the progress started.

This commit fixes this by always keeping progress messages at the
front of the message list.
2016-05-08 22:33:08 +00:00
Ell
ce8cbe6540 app: update GimpStatusbar message icon even when the text is unchanged
Probably just academic.
2016-05-08 22:32:28 +00:00
Ell
bb4d04dce5 app: refactor GimpStatusbar message pushing/popping code
... to reduce duplication, and make less assumptions about the
position of messages on the list.

In preperation for some bug fixes.
2016-05-08 22:32:28 +00:00
a6601d563b app: some GimpProgress cleanup
- change start() and set_text() to use "format" and "..." instead of
  "message", allowing to format progress messages in place
- s/cancelable/cancellable/
- move "cancellable" to be the second argument of start()
2014-07-12 23:45:20 +02:00
bb8d65bcee Bug 730862 - Preview frozen while dragging selection tools...
...(crop, rectangle, etc) in large image zoomed-to-fit

Introduce a hash of the last 16 used icons in GimpStatusbar, it was
loading icons at a very high frequency. Found by Massimo.
2014-05-30 19:40:11 +02:00
65a65947d9 app, libgimp: replace GTK_STOCK_FOO by icon names
unless it's a stock ID used for an action button, will address that
later.
2014-05-11 22:49:22 +02:00
7d0b326359 app: add gimp_widget_load_icon() as replacement for gtk_widget_render_icon()
...and use it instead.
2014-05-08 09:11:31 +02:00
0d2d1c3752 app: port most of app's GUI from stock IDs to icon names
There is still quite some stock ID rendering around, stay tuned...
2014-05-07 15:30:38 +02:00
2eb74becb8 app: add G_GNUC_PRINTF() to places where the args are a va_list
The trick is to use G_GNUC_PRINTF (n, 0).
2013-11-29 00:33:05 +01:00
64438c1b4e Bug 694028 - statusbar cancel button for plug-ins is hard to discover
Add the word "Cancel" next to the cancel icon, the button is only
visible during a plug-in progress anyway, so no space is wasted.
2013-03-18 01:26:44 +01:00
fc19348621 app: consider the label in GimpStatusbar's size negotiation
doesn't change anything, except perhaps for weird themes.
2013-03-10 19:54:42 +01:00
fcfb7cf160 Use the new g_[s]list_free_full() instead of foreach() and free() 2011-03-07 17:11:28 +01:00
6bf13efbc8 app: use gimp_widget_flush_expose() for the statusbar's progress 2010-11-10 00:16:34 +01:00
59a4e70b86 app: don't reserve a height for the statusbar label's icon
Reserve only a width. The height gets ignored by GTK+ 2.x and breaks
layout positioning in GTK+ 3.x which uses pango-cairo for all text
rendering.
2010-10-29 10:31:04 +02:00
74458f46ee app/libgimpwidgets: move GimpUnitStore and GimpUnitComboBox to libgimpwidgets 2010-10-14 22:15:25 +02:00
0e17e44ba4 app: move code from GtkObject::destroy() to GObject::dispose() 2010-09-26 22:35:49 +02:00
ac80163771 app: draw the statusbar's icon with cairo 2010-07-30 13:14:10 +02:00
372eabdd48 app: avoid using sealed GtkStatusbar members
Instead keep a pointer to the statusbar's label around in our own
object struct. Also remove conditional compilation based in GTK+
version.
2010-04-20 09:56:59 +02:00
0908e53148 app: use the new unit conversion functions
and get rid of the brainfuck idea that app/ has to use _gimp_unit_foo()
functions, passing a gimp pointer. Instead, simply use the libgimpbase
API all over the place. Should we ever allow more than one gimp instance,
they will simply have to share one unit database.
2010-02-21 16:46:39 +01:00
56ec0c8774 display: reserve more space for the cursor label so negative coords fit 2010-02-11 19:55:20 +01:00
3cd4f0de45 display: don't use statusbar->hbox for size calculations, use the hbox instead 2010-02-11 19:51:15 +01:00
f2f83109ec display: redo the code that does evil things to the statusbar's widgets
Actually use the hbox that is provided via gtk_statusbar_get_message_area()
since GTK+ 2.19.1 instead of always replacing it by our own.
2010-02-11 19:24:08 +01:00
ae3c3291b0 app: Check for API availability in gimp_statusbar_init() 2009-11-30 23:14:54 +01:00
a81dc5ead3 app: Use more proper API in gimp_statusbar_init()
Use more proper API in gimp_statusbar_init() when we rearrange widgets
to get rid of warnings. Requires an up to date GTK+, max 2 weeks old
or so, for gtk_statusbar_get_message_area().

This makes app/tests run again since there are no warnings about wrong
widget parent.
2009-11-30 22:55:31 +01:00
a4694d8a0a Optimize gimp_statusbar_replace_valist()
Don't replace anything if the status message didn't change. Gets rid
of quite some statusbar invalidations in many tools.
2009-11-03 15:49:18 +01:00
6608d66cde Build with GSEAL_ENABLE and #undef it where accessors are missing 2009-10-17 19:51:33 +02:00
eb6bef33e4 Use gtk_widget_set_visible()
In places where the pattern

  if (show)
    gtk_widget_show (widget);
  else
    gtk_widget_hide (widget);

is used, change to

  gtk_widget_set_visible (widget, show);

Also do some other minor cleanups.
2009-10-17 15:07:34 +02:00
c5b856f16f Use gimp_display_get_image() instead of display->image 2009-10-06 19:20:44 +02:00
dee0afed79 Move the statusbar back to GimpDisplayShell
Keeping it in GimpImageWindow was a bad idea because
- it wasted space
- it produced evil code because
- it conceptually didn't belong there
2009-10-04 15:33:03 +02:00
35588efaa1 Remove "gimp-" prefix from the shell's "icon" and "title" properties
The prefix was needed because GtkWindow also has "icon" and "title"
properties.
2009-09-29 22:20:12 +02:00
54edc20113 Add missing #include "gimpimagewindow.h" 2009-09-28 22:55:54 +02:00