]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtktoolpalette.c
Change FSF Address
[~andy/gtk] / gtk / gtktoolpalette.c
index be7dd8f36efa26d293e292779c1ad01757b7ddbf..be6297ab19907473f7a3b0c19134ccd69338d759 100644 (file)
@@ -12,8 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  *
  * Authors:
  *      Mathias Hasselmann
@@ -526,6 +525,8 @@ gtk_tool_palette_size_allocate (GtkWidget     *widget,
       GtkToolItemGroupInfo *group = g_ptr_array_index (palette->priv->groups, i);
       gint size;
 
+      group_sizes[i] = 0;
+
       if (!group->widget)
         continue;
 
@@ -696,38 +697,6 @@ gtk_tool_palette_size_allocate (GtkWidget     *widget,
     }
 }
 
-static gboolean
-gtk_tool_palette_draw (GtkWidget      *widget,
-                       cairo_t        *cr)
-{
-  GtkToolPalette *palette = GTK_TOOL_PALETTE (widget);
-  GdkDisplay *display;
-  GdkWindow *window;
-  guint i;
-
-  window = gtk_widget_get_window (widget);
-
-  display = gdk_window_get_display (window);
-
-  if (!gdk_display_supports_composite (display))
-    return FALSE;
-
-  cairo_push_group (cr);
-
-  for (i = 0; i < palette->priv->groups->len; ++i)
-  {
-    GtkToolItemGroupInfo *info = g_ptr_array_index (palette->priv->groups, i);
-    if (info->widget)
-      _gtk_tool_item_group_paint (info->widget, cr);
-  }
-
-  cairo_pop_group_to_source (cr);
-
-  cairo_paint (cr);
-
-  return FALSE;
-}
-
 static void
 gtk_tool_palette_realize (GtkWidget *widget)
 {
@@ -999,7 +968,6 @@ gtk_tool_palette_class_init (GtkToolPaletteClass *cls)
   wclass->get_preferred_width = gtk_tool_palette_get_preferred_width;
   wclass->get_preferred_height= gtk_tool_palette_get_preferred_height;
   wclass->size_allocate       = gtk_tool_palette_size_allocate;
-  wclass->draw                = gtk_tool_palette_draw;
   wclass->realize             = gtk_tool_palette_realize;
 
   cclass->add                 = gtk_tool_palette_add;
@@ -1914,7 +1882,7 @@ _gtk_tool_palette_child_set_drag_source (GtkWidget *child,
  *
  * Since: 2.20
  */
-G_CONST_RETURN GtkTargetEntry*
+const GtkTargetEntry*
 gtk_tool_palette_get_drag_target_item (void)
 {
   return &dnd_targets[0];
@@ -1929,7 +1897,7 @@ gtk_tool_palette_get_drag_target_item (void)
  *
  * Since: 2.20
  */
-G_CONST_RETURN GtkTargetEntry*
+const GtkTargetEntry*
 gtk_tool_palette_get_drag_target_group (void)
 {
   return &dnd_targets[1];