Commit Graph

280 Commits

Author SHA1 Message Date
Kristian Rietveld 7c35d75bf9 Bug 776294 - Screenshot buttons cannot be clicked
Disable the new "automatic window tabbing" feature introduced on macOS
Sierra. It breaks GTK+ applications and we would need proper support for
this in GTK+ if we want to use it.
2016-12-28 16:14:40 +01:00
Jehan c0ee95995f app: save menurc after having deleted all the displays.
Some actions are not meant to be saved, in particular the
"windows-display-*" which have only a meaning during a same session
since display IDs are session-dependent. So let display deletion
happen first so that proper cleaning of action is done when writing
menurc.
2016-11-25 04:48:01 +01:00
Jehan 2a232398c4 app: check and clean out duplicate accelerators on startup.
Duplicate accelerators are not supposed to happen. It is not possible
to set them through the GUI in particular. Nevertheless
gtk_accel_map_load() would apparently let duplicates pass, which could
happen after editing the menurc directly, or using the development
version (no action name migration happens there), or simply after a
potential bug. This is then very annoying because you may see several
actions displaying the same shortcut but only one actually work. And
trying to re-set through GUI the shortcut to the one action you wish to
run does not fix the duplicate issue (you have to laboriously find which
other action use the same accelerator and delete it first).
Better be safe than sorry and make a quick check at startup, then delete
the accelerator on one of the duplicates (you can't guess which one was
actually wanted, but at least you will facilitate manual reset through
the GUI).
2016-11-21 17:06:16 +01:00
Michael Natterer 70d6cd906c app: connect the Gimp instance's clipboard_image to the system clipboard
In gui.c's "clipboard-changed" callback, check for the clipboard_image
and set it on GimpClipboard.
2016-09-19 20:14:21 +02:00
Michael Natterer d85157c376 app: rename gimp->global_buffer to gimp->clipboard_buffer
Also rename the "buffer-changed" signal and the setter, and add a
getter.
2016-09-17 17:39:54 +02:00
Michael Natterer 69f87bcc84 libgimpwidgets: be smarter when changing icon themes, and have fallbacks
Add gimp_stock_set_icon_theme() which can be called at any time, also
before gimp_stock_init(), in which case we avoid setting the configured
icon theme twice on startup. Call it from libgimp/gimpui.c and
from app/gui/icon-themes.c so the app and plug-ins use the same
icon theme.
2015-12-12 19:32:11 +01:00
Benoit Touchette 6762bf5b9b Bug 759105 - Patch to add icon theme selection
Add support for custom icon themes much like custom theme
support. There is still work to be done but this is the
basic functionality.
2015-12-09 12:50:15 +01:00
Michael Natterer ac90ba1dc4 app: move color history loading/saving to core/gimp-palettes.c
and remove gui/color-history.[ch] completely.
2014-11-27 01:10:46 +01:00
su-v 97d6629d66 Bug 731446 - Files opened twice via command line
Prevent Cocoa command line argument parsing for files, using
same fix as in Gedit commit 86e7dd7b72fc35c6d9b19a75bbc715aee19304b4
2014-09-06 01:06:43 +02:00
Michael Natterer 50ca9068da app: more cleanup in the action history code, mostly general consistency 2014-07-29 12:28:18 +02:00
Michael Natterer c885af6c3e app: only add supported image files to the document history
Initialize the history after plug-ins, and check each item listed by
GtkRecentManager against the mime-types supported by our load
plug-ins.
2014-07-04 20:01:08 +02:00
Michael Natterer 8aa6ff9608 Bug 731389 - gimp-edit-copy causes assertion failure on exit
Shutdown the clipboard earlier at exit, it runs quite some code on
storing the copied buffer.
2014-06-10 01:35:30 +02:00
Michael Natterer 0d4e40da7b app: clean up some disabled code 2014-06-06 23:45:00 +02:00
Michael Natterer ddc1c1d22d app: #if 0 some debug code in gui/gui.c which I accidentially pushed 2014-05-07 21:32:09 +02:00
Michael Natterer 0d2d1c3752 app: port most of app's GUI from stock IDs to icon names
There is still quite some stock ID rendering around, stay tuned...
2014-05-07 15:30:38 +02:00
Michael Natterer 8356003fa2 app: pass the startup monitor to displays opened from the copmmand line
Change gimp_get_display_name() to also return the screen, and its
implementation in the GUI to return the initial monitor during
startup. Retrieve that information in app.c using a weird callback
construct and pass the monitor to file_open_from_command_line().

Half-related, add screen and monitor parameters to GimpDisplayShell
and use these initial values for calculating the canvas's initial
extents.

The image windows still don't position themselves correctly though
because we have no mechanism for that whatsoever just yet, but we now
at least pass the needed monitor information to the right objects.
2014-05-03 00:54:20 +02:00
Michael Natterer 7cdede6dec app: rename gimp_get_screen_resolution() to get_monitor_resolution()
Add a "monitor" parameter and return something reasonable, instead
of a useless resolution average of all the screen's monitors. Also
require a screen to be passed now.
2014-05-02 23:58:14 +02:00
Michael Natterer 62257edb3e app: make sure the GUI appears on the same monitor as the splash
Manually figure the monitor where the pointer is and pass it to the
splash, the empty image window and to session_restore() explicly.
2014-05-02 21:16:17 +02:00
Michael Natterer 7f23fbec34 app: add screen and monitor to all display and image window constructors
so they appear on the proper monitor as well.
2014-05-02 20:21:41 +02:00
Michael Natterer 051374a1b6 app: add gimp_get_monitor_at_pointer()
and use it instead of duplicating that code several times.
2014-05-02 13:23:25 +02:00
Michael Natterer 843866e7e7 app: make things behave more reasonable with multiple monitors
There is now a preference option that determines whether windows
should be opened on the same monitor as before. It should be disabled
when the machine gets monitors plugged/unplugged dynamically ("laptop")
and enabled when there is a static multi-monitor setup ("wokstation").
This is merely the current simplistic policy on top of the newly added
underlying infrastructure:

- pass integer monitor numbers around in all places where we already
  pass around a GdkScreen. Pass the "current" monitor to these changed
  APIs, where "current" is either the monitor where the action-triggering
  widget is, or if that is unavailable the monitor where the mouse is.

- add gimp_widget_get_monitor() in order to easily get to the monitor,
  just like gtk_widget_get_screen().

- add screen and monitor parameters in some places that were missed
  before.

- in sessionrc, save all window positions relative to the window's
  monitor, and save the monitor separately, if it's not the screen's
  primary monitor.

- when restoring window positions, use the stored monitor when the new
  prefs options says so (use the screen's primary monitor if there is
  no stored monitor), otherwise use current monitor that is now passed
  around.
2014-05-02 03:01:23 +02:00
su-v 1876333531 Bug 724782 - git master fails to build on OS X with gtk-mac-integration
Delete the re-inserted 'ige_mac_menu_add_app_menu_group()' function
call. GIMP has migrated to external gtk-mac-integration for the global
menubar integration - ige_mac_menu* functions are no longer available.
2014-02-21 19:49:38 +01:00
Michael Natterer 36f87b5b2b app: clean up the new action search a bit
- order some stuff alphabetically and consistently
- move action from help-actions to dialogs-actions
- fix OS/X menu item fiddling (untested)
2014-02-18 20:10:24 +01:00
Jehan 5903e53d51 Bug 708174 - Improve the original search dialog patch.
Fix various bugs, improve code design and efficiency, change feature
name, update the feature up to our standards (now uses GIMP preferences,
session management, less overwhelming settings...).
Also now action history is tightly tied to GimpAction and logs all
action activation (however it activates, and the show_unavailable
parameter also applies to history).
Search algorithm greatly improved with basic tokenization, better
ordering, filtering, etc.
2014-02-18 19:13:03 +01:00
Srihari fc8f6c127f Bug 708174 - A text based intent driving tool for GIMP (Tito) 2014-02-18 19:13:03 +01:00
Jehan 2707cff890 app: update a comment for translators.
The current comment is technical and not meant for translators, but it
ends up in po file. Move it where it won't be extracted and add a real
comment for translators. Ideally this string should not be extracted by
xgettext, but it won't verify domains.
2013-12-14 10:26:55 +13:00
Jehan 735f00b886 Bug 679214 - widget direction set to system locale, not user-set lang
In particular a RTL-localized OS, where the user sets GIMP to a LTR lang
would still have a RTL UI (menus, etc.). And vice versa.
2013-12-11 13:14:09 +13:00
Daniel Sabo e56344294c app: Port to gtk-mac-integration
Replace deprecated Carbon APIs with Cocoa.

Includes code by:
Simone Karin Lehmann
Michael Natterer
Daniel Sabo
2013-11-10 18:22:01 +01:00
Jehan a129f84c68 Bug 704592 - only load language lists once at gui startup.
Improvements:
- setenv/getenv() are not thread-safe, hence they should be run only at
startup before any threading occurs.
- it is counter-productive to load the huge ISO-639 XML file each time
the user opens the Preferences dialog or the text tool options.
2013-07-28 04:46:52 +12:00
Michael Natterer 531709c8db Depend on ATK 2.2.0, GTK+ 2.24.10, GdkPixbuf 2.24.1
And do some final NEWS adjustments for RC1
2012-04-03 00:53:04 +02:00
Michael Natterer d43b127484 app: move all prefs menu items to the mac application menu
and add a utility function that does the moving.
2011-12-18 01:24:29 +01:00
Michael Natterer 3673549257 Depend on lots of newer library versions
Gegl >= 0.1.8, Babl >= 0.1.6, Gdk-Pixbuf >= 1.24.0, Pango >= 1.29.4,
GLib >= 2.28.8, GTK+ 2.24.7

Which means depending on a gazillion of bug fixes, which means less
pain for GIMP 2.8 users, and less useless bugzilla traffic eating
developer resources.
2011-11-19 18:16:39 +01:00
Martin Nordholts 066cdf6d74 app: Pass gimp to gui_restore_after_callback()
Pass gimp in gui_restore_after_callback() to
gui_restore_after_callback() so we can update properly.
2011-07-20 16:36:36 +02:00
Martin Nordholts a2a95bc16e app: Don't disable single-window mode right before exiting
Don't disable single-window mode right before exiting because the
single-window mode dock layout is now remembered across sessions.
2011-06-04 12:22:20 +02:00
Michael Natterer 4a73ac6869 app: add a newline 2011-04-07 23:47:27 +02:00
Michael Natterer 24ee3370b8 Depend on GTK+ >= 2.24.3, cairo >= 1.20.1, gdk-pixbuf >= 2.22.1
and completely separate configure and sanity checks for gdk-pixbuf
from GTK+, because it's now distributed as a separate package. Remove
all sorts of conditional compiling based on GDK_CHECK_VERSION() and
CAIRO_VERSION.
2011-04-06 19:58:24 +02:00
Michael Natterer ee844c6395 app: GimpDeviceManager refactoring part two
- change gimp_devices_get_list() to gimp_devices_get_manager()
- remove gimp_devices_get_current()
- let GimpDeviceStatus connect to the manager's "notify::current-device"
  directly and remove device status updating code from gui.c
- cleanup in gimpdevices.c
2011-02-28 14:37:00 +01:00
Michael Natterer 21a0e55005 app: device manager refactoring part one
Add a GimpDeviceManager object and take over most code from
gimpdevices.c, but leave all functions in gimpdevices.c there as
wrappers in order to make rebasing in gtk3-port simpler.
2011-02-28 12:57:15 +01:00
Michael Natterer 79f0f5639b Don't use gtk_container_add() for adding to GtkBoxes
because the packing options are different for GtkH/VBox and GtkBox
itself which is now instantiable. Instead, always use
gtk_box_pack_start() and specify expanding explicitely.
2010-10-30 14:57:56 +02:00
Sven Neumann 868fdcf99f app: remove min-colors and install-colormap properties from gimprc 2010-10-19 10:13:01 +02:00
Sven Neumann 260c8560e4 app: remove gimp_display_shell_render_{init,exit}
The functions had become mostly obsolete and we can just use a
static scratch buffer for rendering.
2010-09-29 20:34:59 +02:00
Martin Nordholts b55c545359 app: Kill UI configurer gracefully
Kill UI configurer gracefully so it's easier to find real leaks.
2010-06-24 22:59:37 +02:00
Michael Natterer 6eda16d550 app: call dialogs_exit() after controllers_exit() and devices_exit()
which would have been the correct oder all the time, because these
systems are initialized in reverse order. The wrong order didn't
matter until now, but for some reason it now sometimes triggered
warnings about dialog_factories being NULL during controllers
shutdown.
2010-06-18 09:11:14 +02:00
Michael Natterer a0358f7c64 Depend on GLib >= 2.24.0 and GTK+ 2.20.0 2010-04-19 19:03:08 +02:00
Martin Nordholts 798e2e67e9 app: Move toolbox special casing into dialog factory
Move toolbox special casing into
gimp_dialog_factory_dialog_new_internal() and on the fly fix problems
with double toolboxes appearing and sometimes not appearing.
2010-03-02 22:38:15 +01:00
Martin Nordholts 11b1300b6f app: Introduce gimp_dialog_factory_get_singleton()
Instead of including dialogs/dialogs.h everywhere, introduce
gimp_dialog_factory_get_singleton(). The dialog factory singleton is
still initialized by dialogs.c though.

Right now the assumption is that we never will have another dialog
factory instance around. There were so many problems before when we
had four of them, so let's just keep one of them around.
2010-02-28 23:23:24 +01:00
Martin Nordholts f0ba888c06 app: Don't show toolbox when last image is closed
Don't show toolbox when last image is closed. We don't need to do that
any longer after the introduction of the empty image window.
2010-02-20 14:28:08 +01:00
Martin Nordholts 8b458fb591 app: Merge "toplevel" and "dock" dialog factories
Merge "toplevel" and "dock" dialog factories. The end goal is to have
only one dialog factory.
2010-02-20 09:28:26 +01:00
Martin Nordholts 66197c5d11 app: global_dock_window_factory -> global_dock_factory
Rename back global_dock_window_factory to
global_dock_factory. Renaming to global_dock_window_factory was done
under the assumption that there would be a separate factory that would
create non-toplevel dockables, but I don't expect this to happen in
the forseeable future.
2010-01-19 22:40:06 +01:00
Martin Nordholts 33573b466b app: Check for dirty images before forcing single-window mode
Check for dirty images before forcing single-window mode since it is
annoying to have the UI split up and _then_ being asked about unsaved
images. The user might even click 'Cancel' in which case the UI will
have been switched to multi-window mode.
2010-01-06 18:19:20 +01:00