Commit 8404a9e4 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

use the viewable's description in the drag icon. Use a larger preview.

2005-06-04  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdnd.c (gimp_dnd_get_viewable_icon): use the
	viewable's description in the drag icon. Use a larger preview.

	* app/widgets/gimpdockbook.c: tweak spacing and border-width of
	the tab widget if it is being used as drag icon.
parent 77a4fe58
2005-06-04 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdnd.c (gimp_dnd_get_viewable_icon): use the
viewable's description in the drag icon. Use a larger preview.
* app/widgets/gimpdockbook.c: tweak spacing and border-width of
the tab widget if it is being used as drag icon.
2005-06-04 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpcolorarea.[ch]: invalidate the buffer when
......
......@@ -57,8 +57,8 @@
#include "gimp-intl.h"
#define DRAG_PREVIEW_SIZE 32
#define DRAG_ICON_OFFSET -8
#define DRAG_PREVIEW_SIZE GIMP_VIEW_SIZE_LARGE
#define DRAG_ICON_OFFSET -8
#ifdef DEBUG_DND
......@@ -1702,7 +1702,7 @@ gimp_dnd_get_viewable_icon (GtkWidget *widget,
{
GimpViewable *viewable;
GtkWidget *view;
const gchar *name;
gchar *desc;
viewable = (* (GimpDndDragViewableFunc) get_viewable_func) (widget,
get_viewable_data);
......@@ -1712,9 +1712,9 @@ gimp_dnd_get_viewable_icon (GtkWidget *widget,
view = gimp_view_new (viewable, DRAG_PREVIEW_SIZE, 0, TRUE);
name = gimp_object_get_name (GIMP_OBJECT (viewable));
desc = gimp_viewable_get_description (viewable, NULL);
if (name && *name)
if (desc)
{
GtkWidget *hbox;
GtkWidget *label;
......@@ -1725,7 +1725,7 @@ gimp_dnd_get_viewable_icon (GtkWidget *widget,
gtk_widget_show (view);
label = g_object_new (GTK_TYPE_LABEL,
"label", name,
"label", desc,
"xpad", 3,
"xalign", 0.0,
"yalign", 0.5,
......@@ -1733,6 +1733,8 @@ gimp_dnd_get_viewable_icon (GtkWidget *widget,
"ellipsize", PANGO_ELLIPSIZE_END,
NULL);
g_free (desc);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
gtk_widget_show (label);
......
......@@ -43,7 +43,7 @@
#define DEFAULT_TAB_BORDER 0
#define DEFAULT_TAB_ICON_SIZE GTK_ICON_SIZE_BUTTON
#define DND_WIDGET_ICON_SIZE GTK_ICON_SIZE_DND
#define DND_WIDGET_ICON_SIZE GTK_ICON_SIZE_BUTTON
#define MENU_WIDGET_ICON_SIZE GTK_ICON_SIZE_MENU
#define MENU_WIDGET_SPACING 4
......@@ -514,13 +514,11 @@ gimp_dockbook_tab_drag_begin (GtkWidget *widget,
GdkDragContext *context,
gpointer data)
{
GimpDockable *dockable;
GimpDockable *dockable = GIMP_DOCKABLE (data);
GtkWidget *window;
GtkWidget *frame;
GtkWidget *view;
dockable = GIMP_DOCKABLE (data);
window = gtk_window_new (GTK_WINDOW_POPUP);
frame = gtk_frame_new (NULL);
......@@ -532,6 +530,13 @@ gimp_dockbook_tab_drag_begin (GtkWidget *widget,
dockable->context,
GIMP_TAB_STYLE_ICON_BLURB,
DND_WIDGET_ICON_SIZE);
if (GTK_IS_CONTAINER (view))
gtk_container_set_border_width (GTK_CONTAINER (view), 3);
if (GTK_IS_HBOX (view))
gtk_box_set_spacing (GTK_BOX (view), 6);
gtk_container_add (GTK_CONTAINER (frame), view);
gtk_widget_show (view);
......
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