* 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"
#include "gtksizerequest.h"
#include "gtkactivatable.h"
#include "gtkintl.h"
-#include "gtkmainprivate.h"
#include "gtkprivate.h"
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,
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
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
{
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;
}
* <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
* 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.
/* 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.
*/