Commit f9c41aa8 authored by Manish Singh's avatar Manish Singh Committed by Manish Singh

app/core/gimpbrush.c app/core/gimpbrushgenerated.c

2003-08-28  Manish Singh  <yosh@gimp.org>

        * app/core/gimpbrush.c
        * app/core/gimpbrushgenerated.c
        * app/core/gimpbrushpipe.c
        * app/core/gimpbuffer.c
        * app/core/gimpimage-snap.c
        * app/core/gimppattern.c
        * app/core/gimpundostack.c
        * app/display/gimpdisplayshell.c
        * app/gui/grid-dialog.c
        * plug-ins/common/CML_explorer.c: cleanup, remove unnecessary casts.
parent d332a470
2003-08-28 Manish Singh <yosh@gimp.org>
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c
* app/core/gimpbrushpipe.c
* app/core/gimpbuffer.c
* app/core/gimpimage-snap.c
* app/core/gimppattern.c
* app/core/gimpundostack.c
* app/display/gimpdisplayshell.c
* app/gui/grid-dialog.c
* plug-ins/common/CML_explorer.c: cleanup, remove unnecessary casts.
2003-08-28 Sven Neumann <sven@gimp.org>
* configure.in: bumped version number to 1.3.20.
......@@ -611,7 +611,7 @@ gimp_brush_load_brush (gint fd,
switch (header.bytes)
{
case 1:
brush = GIMP_BRUSH (g_object_new (GIMP_TYPE_BRUSH, NULL));
brush = g_object_new (GIMP_TYPE_BRUSH, NULL);
brush->mask = temp_buf_new (header.width, header.height, 1,
0, 0, NULL);
if (read (fd,
......@@ -629,7 +629,7 @@ gimp_brush_load_brush (gint fd,
break;
case 4:
brush = GIMP_BRUSH (g_object_new (GIMP_TYPE_BRUSH, NULL));
brush = g_object_new (GIMP_TYPE_BRUSH, NULL);
brush->mask = temp_buf_new (header.width, header.height, 1, 0, 0, NULL);
brush->pixmap = temp_buf_new (header.width, header.height, 3, 0, 0, NULL);
......
......@@ -611,7 +611,7 @@ gimp_brush_load_brush (gint fd,
switch (header.bytes)
{
case 1:
brush = GIMP_BRUSH (g_object_new (GIMP_TYPE_BRUSH, NULL));
brush = g_object_new (GIMP_TYPE_BRUSH, NULL);
brush->mask = temp_buf_new (header.width, header.height, 1,
0, 0, NULL);
if (read (fd,
......@@ -629,7 +629,7 @@ gimp_brush_load_brush (gint fd,
break;
case 4:
brush = GIMP_BRUSH (g_object_new (GIMP_TYPE_BRUSH, NULL));
brush = g_object_new (GIMP_TYPE_BRUSH, NULL);
brush->mask = temp_buf_new (header.width, header.height, 1, 0, 0, NULL);
brush->pixmap = temp_buf_new (header.width, header.height, 3, 0, 0, NULL);
......
......@@ -338,7 +338,7 @@ gimp_brush_generated_new (gfloat radius,
GimpBrushGenerated *brush;
/* set up normal brush data */
brush = GIMP_BRUSH_GENERATED (g_object_new (GIMP_TYPE_BRUSH_GENERATED, NULL));
brush = g_object_new (GIMP_TYPE_BRUSH_GENERATED, NULL);
gimp_object_set_name (GIMP_OBJECT (brush), "Untitled");
......@@ -401,7 +401,7 @@ gimp_brush_generated_load (const gchar *filename,
}
/* create new brush */
brush = GIMP_BRUSH_GENERATED (g_object_new (GIMP_TYPE_BRUSH_GENERATED, NULL));
brush = g_object_new (GIMP_TYPE_BRUSH_GENERATED, NULL);
gimp_data_set_filename (GIMP_DATA (brush), filename);
......
......@@ -338,7 +338,7 @@ gimp_brush_generated_new (gfloat radius,
GimpBrushGenerated *brush;
/* set up normal brush data */
brush = GIMP_BRUSH_GENERATED (g_object_new (GIMP_TYPE_BRUSH_GENERATED, NULL));
brush = g_object_new (GIMP_TYPE_BRUSH_GENERATED, NULL);
gimp_object_set_name (GIMP_OBJECT (brush), "Untitled");
......@@ -401,7 +401,7 @@ gimp_brush_generated_load (const gchar *filename,
}
/* create new brush */
brush = GIMP_BRUSH_GENERATED (g_object_new (GIMP_TYPE_BRUSH_GENERATED, NULL));
brush = g_object_new (GIMP_TYPE_BRUSH_GENERATED, NULL);
gimp_data_set_filename (GIMP_DATA (brush), filename);
......
......@@ -338,7 +338,7 @@ gimp_brush_generated_new (gfloat radius,
GimpBrushGenerated *brush;
/* set up normal brush data */
brush = GIMP_BRUSH_GENERATED (g_object_new (GIMP_TYPE_BRUSH_GENERATED, NULL));
brush = g_object_new (GIMP_TYPE_BRUSH_GENERATED, NULL);
gimp_object_set_name (GIMP_OBJECT (brush), "Untitled");
......@@ -401,7 +401,7 @@ gimp_brush_generated_load (const gchar *filename,
}
/* create new brush */
brush = GIMP_BRUSH_GENERATED (g_object_new (GIMP_TYPE_BRUSH_GENERATED, NULL));
brush = g_object_new (GIMP_TYPE_BRUSH_GENERATED, NULL);
gimp_data_set_filename (GIMP_DATA (brush), filename);
......
......@@ -363,7 +363,7 @@ gimp_brush_pipe_load (const gchar *filename,
if (buffer->len > 0 && buffer->len < 1024)
{
pipe = GIMP_BRUSH_PIPE (g_object_new (GIMP_TYPE_BRUSH_PIPE, NULL));
pipe = g_object_new (GIMP_TYPE_BRUSH_PIPE, NULL);
if (g_utf8_validate (buffer->str, buffer->len, NULL))
{
......
......@@ -363,7 +363,7 @@ gimp_brush_pipe_load (const gchar *filename,
if (buffer->len > 0 && buffer->len < 1024)
{
pipe = GIMP_BRUSH_PIPE (g_object_new (GIMP_TYPE_BRUSH_PIPE, NULL));
pipe = g_object_new (GIMP_TYPE_BRUSH_PIPE, NULL);
if (g_utf8_validate (buffer->str, buffer->len, NULL))
{
......
......@@ -310,7 +310,7 @@ gimp_buffer_new (TileManager *tiles,
width = tile_manager_width (tiles);
height = tile_manager_height (tiles);
buffer = GIMP_BUFFER (g_object_new (GIMP_TYPE_BUFFER, NULL));
buffer = g_object_new (GIMP_TYPE_BUFFER, NULL);
gimp_object_set_name (GIMP_OBJECT (buffer), name);
......
......@@ -307,7 +307,7 @@ gimp_gradient_new (const gchar *name,
g_return_val_if_fail (name != NULL, NULL);
gradient = GIMP_GRADIENT (g_object_new (GIMP_TYPE_GRADIENT, NULL));
gradient = g_object_new (GIMP_TYPE_GRADIENT, NULL);
gimp_object_set_name (GIMP_OBJECT (gradient), name);
......@@ -367,7 +367,7 @@ gimp_gradient_load (const gchar *filename,
return NULL;
}
gradient = GIMP_GRADIENT (g_object_new (GIMP_TYPE_GRADIENT, NULL));
gradient = g_object_new (GIMP_TYPE_GRADIENT, NULL);
gimp_data_set_filename (GIMP_DATA (gradient), filename);
......
......@@ -91,7 +91,7 @@ gimp_image_snap_x (GimpImage *gimage,
{
grid = gimp_image_get_grid (gimage);
g_object_get (G_OBJECT (grid),
g_object_get (grid,
"xspacing", &xspacing,
"xoffset", &xoffset,
NULL);
......@@ -170,7 +170,7 @@ gimp_image_snap_y (GimpImage *gimage,
{
grid = gimp_image_get_grid (gimage);
g_object_get (G_OBJECT (grid),
g_object_get (grid,
"yspacing", &yspacing,
"yoffset", &yoffset,
NULL);
......@@ -275,7 +275,7 @@ gimp_image_snap_point (GimpImage *gimage,
{
grid = gimp_image_get_grid (gimage);
g_object_get (G_OBJECT (grid),
g_object_get (grid,
"xspacing", &xspacing,
"yspacing", &yspacing,
"xoffset", &xoffset,
......
......@@ -811,7 +811,7 @@ gimp_image_new (Gimp *gimp,
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
gimage = GIMP_IMAGE (g_object_new (GIMP_TYPE_IMAGE, NULL));
gimage = g_object_new (GIMP_TYPE_IMAGE, NULL);
gimage->gimp = gimp;
gimage->ID = gimp->next_image_ID++;
......
......@@ -251,7 +251,7 @@ gimp_pattern_duplicate (GimpData *data,
{
GimpPattern *pattern;
pattern = GIMP_PATTERN (g_object_new (GIMP_TYPE_PATTERN, NULL));
pattern = g_object_new (GIMP_TYPE_PATTERN, NULL);
pattern->mask = temp_buf_copy (GIMP_PATTERN (data)->mask, NULL);
......@@ -272,7 +272,7 @@ gimp_pattern_new (const gchar *name,
g_return_val_if_fail (name != NULL, NULL);
pattern = GIMP_PATTERN (g_object_new (GIMP_TYPE_PATTERN, NULL));
pattern = g_object_new (GIMP_TYPE_PATTERN, NULL);
gimp_object_set_name (GIMP_OBJECT (pattern), name);
......@@ -304,7 +304,7 @@ gimp_pattern_get_standard (void)
guchar *data;
gint row, col;
standard_pattern = GIMP_PATTERN (g_object_new (GIMP_TYPE_PATTERN, NULL));
standard_pattern = g_object_new (GIMP_TYPE_PATTERN, NULL);
gimp_object_set_name (GIMP_OBJECT (standard_pattern), "Standard");
......@@ -412,7 +412,7 @@ gimp_pattern_load (const gchar *filename,
if (!name)
name = g_strdup (_("Unnamed"));
pattern = GIMP_PATTERN (g_object_new (GIMP_TYPE_PATTERN, NULL));
pattern = g_object_new (GIMP_TYPE_PATTERN, NULL);
pattern->mask = temp_buf_new (header.width, header.height, header.bytes,
0, 0, NULL);
......
......@@ -251,7 +251,7 @@ gimp_pattern_duplicate (GimpData *data,
{
GimpPattern *pattern;
pattern = GIMP_PATTERN (g_object_new (GIMP_TYPE_PATTERN, NULL));
pattern = g_object_new (GIMP_TYPE_PATTERN, NULL);
pattern->mask = temp_buf_copy (GIMP_PATTERN (data)->mask, NULL);
......@@ -272,7 +272,7 @@ gimp_pattern_new (const gchar *name,
g_return_val_if_fail (name != NULL, NULL);
pattern = GIMP_PATTERN (g_object_new (GIMP_TYPE_PATTERN, NULL));
pattern = g_object_new (GIMP_TYPE_PATTERN, NULL);
gimp_object_set_name (GIMP_OBJECT (pattern), name);
......@@ -304,7 +304,7 @@ gimp_pattern_get_standard (void)
guchar *data;
gint row, col;
standard_pattern = GIMP_PATTERN (g_object_new (GIMP_TYPE_PATTERN, NULL));
standard_pattern = g_object_new (GIMP_TYPE_PATTERN, NULL);
gimp_object_set_name (GIMP_OBJECT (standard_pattern), "Standard");
......@@ -412,7 +412,7 @@ gimp_pattern_load (const gchar *filename,
if (!name)
name = g_strdup (_("Unnamed"));
pattern = GIMP_PATTERN (g_object_new (GIMP_TYPE_PATTERN, NULL));
pattern = g_object_new (GIMP_TYPE_PATTERN, NULL);
pattern->mask = temp_buf_new (header.width, header.height, header.bytes,
0, 0, NULL);
......
......@@ -189,7 +189,7 @@ gimp_undo_stack_new (GimpImage *gimage)
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
stack = GIMP_UNDO_STACK (g_object_new (GIMP_TYPE_UNDO_STACK, NULL));
stack = g_object_new (GIMP_TYPE_UNDO_STACK, NULL);
GIMP_UNDO (stack)->gimage = gimage;
......
......@@ -101,7 +101,7 @@ grid_dialog_new (GimpDisplay *gdisp)
grid_backup = g_object_new (GIMP_TYPE_GRID, NULL);
gimp_config_copy_properties (G_OBJECT (grid),
G_OBJECT (grid_backup));
g_object_ref (G_OBJECT (grid_backup));
g_object_ref (grid_backup);
}
else
{
......@@ -295,10 +295,10 @@ grid_dialog_new (GimpDisplay *gdisp)
{
gimp_config_reset_properties (G_OBJECT (grid));
g_object_set (G_OBJECT (grid),
g_object_set (grid,
"spacing-unit", gimage->unit,
NULL);
g_object_set (G_OBJECT (grid),
g_object_set (grid,
"offset-unit", gimage->unit,
NULL);
}
......@@ -353,10 +353,10 @@ reset_callback (GtkWidget *widget,
g_object_freeze_notify (G_OBJECT (grid));
gimp_config_reset_properties (G_OBJECT (grid));
g_object_set (G_OBJECT (grid),
g_object_set (grid,
"spacing-unit", unit,
NULL);
g_object_set (G_OBJECT (grid),
g_object_set (grid,
"offset-unit", unit,
NULL);
......
......@@ -1401,7 +1401,7 @@ gimp_display_shell_draw_grid (GimpDisplayShell *shell)
if (gimp_display_shell_get_show_grid (shell))
{
g_object_get (G_OBJECT (grid),
g_object_get (grid,
"xspacing", &xspacing,
"yspacing", &yspacing,
"xoffset", &xoffset,
......
......@@ -1401,7 +1401,7 @@ gimp_display_shell_draw_grid (GimpDisplayShell *shell)
if (gimp_display_shell_get_show_grid (shell))
{
g_object_get (G_OBJECT (grid),
g_object_get (grid,
"xspacing", &xspacing,
"yspacing", &yspacing,
"xoffset", &xoffset,
......
......@@ -101,7 +101,7 @@ grid_dialog_new (GimpDisplay *gdisp)
grid_backup = g_object_new (GIMP_TYPE_GRID, NULL);
gimp_config_copy_properties (G_OBJECT (grid),
G_OBJECT (grid_backup));
g_object_ref (G_OBJECT (grid_backup));
g_object_ref (grid_backup);
}
else
{
......@@ -295,10 +295,10 @@ grid_dialog_new (GimpDisplay *gdisp)
{
gimp_config_reset_properties (G_OBJECT (grid));
g_object_set (G_OBJECT (grid),
g_object_set (grid,
"spacing-unit", gimage->unit,
NULL);
g_object_set (G_OBJECT (grid),
g_object_set (grid,
"offset-unit", gimage->unit,
NULL);
}
......@@ -353,10 +353,10 @@ reset_callback (GtkWidget *widget,
g_object_freeze_notify (G_OBJECT (grid));
gimp_config_reset_properties (G_OBJECT (grid));
g_object_set (G_OBJECT (grid),
g_object_set (grid,
"spacing-unit", unit,
NULL);
g_object_set (G_OBJECT (grid),
g_object_set (grid,
"offset-unit", unit,
NULL);
......
......@@ -2092,9 +2092,9 @@ CML_save_to_file_callback (GtkWidget *widget,
G_CALLBACK (CML_execute_save_to_file),
filesel);
g_signal_connect_swapped(G_OBJECT(filesel), "delete_event",
G_CALLBACK (gtk_widget_hide),
filesel);
g_signal_connect_swapped (filesel, "delete_event",
G_CALLBACK (gtk_widget_hide),
filesel);
g_signal_connect_swapped (GTK_FILE_SELECTION (filesel)->cancel_button,
"clicked",
......@@ -2300,9 +2300,9 @@ CML_load_from_file_callback (GtkWidget *widget,
G_CALLBACK (CML_execute_load_from_file),
filesel);
g_signal_connect_swapped(G_OBJECT(filesel), "delete_event",
G_CALLBACK (gtk_widget_hide),
filesel);
g_signal_connect_swapped (filesel, "delete_event",
G_CALLBACK (gtk_widget_hide),
filesel);
g_signal_connect_swapped (GTK_FILE_SELECTION (filesel)->cancel_button,
"clicked",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment