mirror of https://github.com/GNOME/gimp.git
do not any longer accept middle-mouse-button paste on the toolbox buttons
2008-04-25 Sven Neumann <sven@gimp.org> * app/widgets/gimptoolbox.c: do not any longer accept middle-mouse-button paste on the toolbox buttons but use the toolbox drop area for that. svn path=/trunk/; revision=25521
This commit is contained in:
parent
c42698d65d
commit
97861975b1
|
@ -1,3 +1,9 @@
|
||||||
|
2008-04-25 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/widgets/gimptoolbox.c: do not any longer accept
|
||||||
|
middle-mouse-button paste on the toolbox buttons but use the
|
||||||
|
toolbox drop area for that.
|
||||||
|
|
||||||
2008-04-25 Sven Neumann <sven@gimp.org>
|
2008-04-25 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/actions/dock-actions.c (dock_actions): removed default
|
* app/actions/dock-actions.c (dock_actions): removed default
|
||||||
|
|
|
@ -65,35 +65,37 @@
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
|
|
||||||
static GObject * gimp_toolbox_constructor (GType type,
|
static GObject * gimp_toolbox_constructor (GType type,
|
||||||
guint n_params,
|
guint n_params,
|
||||||
GObjectConstructParam *params);
|
GObjectConstructParam *params);
|
||||||
|
|
||||||
static gboolean gimp_toolbox_delete_event (GtkWidget *widget,
|
static gboolean gimp_toolbox_delete_event (GtkWidget *widget,
|
||||||
GdkEventAny *event);
|
GdkEventAny *event);
|
||||||
static void gimp_toolbox_size_allocate (GtkWidget *widget,
|
static void gimp_toolbox_size_allocate (GtkWidget *widget,
|
||||||
GtkAllocation *allocation);
|
GtkAllocation *allocation);
|
||||||
static void gimp_toolbox_style_set (GtkWidget *widget,
|
static void gimp_toolbox_style_set (GtkWidget *widget,
|
||||||
GtkStyle *previous_style);
|
GtkStyle *previous_style);
|
||||||
static gboolean gimp_toolbox_expose_event (GtkWidget *widget,
|
static gboolean gimp_toolbox_button_press_event (GtkWidget *widget,
|
||||||
GdkEventExpose *event);
|
GdkEventButton *event);
|
||||||
|
static gboolean gimp_toolbox_expose_event (GtkWidget *widget,
|
||||||
|
GdkEventExpose *event);
|
||||||
|
|
||||||
static void gimp_toolbox_book_added (GimpDock *dock,
|
static void gimp_toolbox_book_added (GimpDock *dock,
|
||||||
GimpDockbook *dockbook);
|
GimpDockbook *dockbook);
|
||||||
static void gimp_toolbox_book_removed (GimpDock *dock,
|
static void gimp_toolbox_book_removed (GimpDock *dock,
|
||||||
GimpDockbook *dockbook);
|
GimpDockbook *dockbook);
|
||||||
static void gimp_toolbox_set_geometry (GimpToolbox *toolbox);
|
static void gimp_toolbox_set_geometry (GimpToolbox *toolbox);
|
||||||
|
|
||||||
static void toolbox_separator_expand (GimpToolbox *toolbox);
|
static void toolbox_separator_expand (GimpToolbox *toolbox);
|
||||||
static void toolbox_separator_collapse (GimpToolbox *toolbox);
|
static void toolbox_separator_collapse (GimpToolbox *toolbox);
|
||||||
static void toolbox_create_tools (GimpToolbox *toolbox,
|
static void toolbox_create_tools (GimpToolbox *toolbox,
|
||||||
GimpContext *context);
|
GimpContext *context);
|
||||||
static GtkWidget * toolbox_create_color_area (GimpToolbox *toolbox,
|
static GtkWidget * toolbox_create_color_area (GimpToolbox *toolbox,
|
||||||
GimpContext *context);
|
GimpContext *context);
|
||||||
static GtkWidget * toolbox_create_foo_area (GimpToolbox *toolbox,
|
static GtkWidget * toolbox_create_foo_area (GimpToolbox *toolbox,
|
||||||
GimpContext *context);
|
GimpContext *context);
|
||||||
static GtkWidget * toolbox_create_image_area (GimpToolbox *toolbox,
|
static GtkWidget * toolbox_create_image_area (GimpToolbox *toolbox,
|
||||||
GimpContext *context);
|
GimpContext *context);
|
||||||
|
|
||||||
static void toolbox_area_notify (GimpGuiConfig *config,
|
static void toolbox_area_notify (GimpGuiConfig *config,
|
||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
|
@ -143,6 +145,7 @@ gimp_toolbox_class_init (GimpToolboxClass *klass)
|
||||||
widget_class->delete_event = gimp_toolbox_delete_event;
|
widget_class->delete_event = gimp_toolbox_delete_event;
|
||||||
widget_class->size_allocate = gimp_toolbox_size_allocate;
|
widget_class->size_allocate = gimp_toolbox_size_allocate;
|
||||||
widget_class->style_set = gimp_toolbox_style_set;
|
widget_class->style_set = gimp_toolbox_style_set;
|
||||||
|
widget_class->button_press_event = gimp_toolbox_button_press_event;
|
||||||
widget_class->expose_event = gimp_toolbox_expose_event;
|
widget_class->expose_event = gimp_toolbox_expose_event;
|
||||||
|
|
||||||
dock_class->book_added = gimp_toolbox_book_added;
|
dock_class->book_added = gimp_toolbox_book_added;
|
||||||
|
@ -475,6 +478,25 @@ gimp_toolbox_style_set (GtkWidget *widget,
|
||||||
gimp_toolbox_set_geometry (GIMP_TOOLBOX (widget));
|
gimp_toolbox_set_geometry (GIMP_TOOLBOX (widget));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gimp_toolbox_button_press_event (GtkWidget *widget,
|
||||||
|
GdkEventButton *event)
|
||||||
|
{
|
||||||
|
if (event->type == GDK_BUTTON_PRESS && event->button == 2)
|
||||||
|
{
|
||||||
|
GtkClipboard *clipboard;
|
||||||
|
|
||||||
|
clipboard = gtk_widget_get_clipboard (widget, GDK_SELECTION_PRIMARY);
|
||||||
|
gtk_clipboard_request_text (clipboard,
|
||||||
|
toolbox_paste_received,
|
||||||
|
g_object_ref (GIMP_DOCK (widget)->context));
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gimp_toolbox_expose_event (GtkWidget *widget,
|
gimp_toolbox_expose_event (GtkWidget *widget,
|
||||||
GdkEventExpose *event)
|
GdkEventExpose *event)
|
||||||
|
@ -889,16 +911,6 @@ toolbox_tool_button_press (GtkWidget *widget,
|
||||||
"gimp-tool-options",
|
"gimp-tool-options",
|
||||||
-1);
|
-1);
|
||||||
}
|
}
|
||||||
else if (event->type == GDK_BUTTON_PRESS && event->button == 2)
|
|
||||||
{
|
|
||||||
GimpContext *context = GIMP_DOCK (toolbox)->context;
|
|
||||||
GtkClipboard *clipboard;
|
|
||||||
|
|
||||||
clipboard = gtk_widget_get_clipboard (widget, GDK_SELECTION_PRIMARY);
|
|
||||||
gtk_clipboard_request_text (clipboard,
|
|
||||||
toolbox_paste_received,
|
|
||||||
g_object_ref (context));
|
|
||||||
}
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue