Makefile.am removed new file Use a bitmap in the style of the eye instead
Wed Jul 7 20:33:24 MEST 1999 Sven Neumann <sven@gimp.org> * Makefile.am * pixmaps/locked.xpm: removed * pixmaps/locked.xbm: new file * app/paths_dialog.c: Use a bitmap in the style of the eye instead of the lock pixmap. This could be done more elegantly, but the paths_dialog is a mess, sorry.
This commit is contained in:

committed by
Sven Neumann

parent
9df8a5b13c
commit
085eeb9f55
@ -1,3 +1,12 @@
|
|||||||
|
Wed Jul 7 20:33:24 MEST 1999 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* Makefile.am
|
||||||
|
* pixmaps/locked.xpm: removed
|
||||||
|
* pixmaps/locked.xbm: new file
|
||||||
|
* app/paths_dialog.c: Use a bitmap in the style of the eye instead of
|
||||||
|
the lock pixmap. This could be done more elegantly, but the
|
||||||
|
paths_dialog is a mess, sorry.
|
||||||
|
|
||||||
1999-07-07 Michael Natterer <mitschel@cs.tu-berlin.de>
|
1999-07-07 Michael Natterer <mitschel@cs.tu-berlin.de>
|
||||||
|
|
||||||
* app/gdisplay.c (gdisplay_set_menu_sensitivity): don't make menus
|
* app/gdisplay.c (gdisplay_set_menu_sensitivity): don't make menus
|
||||||
|
@ -38,7 +38,7 @@ EXTRA_DIST = \
|
|||||||
pixmaps/eye.xbm \
|
pixmaps/eye.xbm \
|
||||||
pixmaps/layer.xbm \
|
pixmaps/layer.xbm \
|
||||||
pixmaps/linked.xbm \
|
pixmaps/linked.xbm \
|
||||||
pixmaps/locked.xpm \
|
pixmaps/locked.xbm \
|
||||||
pixmaps/lower.xpm \
|
pixmaps/lower.xpm \
|
||||||
pixmaps/mask.xbm \
|
pixmaps/mask.xbm \
|
||||||
pixmaps/new.xpm \
|
pixmaps/new.xpm \
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
#include "pixmaps/penstroke.xpm"
|
#include "pixmaps/penstroke.xpm"
|
||||||
#include "pixmaps/toselection.xpm"
|
#include "pixmaps/toselection.xpm"
|
||||||
#include "pixmaps/path.xbm"
|
#include "pixmaps/path.xbm"
|
||||||
#include "pixmaps/locked.xpm"
|
#include "pixmaps/locked.xbm"
|
||||||
|
|
||||||
#ifndef HAVE_RINT
|
#ifndef HAVE_RINT
|
||||||
#define rint(x) floor (x + 0.5)
|
#define rint(x) floor (x + 0.5)
|
||||||
@ -89,7 +89,8 @@ typedef struct {
|
|||||||
/* pixmaps for the no preview bitmap */
|
/* pixmaps for the no preview bitmap */
|
||||||
GdkPixmap * pixmap_normal;
|
GdkPixmap * pixmap_normal;
|
||||||
GdkPixmap * pixmap_selected;
|
GdkPixmap * pixmap_selected;
|
||||||
GdkPixmap * pixmap_locked;
|
GdkPixmap * pixmap_locked_normal;
|
||||||
|
GdkPixmap * pixmap_locked_selected;
|
||||||
|
|
||||||
/* state information */
|
/* state information */
|
||||||
gint selsigid;
|
gint selsigid;
|
||||||
@ -123,18 +124,20 @@ typedef struct {
|
|||||||
|
|
||||||
static gchar * unique_name(GimpImage *,gchar *);
|
static gchar * unique_name(GimpImage *,gchar *);
|
||||||
|
|
||||||
static gint path_widget_preview_events (GtkWidget *, GdkEvent *);
|
/* static gint path_widget_preview_events (GtkWidget *, GdkEvent *); */
|
||||||
static void paths_dialog_realized (GtkWidget *widget);
|
static void paths_dialog_realized (GtkWidget *widget);
|
||||||
static void paths_select_row (GtkWidget *widget,gint row,gint column,GdkEventButton *event,gpointer data);
|
static void paths_select_row (GtkWidget *widget, gint row, gint column,
|
||||||
static void paths_unselect_row (GtkWidget *widget,gint row,gint column,GdkEventButton *event,gpointer data);
|
GdkEventButton *event, gpointer data);
|
||||||
|
static void paths_unselect_row (GtkWidget *widget, gint row, gint column,
|
||||||
|
GdkEventButton *event, gpointer data);
|
||||||
static gint paths_list_events (GtkWidget *widget,GdkEvent *event);
|
static gint paths_list_events (GtkWidget *widget,GdkEvent *event);
|
||||||
static void paths_dialog_map_callback (GtkWidget *w,gpointer client_data);
|
static void paths_dialog_map_callback (GtkWidget *w,gpointer client_data);
|
||||||
static void paths_dialog_unmap_callback(GtkWidget *w,gpointer client_data);
|
static void paths_dialog_unmap_callback (GtkWidget *w,gpointer client_data);
|
||||||
static void paths_dialog_destroy_cb (GimpImage *image);
|
static void paths_dialog_destroy_cb (GimpImage *image);
|
||||||
static void paths_update_paths(gpointer data,gint row);
|
static void paths_update_paths (gpointer data,gint row);
|
||||||
static GSList * pathpoints_copy(GSList *list);
|
static GSList * pathpoints_copy (GSList *list);
|
||||||
static void pathpoints_free(GSList *list);
|
static void pathpoints_free (GSList *list);
|
||||||
static void paths_update_preview(BezierSelect *bezier_sel);
|
static void paths_update_preview (BezierSelect *bezier_sel);
|
||||||
static void paths_dialog_preview_extents (void);
|
static void paths_dialog_preview_extents (void);
|
||||||
static void paths_dialog_new_point_callback (GtkWidget *, gpointer);
|
static void paths_dialog_new_point_callback (GtkWidget *, gpointer);
|
||||||
static void paths_dialog_add_point_callback (GtkWidget *, gpointer);
|
static void paths_dialog_add_point_callback (GtkWidget *, gpointer);
|
||||||
@ -282,7 +285,7 @@ GtkWidget * paths_dialog_create()
|
|||||||
/* gtk_clist_set_column_title(GTK_CLIST(paths_list), 1, _("Path")); */
|
/* gtk_clist_set_column_title(GTK_CLIST(paths_list), 1, _("Path")); */
|
||||||
/* gtk_clist_column_titles_show(GTK_CLIST(paths_list)); */
|
/* gtk_clist_column_titles_show(GTK_CLIST(paths_list)); */
|
||||||
/* gtk_clist_columns_autosize(GTK_CLIST(paths_list)); */
|
/* gtk_clist_columns_autosize(GTK_CLIST(paths_list)); */
|
||||||
gtk_clist_set_column_width (GTK_CLIST(paths_list),0,30);
|
gtk_clist_set_column_width (GTK_CLIST(paths_list),0,locked_width);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (scrolled_win), paths_list);
|
gtk_container_add (GTK_CONTAINER (scrolled_win), paths_list);
|
||||||
gtk_clist_set_selection_mode (GTK_CLIST (paths_list), GTK_SELECTION_BROWSE);
|
gtk_clist_set_selection_mode (GTK_CLIST (paths_list), GTK_SELECTION_BROWSE);
|
||||||
@ -396,7 +399,7 @@ path_dialog_new(GimpImage *gimage,gint name_seed, gpointer udata)
|
|||||||
GString *s = g_string_new (NULL);
|
GString *s = g_string_new (NULL);
|
||||||
gchar *suniq;
|
gchar *suniq;
|
||||||
|
|
||||||
g_string_sprintf (s, "path %d",name_seed);
|
g_string_sprintf (s, "Path %d",name_seed);
|
||||||
suniq = unique_name(gimage,s->str);
|
suniq = unique_name(gimage,s->str);
|
||||||
if(suniq)
|
if(suniq)
|
||||||
{
|
{
|
||||||
@ -716,7 +719,6 @@ void paths_add_path(PATHP bzp,gint insrow)
|
|||||||
PATHWIDGETP pwidget;
|
PATHWIDGETP pwidget;
|
||||||
gint row;
|
gint row;
|
||||||
gchar *row_data[2];
|
gchar *row_data[2];
|
||||||
GdkBitmap *mask;
|
|
||||||
|
|
||||||
pwidget = g_new0(PATHWIDGET,1);
|
pwidget = g_new0(PATHWIDGET,1);
|
||||||
|
|
||||||
@ -758,13 +760,18 @@ void paths_add_path(PATHP bzp,gint insrow)
|
|||||||
pwidget->paths_pixmap = paths_dialog->pixmap_normal;
|
pwidget->paths_pixmap = paths_dialog->pixmap_normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!paths_dialog->pixmap_locked)
|
if(!paths_dialog->pixmap_locked_normal)
|
||||||
{
|
{
|
||||||
paths_dialog->pixmap_locked =
|
paths_dialog->pixmap_locked_normal =
|
||||||
gdk_pixmap_create_from_xpm_d (paths_dialog->vbox->window,
|
gdk_pixmap_create_from_data (paths_dialog->vbox->window,
|
||||||
&mask,
|
locked_bits, locked_width, locked_height, -1,
|
||||||
&paths_dialog->vbox->style->fg[GTK_STATE_NORMAL],
|
&paths_dialog->vbox->style->fg[GTK_STATE_NORMAL],
|
||||||
locked_xpm);
|
&paths_dialog->vbox->style->white);
|
||||||
|
paths_dialog->pixmap_locked_selected =
|
||||||
|
gdk_pixmap_create_from_data (paths_dialog->vbox->window,
|
||||||
|
locked_bits, locked_width, locked_height, -1,
|
||||||
|
&paths_dialog->vbox->style->fg[GTK_STATE_SELECTED],
|
||||||
|
&paths_dialog->vbox->style->bg[GTK_STATE_SELECTED]);
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_clist_set_row_height(GTK_CLIST(paths_dialog->paths_list),
|
gtk_clist_set_row_height(GTK_CLIST(paths_dialog->paths_list),
|
||||||
@ -839,6 +846,7 @@ paths_dialog_preview_extents ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
static gint
|
static gint
|
||||||
path_widget_preview_events (GtkWidget *widget,
|
path_widget_preview_events (GtkWidget *widget,
|
||||||
GdkEvent *event)
|
GdkEvent *event)
|
||||||
@ -848,7 +856,6 @@ path_widget_preview_events (GtkWidget *widget,
|
|||||||
switch (event->type)
|
switch (event->type)
|
||||||
{
|
{
|
||||||
case GDK_BUTTON_PRESS:
|
case GDK_BUTTON_PRESS:
|
||||||
/* Control-button press disables the application of the mask */
|
|
||||||
bevent = (GdkEventButton *) event;
|
bevent = (GdkEventButton *) event;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -856,14 +863,14 @@ path_widget_preview_events (GtkWidget *widget,
|
|||||||
if (preview_size)
|
if (preview_size)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* layer_widget_preview_redraw (layer_widget, preview_type); */
|
layer_widget_preview_redraw (layer_widget, preview_type);
|
||||||
|
|
||||||
/* gdk_draw_pixmap (widget->window, */
|
gdk_draw_pixmap (widget->window,
|
||||||
/* widget->style->black_gc, */
|
widget->style->black_gc,
|
||||||
/* *pixmap, */
|
*pixmap,
|
||||||
/* 0, 0, 2, 2, */
|
0, 0, 2, 2,
|
||||||
/* layersD->image_width, */
|
layersD->image_width,
|
||||||
/* layersD->image_height); */
|
layersD->image_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -874,6 +881,7 @@ path_widget_preview_events (GtkWidget *widget,
|
|||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
paths_select_row(GtkWidget *widget,
|
paths_select_row(GtkWidget *widget,
|
||||||
@ -909,10 +917,17 @@ paths_select_row(GtkWidget *widget,
|
|||||||
if(bzp->locked == 0)
|
if(bzp->locked == 0)
|
||||||
{
|
{
|
||||||
bzp->locked = 1;
|
bzp->locked = 1;
|
||||||
|
if (paths_dialog->selected_row_num == row)
|
||||||
gtk_clist_set_pixmap(GTK_CLIST(paths_dialog->paths_list),
|
gtk_clist_set_pixmap(GTK_CLIST(paths_dialog->paths_list),
|
||||||
row,
|
row,
|
||||||
0,
|
0,
|
||||||
paths_dialog->pixmap_locked,
|
paths_dialog->pixmap_locked_selected,
|
||||||
|
NULL);
|
||||||
|
else
|
||||||
|
gtk_clist_set_pixmap(GTK_CLIST(paths_dialog->paths_list),
|
||||||
|
row,
|
||||||
|
0,
|
||||||
|
paths_dialog->pixmap_locked_normal,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -950,6 +965,13 @@ paths_select_row(GtkWidget *widget,
|
|||||||
paths_dialog->current_path_list->last_selected_row = row;
|
paths_dialog->current_path_list->last_selected_row = row;
|
||||||
paths_dialog->been_selected = TRUE;
|
paths_dialog->been_selected = TRUE;
|
||||||
|
|
||||||
|
if(bzp->locked)
|
||||||
|
gtk_clist_set_pixmap(GTK_CLIST(paths_dialog->paths_list),
|
||||||
|
row,
|
||||||
|
0,
|
||||||
|
paths_dialog->pixmap_locked_selected,
|
||||||
|
NULL);
|
||||||
|
|
||||||
bsel = path_to_beziersel(bzp);
|
bsel = path_to_beziersel(bzp);
|
||||||
gdisp = gdisplays_check_valid(paths_dialog->current_path_list->gdisp,
|
gdisp = gdisplays_check_valid(paths_dialog->current_path_list->gdisp,
|
||||||
paths_dialog->gimage);
|
paths_dialog->gimage);
|
||||||
@ -964,18 +986,32 @@ paths_select_row(GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
paths_unselect_row(GtkWidget *widget,
|
paths_unselect_row (GtkWidget *widget,
|
||||||
gint row,
|
gint row,
|
||||||
gint column,
|
gint column,
|
||||||
GdkEventButton *event,
|
GdkEventButton *event,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
PATHWIDGETP pwidget;
|
PATHWIDGETP pwidget;
|
||||||
|
PATHP bzp;
|
||||||
|
|
||||||
pwidget = (PATHWIDGETP)gtk_clist_get_row_data(GTK_CLIST(widget),row);
|
pwidget = (PATHWIDGETP)gtk_clist_get_row_data(GTK_CLIST(widget),row);
|
||||||
|
|
||||||
if(!pwidget)
|
if(!pwidget)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
bzp = (PATHP)g_slist_nth_data(paths_dialog->current_path_list->bz_paths,row);
|
||||||
|
|
||||||
|
g_return_if_fail(bzp != NULL);
|
||||||
|
|
||||||
|
if (column && bzp->locked)
|
||||||
|
{
|
||||||
|
gtk_clist_set_pixmap (GTK_CLIST(paths_dialog->paths_list),
|
||||||
|
row,
|
||||||
|
0,
|
||||||
|
paths_dialog->pixmap_locked_normal,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1111,12 +1147,21 @@ paths_update_paths(gpointer data,gint row)
|
|||||||
paths_update_preview(bezier_sel);
|
paths_update_preview(bezier_sel);
|
||||||
beziersel_free(bezier_sel);
|
beziersel_free(bezier_sel);
|
||||||
|
|
||||||
if(bzp->locked)
|
if (bzp->locked)
|
||||||
|
{
|
||||||
|
if (paths_dialog->selected_row_num == row)
|
||||||
gtk_clist_set_pixmap(GTK_CLIST(paths_dialog->paths_list),
|
gtk_clist_set_pixmap(GTK_CLIST(paths_dialog->paths_list),
|
||||||
row,
|
row,
|
||||||
0,
|
0,
|
||||||
paths_dialog->pixmap_locked,
|
paths_dialog->pixmap_locked_selected,
|
||||||
NULL);
|
NULL);
|
||||||
|
else
|
||||||
|
gtk_clist_set_pixmap(GTK_CLIST(paths_dialog->paths_list),
|
||||||
|
row,
|
||||||
|
0,
|
||||||
|
paths_dialog->pixmap_locked_normal,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
#include "pixmaps/penstroke.xpm"
|
#include "pixmaps/penstroke.xpm"
|
||||||
#include "pixmaps/toselection.xpm"
|
#include "pixmaps/toselection.xpm"
|
||||||
#include "pixmaps/path.xbm"
|
#include "pixmaps/path.xbm"
|
||||||
#include "pixmaps/locked.xpm"
|
#include "pixmaps/locked.xbm"
|
||||||
|
|
||||||
#ifndef HAVE_RINT
|
#ifndef HAVE_RINT
|
||||||
#define rint(x) floor (x + 0.5)
|
#define rint(x) floor (x + 0.5)
|
||||||
@ -89,7 +89,8 @@ typedef struct {
|
|||||||
/* pixmaps for the no preview bitmap */
|
/* pixmaps for the no preview bitmap */
|
||||||
GdkPixmap * pixmap_normal;
|
GdkPixmap * pixmap_normal;
|
||||||
GdkPixmap * pixmap_selected;
|
GdkPixmap * pixmap_selected;
|
||||||
GdkPixmap * pixmap_locked;
|
GdkPixmap * pixmap_locked_normal;
|
||||||
|
GdkPixmap * pixmap_locked_selected;
|
||||||
|
|
||||||
/* state information */
|
/* state information */
|
||||||
gint selsigid;
|
gint selsigid;
|
||||||
@ -123,18 +124,20 @@ typedef struct {
|
|||||||
|
|
||||||
static gchar * unique_name(GimpImage *,gchar *);
|
static gchar * unique_name(GimpImage *,gchar *);
|
||||||
|
|
||||||
static gint path_widget_preview_events (GtkWidget *, GdkEvent *);
|
/* static gint path_widget_preview_events (GtkWidget *, GdkEvent *); */
|
||||||
static void paths_dialog_realized (GtkWidget *widget);
|
static void paths_dialog_realized (GtkWidget *widget);
|
||||||
static void paths_select_row (GtkWidget *widget,gint row,gint column,GdkEventButton *event,gpointer data);
|
static void paths_select_row (GtkWidget *widget, gint row, gint column,
|
||||||
static void paths_unselect_row (GtkWidget *widget,gint row,gint column,GdkEventButton *event,gpointer data);
|
GdkEventButton *event, gpointer data);
|
||||||
|
static void paths_unselect_row (GtkWidget *widget, gint row, gint column,
|
||||||
|
GdkEventButton *event, gpointer data);
|
||||||
static gint paths_list_events (GtkWidget *widget,GdkEvent *event);
|
static gint paths_list_events (GtkWidget *widget,GdkEvent *event);
|
||||||
static void paths_dialog_map_callback (GtkWidget *w,gpointer client_data);
|
static void paths_dialog_map_callback (GtkWidget *w,gpointer client_data);
|
||||||
static void paths_dialog_unmap_callback(GtkWidget *w,gpointer client_data);
|
static void paths_dialog_unmap_callback (GtkWidget *w,gpointer client_data);
|
||||||
static void paths_dialog_destroy_cb (GimpImage *image);
|
static void paths_dialog_destroy_cb (GimpImage *image);
|
||||||
static void paths_update_paths(gpointer data,gint row);
|
static void paths_update_paths (gpointer data,gint row);
|
||||||
static GSList * pathpoints_copy(GSList *list);
|
static GSList * pathpoints_copy (GSList *list);
|
||||||
static void pathpoints_free(GSList *list);
|
static void pathpoints_free (GSList *list);
|
||||||
static void paths_update_preview(BezierSelect *bezier_sel);
|
static void paths_update_preview (BezierSelect *bezier_sel);
|
||||||
static void paths_dialog_preview_extents (void);
|
static void paths_dialog_preview_extents (void);
|
||||||
static void paths_dialog_new_point_callback (GtkWidget *, gpointer);
|
static void paths_dialog_new_point_callback (GtkWidget *, gpointer);
|
||||||
static void paths_dialog_add_point_callback (GtkWidget *, gpointer);
|
static void paths_dialog_add_point_callback (GtkWidget *, gpointer);
|
||||||
@ -282,7 +285,7 @@ GtkWidget * paths_dialog_create()
|
|||||||
/* gtk_clist_set_column_title(GTK_CLIST(paths_list), 1, _("Path")); */
|
/* gtk_clist_set_column_title(GTK_CLIST(paths_list), 1, _("Path")); */
|
||||||
/* gtk_clist_column_titles_show(GTK_CLIST(paths_list)); */
|
/* gtk_clist_column_titles_show(GTK_CLIST(paths_list)); */
|
||||||
/* gtk_clist_columns_autosize(GTK_CLIST(paths_list)); */
|
/* gtk_clist_columns_autosize(GTK_CLIST(paths_list)); */
|
||||||
gtk_clist_set_column_width (GTK_CLIST(paths_list),0,30);
|
gtk_clist_set_column_width (GTK_CLIST(paths_list),0,locked_width);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (scrolled_win), paths_list);
|
gtk_container_add (GTK_CONTAINER (scrolled_win), paths_list);
|
||||||
gtk_clist_set_selection_mode (GTK_CLIST (paths_list), GTK_SELECTION_BROWSE);
|
gtk_clist_set_selection_mode (GTK_CLIST (paths_list), GTK_SELECTION_BROWSE);
|
||||||
@ -396,7 +399,7 @@ path_dialog_new(GimpImage *gimage,gint name_seed, gpointer udata)
|
|||||||
GString *s = g_string_new (NULL);
|
GString *s = g_string_new (NULL);
|
||||||
gchar *suniq;
|
gchar *suniq;
|
||||||
|
|
||||||
g_string_sprintf (s, "path %d",name_seed);
|
g_string_sprintf (s, "Path %d",name_seed);
|
||||||
suniq = unique_name(gimage,s->str);
|
suniq = unique_name(gimage,s->str);
|
||||||
if(suniq)
|
if(suniq)
|
||||||
{
|
{
|
||||||
@ -716,7 +719,6 @@ void paths_add_path(PATHP bzp,gint insrow)
|
|||||||
PATHWIDGETP pwidget;
|
PATHWIDGETP pwidget;
|
||||||
gint row;
|
gint row;
|
||||||
gchar *row_data[2];
|
gchar *row_data[2];
|
||||||
GdkBitmap *mask;
|
|
||||||
|
|
||||||
pwidget = g_new0(PATHWIDGET,1);
|
pwidget = g_new0(PATHWIDGET,1);
|
||||||
|
|
||||||
@ -758,13 +760,18 @@ void paths_add_path(PATHP bzp,gint insrow)
|
|||||||
pwidget->paths_pixmap = paths_dialog->pixmap_normal;
|
pwidget->paths_pixmap = paths_dialog->pixmap_normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!paths_dialog->pixmap_locked)
|
if(!paths_dialog->pixmap_locked_normal)
|
||||||
{
|
{
|
||||||
paths_dialog->pixmap_locked =
|
paths_dialog->pixmap_locked_normal =
|
||||||
gdk_pixmap_create_from_xpm_d (paths_dialog->vbox->window,
|
gdk_pixmap_create_from_data (paths_dialog->vbox->window,
|
||||||
&mask,
|
locked_bits, locked_width, locked_height, -1,
|
||||||
&paths_dialog->vbox->style->fg[GTK_STATE_NORMAL],
|
&paths_dialog->vbox->style->fg[GTK_STATE_NORMAL],
|
||||||
locked_xpm);
|
&paths_dialog->vbox->style->white);
|
||||||
|
paths_dialog->pixmap_locked_selected =
|
||||||
|
gdk_pixmap_create_from_data (paths_dialog->vbox->window,
|
||||||
|
locked_bits, locked_width, locked_height, -1,
|
||||||
|
&paths_dialog->vbox->style->fg[GTK_STATE_SELECTED],
|
||||||
|
&paths_dialog->vbox->style->bg[GTK_STATE_SELECTED]);
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_clist_set_row_height(GTK_CLIST(paths_dialog->paths_list),
|
gtk_clist_set_row_height(GTK_CLIST(paths_dialog->paths_list),
|
||||||
@ -839,6 +846,7 @@ paths_dialog_preview_extents ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
static gint
|
static gint
|
||||||
path_widget_preview_events (GtkWidget *widget,
|
path_widget_preview_events (GtkWidget *widget,
|
||||||
GdkEvent *event)
|
GdkEvent *event)
|
||||||
@ -848,7 +856,6 @@ path_widget_preview_events (GtkWidget *widget,
|
|||||||
switch (event->type)
|
switch (event->type)
|
||||||
{
|
{
|
||||||
case GDK_BUTTON_PRESS:
|
case GDK_BUTTON_PRESS:
|
||||||
/* Control-button press disables the application of the mask */
|
|
||||||
bevent = (GdkEventButton *) event;
|
bevent = (GdkEventButton *) event;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -856,14 +863,14 @@ path_widget_preview_events (GtkWidget *widget,
|
|||||||
if (preview_size)
|
if (preview_size)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* layer_widget_preview_redraw (layer_widget, preview_type); */
|
layer_widget_preview_redraw (layer_widget, preview_type);
|
||||||
|
|
||||||
/* gdk_draw_pixmap (widget->window, */
|
gdk_draw_pixmap (widget->window,
|
||||||
/* widget->style->black_gc, */
|
widget->style->black_gc,
|
||||||
/* *pixmap, */
|
*pixmap,
|
||||||
/* 0, 0, 2, 2, */
|
0, 0, 2, 2,
|
||||||
/* layersD->image_width, */
|
layersD->image_width,
|
||||||
/* layersD->image_height); */
|
layersD->image_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -874,6 +881,7 @@ path_widget_preview_events (GtkWidget *widget,
|
|||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
paths_select_row(GtkWidget *widget,
|
paths_select_row(GtkWidget *widget,
|
||||||
@ -909,10 +917,17 @@ paths_select_row(GtkWidget *widget,
|
|||||||
if(bzp->locked == 0)
|
if(bzp->locked == 0)
|
||||||
{
|
{
|
||||||
bzp->locked = 1;
|
bzp->locked = 1;
|
||||||
|
if (paths_dialog->selected_row_num == row)
|
||||||
gtk_clist_set_pixmap(GTK_CLIST(paths_dialog->paths_list),
|
gtk_clist_set_pixmap(GTK_CLIST(paths_dialog->paths_list),
|
||||||
row,
|
row,
|
||||||
0,
|
0,
|
||||||
paths_dialog->pixmap_locked,
|
paths_dialog->pixmap_locked_selected,
|
||||||
|
NULL);
|
||||||
|
else
|
||||||
|
gtk_clist_set_pixmap(GTK_CLIST(paths_dialog->paths_list),
|
||||||
|
row,
|
||||||
|
0,
|
||||||
|
paths_dialog->pixmap_locked_normal,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -950,6 +965,13 @@ paths_select_row(GtkWidget *widget,
|
|||||||
paths_dialog->current_path_list->last_selected_row = row;
|
paths_dialog->current_path_list->last_selected_row = row;
|
||||||
paths_dialog->been_selected = TRUE;
|
paths_dialog->been_selected = TRUE;
|
||||||
|
|
||||||
|
if(bzp->locked)
|
||||||
|
gtk_clist_set_pixmap(GTK_CLIST(paths_dialog->paths_list),
|
||||||
|
row,
|
||||||
|
0,
|
||||||
|
paths_dialog->pixmap_locked_selected,
|
||||||
|
NULL);
|
||||||
|
|
||||||
bsel = path_to_beziersel(bzp);
|
bsel = path_to_beziersel(bzp);
|
||||||
gdisp = gdisplays_check_valid(paths_dialog->current_path_list->gdisp,
|
gdisp = gdisplays_check_valid(paths_dialog->current_path_list->gdisp,
|
||||||
paths_dialog->gimage);
|
paths_dialog->gimage);
|
||||||
@ -964,18 +986,32 @@ paths_select_row(GtkWidget *widget,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
paths_unselect_row(GtkWidget *widget,
|
paths_unselect_row (GtkWidget *widget,
|
||||||
gint row,
|
gint row,
|
||||||
gint column,
|
gint column,
|
||||||
GdkEventButton *event,
|
GdkEventButton *event,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
PATHWIDGETP pwidget;
|
PATHWIDGETP pwidget;
|
||||||
|
PATHP bzp;
|
||||||
|
|
||||||
pwidget = (PATHWIDGETP)gtk_clist_get_row_data(GTK_CLIST(widget),row);
|
pwidget = (PATHWIDGETP)gtk_clist_get_row_data(GTK_CLIST(widget),row);
|
||||||
|
|
||||||
if(!pwidget)
|
if(!pwidget)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
bzp = (PATHP)g_slist_nth_data(paths_dialog->current_path_list->bz_paths,row);
|
||||||
|
|
||||||
|
g_return_if_fail(bzp != NULL);
|
||||||
|
|
||||||
|
if (column && bzp->locked)
|
||||||
|
{
|
||||||
|
gtk_clist_set_pixmap (GTK_CLIST(paths_dialog->paths_list),
|
||||||
|
row,
|
||||||
|
0,
|
||||||
|
paths_dialog->pixmap_locked_normal,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -1111,12 +1147,21 @@ paths_update_paths(gpointer data,gint row)
|
|||||||
paths_update_preview(bezier_sel);
|
paths_update_preview(bezier_sel);
|
||||||
beziersel_free(bezier_sel);
|
beziersel_free(bezier_sel);
|
||||||
|
|
||||||
if(bzp->locked)
|
if (bzp->locked)
|
||||||
|
{
|
||||||
|
if (paths_dialog->selected_row_num == row)
|
||||||
gtk_clist_set_pixmap(GTK_CLIST(paths_dialog->paths_list),
|
gtk_clist_set_pixmap(GTK_CLIST(paths_dialog->paths_list),
|
||||||
row,
|
row,
|
||||||
0,
|
0,
|
||||||
paths_dialog->pixmap_locked,
|
paths_dialog->pixmap_locked_selected,
|
||||||
NULL);
|
NULL);
|
||||||
|
else
|
||||||
|
gtk_clist_set_pixmap(GTK_CLIST(paths_dialog->paths_list),
|
||||||
|
row,
|
||||||
|
0,
|
||||||
|
paths_dialog->pixmap_locked_normal,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
9
pixmaps/locked.xbm
Normal file
9
pixmaps/locked.xbm
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
/* Made with Gimp */
|
||||||
|
#define locked_width 20
|
||||||
|
#define locked_height 20
|
||||||
|
static char locked_bits[] = {
|
||||||
|
0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0xc0, 0x3f, 0x00, 0xe0, 0x70, 0x00,
|
||||||
|
0x60, 0x60, 0x00, 0x30, 0xc0, 0x00, 0x30, 0xc0, 0x00, 0xf8, 0xff, 0x01,
|
||||||
|
0xf8, 0xff, 0x01, 0x18, 0x80, 0x01, 0x18, 0x86, 0x01, 0x18, 0x8f, 0x01,
|
||||||
|
0x18, 0x8f, 0x01, 0x18, 0x86, 0x01, 0x18, 0x86, 0x01, 0x18, 0x86, 0x01,
|
||||||
|
0x18, 0x80, 0x01, 0xf8, 0xff, 0x01, 0xf0, 0xff, 0x00, 0x00, 0x00, 0x00 };
|
@ -1,228 +0,0 @@
|
|||||||
/* XPM */
|
|
||||||
static char * locked_xpm[] = {
|
|
||||||
"28 32 193 2",
|
|
||||||
" c None",
|
|
||||||
". c #FFFFFF",
|
|
||||||
"+ c #FDFDFD",
|
|
||||||
"@ c #FAFAFA",
|
|
||||||
"# c #F8F8F8",
|
|
||||||
"$ c #F7F7F7",
|
|
||||||
"% c #F9F9F9",
|
|
||||||
"& c #FBFBFB",
|
|
||||||
"* c #FEFEFE",
|
|
||||||
"= c #FCFCFC",
|
|
||||||
"- c #E3E3E3",
|
|
||||||
"; c #C1C1C1",
|
|
||||||
"> c #A1A1A1",
|
|
||||||
", c #9D9D9D",
|
|
||||||
"' c #B1B1B1",
|
|
||||||
") c #D2D2D2",
|
|
||||||
"! c #F4F4F4",
|
|
||||||
"~ c #F3F3F2",
|
|
||||||
"{ c #D8D8D8",
|
|
||||||
"] c #989898",
|
|
||||||
"^ c #666666",
|
|
||||||
"/ c #4D4D4D",
|
|
||||||
"( c #404040",
|
|
||||||
"_ c #444444",
|
|
||||||
": c #464646",
|
|
||||||
"< c #565656",
|
|
||||||
"[ c #7A7A7A",
|
|
||||||
"} c #B4B4B4",
|
|
||||||
"| c #F6F6F6",
|
|
||||||
"1 c #F6F6F5",
|
|
||||||
"2 c #F2F2F0",
|
|
||||||
"3 c #C6C6C6",
|
|
||||||
"4 c #6D6D6D",
|
|
||||||
"5 c #4B4B4B",
|
|
||||||
"6 c #707070",
|
|
||||||
"7 c #9E9E9E",
|
|
||||||
"8 c #ABABAB",
|
|
||||||
"9 c #858585",
|
|
||||||
"0 c #5A5A5A",
|
|
||||||
"a c #434343",
|
|
||||||
"b c #545454",
|
|
||||||
"c c #949494",
|
|
||||||
"d c #F3F3F3",
|
|
||||||
"e c #D1D1D1",
|
|
||||||
"f c #696969",
|
|
||||||
"g c #505050",
|
|
||||||
"h c #747474",
|
|
||||||
"i c #9C9C9C",
|
|
||||||
"j c #575757",
|
|
||||||
"k c #F7F7F6",
|
|
||||||
"l c #8A8A8A",
|
|
||||||
"m c #494949",
|
|
||||||
"n c #777777",
|
|
||||||
"o c #E6E6E6",
|
|
||||||
"p c #AEAEAE",
|
|
||||||
"q c #585858",
|
|
||||||
"r c #F9F9F8",
|
|
||||||
"s c #CBCBCB",
|
|
||||||
"t c #535353",
|
|
||||||
"u c #5D5D5D",
|
|
||||||
"v c #C9C9C9",
|
|
||||||
"w c #808080",
|
|
||||||
"x c #474747",
|
|
||||||
"y c #8B8B8B",
|
|
||||||
"z c #FDFDFB",
|
|
||||||
"A c #B0B0B0",
|
|
||||||
"B c #3E3E3E",
|
|
||||||
"C c #767676",
|
|
||||||
"D c #BFBFBF",
|
|
||||||
"E c #5F5F5F",
|
|
||||||
"F c #EEEEEE",
|
|
||||||
"G c #9B9B9B",
|
|
||||||
"H c #525252",
|
|
||||||
"I c #959595",
|
|
||||||
"J c #5B5B5B",
|
|
||||||
"K c #DEDEDF",
|
|
||||||
"L c #FFFFFE",
|
|
||||||
"M c #E0E0E0",
|
|
||||||
"N c #797979",
|
|
||||||
"O c #4C4C4C",
|
|
||||||
"P c #848484",
|
|
||||||
"Q c #E1E1E1",
|
|
||||||
"R c #DDDDDD",
|
|
||||||
"S c #DCDCDC",
|
|
||||||
"T c #DEDEDE",
|
|
||||||
"U c #EAEAEA",
|
|
||||||
"V c #D0D0D0",
|
|
||||||
"W c #4F4F4F",
|
|
||||||
"X c #B9B9BA",
|
|
||||||
"Y c #6E6E6E",
|
|
||||||
"Z c #2F2F2F",
|
|
||||||
"` c #373737",
|
|
||||||
" . c #343434",
|
|
||||||
".. c #252525",
|
|
||||||
"+. c #2E2E2E",
|
|
||||||
"@. c #3D3D3D",
|
|
||||||
"#. c #262626",
|
|
||||||
"$. c #2D2D2D",
|
|
||||||
"%. c #363636",
|
|
||||||
"&. c #313131",
|
|
||||||
"*. c #3B3B3B",
|
|
||||||
"=. c #3A3A3A",
|
|
||||||
"-. c #B5B5B4",
|
|
||||||
";. c #EFEFED",
|
|
||||||
">. c #818181",
|
|
||||||
",. c #909090",
|
|
||||||
"'. c #757575",
|
|
||||||
"). c #7C7C7C",
|
|
||||||
"!. c #B8B8B8",
|
|
||||||
"~. c #939393",
|
|
||||||
"{. c #787878",
|
|
||||||
"]. c #A7A7A7",
|
|
||||||
"^. c #B6B6B6",
|
|
||||||
"/. c #EEEEEC",
|
|
||||||
"(. c #6A6A6A",
|
|
||||||
"_. c #6B6B6B",
|
|
||||||
":. c #000000",
|
|
||||||
"<. c #A0A0A0",
|
|
||||||
"[. c #B5B5B3",
|
|
||||||
"}. c #7E7E7E",
|
|
||||||
"|. c #898989",
|
|
||||||
"1. c #6F6F6F",
|
|
||||||
"2. c #515151",
|
|
||||||
"3. c #606060",
|
|
||||||
"4. c #8F8F8F",
|
|
||||||
"5. c #747475",
|
|
||||||
"6. c #7F7F7F",
|
|
||||||
"7. c #8D8D8D",
|
|
||||||
"8. c #595959",
|
|
||||||
"9. c #969696",
|
|
||||||
"0. c #E2E2E2",
|
|
||||||
"a. c #686868",
|
|
||||||
"b. c #5E5E5E",
|
|
||||||
"c. c #757576",
|
|
||||||
"d. c #4A4A4A",
|
|
||||||
"e. c #868686",
|
|
||||||
"f. c #F2F2F2",
|
|
||||||
"g. c #7D7D7D",
|
|
||||||
"h. c #555555",
|
|
||||||
"i. c #353535",
|
|
||||||
"j. c #E9E9E9",
|
|
||||||
"k. c #7B7B7B",
|
|
||||||
"l. c #717171",
|
|
||||||
"m. c #B5B5B2",
|
|
||||||
"n. c #9A9A9A",
|
|
||||||
"o. c #AFAFAF",
|
|
||||||
"p. c #DADADA",
|
|
||||||
"q. c #888888",
|
|
||||||
"r. c #7B7B7C",
|
|
||||||
"s. c #383838",
|
|
||||||
"t. c #838383",
|
|
||||||
"u. c #2A2A2A",
|
|
||||||
"v. c #D9D9D9",
|
|
||||||
"w. c #707071",
|
|
||||||
"x. c #828282",
|
|
||||||
"y. c #9F9F9F",
|
|
||||||
"z. c #B2B2B2",
|
|
||||||
"A. c #ADADAD",
|
|
||||||
"B. c #E4E4E4",
|
|
||||||
"C. c #919191",
|
|
||||||
"D. c #B6B6B3",
|
|
||||||
"E. c #A3A3A3",
|
|
||||||
"F. c #D5D5D5",
|
|
||||||
"G. c #6F6F70",
|
|
||||||
"H. c #676767",
|
|
||||||
"I. c #626262",
|
|
||||||
"J. c #959596",
|
|
||||||
"K. c #545455",
|
|
||||||
"L. c #B9B9B6",
|
|
||||||
"M. c #BEBEBD",
|
|
||||||
"N. c #9D9D9C",
|
|
||||||
"O. c #A6A6A5",
|
|
||||||
"P. c #A5A5A5",
|
|
||||||
"Q. c #A5A5A6",
|
|
||||||
"R. c #A4A4A4",
|
|
||||||
"S. c #A0A0A1",
|
|
||||||
"T. c #A0A09F",
|
|
||||||
"U. c #9C9C9D",
|
|
||||||
"V. c #9B9B9C",
|
|
||||||
"W. c #9E9E9D",
|
|
||||||
"X. c #A3A3A2",
|
|
||||||
"Y. c #A4A4A5",
|
|
||||||
"Z. c #A4A4A3",
|
|
||||||
"`. c #A4A4A6",
|
|
||||||
" + c #DCDCDA",
|
|
||||||
".+ c #F0F0EE",
|
|
||||||
"++ c #C2C2C1",
|
|
||||||
"@+ c #A7A7A6",
|
|
||||||
"#+ c #A6A6A6",
|
|
||||||
"$+ c #AAAAA9",
|
|
||||||
"%+ c #AAAAAA",
|
|
||||||
"&+ c #A9A9A8",
|
|
||||||
"*+ c #D6D6D4",
|
|
||||||
". . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
|
|
||||||
". . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
|
|
||||||
". . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
|
|
||||||
". . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
|
|
||||||
". . . . . . . . . . . + @ # $ % & * . . . . . . = . . . ",
|
|
||||||
". . . . . . . . . . * - ; > , ' ) ! . . . . . = ~ . . . ",
|
|
||||||
". . . . . . . . . { ] ^ / ( _ : < [ } | . . . 1 2 . . . ",
|
|
||||||
". . . . . . . . 3 4 5 5 6 7 8 9 0 a b c d . . 1 2 . . . ",
|
|
||||||
". . . . . . . e f g h 3 # . . . - i j b i & . k 2 . . . ",
|
|
||||||
". . . . . . ! l m n o . . . . . . . p q 0 3 . r 2 . . . ",
|
|
||||||
". . . . . . s t u v . . . . . . . . . w x y = z 2 . . . ",
|
|
||||||
". . . . . . A B C . . . . . . . . . . D t E F . 2 . . . ",
|
|
||||||
". . . . . & G H I . . . . . . . . . . $ ^ J K L 2 . . . ",
|
|
||||||
". . . . . M N O P | - Q M R S T M Q U V q W X r 2 . . . ",
|
|
||||||
". . . . % Y Z ` Z ...+.m t H b @.#.$.%.&.*.=.-.;.. . . ",
|
|
||||||
". . . * & >.] ,.C '.).!.. . . . @ ~.h n {.].[ ^./.. . . ",
|
|
||||||
". . . * @ w c P (._.c U . :.:.:.. s '._._.<.{.[./.. . . ",
|
|
||||||
". . . * @ }.|.1.2.2.I . . :.. :.# - 3.H H 4.5.[./.. . . ",
|
|
||||||
". . . * @ 6.7.{.u 8.9.. . :.:.:.. 0.a.u b.c c.[./.. . . ",
|
|
||||||
". . . * @ >.7 G P >.' . . d.:.e.. f.|.P 9 ' ).[./.. . . ",
|
|
||||||
". . . * @ g.}.h. .i.g.. j.:.. :.R { _ .%.k.l.m./.. . . ",
|
|
||||||
". . . * @ w G n.9 w o.. Q 5 . :.p.! q.9 9 A r.[./.. . . ",
|
|
||||||
". . . * @ g.>.q ` s.t.. . u.o (.! v.d.` =.}.w.m./.. . . ",
|
|
||||||
". . . * @ x.y.7 q.|.z.. . ].{.A.. B.C.|.|.z.g.D./.. . . ",
|
|
||||||
". . . * @ ).x.4 W W E E.+ . F . F.k.t 2.g q.G.} /.. . . ",
|
|
||||||
". . . . @ N 8.H.b.b.< I.l c c J.c.h.J E u 4 K.L.;.. . . ",
|
|
||||||
". . . . . M.N.O.P.Q.R.S.T.U.V.W.> X.Q.Q.Y.Z.`. +.+. . . ",
|
|
||||||
". . . . f.++O.@+#+#+#+].$+%+%+$+&+@+#+#+#+@+p *+.+. . . ",
|
|
||||||
". . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
|
|
||||||
". . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
|
|
||||||
". . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
|
|
||||||
". . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
|
|
Reference in New Issue
Block a user