gimp r28191 - in trunk: . libgimp tools
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r28191 - in trunk: . libgimp tools
- Date: Sun, 22 Mar 2009 15:49:14 +0000 (UTC)
Author: mitch
Date: Sun Mar 22 15:49:13 2009
New Revision: 28191
URL: http://svn.gnome.org/viewvc/gimp?rev=28191&view=rev
Log:
2009-03-22 Michael Natterer <mitch gimp org>
* libgimp/gimpbrushselectbutton.c
* libgimp/gimpexport.c
* libgimp/gimpfontselectbutton.c
* libgimp/gimpgradientselectbutton.c
* libgimp/gimpimagecombobox.c
* libgimp/gimpitemcombobox.c
* libgimp/gimppaletteselectbutton.c
* libgimp/gimppatternselectbutton.c
* libgimp/gimpprogressbar.c
* libgimp/gimpui.c
* libgimp/gimpzoompreview.c
* tools/test-clipboard.c: use accessors for various members of
GTK+ structures that don't exist any longer when GSEAL_ENABLE is
defined.
Modified:
trunk/ChangeLog
trunk/libgimp/gimpbrushselectbutton.c
trunk/libgimp/gimpexport.c
trunk/libgimp/gimpfontselectbutton.c
trunk/libgimp/gimpgradientselectbutton.c
trunk/libgimp/gimpimagecombobox.c
trunk/libgimp/gimpitemcombobox.c
trunk/libgimp/gimppaletteselectbutton.c
trunk/libgimp/gimppatternselectbutton.c
trunk/libgimp/gimpprogressbar.c
trunk/libgimp/gimpui.c
trunk/libgimp/gimpzoompreview.c
trunk/tools/test-clipboard.c
Modified: trunk/libgimp/gimpbrushselectbutton.c
==============================================================================
--- trunk/libgimp/gimpbrushselectbutton.c (original)
+++ trunk/libgimp/gimpbrushselectbutton.c Sun Mar 22 15:49:13 2009
@@ -794,7 +794,8 @@
gtk_widget_show (preview);
/* decide where to put the popup */
- gdk_window_get_origin (priv->preview->window, &x_org, &y_org);
+ gdk_window_get_origin (gtk_widget_get_window (priv->preview),
+ &x_org, &y_org);
scr_w = gdk_screen_get_width (screen);
scr_h = gdk_screen_get_height (screen);
@@ -839,15 +840,17 @@
guint info,
guint time)
{
+ gint length = gtk_selection_data_get_length (selection);
gchar *str;
- if ((selection->format != 8) || (selection->length < 1))
+ if (gtk_selection_data_get_format (selection) != 8 || length < 1)
{
- g_warning ("Received invalid brush data!");
+ g_warning ("%s: received invalid brush data", G_STRFUNC);
return;
}
- str = g_strndup ((const gchar *) selection->data, selection->length);
+ str = g_strndup ((const gchar *) gtk_selection_data_get_data (selection),
+ length);
if (g_utf8_validate (str, -1, NULL))
{
Modified: trunk/libgimp/gimpexport.c
==============================================================================
--- trunk/libgimp/gimpexport.c (original)
+++ trunk/libgimp/gimpexport.c Sun Mar 22 15:49:13 2009
@@ -426,7 +426,8 @@
gimp_window_set_transient (GTK_WINDOW (dialog));
hbox = gtk_hbox_new (FALSE, 12);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ hbox);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_widget_show (hbox);
@@ -508,7 +509,8 @@
gimp_window_set_transient (GTK_WINDOW (dialog));
hbox = gtk_hbox_new (FALSE, 12);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox);
+ gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
+ hbox);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 12);
gtk_widget_show (hbox);
Modified: trunk/libgimp/gimpfontselectbutton.c
==============================================================================
--- trunk/libgimp/gimpfontselectbutton.c (original)
+++ trunk/libgimp/gimpfontselectbutton.c Sun Mar 22 15:49:13 2009
@@ -390,15 +390,17 @@
guint info,
guint time)
{
+ gint length = gtk_selection_data_get_length (selection);
gchar *str;
- if ((selection->format != 8) || (selection->length < 1))
+ if (gtk_selection_data_get_format (selection) != 8 || length < 1)
{
- g_warning ("Received invalid font data!");
+ g_warning ("%s: received invalid font data", G_STRFUNC);
return;
}
- str = g_strndup ((const gchar *) selection->data, selection->length);
+ str = g_strndup ((const gchar *) gtk_selection_data_get_data (selection),
+ length);
if (g_utf8_validate (str, -1, NULL))
{
Modified: trunk/libgimp/gimpgradientselectbutton.c
==============================================================================
--- trunk/libgimp/gimpgradientselectbutton.c (original)
+++ trunk/libgimp/gimpgradientselectbutton.c Sun Mar 22 15:49:13 2009
@@ -530,7 +530,7 @@
GtkStyle *style = gtk_widget_get_style (widget);
guchar *buf = ((y / GIMP_CHECK_SIZE_SM) & 1) ? odd : even;
- gdk_draw_rgb_image_dithalign (widget->window,
+ gdk_draw_rgb_image_dithalign (gtk_widget_get_window (widget),
style->fg_gc[widget->state],
event->area.x, y,
event->area.width, 1,
@@ -553,15 +553,17 @@
guint info,
guint time)
{
+ gint length = gtk_selection_data_get_length (selection);
gchar *str;
- if ((selection->format != 8) || (selection->length < 1))
+ if (gtk_selection_data_get_format (selection) != 8 || length < 1)
{
- g_warning ("Received invalid gradient data!");
+ g_warning ("%s: received invalid gradient data", G_STRFUNC);
return;
}
- str = g_strndup ((const gchar *) selection->data, selection->length);
+ str = g_strndup ((const gchar *) gtk_selection_data_get_data (selection),
+ length);
if (g_utf8_validate (str, -1, NULL))
{
Modified: trunk/libgimp/gimpimagecombobox.c
==============================================================================
--- trunk/libgimp/gimpimagecombobox.c (original)
+++ trunk/libgimp/gimpimagecombobox.c Sun Mar 22 15:49:13 2009
@@ -190,15 +190,17 @@
guint info,
guint time)
{
+ gint length = gtk_selection_data_get_length (selection);
gchar *str;
- if ((selection->format != 8) || (selection->length < 1))
+ if (gtk_selection_data_get_format (selection) != 8 || length < 1)
{
- g_warning ("Received invalid image ID data!");
+ g_warning ("%s: received invalid image ID data", G_STRFUNC);
return;
}
- str = g_strndup ((const gchar *) selection->data, selection->length);
+ str = g_strndup ((const gchar *) gtk_selection_data_get_data (selection),
+ length);
if (g_utf8_validate (str, -1, NULL))
{
Modified: trunk/libgimp/gimpitemcombobox.c
==============================================================================
--- trunk/libgimp/gimpitemcombobox.c (original)
+++ trunk/libgimp/gimpitemcombobox.c Sun Mar 22 15:49:13 2009
@@ -458,15 +458,17 @@
guint info,
guint time)
{
+ gint length = gtk_selection_data_get_length (selection);
gchar *str;
- if ((selection->format != 8) || (selection->length < 1))
+ if (gtk_selection_data_get_format (selection) != 8 || length < 1)
{
- g_warning ("Received invalid item ID data!");
+ g_warning ("%s: received invalid item ID data", G_STRFUNC);
return;
}
- str = g_strndup ((const gchar *) selection->data, selection->length);
+ str = g_strndup ((const gchar *) gtk_selection_data_get_data (selection),
+ length);
if (g_utf8_validate (str, -1, NULL))
{
Modified: trunk/libgimp/gimppaletteselectbutton.c
==============================================================================
--- trunk/libgimp/gimppaletteselectbutton.c (original)
+++ trunk/libgimp/gimppaletteselectbutton.c Sun Mar 22 15:49:13 2009
@@ -407,15 +407,17 @@
guint info,
guint time)
{
+ gint length = gtk_selection_data_get_length (selection);
gchar *str;
- if ((selection->format != 8) || (selection->length < 1))
+ if (gtk_selection_data_get_format (selection) != 8 || length < 1)
{
- g_warning ("Received invalid palette data!");
+ g_warning ("%s: received invalid palette data", G_STRFUNC);
return;
}
- str = g_strndup ((const gchar *) selection->data, selection->length);
+ str = g_strndup ((const gchar *) gtk_selection_data_get_data (selection),
+ length);
if (g_utf8_validate (str, -1, NULL))
{
Modified: trunk/libgimp/gimppatternselectbutton.c
==============================================================================
--- trunk/libgimp/gimppatternselectbutton.c (original)
+++ trunk/libgimp/gimppatternselectbutton.c Sun Mar 22 15:49:13 2009
@@ -593,7 +593,8 @@
gtk_widget_show (preview);
/* decide where to put the popup */
- gdk_window_get_origin (priv->preview->window, &x_org, &y_org);
+ gdk_window_get_origin (gtk_widget_get_window (priv->preview),
+ &x_org, &y_org);
scr_w = gdk_screen_get_width (screen);
scr_h = gdk_screen_get_height (screen);
@@ -640,15 +641,17 @@
guint info,
guint time)
{
+ gint length = gtk_selection_data_get_length (selection);
gchar *str;
- if ((selection->format != 8) || (selection->length < 1))
+ if (gtk_selection_data_get_format (selection) != 8 || length < 1)
{
g_warning ("Received invalid pattern data!");
return;
}
- str = g_strndup ((const gchar *) selection->data, selection->length);
+ str = g_strndup ((const gchar *) gtk_selection_data_get_data (selection),
+ length);
if (g_utf8_validate (str, -1, NULL))
{
Modified: trunk/libgimp/gimpprogressbar.c
==============================================================================
--- trunk/libgimp/gimpprogressbar.c (original)
+++ trunk/libgimp/gimpprogressbar.c Sun Mar 22 15:49:13 2009
@@ -179,12 +179,12 @@
#ifdef GDK_WINDOWING_WIN32
if (window && GTK_WIDGET_REALIZED (window))
- return GDK_WINDOW_HWND (GTK_WIDGET (window)->window);
+ return GDK_WINDOW_HWND (gtk_widget_get_window (GTK_WIDGET (window)));
#endif
#ifdef GDK_WINDOWING_X11
if (window && GTK_WIDGET_REALIZED (window))
- return GDK_WINDOW_XID (GTK_WIDGET (window)->window);
+ return GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window)));
#endif
return 0;
Modified: trunk/libgimp/gimpui.c
==============================================================================
--- trunk/libgimp/gimpui.c (original)
+++ trunk/libgimp/gimpui.c Sun Mar 22 15:49:13 2009
@@ -272,7 +272,7 @@
GdkWindow *parent)
{
if (GTK_WIDGET_REALIZED (window))
- gdk_window_set_transient_for (window->window, parent);
+ gdk_window_set_transient_for (gtk_widget_get_window (window), parent);
}
static void
@@ -291,7 +291,8 @@
return;
if (GTK_WIDGET_REALIZED (window))
- gdk_window_set_transient_for (GTK_WIDGET (window)->window, parent);
+ gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (window)),
+ parent);
g_signal_connect_object (window, "realize",
G_CALLBACK (gimp_window_transient_realized),
Modified: trunk/libgimp/gimpzoompreview.c
==============================================================================
--- trunk/libgimp/gimpzoompreview.c (original)
+++ trunk/libgimp/gimpzoompreview.c Sun Mar 22 15:49:13 2009
@@ -573,12 +573,13 @@
if (gimp_zoom_preview_get_factor (GIMP_ZOOM_PREVIEW (preview)) > 1.0)
{
- gdk_window_set_cursor (preview->area->window,
+ gdk_window_set_cursor (gtk_widget_get_window (preview->area),
GIMP_SCROLLED_PREVIEW (preview)->cursor_move);
}
else
{
- gdk_window_set_cursor (preview->area->window, preview->default_cursor);
+ gdk_window_set_cursor (gtk_widget_get_window (preview->area),
+ preview->default_cursor);
}
}
Modified: trunk/tools/test-clipboard.c
==============================================================================
--- trunk/tools/test-clipboard.c (original)
+++ trunk/tools/test-clipboard.c Sun Mar 22 15:49:13 2009
@@ -359,14 +359,16 @@
const gchar *target,
const gchar *filename)
{
- GtkSelectionData *data;
+ GtkSelectionData *sel_data;
- data = gtk_clipboard_wait_for_contents (clipboard,
- gdk_atom_intern (target,
- FALSE));
- if (data)
+ sel_data = gtk_clipboard_wait_for_contents (clipboard,
+ gdk_atom_intern (target,
+ FALSE));
+ if (sel_data)
{
- gint fd;
+ const guchar *data;
+ gint length;
+ gint fd;
if (! strcmp (filename, "-"))
fd = 1;
@@ -380,7 +382,10 @@
return FALSE;
}
- if (write (fd, data->data, data->length) < data->length)
+ data = gtk_selection_data_get_data (sel_data);
+ length = gtk_selection_data_get_length (sel_data);
+
+ if (write (fd, data, length) < length)
{
close (fd);
g_printerr ("%s: write() failed: %s",
@@ -395,7 +400,7 @@
return FALSE;
}
- gtk_selection_data_free (data);
+ gtk_selection_data_free (sel_data);
}
return TRUE;
@@ -420,7 +425,8 @@
return;
}
- gtk_selection_data_set (selection, selection->target,
+ gtk_selection_data_set (selection,
+ gtk_selection_data_get_target (selection),
8, (guchar *) buf, buf_size);
g_free (buf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]