Merge commit 'origin/master' into soc-2009-dynamics

This commit is contained in:
Alexia Death 2009-10-03 14:12:53 +03:00
commit 155393491b
56 changed files with 11522 additions and 14148 deletions

View File

@ -37,11 +37,13 @@
#include "widgets/gimpcontainerview.h"
#include "widgets/gimpdock.h"
#include "widgets/gimpdockable.h"
#include "widgets/gimpdockwindow.h"
#include "widgets/gimpimageeditor.h"
#include "widgets/gimpitemtreeview.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpimagewindow.h"
#include "display/gimpnavigationeditor.h"
#include "display/gimpstatusbar.h"
@ -266,10 +268,14 @@ action_data_get_gimp (gpointer data)
if (GIMP_IS_DISPLAY (data))
return ((GimpDisplay *) data)->gimp;
else if (GIMP_IS_IMAGE_WINDOW (data))
return gimp_image_window_get_active_shell (data)->display->gimp;
else if (GIMP_IS_GIMP (data))
return data;
else if (GIMP_IS_DOCK (data))
context = gimp_dock_get_context (((GimpDock *) data));
else if (GIMP_IS_DOCK_WINDOW (data))
context = gimp_dock_get_context (gimp_dock_window_get_dock (((GimpDockWindow *) data)));
else if (GIMP_IS_CONTAINER_VIEW (data))
context = gimp_container_view_get_context ((GimpContainerView *) data);
else if (GIMP_IS_CONTAINER_EDITOR (data))
@ -293,10 +299,14 @@ action_data_get_context (gpointer data)
if (GIMP_IS_DISPLAY (data))
return gimp_get_user_context (((GimpDisplay *) data)->gimp);
else if (GIMP_IS_IMAGE_WINDOW (data))
return gimp_get_user_context (gimp_image_window_get_active_shell (data)->display->gimp);
else if (GIMP_IS_GIMP (data))
return gimp_get_user_context (data);
else if (GIMP_IS_DOCK (data))
return gimp_dock_get_context ((GimpDock *) data);
else if (GIMP_IS_DOCK_WINDOW (data))
return gimp_dock_get_context (gimp_dock_window_get_dock (((GimpDockWindow *) data)));
else if (GIMP_IS_CONTAINER_VIEW (data))
return gimp_container_view_get_context ((GimpContainerView *) data);
else if (GIMP_IS_CONTAINER_EDITOR (data))
@ -319,10 +329,14 @@ action_data_get_image (gpointer data)
if (GIMP_IS_DISPLAY (data))
return ((GimpDisplay *) data)->image;
else if (GIMP_IS_IMAGE_WINDOW (data))
return gimp_image_window_get_active_shell (data)->display->image;
else if (GIMP_IS_GIMP (data))
context = gimp_get_user_context (data);
else if (GIMP_IS_DOCK (data))
context = gimp_dock_get_context ((GimpDock *) data);
else if (GIMP_IS_DOCK_WINDOW (data))
context = gimp_dock_get_context (gimp_dock_window_get_dock (((GimpDockWindow *) data)));
else if (GIMP_IS_ITEM_TREE_VIEW (data))
return gimp_item_tree_view_get_image ((GimpItemTreeView *) data);
else if (GIMP_IS_IMAGE_EDITOR (data))
@ -346,10 +360,14 @@ action_data_get_display (gpointer data)
if (GIMP_IS_DISPLAY (data))
return data;
else if (GIMP_IS_IMAGE_WINDOW (data))
return gimp_image_window_get_active_shell (data)->display;
else if (GIMP_IS_GIMP (data))
context = gimp_get_user_context (data);
else if (GIMP_IS_DOCK (data))
context = gimp_dock_get_context ((GimpDock *) data);
else if (GIMP_IS_DOCK_WINDOW (data))
context = gimp_dock_get_context (gimp_dock_window_get_dock (((GimpDockWindow *) data)));
else if (GIMP_IS_NAVIGATION_EDITOR (data))
context = ((GimpNavigationEditor *) data)->context;
@ -605,24 +623,30 @@ action_message (GimpDisplay *display,
const gchar *format,
...)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
const gchar *stock_id = NULL;
va_list args;
GimpImageWindow *window;
if (GIMP_IS_TOOL_OPTIONS (object))
window = gimp_display_shell_get_window (GIMP_DISPLAY_SHELL (display->shell));
if (window)
{
GimpToolInfo *tool_info = GIMP_TOOL_OPTIONS (object)->tool_info;
GimpStatusbar *statusbar = gimp_image_window_get_statusbar (window);
const gchar *stock_id = NULL;
va_list args;
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
}
else if (GIMP_IS_VIEWABLE (object))
{
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (object));
}
if (GIMP_IS_TOOL_OPTIONS (object))
{
GimpToolInfo *tool_info = GIMP_TOOL_OPTIONS (object)->tool_info;
va_start (args, format);
gimp_statusbar_push_temp_valist (GIMP_STATUSBAR (shell->statusbar),
GIMP_MESSAGE_INFO, stock_id,
format, args);
va_end (args);
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool_info));
}
else if (GIMP_IS_VIEWABLE (object))
{
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (object));
}
va_start (args, format);
gimp_statusbar_push_temp_valist (statusbar, GIMP_MESSAGE_INFO,
stock_id, format, args);
va_end (args);
}
}

View File

@ -44,6 +44,7 @@
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpimagewindow.h"
#include "widgets/gimpaction.h"
#include "widgets/gimpmenufactory.h"
@ -186,18 +187,21 @@ void
debug_dump_keyboard_shortcuts_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplay *display = NULL;
GimpDisplayShell *shell = NULL;
GtkAccelGroup *accel_group = NULL;
GList *group_it = NULL;
GList *strings = NULL;
GimpDisplay *display;
GimpImageWindow *window;
GtkUIManager *manager;
GtkAccelGroup *accel_group;
GList *group_it;
GList *strings = NULL;
return_if_no_display (display, data);
shell = GIMP_DISPLAY_SHELL (display->shell);
accel_group = gtk_ui_manager_get_accel_group (GTK_UI_MANAGER (shell->menubar_manager));
window = gimp_display_shell_get_window (GIMP_DISPLAY_SHELL (display->shell));
manager = GTK_UI_MANAGER (gimp_image_window_get_ui_manager (window));
accel_group = gtk_ui_manager_get_accel_group (manager);
/* Gather formated strings of keyboard shortcuts */
for (group_it = gtk_ui_manager_get_action_groups (GTK_UI_MANAGER (shell->menubar_manager));
for (group_it = gtk_ui_manager_get_action_groups (manager);
group_it;
group_it = g_list_next (group_it))
{

View File

@ -44,6 +44,7 @@
#include "display/gimpdisplayshell-appearance.h"
#include "display/gimpdisplayshell-scale.h"
#include "display/gimpdisplayshell-selection.h"
#include "display/gimpimagewindow.h"
#include "actions.h"
#include "view-actions.h"
@ -523,7 +524,7 @@ view_actions_setup (GimpActionGroup *group)
view_actions_check_type_notify (GIMP_DISPLAY_CONFIG (group->gimp->config),
NULL, group);
if (GIMP_IS_DISPLAY (group->user_data) ||
if (GIMP_IS_IMAGE_WINDOW (group->user_data) ||
GIMP_IS_GIMP (group->user_data))
{
/* add window actions only if the context of the group is
@ -549,10 +550,14 @@ view_actions_update (GimpActionGroup *group,
if (display)
{
image = display->image;
shell = GIMP_DISPLAY_SHELL (display->shell);
GimpImageWindow *window;
fullscreen = gimp_display_shell_get_fullscreen (shell);
image = display->image;
shell = GIMP_DISPLAY_SHELL (display->shell);
window = gimp_display_shell_get_window (shell);
if (window)
fullscreen = gimp_image_window_get_fullscreen (window);
options = (image ?
(fullscreen ? shell->fullscreen_options : shell->options) :
@ -667,11 +672,17 @@ view_actions_update (GimpActionGroup *group,
SET_ACTIVE ("view-fullscreen", display && fullscreen);
SET_ACTIVE ("view-use-gegl", image && display->image->projection->use_gegl);
if (GIMP_IS_DISPLAY (group->user_data) ||
if (GIMP_IS_IMAGE_WINDOW (group->user_data) ||
GIMP_IS_GIMP (group->user_data))
{
GtkWidget *window = NULL;
if (shell)
window = gtk_widget_get_toplevel (GTK_WIDGET (shell));
/* see view_actions_setup() */
window_actions_update (group, GTK_WIDGET (shell));
if (GTK_IS_WINDOW (window))
window_actions_update (group, window);
}
#undef SET_ACTIVE

View File

@ -42,6 +42,7 @@
#include "display/gimpdisplayshell-scale.h"
#include "display/gimpdisplayshell-scale-dialog.h"
#include "display/gimpdisplayshell-scroll.h"
#include "display/gimpimagewindow.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpcolordialog.h"
@ -259,10 +260,13 @@ view_dot_for_dot_cmd_callback (GtkAction *action,
if (active != shell->dot_for_dot)
{
GimpImageWindow *window = gimp_display_shell_get_window (shell);
gimp_display_shell_scale_set_dot_for_dot (shell, active);
SET_ACTIVE (shell->menubar_manager, "view-dot-for-dot",
shell->dot_for_dot);
if (window)
SET_ACTIVE (gimp_image_window_get_ui_manager (window),
"view-dot-for-dot", shell->dot_for_dot);
if (IS_ACTIVE_DISPLAY (display))
SET_ACTIVE (shell->popup_manager, "view-dot-for-dot",
@ -573,14 +577,19 @@ view_padding_color_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplay *display;
GimpImageWindow *window;
GimpDisplayShell *shell;
GimpDisplayOptions *options;
gboolean fullscreen;
return_if_no_display (display, data);
shell = GIMP_DISPLAY_SHELL (display->shell);
shell = GIMP_DISPLAY_SHELL (display->shell);
window = gimp_display_shell_get_window (shell);
fullscreen = gimp_display_shell_get_fullscreen (shell);
if (window)
fullscreen = gimp_image_window_get_fullscreen (window);
else
fullscreen = FALSE;
if (fullscreen)
options = shell->fullscreen_options;
@ -674,14 +683,20 @@ view_fullscreen_cmd_callback (GtkAction *action,
{
GimpDisplay *display;
GimpDisplayShell *shell;
gboolean active;
GimpImageWindow *window;
return_if_no_display (display, data);
shell = GIMP_DISPLAY_SHELL (display->shell);
shell = GIMP_DISPLAY_SHELL (display->shell);
window = gimp_display_shell_get_window (shell);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
if (window)
{
gboolean active;
gimp_display_shell_set_fullscreen (shell, active);
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
gimp_image_window_set_fullscreen (window, active);
}
}
void
@ -730,10 +745,16 @@ view_padding_color_dialog_update (GimpColorDialog *dialog,
GimpColorDialogState state,
GimpDisplayShell *shell)
{
GimpImageWindow *window;
GimpDisplayOptions *options;
gboolean fullscreen;
fullscreen = gimp_display_shell_get_fullscreen (shell);
window = gimp_display_shell_get_window (shell);
if (window)
fullscreen = gimp_image_window_get_fullscreen (window);
else
fullscreen = FALSE;
if (fullscreen)
options = shell->fullscreen_options;

View File

@ -70,9 +70,11 @@ void
windows_show_display_cmd_callback (GtkAction *action,
gpointer data)
{
GimpDisplay *display = g_object_get_data (G_OBJECT (action), "display");
GimpDisplay *display = g_object_get_data (G_OBJECT (action), "display");
GtkWidget *toplevel = gtk_widget_get_toplevel (display->shell);
gtk_window_present (GTK_WINDOW (display->shell));
if (GTK_IS_WINDOW (toplevel))
gtk_window_present (GTK_WINDOW (toplevel));
}
void

View File

@ -60,9 +60,11 @@ gimp_brush_real_transform_size (GimpBrush *brush,
gint x, y;
if (aspect_ratio < 1.0)
gimp_brush_transform_matrix (brush, scale * aspect_ratio, scale, angle, &matrix);
gimp_brush_transform_matrix (brush,
scale * aspect_ratio, scale, angle, &matrix);
else
gimp_brush_transform_matrix (brush, scale, scale / aspect_ratio, angle, &matrix);
gimp_brush_transform_matrix (brush,
scale, scale / aspect_ratio, angle, &matrix);
gimp_brush_transform_bounding_box (brush, &matrix, &x, &y, width, height);
}
@ -89,6 +91,9 @@ gimp_brush_real_transform_size (GimpBrush *brush,
* than the input brush size.
*
* There are no floating point calculations in the inner loop for speed.
*
* Some variables end with the suffix _i to indicate they have been
* premultiplied by int_multiple
*/
TempBuf *
gimp_brush_real_transform_mask (GimpBrush *brush,
@ -102,6 +107,8 @@ gimp_brush_real_transform_mask (GimpBrush *brush,
GimpMatrix3 matrix;
gint src_width;
gint src_height;
gint src_width_minus_one;
gint src_height_minus_one;
gint dest_width;
gint dest_height;
gint x, y;
@ -111,24 +118,23 @@ gimp_brush_real_transform_mask (GimpBrush *brush,
gdouble src_tl_to_tr_delta_y;
gdouble src_tl_to_bl_delta_x;
gdouble src_tl_to_bl_delta_y;
gint src_walk_ux;
gint src_walk_uy;
gint src_walk_vx;
gint src_walk_vy;
gint src_walk_ux_i;
gint src_walk_uy_i;
gint src_walk_vx_i;
gint src_walk_vy_i;
gint src_space_cur_pos_x;
gint src_space_cur_pos_y;
gint src_space_row_start_x;
gint src_space_row_start_y;
gint src_space_cur_pos_x_i;
gint src_space_cur_pos_y_i;
gint src_space_row_start_x_i;
gint src_space_row_start_y_i;
const guchar *src_walker;
const guchar *pixel_next;
const guchar *pixel_below;
const guchar *pixel_below_next;
gint opposite_x, distance_from_true_x;
gint opposite_y, distance_from_true_y;
gint src_height_times_int_multiple;
gint src_width_times_int_multiple;
gint src_heightm1_times_int_multiple;
gint src_widthm1_times_int_multiple;
/*
* tl, tr etc are used because it is easier to visualize top left,
@ -136,7 +142,7 @@ gimp_brush_real_transform_mask (GimpBrush *brush,
* rectangle.
*/
const gint fraction_bits = 12;
const gint int_multiple = pow(2,fraction_bits);
const gint int_multiple = pow (2, fraction_bits);
/* In inner loop's bilinear calculation, two numbers that were each
* previously multiplied by int_multiple are multiplied together.
@ -162,15 +168,19 @@ gimp_brush_real_transform_mask (GimpBrush *brush,
if (aspect_ratio < 1.0)
gimp_brush_transform_matrix (brush, scale * aspect_ratio, scale, angle, &matrix);
gimp_brush_transform_matrix (brush,
scale * aspect_ratio, scale, angle, &matrix);
else
gimp_brush_transform_matrix (brush, scale, scale / aspect_ratio, angle, &matrix);
gimp_brush_transform_matrix (brush,
scale, scale / aspect_ratio, angle, &matrix);
if (gimp_matrix3_is_identity (&matrix))
return temp_buf_copy (brush->mask, NULL);
src_width = brush->mask->width;
src_height = brush->mask->height;
src_width_minus_one = src_width - 1;
src_height_minus_one = src_height - 1;
gimp_brush_transform_bounding_box (brush, &matrix,
&x, &y, &dest_width, &dest_height);
@ -210,34 +220,29 @@ gimp_brush_real_transform_mask (GimpBrush *brush,
src_tl_to_bl_delta_y = bly - tly;
/* speed optimized, note conversion to int precision */
src_walk_ux = (gint) ((src_tl_to_tr_delta_x / dest_width)* int_multiple);
src_walk_uy = (gint) ((src_tl_to_tr_delta_y / dest_width)* int_multiple);
src_walk_vx = (gint) ((src_tl_to_bl_delta_x / dest_height)* int_multiple);
src_walk_vy = (gint) ((src_tl_to_bl_delta_y / dest_height)* int_multiple);
src_walk_ux_i = (gint) ((src_tl_to_tr_delta_x / dest_width)* int_multiple);
src_walk_uy_i = (gint) ((src_tl_to_tr_delta_y / dest_width)* int_multiple);
src_walk_vx_i = (gint) ((src_tl_to_bl_delta_x / dest_height)* int_multiple);
src_walk_vy_i = (gint) ((src_tl_to_bl_delta_y / dest_height)* int_multiple);
/* initialize current position in source space to the start position (tl)
* speed optimized, note conversion to int precision
*/
src_space_cur_pos_x = (gint) (tlx* int_multiple);
src_space_cur_pos_y = (gint) (tly* int_multiple);
src_space_row_start_x = (gint) (tlx* int_multiple);
src_space_row_start_y = (gint) (tly* int_multiple);
src_space_cur_pos_x_i = (gint) (tlx* int_multiple);
src_space_cur_pos_y_i = (gint) (tly* int_multiple);
src_space_cur_pos_x = (gint) (src_space_cur_pos_x_i >> fraction_bits);
src_space_cur_pos_y = (gint) (src_space_cur_pos_y_i >> fraction_bits);
src_space_row_start_x_i = (gint) (tlx* int_multiple);
src_space_row_start_y_i = (gint) (tly* int_multiple);
src_walker = src;
src_height_times_int_multiple = src_height << fraction_bits; /* mult by int_multiple */
src_width_times_int_multiple = src_width << fraction_bits; /* mult by int_multiple */
src_heightm1_times_int_multiple = src_height_times_int_multiple - int_multiple;
src_widthm1_times_int_multiple = src_width_times_int_multiple - int_multiple;
for (y = 0; y < dest_height; y++)
{
for (x = 0; x < dest_width; x++)
{
if (src_space_cur_pos_x > src_width_times_int_multiple ||
if (src_space_cur_pos_x > src_width_minus_one ||
src_space_cur_pos_x < 0 ||
src_space_cur_pos_y > src_height_times_int_multiple ||
src_space_cur_pos_y > src_height_minus_one ||
src_space_cur_pos_y < 0)
/* no corresponding pixel in source space */
{
@ -246,15 +251,15 @@ gimp_brush_real_transform_mask (GimpBrush *brush,
else /* reverse transformed point hits source pixel */
{
src_walker = src
+ (src_space_cur_pos_y>>fraction_bits) * src_width
+ (src_space_cur_pos_x>>fraction_bits);
+ src_space_cur_pos_y * src_width
+ src_space_cur_pos_x;
/* bottom right corner
* no pixel below, reuse current pixel instead
* no next pixel to the right so reuse current pixel instead
*/
if (src_space_cur_pos_y > (src_heightm1_times_int_multiple) &&
src_space_cur_pos_x > (src_widthm1_times_int_multiple) )
if (src_space_cur_pos_y == src_height_minus_one &&
src_space_cur_pos_x == src_width_minus_one )
{
pixel_next = src_walker;
pixel_below = src_walker;
@ -263,7 +268,7 @@ gimp_brush_real_transform_mask (GimpBrush *brush,
/* bottom edge pixel row, except rightmost corner
* no pixel below, reuse current pixel instead */
else if (src_space_cur_pos_y > (src_heightm1_times_int_multiple))
else if (src_space_cur_pos_y == src_height_minus_one)
{
pixel_next = src_walker + 1;
pixel_below = src_walker;
@ -272,7 +277,7 @@ gimp_brush_real_transform_mask (GimpBrush *brush,
/* right edge pixel column, except bottom corner
* no next pixel to the right so reuse current pixel instead */
else if (src_space_cur_pos_x > (src_widthm1_times_int_multiple))
else if (src_space_cur_pos_x == src_width_minus_one)
{
pixel_next = src_walker;
pixel_below = src_walker + src_width;
@ -287,25 +292,34 @@ gimp_brush_real_transform_mask (GimpBrush *brush,
pixel_below_next = pixel_below + 1;
}
distance_from_true_x = src_space_cur_pos_x & fraction_bitmask;
distance_from_true_y = src_space_cur_pos_y & fraction_bitmask;
distance_from_true_x = src_space_cur_pos_x_i & fraction_bitmask;
distance_from_true_y = src_space_cur_pos_y_i & fraction_bitmask;
opposite_x = int_multiple - distance_from_true_x;
opposite_y = int_multiple - distance_from_true_y;
*dest = ((src_walker[0] * opposite_x + pixel_next[0] * distance_from_true_x) * opposite_y +
(pixel_below[0] * opposite_x + pixel_below_next[0] *distance_from_true_x) * distance_from_true_y
*dest = ((src_walker[0] * opposite_x +
pixel_next[0] * distance_from_true_x) * opposite_y +
(pixel_below[0] * opposite_x +
pixel_below_next[0] *distance_from_true_x) * distance_from_true_y
) >> recovery_bits;
}
src_space_cur_pos_x+=src_walk_ux;
src_space_cur_pos_y+=src_walk_uy;
src_space_cur_pos_x_i+=src_walk_ux_i;
src_space_cur_pos_y_i+=src_walk_uy_i;
src_space_cur_pos_x = src_space_cur_pos_x_i >> fraction_bits;
src_space_cur_pos_y = src_space_cur_pos_y_i >> fraction_bits;
dest ++;
} /* end for x */
src_space_row_start_x +=src_walk_vx;
src_space_row_start_y +=src_walk_vy;
src_space_cur_pos_x = src_space_row_start_x;
src_space_cur_pos_y = src_space_row_start_y;
src_space_row_start_x_i +=src_walk_vx_i;
src_space_row_start_y_i +=src_walk_vy_i;
src_space_cur_pos_x_i = src_space_row_start_x_i;
src_space_cur_pos_y_i = src_space_row_start_y_i;
src_space_cur_pos_x = src_space_cur_pos_x_i >> fraction_bits;
src_space_cur_pos_y = src_space_cur_pos_y_i >> fraction_bits;
} /* end for y */
@ -339,6 +353,9 @@ gimp_brush_real_transform_mask (GimpBrush *brush,
* than the input brush size.
*
* There are no floating point calculations in the inner loop for speed.
*
* Some variables end with the suffix _i to indicate they have been
* premultiplied by int_multiple
*/
TempBuf *
gimp_brush_real_transform_pixmap (GimpBrush *brush,
@ -352,6 +369,8 @@ gimp_brush_real_transform_pixmap (GimpBrush *brush,
GimpMatrix3 matrix;
gint src_width;
gint src_height;
gint src_width_minus_one;
gint src_height_minus_one;
gint dest_width;
gint dest_height;
gint x, y;
@ -361,24 +380,23 @@ gimp_brush_real_transform_pixmap (GimpBrush *brush,
gdouble src_tl_to_tr_delta_y;
gdouble src_tl_to_bl_delta_x;
gdouble src_tl_to_bl_delta_y;
gint src_walk_ux;
gint src_walk_uy;
gint src_walk_vx;
gint src_walk_vy;
gint src_walk_ux_i;
gint src_walk_uy_i;
gint src_walk_vx_i;
gint src_walk_vy_i;
gint src_space_cur_pos_x;
gint src_space_cur_pos_y;
gint src_space_row_start_x;
gint src_space_row_start_y;
gint src_space_cur_pos_x_i;
gint src_space_cur_pos_y_i;
gint src_space_row_start_x_i;
gint src_space_row_start_y_i;
const guchar *src_walker;
const guchar *pixel_next;
const guchar *pixel_below;
const guchar *pixel_below_next;
gint opposite_x, distance_from_true_x;
gint opposite_y, distance_from_true_y;
gint src_height_times_int_multiple;
gint src_width_times_int_multiple;
gint src_heightm1_times_int_multiple;
gint src_widthm1_times_int_multiple;
/*
* tl, tr etc are used because it is easier to visualize top left,
@ -412,15 +430,19 @@ gimp_brush_real_transform_pixmap (GimpBrush *brush,
if (aspect_ratio < 1.0)
gimp_brush_transform_matrix (brush, scale * aspect_ratio, scale, angle, &matrix);
gimp_brush_transform_matrix (brush,
scale * aspect_ratio, scale, angle, &matrix);
else
gimp_brush_transform_matrix (brush, scale, scale / aspect_ratio, angle, &matrix);
gimp_brush_transform_matrix (brush,
scale, scale / aspect_ratio, angle, &matrix);
if (gimp_matrix3_is_identity (&matrix))
return temp_buf_copy (brush->pixmap, NULL);
src_width = brush->pixmap->width;
src_height = brush->pixmap->height;
src_width_minus_one = src_width - 1;
src_height_minus_one = src_height - 1;
gimp_brush_transform_bounding_box (brush, &matrix,
&x, &y, &dest_width, &dest_height);
@ -451,34 +473,29 @@ gimp_brush_real_transform_pixmap (GimpBrush *brush,
src_tl_to_bl_delta_y = bly - tly;
/* speed optimized, note conversion to int precision */
src_walk_ux = (gint) ((src_tl_to_tr_delta_x / dest_width)* int_multiple);
src_walk_uy = (gint) ((src_tl_to_tr_delta_y / dest_width)* int_multiple);
src_walk_vx = (gint) ((src_tl_to_bl_delta_x / dest_height)* int_multiple);
src_walk_vy = (gint) ((src_tl_to_bl_delta_y / dest_height)* int_multiple);
src_walk_ux_i = (gint) ((src_tl_to_tr_delta_x / dest_width)* int_multiple);
src_walk_uy_i = (gint) ((src_tl_to_tr_delta_y / dest_width)* int_multiple);
src_walk_vx_i = (gint) ((src_tl_to_bl_delta_x / dest_height)* int_multiple);
src_walk_vy_i = (gint) ((src_tl_to_bl_delta_y / dest_height)* int_multiple);
/* initialize current position in source space to the start position (tl)
* speed optimized, note conversion to int precision
*/
src_space_cur_pos_x = (gint) (tlx* int_multiple);
src_space_cur_pos_y = (gint) (tly* int_multiple);
src_space_row_start_x = (gint) (tlx* int_multiple);
src_space_row_start_y = (gint) (tly* int_multiple);
src_space_cur_pos_x_i = (gint) (tlx* int_multiple);
src_space_cur_pos_y_i = (gint) (tly* int_multiple);
src_space_cur_pos_x = (gint) (src_space_cur_pos_x_i >> fraction_bits);
src_space_cur_pos_y = (gint) (src_space_cur_pos_y_i >> fraction_bits);
src_space_row_start_x_i = (gint) (tlx* int_multiple);
src_space_row_start_y_i = (gint) (tly* int_multiple);
src_walker = src;
src_height_times_int_multiple = src_height << fraction_bits; /* mult by int_multiple */
src_width_times_int_multiple = src_width << fraction_bits; /* mult by int_multiple */
src_heightm1_times_int_multiple = src_height_times_int_multiple - int_multiple;
src_widthm1_times_int_multiple = src_width_times_int_multiple - int_multiple;
for (y = 0; y < dest_height; y++)
{
for (x = 0; x < dest_width; x++)
{
if (src_space_cur_pos_x > src_width_times_int_multiple ||
if (src_space_cur_pos_x > src_width_minus_one ||
src_space_cur_pos_x < 0 ||
src_space_cur_pos_y > src_height_times_int_multiple ||
src_space_cur_pos_y > src_height_minus_one ||
src_space_cur_pos_y < 0)
/* no corresponding pixel in source space */
{
@ -490,15 +507,15 @@ gimp_brush_real_transform_pixmap (GimpBrush *brush,
{
src_walker = src
+ 3 * (
(src_space_cur_pos_y >> fraction_bits) * src_width
+ (src_space_cur_pos_x >> fraction_bits));
src_space_cur_pos_y * src_width
+ src_space_cur_pos_x);
/* bottom right corner
* no pixel below, reuse current pixel instead
* no next pixel to the right so reuse current pixel instead
*/
if (src_space_cur_pos_y > (src_heightm1_times_int_multiple) &&
src_space_cur_pos_x > (src_widthm1_times_int_multiple) )
if (src_space_cur_pos_y == src_height_minus_one &&
src_space_cur_pos_x == src_width_minus_one )
{
pixel_next = src_walker;
pixel_below = src_walker;
@ -507,7 +524,7 @@ gimp_brush_real_transform_pixmap (GimpBrush *brush,
/* bottom edge pixel row, except rightmost corner
* no pixel below, reuse current pixel instead */
else if (src_space_cur_pos_y > (src_heightm1_times_int_multiple))
else if (src_space_cur_pos_y == src_height_minus_one)
{
pixel_next = src_walker + 3;
pixel_below = src_walker;
@ -516,7 +533,7 @@ gimp_brush_real_transform_pixmap (GimpBrush *brush,
/* right edge pixel column, except bottom corner
* no next pixel to the right so reuse current pixel instead */
else if (src_space_cur_pos_x > (src_widthm1_times_int_multiple))
else if (src_space_cur_pos_x == src_width_minus_one)
{
pixel_next = src_walker;
pixel_below = src_walker + src_width * 3;
@ -531,36 +548,48 @@ gimp_brush_real_transform_pixmap (GimpBrush *brush,
pixel_below_next = pixel_below + 3;
}
distance_from_true_x = src_space_cur_pos_x & fraction_bitmask;
distance_from_true_y = src_space_cur_pos_y & fraction_bitmask;
distance_from_true_x = src_space_cur_pos_x_i & fraction_bitmask;
distance_from_true_y = src_space_cur_pos_y_i & fraction_bitmask;
opposite_x = int_multiple - distance_from_true_x;
opposite_y = int_multiple - distance_from_true_y;
dest[0] = ((src_walker[0] * opposite_x + pixel_next[0] * distance_from_true_x) * opposite_y +
(pixel_below[0] * opposite_x + pixel_below_next[0] *distance_from_true_x) * distance_from_true_y
dest[0] = ((src_walker[0] * opposite_x +
pixel_next[0] * distance_from_true_x) * opposite_y +
(pixel_below[0] * opposite_x +
pixel_below_next[0] *distance_from_true_x) * distance_from_true_y
) >> recovery_bits;
dest[1] = ((src_walker[1] * opposite_x + pixel_next[1] * distance_from_true_x) * opposite_y +
(pixel_below[1] * opposite_x + pixel_below_next[1] *distance_from_true_x) * distance_from_true_y
dest[1] = ((src_walker[1] * opposite_x +
pixel_next[1] * distance_from_true_x) * opposite_y +
(pixel_below[1] * opposite_x +
pixel_below_next[1] *distance_from_true_x) * distance_from_true_y
) >> recovery_bits;
dest[2] = ((src_walker[2] * opposite_x + pixel_next[2] * distance_from_true_x) * opposite_y +
(pixel_below[2] * opposite_x + pixel_below_next[2] *distance_from_true_x) * distance_from_true_y
dest[2] = ((src_walker[2] * opposite_x +
pixel_next[2] * distance_from_true_x) * opposite_y +
(pixel_below[2] * opposite_x +
pixel_below_next[2] *distance_from_true_x) * distance_from_true_y
) >> recovery_bits;
}
src_space_cur_pos_x += src_walk_ux;
src_space_cur_pos_y += src_walk_uy;
src_space_cur_pos_x_i += src_walk_ux_i;
src_space_cur_pos_y_i += src_walk_uy_i;
src_space_cur_pos_x = src_space_cur_pos_x_i >> fraction_bits;
src_space_cur_pos_y = src_space_cur_pos_y_i >> fraction_bits;
dest += 3;
} /* end for x */
src_space_row_start_x +=src_walk_vx;
src_space_row_start_y +=src_walk_vy;
src_space_cur_pos_x = src_space_row_start_x;
src_space_cur_pos_y = src_space_row_start_y;
src_space_row_start_x_i +=src_walk_vx_i;
src_space_row_start_y_i +=src_walk_vy_i;
src_space_cur_pos_x_i = src_space_row_start_x_i;
src_space_cur_pos_y_i = src_space_row_start_y_i;
src_space_cur_pos_x = src_space_cur_pos_x_i >> fraction_bits;
src_space_cur_pos_y = src_space_cur_pos_y_i >> fraction_bits;
} /* end for y */
return result;
}

View File

@ -47,6 +47,8 @@ libappdisplay_a_sources = \
gimpdisplayshell-dnd.h \
gimpdisplayshell-draw.c \
gimpdisplayshell-draw.h \
gimpdisplayshell-expose.c \
gimpdisplayshell-expose.h \
gimpdisplayshell-handlers.c \
gimpdisplayshell-handlers.h \
gimpdisplayshell-filter.c \
@ -75,6 +77,8 @@ libappdisplay_a_sources = \
gimpdisplayshell-title.h \
gimpdisplayshell-transform.c \
gimpdisplayshell-transform.h \
gimpimagewindow.c \
gimpimagewindow.h \
gimpnavigationeditor.c \
gimpnavigationeditor.h \
gimpscalecombobox.c \

View File

@ -30,6 +30,8 @@ typedef struct _GimpDisplay GimpDisplay;
typedef struct _GimpDisplayShell GimpDisplayShell;
/* typedef struct _GimpDisplayOptions GimpDisplayOptions; in config-types.h */
typedef struct _GimpImageWindow GimpImageWindow;
typedef struct _GimpCursorView GimpCursorView;
typedef struct _GimpNavigationEditor GimpNavigationEditor;
typedef struct _GimpScaleComboBox GimpScaleComboBox;

View File

@ -246,13 +246,18 @@ gimp_displays_get_num_visible (Gimp *gimp)
if (GTK_WIDGET_DRAWABLE (display->shell))
{
GdkWindow *window = gtk_widget_get_window (display->shell);
GdkWindowState state = gdk_window_get_state (window);
GtkWidget *toplevel = gtk_widget_get_toplevel (display->shell);
if ((state & (GDK_WINDOW_STATE_WITHDRAWN |
GDK_WINDOW_STATE_ICONIFIED)) == 0)
if (GTK_IS_WINDOW (toplevel))
{
visible++;
GdkWindow *window = gtk_widget_get_window (toplevel);
GdkWindowState state = gdk_window_get_state (window);
if ((state & (GDK_WINDOW_STATE_WITHDRAWN |
GDK_WINDOW_STATE_ICONIFIED)) == 0)
{
visible++;
}
}
}
}

View File

@ -22,18 +22,10 @@
#include "display-types.h"
#include "config/gimpdisplayconfig.h"
#include "core/gimpimage.h"
#include "file/file-utils.h"
#include "gimpdisplay.h"
#include "gimpdisplay-handlers.h"
#include "gimpdisplayshell.h"
#include "gimpstatusbar.h"
#include "gimp-intl.h"
/* local function prototypes */
@ -48,12 +40,6 @@ static void gimp_display_update_handler (GimpProjection *projection,
static void gimp_display_flush_handler (GimpImage *image,
gboolean invalidate_preview,
GimpDisplay *display);
static void gimp_display_saved_handler (GimpImage *image,
const gchar *uri,
GimpDisplay *display);
static void gimp_display_exported_handler (GimpImage *image,
const gchar *uri,
GimpDisplay *display);
/* public functions */
@ -86,12 +72,6 @@ gimp_display_connect (GimpDisplay *display,
g_signal_connect (image, "flush",
G_CALLBACK (gimp_display_flush_handler),
display);
g_signal_connect (image, "saved",
G_CALLBACK (gimp_display_saved_handler),
display);
g_signal_connect (image, "exported",
G_CALLBACK (gimp_display_exported_handler),
display);
}
void
@ -104,12 +84,6 @@ gimp_display_disconnect (GimpDisplay *display)
image = display->image;
g_signal_handlers_disconnect_by_func (image,
gimp_display_saved_handler,
display);
g_signal_handlers_disconnect_by_func (image,
gimp_display_exported_handler,
display);
g_signal_handlers_disconnect_by_func (image,
gimp_display_flush_handler,
display);
@ -156,32 +130,3 @@ gimp_display_flush_handler (GimpImage *image,
{
gimp_display_flush (display);
}
static void
gimp_display_saved_handler (GimpImage *image,
const gchar *uri,
GimpDisplay *display)
{
GtkWidget *statusbar = GIMP_DISPLAY_SHELL (display->shell)->statusbar;
gchar *filename = file_utils_uri_display_name (uri);
gimp_statusbar_push_temp (GIMP_STATUSBAR (statusbar), GIMP_MESSAGE_INFO,
GTK_STOCK_SAVE, _("Image saved to '%s'"),
filename);
g_free (filename);
}
static void
gimp_display_exported_handler (GimpImage *image,
const gchar *uri,
GimpDisplay *display)
{
GtkWidget *statusbar = GIMP_DISPLAY_SHELL (display->shell)->statusbar;
gchar *filename = file_utils_uri_display_name (uri);
gimp_statusbar_push_temp (GIMP_STATUSBAR (statusbar), GIMP_MESSAGE_INFO,
GTK_STOCK_SAVE, _("Image exported to '%s'"),
filename);
g_free (filename);
}

View File

@ -25,11 +25,12 @@
#include "display-types.h"
#include "tools/tools-types.h"
#include "config/gimpdisplayconfig.h"
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimparea.h"
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpprogress.h"
@ -39,9 +40,11 @@
#include "gimpdisplay.h"
#include "gimpdisplay-handlers.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-expose.h"
#include "gimpdisplayshell-handlers.h"
#include "gimpdisplayshell-icon.h"
#include "gimpdisplayshell-transform.h"
#include "gimpimagewindow.h"
#include "gimp-intl.h"
@ -352,8 +355,9 @@ gimp_display_new (Gimp *gimp,
GimpUIManager *popup_manager,
GimpDialogFactory *display_factory)
{
GimpDisplay *display;
gint ID;
GimpDisplay *display;
GimpImageWindow *window = NULL;
gint ID;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
g_return_val_if_fail (image == NULL || GIMP_IS_IMAGE (image), NULL);
@ -380,16 +384,56 @@ gimp_display_new (Gimp *gimp,
if (image)
gimp_display_connect (display, image);
/* get an image window */
if (GIMP_GUI_CONFIG (display->config)->single_window_mode)
{
GimpDisplay *active_display;
active_display = gimp_context_get_display (gimp_get_user_context (gimp));
if (! active_display)
{
active_display =
GIMP_DISPLAY (gimp_container_get_first_child (gimp->displays));
}
if (active_display)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (active_display->shell);
window = gimp_display_shell_get_window (shell);
}
}
if (! window)
window = g_object_new (GIMP_TYPE_IMAGE_WINDOW,
"menu-factory", menu_factory,
"display-factory", display_factory,
/* The window position will be overridden by the
* dialog factory, it is only really used on first
* startup.
*/
display->image ? NULL : "window-position",
GTK_WIN_POS_CENTER,
NULL);
/* create the shell for the image */
display->shell = gimp_display_shell_new (display, unit, scale,
menu_factory, popup_manager,
display_factory);
gtk_widget_show (display->shell);
popup_manager);
g_signal_connect (GIMP_DISPLAY_SHELL (display->shell)->statusbar, "cancel",
gimp_image_window_add_shell (window,
GIMP_DISPLAY_SHELL (display->shell));
gimp_image_window_set_active_shell (window,
GIMP_DISPLAY_SHELL (display->shell));
/* FIXME image window */
g_signal_connect (gimp_image_window_get_statusbar (GIMP_IMAGE_WINDOW (window)),
"cancel",
G_CALLBACK (gimp_display_progress_canceled),
display);
gtk_window_present (GTK_WINDOW (window));
/* add the display to the list */
gimp_container_add (gimp->displays, GIMP_OBJECT (display));
@ -427,14 +471,35 @@ gimp_display_delete (GimpDisplay *display)
if (display->shell)
{
GtkWidget *shell = display->shell;
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
GimpImageWindow *window = gimp_display_shell_get_window (shell);
/* set display->shell to NULL *before* destroying the shell.
* all callbacks in gimpdisplayshell-callbacks.c will check
* this pointer and do nothing if the shell is in destruction.
*/
display->shell = NULL;
gtk_widget_destroy (shell);
if (window)
{
if (gimp_image_window_get_n_shells (window) > 1)
{
g_object_ref (shell);
gimp_image_window_remove_shell (window, shell);
gtk_widget_destroy (GTK_WIDGET (shell));
g_object_unref (shell);
}
else
{
gtk_widget_destroy (GTK_WIDGET (window));
}
}
else
{
g_object_unref (shell);
}
}
g_object_unref (display);
@ -524,7 +589,8 @@ gimp_display_set_image (GimpDisplay *display,
else
gimp_display_shell_icon_update (GIMP_DISPLAY_SHELL (display->shell));
g_object_notify (G_OBJECT (display), "image");
if (old_image != image)
g_object_notify (G_OBJECT (display), "image");
}
void

View File

@ -41,9 +41,9 @@ enum
{
PROP_0,
PROP_SHOW_MENUBAR,
PROP_SHOW_STATUSBAR,
PROP_SHOW_RULERS,
PROP_SHOW_SCROLLBARS,
PROP_SHOW_STATUSBAR,
PROP_SHOW_SELECTION,
PROP_SHOW_LAYER_BOUNDARY,
PROP_SHOW_GUIDES,
@ -105,6 +105,10 @@ gimp_display_options_class_init (GimpDisplayOptionsClass *klass)
"show-menubar", SHOW_MENUBAR_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_STATUSBAR,
"show-statusbar", SHOW_STATUSBAR_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_RULERS,
"show-rulers", SHOW_RULERS_BLURB,
TRUE,
@ -113,10 +117,6 @@ gimp_display_options_class_init (GimpDisplayOptionsClass *klass)
"show-scrollbars", SHOW_SCROLLBARS_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_STATUSBAR,
"show-statusbar", SHOW_STATUSBAR_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SELECTION,
"show-selection", SHOW_SELECTION_BLURB,
TRUE,
@ -163,6 +163,10 @@ gimp_display_options_fullscreen_class_init (GimpDisplayOptionsFullscreenClass *k
"show-menubar", SHOW_MENUBAR_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_STATUSBAR,
"show-statusbar", SHOW_STATUSBAR_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_RULERS,
"show-rulers", SHOW_RULERS_BLURB,
FALSE,
@ -171,10 +175,6 @@ gimp_display_options_fullscreen_class_init (GimpDisplayOptionsFullscreenClass *k
"show-scrollbars", SHOW_SCROLLBARS_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_STATUSBAR,
"show-statusbar", SHOW_STATUSBAR_BLURB,
FALSE,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SHOW_SELECTION,
"show-selection", SHOW_SELECTION_BLURB,
FALSE,
@ -263,15 +263,15 @@ gimp_display_options_set_property (GObject *object,
case PROP_SHOW_MENUBAR:
options->show_menubar = g_value_get_boolean (value);
break;
case PROP_SHOW_STATUSBAR:
options->show_statusbar = g_value_get_boolean (value);
break;
case PROP_SHOW_RULERS:
options->show_rulers = g_value_get_boolean (value);
break;
case PROP_SHOW_SCROLLBARS:
options->show_scrollbars = g_value_get_boolean (value);
break;
case PROP_SHOW_STATUSBAR:
options->show_statusbar = g_value_get_boolean (value);
break;
case PROP_SHOW_SELECTION:
options->show_selection = g_value_get_boolean (value);
break;
@ -313,15 +313,15 @@ gimp_display_options_get_property (GObject *object,
case PROP_SHOW_MENUBAR:
g_value_set_boolean (value, options->show_menubar);
break;
case PROP_SHOW_STATUSBAR:
g_value_set_boolean (value, options->show_statusbar);
break;
case PROP_SHOW_RULERS:
g_value_set_boolean (value, options->show_rulers);
break;
case PROP_SHOW_SCROLLBARS:
g_value_set_boolean (value, options->show_scrollbars);
break;
case PROP_SHOW_STATUSBAR:
g_value_set_boolean (value, options->show_statusbar);
break;
case PROP_SHOW_SELECTION:
g_value_set_boolean (value, options->show_selection);
break;

View File

@ -39,11 +39,13 @@ struct _GimpDisplayOptions
{
GObject parent_instance;
/* GimpDisplayShell options */
/* GimpImageWindow options */
gboolean show_menubar;
gboolean show_statusbar;
/* GimpDisplayShell options */
gboolean show_rulers;
gboolean show_scrollbars;
gboolean show_statusbar;
/* GimpCanvas options */
gboolean show_selection;

View File

@ -42,59 +42,50 @@
#include "gimpdisplayoptions.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-appearance.h"
#include "gimpdisplayshell-expose.h"
#include "gimpdisplayshell-selection.h"
#include "gimpimagewindow.h"
#include "gimpstatusbar.h"
#define GET_OPTIONS(shell) \
(shell->display->image ? \
(gimp_display_shell_get_fullscreen (shell) ? \
shell->fullscreen_options : shell->options) : \
shell->no_image_options)
/* local function prototypes */
#define SET_ACTIVE(manager,action_name,active) \
{ GimpActionGroup *group = \
gimp_ui_manager_get_action_group (manager, "view"); \
gimp_action_group_set_action_active (group, action_name, active); }
static GimpDisplayOptions *
appearance_get_options (const GimpDisplayShell *shell);
static void appearance_set_action_active (GimpDisplayShell *shell,
const gchar *action,
gboolean active);
static void appearance_set_action_color (GimpDisplayShell *shell,
const gchar *action,
const GimpRGB *color);
#define SET_COLOR(manager,action_name,color) \
{ GimpActionGroup *group = \
gimp_ui_manager_get_action_group (manager, "view"); \
gimp_action_group_set_action_color (group, action_name, color, FALSE); }
#define IS_ACTIVE_DISPLAY(shell) \
((shell)->display == \
gimp_context_get_display (gimp_get_user_context \
((shell)->display->gimp)))
/* public functions */
void
gimp_display_shell_appearance_update (GimpDisplayShell *shell)
{
GimpDisplayOptions *options;
gboolean fullscreen;
GimpImageWindow *window;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
options = GET_OPTIONS (shell);
options = appearance_get_options (shell);
window = gimp_display_shell_get_window (shell);
fullscreen = gimp_display_shell_get_fullscreen (shell);
if (shell->menubar)
gtk_widget_set_name (GTK_WIDGET (shell->menubar),
fullscreen ? "gimp-menubar-fullscreen" : NULL);
gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (shell->statusbar),
! fullscreen);
if (window)
appearance_set_action_active (shell, "view-fullscreen",
gimp_image_window_get_fullscreen (window));
gimp_display_shell_set_show_menubar (shell,
options->show_menubar);
gimp_display_shell_set_show_statusbar (shell,
options->show_statusbar);
gimp_display_shell_set_show_rulers (shell,
options->show_rulers);
gimp_display_shell_set_show_scrollbars (shell,
options->show_scrollbars);
gimp_display_shell_set_show_statusbar (shell,
options->show_statusbar);
gimp_display_shell_set_show_selection (shell,
options->show_selection);
gimp_display_shell_set_show_layer (shell,
@ -110,53 +101,26 @@ gimp_display_shell_appearance_update (GimpDisplayShell *shell)
&options->padding_color);
}
void
gimp_display_shell_set_fullscreen (GimpDisplayShell *shell,
gboolean fullscreen)
{
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
if (fullscreen != gimp_display_shell_get_fullscreen (shell))
{
if (fullscreen)
gtk_window_fullscreen (GTK_WINDOW (shell));
else
gtk_window_unfullscreen (GTK_WINDOW (shell));
}
}
gboolean
gimp_display_shell_get_fullscreen (const GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return (shell->window_state & GDK_WINDOW_STATE_FULLSCREEN) != 0;
}
void
gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
gboolean show)
{
GimpDisplayOptions *options;
GimpImageWindow *window;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
options = GET_OPTIONS (shell);
options = appearance_get_options (shell);
window = gimp_display_shell_get_window (shell);
g_object_set (options, "show-menubar", show, NULL);
if (shell->menubar)
if (window && gimp_image_window_get_active_shell (window) == shell)
{
if (show)
gtk_widget_show (shell->menubar);
else
gtk_widget_hide (shell->menubar);
gimp_image_window_set_show_menubar (window, show);
}
SET_ACTIVE (shell->menubar_manager, "view-show-menubar", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view-show-menubar", show);
appearance_set_action_active (shell, "view-show-menubar", show);
}
gboolean
@ -164,7 +128,37 @@ gimp_display_shell_get_show_menubar (const GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return GET_OPTIONS (shell)->show_menubar;
return appearance_get_options (shell)->show_menubar;
}
void
gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
gboolean show)
{
GimpDisplayOptions *options;
GimpImageWindow *window;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
options = appearance_get_options (shell);
window = gimp_display_shell_get_window (shell);
g_object_set (options, "show-statusbar", show, NULL);
if (window && gimp_image_window_get_active_shell (window) == shell)
{
gimp_image_window_set_show_statusbar (window, show);
}
appearance_set_action_active (shell, "view-show-statusbar", show);
}
gboolean
gimp_display_shell_get_show_statusbar (const GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return appearance_get_options (shell)->show_statusbar;
}
void
@ -176,7 +170,7 @@ gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
options = GET_OPTIONS (shell);
options = appearance_get_options (shell);
g_object_set (options, "show-rulers", show, NULL);
@ -201,10 +195,7 @@ gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
gtk_table_set_row_spacing (table, 0, 0);
}
SET_ACTIVE (shell->menubar_manager, "view-show-rulers", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view-show-rulers", show);
appearance_set_action_active (shell, "view-show-rulers", show);
}
gboolean
@ -212,7 +203,7 @@ gimp_display_shell_get_show_rulers (const GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return GET_OPTIONS (shell)->show_rulers;
return appearance_get_options (shell)->show_rulers;
}
void
@ -226,7 +217,7 @@ gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
options = GET_OPTIONS (shell);
options = appearance_get_options (shell);
g_object_set (options, "show-scrollbars", show, NULL);
@ -259,10 +250,7 @@ gimp_display_shell_set_show_scrollbars (GimpDisplayShell *shell,
gtk_box_set_spacing (vbox, 0);
}
SET_ACTIVE (shell->menubar_manager, "view-show-scrollbars", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view-show-scrollbars", show);
appearance_set_action_active (shell, "view-show-scrollbars", show);
}
gboolean
@ -270,35 +258,7 @@ gimp_display_shell_get_show_scrollbars (const GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return GET_OPTIONS (shell)->show_scrollbars;
}
void
gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
gboolean show)
{
GimpDisplayOptions *options;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
options = GET_OPTIONS (shell);
g_object_set (options, "show-statusbar", show, NULL);
gimp_statusbar_set_visible (GIMP_STATUSBAR (shell->statusbar), show);
SET_ACTIVE (shell->menubar_manager, "view-show-statusbar", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view-show-statusbar", show);
}
gboolean
gimp_display_shell_get_show_statusbar (const GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return GET_OPTIONS (shell)->show_statusbar;
return appearance_get_options (shell)->show_scrollbars;
}
void
@ -309,16 +269,13 @@ gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
options = GET_OPTIONS (shell);
options = appearance_get_options (shell);
g_object_set (options, "show-selection", show, NULL);
gimp_display_shell_selection_set_hidden (shell, ! show);
SET_ACTIVE (shell->menubar_manager, "view-show-selection", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view-show-selection", show);
appearance_set_action_active (shell, "view-show-selection", show);
}
gboolean
@ -326,7 +283,7 @@ gimp_display_shell_get_show_selection (const GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return GET_OPTIONS (shell)->show_selection;
return appearance_get_options (shell)->show_selection;
}
void
@ -337,16 +294,13 @@ gimp_display_shell_set_show_layer (GimpDisplayShell *shell,
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
options = GET_OPTIONS (shell);
options = appearance_get_options (shell);
g_object_set (options, "show-layer-boundary", show, NULL);
gimp_display_shell_selection_layer_set_hidden (shell, ! show);
SET_ACTIVE (shell->menubar_manager, "view-show-layer-boundary", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view-show-layer-boundary", show);
appearance_set_action_active (shell, "view-show-layer-boundary", show);
}
gboolean
@ -354,7 +308,7 @@ gimp_display_shell_get_show_layer (const GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return GET_OPTIONS (shell)->show_layer_boundary;
return appearance_get_options (shell)->show_layer_boundary;
}
void
@ -382,7 +336,7 @@ gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
options = GET_OPTIONS (shell);
options = appearance_get_options (shell);
g_object_set (options, "show-guides", show, NULL);
@ -392,10 +346,7 @@ gimp_display_shell_set_show_guides (GimpDisplayShell *shell,
gimp_display_shell_expose_full (shell);
}
SET_ACTIVE (shell->menubar_manager, "view-show-guides", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view-show-guides", show);
appearance_set_action_active (shell, "view-show-guides", show);
}
gboolean
@ -403,7 +354,7 @@ gimp_display_shell_get_show_guides (const GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return GET_OPTIONS (shell)->show_guides;
return appearance_get_options (shell)->show_guides;
}
void
@ -414,7 +365,7 @@ gimp_display_shell_set_show_grid (GimpDisplayShell *shell,
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
options = GET_OPTIONS (shell);
options = appearance_get_options (shell);
g_object_set (options, "show-grid", show, NULL);
@ -424,10 +375,7 @@ gimp_display_shell_set_show_grid (GimpDisplayShell *shell,
gimp_display_shell_expose_full (shell);
}
SET_ACTIVE (shell->menubar_manager, "view-show-grid", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view-show-grid", show);
appearance_set_action_active (shell, "view-show-grid", show);
}
gboolean
@ -435,7 +383,7 @@ gimp_display_shell_get_show_grid (const GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return GET_OPTIONS (shell)->show_grid;
return appearance_get_options (shell)->show_grid;
}
void
@ -446,7 +394,7 @@ gimp_display_shell_set_show_sample_points (GimpDisplayShell *shell,
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
options = GET_OPTIONS (shell);
options = appearance_get_options (shell);
g_object_set (options, "show-sample-points", show, NULL);
@ -456,10 +404,7 @@ gimp_display_shell_set_show_sample_points (GimpDisplayShell *shell,
gimp_display_shell_expose_full (shell);
}
SET_ACTIVE (shell->menubar_manager, "view-show-sample-points", show);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view-show-sample-points", show);
appearance_set_action_active (shell, "view-show-sample-points", show);
}
gboolean
@ -467,7 +412,7 @@ gimp_display_shell_get_show_sample_points (const GimpDisplayShell *shell)
{
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
return GET_OPTIONS (shell)->show_sample_points;
return appearance_get_options (shell)->show_sample_points;
}
void
@ -480,10 +425,7 @@ gimp_display_shell_set_snap_to_grid (GimpDisplayShell *shell,
{
shell->snap_to_grid = snap ? TRUE : FALSE;
SET_ACTIVE (shell->menubar_manager, "view-snap-to-grid", snap);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view-snap-to-grid", snap);
appearance_set_action_active (shell, "view-snap-to-grid", snap);
}
}
@ -505,10 +447,7 @@ gimp_display_shell_set_snap_to_guides (GimpDisplayShell *shell,
{
shell->snap_to_guides = snap ? TRUE : FALSE;
SET_ACTIVE (shell->menubar_manager, "view-snap-to-guides", snap);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view-snap-to-guides", snap);
appearance_set_action_active (shell, "view-snap-to-guides", snap);
}
}
@ -530,10 +469,7 @@ gimp_display_shell_set_snap_to_canvas (GimpDisplayShell *shell,
{
shell->snap_to_canvas = snap ? TRUE : FALSE;
SET_ACTIVE (shell->menubar_manager, "view-snap-to-canvas", snap);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view-snap-to-canvas", snap);
appearance_set_action_active (shell, "view-snap-to-canvas", snap);
}
}
@ -555,10 +491,7 @@ gimp_display_shell_set_snap_to_vectors (GimpDisplayShell *shell,
{
shell->snap_to_vectors = snap ? TRUE : FALSE;
SET_ACTIVE (shell->menubar_manager, "view-snap-to-vectors", snap);
if (IS_ACTIVE_DISPLAY (shell))
SET_ACTIVE (shell->popup_manager, "view-snap-to-vectors", snap);
appearance_set_action_active (shell, "view-snap-to-vectors", snap);
}
}
@ -581,7 +514,7 @@ gimp_display_shell_set_padding (GimpDisplayShell *shell,
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
g_return_if_fail (padding_color != NULL);
options = GET_OPTIONS (shell);
options = appearance_get_options (shell);
color = *padding_color;
switch (padding_mode)
@ -619,12 +552,8 @@ gimp_display_shell_set_padding (GimpDisplayShell *shell,
gimp_canvas_set_bg_color (GIMP_CANVAS (shell->canvas), &color);
SET_COLOR (shell->menubar_manager, "view-padding-color-menu",
&options->padding_color);
if (IS_ACTIVE_DISPLAY (shell))
SET_COLOR (shell->popup_manager, "view-padding-color-menu",
&options->padding_color);
appearance_set_action_color (shell, "view-padding-color-menu",
&options->padding_color);
gimp_display_shell_expose_full (shell);
}
@ -638,7 +567,7 @@ gimp_display_shell_get_padding (const GimpDisplayShell *shell,
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
options = GET_OPTIONS (shell);
options = appearance_get_options (shell);
if (padding_mode)
*padding_mode = options->padding_mode;
@ -646,3 +575,88 @@ gimp_display_shell_get_padding (const GimpDisplayShell *shell,
if (padding_color)
*padding_color = options->padding_color;
}
/* private functions */
static GimpDisplayOptions *
appearance_get_options (const GimpDisplayShell *shell)
{
if (shell->display->image)
{
GimpImageWindow *window = gimp_display_shell_get_window (shell);
if (window && gimp_image_window_get_fullscreen (window))
return shell->fullscreen_options;
else
return shell->options;
}
return shell->no_image_options;
}
static void
appearance_set_action_active (GimpDisplayShell *shell,
const gchar *action,
gboolean active)
{
GimpImageWindow *window = gimp_display_shell_get_window (shell);
GimpContext *context;
if (window && gimp_image_window_get_active_shell (window) == shell)
{
GimpUIManager *manager = gimp_image_window_get_ui_manager (window);
GimpActionGroup *action_group;
action_group = gimp_ui_manager_get_action_group (manager, "view");
if (action_group)
gimp_action_group_set_action_active (action_group, action, active);
}
context = gimp_get_user_context (shell->display->gimp);
if (shell->display == gimp_context_get_display (context))
{
GimpActionGroup *action_group;
action_group = gimp_ui_manager_get_action_group (shell->popup_manager,
"view");
if (action_group)
gimp_action_group_set_action_active (action_group, action, active);
}
}
static void
appearance_set_action_color (GimpDisplayShell *shell,
const gchar *action,
const GimpRGB *color)
{
GimpImageWindow *window = gimp_display_shell_get_window (shell);
GimpContext *context;
if (window && gimp_image_window_get_active_shell (window) == shell)
{
GimpUIManager *manager = gimp_image_window_get_ui_manager (window);
GimpActionGroup *action_group;
action_group = gimp_ui_manager_get_action_group (manager, "view");
if (action_group)
gimp_action_group_set_action_color (action_group, action, color, FALSE);
}
context = gimp_get_user_context (shell->display->gimp);
if (shell->display == gimp_context_get_display (context))
{
GimpActionGroup *action_group;
action_group = gimp_ui_manager_get_action_group (shell->popup_manager,
"view");
if (action_group)
gimp_action_group_set_action_color (action_group, action, color, FALSE);
}
}

View File

@ -21,14 +21,14 @@
void gimp_display_shell_appearance_update (GimpDisplayShell *shell);
void gimp_display_shell_set_fullscreen (GimpDisplayShell *shell,
gboolean fullscreen);
gboolean gimp_display_shell_get_fullscreen (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_menubar (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_menubar (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_statusbar (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_rulers (const GimpDisplayShell *shell);
@ -37,10 +37,6 @@ void gimp_display_shell_set_show_scrollbars (GimpDisplayShell *sh
gboolean show);
gboolean gimp_display_shell_get_show_scrollbars (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_statusbar (const GimpDisplayShell *shell);
void gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
gboolean show);
gboolean gimp_display_shell_get_show_selection (const GimpDisplayShell *shell);

View File

@ -72,6 +72,7 @@
#include "gimpdisplayshell-selection.h"
#include "gimpdisplayshell-title.h"
#include "gimpdisplayshell-transform.h"
#include "gimpimagewindow.h"
#include "gimpnavigationeditor.h"
#include "gimp-log.h"
@ -1832,9 +1833,17 @@ gimp_display_shell_quick_mask_button_press (GtkWidget *widget,
if ((bevent->type == GDK_BUTTON_PRESS) && (bevent->button == 3))
{
gimp_ui_manager_ui_popup (shell->menubar_manager, "/quick-mask-popup",
GTK_WIDGET (shell),
NULL, NULL, NULL, NULL);
GimpImageWindow *window = gimp_display_shell_get_window (shell);
if (window)
{
GimpUIManager *manager = gimp_image_window_get_ui_manager (window);
gimp_ui_manager_ui_popup (manager,
"/quick-mask-popup",
GTK_WIDGET (shell),
NULL, NULL, NULL, NULL);
}
return TRUE;
}

View File

@ -43,6 +43,7 @@
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-close.h"
#include "gimpimagewindow.h"
#include "gimp-intl.h"
@ -110,11 +111,17 @@ gimp_display_shell_close (GimpDisplayShell *shell,
}
else
{
/* Activate the action instead of simply calling gimp_exit(), so
* the quit action's sensitivity is taken into account.
*/
gimp_ui_manager_activate_action (shell->menubar_manager,
"file", "file-quit");
GimpImageWindow *window = gimp_display_shell_get_window (shell);
if (window)
{
GimpUIManager *manager = gimp_image_window_get_ui_manager (window);
/* Activate the action instead of simply calling gimp_exit(), so
* the quit action's sensitivity is taken into account.
*/
gimp_ui_manager_activate_action (manager, "file", "file-quit");
}
}
}
@ -211,7 +218,7 @@ gimp_display_shell_close_name_changed (GimpImage *image,
{
GtkWidget *window = gtk_widget_get_toplevel (GTK_WIDGET (box));
if (window)
if (GTK_IS_WINDOW (window))
{
gchar *title = g_strdup_printf (_("Close %s"),
gimp_image_get_display_name (image));
@ -295,8 +302,19 @@ gimp_display_shell_close_response (GtkWidget *widget,
break;
case RESPONSE_SAVE:
gimp_ui_manager_activate_action (shell->menubar_manager,
"file", "file-save-and-close");
{
GimpImageWindow *window = gimp_display_shell_get_window (shell);
if (window)
{
GimpUIManager *manager = gimp_image_window_get_ui_manager (window);
/* FIXME image window: set this display active */
gimp_ui_manager_activate_action (manager,
"file", "file-save-and-close");
}
}
break;
default:

View File

@ -35,7 +35,9 @@
#include "gimpcursorview.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-cursor.h"
#include "gimpdisplayshell-expose.h"
#include "gimpdisplayshell-transform.h"
#include "gimpimagewindow.h"
#include "gimpstatusbar.h"
@ -124,6 +126,7 @@ gimp_display_shell_update_cursor (GimpDisplayShell *shell,
gdouble image_x,
gdouble image_y)
{
GimpImageWindow *window;
GimpDialogFactory *factory;
GimpSessionInfo *session_info;
GimpImage *image;
@ -159,8 +162,14 @@ gimp_display_shell_update_cursor (GimpDisplayShell *shell,
/* use the passed image_coords for the statusbar because they are
* possibly snapped...
*/
gimp_statusbar_update_cursor (GIMP_STATUSBAR (shell->statusbar),
precision, image_x, image_y);
window = gimp_display_shell_get_window (shell);
if (window && gimp_image_window_get_active_shell (window))
{
GimpStatusbar *statusbar = gimp_image_window_get_statusbar (window);
gimp_statusbar_update_cursor (statusbar, precision, image_x, image_y);
}
factory = gimp_dialog_factory_from_name ("dock");
session_info = gimp_dialog_factory_find_session_info (factory,
@ -191,12 +200,20 @@ gimp_display_shell_update_cursor (GimpDisplayShell *shell,
void
gimp_display_shell_clear_cursor (GimpDisplayShell *shell)
{
GimpImageWindow *window;
GimpDialogFactory *factory;
GimpSessionInfo *session_info;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
gimp_statusbar_clear_cursor (GIMP_STATUSBAR (shell->statusbar));
window = gimp_display_shell_get_window (shell);
if (window && gimp_image_window_get_active_shell (window) == shell)
{
GimpStatusbar *statusbar = gimp_image_window_get_statusbar (window);
gimp_statusbar_clear_cursor (statusbar);
}
factory = gimp_dialog_factory_from_name ("dock");
session_info = gimp_dialog_factory_find_session_info (factory,

View File

@ -182,7 +182,10 @@ static void
gimp_display_shell_dnd_flush (GimpDisplayShell *shell,
GimpImage *image)
{
gtk_window_present (GTK_WINDOW (shell));
GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (shell));
if (GTK_IS_WINDOW (toplevel))
gtk_window_present (GTK_WINDOW (toplevel));
gimp_image_flush (image);

View File

@ -0,0 +1,116 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
#include "display-types.h"
#include "core/gimpguide.h"
#include "core/gimpsamplepoint.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-expose.h"
#include "gimpdisplayshell-transform.h"
void
gimp_display_shell_expose_area (GimpDisplayShell *shell,
gint x,
gint y,
gint w,
gint h)
{
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
gtk_widget_queue_draw_area (shell->canvas, x, y, w, h);
}
void
gimp_display_shell_expose_guide (GimpDisplayShell *shell,
GimpGuide *guide)
{
gint position;
gint x, y;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
g_return_if_fail (GIMP_IS_GUIDE (guide));
position = gimp_guide_get_position (guide);
if (position < 0)
return;
gimp_display_shell_transform_xy (shell,
position, position,
&x, &y,
FALSE);
switch (gimp_guide_get_orientation (guide))
{
case GIMP_ORIENTATION_HORIZONTAL:
gimp_display_shell_expose_area (shell, 0, y, shell->disp_width, 1);
break;
case GIMP_ORIENTATION_VERTICAL:
gimp_display_shell_expose_area (shell, x, 0, 1, shell->disp_height);
break;
default:
break;
}
}
void
gimp_display_shell_expose_sample_point (GimpDisplayShell *shell,
GimpSamplePoint *sample_point)
{
gdouble x, y;
gint x1, y1, x2, y2;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
g_return_if_fail (sample_point != NULL);
if (sample_point->x < 0)
return;
gimp_display_shell_transform_xy_f (shell,
sample_point->x + 0.5,
sample_point->y + 0.5,
&x, &y,
FALSE);
x1 = MAX (0, floor (x - GIMP_SAMPLE_POINT_DRAW_SIZE));
y1 = MAX (0, floor (y - GIMP_SAMPLE_POINT_DRAW_SIZE));
x2 = MIN (shell->disp_width, ceil (x + GIMP_SAMPLE_POINT_DRAW_SIZE));
y2 = MIN (shell->disp_height, ceil (y + GIMP_SAMPLE_POINT_DRAW_SIZE));
/* HACK: add 3 instead of 1 so the number gets cleared too */
gimp_display_shell_expose_area (shell, x1, y1, x2 - x1 + 3, y2 - y1 + 3);
}
void
gimp_display_shell_expose_full (GimpDisplayShell *shell)
{
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
gtk_widget_queue_draw (shell->canvas);
}

View File

@ -0,0 +1,34 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_DISPLAY_SHELL_EXPOSE_H__
#define __GIMP_DISPLAY_SHELL_EXPOSE_H__
void gimp_display_shell_expose_area (GimpDisplayShell *shell,
gint x,
gint y,
gint w,
gint h);
void gimp_display_shell_expose_guide (GimpDisplayShell *shell,
GimpGuide *guide);
void gimp_display_shell_expose_sample_point (GimpDisplayShell *shell,
GimpSamplePoint *sample_point);
void gimp_display_shell_expose_full (GimpDisplayShell *shell);
#endif /* __GIMP_DISPLAY_SHELL_EXPOSE_H__ */

View File

@ -27,6 +27,7 @@
#include "config/gimpcoreconfig.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-expose.h"
#include "gimpdisplayshell-filter.h"

View File

@ -34,6 +34,8 @@
#include "core/gimpitem.h"
#include "core/gimptreehandler.h"
#include "file/file-utils.h"
#include "widgets/gimpwidgets-utils.h"
#include "gimpdisplay.h"
@ -42,12 +44,17 @@
#include "gimpdisplayshell-appearance.h"
#include "gimpdisplayshell-callbacks.h"
#include "gimpdisplayshell-draw.h"
#include "gimpdisplayshell-expose.h"
#include "gimpdisplayshell-handlers.h"
#include "gimpdisplayshell-icon.h"
#include "gimpdisplayshell-scale.h"
#include "gimpdisplayshell-scroll.h"
#include "gimpdisplayshell-selection.h"
#include "gimpdisplayshell-title.h"
#include "gimpimagewindow.h"
#include "gimpstatusbar.h"
#include "gimp-intl.h"
/* local function prototypes */
@ -88,6 +95,12 @@ static void gimp_display_shell_invalidate_preview_handler (GimpImage *i
GimpDisplayShell *shell);
static void gimp_display_shell_profile_changed_handler (GimpColorManaged *image,
GimpDisplayShell *shell);
static void gimp_display_shell_saved_handler (GimpImage *image,
const gchar *uri,
GimpDisplayShell *shell);
static void gimp_display_shell_exported_handler (GimpImage *image,
const gchar *uri,
GimpDisplayShell *shell);
static void gimp_display_shell_vectors_freeze_handler (GimpVectors *vectors,
GimpDisplayShell *shell);
@ -177,6 +190,12 @@ gimp_display_shell_connect (GimpDisplayShell *shell)
g_signal_connect (image, "profile-changed",
G_CALLBACK (gimp_display_shell_profile_changed_handler),
shell);
g_signal_connect (image, "saved",
G_CALLBACK (gimp_display_shell_saved_handler),
shell);
g_signal_connect (image, "exported",
G_CALLBACK (gimp_display_shell_exported_handler),
shell);
shell->vectors_freeze_handler =
gimp_tree_handler_connect (image->vectors, "freeze",
@ -329,6 +348,12 @@ gimp_display_shell_disconnect (GimpDisplayShell *shell)
gimp_tree_handler_disconnect (shell->vectors_freeze_handler);
shell->vectors_freeze_handler = NULL;
g_signal_handlers_disconnect_by_func (image,
gimp_display_shell_exported_handler,
shell);
g_signal_handlers_disconnect_by_func (image,
gimp_display_shell_saved_handler,
shell);
g_signal_handlers_disconnect_by_func (image,
gimp_display_shell_profile_changed_handler,
shell);
@ -499,10 +524,15 @@ gimp_display_shell_size_changed_detailed_handler (GimpImage *image,
{
if (shell->display->config->resize_windows_on_resize)
{
/* If the window is resized just center the image in it when it
* has change size
*/
gimp_display_shell_shrink_wrap (shell, FALSE);
GimpImageWindow *window = gimp_display_shell_get_window (shell);
if (window && gimp_image_window_get_active_shell (window) == shell)
{
/* If the window is resized just center the image in it when it
* has change size
*/
gimp_image_window_shrink_wrap (window, FALSE);
}
}
else
{
@ -550,6 +580,45 @@ gimp_display_shell_profile_changed_handler (GimpColorManaged *image,
gimp_color_managed_profile_changed (GIMP_COLOR_MANAGED (shell));
}
static void
gimp_display_shell_saved_handler (GimpImage *image,
const gchar *uri,
GimpDisplayShell *shell)
{
GimpImageWindow *window = gimp_display_shell_get_window (shell);
if (window && gimp_image_window_get_active_shell (window) == shell)
{
GimpStatusbar *statusbar = gimp_image_window_get_statusbar (window);
gchar *filename = file_utils_uri_display_name (uri);
gimp_statusbar_push_temp (statusbar, GIMP_MESSAGE_INFO,
GTK_STOCK_SAVE, _("Image saved to '%s'"),
filename);
g_free (filename);
}
}
static void
gimp_display_shell_exported_handler (GimpImage *image,
const gchar *uri,
GimpDisplayShell *shell)
{
GimpImageWindow *window = gimp_display_shell_get_window (shell);
if (window && gimp_image_window_get_active_shell (window) == shell)
{
GimpStatusbar *statusbar = gimp_image_window_get_statusbar (window);
gchar *filename = file_utils_uri_display_name (uri);
gimp_statusbar_push_temp (statusbar, GIMP_MESSAGE_INFO,
GTK_STOCK_SAVE, _("Image exported to '%s'"),
filename);
g_free (filename);
}
}
static void
gimp_display_shell_vectors_freeze_handler (GimpVectors *vectors,
GimpDisplayShell *shell)
@ -671,13 +740,19 @@ gimp_display_shell_padding_notify_handler (GObject *config,
GimpDisplayShell *shell)
{
GimpDisplayConfig *display_config;
GimpImageWindow *window;
gboolean fullscreen;
GimpCanvasPaddingMode padding_mode;
GimpRGB padding_color;
display_config = shell->display->config;
fullscreen = gimp_display_shell_get_fullscreen (shell);
window = gimp_display_shell_get_window (shell);
if (window)
fullscreen = gimp_image_window_get_fullscreen (window);
else
fullscreen = FALSE;
/* if the user did not set the padding mode for this display explicitely */
if (! shell->fullscreen_options->padding_mode_set)

View File

@ -40,6 +40,7 @@ void
gimp_display_shell_icon_update (GimpDisplayShell *shell)
{
GimpImage *image;
GdkPixbuf *pixbuf = NULL;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
@ -47,12 +48,11 @@ gimp_display_shell_icon_update (GimpDisplayShell *shell)
if (image)
{
Gimp *gimp = shell->display->gimp;
GdkPixbuf *pixbuf;
gint width;
gint height;
gdouble factor = ((gdouble) gimp_image_get_height (image) /
(gdouble) gimp_image_get_width (image));
Gimp *gimp = shell->display->gimp;
gint width;
gint height;
gdouble factor = ((gdouble) gimp_image_get_height (image) /
(gdouble) gimp_image_get_width (image));
if (factor >= 1)
{
@ -68,13 +68,9 @@ gimp_display_shell_icon_update (GimpDisplayShell *shell)
pixbuf = gimp_viewable_get_pixbuf (GIMP_VIEWABLE (image),
gimp_get_user_context (gimp),
width, height);
}
gtk_window_set_icon (GTK_WINDOW (shell), pixbuf);
}
else
{
gtk_window_set_icon (GTK_WINDOW (shell), NULL);
}
g_object_set (shell, "icon", pixbuf, NULL);
}
void

View File

@ -27,101 +27,115 @@
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-progress.h"
#include "gimpdisplayshell-title.h"
#include "gimpimagewindow.h"
#include "gimpstatusbar.h"
/* Progress is shown in the status-bar. If the image window is iconified,
* the progress messages are also shown in the window title so that they
* appear in the task bar.
/* FIXME: need to store the shell's progress state in the shell itself
* instead of simply dispatching to the statusbar. Otherwise it's
* impossible to switch an image window between two shells that both
* have active progress messages.
*/
static gboolean gimp_display_shell_is_iconified (GimpDisplayShell *shell);
static GimpProgress *
gimp_display_shell_progress_get_real_progress (GimpProgress *progress)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress);
GimpImageWindow *window = gimp_display_shell_get_window (shell);
if (window && gimp_image_window_get_active_shell (window) == shell)
{
GimpStatusbar *statusbar = gimp_image_window_get_statusbar (window);
return GIMP_PROGRESS (statusbar);
}
return NULL;
}
static GimpProgress *
gimp_display_shell_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress);
progress = gimp_display_shell_progress_get_real_progress (progress);
progress = gimp_progress_start (GIMP_PROGRESS (shell->statusbar),
message, cancelable);
if (progress)
return gimp_progress_start (progress, message, cancelable);
if (progress && gimp_display_shell_is_iconified (shell))
{
gtk_window_set_title (GTK_WINDOW (shell), message);
}
return progress;
return NULL;
}
static void
gimp_display_shell_progress_end (GimpProgress *progress)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress);
progress = gimp_display_shell_progress_get_real_progress (progress);
gimp_progress_end (GIMP_PROGRESS (shell->statusbar));
if (gimp_display_shell_is_iconified (shell))
gimp_display_shell_title_update (shell);
if (progress)
gimp_progress_end (progress);
}
static gboolean
gimp_display_shell_progress_is_active (GimpProgress *progress)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress);
progress = gimp_display_shell_progress_get_real_progress (progress);
return gimp_progress_is_active (GIMP_PROGRESS (shell->statusbar));
if (progress)
return gimp_progress_is_active (progress);
return FALSE;
}
static void
gimp_display_shell_progress_set_text (GimpProgress *progress,
const gchar *message)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress);
progress = gimp_display_shell_progress_get_real_progress (progress);
gimp_progress_set_text (GIMP_PROGRESS (shell->statusbar), message);
if (gimp_progress_is_active (GIMP_PROGRESS (shell->statusbar)) &&
gimp_display_shell_is_iconified (shell))
{
gtk_window_set_title (GTK_WINDOW (shell), message);
}
if (progress)
gimp_progress_set_text (progress, message);
}
static void
gimp_display_shell_progress_set_value (GimpProgress *progress,
gdouble percentage)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress);
progress = gimp_display_shell_progress_get_real_progress (progress);
gimp_progress_set_value (GIMP_PROGRESS (shell->statusbar), percentage);
if (progress)
gimp_progress_set_value (progress, percentage);
}
static gdouble
gimp_display_shell_progress_get_value (GimpProgress *progress)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress);
progress = gimp_display_shell_progress_get_real_progress (progress);
return gimp_progress_get_value (GIMP_PROGRESS (shell->statusbar));
if (progress)
return gimp_progress_get_value (progress);
return 0.0;
}
static void
gimp_display_shell_progress_pulse (GimpProgress *progress)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress);
progress = gimp_display_shell_progress_get_real_progress (progress);
gimp_progress_pulse (GIMP_PROGRESS (shell->statusbar));
if (progress)
gimp_progress_pulse (progress);
}
static guint32
gimp_display_shell_progress_get_window (GimpProgress *progress)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress);
GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (progress));
return (guint32) gimp_window_get_native (GTK_WINDOW (shell));
if (GTK_IS_WINDOW (toplevel))
return (guint32) gimp_window_get_native (GTK_WINDOW (toplevel));
return 0;
}
static gboolean
@ -131,45 +145,37 @@ gimp_display_shell_progress_message (GimpProgress *progress,
const gchar *domain,
const gchar *message)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (progress);
progress = gimp_display_shell_progress_get_real_progress (progress);
switch (severity)
if (progress)
{
case GIMP_MESSAGE_ERROR:
/* error messages are never handled here */
break;
switch (severity)
{
case GIMP_MESSAGE_ERROR:
/* error messages are never handled here */
break;
case GIMP_MESSAGE_WARNING:
/* warning messages go to the statusbar, if it's visible */
if (! gimp_statusbar_get_visible (GIMP_STATUSBAR (shell->statusbar)))
break;
else
return gimp_progress_message (GIMP_PROGRESS (shell->statusbar), gimp,
severity, domain, message);
case GIMP_MESSAGE_WARNING:
/* warning messages go to the statusbar, if it's visible */
if (! gimp_statusbar_get_visible (GIMP_STATUSBAR (progress)))
break;
else
return gimp_progress_message (progress, gimp,
severity, domain, message);
case GIMP_MESSAGE_INFO:
/* info messages go to the statusbar;
* if they are not handled there, they are swallowed
*/
gimp_progress_message (GIMP_PROGRESS (shell->statusbar), gimp,
severity, domain, message);
return TRUE;
case GIMP_MESSAGE_INFO:
/* info messages go to the statusbar;
* if they are not handled there, they are swallowed
*/
gimp_progress_message (progress, gimp,
severity, domain, message);
return TRUE;
}
}
return FALSE;
}
static gboolean
gimp_display_shell_is_iconified (GimpDisplayShell *shell)
{
GtkWidget *widget = GTK_WIDGET (shell);
return (GTK_WIDGET_DRAWABLE (widget) &&
gdk_window_get_state (gtk_widget_get_window (widget)) ==
GDK_WINDOW_STATE_ICONIFIED);
}
void
gimp_display_shell_progress_iface_init (GimpProgressInterface *iface)
{
@ -183,23 +189,3 @@ gimp_display_shell_progress_iface_init (GimpProgressInterface *iface)
iface->get_window = gimp_display_shell_progress_get_window;
iface->message = gimp_display_shell_progress_message;
}
void
gimp_display_shell_progress_window_state_changed (GimpDisplayShell *shell)
{
if (! gimp_progress_is_active (GIMP_PROGRESS (shell)))
return;
if (gimp_display_shell_is_iconified (shell))
{
const gchar *msg = gimp_statusbar_peek (GIMP_STATUSBAR (shell->statusbar),
"progress");
if (msg)
{
gtk_window_set_title (GTK_WINDOW (shell), msg);
return;
}
}
gimp_display_shell_title_update (shell);
}

View File

@ -18,12 +18,11 @@
#ifndef __GIMP_DISPLAY_SHELL_PROGRESS_H__
#define __GIMP_DISPLAY_SHELL_PROGRESS_H__
#include "core/gimpprogress.h"
void gimp_display_shell_progress_iface_init (GimpProgressInterface *iface);
void gimp_display_shell_progress_window_state_changed (GimpDisplayShell *shell);
void gimp_display_shell_progress_iface_init (GimpProgressInterface *iface);
#endif /* __GIMP_DISPLAY_SHELL_PROGRESS_H__ */

View File

@ -56,8 +56,6 @@
100% and 200% zoom)
*/
#define GIMP_DISPLAY_RENDER_BUF_WIDTH 256
typedef struct _RenderInfo RenderInfo;

View File

@ -19,6 +19,10 @@
#define __GIMP_DISPLAY_SHELL_RENDER_H__
#define GIMP_DISPLAY_RENDER_BUF_WIDTH 256
#define GIMP_DISPLAY_RENDER_BUF_HEIGHT 256
void gimp_display_shell_render_init (Gimp *gimp);
void gimp_display_shell_render_exit (Gimp *gimp);

View File

@ -78,6 +78,7 @@ gimp_display_shell_scale_dialog (GimpDisplayShell *shell)
{
ScaleDialogData *data;
GimpImage *image;
GtkWidget *toplevel;
GtkWidget *hbox;
GtkWidget *table;
GtkWidget *spin;
@ -135,8 +136,10 @@ gimp_display_shell_scale_dialog (GimpDisplayShell *shell)
g_object_add_weak_pointer (G_OBJECT (shell->scale_dialog),
(gpointer) &shell->scale_dialog);
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (shell));
gtk_window_set_transient_for (GTK_WINDOW (shell->scale_dialog),
GTK_WINDOW (shell));
GTK_WINDOW (toplevel));
gtk_window_set_destroy_with_parent (GTK_WINDOW (shell->scale_dialog), TRUE);
g_signal_connect (shell->scale_dialog, "response",

View File

@ -34,10 +34,12 @@
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-draw.h"
#include "gimpdisplayshell-expose.h"
#include "gimpdisplayshell-scale.h"
#include "gimpdisplayshell-scroll.h"
#include "gimpdisplayshell-title.h"
#include "gimpdisplayshell-transform.h"
#include "gimpimagewindow.h"
#define SCALE_TIMEOUT 2
@ -366,13 +368,18 @@ gimp_display_shell_scale (GimpDisplayShell *shell,
{
if (shell->display->config->resize_windows_on_zoom)
{
GimpImageWindow *window = gimp_display_shell_get_window (shell);
/* If the window is resized on zoom, simply do the zoom and
* get things rolling
*/
gimp_zoom_model_zoom (shell->zoom, GIMP_ZOOM_TO, real_new_scale);
gimp_display_shell_scaled (shell);
gimp_display_shell_shrink_wrap (shell, FALSE);
if (window && gimp_image_window_get_active_shell (window) == shell)
{
gimp_image_window_shrink_wrap (window, FALSE);
}
}
else
{
@ -657,7 +664,14 @@ gimp_display_shell_scale_resize (GimpDisplayShell *shell,
gimp_display_shell_pause (shell);
if (resize_window)
gimp_display_shell_shrink_wrap (shell, grow_only);
{
GimpImageWindow *window = gimp_display_shell_get_window (shell);
if (window && gimp_image_window_get_active_shell (window) == shell)
{
gimp_image_window_shrink_wrap (window, grow_only);
}
}
gimp_display_shell_scroll_clamp_and_update (shell);
gimp_display_shell_scaled (shell);

View File

@ -38,6 +38,7 @@
#include "gimpdisplay-foreach.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-draw.h"
#include "gimpdisplayshell-expose.h"
#include "gimpdisplayshell-scale.h"
#include "gimpdisplayshell-scroll.h"

View File

@ -35,6 +35,7 @@
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-appearance.h"
#include "gimpdisplayshell-expose.h"
#include "gimpdisplayshell-selection.h"
#include "gimpdisplayshell-transform.h"

View File

@ -66,11 +66,6 @@ static gint gimp_display_shell_format_filename (gchar *buf,
/* public functions */
void
gimp_display_shell_title_init (GimpDisplayShell *shell)
{
}
void
gimp_display_shell_title_update (GimpDisplayShell *shell)
{
@ -97,6 +92,7 @@ gimp_display_shell_update_title_idle (gpointer data)
{
GimpDisplayConfig *config = shell->display->config;
gchar title[MAX_TITLE_BUF];
gchar status[MAX_TITLE_BUF];
gint len;
/* format the title */
@ -108,21 +104,21 @@ gimp_display_shell_update_title_idle (gpointer data)
g_strlcpy (title + len, GIMP_ACRONYM, sizeof (title) - len);
gtk_window_set_title (GTK_WINDOW (shell), title);
/* format the statusbar */
gimp_display_shell_format_title (shell, title, sizeof (title),
gimp_display_shell_format_title (shell, status, sizeof (status),
config->image_status_format);
gimp_statusbar_replace (GIMP_STATUSBAR (shell->statusbar), "title",
NULL, "%s", title);
g_object_set (shell,
"title", title,
"status", status,
NULL);
}
else
{
gtk_window_set_title (GTK_WINDOW (shell), GIMP_NAME);
gimp_statusbar_replace (GIMP_STATUSBAR (shell->statusbar), "title",
NULL, " ");
g_object_set (shell,
"title", GIMP_NAME,
"status", " ",
NULL);
}
return FALSE;

View File

@ -19,7 +19,6 @@
#define __GIMP_DISPLAY_SHELL_TITLE_H__
void gimp_display_shell_title_init (GimpDisplayShell *shell);
void gimp_display_shell_title_update (GimpDisplayShell *shell);

File diff suppressed because it is too large Load Diff

View File

@ -19,9 +19,6 @@
#define __GIMP_DISPLAY_SHELL_H__
#include "widgets/gimpwindow.h"
/* Apply to a float the same rounding mode used in the renderer */
#define PROJ_ROUND(coord) ((gint) RINT (coord))
#define PROJ_ROUND64(coord) ((gint64) RINT (coord))
@ -43,10 +40,6 @@
#define FUNSCALEX(s,x) ((x) / (s)->scale_x)
#define FUNSCALEY(s,y) ((y) / (s)->scale_y)
/* the size of the display render buffer */
#define GIMP_DISPLAY_RENDER_BUF_WIDTH 256
#define GIMP_DISPLAY_RENDER_BUF_HEIGHT 256
#define GIMP_TYPE_DISPLAY_SHELL (gimp_display_shell_get_type ())
#define GIMP_DISPLAY_SHELL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DISPLAY_SHELL, GimpDisplayShell))
@ -60,17 +53,14 @@ typedef struct _GimpDisplayShellClass GimpDisplayShellClass;
struct _GimpDisplayShell
{
GimpWindow parent_instance;
GtkVBox parent_instance;
/* --- cacheline 2 boundary (128 bytes) was 20 bytes ago --- */
GimpDisplay *display;
GimpUIManager *menubar_manager;
GimpUIManager *popup_manager;
GimpDialogFactory *display_factory;
GimpDisplayOptions *options;
GimpDisplayOptions *fullscreen_options;
GimpDisplayOptions *no_image_options;
@ -145,15 +135,15 @@ struct _GimpDisplayShell
GtkWidget *zoom_button; /* NE: zoom toggle button */
GtkWidget *nav_ebox; /* SE: navigation event box */
GtkWidget *menubar; /* menubar */
GtkWidget *statusbar; /* statusbar */
guchar *render_buf; /* buffer for rendering the image */
guint title_idle_id; /* title update idle ID */
gchar *title; /* current title */
gchar *status; /* current default statusbar content */
gint icon_size; /* size of the icon pixmap */
guint icon_idle_id; /* ID of the idle-function */
GdkPixbuf *icon; /* icon */
guint fill_idle_id; /* display_shell_fill() idle ID */
@ -184,7 +174,6 @@ struct _GimpDisplayShell
GimpTreeHandler *vectors_thaw_handler;
GimpTreeHandler *vectors_visible_handler;
GdkWindowState window_state; /* for fullscreen display */
gboolean zoom_on_resize;
gboolean show_transform_preview;
@ -217,7 +206,7 @@ struct _GimpDisplayShell
struct _GimpDisplayShellClass
{
GimpWindowClass parent_class;
GtkVBoxClass parent_class;
void (* scaled) (GimpDisplayShell *shell);
void (* scrolled) (GimpDisplayShell *shell);
@ -225,70 +214,54 @@ struct _GimpDisplayShellClass
};
GType gimp_display_shell_get_type (void) G_GNUC_CONST;
GType gimp_display_shell_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_display_shell_new (GimpDisplay *display,
GtkWidget * gimp_display_shell_new (GimpDisplay *display,
GimpUnit unit,
gdouble scale,
GimpMenuFactory *menu_factory,
GimpUIManager *popup_manager,
GimpDialogFactory *display_factory);
GimpUIManager *popup_manager);
void gimp_display_shell_reconnect (GimpDisplayShell *shell);
GimpImageWindow * gimp_display_shell_get_window (GimpDisplayShell *shell);
void gimp_display_shell_empty (GimpDisplayShell *shell);
void gimp_display_shell_fill (GimpDisplayShell *shell,
void gimp_display_shell_reconnect (GimpDisplayShell *shell);
void gimp_display_shell_empty (GimpDisplayShell *shell);
void gimp_display_shell_fill (GimpDisplayShell *shell,
GimpImage *image,
GimpUnit unit,
gdouble scale);
void gimp_display_shell_scale_changed (GimpDisplayShell *shell);
void gimp_display_shell_scale_changed (GimpDisplayShell *shell);
void gimp_display_shell_scaled (GimpDisplayShell *shell);
void gimp_display_shell_scrolled (GimpDisplayShell *shell);
void gimp_display_shell_scaled (GimpDisplayShell *shell);
void gimp_display_shell_scrolled (GimpDisplayShell *shell);
void gimp_display_shell_set_unit (GimpDisplayShell *shell,
void gimp_display_shell_set_unit (GimpDisplayShell *shell,
GimpUnit unit);
GimpUnit gimp_display_shell_get_unit (GimpDisplayShell *shell);
GimpUnit gimp_display_shell_get_unit (GimpDisplayShell *shell);
gboolean gimp_display_shell_snap_coords (GimpDisplayShell *shell,
gboolean gimp_display_shell_snap_coords (GimpDisplayShell *shell,
GimpCoords *coords,
gint snap_offset_x,
gint snap_offset_y,
gint snap_width,
gint snap_height);
gboolean gimp_display_shell_mask_bounds (GimpDisplayShell *shell,
gboolean gimp_display_shell_mask_bounds (GimpDisplayShell *shell,
gint *x1,
gint *y1,
gint *x2,
gint *y2);
void gimp_display_shell_expose_area (GimpDisplayShell *shell,
gint x,
gint y,
gint w,
gint h);
void gimp_display_shell_expose_guide (GimpDisplayShell *shell,
GimpGuide *guide);
void gimp_display_shell_expose_sample_point (GimpDisplayShell *shell,
GimpSamplePoint *sample_point);
void gimp_display_shell_expose_full (GimpDisplayShell *shell);
void gimp_display_shell_flush (GimpDisplayShell *shell,
void gimp_display_shell_flush (GimpDisplayShell *shell,
gboolean now);
void gimp_display_shell_pause (GimpDisplayShell *shell);
void gimp_display_shell_resume (GimpDisplayShell *shell);
void gimp_display_shell_pause (GimpDisplayShell *shell);
void gimp_display_shell_resume (GimpDisplayShell *shell);
void gimp_display_shell_update_icon (GimpDisplayShell *shell);
void gimp_display_shell_shrink_wrap (GimpDisplayShell *shell,
gboolean grow_only);
void gimp_display_shell_set_highlight (GimpDisplayShell *shell,
void gimp_display_shell_set_highlight (GimpDisplayShell *shell,
const GdkRectangle *highlight);
void gimp_display_shell_set_mask (GimpDisplayShell *shell,
void gimp_display_shell_set_mask (GimpDisplayShell *shell,
GimpDrawable *mask,
GimpChannelType color);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,80 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_IMAGE_WINDOW_H__
#define __GIMP_IMAGE_WINDOW_H__
#include "widgets/gimpwindow.h"
#define GIMP_TYPE_IMAGE_WINDOW (gimp_image_window_get_type ())
#define GIMP_IMAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_IMAGE_WINDOW, GimpImageWindow))
#define GIMP_IMAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_IMAGE_WINDOW, GimpImageWindowClass))
#define GIMP_IS_IMAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_IMAGE_WINDOW))
#define GIMP_IS_IMAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_IMAGE_WINDOW))
#define GIMP_IMAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_IMAGE_WINDOW, GimpImageWindowClass))
typedef struct _GimpImageWindowClass GimpImageWindowClass;
struct _GimpImageWindow
{
GimpWindow parent_instance;
};
struct _GimpImageWindowClass
{
GimpWindowClass parent_class;
};
GType gimp_image_window_get_type (void) G_GNUC_CONST;
GimpUIManager * gimp_image_window_get_ui_manager (GimpImageWindow *window);
GimpStatusbar * gimp_image_window_get_statusbar (GimpImageWindow *window);
void gimp_image_window_add_shell (GimpImageWindow *window,
GimpDisplayShell *shell);
void gimp_image_window_remove_shell (GimpImageWindow *window,
GimpDisplayShell *shell);
gint gimp_image_window_get_n_shells (GimpImageWindow *window);
void gimp_image_window_set_active_shell (GimpImageWindow *window,
GimpDisplayShell *shell);
GimpDisplayShell * gimp_image_window_get_active_shell (GimpImageWindow *window);
void gimp_image_window_set_fullscreen (GimpImageWindow *window,
gboolean fullscreen);
gboolean gimp_image_window_get_fullscreen (GimpImageWindow *window);
void gimp_image_window_set_show_menubar (GimpImageWindow *window,
gboolean show);
gboolean gimp_image_window_get_show_menubar (GimpImageWindow *window);
void gimp_image_window_set_show_statusbar (GimpImageWindow *window,
gboolean show);
gboolean gimp_image_window_get_show_statusbar (GimpImageWindow *window);
gboolean gimp_image_window_is_iconified (GimpImageWindow *window);
void gimp_image_window_shrink_wrap (GimpImageWindow *window,
gboolean grow_only);
#endif /* __GIMP_IMAGE_WINDOW_H__ */

View File

@ -40,6 +40,7 @@
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-scale.h"
#include "gimpimagewindow.h"
#include "gimpscalecombobox.h"
#include "gimpstatusbar.h"
@ -105,6 +106,8 @@ static void gimp_statusbar_unit_changed (GimpUnitComboBox *combo,
GimpStatusbar *statusbar);
static void gimp_statusbar_scale_changed (GimpScaleComboBox *combo,
GimpStatusbar *statusbar);
static void gimp_statusbar_scale_activated (GimpScaleComboBox *combo,
GimpStatusbar *statusbar);
static void gimp_statusbar_shell_scaled (GimpDisplayShell *shell,
GimpStatusbar *statusbar);
static guint gimp_statusbar_get_context_id (GimpStatusbar *statusbar,
@ -207,6 +210,10 @@ gimp_statusbar_init (GimpStatusbar *statusbar)
G_CALLBACK (gimp_statusbar_scale_changed),
statusbar);
g_signal_connect (statusbar->scale_combo, "entry-activated",
G_CALLBACK (gimp_statusbar_scale_activated),
statusbar);
/* put the label back into our hbox */
gtk_box_pack_start (GTK_BOX (hbox),
GTK_STATUSBAR (statusbar)->label, TRUE, TRUE, 1);
@ -370,6 +377,8 @@ gimp_statusbar_progress_start (GimpProgress *progress,
if (GTK_WIDGET_DRAWABLE (bar))
gdk_window_process_updates (gtk_widget_get_window (bar), TRUE);
gimp_statusbar_override_window_title (statusbar);
return progress;
}
@ -402,6 +411,8 @@ gimp_statusbar_progress_end (GimpProgress *progress)
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar), 0.0);
gtk_widget_set_sensitive (statusbar->cancel_button, FALSE);
gtk_widget_hide (statusbar->cancel_button);
gimp_statusbar_restore_window_title (statusbar);
}
}
@ -427,6 +438,8 @@ gimp_statusbar_progress_set_text (GimpProgress *progress,
if (GTK_WIDGET_DRAWABLE (bar))
gdk_window_process_updates (gtk_widget_get_window (bar), TRUE);
gimp_statusbar_override_window_title (statusbar);
}
}
@ -643,25 +656,33 @@ gimp_statusbar_update (GimpStatusbar *statusbar)
/* public functions */
GtkWidget *
gimp_statusbar_new (GimpDisplayShell *shell)
gimp_statusbar_new (void)
{
GimpStatusbar *statusbar;
return g_object_new (GIMP_TYPE_STATUSBAR, NULL);
}
g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), NULL);
void
gimp_statusbar_set_shell (GimpStatusbar *statusbar,
GimpDisplayShell *shell)
{
g_return_if_fail (GIMP_IS_STATUSBAR (statusbar));
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
statusbar = g_object_new (GIMP_TYPE_STATUSBAR, NULL);
if (shell == statusbar->shell)
return;
if (statusbar->shell)
{
g_signal_handlers_disconnect_by_func (statusbar->shell,
gimp_statusbar_shell_scaled,
statusbar);
}
statusbar->shell = shell;
g_signal_connect_object (shell, "scaled",
g_signal_connect_object (statusbar->shell, "scaled",
G_CALLBACK (gimp_statusbar_shell_scaled),
statusbar, 0);
g_signal_connect_object (statusbar->scale_combo, "entry-activated",
G_CALLBACK (gtk_widget_grab_focus),
shell->canvas, G_CONNECT_SWAPPED);
return GTK_WIDGET (statusbar);
}
gboolean
@ -716,6 +737,39 @@ gimp_statusbar_fill (GimpStatusbar *statusbar)
gtk_widget_show (statusbar->scale_combo);
}
void
gimp_statusbar_override_window_title (GimpStatusbar *statusbar)
{
GtkWidget *toplevel;
g_return_if_fail (GIMP_IS_STATUSBAR (statusbar));
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (statusbar));
if (gimp_image_window_is_iconified (GIMP_IMAGE_WINDOW (toplevel)))
{
const gchar *message = gimp_statusbar_peek (statusbar, "progress");
if (message)
gtk_window_set_title (GTK_WINDOW (toplevel), message);
}
}
void
gimp_statusbar_restore_window_title (GimpStatusbar *statusbar)
{
GtkWidget *toplevel;
g_return_if_fail (GIMP_IS_STATUSBAR (statusbar));
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (statusbar));
if (gimp_image_window_is_iconified (GIMP_IMAGE_WINDOW (toplevel)))
{
g_object_notify (G_OBJECT (statusbar->shell), "title");
}
}
void
gimp_statusbar_push (GimpStatusbar *statusbar,
const gchar *context,
@ -1391,6 +1445,13 @@ gimp_statusbar_scale_changed (GimpScaleComboBox *combo,
GIMP_ZOOM_FOCUS_BEST_GUESS);
}
static void
gimp_statusbar_scale_activated (GimpScaleComboBox *combo,
GimpStatusbar *statusbar)
{
gtk_widget_grab_focus (statusbar->shell->canvas);
}
static guint
gimp_statusbar_get_context_id (GimpStatusbar *statusbar,
const gchar *context)

View File

@ -71,73 +71,79 @@ struct _GimpStatusbarClass
};
GType gimp_statusbar_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_statusbar_new (GimpDisplayShell *shell);
GType gimp_statusbar_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_statusbar_new (void);
gboolean gimp_statusbar_get_visible (GimpStatusbar *statusbar);
void gimp_statusbar_set_visible (GimpStatusbar *statusbar,
gboolean visible);
void gimp_statusbar_empty (GimpStatusbar *statusbar);
void gimp_statusbar_fill (GimpStatusbar *statusbar);
void gimp_statusbar_set_shell (GimpStatusbar *statusbar,
GimpDisplayShell *shell);
void gimp_statusbar_push (GimpStatusbar *statusbar,
const gchar *context,
const gchar *stock_id,
const gchar *format,
...) G_GNUC_PRINTF(4,5);
void gimp_statusbar_push_valist (GimpStatusbar *statusbar,
const gchar *context,
const gchar *stock_id,
const gchar *format,
va_list args);
void gimp_statusbar_push_coords (GimpStatusbar *statusbar,
const gchar *context,
const gchar *stock_id,
GimpCursorPrecision precision,
const gchar *title,
gdouble x,
const gchar *separator,
gdouble y,
const gchar *help);
void gimp_statusbar_push_length (GimpStatusbar *statusbar,
const gchar *context,
const gchar *stock_id,
const gchar *title,
GimpOrientationType axis,
gdouble value,
const gchar *help);
void gimp_statusbar_replace (GimpStatusbar *statusbar,
const gchar *context,
const gchar *stock_id,
const gchar *format,
...) G_GNUC_PRINTF(4,5);
void gimp_statusbar_replace_valist (GimpStatusbar *statusbar,
const gchar *context,
const gchar *stock_id,
const gchar *format,
va_list args);
const gchar * gimp_statusbar_peek (GimpStatusbar *statusbar,
const gchar *context);
void gimp_statusbar_pop (GimpStatusbar *statusbar,
const gchar *context);
gboolean gimp_statusbar_get_visible (GimpStatusbar *statusbar);
void gimp_statusbar_set_visible (GimpStatusbar *statusbar,
gboolean visible);
void gimp_statusbar_empty (GimpStatusbar *statusbar);
void gimp_statusbar_fill (GimpStatusbar *statusbar);
void gimp_statusbar_push_temp (GimpStatusbar *statusbar,
GimpMessageSeverity severity,
const gchar *stock_id,
const gchar *format,
...) G_GNUC_PRINTF(4,5);
void gimp_statusbar_push_temp_valist (GimpStatusbar *statusbar,
GimpMessageSeverity severity,
const gchar *stock_id,
const gchar *format,
va_list args);
void gimp_statusbar_pop_temp (GimpStatusbar *statusbar);
void gimp_statusbar_override_window_title (GimpStatusbar *statusbar);
void gimp_statusbar_restore_window_title (GimpStatusbar *statusbar);
void gimp_statusbar_update_cursor (GimpStatusbar *statusbar,
GimpCursorPrecision precision,
gdouble x,
gdouble y);
void gimp_statusbar_clear_cursor (GimpStatusbar *statusbar);
void gimp_statusbar_push (GimpStatusbar *statusbar,
const gchar *context,
const gchar *stock_id,
const gchar *format,
...) G_GNUC_PRINTF(4,5);
void gimp_statusbar_push_valist (GimpStatusbar *statusbar,
const gchar *context,
const gchar *stock_id,
const gchar *format,
va_list args);
void gimp_statusbar_push_coords (GimpStatusbar *statusbar,
const gchar *context,
const gchar *stock_id,
GimpCursorPrecision precision,
const gchar *title,
gdouble x,
const gchar *separator,
gdouble y,
const gchar *help);
void gimp_statusbar_push_length (GimpStatusbar *statusbar,
const gchar *context,
const gchar *stock_id,
const gchar *title,
GimpOrientationType axis,
gdouble value,
const gchar *help);
void gimp_statusbar_replace (GimpStatusbar *statusbar,
const gchar *context,
const gchar *stock_id,
const gchar *format,
...) G_GNUC_PRINTF(4,5);
void gimp_statusbar_replace_valist (GimpStatusbar *statusbar,
const gchar *context,
const gchar *stock_id,
const gchar *format,
va_list args);
const gchar * gimp_statusbar_peek (GimpStatusbar *statusbar,
const gchar *context);
void gimp_statusbar_pop (GimpStatusbar *statusbar,
const gchar *context);
void gimp_statusbar_push_temp (GimpStatusbar *statusbar,
GimpMessageSeverity severity,
const gchar *stock_id,
const gchar *format,
...) G_GNUC_PRINTF(4,5);
void gimp_statusbar_push_temp_valist (GimpStatusbar *statusbar,
GimpMessageSeverity severity,
const gchar *stock_id,
const gchar *format,
va_list args);
void gimp_statusbar_pop_temp (GimpStatusbar *statusbar);
void gimp_statusbar_update_cursor (GimpStatusbar *statusbar,
GimpCursorPrecision precision,
gdouble x,
gdouble y);
void gimp_statusbar_clear_cursor (GimpStatusbar *statusbar);
G_END_DECLS

View File

@ -316,7 +316,12 @@ gui_display_get_window (GimpObject *display)
GimpDisplay *disp = GIMP_DISPLAY (display);
if (disp->shell)
return (guint32) gimp_window_get_native (GTK_WINDOW (disp->shell));
{
GtkWidget *toplevel = gtk_widget_get_toplevel (disp->shell);
if (GTK_IS_WINDOW (toplevel))
return (guint32) gimp_window_get_native (GTK_WINDOW (toplevel));
}
return 0;
}
@ -356,9 +361,6 @@ gui_display_create (Gimp *gimp,
gimp_context_set_display (context, display);
}
gimp_ui_manager_update (GIMP_DISPLAY_SHELL (display->shell)->menubar_manager,
display);
return GIMP_OBJECT (display);
}

View File

@ -43,6 +43,7 @@
#include "display/gimpdisplay-foreach.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-render.h"
#include "display/gimpimagewindow.h"
#include "display/gimpstatusbar.h"
#include "tools/gimp-tools.h"
@ -530,8 +531,7 @@ gui_restore_after_callback (Gimp *gimp,
windows_show_toolbox ();
/* move keyboard focus to the display */
gtk_window_present (GTK_WINDOW (display->shell));
gtk_window_present (GTK_WINDOW (gtk_widget_get_toplevel (display->shell)));
}
/* indicate that the application has finished loading */
@ -701,10 +701,16 @@ gui_menu_show_tooltip (GimpUIManager *manager,
if (display)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
GimpImageWindow *window = gimp_display_shell_get_window (shell);
gimp_statusbar_push (GIMP_STATUSBAR (shell->statusbar), "menu-tooltip",
NULL, "%s", tooltip);
if (window)
{
GimpStatusbar *statusbar = gimp_image_window_get_statusbar (window);
gimp_statusbar_push (statusbar, "menu-tooltip",
NULL, "%s", tooltip);
}
}
}
@ -717,9 +723,15 @@ gui_menu_hide_tooltip (GimpUIManager *manager,
if (display)
{
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (display->shell);
GimpImageWindow *window = gimp_display_shell_get_window (shell);
gimp_statusbar_pop (GIMP_STATUSBAR (shell->statusbar), "menu-tooltip");
if (window)
{
GimpStatusbar *statusbar = gimp_image_window_get_statusbar (window);
gimp_statusbar_pop (statusbar, "menu-tooltip");
}
}
}

View File

@ -44,6 +44,7 @@
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpimagewindow.h"
#include "gimpmeasureoptions.h"
#include "gimpmeasuretool.h"
@ -330,12 +331,17 @@ gimp_measure_tool_button_press (GimpTool *tool,
}
/* create the info window if necessary */
if (! measure->dialog && (options->use_info_window ||
! GTK_WIDGET_VISIBLE (shell->statusbar)))
if (! measure->dialog)
{
measure->dialog = gimp_measure_tool_dialog_new (measure);
g_object_add_weak_pointer (G_OBJECT (measure->dialog),
(gpointer) &measure->dialog);
GimpImageWindow *window = gimp_display_shell_get_window (shell);
if (options->use_info_window ||
! gimp_image_window_get_show_statusbar (window))
{
measure->dialog = gimp_measure_tool_dialog_new (measure);
g_object_add_weak_pointer (G_OBJECT (measure->dialog),
(gpointer) &measure->dialog);
}
}
if (measure->dialog)

View File

@ -32,6 +32,7 @@
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-cursor.h"
#include "display/gimpimagewindow.h"
#include "display/gimpstatusbar.h"
#include "gimptool.h"
@ -895,24 +896,31 @@ gimp_tool_push_status (GimpTool *tool,
...)
{
GimpDisplayShell *shell;
const gchar *stock_id;
va_list args;
GimpImageWindow *window;
g_return_if_fail (GIMP_IS_TOOL (tool));
g_return_if_fail (GIMP_IS_DISPLAY (display));
g_return_if_fail (format != NULL);
shell = GIMP_DISPLAY_SHELL (display->shell);
shell = GIMP_DISPLAY_SHELL (display->shell);
window = gimp_display_shell_get_window (shell);
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
if (window)
{
GimpStatusbar *statusbar = gimp_image_window_get_statusbar (window);
const gchar *stock_id;
va_list args;
va_start (args, format);
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
gimp_statusbar_push_valist (GIMP_STATUSBAR (shell->statusbar),
G_OBJECT_TYPE_NAME (tool), stock_id,
format, args);
va_start (args, format);
va_end (args);
gimp_statusbar_push_valist (statusbar,
G_OBJECT_TYPE_NAME (tool), stock_id,
format, args);
va_end (args);
}
tool->status_displays = g_list_remove (tool->status_displays, display);
tool->status_displays = g_list_prepend (tool->status_displays, display);
@ -929,19 +937,26 @@ gimp_tool_push_status_coords (GimpTool *tool,
const gchar *help)
{
GimpDisplayShell *shell;
const gchar *stock_id;
GimpImageWindow *window;
g_return_if_fail (GIMP_IS_TOOL (tool));
g_return_if_fail (GIMP_IS_DISPLAY (display));
shell = GIMP_DISPLAY_SHELL (display->shell);
shell = GIMP_DISPLAY_SHELL (display->shell);
window = gimp_display_shell_get_window (shell);
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
if (window)
{
GimpStatusbar *statusbar = gimp_image_window_get_statusbar (window);
const gchar *stock_id;
gimp_statusbar_push_coords (GIMP_STATUSBAR (shell->statusbar),
G_OBJECT_TYPE_NAME (tool), stock_id,
precision, title, x, separator, y,
help);
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
gimp_statusbar_push_coords (statusbar,
G_OBJECT_TYPE_NAME (tool), stock_id,
precision, title, x, separator, y,
help);
}
tool->status_displays = g_list_remove (tool->status_displays, display);
tool->status_displays = g_list_prepend (tool->status_displays, display);
@ -956,18 +971,25 @@ gimp_tool_push_status_length (GimpTool *tool,
const gchar *help)
{
GimpDisplayShell *shell;
const gchar *stock_id;
GimpImageWindow *window;
g_return_if_fail (GIMP_IS_TOOL (tool));
g_return_if_fail (GIMP_IS_DISPLAY (display));
shell = GIMP_DISPLAY_SHELL (display->shell);
shell = GIMP_DISPLAY_SHELL (display->shell);
window = gimp_display_shell_get_window (shell);
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
if (window)
{
GimpStatusbar *statusbar = gimp_image_window_get_statusbar (window);
const gchar *stock_id;
gimp_statusbar_push_length (GIMP_STATUSBAR (shell->statusbar),
G_OBJECT_TYPE_NAME (tool), stock_id,
title, axis, value, help);
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
gimp_statusbar_push_length (statusbar,
G_OBJECT_TYPE_NAME (tool), stock_id,
title, axis, value, help);
}
tool->status_displays = g_list_remove (tool->status_displays, display);
tool->status_displays = g_list_prepend (tool->status_displays, display);
@ -980,24 +1002,31 @@ gimp_tool_replace_status (GimpTool *tool,
...)
{
GimpDisplayShell *shell;
const gchar *stock_id;
va_list args;
GimpImageWindow *window;
g_return_if_fail (GIMP_IS_TOOL (tool));
g_return_if_fail (GIMP_IS_DISPLAY (display));
g_return_if_fail (format != NULL);
shell = GIMP_DISPLAY_SHELL (display->shell);
shell = GIMP_DISPLAY_SHELL (display->shell);
window = gimp_display_shell_get_window (shell);
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
if (window)
{
GimpStatusbar *statusbar = gimp_image_window_get_statusbar (window);
const gchar *stock_id;
va_list args;
va_start (args, format);
stock_id = gimp_viewable_get_stock_id (GIMP_VIEWABLE (tool->tool_info));
gimp_statusbar_replace_valist (GIMP_STATUSBAR (shell->statusbar),
G_OBJECT_TYPE_NAME (tool), stock_id,
format, args);
va_start (args, format);
va_end (args);
gimp_statusbar_replace_valist (statusbar,
G_OBJECT_TYPE_NAME (tool), stock_id,
format, args);
va_end (args);
}
tool->status_displays = g_list_remove (tool->status_displays, display);
tool->status_displays = g_list_prepend (tool->status_displays, display);
@ -1008,14 +1037,21 @@ gimp_tool_pop_status (GimpTool *tool,
GimpDisplay *display)
{
GimpDisplayShell *shell;
GimpImageWindow *window;
g_return_if_fail (GIMP_IS_TOOL (tool));
g_return_if_fail (GIMP_IS_DISPLAY (display));
shell = GIMP_DISPLAY_SHELL (display->shell);
shell = GIMP_DISPLAY_SHELL (display->shell);
window = gimp_display_shell_get_window (shell);
gimp_statusbar_pop (GIMP_STATUSBAR (shell->statusbar),
G_OBJECT_TYPE_NAME (tool));
if (window)
{
GimpStatusbar *statusbar = gimp_image_window_get_statusbar (window);
gimp_statusbar_pop (statusbar,
G_OBJECT_TYPE_NAME (tool));
}
tool->status_displays = g_list_remove (tool->status_displays, display);
}

View File

@ -55,6 +55,7 @@
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-appearance.h"
#include "display/gimpdisplayshell-expose.h"
#include "display/gimpdisplayshell-transform.h"
#include "gimptoolcontrol.h"

View File

@ -428,7 +428,7 @@ gimp_dock_window_delete_event (GtkWidget *widget,
/* Don't add docks with just a singe dockable to the list of
* recently closed dock since those can be brought back through the
* normal Windows->Dockable Dialogs menu
*/
*/
if (gimp_dock_get_n_dockables (dock) < 2)
return FALSE;

View File

@ -68,8 +68,6 @@ static GObject * gimp_toolbox_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static gboolean gimp_toolbox_delete_event (GtkWidget *widget,
GdkEventAny *event);
static void gimp_toolbox_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static void gimp_toolbox_style_set (GtkWidget *widget,
@ -147,7 +145,6 @@ gimp_toolbox_class_init (GimpToolboxClass *klass)
object_class->constructor = gimp_toolbox_constructor;
widget_class->delete_event = gimp_toolbox_delete_event;
widget_class->size_allocate = gimp_toolbox_size_allocate;
widget_class->style_set = gimp_toolbox_style_set;
widget_class->button_press_event = gimp_toolbox_button_press_event;
@ -313,15 +310,6 @@ gimp_toolbox_constructor (GType type,
return object;
}
static gboolean
gimp_toolbox_delete_event (GtkWidget *widget,
GdkEventAny *event)
{
gimp_dialog_factory_hide_dialog (widget);
return TRUE;
}
static void
gimp_toolbox_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)

View File

@ -606,6 +606,9 @@ save_image (const gchar *filename,
gint x;
gint bpp;
GimpPixelRgn pixel_rgn;
GimpRGB gray, white;
gimp_rgba_set_uchar (&white, 255, 255, 255, 255);
switch (gimp_drawable_type (drawable_ID))
{
@ -667,7 +670,7 @@ save_image (const gchar *filename,
0, 0, drawable->width, drawable->height,
FALSE, FALSE);
buffer = g_new (guchar, drawable->width * bpp);
buffer = g_new (guchar, drawable->width * MAX (bpp, drawable->bpp));
for (line = 0; line < drawable->height; line++)
{
@ -682,9 +685,19 @@ save_image (const gchar *filename,
break;
case 2:
/* invert and drop alpha channel */
for (x = 0; x < drawable->width; x++)
buffer[x] = 255 - buffer[2 * x];
{
/* apply alpha channel */
gimp_rgba_set_uchar (&gray,
buffer[2 * x],
buffer[2 * x],
buffer[2 * x],
buffer[2 * x + 1]);
gimp_rgb_composite (&gray, &white, GIMP_RGB_COMPOSITE_BEHIND);
gimp_rgba_get_uchar (&gray, &buffer[x], NULL, NULL, NULL);
/* invert */
buffer[x] = 255 - buffer[x];
}
break;
case 3:

View File

@ -30,7 +30,6 @@
#endif
#ifdef WIN32
# include <io.h>
# define access(f,a) _access(f,a)
#endif
#ifdef WIN32
#define snprintf _snprintf
@ -1418,7 +1417,7 @@ static int file_push(scheme *sc, const char *fname) {
if (sc->file_i == MAXFIL-1)
return 0;
fin=fopen(fname,"rb");
fin=g_fopen(fname,"rb");
if(fin!=0) {
sc->file_i++;
sc->load_stack[sc->file_i].kind=port_file|port_input;
@ -1456,7 +1455,7 @@ static port *port_rep_from_filename(scheme *sc, const char *fn, int prop) {
} else {
rw="rb";
}
f=fopen(fn,rw);
f=g_fopen(fn,rw);
if(f==0) {
return 0;
}
@ -5041,7 +5040,7 @@ int main(int argc, char **argv) {
scheme_define(&sc,sc.global_env,mk_symbol(&sc,"load-extension"),mk_foreign_func(&sc, scm_load_ext));
#endif
argv++;
if(access(file_name,0)!=0) {
if(g_access(file_name,0)!=0) {
char *p=getenv("TINYSCHEMEINIT");
if(p!=0) {
file_name=p;
@ -5057,7 +5056,7 @@ int main(int argc, char **argv) {
if(strcmp(file_name,"-")==0) {
fin=stdin;
} else if(isfile) {
fin=fopen(file_name,"r");
fin=g_fopen(file_name,"r");
}
for(;*argv;argv++) {
pointer value=mk_string(&sc,*argv);
@ -5067,7 +5066,7 @@ int main(int argc, char **argv) {
scheme_define(&sc,sc.global_env,mk_symbol(&sc,"*args*"),args);
} else {
fin=fopen(file_name,"r");
fin=g_fopen(file_name,"r");
}
if(isfile && fin==0) {
fprintf(stderr,"Could not open file %s\n",file_name);

View File

@ -5,6 +5,7 @@
#include <stdio.h>
#include <glib.h>
#include <glib/gstdio.h>
#ifdef __cplusplus
extern "C" {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,317 +1,316 @@
# gimp ro translation
# Romanian GIMP translation
# Copyright (C) YEAR Free Software Foundation, Inc.
# Robert Claudiu Gheorghe <rgheorghe AT writeme DOT com>, 2001.
# Cristian Secară <cristi AT secarica DOT ro>, 2008.
# Cristian Secară <cristi AT secarica DOT ro>, 2008-2009.
#
msgid ""
msgstr ""
"Project-Id-Version: gimp-python\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-03-18 23:26+0200\n"
"PO-Revision-Date: 2008-12-02 00:36+0200\n"
"POT-Creation-Date: 2008-10-01 23:14+0000\n"
"PO-Revision-Date: 2009-03-19 20:37+0200\n"
"Last-Translator: Cristian Secară <cristi AT secarica DOT ro>\n"
"Language-Team: Română <ro@li.org>\n"
"Language-Team: Română <gnomero-list@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
"20)) ? 1 : 2;\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2;\n"
#: ../plug-ins/pygimp/gimpfu.py:391
# hm ? sau despre excepție ?
#: ../plug-ins/pygimp/gimpfu.py:385
msgid "Missing exception information"
msgstr "Lipsește informația asupra excepției"
#: ../plug-ins/pygimp/gimpfu.py:400
#: ../plug-ins/pygimp/gimpfu.py:394
#, python-format
msgid "An error occured running %s"
msgstr "A apărut o eroare în timpul execuției %s"
#: ../plug-ins/pygimp/gimpfu.py:411
#: ../plug-ins/pygimp/gimpfu.py:405
msgid "_More Information"
msgstr "_Mai multe informații"
#: ../plug-ins/pygimp/gimpfu.py:523 ../plug-ins/pygimp/gimpfu.py:535
#: ../plug-ins/pygimp/gimpfu.py:541
#: ../plug-ins/pygimp/gimpfu.py:511
#: ../plug-ins/pygimp/gimpfu.py:523
#: ../plug-ins/pygimp/gimpfu.py:529
msgid "No"
msgstr "Nu"
#: ../plug-ins/pygimp/gimpfu.py:533 ../plug-ins/pygimp/gimpfu.py:541
#: ../plug-ins/pygimp/gimpfu.py:521
#: ../plug-ins/pygimp/gimpfu.py:529
msgid "Yes"
msgstr "Da"
#: ../plug-ins/pygimp/gimpfu.py:592 ../plug-ins/pygimp/gimpui.py:223
#: ../plug-ins/pygimp/gimpfu.py:580
#: ../plug-ins/pygimp/gimpui.py:224
msgid "Python-Fu File Selection"
msgstr "Selecție de fișier Python-Fu"
#: ../plug-ins/pygimp/gimpfu.py:603
#: ../plug-ins/pygimp/gimpfu.py:591
msgid "Python-Fu Folder Selection"
msgstr "Selecție de dosar Python-Fu"
#: ../plug-ins/pygimp/gimpfu.py:694
#: ../plug-ins/pygimp/gimpfu.py:682
#, python-format
msgid "Invalid input for '%s'"
msgstr "Intraree pentru „%s” nu este validă"
#: ../plug-ins/pygimp/gimpui.py:176
#: ../plug-ins/pygimp/gimpui.py:177
msgid "Python-Fu Color Selection"
msgstr "Selecție de culoare Python-Fu"
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:106
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:107
msgid "Saving as colored XHTML"
msgstr "Salvare ca XHTML colorat"
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:183
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:184
msgid "Save as colored XHTML"
msgstr "Salvează ca XHTML colorat"
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:188
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:189
msgid "Colored XHTML"
msgstr "XHTML colorat"
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:195
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:196
msgid "Character _source"
msgstr "_Sursă caracter"
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:196
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:197
msgid "Source code"
msgstr "Cod sursă"
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:197
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:198
msgid "Text file"
msgstr "Fișier text"
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:198
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:199
msgid "Entry box"
msgstr "Căsuță de intrare"
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:199
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:200
msgid "_File to read or characters to use"
msgstr "_Fișier de citit sau caracter pentru a fi utilizat"
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:201
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:202
msgid "Fo_nt size in pixels"
msgstr "Dimensiune fo_nt în pixeli"
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:202
#: ../plug-ins/pygimp/plug-ins/colorxhtml.py:203
msgid "_Write a separate CSS file"
msgstr "_Scrie un fișier CSS separat"
#: ../plug-ins/pygimp/plug-ins/foggify.py:56
#: ../plug-ins/pygimp/plug-ins/foggify.py:53
msgid "Add a layer of fog"
msgstr "Adaugă un strat de ceață"
#: ../plug-ins/pygimp/plug-ins/foggify.py:61
#: ../plug-ins/pygimp/plug-ins/foggify.py:58
msgid "_Fog..."
msgstr "_Ceață..."
#: ../plug-ins/pygimp/plug-ins/foggify.py:66
#: ../plug-ins/pygimp/plug-ins/foggify.py:63
msgid "_Layer name"
msgstr "_Nume strat"
#: ../plug-ins/pygimp/plug-ins/foggify.py:66
#: ../plug-ins/pygimp/plug-ins/foggify.py:63
msgid "Clouds"
msgstr "Nori"
#: ../plug-ins/pygimp/plug-ins/foggify.py:67
#: ../plug-ins/pygimp/plug-ins/foggify.py:64
msgid "_Fog color"
msgstr "_Culoare ceață"
#: ../plug-ins/pygimp/plug-ins/foggify.py:68
#: ../plug-ins/pygimp/plug-ins/foggify.py:65
msgid "_Turbulence"
msgstr "_Turbulență"
#: ../plug-ins/pygimp/plug-ins/foggify.py:69
#: ../plug-ins/pygimp/plug-ins/foggify.py:66
msgid "Op_acity"
msgstr "Op_acitate"
#: ../plug-ins/pygimp/plug-ins/palette-offset.py:44
#: ../plug-ins/pygimp/plug-ins/palette-offset.py:45
msgid "Offset the colors in a palette"
msgstr "Decalează culorile într-o paletă"
#: ../plug-ins/pygimp/plug-ins/palette-offset.py:49
#: ../plug-ins/pygimp/plug-ins/palette-offset.py:50
msgid "_Offset Palette..."
msgstr "_Paletă de decalaj..."
#: ../plug-ins/pygimp/plug-ins/palette-offset.py:52
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:56
#: ../plug-ins/pygimp/plug-ins/palette-to-gradient.py:56
#: ../plug-ins/pygimp/plug-ins/palette-to-gradient.py:78
#: ../plug-ins/pygimp/plug-ins/palette-offset.py:53
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:57
#: ../plug-ins/pygimp/plug-ins/palette-to-gradient.py:57
#: ../plug-ins/pygimp/plug-ins/palette-to-gradient.py:79
msgid "Palette"
msgstr "Paletă"
#: ../plug-ins/pygimp/plug-ins/palette-offset.py:53
#: ../plug-ins/pygimp/plug-ins/palette-offset.py:54
msgid "Off_set"
msgstr "_Decalaj"
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:48
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:49
msgid "Sort the colors in a palette"
msgstr "Sortează culorile într-o paletă"
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:53
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:54
msgid "_Sort Palette..."
msgstr "_Sortează paleta..."
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:57
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:58
msgid "Color _model"
msgstr "_Model de culoare"
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:58
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:59
msgid "RGB"
msgstr "RGB"
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:59
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:60
msgid "HSV"
msgstr "HSV"
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:60
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:61
msgid "Channel to _sort"
msgstr "Canal la _sortare"
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:61
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:62
msgid "Red or Hue"
msgstr "Roșu sau nuanță"
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:62
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:63
msgid "Green or Saturation"
msgstr "Verde sau saturație"
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:63
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:64
msgid "Blue or Value"
msgstr "Albastru sau valoare"
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:64
#: ../plug-ins/pygimp/plug-ins/palette-sort.py:65
msgid "_Ascending"
msgstr "_Ascendent"
#: ../plug-ins/pygimp/plug-ins/palette-to-gradient.py:49
#: ../plug-ins/pygimp/plug-ins/palette-to-gradient.py:50
msgid "Create a repeating gradient using colors from the palette"
msgstr "Creează un degrade repetitiv folosind culorile din paletă"
#: ../plug-ins/pygimp/plug-ins/palette-to-gradient.py:54
#: ../plug-ins/pygimp/plug-ins/palette-to-gradient.py:55
msgid "Palette to _Repeating Gradient"
msgstr "Paletă la degrade _repetitiv"
#: ../plug-ins/pygimp/plug-ins/palette-to-gradient.py:71
#: ../plug-ins/pygimp/plug-ins/palette-to-gradient.py:72
msgid "Create a gradient using colors from the palette"
msgstr "Creează un degrade folosind culorile din paletă"
#: ../plug-ins/pygimp/plug-ins/palette-to-gradient.py:76
#: ../plug-ins/pygimp/plug-ins/palette-to-gradient.py:77
msgid "Palette to _Gradient"
msgstr "Paletă la de_grade"
#: ../plug-ins/pygimp/plug-ins/py-slice.py:56
#: ../plug-ins/pygimp/plug-ins/py-slice.py:57
msgid "Slice"
msgstr "Felie"
#. table snippet means a small piece of HTML code here
#: ../plug-ins/pygimp/plug-ins/py-slice.py:417
#: ../plug-ins/pygimp/plug-ins/py-slice.py:416
msgid "Cuts an image along its guides, creates images and a HTML table snippet"
msgstr ""
"Taie o imagine în lungul ghidajelor ei, creează un fragment de imagine și "
"tebelă HTML"
msgstr "Taie o imagine în lungul ghidajelor ei, creează un fragment de imagine și tebelă HTML"
#: ../plug-ins/pygimp/plug-ins/py-slice.py:428
#: ../plug-ins/pygimp/plug-ins/py-slice.py:427
msgid "_Slice..."
msgstr "_Felie..."
#: ../plug-ins/pygimp/plug-ins/py-slice.py:433
#: ../plug-ins/pygimp/plug-ins/py-slice.py:432
msgid "Path for HTML export"
msgstr "Cale pentru exportul HTML"
#: ../plug-ins/pygimp/plug-ins/py-slice.py:434
#: ../plug-ins/pygimp/plug-ins/py-slice.py:433
msgid "Filename for export"
msgstr "Nume de fișier de exportat"
#: ../plug-ins/pygimp/plug-ins/py-slice.py:435
#: ../plug-ins/pygimp/plug-ins/py-slice.py:434
msgid "Image name prefix"
msgstr "Prefix de nume de imagine"
#: ../plug-ins/pygimp/plug-ins/py-slice.py:436
#: ../plug-ins/pygimp/plug-ins/py-slice.py:435
msgid "Image format"
msgstr "Format de imagine"
#: ../plug-ins/pygimp/plug-ins/py-slice.py:437
#: ../plug-ins/pygimp/plug-ins/py-slice.py:436
msgid "Separate image folder"
msgstr "Dosar de imagine separat"
#: ../plug-ins/pygimp/plug-ins/py-slice.py:439
#: ../plug-ins/pygimp/plug-ins/py-slice.py:438
msgid "Folder for image export"
msgstr "Dosar pentru export de imagine"
#: ../plug-ins/pygimp/plug-ins/py-slice.py:440
#: ../plug-ins/pygimp/plug-ins/py-slice.py:439
msgid "Space between table elements"
msgstr "Spațiu între elementele de tabel"
#: ../plug-ins/pygimp/plug-ins/py-slice.py:442
#: ../plug-ins/pygimp/plug-ins/py-slice.py:441
msgid "Javascript for onmouseover and clicked"
msgstr "Javascript pentru onmouseover și clicked"
# hm ?
#. table caps are table cells on the edge of the table
#: ../plug-ins/pygimp/plug-ins/py-slice.py:445
#: ../plug-ins/pygimp/plug-ins/py-slice.py:443
msgid "Skip animation for table caps"
msgstr "Ignoră animația pentru capetele de tabel"
#: ../plug-ins/pygimp/plug-ins/python-console.py:56
#: ../plug-ins/pygimp/plug-ins/python-console.py:57
msgid "Python Console"
msgstr "Consolă Python"
#: ../plug-ins/pygimp/plug-ins/python-console.py:60
#: ../plug-ins/pygimp/plug-ins/python-console.py:61
msgid "_Browse..."
msgstr "_Răsfoiește..."
#: ../plug-ins/pygimp/plug-ins/python-console.py:138
#: ../plug-ins/pygimp/plug-ins/python-console.py:139
msgid "Python Procedure Browser"
msgstr "Navigator de procedură Python"
#: ../plug-ins/pygimp/plug-ins/python-console.py:167
#: ../plug-ins/pygimp/plug-ins/python-console.py:168
#, python-format
msgid "Could not open '%s' for writing: %s"
msgstr "Nu s-a putut deschide „%s” pentru scriere: %s"
#: ../plug-ins/pygimp/plug-ins/python-console.py:182
#: ../plug-ins/pygimp/plug-ins/python-console.py:183
#, python-format
msgid "Could not write to '%s': %s"
msgstr "Nu s-a putut scrie în „%s”: %s"
#: ../plug-ins/pygimp/plug-ins/python-console.py:190
#: ../plug-ins/pygimp/plug-ins/python-console.py:191
msgid "Save Python-Fu Console Output"
msgstr "Salvează ieșirea consolei Python-Fu"
#: ../plug-ins/pygimp/plug-ins/python-console.py:216
#: ../plug-ins/pygimp/plug-ins/python-console.py:217
msgid "Interactive GIMP Python interpreter"
msgstr "Interpretor interactiv GIMP Python"
#: ../plug-ins/pygimp/plug-ins/python-console.py:221
#: ../plug-ins/pygimp/plug-ins/python-console.py:222
msgid "_Console"
msgstr "_Consolă"
#: ../plug-ins/pygimp/plug-ins/shadow_bevel.py:60
#: ../plug-ins/pygimp/plug-ins/shadow_bevel.py:61
msgid "Add a drop shadow to a layer, and optionally bevel it"
msgstr ""
"Adaugă o umbră de perspectivă la un strat și opțional scoate-l în relief"
msgstr "Adaugă o umbră de perspectivă la un strat și opțional scoate-l în relief"
#: ../plug-ins/pygimp/plug-ins/shadow_bevel.py:65
#: ../plug-ins/pygimp/plug-ins/shadow_bevel.py:66
msgid "_Drop Shadow and Bevel..."
msgstr "_Umbră de perspectivă și scoatere în relief..."
#: ../plug-ins/pygimp/plug-ins/shadow_bevel.py:70
#: ../plug-ins/pygimp/plug-ins/shadow_bevel.py:71
msgid "_Shadow blur"
msgstr "_Neclaritate umbră"
# hm ?
#: ../plug-ins/pygimp/plug-ins/shadow_bevel.py:71
#: ../plug-ins/pygimp/plug-ins/shadow_bevel.py:72
msgid "_Bevel"
msgstr "Î_n relief"
#: ../plug-ins/pygimp/plug-ins/shadow_bevel.py:72
#: ../plug-ins/pygimp/plug-ins/shadow_bevel.py:73
msgid "_Drop shadow"
msgstr "_Umbră de perspectivă"
#: ../plug-ins/pygimp/plug-ins/shadow_bevel.py:73
#: ../plug-ins/pygimp/plug-ins/shadow_bevel.py:74
msgid "Drop shadow _X displacement"
msgstr "Deplasare pe axa _X a umbrei de perspectivă"
#: ../plug-ins/pygimp/plug-ins/shadow_bevel.py:74
#: ../plug-ins/pygimp/plug-ins/shadow_bevel.py:75
msgid "Drop shadow _Y displacement"
msgstr "Deplasare pe axa _Y a umbrei de perspectivă"

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,16 @@
# gimp ro translation
# Romanian GIMP translation
# Copyright (C) YEAR Free Software Foundation, Inc.
# Robert Claudiu Gheorghe <rgheorghe AT writeme DOT com>, 2001.
# Cristian Secară <cristi AT secarica DOT ro>, 2008.
# Cristian Secară <cristi AT secarica DOT ro>, 2008-2009.
#
msgid ""
msgstr ""
"Project-Id-Version: GIMP 2.4\n"
"Project-Id-Version: gimp-tips\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-09-20 11:30+0000\n"
"PO-Revision-Date: 2008-10-15 11:50+0200\n"
"Last-Translator: Cristian Secară <cristi AT secarica DOT ro>\n"
"Language-Team: Română <ro@li.org>\n"
"Language-Team: Română <gnomero-list@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

9934
po/ro.po

File diff suppressed because it is too large Load Diff