Commit 25589863 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/display/gimpdisplayshell-callbacks.c app/display/gimpdisplayshell.c

2004-04-15  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell.c
	* app/widgets/gimpcontainertreeview.c: removed runtime version
	checks and workarounds for bugs which are fixed in GTK+ 2.4.

	* app/widgets/gimpfiledialog.c
	(gimp_file_dialog_selection_changed): added runtime check for GTK+
	2.4.1 and work around GtkFileChooser's missing "update_preview"
	functionality for multiple selections if the dependency is not
	met.

	* app/widgets/gimpwidgets-utils.c (gimp_menu_position)
	(gimp_menu_button_position): call gtk_menu_set_monitor() until
	bug #139187 is fixed.
parent 2f2301c9
2004-04-15 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell.c
* app/widgets/gimpcontainertreeview.c: removed runtime version
checks and workarounds for bugs which are fixed in GTK+ 2.4.
* app/widgets/gimpfiledialog.c
(gimp_file_dialog_selection_changed): added runtime check for GTK+
2.4.1 and work around GtkFileChooser's missing "update_preview"
functionality for multiple selections if the dependency is not
met.
* app/widgets/gimpwidgets-utils.c (gimp_menu_position)
(gimp_menu_button_position): call gtk_menu_set_monitor() until
bug #139187 is fixed.
2004-04-15 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpfiledialog.[ch]: derive it from GtkFileChooser
......
......@@ -133,30 +133,6 @@ gimp_display_shell_events (GtkWidget *widget,
if (gimp->busy)
return TRUE;
#ifdef G_OS_WIN32
/* work around missing GDK_BUTTON*_MASK bits in GdkEventKey::state
* (see http://bugzilla.gnome.org/show_bug.cgi?id=136636)
*/
if (gtk_check_version (2, 2, 5))
{
GdkModifierType mouse_mask;
gdk_device_get_state (gimp_devices_get_current (gimp),
widget->window, NULL, &mouse_mask);
if (mouse_mask & GDK_BUTTON1_MASK)
kevent->state |= GDK_BUTTON1_MASK;
if (mouse_mask & GDK_BUTTON2_MASK)
kevent->state |= GDK_BUTTON2_MASK;
if (mouse_mask & GDK_BUTTON3_MASK)
kevent->state |= GDK_BUTTON3_MASK;
if (mouse_mask & GDK_BUTTON4_MASK)
kevent->state |= GDK_BUTTON4_MASK;
if (mouse_mask & GDK_BUTTON5_MASK)
kevent->state |= GDK_BUTTON5_MASK;
}
#endif /* G_OS_WIN32 */
/* do not process any key events while BUTTON1 is down. We do this
* so tools keep the modifier state they were in when BUTTON1 was
* pressed and to prevent accelerators from being invoked.
......
......@@ -661,10 +661,9 @@ gimp_display_shell_new (GimpDisplay *gdisp,
/* make sure we can activate accels even if the menubar is invisible
* (see http://bugzilla.gnome.org/show_bug.cgi?id=137151)
*/
if (! gtk_check_version (2, 4, 0))
g_signal_connect (menubar, "can-activate-accel",
G_CALLBACK (gtk_true),
NULL);
g_signal_connect (menubar, "can-activate-accel",
G_CALLBACK (gtk_true),
NULL);
/* active display callback */
g_signal_connect (menubar, "button_press_event",
......
......@@ -627,13 +627,6 @@ gimp_container_tree_view_select_item (GimpContainerView *view,
gtk_tree_view_set_cursor (tree_view->view, path, NULL, FALSE);
#ifdef __GNUC__
#warning FIXME: remove this hack as soon as we depend on GTK+ 2.2.3
#endif
/* gtk_tree_view_set_cursor() should be sufficient actually... */
if (gtk_check_version (2, 2, 3) != NULL)
gtk_tree_selection_select_iter (tree_view->selection, iter);
g_signal_handlers_unblock_by_func (tree_view->selection,
gimp_container_tree_view_selection_changed,
tree_view);
......
......@@ -389,7 +389,7 @@ gimp_file_dialog_selection_changed (GtkFileChooser *chooser,
{
GSList *uris = gtk_file_chooser_get_uris (chooser);
if (FALSE /* gtk_check_version (2, 4, 1) */)
if (gtk_check_version (2, 4, 1))
{
if (uris)
gimp_thumb_box_set_uri (GIMP_THUMB_BOX (dialog->thumb_box), uris->data);
......
......@@ -321,6 +321,9 @@ gimp_menu_position (GtkMenu *menu,
gtk_menu_set_screen (menu, screen);
if (TRUE /* gtk_check_version (2, 4, 1) */)
gtk_menu_set_monitor (menu, monitor);
gtk_widget_size_request (widget, &requisition);
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
......@@ -394,6 +397,9 @@ gimp_button_menu_position (GtkWidget *button,
gtk_menu_set_screen (menu, screen);
if (TRUE /* gtk_check_version (2, 4, 1) */)
gtk_menu_set_monitor (menu, monitor);
*x += button->allocation.x;
switch (position)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment