1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

Compare commits

...

451 Commits

Author SHA1 Message Date
Jehan
37da2a5eab app: remove the "Mode" scrolldown from "Input Devices" dialog.
This is just clearly useless as GDK docs states, and since all tablets
just work out of the box, even when set as "disabled".
I am actually pondering if the "mode" property from GimpDeviceInfo
should not just be removed altogether, but I'll want to check a little
more existing code first.
2018-05-16 02:37:08 +02:00
Jehan
a7925510aa app: always show pointer devices unless disabled floating.
The docs of gdk_device_set_mode() clearly states:

>  * Note: This is only meaningful for floating devices, master devices (and
>  * slaves connected to these) drive the pointer cursor, which is not limited
>  * by the input mode.

I can anyway see that tablets work now out of the box with pressure,
tilt, etc. We don't need to enable them anymore. And obviously even if
we did, GDK docs clearly tells us the settings would not change a thing.

I am aware this change actually breaks some use cases. For instance on a
laptop with trackpoint, physical buttons and a touchpad, it is customary
to use the physical buttons both for the trackpoint and the touchpad.
But since now all input devices are seemingly enabled, clicking with
physical buttons while moving with touchpad fails to paint (because it
considers these as 2 separate devices). We'll have to take care of such
cases. This is work-in-progress.
2018-05-16 02:37:08 +02:00
Jehan
ce8ea93149 app: extended device concept does not seem to exist in GTK+3.
We were keeping around a flag telling us if coordinates are extended or
not. In GTK+2, a device indeed had to be enabled. In GTK+3, I can see
that device with extended inputs are enabled by default (they always
have pressure, etc.). This flag is made useless.
2018-05-16 02:37:08 +02:00
Michael Natterer
814972db43 app: undeprecate GimpDeviceStatus. don't use gtk_widget_set_state()
Use the same code as GimpPrefsBox to make the active device look like
a selected list item.
2018-05-16 02:37:08 +02:00
Jehan
a9b44e6812 app: GTK+3 has more GdkAxisUse values.
This fixes a crash when we were looping until GDK_AXIS_LAST, but our
existing code was expecting less values.

Also I note that GTK+3 has an additional GDK_AXIS_ROTATION since version
3.22, even though we were told that some pens with rotation support
would report rotation values with same valuator as for the wheel (at
least, the Wacom Art Pen would apparently use the same 6th valuator).
For proper support, it would be really worth testing such pens.
2018-05-16 02:37:08 +02:00
Michael Natterer
e1a15c8f60 app: remove the option to enable tearoff menus 2018-05-16 02:37:08 +02:00
Michael Natterer
6556fd4e8a themes: some GimpDhsplayShell and children CSS hackery 2018-05-16 02:37:08 +02:00
Michael Natterer
f37233c56e app: derive GimpStatusbar from GtkFrame not GtkStatusbar
we were not using a single GtkStatusBar features, it was only in the
way. Remove broken size allocation logic and simply set a minimum
height of 3em in CSS. Also ellipsize the label, long labels had funny
effects since changing the overall GimpDisplayShell packing to pure
GtkGrid.
2018-05-16 02:37:08 +02:00
Michael Natterer
2b1eb29f47 app: kill the mess of boxes in GimpDisplayShell, use a grid for everything 2018-05-16 02:37:08 +02:00
Michael Natterer
45bd948079 app: use a cairo recording surface to measure GimpCanvasPath's extents
This gets rid of using the deprecated gdk_cairo_create().
2018-05-16 02:37:08 +02:00
Michael Natterer
e86911aba5 app: undeprecate gimp_highlight_widget_draw()
by stealing the few lines of code from gtk-inspector. Looks better, too :)
2018-05-16 02:37:08 +02:00
Jehan
7dcb532bbd app: plug-ins must now be installed as subdirectories.
This will in particular fix the whole DLL hell problem since various
plug-ins are now asked to install all their mess (and in particular
their embedded DLLs on Windows) inside their subfolder, hence not
disturbing the correct functionning of other plug-ins installed side by
side.
2018-05-16 02:37:08 +02:00
Jehan
97ae6a4742 plug-ins: make plug-ins inside common/ to also install in subfolders. 2018-05-16 02:37:08 +02:00
Jehan
257f8350e1 plug-ins: install plug-ins in subfolder.
I am going to forbid plug-ins from being installed directly in the root
of the plug-ins/ directory. They will have to be installed in a
subdirectory named the same as the entry point binary.
This may seem useless for our core plug-ins which are nearly all
self-contained in single binaries, but this is actually a necessary
restriction to eliminate totally the DLL hell issue on Windows. Moving
core plug-ins in subfolders is only a necessary consequence for it.
2018-05-16 02:37:08 +02:00
Michael Natterer
d6d884b7ff Undeprecate/improve GimpScaleComboBox and GimpUnitComboBox
Remove label-scale style properties and gtk_widget_modify_font()
hacks and theme them using CSS.
2018-05-16 02:37:08 +02:00
Michael Natterer
691a5f3be5 app: undeprecate stroke-dialog.c 2018-05-16 02:37:08 +02:00
Michael Natterer
7247072cd8 app: undeprecate GimpUIConfigurer, don't use gtk_window_parse_geometry() 2018-05-16 02:37:08 +02:00
Michael Natterer
392f838bf5 libgimp: remove some more cruft that is not used any longer 2018-05-16 02:37:08 +02:00
Simon Budig
e89e38e5c8 libgimpwidgets: rename the _grid()-Variants of gimp_scale_entry_*
Adjust all plugins to follow accordingly.

This concludes the GtkTable'ocide.
2018-05-16 02:37:08 +02:00
Simon Budig
ad6705460d libgimpwidgets: kill the last remaining occurencces of GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
b8f614fbc6 devel-docs: blindly port the tool to GtkGrid... 2018-05-16 02:37:08 +02:00
Simon Budig
8c1441058b some odds and ends regarding GtkTable removal... 2018-05-16 02:37:08 +02:00
Simon Budig
2f143662cf color-selector-cmyk: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
4f663d2c22 jigsaw: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
6bde13dd50 oilify: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
647532dcab unit-editor: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
ee0542cbbf van-gogh-lic: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
4e2d5c66d4 sparkle: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
eba8d7daa5 file-gih: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
72baf50e8a file-raw-data: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
157acd1188 file-xmc: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
a0287f68e5 file-pdf-load: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
39435c3da4 file-xbm: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
712d7853ed file-html-table: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
8652fd371c depth-merge: kill GtkTable 2018-05-16 02:37:08 +02:00
Michael Natterer
c1330e3f8f app: add the help button the proper way in GimpFileDialog
Removes deprecated API usage and brings back the button.
2018-05-16 02:37:08 +02:00
Michael Natterer
e0a896ea4f app: don't use gtk_widget_modify_text() in GimpContainerEntry
Instead, show an EEK wilber icon if an object with the entered name
doesn't exist.
2018-05-16 02:37:08 +02:00
Michael Natterer
208c3b3b6a app: undeprecate GimpDashEditor 2018-05-16 02:37:08 +02:00
Michael Natterer
ae23df5357 app: undeprecate GimpDessionInfo and fix remembering size and position
Don't mix GtkWindow/GdkWindow/GdkEventConfigure values, always use
GtkWindow API. This seems to fix everything, probably because it
properly takes client-side window decorations into account.
2018-05-16 02:37:08 +02:00
Michael Natterer
7a1f50f390 Enable and fix smooth scrolling and zooming
- Fix gimp_scroll_adjustment_values() for smooth scroll events
- Set GDK_SMOOTH_SCROLL_MASK on all widgets where we set GDK_SCROLL_MASK
- Add GIMP_ZOOM_SMOOTH to enum GimpZoomType
- Add "gdouble delta" to gimp_zoom_model_step()
- Change the meaning of the "scale" parameter to "scale or delta" in
  all functions that take GimpZoomType and a scale factor.
2018-05-16 02:37:08 +02:00
Michael Natterer
21ef2d91b9 app: use gimp_scroll_adjustment_values() in GimpNavigationEditor
and change signature of GimpNavigationView::scroll() to have
a GdkEventScroll instead of a GdkScrollDirection.
2018-05-16 02:37:08 +02:00
Michael Natterer
88649af74a app: set GDK_SCROLL_MASK on widgets that need scroll events 2018-05-16 02:37:08 +02:00
Michael Natterer
6eaaf770f3 app: use gimp_scroll_adjustment_values() for scrolling the canvas 2018-05-16 02:37:08 +02:00
Michael Natterer
e159c70c98 libgimpwidgets: add gimp_scroll_adjustment_values()
and use it in GimpScrolledPreview. It supports smooth scrolling and
does roughly the same as a whole lot of magic code in GtkScrolledWindow
and GtkRange, resulting in the same scrolling behavior as in stock
GTK+ widgets.
2018-05-16 02:37:08 +02:00
Michael Natterer
f698803e05 libgimpwidgets: set GDK_EVENT_SCROLL on GimpPreview's preview area 2018-05-16 02:37:08 +02:00
Michael Natterer
afb6d61c4c libgimpwidgets: remove gimp_spin_button_new() 2018-05-16 02:37:08 +02:00
Michael Natterer
d541eb4add plug-ins: copy gimp_spin_button_new() into the last two plug-ins using it 2018-05-16 02:37:08 +02:00
Michael Natterer
248a654455 plug-ins: if GIMP_UNSTABLE, install test script-fu and pygimp scripts 2018-05-16 02:37:08 +02:00
Michael Natterer
89dbf5c31c plug-ins: undeprecate script-fu-interface.c 2018-05-16 02:37:08 +02:00
Simon Budig
8f262a25b2 align-layers: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
ebfc55f543 mail: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
f497abc790 grid: make the weird Table-hack less weird by reusing the existing GtkGrid 2018-05-16 02:37:08 +02:00
Simon Budig
41b4e1f39e warp, file-svg: remove commented out code, not sure what this is supposed to do. 2018-05-16 02:37:08 +02:00
Michael Natterer
dce2d8e022 app: undeprecate about-dialog.c, and clean out a lot of cruft 2018-05-16 02:37:08 +02:00
Michael Natterer
de675cad67 app: get rid of gdk_keymap_get_default(), use get_for_display() instead 2018-05-16 02:37:08 +02:00
Michael Natterer
ce477ca0f5 themes: remove deprecated style properties from System/gimp.css 2018-05-16 02:37:08 +02:00
Michael Natterer
180c0f34e1 libgimpwidgets: also move GTK_RESPONSE_CLOSE buttons to the left
in GimpDialog's header bar.
2018-05-16 02:37:08 +02:00
Michael Natterer
330ba11a9c app: fix button order in GimpColorDialog 2018-05-16 02:37:08 +02:00
Michael Natterer
48ff03a764 app: use the passed parent's toplevel in gimp_color_dialog_new() 2018-05-16 02:37:08 +02:00
Michael Natterer
405f1a42a9 app: use GTK_ICON_SIZE_MENU for GimpColorEditor's page switching icons 2018-05-16 02:37:08 +02:00
Michael Natterer
bc3358cf78 Use the new macros from the last commit in all files
...and gone are the annoying warnings.
2018-05-16 02:37:08 +02:00
Michael Natterer
1ef81d49f6 libgimpwidgets: add macros to hide alternative_button_order warnings
Since we don't know yet what to do about this, let's not spam the
build with distracting warnings in the meantime.

gimp_dialog_set_alternative_button_order
gimp_dialog_set_alternative_button_order_from_array

are macros which just call the deprecated GtkDialog functions, but
wrap them in G_GNUC_BEGIN,END_IGNORE_DEPRECATIONS.
2018-05-16 02:37:08 +02:00
Michael Natterer
aee1457198 Use gtk_show_uri_on_window(), gtk_show_uri() is deprecated 2018-05-16 02:37:08 +02:00
Michael Natterer
dcdfa67846 app: set all GtkPaned widgets to have wide handles
the narrow handles' event areas did overlap with our own widgets close
to the handle.
2018-05-16 02:37:08 +02:00
Michael Natterer
10defa19ee app: follow preferences changes/improvements in GimpDeviceEditor 2018-05-16 02:37:08 +02:00
Michael Natterer
2c302cf167 app: behold unseen fancy shit in preferences 2018-05-16 02:37:08 +02:00
Simon Budig
93a5818b2e sample-colorize: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
9eb401bf3c tile-small: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
edd23a90f1 file-ps: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
ce61d9e5ee file-wmf: kill GtkTable 2018-05-16 02:37:08 +02:00
Michael Natterer
d7528f54b7 app: undeprecate GimpLevelsTool
by using some semi-smart luminance magic to get a distinct color for
the alpha curve.
2018-05-16 02:37:08 +02:00
Michael Natterer
c759b3f9f4 themes: clean up gimp.css, with some added commented experiments 2018-05-16 02:37:08 +02:00
Simon Budig
c896a9c359 file-svg: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
7c0191bc5d pygimp: some speculative Table->Grid changes 2018-05-16 02:37:08 +02:00
Simon Budig
22a4369705 print: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
6f2045b2bc gfig: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
ba3879cde7 flame: kill GtkTable 2018-05-16 02:37:08 +02:00
Michael Natterer
66f5f73c2f libgimpwidgets: port GimpPreview to GtkGrid 2018-05-16 02:37:08 +02:00
Simon Budig
b77dccbcd0 screenshot: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
539a206d8d file-fli: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
debdf71688 file-webp: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
c73c312219 pagecurl: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
aca4ec67ef newprint: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
b535ff259e film: kill GtkTable 2018-05-16 02:37:08 +02:00
Michael Natterer
e63cfebbd8 Get rid of gdk_flush() globally, use gdk_display_flush() 2018-05-16 02:37:08 +02:00
Michael Natterer
d63640f8f0 app: the goats are invading again, and are almost undeprecated 2018-05-16 02:37:08 +02:00
Michael Natterer
67768b8263 libgimpwidgets: undeprecate gimppickbutton-default.c 2018-05-16 02:37:08 +02:00
Simon Budig
047f46f880 metadata-editor: undeprecateify metadata glade UI 2018-05-16 02:37:08 +02:00
Michael Natterer
0c656bc1ba app: fix themeing of GimpHistogramView and GimpCurveView
by simply getting rid of all earlier added style properties
and instead using the style of the "view" CSS class.
2018-05-16 02:37:08 +02:00
Simon Budig
8589f04f57 file-png: attempt to fix the glade file for file-png 2018-05-16 02:37:08 +02:00
Ell
bbd44bd787 app: fix empty display unstable-version message 2018-05-16 02:37:08 +02:00
Michael Natterer
e4b9246350 libgimp: move all GimpProcBrowserDialog members to private 2018-05-16 02:37:08 +02:00
Simon Budig
5ab13f42ee script-fu: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
92187e6656 common: kill GtkTable in a ton of plugins 2018-05-16 02:37:08 +02:00
Simon Budig
2a1c33c8a0 gimpressionist: re-enable (without real changes) and kill GtkTable 2018-05-16 02:37:08 +02:00
Michael Natterer
75a9f9f6a7 libgimpmodule: move all GimpModuleDB members to private 2018-05-16 02:37:08 +02:00
Michael Natterer
47b723a8b4 libgimpconfig: move all GimpColorConfig members to private 2018-05-16 02:37:08 +02:00
Simon Budig
782f144365 imagemap: monster-port to kill GtkTable 2018-05-16 02:37:08 +02:00
Michael Natterer
9023482679 pdb: remove all compat procedures for the old lcms plug-in 2018-05-16 02:37:08 +02:00
Simon Budig
65b2bbb107 oops - old table use of a GimpSizeEntry 2018-05-16 02:37:08 +02:00
Simon Budig
efbd42b7a3 fractal explorer: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
63ee2dc560 selection-to-path: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
dee0ae9b0d sphere-designer: kill GtkTable 2018-05-16 02:37:08 +02:00
Michael Natterer
b4e6f5bf81 plug-ins: port ifs-compose to GTK+ 3.x enough to make it build again 2018-05-16 02:37:08 +02:00
Simon Budig
c775f28c89 warp: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
9180025c54 file-jpeg: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
d57d1f90f0 cml-explorer: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
b9799fc0d2 filter-pack: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
ebb265e55f ifs-compose: add unverified GtkTable removal.
Needs revisiting after the compile is fixed again.
2018-05-16 02:37:08 +02:00
Simon Budig
95651212fc lighting: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
2477c8cd72 gradient-flare: kill GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
2afc354de4 map-object: kill GtkTable 2018-05-16 02:37:08 +02:00
Ell
8a3091695a app: fix canvas motion compression
In gimp_display_shell_canvas_tool_events(), use
gdk_window_set_event_compression(), instead of implementing our own
motion compression, which used to introduce all sorts of weird
effects when combined with extended input devices, that we had to
hackishly work around.

For tools that use GIMP_MOTION_MODE_EXACT, we call
gdk_window_set_event_compression() to disable motion compression
for the canvas window upon initializing the tool in response to a
GDK_BUTTON_PRESS event, and again to re-eanble compression upon the
corresponding GDK_BUTTON_RELEASE event.

This commit also merges
gimp_display_shell_canvas_tool_events_internal() back into
gimp_display_shell_canvas_tool_events().  The split was a detail
of our custom motion compression implementation.
2018-05-16 02:37:08 +02:00
Michael Natterer
6ad0d8ecaa app: gdk_screen_get_monitor_workarea() -> gdk_monitor_get_workarea() 2018-05-16 02:37:08 +02:00
Michael Natterer
939b1c9921 app: kill all except one GtkAlignment, the tag popup one is a bit tricky 2018-05-16 02:37:08 +02:00
Michael Natterer
f3a8922e7a app: port gimp_display_shell_set_initial_scale() to the monitor's workarea 2018-05-16 02:37:08 +02:00
Michael Natterer
673c8d0c77 plug-ins: disable devel-docs and a bunch of plug-ins, they don't build 2018-05-16 02:37:08 +02:00
Michael Natterer
e79de196ca app: disable motion compression, have to figure how to control GTK+'s 2018-05-16 02:37:08 +02:00
Michael Natterer
d50343660b app: port gimp_navigation_editor_popup() to GdkMonitor's workarea 2018-05-16 02:37:08 +02:00
Michael Natterer
ff3e5b9314 libgimpwidgets: move GimpEnumStore.enum_class to private 2018-05-16 02:37:08 +02:00
Michael Natterer
a2cccd6236 libgimpwidgets: move all GimpPreview members to private
and add tons of API so subclasses can still do their thing, probably
subject to change/fix.
2018-05-16 02:37:08 +02:00
Simon Budig
1b4d9f6c4e app: kill the last GtkTables. 2018-05-16 02:37:08 +02:00
Simon Budig
db3118e097 app/widgets: port the toolbox indicator area to GtkGrid 2018-05-16 02:37:08 +02:00
Simon Budig
8d20567b8f app/widgets: port the gimpstrokeeditor to GtkGrid 2018-05-16 02:37:08 +02:00
Simon Budig
a6d601dbf5 app/widgets: port gimpdashboard to GtkGrid 2018-05-16 02:37:08 +02:00
Ell
b1f5535f8b app: take window scale-factor into account when rendering image
In gimp_display_shell_draw_image(), enable the code that adjusts
the scale-factor used for rendering the image by the window scale
factor, so that we make full use of the screen resolution even on
HiDPI displays.  This also fixes artifacts along render-chunk
borders.
2018-05-16 02:37:08 +02:00
Simon Budig
e9515f4b62 dialogs: fix two misbehaviours in the prefs dialog 2018-05-16 02:37:08 +02:00
Michael Natterer
355f00ec90 libgimpwidgets: move all GimpScrolledPreview members to private 2018-05-16 02:37:08 +02:00
Michael Natterer
c4f518ae48 libgimpwidgets: move all GimpPreviewArea members to private 2018-05-16 02:37:08 +02:00
Michael Natterer
3e0958288d libgimpwidgets: move public GimpIntStore member to private 2018-05-16 02:37:08 +02:00
Michael Natterer
38d1aed803 app: fix GimpPrefsBox' page titles to look like selected rows again 2018-05-16 02:37:08 +02:00
Michael Natterer
581e728517 app: properly align frame children in GimpGridEditor 2018-05-16 02:37:08 +02:00
Michael Natterer
38ec91c1fb libimp*: add private pointers to all instance structs
even if we don't have private members (yet). Also make class padding 8
pointers in all headers. This commit moves nothing to private, it just
makes all headers consistent and adjusts .c files accordigly.
2018-05-16 02:37:08 +02:00
Michael Natterer
b22ff982b2 libgimpwidgets: set the widgets's hexpand in gimp_grid_attach_aligned() 2018-05-16 02:37:08 +02:00
Michael Natterer
2e9873d041 app: pack the content vbox expanding in GimpPrefsBox 2018-05-16 02:37:08 +02:00
Jehan
fe6e25c3a8 app: do not run gtk_window_present() in about_dialog_create().
The window will be raised soon after anyway. No need to do it too early,
which makes setting a transient parent useless afterwards. In particular
we were still getting a "GtkDialog mapped without a transient parent"
message.
2018-05-16 02:37:08 +02:00
Jehan
474051447e app: allow setting parent for dialogs created by GimpDialogFactory.
Fixes a bunch of:
> Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
2018-05-16 02:37:08 +02:00
Simon Budig
5ca7087107 app/tools: fix the resize behaviour of the curves tool dialog. 2018-05-16 02:37:08 +02:00
Simon Budig
8603a21ad4 app/widgets: port GimpImagePropView to GtkGrid 2018-05-16 02:37:08 +02:00
Simon Budig
3fddd0a193 app/widgets: get rid of GtkTable in GimpTemplateEditor 2018-05-16 02:37:08 +02:00
Simon Budig
1eefb9a3a3 app/display: get rid of GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
46ab2d1db0 app/tools: get rid of GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
b28a399124 dialogs: get rid of GtkTable 2018-05-16 02:37:08 +02:00
Simon Budig
30d74c02bc preferences-dialog: get rid of GtkTable 2018-05-16 02:37:08 +02:00
Michael Natterer
1ee174d735 app: undeprecate everything in propgui/, mostly table -> grid 2018-05-16 02:37:08 +02:00
Michael Natterer
5fa3e97bca app: fix splash text color 2018-05-16 02:37:08 +02:00
Michael Natterer
925875da86 app: honor the use-header-bar setting in GimpToolDialog 2018-05-16 02:37:08 +02:00
Michael Natterer
527157e7ec libgimp: undeprecate all GimpFooSelectButton classes 2018-05-16 02:37:08 +02:00
Michael Natterer
f8ab14ee2f app: put back two lines that got lost in earlier GTK+ 3.0 porting 2018-05-16 02:37:08 +02:00
Michael Natterer
b4cc79a1b8 app: make spinscale much more bearable by fixing some coords 2018-05-16 02:37:08 +02:00
Simon Budig
4bf08d0757 plug-ins: try to catch all gtk_table_* uses for the size-entries 2018-05-16 02:37:08 +02:00
Simon Budig
7e508a13b9 dialogs: some table->grid conversion in the item dialogs 2018-05-16 02:37:08 +02:00
Simon Budig
9d9c86f894 libgimpwidgets: convert GimpSizeEntry to a GtkGrid. 2018-05-16 02:37:08 +02:00
Timm Bäder
fef197260f spinscale: Decrease height 2018-05-16 02:37:08 +02:00
Michael Natterer
6a9e6374ef spinscale: remove our own border drawing 2018-05-16 02:37:08 +02:00
Timm Bäder
659b5f31d4 spinscale: Fix styling 2018-05-16 02:37:08 +02:00
Timm Bäder
7d482ef792 fgbgvew: Pass correct state to GtkStyleContext api 2018-05-16 02:37:08 +02:00
Timm Bäder
06693a26b3 dockbook: chain up at end of size-allocate 2018-05-16 02:37:08 +02:00
Michael Natterer
db84445a53 app: set the right "use-header-bar" on all (?) dialogs 2018-05-16 02:37:08 +02:00
Jehan
92af92c19e Revert "splash: Add 2.10 splash image + svg"
This reverts commit ea3de6d524.
Previous splash had never been used in a dev release. Let's use it for
GIMP 3 port. Updating also the version number to display "2.99".
Green Is My Pepper!
2018-05-16 02:37:08 +02:00
Michael Natterer
20baafc3ab Bug 794132 - Make the plug-in protocol version part of the plug-in command line
Also clean GPConfig struct from deprecated members and bump the
plug-in protocol version number.
2018-05-16 02:37:08 +02:00
Michael Natterer
e90a090863 app: port GimpCursorView to GtkGrid 2018-05-16 02:37:08 +02:00
Michael Natterer
395b9d140e Revert "app: remove all deprecated threads_enter/leave code"
This reverts commit 94b028bc39c7250997ee9883793e6649bf2490c7.

Dunno what breaks here, it just crashes, leave the commits there
instead of rebasing them away, as reminder...
2018-05-16 02:37:08 +02:00
Michael Natterer
8e493c79f9 app: remove all deprecated threads_enter/leave code 2018-05-16 02:37:08 +02:00
Michael Natterer
08d203bf66 app: port most menu items that want images to gimp_menu_item_set_image()
or remove the item setting completely.
2018-05-16 02:37:08 +02:00
Michael Natterer
90033acb19 app: add utility functions gimp_widget_get,set_image()
as replacement for the deprecated GtkImageMenuItem, for the few cases
where we really want an icon/image in a menu item.
2018-05-16 02:37:08 +02:00
Michael Natterer
ebed9ab9ca app: remove the unused GimpContainerGridView 2018-05-16 02:37:08 +02:00
Michael Natterer
e2ad2e98cb app, themes: move GimpDisplayShell styling to CSS
Looks half-decent again now.
2018-05-16 02:37:08 +02:00
Michael Natterer
79e6b9517b app: port GimpDisplayShell to use GtkGrid 2018-05-16 02:37:08 +02:00
Michael Natterer
dc3c112f44 app: gimp_ui_manager_ui_popup_at_pointer() and use it where appropriate
Only one call to gimp_ui_manager_ui_popup() left...
2018-05-16 02:37:08 +02:00
Michael Natterer
55a899cc3b app: use gimp_ui_menager_up_popup_at_widget() for the quick mask menu 2018-05-16 02:37:08 +02:00
Jehan
61e6a8b952 Revert "Bug 794356 - Rulers always shown for subsequent image views"
This reverts commit ea48b9f31c.
Final revert of GTK+2 hack.
2018-05-16 02:37:08 +02:00
Jehan
666ffdc344 Revert "Bug 784480 - Clicking on-canvas GUI with a tablet stylus crashes..."
This reverts commit a8bc8d202c.
Continue removing the same GTK+2 hack.
2018-05-16 02:37:08 +02:00
Jehan
0ee5f6c526 Revert "Bug 794356 - Rulers always shown for subsequent image views"
This reverts commit 7230d5d777.
Remove GTK+2 only hack.
2018-05-16 02:37:08 +02:00
Michael Natterer
618cde4e68 app: add gimp_ui_manager_ui_popup_at_widget()
and use it where we used to pass gimp_button_menu_position() to
gimp_ui_manager_up_popup(), remove gimp_button_menu_position() because
it's now unused.
2018-05-16 02:37:08 +02:00
Michael Natterer
5e85c7dcee app: use gtk_widget_get_preferred_size() in gimp_tool_gui_canvas_resized() 2018-05-16 02:37:08 +02:00
Jehan
d98c4d4391 app: remove #undef GDK_DISABLE_DEPRECATED
This was only needed for the insensitive menu item hack which has now be
removed to support CSS themes.
2018-05-16 02:37:08 +02:00
Michael Natterer
5a2ec07623 app: use gtk_menu_popup_at_widget() in GimpIconPicker 2018-05-16 02:37:08 +02:00
Michael Natterer
331cf949cf Replace lots of deprecated gtk_menu_popup(), only GimpUIManager left 2018-05-16 02:37:08 +02:00
Michael Natterer
b821ebf308 app: port some stuff to gdk_seat_grab/ungrab 2018-05-16 02:37:08 +02:00
Jehan
542716a552 themes: uncomment one more deprecated CSS rule.
"GtkButton-inner-border" is deprecated and output warnings.
2018-05-16 02:37:08 +02:00
Jehan
5e0b0f2d30 data: remove obsolete brushes.
These were mostly kept for scripts which needed to keep working. Since
we don't ensure compatibility anymore, let's just get rid of old
deprecated data.
2018-05-16 02:37:08 +02:00
Jehan
f1d67ab1c3 app: the "Default" theme had been removed to "System" a long time ago.
Fix a "No such file or directory" error.
2018-05-16 02:37:08 +02:00
Jehan
c4fce180fc themes: remove Dark, Gray and Light themes.
These are not working anymore since we now need CSS themes.
Also we'll prefer to use theme variants anyway.
I also remove a remnant of the old "Small" theme, which was not
installed anymore anyway, and is not useful anymore.
2018-05-16 02:37:08 +02:00
Jehan
e85eb8bc95 app: allow to select if we prefer a dark variant of the current theme.
GTK+ has the concept of theme variants, and in particular if we prefer
the dark variant of a theme. This can be chosen globally but also
per-application. Make this choice customizable in the Theme tab of
Preferences.
By default, the dark variant will be prefered.
2018-05-16 02:37:08 +02:00
Michael Natterer
163936281d app, libgimpwidgets, themes: fix some themeing
Add CSS names using gtk_widget_class_set_css_name(), remove styling in
code and instead do it properly in CSS, so far in the System theme.
All horribly incomplete but a start.
2018-05-16 02:37:08 +02:00
Michael Natterer
34c638576b libgimpwidgets: honor the gtk-dialogs-use-header setting in GimpDialog
and undeprecate the widget.
2018-05-16 02:37:08 +02:00
Michael Natterer
07ea551ccf app: undeprecate GimpSpinScale, still looks like shit tho 2018-05-16 02:37:08 +02:00
Michael Natterer
9fc1aa9b04 app: add missing const to gimp_cell_renderer_button_activate() 2018-05-16 02:37:08 +02:00
Tobias Ellinghaus
53030c0c3e Fix compile 2018-05-16 02:37:08 +02:00
Michael Natterer
627c4c1616 app: get rid of some GtkTables in tools/ 2018-05-16 02:37:08 +02:00
Michael Natterer
c82f010f67 app: fix border width of GimpOverlayDialog 2018-05-16 02:37:08 +02:00
Michael Natterer
2a1d21df3a app: get rid of GtkArrow in GimpColorDialog 2018-05-16 02:37:08 +02:00
Michael Natterer
47b73615f8 libgimpwidgets: GimpBrowser undeprecated: threads and focus-on-click 2018-05-16 02:37:08 +02:00
Michael Natterer
2dcc55e719 app: get rid of GtkHSeparator and GtkHScale 2018-05-16 02:37:08 +02:00
Michael Natterer
a40b295aab Port a lot of stuff from GdkScreen/monitor_number to GdkMonitor
including some fixes for getting pointer coords, and needed
API changes in libgimpwidgets.
2018-05-16 02:37:08 +02:00
Michael Natterer
0337754c41 Get rid of all GtkAlignments, use GtkWidget align/margin instead 2018-05-16 02:37:08 +02:00
Michael Natterer
13c1a7e1f1 libgimpwidgets: create GimpIntComboBox' cells in constructed() not init()
Apparently this now has to happen later due to some GTK+ change.
2018-05-16 02:37:08 +02:00
Michael Natterer
0e02a6ada9 app: port GimpColorHistory to GtkGrid 2018-05-16 02:37:08 +02:00
Michael Natterer
104d00db37 themes: comment out deprecated stuff in the "System" theme 2018-05-16 02:37:08 +02:00
Michael Natterer
899b17ea5a Get rid of the deprecated gtk_icon_size_lookup_for_settings()
and use gtk_icon_size_lookup() instead.
2018-05-16 02:37:08 +02:00
Michael Natterer
fe407c0ddb configure.ac: don't define GDK/GTK_MULTIHEAD_SAFE, they are gone 2018-05-16 02:37:08 +02:00
Michael Natterer
190777baa7 libgimp: port GimpProcView to GtkGrid 2018-05-16 02:37:08 +02:00
Michael Natterer
5b05203f3f libgimpwidgets: add gimp_grid_attach_aligned() 2018-05-16 02:37:08 +02:00
Michael Natterer
0f2a2273ef Get rid of using GtkMisc API globally 2018-05-16 02:37:08 +02:00
Michael Natterer
9fab93f1a1 libgimpwidets: port GimpColorScales to GtkGrid 2018-05-16 02:37:08 +02:00
Michael Natterer
2a3694ff65 libgimpwidgets: add GtkGrid variants of gimp_[color_]scale_entry_new()
as temporary porting hack, they will eventually be renamed to the old
names once GtkGrid porting is done.
2018-05-16 02:37:08 +02:00
Michael Natterer
5d9809f1e0 libgimpwidgets: remove gimp3migration.[ch] 2018-05-16 02:37:08 +02:00
Michael Natterer
3b13d275e9 libgimpwidgets: derive GimpChainButton from GtkGrid not GtkTable 2018-05-16 02:37:08 +02:00
Michael Natterer
69750065fc libgimp: deprecate more cruft, everything not needed by cruft plug-ins 2018-05-16 02:37:08 +02:00
Michael Natterer
29b216718c libgimpmath: remove all deprecated cruft 2018-05-16 02:37:08 +02:00
Michael Natterer
d48d2f89ba libgimpwidgets: remove most deprecated cruft 2018-05-16 02:37:08 +02:00
Michael Natterer
90c7ea98c7 pdb: remove all deprecated procedures 2018-05-16 02:37:08 +02:00
Michael Natterer
0d9a44c2f4 libgimp: remove tons of deprecated cruft 2018-05-16 02:37:08 +02:00
Michael Natterer
79124d2975 libgimpcolor: remove most deprecated cruft, rest to follow 2018-05-16 02:37:08 +02:00
Michael Natterer
461df51a63 plug-ins: remove color-enhance, there is a GEGL op doing almost the same 2018-05-16 02:37:08 +02:00
Michael Natterer
13fc9f9737 libgimpconfig: remove all deprecated cruft 2018-05-16 02:37:08 +02:00
Michael Natterer
31579748f6 libgimpmodule: remove all deprecated cruft 2018-05-16 02:37:08 +02:00
Michael Natterer
3a7d24ee7a libgimpbase: remove almost all deprecated compat cruft
Keep infrastructure for compat enums around because we will
mose definitely need it again.
2018-05-16 02:37:08 +02:00
Michael Natterer
db56513c53 app: make GimpHighlightableButton build on GTK+ 3.x 2018-05-16 02:37:08 +02:00
Michael Natterer
1bc2b3c595 app: port gimpwidgets-utils.c to GTK+ 3.x 2018-05-16 02:37:08 +02:00
Michael Natterer
7410961ae9 app: port GimpMeter to GTK+ 3.x 2018-05-16 02:37:08 +02:00
Michael Natterer
0015d28e41 libgimpwidgets: make GimpColorScale more-or-less work fine
also derive it from GtkRange directly not from GtkScale.
2018-05-16 02:37:08 +02:00
Michael Natterer
5ba42112da libgimpwidgets, app: use GdkRGBA instead of GdkColor for cell backgrounds 2018-05-16 02:37:08 +02:00
Michael Natterer
fcb2f1e3c2 plug-ins: s/GtkObject/GtkAdjustment/ in file-wepb 2018-05-16 02:37:08 +02:00
Jehan
f277d05e79 Bug 762279 - "Tip of the day" links opens two links.
Use the "activate-link" signal instead of "clicked" on tip links, so
that we can stop signal propagation.
Otherwise it opens "http://docs.gimp.org/" everytime.
2018-05-16 02:37:08 +02:00
Michael Natterer
45d70878a1 Revert "Bug 762279 - "Tip of the day" links opens two links"
This reverts commit dc33afd95b.

That hack is not for gtk3...
2018-05-16 02:37:08 +02:00
Michael Natterer
ab9b7454f2 app: port GimpContainerTreeView from style_set() to style_updated() 2018-05-16 02:37:08 +02:00
Michael Henning
c4abfd1379 libgimpwidgets: Separate ruler text layer from background.
Also fix failing to clear backing_store at the same time.
2018-05-16 02:37:08 +02:00
Michael Henning
7a30bd39b7 libgimpwidgets: Draw marker in correct position on ruler.
With gtk+3, the cairo context is offset by allocation.x/y for us,
so we no longer need to add that factor in while drawing.
2018-05-16 02:37:08 +02:00
Michael Natterer
650446a83a libgimpwidgets: #if 0 more stuff in gimp3migration 2018-05-16 02:37:08 +02:00
Michael Natterer
3df3bcfaaa app: use gimp_color_display_stack_get_filters() instead of stack->filters 2018-05-16 02:37:08 +02:00
Michael Natterer
adc62480c8 app: remove GTK_OBJECT() case in GimpPopup 2018-05-16 02:37:08 +02:00
Michael Natterer
0338340315 app: port GimpCircle and subclasses to GTK+ 3 2018-05-16 02:37:08 +02:00
Jehan
cbac5b0be9 Use GTK+3 gtk_get_locale_direction() function instead of current hack.
This new function is available from the released dev version 3.11.4. But
we don't want to require GTK+ master for the gtk3-port branch, so I
leave the old hack in a GTK_CHECK_VERSION() macro, to be removed later
when we update GTK+ required version.
2018-05-16 02:37:08 +02:00
Michael Natterer
6c24c6fbff app: s/GtkObject/GtkAdjustment/ in gimpdisplayhsell-rotate-dialog.c 2018-05-16 02:37:08 +02:00
Michael Natterer
4428218ce9 modules: port GimpColorWheel to GTK+ 3.x 2018-05-16 02:37:08 +02:00
Michael Natterer
1f541731ed app: port wilber drawing to GtkStyleContext 2018-05-16 02:32:42 +02:00
Michael Natterer
b2e642f1a0 app: don't use the deprecated GDK_EXTENSION_EVENTS_ALL 2018-05-16 02:32:42 +02:00
Michael Natterer
1b96833141 app: make the statusbar's progress label visible again
and remove setting of removed align properties. The label alignment is
broken now until that feature comes back to gtk+.
2018-05-16 02:32:42 +02:00
Michael Natterer
9d7380d654 themes: set an explicit background for rulers
because they can't be rendered with transparent background currently.
2018-05-16 02:32:42 +02:00
Michael Natterer
7d5962de21 Incomplete notebook and tab theming commit, to be improved 2018-05-16 02:32:42 +02:00
Michael Natterer
01dba8d119 app: don't use "size-request" for the toolbox' wilber, it's gone 2018-05-16 02:32:42 +02:00
Michael Natterer
2f4de278ad devel-docs: make the shooter tool at least build again (untested) 2018-05-16 02:32:42 +02:00
Michael Natterer
eb756ed536 app: implement GtkContainer::get_path_for_child() in GimpMessageBox
and handle our internal icon child ourselves.
2018-05-16 02:32:42 +02:00
Michael Natterer
6463f607ee plug-ins: s/GtkObject/GtkAdjustment/ 2018-05-16 02:32:42 +02:00
Michael Natterer
e291a56b17 app: GimpDock: port font size modification to GtkCssProvider 2018-05-16 02:32:42 +02:00
Michael Natterer
8a33ba7fa0 app: port GimpTagPopup to GtkStyleContext
This doesn't look as it should at all, but is entirely useable and
undeprecated, and I really want to keep the diff to master small. Will
fix after we switch to GTK+ 3.0.
2018-05-16 02:32:42 +02:00
Michael Natterer
e617f2c419 app: port GimpNavigationEditor to GtkStyleContext 2018-05-16 02:32:42 +02:00
Michael Natterer
52ff170d59 app: port GimpHistogramView to gdk_device_grab()/ungrab() 2018-05-16 02:32:42 +02:00
Michael Natterer
e881f67eed app: port GimpGradientEditor to GtkSyleContext 2018-05-16 02:32:42 +02:00
Michael Natterer
5630e37509 app: let the file dialog expand/collapse with the file type expander
Using the new gtk_expander_set_resize_toplevel().
2018-05-16 02:32:42 +02:00
Michael Natterer
0ae3cccf0d app: remove some forgotten #undef GSEAL_ENABLE 2018-05-16 02:32:42 +02:00
Michael Natterer
3fc22fe98d app: use gdk_device_get_position() inetad of gdk_display_get_pointer() 2018-05-16 02:32:42 +02:00
Michael Natterer
c212d03113 app: make input devices, grabs and therefore generally tools work again
- add new "device from event" apparatus that works on GTK+ 3.x
- fix the active device selection mechanism
- use the new device grabbing functions
- make sure we don't process events while we have a grab on
  another device
- compensate for some really obscure (and likely broken) behavior
  of XI2, it feels like we are the first real users...
2018-05-16 02:32:42 +02:00
Michael Natterer
4ce28daf0c app: gimp_device_info_get_device_coords(): workaround for XI2 b0rk
for the time being, use gdk_window_get_device_position() instead of
gdk_device_get_axis() for X and Y, which gets rid of subpixel
coordinates, but at least returns values != 0. Also, don't ask
keyboard devices for coordinates.
2018-05-16 02:32:42 +02:00
Michael Natterer
6f705caa3f app: gimp_print_event(): add the device to the event debug output. 2018-05-16 02:32:42 +02:00
Michael Natterer
2cc5002dd6 plug-ins: port filter-pack to GTK+ 3.0, still some warnings left 2018-05-16 02:32:42 +02:00
Michael Natterer
944ba6a99b app: remove gimp_rgb_get,set_gdk_color()
and inline the few lines into their only users.
2018-05-16 02:32:42 +02:00
Michael Natterer
e8a043090c app: use GdkRGBA instead of GdkColor in some places 2018-05-16 02:32:42 +02:00
Michael Natterer
43f43e2294 plug-ins: port map-object to GTK+ 3.x 2018-05-16 02:32:42 +02:00
Michael Natterer
b8508d1488 configure.ac: use the new GTK_CHECK_BACKEND() macro
so GTK+ target detection works again.
2018-05-16 02:32:42 +02:00
Michael Natterer
dd1b40a6aa app: port GimpComboTagEntry to GtkStyleContext 2018-05-16 02:32:42 +02:00
Michael Natterer
b937c37f1f themes: document the new stlye properties and indent the CSS files properly 2018-05-16 02:32:42 +02:00
Michael Natterer
c3ebd964f4 app: define all GimpHistogramView colors via style properties and CSS 2018-05-16 02:32:42 +02:00
Michael Natterer
ea12bd8650 themes: document the new GimpHistogramView property in the theme CSS 2018-05-16 02:32:42 +02:00
Michael Natterer
12d64b1313 app: port GimpCurveView to GtkStyleContext
reusing the new grid-color property added in the parent class.
2018-05-16 02:32:42 +02:00
Michael Natterer
b5f41df484 app: add style property and default CSS for GimpHistogramView's grid-color 2018-05-16 02:32:41 +02:00
Michael Natterer
885ccfcc64 app: add gimp_get_style_color() to simplify GdkRGBA style property lookup 2018-05-16 02:32:41 +02:00
Michael Natterer
17844b28e9 app: port GimpCellRendererDashes to GtkStyleContext 2018-05-16 02:32:41 +02:00
Michael Natterer
f635078658 Port cell renderers to gtk_cell_renderer_get_state() 2018-05-16 02:32:41 +02:00
Michael Natterer
3f2c20374a app: port GimpOverlayChild to GtkStyleContext 2018-05-16 02:32:41 +02:00
Michael Natterer
575adf4152 app: remove call to gtk_widget_style_attach() from GimpOverlayBox 2018-05-16 02:32:41 +02:00
Michael Natterer
940ec94a1c app: port GimpColorFrame away from GtkStyle, using a new style property 2018-05-16 02:32:41 +02:00
Michael Natterer
18c86d4269 app: remove obsolete device checks from GimpToolbox
The new code doesn't actually work properly, but the old one was
clearly bogus with GTK+ 3.x.
2018-05-16 02:32:41 +02:00
Michael Natterer
4cefd8e160 app: when checking for a device change, check the event's source device
because the events we receive always come from either master or
floating devices, but never from a slave source device.
2018-05-16 02:32:41 +02:00
Michael Natterer
98fa8e05a6 app: always ask the master device for its axes or state 2018-05-16 02:32:41 +02:00
Michael Natterer
88e2300834 app: port GimpTagEntry to GtkStyleContext 2018-05-16 02:32:41 +02:00
Michael Natterer
03d7bbfd68 app: port GimpHistogramView to GtkStyleContext
Locally added shade() and mix() utility functions which use
GtkSymbolicColor. Will move them to a better place once they are
needed elsewhere.
2018-05-16 02:32:41 +02:00
Michael Natterer
f9deb951aa Implement GtkWidget::style_updated() instead of ::style_set() 2018-05-16 02:32:41 +02:00
Michael Natterer
bbffc8201a app: port GimpThumbBox to GtkStyleContext 2018-05-16 02:32:41 +02:00
Michael Natterer
a12e662c9f app: use gtk_widget_override_font() instead of modify_font() 2018-05-16 02:32:41 +02:00
Michael Natterer
2c00aab4d8 app: port GimpToolEditor to GtkStyleContext 2018-05-16 02:32:41 +02:00
Michael Natterer
36aabcafb0 app: port GimpDockWindow to GtkStyleContext 2018-05-16 02:32:41 +02:00
Michael Natterer
db09b4f224 libgimpwidgets: move all GimpColorProfileStore members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
4123734393 plug-ins: don't use style->black and style->white 2018-05-16 02:32:41 +02:00
Michael Natterer
872ca28081 app: port GimpPaletteView to GtkStyleContext 2018-05-16 02:32:41 +02:00
Michael Natterer
dac594b048 app: port GimpStrokeEditor to GtkStyleContext 2018-05-16 02:32:41 +02:00
Michael Natterer
9988e51acb libgimpwidgets: move all GimpMemsizeEntry members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
27406def12 app: don't use style->black and style->white 2018-05-16 02:32:41 +02:00
Michael Natterer
9ffe50f216 libgimpwidgets: move all GimpEnumLabel members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
9695d61eb9 libgimpwidgets: move all GimpColorSelection members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
5b0ed2451b libgimpwidgets: move GimpColorProfileComboBox::dialog to private 2018-05-16 02:32:41 +02:00
Michael Natterer
d791bc0e31 libgimpwidgets: move all GimpColorScale members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
80927dc521 libgimpwidgets: move all GimpColorNotebook members to a private struct. 2018-05-16 02:32:41 +02:00
Michael Natterer
6f4f18b864 libgimpwidgets: add padding 2018-05-16 02:32:41 +02:00
Michael Natterer
2ba9589012 libgimpwidgets: move all GimpColorHexEntry members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
e0aa0dcf48 libgimpwidgets: move all GimpColorDisplayStack members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
d27355c76d libgimpwidgets: move all GimpColorDisplay members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
c7be65f677 libgimpwidgets: move all GimpBrowser members to a private struct
The newly added API is ugly and will change.
2018-05-16 02:32:41 +02:00
Michael Natterer
63d46108f2 libgimpwidgets: move all GimpChainButton members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
d70ea37c34 libgimpwidgets: move all GimpCellRendererToggle members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
70041b32f5 libgimpwidgets: move all GimpColorButton members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
8337d68f59 libgimpwidgets: move all GimpCellRendererColor members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
95dd4c22cc libgimpwidgets: move all GimpButton members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
6fe0505d7c libgimpwidgets: move padding members from instance to class struct 2018-05-16 02:32:41 +02:00
Michael Natterer
bfaa275590 libgimpwidgets: move all GimpOffsetArea members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
9c9b4f53a2 libgimpwidgets: move all GimpColorArea members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
2737a29da9 libgimpwidgets: move all GimpPickButton members to a private struct 2018-05-16 02:32:41 +02:00
Michael Natterer
942e8af3a0 app: port GimpScaleButton to GtkStyleContext 2018-05-16 02:32:41 +02:00
Michael Natterer
9eafd331fe app: port GimpOverlayFrame to GtkStyleContext 2018-05-16 02:32:41 +02:00
Michael Natterer
e89d3c0ec9 app: port GimpOverlayBox to GtkStyleContext 2018-05-16 02:32:41 +02:00
Michael Natterer
16abdeeac7 app: use gtk_menu_shell_get_selected_item() 2018-05-16 02:32:41 +02:00
Michael Natterer
f22b3c3154 Replace gdk_cursor_unref() with g_object_unref() 2018-05-16 02:32:41 +02:00
Michael Natterer
a05161569a app: check whether child widgets exist in GtkWidget::style_updated()
because it is emitted repeatedly during widget construction, when not
everything is in place yet.
2018-05-16 02:32:41 +02:00
Michael Natterer
398adf23dd app: copy gimp.css instead of gtkrc to the user's gimp directory
Also, don't migrate gtkrc files from older gimp versions.
2018-05-16 02:32:41 +02:00
Michael Natterer
333bf5423c Port theme and gtkrc file loading to CSS files using GtkCssProvider 2018-05-16 02:32:41 +02:00
Michael Natterer
c6516b69db port gtkrc files to CSS (incompletely and stuff commented out) 2018-05-16 02:32:41 +02:00
Michael Natterer
54c403d392 app: implement GtkWidget::style_updated() instead of style_set() 2018-05-16 02:32:41 +02:00
Michael Natterer
cd6d049fc6 app: use gdk_drag_context_get_selected_action() instead of conect->action 2018-05-16 02:32:41 +02:00
Michael Natterer
556a968fec app: use gdk_drag_context_get_source_window()
instead of peeking into the struct
2018-05-16 02:32:41 +02:00
Michael Natterer
8c42c18a52 libgimpwidgets: use g_object_ref()/unref() for GdkCursors
The are GObjects now.
2018-05-16 02:32:41 +02:00
Michael Natterer
8cedd774b5 libgimpwidgets: implement GtkWidget::style_updated() instead of style_set() 2018-05-16 02:32:41 +02:00
Michael Natterer
de46a1d650 libgimpwidgets: implement GtkWidget::state_flags_changed()
instead of GtkWidget::state_changed()
2018-05-16 02:32:41 +02:00
Michael Natterer
d52bde19c6 modules: remove call to gtk_widget_set_extension_events() 2018-05-16 02:32:41 +02:00
Michael Natterer
999e1007c7 app: port the about dialog to GtkStyleContext 2018-05-16 02:32:41 +02:00
Michael Natterer
4d55df5e66 libgimpwidgets: port GimpNumberPairEntry to gtk_widget_override_font() 2018-05-16 02:32:41 +02:00
Michael Natterer
79d54a96a1 app: s/gtk_widget_modify_font/gtk_widget_override_font/ 2018-05-16 02:32:41 +02:00
Michael Natterer
37ac187a83 app: remove calls to gtk_widget_get,set_extension_events() 2018-05-16 02:32:41 +02:00
Michael Natterer
e2f960fb2a app: port GimpDashEditor to GtkStyleContext 2018-05-16 02:32:41 +02:00
Michael Natterer
2057befc86 app: port GimpContainerBox to GtkStyleContext 2018-05-16 02:32:41 +02:00
Michael Natterer
eb92f6f21e app: port gimp_get_icon_size() to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
0a0a71488c app: port GimpFgBgView to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
ed74318ba6 app: port GimpFgBgEditor to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
0d94c985cc app: port GimpComponentEditor to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
b39128122f app: port GimpColormapEditor to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
1e168c9b60 app: port GimpContainerTreeView to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
81ec382714 app: port GimpContainerIconView to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
db415d37df app: port GimpPanedBox to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
27080d11f1 app: port setting the canvas padding color to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
a2ddb2700a app: port GimpBlobEditor to GtkStyleContext
Also, add prelighting for the handle.
2018-05-16 02:32:40 +02:00
Michael Natterer
cfa7c56e4f llibgimpwidgets: port GimpScrolledPreview to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
7b4c8bc7ec libgimpwidgets: port GimpRuler to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
5ddf4309d6 libgimpwidgets: port GimpOffsetArea to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
4979c0eef2 libgimpwidgets: port GimpColorScale to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
7e01fc41ce libgimpwidgets: port GimpColorArea to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
1eedc67b68 libgimpwidgets: port GimpChainButton to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
832e2c00c7 libgimpwidgets: port GimpCellRendererToggle to GtkStyleContext 2018-05-16 02:32:40 +02:00
Michael Natterer
f27a9f7b86 app: change the list of available devices to something that makes sense
Include the client pointer, its slaves, and all floating devices.
2018-05-16 02:32:40 +02:00
Michael Natterer
81616d5e0b libgimpwidgets: port to GtkStyleContext and gtk_render_foo() 2018-05-16 02:32:40 +02:00
Michael Natterer
e01385f5d0 app: port the device sort function to GdkDeviceManager
Also make sure we don't pass around uninitialized keyvals and
modifiers of device keys.
2018-05-16 02:32:40 +02:00
Michael Natterer
b2f77839e6 Use gtk_widget_render_icon_pixbuf() instead of gtk_widget_render_icon()
because the latter is deprecated.
2018-05-16 02:32:40 +02:00
Michael Natterer
f57d756a02 app: put the toolbox' areas into a box until we decided about a wrapping widget 2018-05-16 02:32:40 +02:00
Michael Natterer
dbed39bf8a app: introduce struct GimpDeviceKey because GdkDeviceKey is gone 2018-05-16 02:32:40 +02:00
Michael Natterer
b3c1c50e75 app: use GdkDevice accessors 2018-05-16 02:30:39 +02:00
Michael Natterer
d1a02eb93a app: implement proper height-for-width in GimpToolPalette 2018-05-16 02:30:39 +02:00
Michael Natterer
b9e88b8600 app: skip keyboard devices so the device list becomes reasonable 2018-05-16 02:30:39 +02:00
Michael Natterer
444d31ff2d app: port GimpSpinScale to GTK+ 3.0 2018-05-16 02:30:39 +02:00
Michael Natterer
e82f5e851d app: don't connect to "size-requst" because that's deprecated
Instead, connect to "style-set" and calculate the widget's size
request there. Also fix the label's offsets after whatever GTK+ text
drawing changes.
2018-05-16 02:30:39 +02:00
Michael Natterer
604461dd1a app: port GimpOverlayBox to GtkWidget::get_preferred_width/height() 2018-05-16 02:30:39 +02:00
Michael Natterer
43561b69a8 app: fix GimpOverlayDialog's minimum height
and avoid some code duplication by using the parent class' size
negotiation code.
2018-05-16 02:30:39 +02:00
Michael Natterer
7739644a77 plug-ins: port the unit-editor to GtkScrollable 2018-05-16 02:30:39 +02:00
Michael Natterer
be1838f5ae plug-ins: port lighting to GTK+ 3.0 2018-05-16 02:30:39 +02:00
Michael Natterer
47362d55d7 plug-ins: port cml-explorer to GtkWidget::draw() 2018-05-16 02:30:39 +02:00
Michael Natterer
bd83645a37 plug-ins: port sphere-designer to GtkWidget::draw() 2018-05-16 02:30:39 +02:00
Michael Natterer
8a96f4ff21 plug-ins: port the print preview to the new size request API 2018-05-16 02:30:39 +02:00
Michael Natterer
896c9f5cbe app: port to the new size request API 2018-05-16 02:30:39 +02:00
Michael Natterer
cc68acec1d libgimpwidgets: port to the new size request API 2018-05-16 02:30:39 +02:00
Michael Natterer
f5e2d248aa app: remove GtkWrapBox 2018-05-16 02:30:39 +02:00
Michael Natterer
869719c53b app: port the colormap editor to GTK+ 3.0 2018-05-16 02:30:39 +02:00
Michael Natterer
e266d01c91 plug-ins: port some more plug-ins to GTK+ 3.0 2018-05-16 02:30:38 +02:00
Michael Natterer
9c37ba5b39 plug-ins: more s/GtkObject/GtkAdjustment/ 2018-05-16 02:30:38 +02:00
Michael Natterer
1be9cd3685 plug-ins: s/GtkObject/GtkAdjustment/g in plug-ins/common/ 2018-05-16 02:30:38 +02:00
Michael Natterer
16e41b5351 plug-ins: port file-png to GTK+ 3.0 2018-05-16 02:30:38 +02:00
Michael Natterer
567a433dce plug-ins: port jpeg-save to GTK+ 3.0 2018-05-16 02:30:38 +02:00
Michael Natterer
472b1dd7dc plug-ins: lots of trivial GTK+ 3.0 porting
Most of it simply s/GtkObject/GtkAdjustment/
2018-05-16 02:30:38 +02:00
Michael Natterer
6f02c01c70 app: add ugly workaround to make the icon view adapt to view size changes 2018-05-16 02:30:38 +02:00
Michael Natterer
dc2ebd81ca app: cairo_save()/restore() around chaining up in draw() 2018-05-16 02:30:38 +02:00
Michael Natterer
6075c180c0 app: use the new GtkScrollable API instead of deprecated tree view API 2018-05-16 02:30:38 +02:00
Michael Natterer
7b3618494a app: GtkEntry turned into a no-window widget
Therefore, use the new get_area() functions to figure where to draw
from instead of the removed get_window() ones. Also adjust the tag
popup positioning code accordingly.
2018-05-16 02:30:38 +02:00
Michael Natterer
d11988b62b app: port to GtkWidget::draw() 2018-05-16 02:30:38 +02:00
Michael Natterer
0ffba87159 app: forgot to remove a cairo_destroy() in draw() 2018-05-16 02:30:38 +02:00
Michael Natterer
181c5902f5 app: port to GtkWidget::draw() 2018-05-16 02:30:38 +02:00
Michael Natterer
ba5a5e5af4 app: don't translate to allocation.x,y 2018-05-16 02:30:38 +02:00
Michael Natterer
fe9ce8c9fe libgimp: port to GtkWidget::draw() 2018-05-16 02:30:38 +02:00
Michael Natterer
342e3d1b77 libgimpwidgets: port to GtkWidget::draw() 2018-05-16 02:30:38 +02:00
Michael Natterer
254403455b modules: port to GtkWidget::draw() 2018-05-16 02:30:38 +02:00
Michael Natterer
93171ace8d app: remove GimpContainerGridView from the build entirely
but leave it in the tree as reference for the time being.
2018-05-16 02:30:38 +02:00
Michael Natterer
f5f8e72cee app: port popup arrow drawing to cairo and get rid of the arrow_pixbuf 2018-05-16 02:30:38 +02:00
Michael Natterer
006f778609 app: passing -1 as width/height to gtk_paint_box() no longer works 2018-05-16 02:30:38 +02:00
Michael Natterer
2b7b48aa84 app: port to GtkWidget::draw() 2018-05-16 02:30:38 +02:00
Michael Natterer
9c11b54843 app: didn't completely commit the display shell expose() -> draw() change 2018-05-16 02:30:38 +02:00
Michael Natterer
24268542a2 modules: s/GtkObject/GtkAdjustment/ 2018-05-16 02:30:38 +02:00
Michael Natterer
31fea8e2af libgimpwidgets: port to GtkWidget::draw() 2018-05-16 02:30:38 +02:00
Michael Natterer
0f45181203 app: port to GtkWidget::draw() 2018-05-16 02:30:38 +02:00
Michael Natterer
de5ee4ffb8 app: can't set the scale combo entry's properties in init() any longer
Set them in constructed() instead.
2018-05-16 02:30:38 +02:00
Michael Natterer
be1dfad618 app: port to GtkWidget::draw() but disable the code inside with #if 0 2018-05-16 02:30:38 +02:00
Michael Natterer
3e58957970 app: port the tag entry to GTK+ 3.0 2018-05-16 02:30:38 +02:00
Michael Natterer
fd423bd063 app: remove call to gtk_statusbar_set_has_resize_grip() 2018-05-16 02:30:38 +02:00
Michael Natterer
6c8349a5bc app: port to GtkWidget::draw() (incompletely) 2018-05-16 02:30:38 +02:00
Michael Natterer
f0a60805f9 app: use the container icon view, the grid view is not GTK+ 3.0-able 2018-05-16 02:30:38 +02:00
Michael Natterer
a6d7d996e4 app: port the overlay stuff to GTK+ 3.0 2018-05-16 02:30:38 +02:00
Michael Natterer
3008ec665f app: port to GtkWidget::draw() 2018-05-16 02:30:38 +02:00
Michael Natterer
370a10ebb9 libgimpwidgets: port to GtkWidget::draw() 2018-05-16 02:30:38 +02:00
Michael Natterer
d5326393d5 libgimpwidgets: port the ruler to GTK+ 3.0 2018-05-16 02:30:38 +02:00
Michael Natterer
9909626ab6 app: port the splash to GTK+ 3.0 2018-05-16 02:30:38 +02:00
Michael Natterer
4f761939f0 libgimpwidgets: get rid of (GtkObject **) casts 2018-05-16 02:30:38 +02:00
Michael Natterer
67a9bef378 app: remove calls to colormap functions, they are gone 2018-05-16 02:30:38 +02:00
Michael Natterer
8ab7ffdd35 app: port to GtkWidget::draw() 2018-05-16 02:30:38 +02:00
Michael Natterer
06186da0e2 app: use GdkDeviceManager to list devices 2018-05-16 02:30:38 +02:00
Michael Natterer
18939612e0 app: pass the cairo_region_t to gdk_window_invalidate_region() directly 2018-05-16 02:30:38 +02:00
Michael Natterer
440b306982 app: s/GtkObject/GtkAdjustment/ in app/dialogs/ 2018-05-16 02:30:38 +02:00
Michael Natterer
0298074611 app: port tools to GTK+ 3.0 (trivial changes only) 2018-05-16 02:30:38 +02:00
Michael Natterer
3d07c3f3dc libgimpwidgets: port GimpFrame to GTK+ 3.0 2018-05-16 02:30:38 +02:00
Michael Natterer
467824d8d6 app: use gtk_widget_get_preferred_size() instead of size_request() 2018-05-16 02:30:38 +02:00
Michael Natterer
033004846a app: port GimpScalComboBox to GTK+ 3.0 2018-05-16 02:30:38 +02:00
Michael Natterer
9d2a7613e5 app: use gtk_widget_get_preferred_size() instead of size_request() 2018-05-16 02:30:38 +02:00
Michael Natterer
090991a032 app: remove obsolete (GtkObject **) casts 2018-05-16 02:30:38 +02:00
Michael Natterer
0df87d30af app: port device management to GdkDeviceManager 2018-05-16 02:30:38 +02:00
Michael Natterer
5de71e0f42 app: port call to gtk_paint_arrow() to GTK+ 3.0 2018-05-16 02:25:31 +02:00
Michael Natterer
2eb41ed147 app: no need to alloc colors any longer, GdkColormap is gone 2018-05-16 02:25:31 +02:00
Michael Natterer
a59902469a app: port to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
7a29733aa4 app: port to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
eea635cf71 app: port GimpPaletteView to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
330254de86 app: port GimpNavigationView to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
20e3d76e47 app: port to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
2861591cb6 app: s/GtkObject/GtkAdjustment/ 2018-05-16 02:25:31 +02:00
Michael Natterer
1a7cc5c59c app: port to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
aa7bf61c4c app: port to GtkWidget::draw() and s/GtkObject/GtkAdjustment/ 2018-05-16 02:25:31 +02:00
Michael Natterer
9a865c56f2 app: port to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
c3307851c3 app: port to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
3ccf60ca1c app: port to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
81ebd918ac app: port virtual functions to GTK+ 3.0 API 2018-05-16 02:25:31 +02:00
Michael Natterer
e7b9915717 app: port to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
46f1f48729 app: port to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
18c9ffdd93 app: remove GTK_OBJECT() cast 2018-05-16 02:25:31 +02:00
Michael Natterer
e84d90cb39 app: port to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
54905bb16b libgimp: remove GdkRGB and GdkColorMap calls, these APIs are gone 2018-05-16 02:25:31 +02:00
Michael Natterer
4cd1ef826f libgimpwidgets: remove deprecated files completely 2018-05-16 02:25:31 +02:00
Michael Natterer
356de501ae libgimpwidgets: remove deprecated functions and s/GtkObject/GtkAdjustment/ 2018-05-16 02:25:31 +02:00
Michael Natterer
13448eabda libgimpwidgets: port to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
4bd930c46c libgimpwidgets: s/GtkObject/GtkAdjustment/ 2018-05-16 02:25:31 +02:00
Michael Natterer
5abee30588 libgimpwidgets: port to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
2ef479117c libgimpwidgets: port to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
1ef06a4f81 libgimpwidgets: port to GtkWidget::draw() 2018-05-16 02:25:31 +02:00
Michael Natterer
53e64e972f libgimpwidgets: port virtual functions to GTK+ 3.0 2018-05-16 02:25:31 +02:00
Michael Natterer
7a845fe60b libgimpwidgets: port virtual functions to GTK+ 3.0 2018-05-16 02:25:31 +02:00
Michael Natterer
99385bede6 libgimpwidgets: s/GtkObject/GtkAdjustment/ in gimpwidgets.[ch] 2018-05-16 02:25:31 +02:00
Michael Natterer
330c33ae6e libgimpwidgets: remove deprecated files from the build 2018-05-16 02:25:31 +02:00
Michael Natterer
45fcdb62f7 Revert "app: Fix on canvas widgets ignoring clicks from tablets - bug 614441"
This reverts commit a059c0e7eb.
2018-05-16 02:25:31 +02:00
Michael Natterer
05084b24b5 Switch to version 2.99/3.0 in a lot of places and depend on GTK+ 3.22
and lots of other newer libraries.
2018-05-16 02:25:30 +02:00
1266 changed files with 16282 additions and 931000 deletions

6
.gitignore vendored
View File

@@ -27,10 +27,10 @@
/cscope.files
/cscope.out
/depcomp
/gimp-2.0.pc
/gimp-3.0.pc
/gimp-zip
/gimpthumb-2.0.pc
/gimpui-2.0.pc
/gimpthumb-3.0.pc
/gimpui-3.0.pc
/git-version.h
/gtk-doc.make
/install-sh

View File

@@ -36,7 +36,7 @@ SUBDIRS = \
$(GIMP_MODULES) \
$(GIMP_PLUGINS) \
etc \
devel-docs \
## devel-docs \
docs \
build

View File

@@ -2,5 +2,5 @@
/Makefile.in
/.deps
/.libs
/gimp-debug-tool-2.0
/gimp-debug-tool-2.0.exe
/gimp-debug-tool-3.0
/gimp-debug-tool-3.0.exe

View File

@@ -118,8 +118,7 @@ buffers_paste_as_new_image_cmd_callback (GtkAction *action,
GIMP_OBJECT (buffer));
gimp_create_display (context->gimp, new_image,
GIMP_UNIT_PIXEL, 1.0,
G_OBJECT (gtk_widget_get_screen (widget)),
gimp_widget_get_monitor (widget));
G_OBJECT (gimp_widget_get_monitor (widget)));
g_object_unref (new_image);
}
}

View File

@@ -79,8 +79,7 @@ data_open_as_image_cmd_callback (GtkAction *action,
image = file_open_with_display (context->gimp, context, NULL,
file, FALSE,
G_OBJECT (gtk_widget_get_screen (widget)),
gimp_widget_get_monitor (widget),
G_OBJECT (gimp_widget_get_monitor (widget)),
&status, &error);
if (! image && status != GIMP_PDB_CANCEL)
@@ -278,15 +277,13 @@ data_edit_cmd_callback (GtkAction *action,
if (data && gimp_data_factory_view_have (view, GIMP_OBJECT (data)))
{
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (view));
gint monitor = gimp_widget_get_monitor (GTK_WIDGET (view));
GtkWidget *dockable;
GdkMonitor *monitor = gimp_widget_get_monitor (GTK_WIDGET (view));
GtkWidget *dockable;
dockable =
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (context->gimp)),
context->gimp,
gimp_dialog_factory_get_singleton (),
screen,
monitor,
value);

View File

@@ -46,9 +46,9 @@ dialogs_create_toplevel_cmd_callback (GtkAction *action,
if (value)
gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
NULL /*ui_manager*/,
widget,
value, -1, TRUE);
}
@@ -66,7 +66,6 @@ dialogs_create_dockable_cmd_callback (GtkAction *action,
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (gimp)),
gimp,
gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
value);
}

View File

@@ -232,7 +232,7 @@ documents_clear_cmd_callback (GtkAction *action,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
@@ -373,8 +373,7 @@ documents_open_image (GtkWidget *editor,
file = gimp_imagefile_get_file (imagefile);
image = file_open_with_display (context->gimp, context, NULL, file, FALSE,
G_OBJECT (gtk_widget_get_screen (editor)),
gimp_widget_get_monitor (editor),
G_OBJECT (gimp_widget_get_monitor (editor)),
&status, &error);
if (! image && status != GIMP_PDB_CANCEL)

View File

@@ -285,15 +285,6 @@ edit_actions_setup (GimpActionGroup *group)
pattern = gimp_context_get_pattern (context);
edit_actions_pattern_changed (context, pattern, group);
#define SET_ALWAYS_SHOW_IMAGE(action,show) \
gimp_action_group_set_action_always_show_image (group, action, show)
SET_ALWAYS_SHOW_IMAGE ("edit-fill-fg", TRUE);
SET_ALWAYS_SHOW_IMAGE ("edit-fill-bg", TRUE);
SET_ALWAYS_SHOW_IMAGE ("edit-fill-pattern", TRUE);
#undef SET_ALWAYS_SHOW_IMAGE
}
void

View File

@@ -163,7 +163,7 @@ edit_undo_clear_cmd_callback (GtkAction *action,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
@@ -384,8 +384,7 @@ edit_paste_as_new_image_cmd_callback (GtkAction *action,
if (image)
{
gimp_create_display (gimp, image, GIMP_UNIT_PIXEL, 1.0,
G_OBJECT (gtk_widget_get_screen (widget)),
gimp_widget_get_monitor (widget));
G_OBJECT (gimp_widget_get_monitor (widget)));
g_object_unref (image);
}
else
@@ -468,7 +467,6 @@ edit_named_paste_cmd_callback (GtkAction *action,
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (gimp)),
gimp,
gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
"gimp-buffer-list|gimp-buffer-grid");
}

View File

@@ -99,7 +99,7 @@ error_console_save_cmd_callback (GtkAction *action,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -218,8 +218,6 @@ file_actions_setup (GimpActionGroup *group)
for (i = 0; i < n_entries; i++)
{
gimp_action_group_set_action_visible (group, entries[i].name, FALSE);
gimp_action_group_set_action_always_show_image (group, entries[i].name,
TRUE);
gimp_action_group_set_action_context (group, entries[i].name,
gimp_get_user_context (group->gimp));

View File

@@ -148,9 +148,9 @@ file_open_location_cmd_callback (GtkAction *action,
return_if_no_widget (widget, data);
gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
NULL /*ui_manager*/,
widget,
"gimp-file-open-location-dialog", -1, TRUE);
}
@@ -195,8 +195,7 @@ file_open_recent_cmd_callback (GtkAction *action,
image = file_open_with_display (gimp, action_data_get_context (data),
progress,
file, FALSE,
G_OBJECT (gtk_widget_get_screen (widget)),
gimp_widget_get_monitor (widget),
G_OBJECT (gimp_widget_get_monitor (widget)),
&status, &error);
if (! image && status != GIMP_PDB_CANCEL)
@@ -418,7 +417,7 @@ file_revert_cmd_callback (GtkAction *action,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
@@ -464,8 +463,8 @@ file_close_all_cmd_callback (GtkAction *action,
return_if_no_widget (widget, data);
gimp_dialog_factory_dialog_raise (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
widget,
"gimp-close-all-dialog", -1);
}
}
@@ -557,9 +556,9 @@ file_open_dialog_show (Gimp *gimp,
GtkWidget *dialog;
dialog = gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (parent),
gimp_widget_get_monitor (parent),
NULL /*ui_manager*/,
parent,
"gimp-file-open-dialog", -1, FALSE);
if (dialog)
@@ -611,9 +610,9 @@ file_save_dialog_show (Gimp *gimp,
if (! dialog)
{
dialog = gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (parent),
gimp_widget_get_monitor (parent),
NULL /*ui_manager*/,
parent,
"gimp-file-save-dialog",
-1, FALSE);
@@ -693,9 +692,9 @@ file_export_dialog_show (Gimp *gimp,
if (! dialog)
{
dialog = gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (parent),
gimp_widget_get_monitor (parent),
NULL /*ui_manager*/,
parent,
"gimp-file-export-dialog",
-1, FALSE);

View File

@@ -480,7 +480,7 @@ gradient_editor_replicate_cmd_callback (GtkAction *action,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
@@ -583,7 +583,7 @@ gradient_editor_split_uniformly_cmd_callback (GtkAction *action,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -83,7 +83,7 @@ gradients_save_as_pov_ray_cmd_callback (GtkAction *action,
g_free (title);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -188,9 +188,9 @@ image_new_cmd_callback (GtkAction *action,
return_if_no_widget (widget, data);
dialog = gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
NULL /*ui_manager*/,
widget,
"gimp-image-new-dialog", -1, FALSE);
if (dialog)
@@ -220,8 +220,7 @@ image_duplicate_cmd_callback (GtkAction *action,
gimp_create_display (new_image->gimp, new_image, shell->unit,
gimp_zoom_model_get_factor (shell->zoom),
G_OBJECT (gtk_widget_get_screen (GTK_WIDGET (shell))),
gimp_widget_get_monitor (GTK_WIDGET (shell)));
G_OBJECT (gimp_widget_get_monitor (GTK_WIDGET (shell))));
g_object_unref (new_image);
}

View File

@@ -87,8 +87,7 @@ images_new_view_cmd_callback (GtkAction *action,
if (image && gimp_container_have (container, GIMP_OBJECT (image)))
{
gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0,
G_OBJECT (gtk_widget_get_screen (GTK_WIDGET (editor))),
gimp_widget_get_monitor (GTK_WIDGET (editor)));
G_OBJECT (gimp_widget_get_monitor (GTK_WIDGET (editor))));
}
}

View File

@@ -61,9 +61,9 @@ palettes_import_cmd_callback (GtkAction *action,
return_if_no_widget (widget, data);
gimp_dialog_factory_dialog_new (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
NULL /*ui_manager*/,
widget,
"gimp-palette-import-dialog", -1, TRUE);
}

View File

@@ -182,7 +182,7 @@ plug_in_reset_all_cmd_callback (GtkAction *action,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -405,7 +405,6 @@ select_save_cmd_callback (GtkAction *action,
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (image->gimp)),
image->gimp,
gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
"gimp-channel-list");
}

View File

@@ -102,8 +102,7 @@ templates_create_image_cmd_callback (GtkAction *action,
image = gimp_image_new_from_template (gimp, template, context);
gimp_create_display (gimp, image, gimp_template_get_unit (template), 1.0,
G_OBJECT (gtk_widget_get_screen (widget)),
gimp_widget_get_monitor (widget));
G_OBJECT (gimp_widget_get_monitor (widget)));
g_object_unref (image);
gimp_image_new_set_last_template (gimp, template);
@@ -246,7 +245,7 @@ templates_delete_cmd_callback (GtkAction *action,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -67,7 +67,7 @@ text_editor_load_cmd_callback (GtkAction *action,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -121,7 +121,7 @@ text_tool_load_cmd_callback (GtkAction *action,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -198,7 +198,7 @@ tool_options_reset_all_cmd_callback (GtkAction *action,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
@@ -244,7 +244,6 @@ tool_options_show_preset_editor (Gimp *gimp,
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (gimp)),
gimp,
gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (GTK_WIDGET (editor)),
gimp_widget_get_monitor (GTK_WIDGET (editor)),
"gimp-tool-preset-editor");

View File

@@ -1018,14 +1018,13 @@ view_actions_update (GimpActionGroup *group,
if (shell->canvas)
{
GtkStyle *style = gtk_widget_get_style (shell->canvas);
GimpRGB color;
GtkStyleContext *style = gtk_widget_get_style_context (shell->canvas);
GdkRGBA color;
gtk_widget_ensure_style (shell->canvas);
gimp_rgb_set_gdk_color (&color, style->bg + GTK_STATE_NORMAL);
gimp_rgb_set_alpha (&color, GIMP_OPACITY_OPAQUE);
gtk_style_context_get_background_color (style, 0, &color);
gimp_rgb_set_alpha ((GimpRGB *) &color, GIMP_OPACITY_OPAQUE);
SET_COLOR ("view-padding-color-theme", &color);
SET_COLOR ("view-padding-color-theme", (GimpRGB *) &color);
}
}

View File

@@ -104,8 +104,7 @@ view_new_cmd_callback (GtkAction *action,
gimp_create_display (display->gimp,
gimp_display_get_image (display),
shell->unit, gimp_zoom_model_get_factor (shell->zoom),
G_OBJECT (gtk_widget_get_screen (GTK_WIDGET (shell))),
gimp_widget_get_monitor (GTK_WIDGET (shell)));
G_OBJECT (gimp_widget_get_monitor (GTK_WIDGET (shell))));
}
void
@@ -472,7 +471,6 @@ view_navigation_window_cmd_callback (GtkAction *action,
gimp_window_strategy_show_dockable_dialog (GIMP_WINDOW_STRATEGY (gimp_get_window_strategy (gimp)),
gimp,
gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (GTK_WIDGET (shell)),
gimp_widget_get_monitor (GTK_WIDGET (shell)),
"gimp-navigation-view");
}

View File

@@ -77,7 +77,7 @@ window_open_display_cmd_callback (GtkAction *action,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -354,9 +354,6 @@ windows_actions_image_notify (GimpDisplay *display,
gimp_action_group_add_actions (group, NULL, &entry, 1);
gimp_action_group_set_action_always_show_image (group, action_name,
TRUE);
action = gtk_action_group_get_action (GTK_ACTION_GROUP (group),
action_name);

View File

@@ -193,7 +193,6 @@ windows_open_recent_cmd_callback (GtkAction *action,
info);
gimp_session_info_restore (info, gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget));
g_object_unref (info);

View File

@@ -86,14 +86,15 @@ static gboolean app_exit_after_callback (Gimp *gimp,
gboolean kill_it,
GMainLoop **loop);
#if 0
/* left here as documentation how to do compat enums */
GType gimp_convert_dither_type_compat_get_type (void); /* compat cruft */
GType gimp_layer_mode_effects_get_type (void); /* compat cruft */
#endif
/* local variables */
static GObject *initial_screen = NULL;
static gint initial_monitor = 0;
static GObject *initial_monitor = NULL;
/* public functions */
@@ -102,7 +103,9 @@ void
app_libs_init (GOptionContext *context,
gboolean no_interface)
{
#if 0
GQuark quark;
#endif
/* disable OpenCL before GEGL is even initialized; this way we only
* enable if wanted in gimprc, instead of always enabling, and then
@@ -122,13 +125,15 @@ app_libs_init (GOptionContext *context,
}
#endif
#if 0
/* left here as documentation how to do compat enums */
/* keep compat enum code in sync with pdb/enumcode.pl */
quark = g_quark_from_static_string ("gimp-compat-enum");
g_type_set_qdata (GIMP_TYPE_CONVERT_DITHER_TYPE, quark,
(gpointer) gimp_convert_dither_type_compat_get_type ());
g_type_set_qdata (GIMP_TYPE_LAYER_MODE, quark,
(gpointer) gimp_layer_mode_effects_get_type ());
#endif
}
void
@@ -366,7 +371,6 @@ app_run (const gchar *full_prog_name,
gimp_get_user_context (gimp),
NULL,
file, as_new,
initial_screen,
initial_monitor,
&status, &error);
if (image)
@@ -409,7 +413,6 @@ app_run (const gchar *full_prog_name,
GFile *file = g_file_new_for_commandline_arg (filenames[i]);
file_open_from_command_line (gimp, file, as_new,
initial_screen,
initial_monitor);
g_object_unref (file);
@@ -465,12 +468,14 @@ static void
app_restore_after_callback (Gimp *gimp,
GimpInitStatusFunc status_callback)
{
gint dummy;
/* Getting the display name for a -1 display returns the initial
* monitor during startup. Need to call this from a restore_after
* callback, because before restore(), the GUI can't return anything,
* after after restore() the initial monitor gets reset.
*/
g_free (gimp_get_display_name (gimp, -1, &initial_screen, &initial_monitor));
g_free (gimp_get_display_name (gimp, -1, &initial_monitor, &dummy));
}
static gboolean

View File

@@ -118,8 +118,8 @@ static const gchar system_gimprc_header[] =
"documents the default values and shows what changes are possible.\n"
"\n"
"The variable ${gimp_dir} is set to the value of the environment "
"variable GIMP2_DIRECTORY or, if that is not set, the compiled-in "
"default value is used. If GIMP2_DIRECTORY is not an absolute path, "
"variable GIMP3_DIRECTORY or, if that is not set, the compiled-in "
"default value is used. If GIMP3_DIRECTORY is not an absolute path, "
"it is interpreted relative to your home directory.";
static void
@@ -249,21 +249,21 @@ static const gchar *man_page_path =
".TP\n"
".I gimp_dir\n"
"The personal gimp directory which is set to the value of the environment\n"
"variable GIMP2_DIRECTORY or to @manpage_gimpdir@.\n"
"variable GIMP3_DIRECTORY or to @manpage_gimpdir@.\n"
".TP\n"
".I gimp_data_dir\n"
"Base for paths to shareable data, which is set to the value of the\n"
"environment variable GIMP2_DATADIR or to the compiled-in default value\n"
"environment variable GIMP3_DATADIR or to the compiled-in default value\n"
"@gimpdatadir@.\n"
".TP\n"
".I gimp_plug_in_dir\n"
"Base to paths for architecture-specific plug-ins and modules, which is set\n"
"to the value of the environment variable GIMP2_PLUGINDIR or to the\n"
"to the value of the environment variable GIMP3_PLUGINDIR or to the\n"
"compiled-in default value @gimpplugindir@.\n"
".TP\n"
".I gimp_sysconf_dir\n"
"Path to configuration files, which is set to the value of the environment\n"
"variable GIMP2_SYSCONFDIR or to the compiled-in default value \n"
"variable GIMP3_SYSCONFDIR or to the compiled-in default value \n"
"@gimpsysconfdir@.\n"
"\n";

View File

@@ -64,7 +64,6 @@ enum
PROP_RESTORE_MONITOR,
PROP_SAVE_TOOL_OPTIONS,
PROP_SHOW_TOOLTIPS,
PROP_TEAROFF_MENUS,
PROP_CAN_CHANGE_ACCELS,
PROP_SAVE_ACCELS,
PROP_RESTORE_ACCELS,
@@ -76,6 +75,7 @@ enum
PROP_TOOLBOX_WILBER,
PROP_THEME_PATH,
PROP_THEME,
PROP_PREFER_DARK_THEME,
PROP_ICON_THEME_PATH,
PROP_ICON_THEME,
PROP_ICON_SIZE,
@@ -235,13 +235,6 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_TEAROFF_MENUS,
"tearoff-menus",
"Tearoff menus",
TEAROFF_MENUS_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_CAN_CHANGE_ACCELS,
"can-change-accels",
"Can change accelerators",
@@ -323,6 +316,13 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
GIMP_CONFIG_DEFAULT_THEME,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_PREFER_DARK_THEME,
"prefer-dark-theme",
"Prefer Dark Theme",
THEME_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
path = gimp_config_build_data_path ("icons");
GIMP_CONFIG_PROP_PATH (object_class, PROP_ICON_THEME_PATH,
"icon-theme-path",
@@ -607,9 +607,6 @@ gimp_gui_config_set_property (GObject *object,
case PROP_SHOW_TOOLTIPS:
gui_config->show_tooltips = g_value_get_boolean (value);
break;
case PROP_TEAROFF_MENUS:
gui_config->tearoff_menus = g_value_get_boolean (value);
break;
case PROP_CAN_CHANGE_ACCELS:
gui_config->can_change_accels = g_value_get_boolean (value);
break;
@@ -645,6 +642,9 @@ gimp_gui_config_set_property (GObject *object,
g_free (gui_config->theme);
gui_config->theme = g_value_dup_string (value);
break;
case PROP_PREFER_DARK_THEME:
gui_config->prefer_dark_theme = g_value_get_boolean (value);
break;
case PROP_ICON_THEME_PATH:
g_free (gui_config->icon_theme_path);
gui_config->icon_theme_path = g_value_dup_string (value);
@@ -792,9 +792,6 @@ gimp_gui_config_get_property (GObject *object,
case PROP_SHOW_TOOLTIPS:
g_value_set_boolean (value, gui_config->show_tooltips);
break;
case PROP_TEAROFF_MENUS:
g_value_set_boolean (value, gui_config->tearoff_menus);
break;
case PROP_CAN_CHANGE_ACCELS:
g_value_set_boolean (value, gui_config->can_change_accels);
break;
@@ -828,6 +825,9 @@ gimp_gui_config_get_property (GObject *object,
case PROP_THEME:
g_value_set_string (value, gui_config->theme);
break;
case PROP_PREFER_DARK_THEME:
g_value_set_boolean (value, gui_config->prefer_dark_theme);
break;
case PROP_ICON_THEME_PATH:
g_value_set_string (value, gui_config->icon_theme_path);
break;

View File

@@ -53,7 +53,6 @@ struct _GimpGuiConfig
gboolean restore_monitor;
gboolean save_tool_options;
gboolean show_tooltips;
gboolean tearoff_menus;
gboolean can_change_accels;
gboolean save_accels;
gboolean restore_accels;
@@ -65,6 +64,7 @@ struct _GimpGuiConfig
gboolean toolbox_wilber;
gchar *theme_path;
gchar *theme;
gboolean prefer_dark_theme;
gchar *icon_theme_path;
gchar *icon_theme;
GimpIconSize icon_size;

View File

@@ -429,9 +429,6 @@ _("Sets the swap file location. GIMP uses a tile based memory allocation " \
"a folder that is mounted over NFS. For these reasons, it may be " \
"desirable to put your swap file in \"/tmp\".")
#define TEAROFF_MENUS_BLURB \
_("When enabled, menus can be torn off.")
#define CAN_CHANGE_ACCELS_BLURB \
_("When enabled, you can change keyboard shortcuts for menu items " \
"by hitting a key combination while the menu item is highlighted.")

View File

@@ -255,7 +255,6 @@ struct _GimpCoords
gdouble yscale;
gdouble angle; /* the view rotation angle */
gboolean reflect; /* whether the view is reflected */
gboolean extended;
};
/* temp hack as replacement for GdkSegment */

View File

@@ -219,18 +219,18 @@ gimp_get_program_class (Gimp *gimp)
gchar *
gimp_get_display_name (Gimp *gimp,
gint display_ID,
GObject **screen,
gint *monitor)
GObject **monitor,
gint *monitor_number)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (screen != NULL, NULL);
g_return_val_if_fail (monitor != NULL, NULL);
g_return_val_if_fail (monitor_number != NULL, NULL);
if (gimp->gui.get_display_name)
return gimp->gui.get_display_name (gimp, display_ID, screen, monitor);
return gimp->gui.get_display_name (gimp, display_ID,
monitor, monitor_number);
*screen = NULL;
*monitor = 0;
*monitor = NULL;
return NULL;
}
@@ -343,15 +343,14 @@ gimp_create_display (Gimp *gimp,
GimpImage *image,
GimpUnit unit,
gdouble scale,
GObject *screen,
gint monitor)
GObject *monitor)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (image == NULL || GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (screen == NULL || G_IS_OBJECT (screen), NULL);
g_return_val_if_fail (monitor == NULL || G_IS_OBJECT (monitor), NULL);
if (gimp->gui.display_create)
return gimp->gui.display_create (gimp, image, unit, scale, screen, monitor);
return gimp->gui.display_create (gimp, image, unit, scale, monitor);
return NULL;
}

View File

@@ -44,8 +44,8 @@ struct _GimpGui
const gchar * (* get_program_class) (Gimp *gimp);
gchar * (* get_display_name) (Gimp *gimp,
gint display_ID,
GObject **screen,
gint *monitor);
GObject **monitor,
gint *monitor_number);
guint32 (* get_user_time) (Gimp *gimp);
GFile * (* get_theme_dir) (Gimp *gimp);
@@ -61,8 +61,7 @@ struct _GimpGui
GimpImage *image,
GimpUnit unit,
gdouble scale,
GObject *screen,
gint monitor);
GObject *monitor);
void (* display_delete) (GimpObject *display);
void (* displays_reconnect) (Gimp *gimp,
GimpImage *old_image,
@@ -128,8 +127,7 @@ GimpObject * gimp_create_display (Gimp *gimp,
GimpImage *image,
GimpUnit unit,
gdouble scale,
GObject *screen,
gint monitor);
GObject *monitor);
void gimp_delete_display (Gimp *gimp,
GimpObject *display);
void gimp_reconnect_displays (Gimp *gimp,
@@ -158,8 +156,8 @@ void gimp_free_progress (Gimp *gimp,
const gchar * gimp_get_program_class (Gimp *gimp);
gchar * gimp_get_display_name (Gimp *gimp,
gint display_ID,
GObject **screen,
gint *monitor);
GObject **monitor,
gint *monitor_number);
guint32 gimp_get_user_time (Gimp *gimp);
GFile * gimp_get_theme_dir (Gimp *gimp);
GFile * gimp_get_icon_theme_dir (Gimp *gimp);

View File

@@ -68,8 +68,7 @@ gimp_modules_load (Gimp *gimp)
if (gimp->no_interface)
return;
/* FIXME, gimp->be_verbose is not yet initialized in init() */
gimp->module_db->verbose = gimp->be_verbose;
gimp_module_db_set_verbose (gimp->module_db, gimp->be_verbose);
file = gimp_directory_file ("modulerc", NULL);
@@ -179,7 +178,8 @@ gimp_modules_unload (Gimp *gimp)
GError *error = NULL;
str = g_string_new (NULL);
g_list_foreach (gimp->module_db->modules, add_to_inhibit_string, str);
g_list_foreach (gimp_module_db_get_modules (gimp->module_db),
add_to_inhibit_string, str);
if (str->len > 0)
p = str->str + 1;
else

View File

@@ -88,7 +88,7 @@ static const struct
}
gimp_user_install_items[] =
{
{ "gtkrc", USER_INSTALL_COPY },
{ "gimp.css", USER_INSTALL_COPY },
{ "menurc", USER_INSTALL_COPY },
{ "brushes", USER_INSTALL_MKDIR },
{ "dynamics", USER_INSTALL_MKDIR },
@@ -887,7 +887,8 @@ user_install_migrate_files (GimpUserInstall *install)
g_str_has_prefix (basename, "gimpswap.") ||
strcmp (basename, "pluginrc") == 0 ||
strcmp (basename, "themerc") == 0 ||
strcmp (basename, "toolrc") == 0)
strcmp (basename, "toolrc") == 0 ||
strcmp (basename, "gtkrc") == 0)
{
goto next_file;
}

View File

@@ -854,7 +854,7 @@ gimp_create_image_from_buffer (Gimp *gimp,
NULL /* same image */);
gimp_image_add_layer (image, layer, NULL, -1, FALSE);
gimp_create_display (gimp, image, GIMP_UNIT_PIXEL, 1.0, NULL, 0);
gimp_create_display (gimp, image, GIMP_UNIT_PIXEL, 1.0, NULL);
/* unref the image unconditionally, even when no display was created */
g_object_add_weak_pointer (G_OBJECT (image), (gpointer) &image);

View File

@@ -51,7 +51,6 @@ gimp_coords_mix (const gdouble amul,
ret_val->wheel = amul * a->wheel + bmul * b->wheel;
ret_val->velocity = amul * a->velocity + bmul * b->velocity;
ret_val->direction = amul * a->direction + bmul * b->direction;
ret_val->extended = b->extended || a->extended;
}
else
{
@@ -63,7 +62,6 @@ gimp_coords_mix (const gdouble amul,
ret_val->wheel = amul * a->wheel;
ret_val->velocity = amul * a->velocity;
ret_val->direction = amul * a->direction;
ret_val->extended = a->extended;
}
}

View File

@@ -42,6 +42,7 @@ VOID: DOUBLE
VOID: DOUBLE, DOUBLE
VOID: DOUBLE, DOUBLE, DOUBLE, DOUBLE
VOID: ENUM
VOID: ENUM, DOUBLE
VOID: ENUM, INT
VOID: ENUM, INT, BOOLEAN
VOID: ENUM, OBJECT

View File

@@ -28,11 +28,6 @@
#include "dialogs-types.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "pdb/gimppdb.h"
#include "about.h"
#include "git-version.h"
@@ -63,7 +58,6 @@ typedef struct
gint index;
gint animstep;
gint textrange[2];
gint state;
gboolean visible;
} GimpAboutDialog;
@@ -76,8 +70,8 @@ static void about_dialog_unmap (GtkWidget *widget,
static GdkPixbuf * about_dialog_load_logo (void);
static void about_dialog_add_animation (GtkWidget *vbox,
GimpAboutDialog *dialog);
static gboolean about_dialog_anim_expose (GtkWidget *widget,
GdkEventExpose *event,
static gboolean about_dialog_anim_draw (GtkWidget *widget,
cairo_t *cr,
GimpAboutDialog *dialog);
static void about_dialog_reshuffle (GimpAboutDialog *dialog);
static gboolean about_dialog_timer (gpointer data);
@@ -89,12 +83,10 @@ static void about_dialog_add_unstable_message
GtkWidget *
about_dialog_create (GimpContext *context)
about_dialog_create (void)
{
static GimpAboutDialog dialog;
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
if (! dialog.dialog)
{
GtkWidget *widget;
@@ -167,8 +159,6 @@ about_dialog_create (GimpContext *context)
g_list_free (children);
}
gtk_window_present (GTK_WINDOW (dialog.dialog));
return dialog.dialog;
}
@@ -246,8 +236,8 @@ about_dialog_add_animation (GtkWidget *vbox,
gtk_widget_set_size_request (dialog->anim_area, -1, 2 * height);
g_signal_connect (dialog->anim_area, "expose-event",
G_CALLBACK (about_dialog_anim_expose),
g_signal_connect (dialog->anim_area, "draw",
G_CALLBACK (about_dialog_anim_draw),
dialog);
}
@@ -278,22 +268,36 @@ about_dialog_reshuffle (GimpAboutDialog *dialog)
}
static gboolean
about_dialog_anim_expose (GtkWidget *widget,
GdkEventExpose *event,
GimpAboutDialog *dialog)
about_dialog_anim_draw (GtkWidget *widget,
cairo_t *cr,
GimpAboutDialog *dialog)
{
GtkStyle *style = gtk_widget_get_style (widget);
cairo_t *cr;
GtkAllocation allocation;
gint x, y;
gint width, height;
GtkStyleContext *style = gtk_widget_get_style_context (widget);
GtkAllocation allocation;
GdkRGBA color;
gdouble alpha = 0.0;
gint x, y;
gint width, height;
if (! dialog->visible)
return FALSE;
cr = gdk_cairo_create (event->window);
if (dialog->animstep < 16)
{
alpha = (gfloat) dialog->animstep / 15.0;
}
else if (dialog->animstep < 18)
{
alpha = 1.0;
}
else if (dialog->animstep < 33)
{
alpha = 1.0 - ((gfloat) (dialog->animstep - 17)) / 15.0;
}
gdk_cairo_set_source_color (cr, &style->text[GTK_STATE_NORMAL]);
gtk_style_context_get_color (style, gtk_style_context_get_state (style),
&color);
gdk_cairo_set_source_rgba (cr, &color);
gtk_widget_get_allocation (widget, &allocation);
pango_layout_get_pixel_size (dialog->layout, &width, &height);
@@ -301,27 +305,14 @@ about_dialog_anim_expose (GtkWidget *widget,
x = (allocation.width - width) / 2;
y = (allocation.height - height) / 2;
if (dialog->textrange[1] > 0)
{
GdkRegion *covered_region;
covered_region = gdk_pango_layout_get_clip_region (dialog->layout,
x, y,
dialog->textrange, 1);
gdk_region_intersect (covered_region, event->region);
gdk_cairo_region (cr, covered_region);
cairo_clip (cr);
gdk_region_destroy (covered_region);
}
cairo_move_to (cr, x, y);
cairo_push_group (cr);
pango_cairo_show_layout (cr, dialog->layout);
cairo_destroy (cr);
cairo_pop_group_to_source (cr);
cairo_paint_with_alpha (cr, alpha);
return FALSE;
}
@@ -349,68 +340,37 @@ insert_spacers (const gchar *string)
return g_string_free (str, FALSE);
}
static inline void
mix_colors (const GdkColor *start,
const GdkColor *end,
GdkColor *target,
gdouble pos)
{
target->red = start->red * (1.0 - pos) + end->red * pos;
target->green = start->green * (1.0 - pos) + end->green * pos;
target->blue = start->blue * (1.0 - pos) + end->blue * pos;
}
static void
decorate_text (GimpAboutDialog *dialog,
gint anim_type,
gdouble time)
{
GtkStyle *style = gtk_widget_get_style (dialog->anim_area);
const gchar *text;
const gchar *ptr;
gint letter_count = 0;
gint text_length = 0;
gint text_bytelen = 0;
gint cluster_start, cluster_end;
gunichar unichr;
PangoAttrList *attrlist = NULL;
PangoAttribute *attr;
PangoRectangle irect = {0, 0, 0, 0};
PangoRectangle lrect = {0, 0, 0, 0};
GdkColor mix;
mix_colors (style->bg + GTK_STATE_NORMAL,
style->fg + GTK_STATE_NORMAL, &mix, time);
text = pango_layout_get_text (dialog->layout);
g_return_if_fail (text != NULL);
text_length = g_utf8_strlen (text, -1);
text_bytelen = strlen (text);
attrlist = pango_attr_list_new ();
dialog->textrange[0] = 0;
dialog->textrange[1] = text_bytelen;
switch (anim_type)
{
case 0: /* Fade in */
attr = pango_attr_foreground_new (mix.red, mix.green, mix.blue);
attr->start_index = 0;
attr->end_index = text_bytelen;
pango_attr_list_insert (attrlist, attr);
break;
case 1: /* Fade in, spread */
attr = pango_attr_foreground_new (mix.red, mix.green, mix.blue);
attr->start_index = 0;
attr->end_index = text_bytelen;
pango_attr_list_change (attrlist, attr);
ptr = text;
cluster_start = 0;
while ((unichr = g_utf8_get_char (ptr)))
{
ptr = g_utf8_next_char (ptr);
@@ -429,11 +389,6 @@ decorate_text (GimpAboutDialog *dialog,
break;
case 2: /* Fade in, sinewave */
attr = pango_attr_foreground_new (mix.red, mix.green, mix.blue);
attr->start_index = 0;
attr->end_index = text_bytelen;
pango_attr_list_change (attrlist, attr);
ptr = text;
cluster_start = 0;
@@ -458,46 +413,6 @@ decorate_text (GimpAboutDialog *dialog,
}
break;
case 3: /* letterwise Fade in */
ptr = text;
letter_count = 0;
cluster_start = 0;
while ((unichr = g_utf8_get_char (ptr)))
{
gint border = (text_length + 15) * time - 15;
gdouble pos;
if (letter_count < border)
pos = 0;
else if (letter_count > border + 15)
pos = 1;
else
pos = ((gdouble) (letter_count - border)) / 15;
mix_colors (style->fg + GTK_STATE_NORMAL,
style->bg + GTK_STATE_NORMAL,
&mix, pos);
ptr = g_utf8_next_char (ptr);
cluster_end = ptr - text;
attr = pango_attr_foreground_new (mix.red, mix.green, mix.blue);
attr->start_index = cluster_start;
attr->end_index = cluster_end;
pango_attr_list_change (attrlist, attr);
if (pos < 1.0)
dialog->textrange[1] = cluster_end;
letter_count++;
cluster_start = cluster_end;
}
break;
default:
g_printerr ("Unknown animation type %d\n", anim_type);
}

View File

@@ -19,7 +19,7 @@
#define __ABOUT_DIALOG_H__
GtkWidget * about_dialog_create (GimpContext *context);
GtkWidget * about_dialog_create (void);
#endif /* __ABOUT_DIALOG_H__ */

View File

@@ -218,7 +218,7 @@ color_profile_dialog_new (ColorProfileDialogType dialog_type,
private->dialog = dialog;
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -106,7 +106,7 @@ color_profile_import_dialog_run (GimpImage *image,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -140,7 +140,7 @@ convert_indexed_dialog_new (GimpImage *image,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -169,7 +169,7 @@ convert_precision_dialog_new (GimpImage *image,
g_free (blurb);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -88,7 +88,7 @@ data_delete_dialog_new (GimpDataFactory *factory,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -195,7 +195,7 @@ dialogs_about_get (GimpDialogFactory *factory,
GimpUIManager *ui_manager,
gint view_size)
{
return about_dialog_create (context);
return about_dialog_create ();
}
GtkWidget *

View File

@@ -211,12 +211,10 @@ GimpContainer *global_recent_docks = NULL;
static GtkWidget * dialogs_restore_dialog (GimpDialogFactory *factory,
GdkScreen *screen,
gint monitor,
GdkMonitor *monitor,
GimpSessionInfo *info);
static GtkWidget * dialogs_restore_window (GimpDialogFactory *factory,
GdkScreen *screen,
gint monitor,
GdkMonitor *monitor,
GimpSessionInfo *info);
@@ -448,7 +446,6 @@ static const GimpDialogFactoryEntry entries[] =
* dialogs_restore_dialog:
* @factory:
* @screen:
* @monitor:
* @info:
*
* Creates a top level widget based on the given session info object
@@ -459,20 +456,23 @@ static const GimpDialogFactoryEntry entries[] =
**/
static GtkWidget *
dialogs_restore_dialog (GimpDialogFactory *factory,
GdkScreen *screen,
gint monitor,
GdkMonitor *monitor,
GimpSessionInfo *info)
{
GtkWidget *dialog;
GimpCoreConfig *config = gimp_dialog_factory_get_context (factory)->gimp->config;
GtkWidget *dialog;
Gimp *gimp = gimp_dialog_factory_get_context (factory)->gimp;
GimpCoreConfig *config = gimp->config;
GimpDisplay *display = GIMP_DISPLAY (gimp_get_empty_display (gimp));
GimpDisplayShell *shell = gimp_display_get_shell (display);
GIMP_LOG (DIALOG_FACTORY, "restoring toplevel \"%s\" (info %p)",
gimp_session_info_get_factory_entry (info)->identifier,
info);
dialog =
gimp_dialog_factory_dialog_new (factory, screen, monitor,
gimp_dialog_factory_dialog_new (factory, monitor,
NULL /*ui_manager*/,
GTK_WIDGET (gimp_display_shell_get_window (shell)),
gimp_session_info_get_factory_entry (info)->identifier,
gimp_session_info_get_factory_entry (info)->view_size,
! GIMP_GUI_CONFIG (config)->hide_docks);
@@ -488,7 +488,6 @@ dialogs_restore_dialog (GimpDialogFactory *factory,
/**
* dialogs_restore_window:
* @factory:
* @screen:
* @monitor:
* @info:
*
@@ -500,8 +499,7 @@ dialogs_restore_dialog (GimpDialogFactory *factory,
**/
static GtkWidget *
dialogs_restore_window (GimpDialogFactory *factory,
GdkScreen *screen,
gint monitor,
GdkMonitor *monitor,
GimpSessionInfo *info)
{
Gimp *gimp = gimp_dialog_factory_get_context (factory)->gimp;

View File

@@ -124,7 +124,7 @@ fade_dialog_new (GimpImage *image,
g_free (title);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -202,8 +202,7 @@ file_open_dialog_open_image (GtkWidget *dialog,
GIMP_PROGRESS (dialog),
file, file, FALSE,
load_proc,
G_OBJECT (gtk_widget_get_screen (dialog)),
gimp_widget_get_monitor (dialog),
G_OBJECT (gimp_widget_get_monitor (dialog)),
&status, &error);
if (! image && status != GIMP_PDB_CANCEL)

View File

@@ -82,7 +82,7 @@ file_open_location_dialog_new (Gimp *gimp)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG(dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG(dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
@@ -208,8 +208,7 @@ file_open_location_response (GtkDialog *dialog,
GIMP_PROGRESS (box),
file, entered_file,
FALSE, NULL,
G_OBJECT (gtk_widget_get_screen (entry)),
gimp_widget_get_monitor (entry),
G_OBJECT (gimp_widget_get_monitor (entry)),
&status, &error);
gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, TRUE);

View File

@@ -716,7 +716,7 @@ file_save_dialog_use_extension (GtkWidget *save_dialog,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -117,7 +117,7 @@ fill_dialog_new (GimpItem *item,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,

View File

@@ -104,7 +104,7 @@ grid_dialog_new (GimpImage *image,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GRID_RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,

View File

@@ -102,7 +102,7 @@ image_merge_layers_dialog_new (GimpImage *image,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -108,7 +108,7 @@ image_new_dialog_new (GimpContext *context)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
@@ -327,7 +327,7 @@ image_new_confirm_dialog (ImageNewDialog *private)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (private->confirm_dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (private->confirm_dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
@@ -368,8 +368,7 @@ image_new_create_image (ImageNewDialog *private)
image = gimp_image_new_from_template (gimp, template,
gimp_get_user_context (gimp));
gimp_create_display (gimp, image, gimp_template_get_unit (template), 1.0,
G_OBJECT (gtk_widget_get_screen (private->dialog)),
gimp_widget_get_monitor (private->dialog));
G_OBJECT (gimp_widget_get_monitor (private->dialog)));
g_object_unref (image);
gtk_widget_destroy (private->dialog);

View File

@@ -212,7 +212,7 @@ image_scale_confirm_dialog (ImageScaleDialog *private)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (widget),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (widget),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -64,7 +64,7 @@ input_devices_dialog_new (Gimp *gimp)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CLOSE,
-1);

View File

@@ -56,8 +56,8 @@ struct _ItemOptionsDialog
gpointer user_data;
GtkWidget *left_vbox;
GtkWidget *left_table;
gint table_row;
GtkWidget *left_grid;
gint grid_row;
GtkWidget *name_entry;
GtkWidget *right_frame;
GtkWidget *right_vbox;
@@ -105,7 +105,7 @@ item_options_dialog_new (GimpImage *image,
GtkWidget *dialog;
GimpViewable *viewable;
GtkWidget *main_hbox;
GtkWidget *table;
GtkWidget *grid;
GtkWidget *button;
g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
@@ -147,7 +147,7 @@ item_options_dialog_new (GimpImage *image,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
@@ -171,11 +171,11 @@ item_options_dialog_new (GimpImage *image,
gtk_box_pack_start (GTK_BOX (main_hbox), private->left_vbox, TRUE, TRUE, 0);
gtk_widget_show (private->left_vbox);
private->left_table = table = gtk_table_new (1, 2, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_box_pack_start (GTK_BOX (private->left_vbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
private->left_grid = grid = gtk_grid_new ();
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_box_pack_start (GTK_BOX (private->left_vbox), grid, FALSE, FALSE, 0);
gtk_widget_show (grid);
/* The name label and entry */
if (name_label)
@@ -189,14 +189,14 @@ item_options_dialog_new (GimpImage *image,
private->name_entry = gtk_entry_new ();
gtk_entry_set_activates_default (GTK_ENTRY (private->name_entry), TRUE);
gtk_entry_set_text (GTK_ENTRY (private->name_entry), item_name);
gimp_table_attach_aligned (GTK_TABLE (table), 0, private->table_row++,
name_label, 0.0, 0.5,
private->name_entry, 1, FALSE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, private->grid_row++,
name_label, 0.0, 0.5,
private->name_entry, 1);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, private->table_row++,
_("Color tag:"), 0.0, 0.5,
hbox, 1, TRUE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, private->grid_row++,
_("Color tag:"), 0.0, 0.5,
hbox, 1);
radio_box = gimp_enum_radio_box_new (GIMP_TYPE_COLOR_TAG,
G_CALLBACK (gimp_radio_button_update),
@@ -230,14 +230,12 @@ item_options_dialog_new (GimpImage *image,
if (gimp_get_color_tag_color (color_tag, &color, FALSE))
{
GtkSettings *settings = gtk_widget_get_settings (dialog);
gint w, h;
gint w, h;
image = gimp_color_area_new (&color, GIMP_COLOR_AREA_FLAT, 0);
gimp_color_area_set_color_config (GIMP_COLOR_AREA (image),
context->gimp->config->color_management);
gtk_icon_size_lookup_for_settings (settings,
GTK_ICON_SIZE_MENU, &w, &h);
gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &w, &h);
gtk_widget_set_size_request (image, w, h);
}
else
@@ -322,8 +320,8 @@ item_options_dialog_get_vbox (GtkWidget *dialog)
}
GtkWidget *
item_options_dialog_get_table (GtkWidget *dialog,
gint *next_row)
item_options_dialog_get_grid (GtkWidget *dialog,
gint *next_row)
{
ItemOptionsDialog *private;
@@ -335,9 +333,9 @@ item_options_dialog_get_table (GtkWidget *dialog,
g_return_val_if_fail (private != NULL, NULL);
*next_row = private->table_row;
*next_row = private->grid_row;
return private->left_table;
return private->left_grid;
}
GtkWidget *
@@ -385,10 +383,10 @@ item_options_dialog_add_widget (GtkWidget *dialog,
g_return_if_fail (private != NULL);
gimp_table_attach_aligned (GTK_TABLE (private->left_table),
0, private->table_row++,
label, 0.0, 0.5,
widget, 1, FALSE);
gimp_grid_attach_aligned (GTK_GRID (private->left_grid),
0, private->grid_row++,
label, 0.0, 0.5,
widget, 1);
}
GtkWidget *

View File

@@ -55,7 +55,7 @@ GtkWidget * item_options_dialog_new (GimpImage *image,
gpointer user_data);
GtkWidget * item_options_dialog_get_vbox (GtkWidget *dialog);
GtkWidget * item_options_dialog_get_table (GtkWidget *dialog,
GtkWidget * item_options_dialog_get_grid (GtkWidget *dialog,
gint *next_row);
GtkWidget * item_options_dialog_get_name_entry (GtkWidget *dialog);
GtkWidget * item_options_dialog_get_lock_position (GtkWidget *dialog);

View File

@@ -112,7 +112,7 @@ layer_add_mask_dialog_new (GimpLayer *layer,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -125,7 +125,7 @@ layer_options_dialog_new (GimpImage *image,
{
LayerOptionsDialog *private;
GtkWidget *dialog;
GtkWidget *table;
GtkWidget *grid;
GtkListStore *space_model;
GtkWidget *combo;
GtkWidget *scale;
@@ -242,7 +242,7 @@ layer_options_dialog_new (GimpImage *image,
G_CALLBACK (gimp_double_adjustment_update),
&private->opacity);
table = item_options_dialog_get_table (dialog, &row);
grid = item_options_dialog_get_grid (dialog, &row);
gimp_image_get_resolution (image, &xres, &yres);
@@ -251,14 +251,12 @@ layer_options_dialog_new (GimpImage *image,
/* The size labels */
label = gtk_label_new (_("Width:"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row + 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
gtk_grid_attach (GTK_GRID (grid), label, 0, row, 1, 1);
gtk_widget_show (label);
label = gtk_label_new (_("Height:"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, row + 1, row + 2,
GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
gtk_grid_attach (GTK_GRID (grid), label, 0, row + 1, 1, 1);
gtk_widget_show (label);
/* The size sizeentry */
@@ -271,17 +269,13 @@ layer_options_dialog_new (GimpImage *image,
private->size_se = gimp_size_entry_new (1, GIMP_UNIT_PIXEL, "%a",
TRUE, TRUE, FALSE, 10,
GIMP_SIZE_ENTRY_UPDATE_SIZE);
gtk_table_set_col_spacing (GTK_TABLE (private->size_se), 1, 4);
gtk_table_set_row_spacing (GTK_TABLE (private->size_se), 0, 2);
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (private->size_se),
GTK_SPIN_BUTTON (spinbutton), NULL);
gtk_table_attach_defaults (GTK_TABLE (private->size_se), spinbutton,
1, 2, 0, 1);
gtk_grid_attach (GTK_GRID (private->size_se), spinbutton, 1, 0, 1, 1);
gtk_widget_show (spinbutton);
gtk_table_attach (GTK_TABLE (table), private->size_se, 1, 2, row, row + 2,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_grid_attach (GTK_GRID (grid), private->size_se, 1, row, 1, 2);
gtk_widget_show (private->size_se);
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (private->size_se),
@@ -315,14 +309,12 @@ layer_options_dialog_new (GimpImage *image,
/* The offset labels */
label = gtk_label_new (_("Offset X:"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row + 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
gtk_grid_attach (GTK_GRID (grid), label, 0, row, 1, 1);
gtk_widget_show (label);
label = gtk_label_new (_("Offset Y:"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, row + 1, row + 2,
GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
gtk_grid_attach (GTK_GRID (grid), label, 0, row + 1, 1, 1);
gtk_widget_show (label);
/* The offset sizeentry */
@@ -335,17 +327,13 @@ layer_options_dialog_new (GimpImage *image,
private->offset_se = gimp_size_entry_new (1, GIMP_UNIT_PIXEL, "%a",
TRUE, TRUE, FALSE, 10,
GIMP_SIZE_ENTRY_UPDATE_SIZE);
gtk_table_set_col_spacing (GTK_TABLE (private->offset_se), 1, 4);
gtk_table_set_row_spacing (GTK_TABLE (private->offset_se), 0, 2);
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (private->offset_se),
GTK_SPIN_BUTTON (spinbutton), NULL);
gtk_table_attach_defaults (GTK_TABLE (private->offset_se), spinbutton,
1, 2, 0, 1);
gtk_grid_attach (GTK_GRID (private->offset_se), spinbutton, 1, 0, 1, 1);
gtk_widget_show (spinbutton);
gtk_table_attach (GTK_TABLE (table), private->offset_se, 1, 2, row, row + 2,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_grid_attach (GTK_GRID (grid), private->offset_se, 1, row, 1, 2);
gtk_widget_show (private->offset_se);
gimp_size_entry_set_unit (GIMP_SIZE_ENTRY (private->offset_se),
@@ -383,18 +371,13 @@ layer_options_dialog_new (GimpImage *image,
row += 2;
/* set the spacings after adding widgets or GtkTable will warn */
gtk_table_set_row_spacing (GTK_TABLE (table), 3, 4);
if (! layer)
gtk_table_set_row_spacing (GTK_TABLE (table), 5, 4);
if (! layer)
{
/* The fill type */
combo = gimp_enum_combo_box_new (GIMP_TYPE_FILL_TYPE);
gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
_("_Fill with:"), 0.0, 0.5,
combo, 1, FALSE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, row++,
_("_Fill with:"), 0.0, 0.5,
combo, 1);
gimp_int_combo_box_connect (GIMP_INT_COMBO_BOX (combo),
private->fill_type,
G_CALLBACK (gimp_int_combo_box_get_active),

View File

@@ -160,7 +160,7 @@ inv_show_status (void)
}
static gboolean
inv_draw (gpointer data)
inv_queue_draw_idle (gpointer data)
{
gtk_widget_queue_draw (data);
@@ -171,7 +171,7 @@ static void
inv_queue_draw (GtkWidget *window)
{
if (inv_draw_idle == 0)
inv_draw_idle = g_idle_add (inv_draw, window);
inv_draw_idle = g_idle_add (inv_queue_draw_idle, window);
}
static void
@@ -190,7 +190,7 @@ inv_draw_explosion (int x, int y)
for (i = 5; i < 100; i += 5) {
cairo_arc (cr, x, y, i, 0, 2 * G_PI);
cairo_fill (cr);
gdk_flush ();
gdk_display_flush (gtk_widget_get_display (geginv_canvas));
g_usleep (50000);
}
@@ -199,7 +199,7 @@ inv_draw_explosion (int x, int y)
for (i = 5; i < 100; i += 5) {
cairo_arc (cr, x, y, i, 0, 2 * G_PI);
cairo_fill (cr);
gdk_flush ();
gdk_display_flush (gtk_widget_get_display (geginv_canvas));
g_usleep (50000);
}
@@ -681,9 +681,8 @@ geginv_destroyed (GtkWidget *w, gpointer data)
}
static gboolean
inv_expose (GtkWidget *widget, GdkEventExpose *event)
inv_draw (GtkWidget *widget, cairo_t *cr)
{
cairo_t *cr;
GdkPixbuf *goat;
GSList *li;
int i, j;
@@ -693,11 +692,6 @@ inv_expose (GtkWidget *widget, GdkEventExpose *event)
return TRUE;
}
if ( ! gtk_widget_is_drawable (geginv_canvas))
return TRUE;
cr = gdk_cairo_create (gtk_widget_get_window (geginv_canvas));
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
cairo_paint (cr);
@@ -755,10 +749,6 @@ inv_expose (GtkWidget *widget, GdkEventExpose *event)
cairo_fill (cr);
}
cairo_destroy (cr);
gdk_flush ();
if (inv_do_pause) {
g_usleep (G_USEC_PER_SEC);
inv_do_pause = FALSE;
@@ -773,6 +763,8 @@ gboolean gimp_lebl_dialog (void);
gboolean
gimp_lebl_dialog (void)
{
GdkMonitor *monitor;
GdkRectangle workarea;
GtkWidget *vbox;
int i, j;
@@ -784,13 +776,16 @@ gimp_lebl_dialog (void)
inv_width = 800;
inv_height = 600;
if (inv_width > gdk_screen_get_width (gdk_screen_get_default ()) * 0.9) {
inv_width = gdk_screen_get_width (gdk_screen_get_default ()) * 0.9;
monitor = gimp_get_monitor_at_pointer ();
gdk_monitor_get_workarea (monitor, &workarea);
if (inv_width > workarea.width * 0.9) {
inv_width = workarea.width * 0.9;
inv_height = inv_width * (600.0/800.0);
}
if (inv_height > gdk_screen_get_height (gdk_screen_get_default ()) * 0.9) {
inv_height = gdk_screen_get_height (gdk_screen_get_default ()) * 0.9;
if (inv_height > workarea.height * 0.9) {
inv_height = workarea.height * 0.9;
inv_width = inv_height * (800.0/600.0);
}
@@ -840,8 +835,8 @@ gimp_lebl_dialog (void)
G_CALLBACK (inv_key_press), NULL);
g_signal_connect (G_OBJECT (geginv), "key_release_event",
G_CALLBACK (inv_key_release), NULL);
g_signal_connect (G_OBJECT (geginv_canvas), "expose_event",
G_CALLBACK (inv_expose), NULL);
g_signal_connect (G_OBJECT (geginv_canvas), "draw",
G_CALLBACK (inv_draw), NULL);
g_slist_foreach (inv_shots, (GFunc)g_free, NULL);
g_slist_free (inv_shots);

View File

@@ -70,7 +70,7 @@ struct _ModuleDialog
GtkListStore *list;
GtkWidget *hint;
GtkWidget *table;
GtkWidget *grid;
GtkWidget *label[N_INFOS];
GtkWidget *error_box;
GtkWidget *error_label;
@@ -101,7 +101,7 @@ static void dialog_info_update (GimpModuleDB *db,
GimpModule *module,
ModuleDialog *private);
static void dialog_info_init (ModuleDialog *private,
GtkWidget *table);
GtkWidget *grid);
/* public functions */
@@ -135,7 +135,7 @@ module_dialog_new (Gimp *gimp)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_CLOSE,
RESPONSE_REFRESH,
-1);
@@ -176,7 +176,8 @@ module_dialog_new (Gimp *gimp)
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE);
g_list_foreach (gimp->module_db->modules, make_list_item, private);
g_list_foreach (gimp_module_db_get_modules (gimp->module_db),
make_list_item, private);
rend = gtk_cell_renderer_toggle_new ();
@@ -199,10 +200,10 @@ module_dialog_new (Gimp *gimp)
gtk_container_add (GTK_CONTAINER (sw), view);
gtk_widget_show (view);
private->table = gtk_table_new (2, N_INFOS, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (private->table), 6);
gtk_box_pack_start (GTK_BOX (vbox), private->table, FALSE, FALSE, 0);
gtk_widget_show (private->table);
private->grid = gtk_grid_new ();
gtk_grid_set_column_spacing (GTK_GRID (private->grid), 6);
gtk_box_pack_start (GTK_BOX (vbox), private->grid, FALSE, FALSE, 0);
gtk_widget_show (private->grid);
private->error_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (vbox), private->error_box, FALSE, FALSE, 0);
@@ -218,7 +219,7 @@ module_dialog_new (Gimp *gimp)
private->error_label, TRUE, TRUE, 0);
gtk_widget_show (private->error_label);
dialog_info_init (private, private->table);
dialog_info_init (private, private->grid);
dialog_info_update (gimp->module_db, private->selected, private);
@@ -492,7 +493,7 @@ dialog_info_update (GimpModuleDB *db,
static void
dialog_info_init (ModuleDialog *private,
GtkWidget *table)
GtkWidget *grid)
{
GtkWidget *label;
gint i;
@@ -510,17 +511,14 @@ dialog_info_init (ModuleDialog *private,
{
label = gtk_label_new (gettext (text[i]));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, i, i + 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 2);
gtk_grid_attach (GTK_GRID (grid), label, 0, i, 1, 1);
gtk_widget_show (label);
private->label[i] = gtk_label_new ("");
gtk_label_set_xalign (GTK_LABEL (private->label[i]), 0.0);
gtk_label_set_ellipsize (GTK_LABEL (private->label[i]),
PANGO_ELLIPSIZE_END);
gtk_table_attach (GTK_TABLE (private->table), private->label[i],
1, 2, i, i + 1,
GTK_EXPAND | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 2);
gtk_grid_attach (GTK_GRID (grid), private->label[i], 1, i, 1, 1);
gtk_widget_show (private->label[i]);
}
}

View File

@@ -139,7 +139,7 @@ offset_dialog_new (GimpDrawable *drawable,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
@@ -178,14 +178,9 @@ offset_dialog_new (GimpDrawable *drawable,
TRUE, TRUE, FALSE, 10,
GIMP_SIZE_ENTRY_UPDATE_SIZE);
gtk_table_set_col_spacing (GTK_TABLE (private->off_se), 0, 4);
gtk_table_set_col_spacing (GTK_TABLE (private->off_se), 1, 4);
gtk_table_set_row_spacing (GTK_TABLE (private->off_se), 0, 2);
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (private->off_se),
GTK_SPIN_BUTTON (spinbutton), NULL);
gtk_table_attach_defaults (GTK_TABLE (private->off_se), spinbutton,
1, 2, 0, 1);
gtk_grid_attach (GTK_GRID (private->off_se), spinbutton, 1, 0, 1, 1);
gtk_widget_show (spinbutton);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (private->off_se),

View File

@@ -138,8 +138,7 @@ palette_import_dialog_new (GimpContext *context)
GtkWidget *main_hbox;
GtkWidget *frame;
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *abox;
GtkWidget *grid;
GtkSizeGroup *size_group;
GSList *group = NULL;
@@ -164,7 +163,7 @@ palette_import_dialog_new (GimpContext *context)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
@@ -202,17 +201,16 @@ palette_import_dialog_new (GimpContext *context)
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
table = gtk_table_new (5, 2, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
grid = gtk_grid_new ();
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_container_add (GTK_CONTAINER (frame), grid);
gtk_widget_show (grid);
private->gradient_radio =
gtk_radio_button_new_with_mnemonic (group, _("_Gradient"));
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (private->gradient_radio));
gtk_table_attach (GTK_TABLE (table), private->gradient_radio,
0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
gtk_grid_attach (GTK_GRID (grid), private->gradient_radio, 0, 0, 1, 1);
gtk_widget_show (private->gradient_radio);
g_signal_connect (private->gradient_radio, "toggled",
@@ -222,8 +220,7 @@ palette_import_dialog_new (GimpContext *context)
private->image_radio =
gtk_radio_button_new_with_mnemonic (group, _("I_mage"));
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (private->image_radio));
gtk_table_attach (GTK_TABLE (table), private->image_radio,
0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
gtk_grid_attach (GTK_GRID (grid), private->image_radio, 0, 1, 1, 1);
gtk_widget_show (private->image_radio);
g_signal_connect (private->image_radio, "toggled",
@@ -237,8 +234,7 @@ palette_import_dialog_new (GimpContext *context)
gtk_check_button_new_with_mnemonic (_("Sample _Merged"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (private->sample_merged_toggle),
TRUE);
gtk_table_attach (GTK_TABLE (table), private->sample_merged_toggle,
1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0);
gtk_grid_attach (GTK_GRID (grid), private->sample_merged_toggle, 1, 2, 1, 1);
gtk_widget_show (private->sample_merged_toggle);
g_signal_connect_swapped (private->sample_merged_toggle, "toggled",
@@ -249,8 +245,7 @@ palette_import_dialog_new (GimpContext *context)
gtk_check_button_new_with_mnemonic (_("_Selected Pixels only"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (private->selection_only_toggle),
FALSE);
gtk_table_attach (GTK_TABLE (table), private->selection_only_toggle,
1, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0);
gtk_grid_attach (GTK_GRID (grid), private->selection_only_toggle, 1, 3, 1, 1);
gtk_widget_show (private->selection_only_toggle);
g_signal_connect_swapped (private->selection_only_toggle, "toggled",
@@ -260,8 +255,7 @@ palette_import_dialog_new (GimpContext *context)
private->file_radio =
gtk_radio_button_new_with_mnemonic (group, _("Palette _file"));
group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (private->image_radio));
gtk_table_attach (GTK_TABLE (table), private->file_radio,
0, 1, 4, 5, GTK_FILL, GTK_FILL, 0, 0);
gtk_grid_attach (GTK_GRID (grid), private->file_radio, 0, 4, 1, 1);
gtk_widget_show (private->file_radio);
g_signal_connect (private->file_radio, "toggled",
@@ -274,23 +268,23 @@ palette_import_dialog_new (GimpContext *context)
private->gradient_combo =
gimp_container_combo_box_new (gimp_data_factory_get_container (context->gimp->gradient_factory),
private->context, 24, 1);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
NULL, 0.0, 0.5, private->gradient_combo, 1, FALSE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
NULL, 0.0, 0.5, private->gradient_combo, 1);
gtk_size_group_add_widget (size_group, private->gradient_combo);
/* The image menu */
private->image_combo =
gimp_container_combo_box_new (context->gimp->images, private->context,
24, 1);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
NULL, 0.0, 0.5, private->image_combo, 1, FALSE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
NULL, 0.0, 0.5, private->image_combo, 1);
gtk_size_group_add_widget (size_group, private->image_combo);
/* Palette file name entry */
private->file_chooser = gtk_file_chooser_button_new (_("Select Palette File"),
GTK_FILE_CHOOSER_ACTION_OPEN);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 4,
NULL, 0.0, 0.5, private->file_chooser, 1, FALSE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 4,
NULL, 0.0, 0.5, private->file_chooser, 1);
gtk_size_group_add_widget (size_group, private->file_chooser);
g_object_unref (size_group);
@@ -302,29 +296,28 @@ palette_import_dialog_new (GimpContext *context)
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
table = gtk_table_new (4, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
grid = gtk_grid_new ();
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_container_add (GTK_CONTAINER (frame), grid);
gtk_widget_show (grid);
/* The source's name */
private->entry = gtk_entry_new ();
gtk_entry_set_text (GTK_ENTRY (private->entry),
gradient ?
gimp_object_get_name (gradient) : _("New import"));
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Palette _name:"), 0.0, 0.5,
private->entry, 2, FALSE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
_("Palette _name:"), 0.0, 0.5,
private->entry, 2);
/* The # of colors */
private->num_colors =
GTK_ADJUSTMENT (gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
_("N_umber of colors:"), -1, 5,
256, 2, 10000, 1, 10, 0,
TRUE, 0.0, 0.0,
NULL, NULL));
gimp_scale_entry_set_logarithmic (GTK_OBJECT (private->num_colors), TRUE);
private->num_colors = gimp_scale_entry_new (GTK_GRID (grid), 0, 1,
_("N_umber of colors:"), -1, 5,
256, 2, 10000, 1, 10, 0,
TRUE, 0.0, 0.0,
NULL, NULL);
gimp_scale_entry_set_logarithmic (private->num_colors, TRUE);
g_signal_connect_swapped (private->num_colors,
"value-changed",
@@ -332,24 +325,22 @@ palette_import_dialog_new (GimpContext *context)
private);
/* The columns */
private->columns =
GTK_ADJUSTMENT (gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
_("C_olumns:"), -1, 5,
16, 0, 64, 1, 8, 0,
TRUE, 0.0, 0.0,
NULL, NULL));
private->columns = gimp_scale_entry_new (GTK_GRID (grid), 0, 2,
_("C_olumns:"), -1, 5,
16, 0, 64, 1, 8, 0,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect (private->columns, "value-changed",
G_CALLBACK (palette_import_columns_changed),
private);
/* The interval */
private->threshold =
GTK_ADJUSTMENT (gimp_scale_entry_new (GTK_TABLE (table), 0, 3,
_("I_nterval:"), -1, 5,
1, 1, 128, 1, 8, 0,
TRUE, 0.0, 0.0,
NULL, NULL));
private->threshold = gimp_scale_entry_new (GTK_GRID (grid), 0, 3,
_("I_nterval:"), -1, 5,
1, 1, 128, 1, 8, 0,
TRUE, 0.0, 0.0,
NULL, NULL);
g_signal_connect_swapped (private->threshold, "value-changed",
G_CALLBACK (palette_import_make_palette),
@@ -365,16 +356,13 @@ palette_import_dialog_new (GimpContext *context)
gtk_container_add (GTK_CONTAINER (frame), vbox);
gtk_widget_show (vbox);
abox = gtk_alignment_new (0.0, 0.0, 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (vbox), abox, FALSE, FALSE, 0);
gtk_widget_show (abox);
private->preview = gimp_view_new_full_by_types (private->context,
GIMP_TYPE_VIEW,
GIMP_TYPE_PALETTE,
192, 192, 1,
TRUE, FALSE, FALSE);
gtk_container_add (GTK_CONTAINER (abox), private->preview);
gtk_widget_set_halign (private->preview, 0.0);
gtk_box_pack_start (GTK_BOX (vbox), private->preview, FALSE, FALSE, 0);
gtk_widget_show (private->preview);
private->no_colors_label =
@@ -528,10 +516,8 @@ palette_import_image_changed (GimpContext *context,
gtk_widget_set_sensitive (private->sample_merged_toggle, sensitive);
gtk_widget_set_sensitive (private->selection_only_toggle, sensitive);
gimp_scale_entry_set_sensitive (GTK_OBJECT (private->threshold),
sensitive);
gimp_scale_entry_set_sensitive (GTK_OBJECT (private->num_colors),
sensitive);
gimp_scale_entry_set_sensitive (private->threshold, sensitive);
gimp_scale_entry_set_sensitive (private->num_colors, sensitive);
}
if (private->image)
@@ -641,9 +627,9 @@ palette_import_set_sensitive (ImportDialog *private)
gtk_widget_set_sensitive (private->selection_only_toggle, image);
gtk_widget_set_sensitive (private->file_chooser, file);
gimp_scale_entry_set_sensitive (GTK_OBJECT (private->num_colors), ! file);
gimp_scale_entry_set_sensitive (GTK_OBJECT (private->columns), ! file);
gimp_scale_entry_set_sensitive (GTK_OBJECT (private->threshold), image);
gimp_scale_entry_set_sensitive (private->num_colors, ! file);
gimp_scale_entry_set_sensitive (private->columns, ! file);
gimp_scale_entry_set_sensitive (private->threshold, image);
}
static void

View File

@@ -57,24 +57,23 @@ prefs_frame_new (const gchar *label,
}
GtkWidget *
prefs_table_new (gint rows,
GtkContainer *parent)
prefs_grid_new (GtkContainer *parent)
{
GtkWidget *table;
GtkWidget *grid;
table = gtk_table_new (rows, 2, FALSE);
grid = gtk_grid_new ();
gtk_table_set_row_spacings (GTK_TABLE (table), 6);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
if (GTK_IS_BOX (parent))
gtk_box_pack_start (GTK_BOX (parent), table, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (parent), grid, FALSE, FALSE, 0);
else
gtk_container_add (parent, table);
gtk_container_add (parent, grid);
gtk_widget_show (table);
gtk_widget_show (grid);
return table;
return grid;
}
GtkWidget *
@@ -160,7 +159,12 @@ prefs_check_button_add_with_icon (GObject *config,
gtk_widget_show (hbox);
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
gtk_misc_set_padding (GTK_MISC (image), 2, 2);
g_object_set (image,
"margin-start", 2,
"margin-end", 2,
"margin-top", 2,
"margin-bottom", 2,
NULL);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
gtk_widget_show (image);
@@ -176,17 +180,20 @@ prefs_check_button_add_with_icon (GObject *config,
GtkWidget *
prefs_widget_add_aligned (GtkWidget *widget,
const gchar *text,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
gboolean left_align,
GtkSizeGroup *group)
{
GtkWidget *label = gimp_table_attach_aligned (table, 0, table_row,
text, 0.0, 0.5,
widget, 1, left_align);
GtkWidget *label = gimp_grid_attach_aligned (grid, 0, grid_top,
text, 0.0, 0.5,
widget, 1);
if (group)
gtk_size_group_add_widget (group, label);
if (left_align == TRUE)
gtk_widget_set_halign (widget, GTK_ALIGN_START);
return label;
}
@@ -195,8 +202,8 @@ prefs_color_button_add (GObject *config,
const gchar *property_name,
const gchar *label,
const gchar *title,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group,
GimpContext *context)
{
@@ -222,7 +229,7 @@ prefs_color_button_add (GObject *config,
if (context)
gimp_color_panel_set_context (GIMP_COLOR_PANEL (button), context);
prefs_widget_add_aligned (button, label, table, table_row, TRUE, group);
prefs_widget_add_aligned (button, label, grid, grid_top, TRUE, group);
}
return button;
@@ -232,14 +239,14 @@ GtkWidget *
prefs_entry_add (GObject *config,
const gchar *property_name,
const gchar *label,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group)
{
GtkWidget *entry = gimp_prop_entry_new (config, property_name, -1);
if (entry)
prefs_widget_add_aligned (entry, label, table, table_row, FALSE, group);
prefs_widget_add_aligned (entry, label, grid, grid_top, FALSE, group);
return entry;
}
@@ -251,8 +258,8 @@ prefs_spin_button_add (GObject *config,
gdouble page_increment,
gint digits,
const gchar *label,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group)
{
GtkWidget *button = gimp_prop_spin_button_new (config, property_name,
@@ -261,7 +268,7 @@ prefs_spin_button_add (GObject *config,
digits);
if (button)
prefs_widget_add_aligned (button, label, table, table_row, TRUE, group);
prefs_widget_add_aligned (button, label, grid, grid_top, TRUE, group);
return button;
}
@@ -270,14 +277,14 @@ GtkWidget *
prefs_memsize_entry_add (GObject *config,
const gchar *property_name,
const gchar *label,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group)
{
GtkWidget *entry = gimp_prop_memsize_entry_new (config, property_name);
if (entry)
prefs_widget_add_aligned (entry, label, table, table_row, TRUE, group);
prefs_widget_add_aligned (entry, label, grid, grid_top, TRUE, group);
return entry;
}
@@ -287,8 +294,8 @@ prefs_file_chooser_button_add (GObject *config,
const gchar *property_name,
const gchar *label,
const gchar *dialog_title,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group)
{
GtkWidget *button;
@@ -298,7 +305,7 @@ prefs_file_chooser_button_add (GObject *config,
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
if (button)
prefs_widget_add_aligned (button, label, table, table_row, FALSE, group);
prefs_widget_add_aligned (button, label, grid, grid_top, FALSE, group);
return button;
}
@@ -309,15 +316,15 @@ prefs_enum_combo_box_add (GObject *config,
gint minimum,
gint maximum,
const gchar *label,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group)
{
GtkWidget *combo = gimp_prop_enum_combo_box_new (config, property_name,
minimum, maximum);
if (combo)
prefs_widget_add_aligned (combo, label, table, table_row, FALSE, group);
prefs_widget_add_aligned (combo, label, grid, grid_top, FALSE, group);
return combo;
}
@@ -328,15 +335,15 @@ prefs_boolean_combo_box_add (GObject *config,
const gchar *true_text,
const gchar *false_text,
const gchar *label,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group)
{
GtkWidget *combo = gimp_prop_boolean_combo_box_new (config, property_name,
true_text, false_text);
if (combo)
prefs_widget_add_aligned (combo, label, table, table_row, FALSE, group);
prefs_widget_add_aligned (combo, label, grid, grid_top, FALSE, group);
return combo;
}
@@ -365,8 +372,8 @@ prefs_profile_combo_box_add (GObject *config,
GtkListStore *profile_store,
const gchar *dialog_title,
const gchar *label,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group,
GObject *profile_path_config,
const gchar *profile_path_property_name)
@@ -379,7 +386,7 @@ prefs_profile_combo_box_add (GObject *config,
profile_path_property_name);
if (combo)
prefs_widget_add_aligned (combo, label, table, table_row, FALSE, group);
prefs_widget_add_aligned (combo, label, grid, grid_top, FALSE, group);
return combo;
}

View File

@@ -26,8 +26,7 @@
GtkWidget * prefs_frame_new (const gchar *label,
GtkContainer *parent,
gboolean expand);
GtkWidget * prefs_table_new (gint rows,
GtkContainer *parent);
GtkWidget * prefs_grid_new (GtkContainer *parent);
GtkWidget * prefs_hint_box_new (const gchar *icon_name,
const gchar *text);
@@ -48,8 +47,8 @@ GtkWidget * prefs_check_button_add_with_icon (GObject *config,
GtkWidget * prefs_widget_add_aligned (GtkWidget *widget,
const gchar *text,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
gboolean left_align,
GtkSizeGroup *group);
@@ -57,16 +56,16 @@ GtkWidget * prefs_color_button_add (GObject *config,
const gchar *property_name,
const gchar *label,
const gchar *title,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group,
GimpContext *context);
GtkWidget * prefs_entry_add (GObject *config,
const gchar *property_name,
const gchar *label,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group);
GtkWidget * prefs_spin_button_add (GObject *config,
const gchar *property_name,
@@ -74,22 +73,22 @@ GtkWidget * prefs_spin_button_add (GObject *config,
gdouble page_increment,
gint digits,
const gchar *label,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group);
GtkWidget * prefs_memsize_entry_add (GObject *config,
const gchar *property_name,
const gchar *label,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group);
GtkWidget * prefs_file_chooser_button_add (GObject *config,
const gchar *property_name,
const gchar *label,
const gchar *dialog_title,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group);
GtkWidget * prefs_enum_combo_box_add (GObject *config,
@@ -97,16 +96,16 @@ GtkWidget * prefs_enum_combo_box_add (GObject *config,
gint minimum,
gint maximum,
const gchar *label,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group);
GtkWidget * prefs_boolean_combo_box_add (GObject *config,
const gchar *property_name,
const gchar *true_text,
const gchar *false_text,
const gchar *label,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group);
#ifdef HAVE_ISO_CODES
GtkWidget * prefs_language_combo_box_add (GObject *config,
@@ -118,8 +117,8 @@ GtkWidget * prefs_profile_combo_box_add (GObject *config,
GtkListStore *profile_store,
const gchar *dialog_title,
const gchar *label,
GtkTable *table,
gint table_row,
GtkGrid *grid,
gint grid_top,
GtkSizeGroup *group,
GObject *profile_path_config,
const gchar *profile_path_property_name);

View File

@@ -289,7 +289,7 @@ prefs_response (GtkWidget *widget,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (confirm),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (confirm),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
@@ -528,8 +528,7 @@ prefs_resolution_source_callback (GtkWidget *widget,
if (from_gdk)
{
gimp_get_monitor_resolution (gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
gimp_get_monitor_resolution (gimp_widget_get_monitor (widget),
&xres, &yres);
}
else
@@ -571,8 +570,8 @@ prefs_input_devices_dialog (GtkWidget *widget,
Gimp *gimp)
{
gimp_dialog_factory_dialog_raise (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
widget,
"gimp-input-devices-dialog", 0);
}
@@ -581,8 +580,8 @@ prefs_keyboard_shortcuts_dialog (GtkWidget *widget,
Gimp *gimp)
{
gimp_dialog_factory_dialog_raise (gimp_dialog_factory_get_singleton (),
gtk_widget_get_screen (widget),
gimp_widget_get_monitor (widget),
widget,
"gimp-keyboard-shortcuts-dialog", 0);
}
@@ -639,7 +638,7 @@ prefs_menus_remove_callback (GtkWidget *widget,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
@@ -915,7 +914,7 @@ prefs_display_options_frame_add (Gimp *gimp,
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *checks_vbox;
GtkWidget *table;
GtkWidget *grid;
GtkWidget *combo;
GtkWidget *button;
@@ -961,17 +960,17 @@ prefs_display_options_frame_add (Gimp *gimp,
_("Show gri_d"),
GTK_BOX (checks_vbox));
table = prefs_table_new (2, GTK_CONTAINER (vbox));
grid = prefs_grid_new (GTK_CONTAINER (vbox));
combo = prefs_enum_combo_box_add (object, "padding-mode", 0, 0,
_("Canvas _padding mode:"),
GTK_TABLE (table), 0,
GTK_GRID (grid), 0,
NULL);
button = prefs_color_button_add (object, "padding-color",
_("Custom p_adding color:"),
_("Select Custom Canvas Padding Color"),
GTK_TABLE (table), 1, NULL,
GTK_GRID (grid), 1, NULL,
gimp_get_user_context (gimp));
g_signal_connect (button, "color-changed",
@@ -1066,7 +1065,7 @@ prefs_dialog_new (Gimp *gimp,
GtkWidget *vbox3;
GtkWidget *button;
GtkWidget *button2;
GtkWidget *table;
GtkWidget *grid;
GtkWidget *label;
GtkWidget *entry;
GtkWidget *calibrate_button;
@@ -1097,7 +1096,7 @@ prefs_dialog_new (Gimp *gimp,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
@@ -1133,29 +1132,25 @@ prefs_dialog_new (Gimp *gimp,
vbox2 = prefs_frame_new (_("Resource Consumption"),
GTK_CONTAINER (vbox), FALSE);
#ifdef ENABLE_MP
table = prefs_table_new (5, GTK_CONTAINER (vbox2));
#else
table = prefs_table_new (4, GTK_CONTAINER (vbox2));
#endif /* ENABLE_MP */
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_spin_button_add (object, "undo-levels", 1.0, 5.0, 0,
_("Minimal number of _undo levels:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_memsize_entry_add (object, "undo-size",
_("Maximum undo _memory:"),
GTK_TABLE (table), 1, size_group);
GTK_GRID (grid), 1, size_group);
prefs_memsize_entry_add (object, "tile-cache-size",
_("Tile cache _size:"),
GTK_TABLE (table), 2, size_group);
GTK_GRID (grid), 2, size_group);
prefs_memsize_entry_add (object, "max-new-image-size",
_("Maximum _new image size:"),
GTK_TABLE (table), 3, size_group);
GTK_GRID (grid), 3, size_group);
#ifdef ENABLE_MP
prefs_spin_button_add (object, "num-processors", 1.0, 4.0, 0,
_("Number of _threads to use:"),
GTK_TABLE (table), 4, size_group);
GTK_GRID (grid), 4, size_group);
#endif /* ENABLE_MP */
/* Hardware Acceleration */
@@ -1169,15 +1164,15 @@ prefs_dialog_new (Gimp *gimp,
/* Image Thumbnails */
vbox2 = prefs_frame_new (_("Image Thumbnails"), GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "thumbnail-size", 0, 0,
_("Size of _thumbnails:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_memsize_entry_add (object, "thumbnail-filesize-limit",
_("Maximum _filesize for thumbnailing:"),
GTK_TABLE (table), 1, size_group);
GTK_GRID (grid), 1, size_group);
g_object_unref (size_group);
size_group = NULL;
@@ -1222,11 +1217,11 @@ prefs_dialog_new (Gimp *gimp,
GTK_CONTAINER (vbox), FALSE);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
button = prefs_enum_combo_box_add (object, "debug-policy", 0, 0,
_("Debug _policy:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
/* Check existence of gdb or lldb to activate the preference, as a
* good hint of its prerequisite, unless backtrace() API exists, in
@@ -1284,17 +1279,17 @@ prefs_dialog_new (Gimp *gimp,
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
table = prefs_table_new (1, GTK_CONTAINER (vbox));
grid = prefs_grid_new (GTK_CONTAINER (vbox));
prefs_enum_combo_box_add (color_config, "mode", 0, 0,
_("Image display _mode:"),
GTK_TABLE (table), row++, NULL);
GTK_GRID (grid), row++, NULL);
/* Color Managed Display */
vbox2 = prefs_frame_new (_("Color Managed Display"), GTK_CONTAINER (vbox),
FALSE);
table = prefs_table_new (4, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
row = 0;
prefs_profile_combo_box_add (color_config,
@@ -1302,28 +1297,26 @@ prefs_dialog_new (Gimp *gimp,
store,
_("Select Monitor Color Profile"),
_("_Monitor profile:"),
GTK_TABLE (table), row++, size_group,
GTK_GRID (grid), row++, size_group,
object, "color-profile-path");
button = gimp_prop_check_button_new (color_config,
"display-profile-from-gdk",
_("_Try to use the system monitor "
"profile"));
gtk_table_attach_defaults (GTK_TABLE (table),
button, 1, 2, row, row + 1);
gtk_grid_attach (GTK_GRID (grid), button, 1, row, 1, 1);
gtk_widget_show (button);
row++;
prefs_enum_combo_box_add (color_config,
"display-rendering-intent", 0, 0,
_("_Rendering intent:"),
GTK_TABLE (table), row++, size_group);
GTK_GRID (grid), row++, size_group);
button = gimp_prop_check_button_new (color_config,
"display-use-black-point-compensation",
_("Use _black point compensation"));
gtk_table_attach_defaults (GTK_TABLE (table),
button, 1, 2, row, row + 1);
gtk_grid_attach (GTK_GRID (grid), button, 1, row, 1, 1);
gtk_widget_show (button);
row++;
@@ -1332,14 +1325,14 @@ prefs_dialog_new (Gimp *gimp,
_("Speed"),
_("Precision / Color Fidelity"),
_("_Optimize image display for:"),
GTK_TABLE (table), row++, size_group);
GTK_GRID (grid), row++, size_group);
/* Print Simulation (Soft-proofing) */
vbox2 = prefs_frame_new (_("Soft-Proofing"),
GTK_CONTAINER (vbox),
FALSE);
table = prefs_table_new (4, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
row = 0;
prefs_profile_combo_box_add (color_config,
@@ -1347,19 +1340,18 @@ prefs_dialog_new (Gimp *gimp,
store,
_("Select Soft-Proofing Color Profile"),
_("_Soft-proofing profile:"),
GTK_TABLE (table), row++, size_group,
GTK_GRID (grid), row++, size_group,
object, "color-profile-path");
prefs_enum_combo_box_add (color_config,
"simulation-rendering-intent", 0, 0,
_("Re_ndering intent:"),
GTK_TABLE (table), row++, size_group);
GTK_GRID (grid), row++, size_group);
button = gimp_prop_check_button_new (color_config,
"simulation-use-black-point-compensation",
_("Use black _point compensation"));
gtk_table_attach_defaults (GTK_TABLE (table),
button, 1, 2, row, row + 1);
gtk_grid_attach (GTK_GRID (grid), button, 1, row, 1, 1);
gtk_widget_show (button);
row++;
@@ -1368,10 +1360,10 @@ prefs_dialog_new (Gimp *gimp,
_("Speed"),
_("Precision / Color Fidelity"),
_("O_ptimize soft-proofing for:"),
GTK_TABLE (table), row++, size_group);
GTK_GRID (grid), row++, size_group);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, row, row + 1);
gtk_grid_attach (GTK_GRID (grid), hbox, 1, row, 1, 1);
gtk_widget_show (hbox);
row++;
@@ -1395,7 +1387,7 @@ prefs_dialog_new (Gimp *gimp,
vbox2 = prefs_frame_new (_("Preferred Profiles"), GTK_CONTAINER (vbox),
FALSE);
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
row = 0;
prefs_profile_combo_box_add (color_config,
@@ -1403,7 +1395,7 @@ prefs_dialog_new (Gimp *gimp,
store,
_("Select Preferred RGB Color Profile"),
_("_RGB profile:"),
GTK_TABLE (table), row++, size_group,
GTK_GRID (grid), row++, size_group,
object, "color-profile-path");
prefs_profile_combo_box_add (color_config,
@@ -1411,7 +1403,7 @@ prefs_dialog_new (Gimp *gimp,
store,
_("Select Preferred Grayscale Color Profile"),
_("_Grayscale profile:"),
GTK_TABLE (table), row++, size_group,
GTK_GRID (grid), row++, size_group,
object, "color-profile-path");
prefs_profile_combo_box_add (color_config,
@@ -1419,17 +1411,17 @@ prefs_dialog_new (Gimp *gimp,
store,
_("Select CMYK Color Profile"),
_("_CMYK profile:"),
GTK_TABLE (table), row++, size_group,
GTK_GRID (grid), row++, size_group,
object, "color-profile-path");
/* Policies */
vbox2 = prefs_frame_new (_("Policies"), GTK_CONTAINER (vbox),
FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
button = prefs_enum_combo_box_add (object, "color-profile-policy", 0, 0,
_("File Open behaviour:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
/* Filter Dialogs */
vbox2 = prefs_frame_new (_("Filter Dialogs"), GTK_CONTAINER (vbox),
@@ -1475,10 +1467,10 @@ prefs_dialog_new (Gimp *gimp,
_("Add an alpha channel to imported images"),
GTK_BOX (vbox2));
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
button = prefs_enum_combo_box_add (object, "color-profile-policy", 0, 0,
_("Color profile policy:"),
GTK_TABLE (table), 0, NULL);
GTK_GRID (grid), 0, NULL);
/* Export Policies */
vbox2 = prefs_frame_new (_("Export Policies"),
@@ -1600,11 +1592,11 @@ prefs_dialog_new (Gimp *gimp,
/* Scaling */
vbox2 = prefs_frame_new (_("Scaling"), GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "interpolation-type", 0, 0,
_("Default _interpolation:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
g_object_unref (size_group);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
@@ -1652,7 +1644,7 @@ prefs_dialog_new (Gimp *gimp,
gimp_prefs_box_set_page_scrollable (GIMP_PREFS_BOX (prefs_box), vbox, TRUE);
table = prefs_table_new (1, GTK_CONTAINER (vbox));
grid = prefs_grid_new (GTK_CONTAINER (vbox));
{
GtkWidget *combo;
@@ -1660,9 +1652,9 @@ prefs_dialog_new (Gimp *gimp,
combo = gimp_container_combo_box_new (gimp->templates,
gimp_get_user_context (gimp),
16, 0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
_("_Template:"), 0.0, 0.5,
combo, 1, FALSE);
combo, 1);
gimp_container_view_select_item (GIMP_CONTAINER_VIEW (combo), NULL);
@@ -1672,18 +1664,19 @@ prefs_dialog_new (Gimp *gimp,
}
editor = gimp_template_editor_new (core_config->default_image, gimp, FALSE);
gtk_widget_set_vexpand (editor, FALSE);
gimp_template_editor_show_advanced (GIMP_TEMPLATE_EDITOR (editor), TRUE);
gtk_box_pack_start (GTK_BOX (vbox), editor, FALSE, FALSE, 0);
gtk_widget_show (editor);
/* Quick Mask Color */
vbox2 = prefs_frame_new (_("Quick Mask"), GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_color_button_add (object, "quick-mask-color",
_("Quick Mask color:"),
_("Set the default Quick Mask color"),
GTK_TABLE (table), 0, NULL,
GTK_GRID (grid), 0, NULL,
gimp_get_user_context (gimp));
@@ -1734,17 +1727,17 @@ prefs_dialog_new (Gimp *gimp,
_("_Enable layer & channel previews"),
GTK_BOX (vbox2));
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "layer-preview-size", 0, 0,
_("_Default layer & channel preview size:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_enum_combo_box_add (object, "undo-preview-size", 0, 0,
_("_Undo preview size:"),
GTK_TABLE (table), 1, size_group);
GTK_GRID (grid), 1, size_group);
prefs_enum_combo_box_add (object, "navigation-preview-size", 0, 0,
_("Na_vigation preview size:"),
GTK_TABLE (table), 2, size_group);
GTK_GRID (grid), 2, size_group);
/* Keyboard Shortcuts */
vbox2 = prefs_frame_new (_("Keyboard Shortcuts"),
@@ -1877,6 +1870,10 @@ prefs_dialog_new (Gimp *gimp,
gimp);
}
prefs_check_button_add (object, "prefer-dark-theme",
_("Use dark theme variant if available"),
GTK_BOX (vbox2));
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
@@ -2084,30 +2081,30 @@ prefs_dialog_new (Gimp *gimp,
/* Color profile import dialog */
vbox2 = prefs_frame_new (_("Color Profile Import Dialog"), GTK_CONTAINER (vbox),
FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
button = prefs_enum_combo_box_add (object, "color-profile-policy", 0, 0,
_("Color profile policy:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
/* All color profile chooser dialogs */
vbox2 = prefs_frame_new (_("Color Profile File Dialogs"), GTK_CONTAINER (vbox),
FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_file_chooser_button_add (object, "color-profile-path",
_("Profile folder:"),
_("Select Default Folder for Color Profiles"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
/* Convert to Color Profile Dialog */
vbox2 = prefs_frame_new (_("Convert to Color Profile Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "image-convert-profile-intent", 0, 0,
_("Rendering intent:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_check_button_add (object, "image-convert-profile-black-point-compensation",
_("Black point compensation"),
@@ -2116,45 +2113,45 @@ prefs_dialog_new (Gimp *gimp,
/* Convert Precision Dialog */
vbox2 = prefs_frame_new (_("Precision Conversion Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object,
"image-convert-precision-layer-dither-method",
0, 0,
_("Dither layers:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_enum_combo_box_add (object,
"image-convert-precision-text-layer-dither-method",
0, 0,
_("Dither text layers:"),
GTK_TABLE (table), 1, size_group);
GTK_GRID (grid), 1, size_group);
prefs_enum_combo_box_add (object,
"image-convert-precision-channel-dither-method",
0, 0,
_("Dither channels/masks:"),
GTK_TABLE (table), 2, size_group);
GTK_GRID (grid), 2, size_group);
/* Convert Indexed Dialog */
vbox2 = prefs_frame_new (_("Indexed Conversion Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "image-convert-indexed-palette-type", 0, 0,
_("Colormap:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_spin_button_add (object, "image-convert-indexed-max-colors", 1.0, 8.0, 0,
_("Maximum number of colors:"),
GTK_TABLE (table), 1, size_group);
GTK_GRID (grid), 1, size_group);
prefs_check_button_add (object, "image-convert-indexed-remove-duplicates",
_("Remove unused and duplicate colors "
"from colormap"),
GTK_BOX (vbox2));
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "image-convert-indexed-dither-type", 0, 0,
_("Color dithering:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_check_button_add (object, "image-convert-indexed-dither-alpha",
_("Enable dithering of transparency"),
@@ -2166,11 +2163,11 @@ prefs_dialog_new (Gimp *gimp,
/* Filter Dialogs */
vbox2 = prefs_frame_new (_("Filter Dialogs"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_spin_button_add (object, "filter-tool-max-recent", 1.0, 8.0, 0,
_("Keep recent settings:"),
GTK_TABLE (table), 1, size_group);
GTK_GRID (grid), 1, size_group);
button = prefs_check_button_add (object, "filter-tool-use-last-settings",
_("Default to the last used settings"),
@@ -2182,14 +2179,14 @@ prefs_dialog_new (Gimp *gimp,
/* Canvas Size Dialog */
vbox2 = prefs_frame_new (_("Canvas Size Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "image-resize-fill-type", 0, 0,
_("Fill with:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_enum_combo_box_add (object, "image-resize-layer-set", 0, 0,
_("Resize layers:"),
GTK_TABLE (table), 1, size_group);
GTK_GRID (grid), 1, size_group);
prefs_check_button_add (object, "image-resize-resize-text-layers",
_("Resize text layers"),
@@ -2198,33 +2195,33 @@ prefs_dialog_new (Gimp *gimp,
/* New Layer Dialog */
vbox2 = prefs_frame_new (_("New Layer Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_entry_add (object, "layer-new-name",
_("Layer name:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_enum_combo_box_add (object, "layer-new-fill-type", 0, 0,
_("Fill type:"),
GTK_TABLE (table), 1, size_group);
GTK_GRID (grid), 1, size_group);
/* Layer Boundary Size Dialog */
vbox2 = prefs_frame_new (_("Layer Boundary Size Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "layer-resize-fill-type", 0, 0,
_("Fill with:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
/* Add Layer Mask Dialog */
vbox2 = prefs_frame_new (_("Add Layer Mask Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "layer-add-mask-type", 0, 0,
_("Layer mask type:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_check_button_add (object, "layer-add-mask-invert",
_("Invert mask"),
@@ -2233,13 +2230,13 @@ prefs_dialog_new (Gimp *gimp,
/* Merge Layers Dialog */
vbox2 = prefs_frame_new (_("Merge Layers Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "layer-merge-type",
GIMP_EXPAND_AS_NECESSARY,
GIMP_CLIP_TO_BOTTOM_LAYER,
_("Merged layer size:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_check_button_add (object, "layer-merge-active-group-only",
_("Merge within active group only"),
@@ -2251,36 +2248,36 @@ prefs_dialog_new (Gimp *gimp,
/* New Channel Dialog */
vbox2 = prefs_frame_new (_("New Channel Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_entry_add (object, "channel-new-name",
_("Channel name:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_color_button_add (object, "channel-new-color",
_("Color and opacity:"),
_("Default New Channel Color and Opacity"),
GTK_TABLE (table), 1, size_group,
GTK_GRID (grid), 1, size_group,
gimp_get_user_context (gimp));
/* New Path Dialog */
vbox2 = prefs_frame_new (_("New Path Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_entry_add (object, "path-new-name",
_("Path name:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
/* Export Path Dialog */
vbox2 = prefs_frame_new (_("Export Paths Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_file_chooser_button_add (object, "path-export-path",
_("Export folder:"),
_("Select Default Folder for Exporting Paths"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_check_button_add (object, "path-export-active-only",
_("Export the active path only"),
@@ -2289,12 +2286,12 @@ prefs_dialog_new (Gimp *gimp,
/* Import Path Dialog */
vbox2 = prefs_frame_new (_("Import Paths Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_file_chooser_button_add (object, "path-import-path",
_("Import folder:"),
_("Select Default Folder for Importing Paths"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_check_button_add (object, "path-import-merge",
_("Merge imported paths"),
@@ -2306,29 +2303,29 @@ prefs_dialog_new (Gimp *gimp,
/* Feather Selection Dialog */
vbox2 = prefs_frame_new (_("Feather Selection Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_spin_button_add (object, "selection-feather-radius", 1.0, 10.0, 2,
_("Feather radius:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
/* Grow Selection Dialog */
vbox2 = prefs_frame_new (_("Grow Selection Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_spin_button_add (object, "selection-grow-radius", 1.0, 10.0, 0,
_("Grow radius:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
/* Shrink Selection Dialog */
vbox2 = prefs_frame_new (_("Shrink Selection Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_spin_button_add (object, "selection-shrink-radius", 1.0, 10.0, 0,
_("Shrink radius:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_check_button_add (object, "selection-shrink-edge-lock",
_("Selected areas continue outside the image"),
@@ -2337,15 +2334,15 @@ prefs_dialog_new (Gimp *gimp,
/* Border Selection Dialog */
vbox2 = prefs_frame_new (_("Border Selection Dialog"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_spin_button_add (object, "selection-border-radius", 1.0, 10.0, 0,
_("Border radius:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_enum_combo_box_add (object, "selection-border-style", 0, 0,
_("Border style:"),
GTK_TABLE (table), 1, size_group);
GTK_GRID (grid), 1, size_group);
prefs_check_button_add (object, "selection-border-edge-lock",
_("Selected areas continue outside the image"),
@@ -2355,10 +2352,10 @@ prefs_dialog_new (Gimp *gimp,
vbox2 = prefs_frame_new (_("Fill Selection Outline & Fill Path Dialogs"),
GTK_CONTAINER (vbox), FALSE);
table = gimp_fill_editor_new (GIMP_DIALOG_CONFIG (object)->fill_options,
FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
gtk_widget_show (table);
editor = gimp_fill_editor_new (GIMP_DIALOG_CONFIG (object)->fill_options,
FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), editor, FALSE, FALSE, 0);
gtk_widget_show (editor);
/* Stroke Options Dialog */
vbox2 = prefs_frame_new (_("Stroke Selection & Stroke Path Dialogs"),
@@ -2370,11 +2367,11 @@ prefs_dialog_new (Gimp *gimp,
* uses the y resolution on the opened image. So using the y resolution
* of the default image seems like the best compromise in the preferences.
*/
table = gimp_stroke_editor_new (GIMP_DIALOG_CONFIG (object)->stroke_options,
gimp_template_get_resolution_y (core_config->default_image),
FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
gtk_widget_show (table);
editor = gimp_stroke_editor_new (GIMP_DIALOG_CONFIG (object)->stroke_options,
gimp_template_get_resolution_y (core_config->default_image),
FALSE);
gtk_box_pack_start (GTK_BOX (vbox2), editor, FALSE, FALSE, 0);
gtk_widget_show (editor);
g_object_unref (size_group);
@@ -2402,12 +2399,12 @@ prefs_dialog_new (Gimp *gimp,
_("Show help _buttons"),
GTK_BOX (vbox2));
table = prefs_table_new (3, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
button = prefs_boolean_combo_box_add (object, "user-manual-online",
_("Use the online version"),
_("Use a locally installed copy"),
_("User manual:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
gimp_help_set_help_data (button, NULL, NULL);
manuals = gimp_help_get_installed_languages ();
@@ -2442,7 +2439,7 @@ prefs_dialog_new (Gimp *gimp,
g_signal_connect (entry, "changed",
G_CALLBACK (prefs_help_language_change_callback),
gimp);
gtk_table_attach_defaults (GTK_TABLE (table), entry, 1, 2, 1, 2);
gtk_grid_attach (GTK_GRID (grid), entry, 1, 1, 1, 1);
gtk_widget_show (entry);
}
@@ -2467,7 +2464,7 @@ prefs_dialog_new (Gimp *gimp,
g_list_free_full (manuals, g_free);
}
gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 2, 3);
gtk_grid_attach (GTK_GRID (grid), hbox, 1, 2, 1, 1);
gtk_widget_show (hbox);
/* Help Browser */
@@ -2480,11 +2477,11 @@ prefs_dialog_new (Gimp *gimp,
if (gimp_help_browser_is_installed (gimp))
{
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
button = prefs_enum_combo_box_add (object, "help-browser", 0, 0,
_("H_elp browser to use:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
}
else
{
@@ -2507,14 +2504,14 @@ prefs_dialog_new (Gimp *gimp,
/* Action Search */
vbox2 = prefs_frame_new (_("Action Search"), GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_check_button_add (object, "search-show-unavailable-actions",
_("Show _unavailable actions"),
GTK_BOX (vbox2));
prefs_spin_button_add (object, "action-history-size", 1.0, 10.0, 0,
_("Maximum History Size:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
button = prefs_button_add (GIMP_ICON_SHRED,
_("Clear Action History"),
@@ -2542,14 +2539,14 @@ prefs_dialog_new (Gimp *gimp,
/* Transparency */
vbox2 = prefs_frame_new (_("Transparency"), GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "transparency-type", 0, 0,
_("_Check style:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_enum_combo_box_add (object, "transparency-size", 0, 0,
_("Check _size:"),
GTK_TABLE (table), 1, size_group);
GTK_GRID (grid), 1, size_group);
vbox2 = prefs_frame_new (_("Monitor Resolution"),
GTK_CONTAINER (vbox), FALSE);
@@ -2569,8 +2566,8 @@ prefs_dialog_new (Gimp *gimp,
g_free (pixels_per_unit);
}
gtk_table_set_col_spacings (GTK_TABLE (entry), 2);
gtk_table_set_row_spacings (GTK_TABLE (entry), 2);
gtk_grid_set_column_spacing (GTK_GRID (entry), 2);
gtk_grid_set_row_spacing (GTK_GRID (entry), 2);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
_("Horizontal"), 0, 1, 0.0);
@@ -2580,6 +2577,7 @@ prefs_dialog_new (Gimp *gimp,
_("ppi"), 1, 4, 0.0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_halign (hbox, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 24);
gtk_widget_show (entry);
@@ -2592,8 +2590,7 @@ prefs_dialog_new (Gimp *gimp,
gdouble yres;
gchar *str;
gimp_get_monitor_resolution (gdk_screen_get_default (), /* FIXME monitor */
0, /* FIXME monitor */
gimp_get_monitor_resolution (gdk_display_get_monitor (gdk_display_get_default (), 0),
&xres, &yres);
str = g_strdup_printf (_("_Detect automatically (currently %d × %d ppi)"),
@@ -2631,7 +2628,10 @@ prefs_dialog_new (Gimp *gimp,
calibrate_button = gtk_button_new_with_mnemonic (_("C_alibrate..."));
label = gtk_bin_get_child (GTK_BIN (calibrate_button));
gtk_misc_set_padding (GTK_MISC (label), 4, 0);
g_object_set (label,
"margin-start", 4,
"margin-end", 4,
NULL);
gtk_box_pack_start (GTK_BOX (hbox), calibrate_button, FALSE, FALSE, 0);
gtk_widget_show (calibrate_button);
gtk_widget_set_sensitive (calibrate_button,
@@ -2666,11 +2666,11 @@ prefs_dialog_new (Gimp *gimp,
vbox2 = prefs_frame_new (_("Window Manager Hints"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "dock-window-hint", 0, 0,
_("Hint for _docks and toolbox:"),
GTK_TABLE (table), 1, size_group);
GTK_GRID (grid), 1, size_group);
vbox2 = prefs_frame_new (_("Focus"),
GTK_CONTAINER (vbox), FALSE);
@@ -2727,11 +2727,11 @@ prefs_dialog_new (Gimp *gimp,
_("Use \"_Dot for dot\" by default"),
GTK_BOX (vbox2));
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_spin_button_add (object, "marching-ants-speed", 1.0, 10.0, 0,
_("Marching _ants speed:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
/* Zoom & Resize Behavior */
vbox2 = prefs_frame_new (_("Zoom & Resize Behavior"),
@@ -2744,23 +2744,23 @@ prefs_dialog_new (Gimp *gimp,
_("Resize window on image _size change"),
GTK_BOX (vbox2));
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_boolean_combo_box_add (object, "initial-zoom-to-fit",
_("Show entire image"),
"1:1",
_("Initial zoom _ratio:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
/* Space Bar */
vbox2 = prefs_frame_new (_("Space Bar"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "space-bar-action", 0, 0,
_("_While space bar is pressed:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
/* Mouse Pointers */
vbox2 = prefs_frame_new (_("Mouse Pointers"),
@@ -2773,14 +2773,14 @@ prefs_dialog_new (Gimp *gimp,
_("Show pointer for paint _tools"),
GTK_BOX (vbox2));
table = prefs_table_new (2, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_enum_combo_box_add (object, "cursor-mode", 0, 0,
_("Pointer _mode:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
prefs_enum_combo_box_add (object, "cursor-handedness", 0, 0,
_("Pointer _handedness:"),
GTK_TABLE (table), 1, NULL);
GTK_GRID (grid), 1, NULL);
g_object_unref (size_group);
size_group = NULL;
@@ -2954,11 +2954,11 @@ prefs_dialog_new (Gimp *gimp,
/* Snapping Distance */
vbox2 = prefs_frame_new (_("General"),
GTK_CONTAINER (vbox), FALSE);
table = prefs_table_new (1, GTK_CONTAINER (vbox2));
grid = prefs_grid_new (GTK_CONTAINER (vbox2));
prefs_spin_button_add (object, "snap-distance", 1.0, 5.0, 0,
_("_Snapping distance:"),
GTK_TABLE (table), 0, size_group);
GTK_GRID (grid), 0, size_group);
/*******************/
@@ -3057,14 +3057,14 @@ prefs_dialog_new (Gimp *gimp,
}
};
table = prefs_table_new (G_N_ELEMENTS (dirs) + 1, GTK_CONTAINER (vbox));
grid = prefs_grid_new (GTK_CONTAINER (vbox));
for (i = 0; i < G_N_ELEMENTS (dirs); i++)
{
prefs_file_chooser_button_add (object, dirs[i].property_name,
gettext (dirs[i].label),
gettext (dirs[i].dialog_title),
GTK_TABLE (table), i, NULL);
GTK_GRID (grid), i, NULL);
}
}

View File

@@ -92,7 +92,7 @@ print_size_dialog_new (GimpImage *image,
PrintSizeDialog *private;
GtkWidget *dialog;
GtkWidget *frame;
GtkWidget *table;
GtkWidget *grid;
GtkWidget *entry;
GtkWidget *label;
GtkWidget *width;
@@ -126,7 +126,7 @@ print_size_dialog_new (GimpImage *image,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
@@ -147,13 +147,10 @@ print_size_dialog_new (GimpImage *image,
frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
table = gtk_table_new (4, 3, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 12);
gtk_table_set_row_spacing (GTK_TABLE (table), 0, 2);
gtk_table_set_row_spacing (GTK_TABLE (table), 2, 2);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (grid), 12);
gtk_container_add (GTK_CONTAINER (frame), grid);
gtk_widget_show (grid);
/* the print size entry */
@@ -175,35 +172,30 @@ print_size_dialog_new (GimpImage *image,
label = gtk_label_new_with_mnemonic (_("_Width:"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), width);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
gtk_widget_show (label);
label = gtk_label_new_with_mnemonic (_("H_eight:"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), height);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
gtk_widget_show (label);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 0, 2);
gtk_grid_attach (GTK_GRID (grid), hbox, 1, 0, 1, 2);
gtk_widget_show (hbox);
gtk_table_set_row_spacing (GTK_TABLE (entry), 0, 2);
gtk_table_set_col_spacing (GTK_TABLE (entry), 1, 6);
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0);
gtk_widget_show (entry);
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
GTK_SPIN_BUTTON (height), NULL);
gtk_table_attach_defaults (GTK_TABLE (entry), height, 0, 1, 1, 2);
gtk_grid_attach (GTK_GRID (entry), height, 0, 1, 1, 1);
gtk_widget_show (height);
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
GTK_SPIN_BUTTON (width), NULL);
gtk_table_attach_defaults (GTK_TABLE (entry), width, 0, 1, 0, 1);
gtk_grid_attach (GTK_GRID (entry), width, 0, 0, 1, 1);
gtk_widget_show (width);
gimp_size_entry_set_resolution (GIMP_SIZE_ENTRY (entry), 0,
@@ -236,19 +228,17 @@ print_size_dialog_new (GimpImage *image,
label = gtk_label_new_with_mnemonic (_("_X resolution:"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), width);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
gtk_widget_show (label);
label = gtk_label_new_with_mnemonic (_("_Y resolution:"));
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), height);
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4,
GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1);
gtk_widget_show (label);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 2, 4);
gtk_grid_attach (GTK_GRID (grid), hbox, 1, 2, 1, 2);
gtk_widget_show (hbox);
entry = gimp_size_entry_new (0, gimp_image_get_unit (image), _("pixels/%a"),
@@ -256,21 +246,17 @@ print_size_dialog_new (GimpImage *image,
GIMP_SIZE_ENTRY_UPDATE_RESOLUTION);
private->resolution_entry = GIMP_SIZE_ENTRY (entry);
gtk_table_set_row_spacing (GTK_TABLE (entry), 0, 2);
gtk_table_set_col_spacing (GTK_TABLE (entry), 1, 2);
gtk_table_set_col_spacing (GTK_TABLE (entry), 2, 2);
gtk_box_pack_start (GTK_BOX (hbox), entry, FALSE, FALSE, 0);
gtk_widget_show (entry);
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
GTK_SPIN_BUTTON (height), NULL);
gtk_table_attach_defaults (GTK_TABLE (entry), height, 0, 1, 1, 2);
gtk_grid_attach (GTK_GRID (entry), height, 0, 1, 1, 1);
gtk_widget_show (height);
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
GTK_SPIN_BUTTON (width), NULL);
gtk_table_attach_defaults (GTK_TABLE (entry), width, 0, 1, 0, 1);
gtk_grid_attach (GTK_GRID (entry), width, 0, 0, 1, 1);
gtk_widget_show (width);
gimp_size_entry_set_refval_boundaries (GIMP_SIZE_ENTRY (entry), 0,
@@ -286,7 +272,7 @@ print_size_dialog_new (GimpImage *image,
chain = gimp_chain_button_new (GIMP_CHAIN_RIGHT);
if (ABS (private->xres - private->yres) < GIMP_MIN_RESOLUTION)
gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chain), TRUE);
gtk_table_attach_defaults (GTK_TABLE (entry), chain, 1, 2, 0, 2);
gtk_grid_attach (GTK_GRID (entry), chain, 1, 0, 1, 2);
gtk_widget_show (chain);
private->chain = GIMP_CHAIN_BUTTON (chain);

View File

@@ -175,7 +175,7 @@ quit_close_all_dialog_new (Gimp *gimp,
private->ok_button = gtk_dialog_add_button (GTK_DIALOG (private->dialog),
"", GTK_RESPONSE_OK);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (private->dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (private->dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -113,7 +113,6 @@ resize_dialog_new (GimpViewable *viewable,
GtkWidget *dialog;
GtkWidget *main_vbox;
GtkWidget *vbox;
GtkWidget *abox;
GtkWidget *frame;
GtkWidget *button;
GtkWidget *spinbutton;
@@ -188,7 +187,7 @@ resize_dialog_new (GimpViewable *viewable,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
@@ -244,15 +243,9 @@ resize_dialog_new (GimpViewable *viewable,
private->offset = entry = gimp_size_entry_new (1, unit, "%p",
TRUE, FALSE, FALSE, SB_WIDTH,
GIMP_SIZE_ENTRY_UPDATE_SIZE);
gtk_table_set_col_spacing (GTK_TABLE (entry), 0, 6);
gtk_table_set_col_spacing (GTK_TABLE (entry), 1, 6);
gtk_table_set_col_spacing (GTK_TABLE (entry), 3, 12);
gtk_table_set_row_spacing (GTK_TABLE (entry), 0, 2);
gimp_size_entry_add_field (GIMP_SIZE_ENTRY (entry),
GTK_SPIN_BUTTON (spinbutton), NULL);
gtk_table_attach_defaults (GTK_TABLE (entry), spinbutton,
1, 2, 0, 1);
gtk_grid_attach (GTK_GRID (entry), spinbutton, 1, 0, 1, 1);
gtk_widget_show (spinbutton);
gimp_size_entry_attach_label (GIMP_SIZE_ENTRY (entry),
@@ -275,20 +268,17 @@ resize_dialog_new (GimpViewable *viewable,
private);
button = gtk_button_new_with_mnemonic (_("C_enter"));
gtk_table_attach_defaults (GTK_TABLE (entry), button, 4, 5, 1, 2);
gtk_grid_attach (GTK_GRID (entry), button, 4, 1, 1, 1);
gtk_widget_show (button);
g_signal_connect (button, "clicked",
G_CALLBACK (offset_center_clicked),
private);
abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (vbox), abox, FALSE, FALSE, 0);
gtk_widget_show (abox);
frame = gtk_frame_new (NULL);
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_container_add (GTK_CONTAINER (abox), frame);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
private->area = gimp_offset_area_new (width, height);

View File

@@ -50,14 +50,12 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
const gchar *icon_name)
{
GtkWidget *dialog;
GtkWidget *table;
GtkWidget *grid;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *ruler;
GtkWidget *label;
GdkScreen *screen;
GdkRectangle rect;
gint monitor;
GdkRectangle workarea;
g_return_if_fail (GIMP_IS_SIZE_ENTRY (resolution_entry));
g_return_if_fail (gtk_widget_get_realized (resolution_entry));
@@ -77,52 +75,45 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
screen = gtk_widget_get_screen (dialog);
monitor = gdk_screen_get_monitor_at_window (screen,
gtk_widget_get_window (resolution_entry));
gdk_screen_get_monitor_workarea (screen, monitor, &rect);
gdk_monitor_get_workarea (gimp_widget_get_monitor (dialog), &workarea);
ruler_width = rect.width - 300 - (rect.width % 100);
ruler_height = rect.height - 300 - (rect.height % 100);
ruler_width = workarea.width - 300 - (workarea.width % 100);
ruler_height = workarea.height - 300 - (workarea.height % 100);
table = gtk_table_new (4, 4, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 12);
grid = gtk_grid_new ();
gtk_container_set_border_width (GTK_CONTAINER (grid), 12);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
table, TRUE, TRUE, 0);
gtk_widget_show (table);
grid, TRUE, TRUE, 0);
gtk_widget_show (grid);
if (icon_name)
{
GtkWidget *image = gtk_image_new_from_icon_name (icon_name,
GTK_ICON_SIZE_DIALOG);
gtk_table_attach (GTK_TABLE (table), image, 0, 1, 0, 1,
GTK_SHRINK, GTK_SHRINK, 4, 4);
gtk_grid_attach (GTK_GRID (grid), image, 0, 0, 1, 1);
gtk_widget_show (image);
}
ruler = gimp_ruler_new (GTK_ORIENTATION_HORIZONTAL);
gtk_widget_set_size_request (ruler, ruler_width, 32);
gimp_ruler_set_range (GIMP_RULER (ruler), 0, ruler_width, ruler_width);
gtk_table_attach (GTK_TABLE (table), ruler, 1, 3, 0, 1,
GTK_SHRINK, GTK_SHRINK, 0, 0);
gtk_grid_attach (GTK_GRID (grid), ruler, 1, 0, 2, 1);
gtk_widget_show (ruler);
ruler = gimp_ruler_new (GTK_ORIENTATION_VERTICAL);
gtk_widget_set_size_request (ruler, 32, ruler_height);
gimp_ruler_set_range (GIMP_RULER (ruler), 0, ruler_height, ruler_height);
gtk_table_attach (GTK_TABLE (table), ruler, 0, 1, 1, 3,
GTK_SHRINK, GTK_SHRINK, 0, 0);
gtk_grid_attach (GTK_GRID (grid), ruler, 0, 1, 1, 2);
gtk_widget_show (ruler);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
gtk_table_attach (GTK_TABLE (table), vbox, 1, 2, 1, 2,
GTK_SHRINK, GTK_SHRINK, 0, 0);
gtk_grid_attach (GTK_GRID (grid), vbox, 1, 1, 1, 1);
gtk_widget_show (vbox);
label =

View File

@@ -139,7 +139,7 @@ scale_dialog_new (GimpViewable *viewable,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,

View File

@@ -130,7 +130,7 @@ stroke_dialog_new (GimpItem *item,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_RESET,
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
@@ -166,20 +166,12 @@ stroke_dialog_new (GimpItem *item,
g_object_ref_sink (radio_box);
g_object_unref (radio_box);
{
PangoFontDescription *font_desc;
font_desc = pango_font_description_new ();
pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD);
gtk_widget_modify_font (gtk_bin_get_child (GTK_BIN (cairo_radio)),
font_desc);
gtk_widget_modify_font (gtk_bin_get_child (GTK_BIN (paint_radio)),
font_desc);
pango_font_description_free (font_desc);
}
gimp_label_set_attributes (GTK_LABEL (gtk_bin_get_child (GTK_BIN (cairo_radio))),
PANGO_ATTR_WEIGHT, PANGO_WEIGHT_BOLD,
-1);
gimp_label_set_attributes (GTK_LABEL (gtk_bin_get_child (GTK_BIN (paint_radio))),
PANGO_ATTR_WEIGHT, PANGO_WEIGHT_BOLD,
-1);
/* the stroke frame */

View File

@@ -120,7 +120,7 @@ template_options_dialog_new (GimpTemplate *template,
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -42,24 +42,13 @@ enum
RESPONSE_NEXT = 2
};
/* eek, see bug 762279 */
GtkLinkButtonUriFunc
gtk_link_button_set_uri_hook (GtkLinkButtonUriFunc func,
gpointer data,
GDestroyNotify destroy);
static void tips_uri_hook (GtkLinkButton *button,
const gchar *link_,
gpointer user_data);
static void tips_dialog_set_tip (GimpTip *tip);
static void tips_dialog_response (GtkWidget *dialog,
gint response);
static void tips_dialog_destroy (GtkWidget *widget,
GimpGuiConfig *config);
static void more_button_clicked (GtkWidget *button,
Gimp *gimp);
static void tips_dialog_set_tip (GimpTip *tip);
static void tips_dialog_response (GtkWidget *dialog,
gint response);
static void tips_dialog_destroy (GtkWidget *widget,
GimpGuiConfig *config);
static gboolean more_button_clicked (GtkWidget *button,
Gimp *gimp);
static GtkWidget *tips_dialog = NULL;
@@ -182,7 +171,7 @@ tips_dialog_create (Gimp *gimp)
image = gtk_image_new_from_icon_name (GIMP_ICON_DIALOG_INFORMATION,
GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
gtk_widget_set_valign (image, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
gtk_widget_show (image);
@@ -206,10 +195,7 @@ tips_dialog_create (Gimp *gimp)
gtk_widget_show (more_button);
gtk_box_pack_start (GTK_BOX (hbox), more_button, FALSE, FALSE, 0);
/* this is deprecated but better than showing two URIs, see bug #762279 */
gtk_link_button_set_uri_hook (tips_uri_hook, NULL, NULL);
g_signal_connect (more_button, "clicked",
g_signal_connect (more_button, "activate-link",
G_CALLBACK (more_button_clicked),
gimp);
@@ -261,27 +247,22 @@ tips_dialog_set_tip (GimpTip *tip)
gtk_label_set_markup (GTK_LABEL (tip_label), tip->text);
gtk_link_button_set_visited (GTK_LINK_BUTTON (more_button), FALSE);
/* set the URI to unset the "visited" state */
gtk_link_button_set_uri (GTK_LINK_BUTTON (more_button),
"http://docs.gimp.org/");
gtk_widget_set_sensitive (more_button, tip->help_id != NULL);
}
static void
static gboolean
more_button_clicked (GtkWidget *button,
Gimp *gimp)
{
GimpTip *tip = current_tip->data;
g_signal_stop_emission_by_name (button, "clicked");
if (tip->help_id)
gimp_help (gimp, NULL, NULL, tip->help_id);
}
static void
tips_uri_hook (GtkLinkButton *button,
const gchar *link_,
gpointer user_data)
{
/* do nothing */
/* Do not run the link set at construction. */
return TRUE;
}

View File

@@ -86,7 +86,7 @@ vectors_export_dialog_new (GimpImage *image,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -91,7 +91,7 @@ vectors_import_dialog_new (GimpImage *image,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -56,8 +56,7 @@ static void gimp_canvas_get_property (GObject *object,
GParamSpec *pspec);
static void gimp_canvas_unrealize (GtkWidget *widget);
static void gimp_canvas_style_set (GtkWidget *widget,
GtkStyle *prev_style);
static void gimp_canvas_style_updated (GtkWidget *widget);
static gboolean gimp_canvas_focus_in_event (GtkWidget *widget,
GdkEventFocus *event);
static gboolean gimp_canvas_focus_out_event (GtkWidget *widget,
@@ -81,7 +80,7 @@ gimp_canvas_class_init (GimpCanvasClass *klass)
object_class->get_property = gimp_canvas_get_property;
widget_class->unrealize = gimp_canvas_unrealize;
widget_class->style_set = gimp_canvas_style_set;
widget_class->style_updated = gimp_canvas_style_updated;
widget_class->focus_in_event = gimp_canvas_focus_in_event;
widget_class->focus_out_event = gimp_canvas_focus_out_event;
widget_class->focus = gimp_canvas_focus;
@@ -100,7 +99,6 @@ gimp_canvas_init (GimpCanvas *canvas)
gtk_widget_set_can_focus (widget, TRUE);
gtk_widget_add_events (widget, GIMP_CANVAS_EVENT_MASK);
gtk_widget_set_extension_events (widget, GDK_EXTENSION_EVENTS_ALL);
}
static void
@@ -154,12 +152,11 @@ gimp_canvas_unrealize (GtkWidget *widget)
}
static void
gimp_canvas_style_set (GtkWidget *widget,
GtkStyle *prev_style)
gimp_canvas_style_updated (GtkWidget *widget)
{
GimpCanvas *canvas = GIMP_CANVAS (widget);
GTK_WIDGET_CLASS (parent_class)->style_set (widget, prev_style);
GTK_WIDGET_CLASS (parent_class)->style_updated (widget);
g_clear_object (&canvas->layout);
}
@@ -279,20 +276,13 @@ void
gimp_canvas_set_bg_color (GimpCanvas *canvas,
GimpRGB *color)
{
GtkWidget *widget = GTK_WIDGET (canvas);
GdkColormap *colormap;
GdkColor gdk_color;
GtkWidget *widget = GTK_WIDGET (canvas);
if (! gtk_widget_get_realized (widget))
return;
gimp_rgb_get_gdk_color (color, &gdk_color);
colormap = gdk_drawable_get_colormap (gtk_widget_get_window (widget));
g_return_if_fail (colormap != NULL);
gdk_colormap_alloc_color (colormap, &gdk_color, FALSE, TRUE);
gdk_window_set_background (gtk_widget_get_window (widget), &gdk_color);
gdk_window_set_background_rgba (gtk_widget_get_window (widget),
(GdkRGBA *) color);
gtk_widget_queue_draw (GTK_WIDGET (canvas));
}

View File

@@ -26,6 +26,8 @@
GDK_POINTER_MOTION_MASK | \
GDK_BUTTON_PRESS_MASK | \
GDK_BUTTON_RELEASE_MASK | \
GDK_SCROLL_MASK | \
GDK_SMOOTH_SCROLL_MASK | \
GDK_STRUCTURE_MASK | \
GDK_ENTER_NOTIFY_MASK | \
GDK_LEAVE_NOTIFY_MASK | \

View File

@@ -248,11 +248,14 @@ gimp_canvas_path_get_extents (GimpCanvasItem *item)
if (private->path && gtk_widget_get_realized (canvas))
{
cairo_surface_t *surface;
cairo_t *cr;
cairo_rectangle_int_t rectangle;
gdouble x1, y1, x2, y2;
cr = gdk_cairo_create (gtk_widget_get_window (canvas));
surface = cairo_recording_surface_create (CAIRO_CONTENT_COLOR, NULL);
cr = cairo_create (surface);
cairo_surface_destroy (surface);
cairo_save (cr);
gimp_canvas_item_transform (item, cr);

View File

@@ -83,8 +83,8 @@ struct _GimpCursorViewPriv
GimpContext *context;
GimpDisplayShell *shell;
GimpImage *image;
GimpUnit unit;
GimpUnit unit;
guint cursor_idle_id;
GimpImage *cursor_image;
GimpUnit cursor_unit;
@@ -105,8 +105,7 @@ static void gimp_cursor_view_get_property (GObject *o
GValue *value,
GParamSpec *pspec);
static void gimp_cursor_view_style_set (GtkWidget *widget,
GtkStyle *prev_style);
static void gimp_cursor_view_style_updated (GtkWidget *widget);
static void gimp_cursor_view_set_aux_info (GimpDocked *docked,
GList *aux_info);
@@ -153,11 +152,11 @@ gimp_cursor_view_class_init (GimpCursorViewClass* klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
object_class->dispose = gimp_cursor_view_dispose;
object_class->get_property = gimp_cursor_view_get_property;
object_class->set_property = gimp_cursor_view_set_property;
object_class->dispose = gimp_cursor_view_dispose;
object_class->get_property = gimp_cursor_view_get_property;
object_class->set_property = gimp_cursor_view_set_property;
widget_class->style_set = gimp_cursor_view_style_set;
widget_class->style_updated = gimp_cursor_view_style_updated;
g_object_class_install_property (object_class, PROP_SAMPLE_MERGED,
g_param_spec_boolean ("sample-merged",
@@ -173,7 +172,7 @@ static void
gimp_cursor_view_init (GimpCursorView *view)
{
GtkWidget *frame;
GtkWidget *table;
GtkWidget *grid;
GtkWidget *toggle;
gint content_spacing;
@@ -216,23 +215,23 @@ gimp_cursor_view_init (GimpCursorView *view)
gtk_box_pack_start (GTK_BOX (view->priv->coord_hbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
table = gtk_table_new (2, 2, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
grid = gtk_grid_new ();
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
gtk_grid_set_row_spacing (GTK_GRID (grid), 2);
gtk_container_add (GTK_CONTAINER (frame), grid);
gtk_widget_show (grid);
view->priv->pixel_x_label = gtk_label_new (_("n/a"));
gtk_label_set_xalign (GTK_LABEL (view->priv->pixel_x_label), 1.0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("X"), 0.5, 0.5,
view->priv->pixel_x_label, 1, FALSE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
_("X"), 0.5, 0.5,
view->priv->pixel_x_label, 1);
view->priv->pixel_y_label = gtk_label_new (_("n/a"));
gtk_label_set_xalign (GTK_LABEL (view->priv->pixel_y_label), 1.0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Y"), 0.5, 0.5,
view->priv->pixel_y_label, 1, FALSE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
_("Y"), 0.5, 0.5,
view->priv->pixel_y_label, 1);
/* Units */
@@ -241,23 +240,23 @@ gimp_cursor_view_init (GimpCursorView *view)
gtk_box_pack_start (GTK_BOX (view->priv->coord_hbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
table = gtk_table_new (2, 2, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
grid = gtk_grid_new ();
gtk_grid_set_column_spacing (GTK_GRID (grid), 4);
gtk_grid_set_row_spacing (GTK_GRID (grid), 2);
gtk_container_add (GTK_CONTAINER (frame), grid);
gtk_widget_show (grid);
view->priv->unit_x_label = gtk_label_new (_("n/a"));
gtk_label_set_xalign (GTK_LABEL (view->priv->unit_x_label), 1.0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("X"), 0.5, 0.5,
view->priv->unit_x_label, 1, FALSE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
_("X"), 0.5, 0.5,
view->priv->unit_x_label, 1);
view->priv->unit_y_label = gtk_label_new (_("n/a"));
gtk_label_set_xalign (GTK_LABEL (view->priv->unit_y_label), 1.0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Y"), 0.5, 0.5,
view->priv->unit_y_label, 1, FALSE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
_("Y"), 0.5, 0.5,
view->priv->unit_y_label, 1);
/* Selection Bounding Box */
@@ -266,47 +265,47 @@ gimp_cursor_view_init (GimpCursorView *view)
gtk_box_pack_start (GTK_BOX (view->priv->selection_hbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
table = gtk_table_new (2, 2, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 6);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
grid = gtk_grid_new ();
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
gtk_grid_set_row_spacing (GTK_GRID (grid), 2);
gtk_container_add (GTK_CONTAINER (frame), grid);
gtk_widget_show (grid);
view->priv->selection_x_label = gtk_label_new (_("n/a"));
gtk_label_set_xalign (GTK_LABEL (view->priv->selection_x_label), 1.0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("X"), 0.5, 0.5,
view->priv->selection_x_label, 1, FALSE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
_("X"), 0.5, 0.5,
view->priv->selection_x_label, 1);
view->priv->selection_y_label = gtk_label_new (_("n/a"));
gtk_label_set_xalign (GTK_LABEL (view->priv->selection_y_label), 1.0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Y"), 0.5, 0.5,
view->priv->selection_y_label, 1, FALSE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
_("Y"), 0.5, 0.5,
view->priv->selection_y_label, 1);
frame = gimp_frame_new ("");
gtk_box_pack_start (GTK_BOX (view->priv->selection_hbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
table = gtk_table_new (2, 2, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_widget_show (table);
grid = gtk_grid_new ();
gtk_grid_set_column_spacing (GTK_GRID (grid), 4);
gtk_grid_set_row_spacing (GTK_GRID (grid), 2);
gtk_container_add (GTK_CONTAINER (frame), grid);
gtk_widget_show (grid);
view->priv->selection_width_label = gtk_label_new (_("n/a"));
gtk_label_set_xalign (GTK_LABEL (view->priv->selection_width_label), 1.0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
/* Width */
_("W"), 0.5, 0.5,
view->priv->selection_width_label, 1, FALSE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 0,
/* Width */
_("W"), 0.5, 0.5,
view->priv->selection_width_label, 1);
view->priv->selection_height_label = gtk_label_new (_("n/a"));
gtk_label_set_xalign (GTK_LABEL (view->priv->selection_height_label), 1.0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
/* Height */
_("H"), 0.5, 0.5,
view->priv->selection_height_label, 1, FALSE);
gimp_grid_attach_aligned (GTK_GRID (grid), 0, 1,
/* Height */
_("H"), 0.5, 0.5,
view->priv->selection_height_label, 1);
/* color information */
@@ -517,13 +516,12 @@ gimp_cursor_view_set_label_italic (GtkWidget *label,
}
static void
gimp_cursor_view_style_set (GtkWidget *widget,
GtkStyle *prev_style)
gimp_cursor_view_style_updated (GtkWidget *widget)
{
GimpCursorView *view = GIMP_CURSOR_VIEW (widget);
gint content_spacing;
GTK_WIDGET_CLASS (parent_class)->style_set (widget, prev_style);
GTK_WIDGET_CLASS (parent_class)->style_updated (widget);
gtk_widget_style_get (GTK_WIDGET (view),
"content-spacing", &content_spacing,

View File

@@ -389,8 +389,7 @@ gimp_display_new (Gimp *gimp,
gdouble scale,
GimpUIManager *popup_manager,
GimpDialogFactory *dialog_factory,
GdkScreen *screen,
gint monitor)
GdkMonitor *monitor)
{
GimpDisplay *display;
GimpDisplayPrivate *private;
@@ -399,7 +398,7 @@ gimp_display_new (Gimp *gimp,
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (image == NULL || GIMP_IS_IMAGE (image), NULL);
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
g_return_val_if_fail (GDK_IS_MONITOR (monitor), NULL);
/* If there isn't an interface, never create a display */
if (gimp->no_interface)
@@ -441,14 +440,12 @@ gimp_display_new (Gimp *gimp,
window = gimp_image_window_new (gimp,
private->image,
dialog_factory,
screen,
monitor);
}
/* create the shell for the image */
private->shell = gimp_display_shell_new (display, unit, scale,
popup_manager,
screen,
monitor);
shell = gimp_display_get_shell (display);

View File

@@ -55,8 +55,7 @@ GimpDisplay * gimp_display_new (Gimp *gimp,
gdouble scale,
GimpUIManager *popup_manager,
GimpDialogFactory *dialog_factory,
GdkScreen *screen,
gint monitor);
GdkMonitor *monitor);
void gimp_display_delete (GimpDisplay *display);
void gimp_display_close (GimpDisplay *display);

View File

@@ -61,25 +61,10 @@ gimp_display_shell_appearance_update (GimpDisplayShell *shell)
if (window)
{
GimpDockColumns *left_docks;
GimpDockColumns *right_docks;
gboolean fullscreen;
gboolean has_grip;
fullscreen = gimp_image_window_get_fullscreen (window);
gboolean fullscreen = gimp_image_window_get_fullscreen (window);
gimp_display_shell_set_action_active (shell, "view-fullscreen",
fullscreen);
left_docks = gimp_image_window_get_left_docks (window);
right_docks = gimp_image_window_get_right_docks (window);
has_grip = (! fullscreen &&
! (left_docks && gimp_dock_columns_get_docks (left_docks)) &&
! (right_docks && gimp_dock_columns_get_docks (right_docks)));
gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (shell->statusbar),
has_grip);
}
gimp_display_shell_set_show_menubar (shell,
@@ -449,13 +434,9 @@ gimp_display_shell_set_padding (GimpDisplayShell *shell,
case GIMP_CANVAS_PADDING_MODE_DEFAULT:
if (shell->canvas)
{
GtkStyle *style;
GtkStyleContext *style = gtk_widget_get_style_context (shell->canvas);
gtk_widget_ensure_style (shell->canvas);
style = gtk_widget_get_style (shell->canvas);
gimp_rgb_set_gdk_color (&color, style->bg + GTK_STATE_NORMAL);
gtk_style_context_get_background_color (style, 0, (GdkRGBA *) &color);
}
break;

View File

@@ -116,31 +116,6 @@ gimp_display_shell_canvas_realize (GtkWidget *canvas,
gtk_widget_set_size_request (GTK_WIDGET (shell), 0, 0);
shell->xfer = gimp_display_xfer_realize (GTK_WIDGET(shell));
/* HACK: remove with GTK+ 3.x: this unconditionally maps the
* rulers, if configured to be hidden they are never visible to the
* user because they will be hidden again right away.
*
* For some obscure reason, having the rulers mapped once prevents
* crashes with tablets and on-canvas dialogs. See bug #784480 and
* all its duplicates.
*/
gtk_widget_show (shell->hrule);
gtk_widget_show (shell->vrule);
}
void
gimp_display_shell_canvas_realize_after (GtkWidget *canvas,
GimpDisplayShell *shell)
{
GimpImageWindow *window = gimp_display_shell_get_window (shell);
/* HACK: see above: must go with GTK+ 3.x too. Restore the rulers'
* intended visibility again.
*/
gimp_image_window_suspend_keep_pos (window);
gimp_display_shell_appearance_update (shell);
gimp_image_window_resume_keep_pos (window);
}
void
@@ -241,23 +216,17 @@ gimp_display_shell_canvas_size_allocate (GtkWidget *widget,
}
gboolean
gimp_display_shell_canvas_expose (GtkWidget *widget,
GdkEventExpose *eevent,
GimpDisplayShell *shell)
gimp_display_shell_canvas_draw (GtkWidget *widget,
cairo_t *cr,
GimpDisplayShell *shell)
{
/* are we in destruction? */
if (! shell->display || ! gimp_display_get_shell (shell->display))
return TRUE;
/* ignore events on overlays */
if (eevent->window == gtk_widget_get_window (widget))
if (gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget)))
{
cairo_t *cr;
cr = gdk_cairo_create (gtk_widget_get_window (shell->canvas));
gdk_cairo_region (cr, eevent->region);
cairo_clip (cr);
if (gimp_display_get_image (shell->display))
{
gimp_display_shell_canvas_draw_image (shell, cr);
@@ -266,8 +235,6 @@ gimp_display_shell_canvas_expose (GtkWidget *widget,
{
gimp_display_shell_canvas_draw_drop_zone (shell, cr);
}
cairo_destroy (cr);
}
return FALSE;
@@ -310,10 +277,13 @@ gimp_display_shell_quick_mask_button_press (GtkWidget *widget,
{
GimpUIManager *manager = gimp_image_window_get_ui_manager (window);
gimp_ui_manager_ui_popup (manager,
"/quick-mask-popup",
GTK_WIDGET (shell),
NULL, NULL, NULL, NULL);
gimp_ui_manager_ui_popup_at_widget (manager,
"/quick-mask-popup",
widget,
GDK_GRAVITY_EAST,
GDK_GRAVITY_SOUTH_WEST,
(GdkEvent *) bevent,
NULL, NULL);
}
return TRUE;
@@ -354,7 +324,9 @@ gimp_display_shell_navigation_button_press (GtkWidget *widget,
if (bevent->type == GDK_BUTTON_PRESS && bevent->button == 1)
{
gimp_navigation_editor_popup (shell, widget, bevent->x, bevent->y);
gimp_navigation_editor_popup (shell, widget,
(GdkEvent *) bevent,
bevent->x, bevent->y);
}
return TRUE;
@@ -553,12 +525,16 @@ gimp_display_shell_canvas_draw_drop_zone (GimpDisplayShell *shell,
#ifdef GIMP_UNSTABLE
{
PangoLayout *layout;
gchar *msg;
GtkAllocation allocation;
gint width;
gint height;
gdouble scale;
GtkWidget *widget = GTK_WIDGET (shell);
GtkStyleContext *context = gtk_widget_get_style_context (widget);
GtkStateFlags state = gtk_widget_get_state_flags (widget);
PangoLayout *layout;
gchar *msg;
GtkAllocation allocation;
gint width;
gint height;
gdouble scale;
GdkRGBA color;
layout = gtk_widget_create_pango_layout (shell->canvas, NULL);
@@ -578,6 +554,9 @@ gimp_display_shell_canvas_draw_drop_zone (GimpDisplayShell *shell,
scale = MIN (((gdouble) allocation.width / 2.0) / (gdouble) width,
((gdouble) allocation.height / 2.0) / (gdouble) height);
gtk_style_context_get_color (context, state, &color);
gdk_cairo_set_source_rgba (cr, &color);
cairo_move_to (cr,
(allocation.width - (width * scale)) / 2,
(allocation.height - (height * scale)) / 2);

View File

@@ -21,13 +21,11 @@
void gimp_display_shell_canvas_realize (GtkWidget *widget,
GimpDisplayShell *shell);
void gimp_display_shell_canvas_realize_after (GtkWidget *widget,
GimpDisplayShell *shell);
void gimp_display_shell_canvas_size_allocate (GtkWidget *widget,
GtkAllocation *alloc,
GimpDisplayShell *shell);
gboolean gimp_display_shell_canvas_expose (GtkWidget *widget,
GdkEventExpose *eevent,
gboolean gimp_display_shell_canvas_draw (GtkWidget *widget,
cairo_t *cr,
GimpDisplayShell *shell);
gboolean gimp_display_shell_origin_button_press (GtkWidget *widget,

View File

@@ -183,7 +183,7 @@ gimp_display_shell_close_dialog (GimpDisplayShell *shell,
g_free (title);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
RESPONSE_SAVE,
GTK_RESPONSE_CLOSE,
GTK_RESPONSE_CANCEL,

View File

@@ -225,8 +225,7 @@ gimp_display_shell_drop_drawable (GtkWidget *widget,
image = gimp_image_new_from_drawable (shell->display->gimp,
GIMP_DRAWABLE (viewable));
gimp_create_display (shell->display->gimp, image, GIMP_UNIT_PIXEL, 1.0,
G_OBJECT (gtk_widget_get_screen (widget)),
gimp_widget_get_monitor (widget));
G_OBJECT (gimp_widget_get_monitor (widget)));
g_object_unref (image);
return;
@@ -460,8 +459,7 @@ gimp_display_shell_drop_buffer (GtkWidget *widget,
image = gimp_image_new_from_buffer (shell->display->gimp,
GIMP_BUFFER (viewable));
gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0,
G_OBJECT (gtk_widget_get_screen (widget)),
gimp_widget_get_monitor (widget));
G_OBJECT (gimp_widget_get_monitor (widget)));
g_object_unref (image);
return;
@@ -584,8 +582,7 @@ gimp_display_shell_drop_uri_list (GtkWidget *widget,
new_image = file_open_with_display (shell->display->gimp, context,
NULL,
file, FALSE,
G_OBJECT (gtk_widget_get_screen (widget)),
gimp_widget_get_monitor (widget),
G_OBJECT (gimp_widget_get_monitor (widget)),
&status, &error);
if (! new_image && status != GIMP_PDB_CANCEL)
@@ -597,8 +594,7 @@ gimp_display_shell_drop_uri_list (GtkWidget *widget,
image = file_open_with_display (shell->display->gimp, context,
GIMP_PROGRESS (shell->display),
file, FALSE,
G_OBJECT (gtk_widget_get_screen (widget)),
gimp_widget_get_monitor (widget),
G_OBJECT (gimp_widget_get_monitor (widget)),
&status, &error);
if (! image && status != GIMP_PDB_CANCEL)
@@ -648,8 +644,7 @@ gimp_display_shell_drop_component (GtkWidget *widget,
dest_image = gimp_image_new_from_component (image->gimp,
image, component);
gimp_create_display (dest_image->gimp, dest_image, GIMP_UNIT_PIXEL, 1.0,
G_OBJECT (gtk_widget_get_screen (widget)),
gimp_widget_get_monitor (widget));
G_OBJECT (gimp_widget_get_monitor (widget)));
g_object_unref (dest_image);
return;
@@ -706,8 +701,7 @@ gimp_display_shell_drop_pixbuf (GtkWidget *widget,
image = gimp_image_new_from_pixbuf (shell->display->gimp, pixbuf,
_("Dropped Buffer"));
gimp_create_display (image->gimp, image, GIMP_UNIT_PIXEL, 1.0,
G_OBJECT (gtk_widget_get_screen (widget)),
gimp_widget_get_monitor (widget));
G_OBJECT (gimp_widget_get_monitor (widget)));
g_object_unref (image);
return;

View File

@@ -42,7 +42,7 @@
#include "gimpdisplayxfer.h"
/* #define GIMP_DISPLAY_RENDER_ENABLE_SCALING 1 */
#define GIMP_DISPLAY_RENDER_ENABLE_SCALING 1
/* public functions */
@@ -160,7 +160,10 @@ gimp_display_shell_draw_image (GimpDisplayShell *shell,
chunk_height = GIMP_DISPLAY_RENDER_BUF_HEIGHT;
#ifdef GIMP_DISPLAY_RENDER_ENABLE_SCALING
/* if we had this future API, things would look pretty on hires (retina) */
/* multiply the image scale-factor by the window scale-factor, and divide
* the cairo scale-factor by the same amount (further down), so that we make
* full use of the screen resolution, even on hidpi displays.
*/
scale *=
gdk_window_get_scale_factor (
gtk_widget_get_window (gtk_widget_get_toplevel (GTK_WIDGET (shell))));

View File

@@ -42,29 +42,14 @@ void
gimp_display_shell_expose_region (GimpDisplayShell *shell,
cairo_region_t *region)
{
GdkWindow *window;
gint n_rectangles;
gint i;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
g_return_if_fail (region != NULL);
if (! gtk_widget_get_realized (shell->canvas))
return;
window = gtk_widget_get_window (shell->canvas);
n_rectangles = cairo_region_num_rectangles (region);
for (i = 0; i < n_rectangles; i++)
{
cairo_rectangle_int_t rectangle;
cairo_region_get_rectangle (region, i, &rectangle);
gdk_window_invalidate_rect (window,
(GdkRectangle *) &rectangle,
TRUE);
}
gdk_window_invalidate_region (gtk_widget_get_window (shell->canvas),
region, TRUE);
}
void

View File

@@ -89,7 +89,7 @@ gimp_display_shell_filter_dialog_new (GimpDisplayShell *shell)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (cdd->dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (cdd->dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);

View File

@@ -78,9 +78,12 @@ gimp_display_shell_has_filter (GimpDisplayShell *shell)
if (shell->filter_stack)
{
GList *filters;
GList *iter;
for (iter = shell->filter_stack->filters; iter; iter = g_list_next (iter))
filters = gimp_color_display_stack_get_filters (shell->filter_stack);
for (iter = filters; iter; iter = g_list_next (iter))
{
if (gimp_color_display_get_enabled (GIMP_COLOR_DISPLAY (iter->data)))
return TRUE;

View File

@@ -24,41 +24,110 @@
#include "display-types.h"
#include "widgets/gimpdevices.h"
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-grab.h"
static GdkDevice *
get_associated_pointer (GdkDevice *device)
{
switch (gdk_device_get_device_type (device))
{
case GDK_DEVICE_TYPE_SLAVE:
device = gdk_device_get_associated_device (device);
break;
case GDK_DEVICE_TYPE_FLOATING:
{
GdkDisplay *display = gdk_device_get_display (device);
GdkDeviceManager *manager = gdk_display_get_device_manager (display);
return gdk_device_manager_get_client_pointer (manager);
}
break;
default:
break;
}
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
device = gdk_device_get_associated_device (device);
return device;
}
static GdkDevice *
get_associated_keyboard (GdkDevice *device)
{
switch (gdk_device_get_device_type (device))
{
case GDK_DEVICE_TYPE_SLAVE:
device = gdk_device_get_associated_device (device);
break;
case GDK_DEVICE_TYPE_FLOATING:
{
GdkDisplay *display = gdk_device_get_display (device);
GdkDeviceManager *manager = gdk_display_get_device_manager (display);
device = gdk_device_manager_get_client_pointer (manager);
}
break;
default:
break;
}
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
device = gdk_device_get_associated_device (device);
return device;
}
gboolean
gimp_display_shell_pointer_grab (GimpDisplayShell *shell,
const GdkEvent *event,
GdkEventMask event_mask)
{
GdkDevice *device;
GdkDevice *source_device;
GdkGrabStatus status;
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
g_return_val_if_fail (shell->pointer_grabbed == FALSE, FALSE);
g_return_val_if_fail (event != NULL, FALSE);
g_return_val_if_fail (shell->grab_pointer == NULL, FALSE);
if (event)
source_device = gimp_devices_get_from_event (shell->display->gimp,
event, &device);
if (gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
{
GdkGrabStatus status;
status = gdk_pointer_grab (gtk_widget_get_window (shell->canvas),
FALSE, event_mask, NULL, NULL,
gdk_event_get_time (event));
if (status != GDK_GRAB_SUCCESS)
{
g_printerr ("%s: gdk_pointer_grab failed with status %d\n",
G_STRFUNC, status);
return FALSE;
}
shell->pointer_grab_time = gdk_event_get_time (event);
device = get_associated_pointer (device);
source_device = NULL;
}
gtk_grab_add (shell->canvas);
status = gdk_device_grab (device,
gtk_widget_get_window (shell->canvas),
GDK_OWNERSHIP_APPLICATION,
FALSE, event_mask, NULL,
gdk_event_get_time (event));
shell->pointer_grabbed = TRUE;
if (status == GDK_GRAB_SUCCESS)
{
shell->grab_pointer = device;
shell->grab_pointer_source = source_device;
shell->grab_pointer_time = gdk_event_get_time (event);
return TRUE;
return TRUE;
}
g_printerr ("%s: gdk_device_grab(%s) failed with status %d\n",
G_STRFUNC, gdk_device_get_name (device), status);
return FALSE;
}
void
@@ -66,46 +135,59 @@ gimp_display_shell_pointer_ungrab (GimpDisplayShell *shell,
const GdkEvent *event)
{
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
g_return_if_fail (shell->pointer_grabbed == TRUE);
g_return_if_fail (event != NULL);
g_return_if_fail (shell->grab_pointer != NULL);
gtk_grab_remove (shell->canvas);
gdk_device_ungrab (shell->grab_pointer, shell->grab_pointer_time);
if (event)
{
gdk_display_pointer_ungrab (gtk_widget_get_display (shell->canvas),
shell->pointer_grab_time);
shell->pointer_grab_time = 0;
}
shell->pointer_grabbed = FALSE;
shell->grab_pointer = NULL;
shell->grab_pointer_source = NULL;
shell->grab_pointer_time = 0;
}
gboolean
gimp_display_shell_keyboard_grab (GimpDisplayShell *shell,
const GdkEvent *event)
{
GdkGrabStatus status;
GdkDevice *device;
GdkDevice *source_device;
GdkGrabStatus status;
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
g_return_val_if_fail (shell->keyboard_grabbed == FALSE, FALSE);
g_return_val_if_fail (shell->grab_keyboard == NULL, FALSE);
status = gdk_keyboard_grab (gtk_widget_get_window (shell->canvas),
FALSE,
gdk_event_get_time (event));
source_device = gimp_devices_get_from_event (shell->display->gimp,
event, &device);
if (status != GDK_GRAB_SUCCESS)
if (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD)
{
g_printerr ("%s: gdk_keyboard_grab failed with status %d\n",
G_STRFUNC, status);
return FALSE;
device = get_associated_keyboard (device);
source_device = NULL;
}
shell->keyboard_grabbed = TRUE;
shell->keyboard_grab_time = gdk_event_get_time (event);
status = gdk_device_grab (device,
gtk_widget_get_window (shell->canvas),
GDK_OWNERSHIP_APPLICATION,
FALSE,
GDK_KEY_PRESS_MASK |
GDK_KEY_RELEASE_MASK |
GDK_FOCUS_CHANGE_MASK,
NULL, gdk_event_get_time (event));
return TRUE;
if (status == GDK_GRAB_SUCCESS)
{
shell->grab_keyboard = device;
shell->grab_keyboard_source = source_device;
shell->grab_keyboard_time = gdk_event_get_time (event);
return TRUE;
}
g_printerr ("%s: gdk_device_grab(%s) failed with status %d\n",
G_STRFUNC, gdk_device_get_name (device), status);
return FALSE;
}
void
@@ -114,11 +196,11 @@ gimp_display_shell_keyboard_ungrab (GimpDisplayShell *shell,
{
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
g_return_if_fail (event != NULL);
g_return_if_fail (shell->keyboard_grabbed == TRUE);
g_return_if_fail (shell->grab_keyboard != NULL);
gdk_display_keyboard_ungrab (gtk_widget_get_display (shell->canvas),
shell->keyboard_grab_time);
gdk_device_ungrab (shell->grab_keyboard, shell->grab_keyboard_time);
shell->keyboard_grabbed = FALSE;
shell->keyboard_grab_time = 0;
shell->grab_keyboard = NULL;
shell->grab_keyboard_source = NULL;
shell->grab_keyboard_time = 0;
}

View File

@@ -1017,8 +1017,7 @@ gimp_display_shell_monitor_res_notify_handler (GObject *config,
{
if (GIMP_DISPLAY_CONFIG (config)->monitor_res_from_gdk)
{
gimp_get_monitor_resolution (gtk_widget_get_screen (GTK_WIDGET (shell)),
gimp_widget_get_monitor (GTK_WIDGET (shell)),
gimp_get_monitor_resolution (gimp_widget_get_monitor (GTK_WIDGET (shell)),
&shell->monitor_xres,
&shell->monitor_yres);
}

View File

@@ -116,7 +116,6 @@ layer_select_new (GimpDisplayShell *shell,
GtkWidget *frame1;
GtkWidget *frame2;
GtkWidget *hbox;
GtkWidget *alignment;
layer_select = g_slice_new0 (LayerSelect);
@@ -151,11 +150,7 @@ layer_select_new (GimpDisplayShell *shell,
gtk_container_add (GTK_CONTAINER (frame2), hbox);
gtk_widget_show (hbox);
/* The view */
alignment = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
gtk_box_pack_start (GTK_BOX (hbox), alignment, FALSE, FALSE, 0);
gtk_widget_show (alignment);
/* the view */
layer_select->view =
gimp_view_new_by_types (gimp_get_user_context (image->gimp),
GIMP_TYPE_VIEW,
@@ -165,9 +160,8 @@ layer_select_new (GimpDisplayShell *shell,
gimp_display_shell_get_color_config (shell));
gimp_view_set_viewable (GIMP_VIEW (layer_select->view),
GIMP_VIEWABLE (layer));
gtk_container_add (GTK_CONTAINER (alignment), layer_select->view);
gtk_box_pack_start (GTK_BOX (hbox), layer_select->view, FALSE, FALSE, 0);
gtk_widget_show (layer_select->view);
gtk_widget_show (alignment);
/* the layer name label */
layer_select->label = gtk_label_new (gimp_object_get_name (layer));

View File

@@ -124,7 +124,7 @@ gimp_display_shell_rotate_dialog (GimpDisplayShell *shell)
NULL);
gtk_dialog_set_alternative_button_order (GTK_DIALOG (shell->rotate_dialog),
gimp_dialog_set_alternative_button_order (GTK_DIALOG (shell->rotate_dialog),
GTK_RESPONSE_OK,
GTK_RESPONSE_CANCEL,
-1);
@@ -155,8 +155,8 @@ gimp_display_shell_rotate_dialog (GimpDisplayShell *shell)
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
data->rotate_adj = (GtkAdjustment *)
gtk_adjustment_new (shell->rotate_angle, 0.0, 360.0, 1, 15, 0);
data->rotate_adj = gtk_adjustment_new (shell->rotate_angle,
0.0, 360.0, 1, 15, 0);
spin = gtk_spin_button_new (data->rotate_adj, 1.0, 2);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spin), TRUE);

Some files were not shown because too many files have changed in this diff Show More