]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtktoolitem.c
clipboard: remove dead code
[~andy/gtk] / gtk / gtktoolitem.c
index b296e3b9a9b70aadfabf734cbb715009aba5b7e1..90ba2fd744d1481462abc09729b3ffedc984ff9e 100644 (file)
@@ -15,9 +15,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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include "config.h"
@@ -32,7 +30,6 @@
 #include "gtksizerequest.h"
 #include "gtkactivatable.h"
 #include "gtkintl.h"
-#include "gtkmainprivate.h"
 #include "gtkprivate.h"
 
 
@@ -99,22 +96,21 @@ struct _GtkToolItemPrivate
   gchar *tip_text;
   gchar *tip_private;
 
-  guint visible_horizontal : 1;
-  guint visible_vertical : 1;
-  guint homogeneous : 1;
-  guint expand : 1;
-  guint use_drag_window : 1;
-  guint is_important : 1;
+  guint visible_horizontal    : 1;
+  guint visible_vertical      : 1;
+  guint homogeneous           : 1;
+  guint expand                : 1;
+  guint use_drag_window       : 1;
+  guint is_important          : 1;
+  guint use_action_appearance : 1;
 
   GdkWindow *drag_window;
-  
   gchar *menu_item_id;
   GtkWidget *menu_item;
 
   GtkAction *action;
-  gboolean   use_action_appearance;
 };
-  
+
 static void gtk_tool_item_finalize     (GObject         *object);
 static void gtk_tool_item_dispose      (GObject         *object);
 static void gtk_tool_item_parent_set   (GtkWidget       *toolitem,
@@ -404,6 +400,9 @@ gtk_tool_item_property_notify (GObject    *object,
   if (tool_item->priv->menu_item && strcmp (pspec->name, "sensitive") == 0)
     gtk_widget_set_sensitive (tool_item->priv->menu_item,
                              gtk_widget_get_sensitive (GTK_WIDGET (tool_item)));
+
+  if (G_OBJECT_CLASS (gtk_tool_item_parent_class)->notify)
+    G_OBJECT_CLASS (gtk_tool_item_parent_class)->notify (object, pspec);
 }
 
 static void
@@ -433,7 +432,7 @@ create_drag_window (GtkToolItem *toolitem)
 
   toolitem->priv->drag_window = gdk_window_new (gtk_widget_get_parent_window (widget),
                                          &attributes, attributes_mask);
-  gdk_window_set_user_data (toolitem->priv->drag_window, toolitem);
+  gtk_widget_register_window (widget, toolitem->priv->drag_window);
 }
 
 static void
@@ -458,7 +457,7 @@ destroy_drag_window (GtkToolItem *toolitem)
 {
   if (toolitem->priv->drag_window)
     {
-      gdk_window_set_user_data (toolitem->priv->drag_window, NULL);
+      gtk_widget_unregister_window (GTK_WIDGET (toolitem), toolitem->priv->drag_window);
       gdk_window_destroy (toolitem->priv->drag_window);
       toolitem->priv->drag_window = NULL;
     }
@@ -789,10 +788,7 @@ gtk_tool_item_get_orientation (GtkToolItem *tool_item)
  * <listitem> GTK_TOOLBAR_TEXT, meaning the tool item should only
  * show text</listitem>
  * <listitem> GTK_TOOLBAR_BOTH_HORIZ, meaning the tool item should show
- * both an icon and a label, arranged horizontally (however, note the 
- * #GtkToolButton::has_text_horizontally that makes tool buttons not
- * show labels when the toolbar style is GTK_TOOLBAR_BOTH_HORIZ.
- * </listitem>
+ * both an icon and a label, arranged horizontally</listitem>
  * </itemizedlist>
  * 
  * Return value: A #GtkToolbarStyle indicating the toolbar style used
@@ -818,7 +814,7 @@ gtk_tool_item_get_toolbar_style (GtkToolItem *tool_item)
  * gtk_tool_item_get_relief_style:
  * @tool_item: a #GtkToolItem 
  * 
- * Returns the relief style of @tool_item. See gtk_button_set_relief_style().
+ * Returns the relief style of @tool_item. See gtk_button_set_relief().
  * Custom subclasses of #GtkToolItem should call this function in the handler
  * of the #GtkToolItem::toolbar_reconfigured signal to find out the
  * relief style of buttons.
@@ -1413,7 +1409,7 @@ gtk_tool_item_toolbar_reconfigured (GtkToolItem *tool_item)
   /* The slightely inaccurate name "gtk_tool_item_toolbar_reconfigured" was
    * choosen over "gtk_tool_item_tool_shell_reconfigured", since the function
    * emits the "toolbar-reconfigured" signal, not "tool-shell-reconfigured".
-   * Its not possible to rename the signal, and emitting another name than
+   * It's not possible to rename the signal, and emitting another name than
    * indicated by the function name would be quite confusing. That's the
    * price of providing stable APIs.
    */