diff options
author | Timm Bäder <mail@baedert.org> | 2016-10-11 16:41:22 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-10-18 00:29:17 +0200 |
commit | ac72d96a8afd638bf1e7fe0bf31e45f5d6bbd7a6 (patch) | |
tree | 74c398f088c3f8240a8b06befc04c02a0a2ec232 | |
parent | 203cf0d120087a2deef68a294eaa37f73a46f4ee (diff) | |
download | gtk+-ac72d96a8afd638bf1e7fe0bf31e45f5d6bbd7a6.tar.gz |
menuitem: Remove right-justify
-rw-r--r-- | gtk/gtkmenuitem.c | 84 | ||||
-rw-r--r-- | gtk/gtkmenuitem.h | 5 |
2 files changed, 0 insertions, 89 deletions
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c index 72eff6ae9c..68632ad2fd 100644 --- a/gtk/gtkmenuitem.c +++ b/gtk/gtkmenuitem.c @@ -116,7 +116,6 @@ enum { enum { PROP_0, - PROP_RIGHT_JUSTIFIED, PROP_SUBMENU, PROP_ACCEL_PATH, PROP_LABEL, @@ -730,21 +729,6 @@ gtk_menu_item_class_init (GtkMenuItemClass *klass) G_TYPE_NONE, 0); /** - * GtkMenuItem:right-justified: - * - * Sets whether the menu item appears justified - * at the right side of a menu bar. - * - * Since: 2.14 - */ - menu_item_props[PROP_RIGHT_JUSTIFIED] = - g_param_spec_boolean ("right-justified", - P_("Right Justified"), - P_("Sets whether the menu item appears justified at the right side of a menu bar"), - FALSE, - GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY|G_PARAM_DEPRECATED); - - /** * GtkMenuItem:submenu: * * The submenu attached to the menu item, or %NULL if it has none. @@ -838,7 +822,6 @@ gtk_menu_item_init (GtkMenuItem *menu_item) else priv->submenu_direction = GTK_DIRECTION_RIGHT; priv->submenu_placement = GTK_TOP_BOTTOM; - priv->right_justify = FALSE; priv->use_action_appearance = TRUE; priv->timer = 0; priv->action = NULL; @@ -933,22 +916,6 @@ gtk_menu_item_dispose (GObject *object) } static void -gtk_menu_item_do_set_right_justified (GtkMenuItem *menu_item, - gboolean right_justified) -{ - GtkMenuItemPrivate *priv = menu_item->priv; - - right_justified = right_justified != FALSE; - - if (priv->right_justify != right_justified) - { - priv->right_justify = right_justified; - gtk_widget_queue_resize (GTK_WIDGET (menu_item)); - g_object_notify_by_pspec (G_OBJECT (menu_item), menu_item_props[PROP_RIGHT_JUSTIFIED]); - } -} - -static void gtk_menu_item_set_property (GObject *object, guint prop_id, const GValue *value, @@ -958,9 +925,6 @@ gtk_menu_item_set_property (GObject *object, switch (prop_id) { - case PROP_RIGHT_JUSTIFIED: - gtk_menu_item_do_set_right_justified (menu_item, g_value_get_boolean (value)); - break; case PROP_SUBMENU: gtk_menu_item_set_submenu (menu_item, g_value_get_object (value)); break; @@ -1002,9 +966,6 @@ gtk_menu_item_get_property (GObject *object, switch (prop_id) { - case PROP_RIGHT_JUSTIFIED: - g_value_set_boolean (value, priv->right_justify); - break; case PROP_SUBMENU: g_value_set_object (value, gtk_menu_item_get_submenu (menu_item)); break; @@ -2054,51 +2015,6 @@ _gtk_menu_item_popdown_submenu (GtkWidget *widget) } } -/** - * gtk_menu_item_set_right_justified: - * @menu_item: a #GtkMenuItem. - * @right_justified: if %TRUE the menu item will appear at the - * far right if added to a menu bar - * - * Sets whether the menu item appears justified at the right - * side of a menu bar. This was traditionally done for “Help” - * menu items, but is now considered a bad idea. (If the widget - * layout is reversed for a right-to-left language like Hebrew - * or Arabic, right-justified-menu-items appear at the left.) - * - * Deprecated: 3.2: If you insist on using it, use - * gtk_widget_set_hexpand() and gtk_widget_set_halign(). - **/ -void -gtk_menu_item_set_right_justified (GtkMenuItem *menu_item, - gboolean right_justified) -{ - g_return_if_fail (GTK_IS_MENU_ITEM (menu_item)); - - gtk_menu_item_do_set_right_justified (menu_item, right_justified); -} - -/** - * gtk_menu_item_get_right_justified: - * @menu_item: a #GtkMenuItem - * - * Gets whether the menu item appears justified at the right - * side of the menu bar. - * - * Returns: %TRUE if the menu item will appear at the - * far right if added to a menu bar. - * - * Deprecated: 3.2: See gtk_menu_item_set_right_justified() - **/ -gboolean -gtk_menu_item_get_right_justified (GtkMenuItem *menu_item) -{ - g_return_val_if_fail (GTK_IS_MENU_ITEM (menu_item), FALSE); - - return menu_item->priv->right_justify; -} - - static void gtk_menu_item_show_all (GtkWidget *widget) { diff --git a/gtk/gtkmenuitem.h b/gtk/gtkmenuitem.h index 3fa4a9bdc5..b1c9684aab 100644 --- a/gtk/gtkmenuitem.h +++ b/gtk/gtkmenuitem.h @@ -133,11 +133,6 @@ void gtk_menu_item_toggle_size_request (GtkMenuItem *menu_item, GDK_AVAILABLE_IN_ALL void gtk_menu_item_toggle_size_allocate (GtkMenuItem *menu_item, gint allocation); -GDK_DEPRECATED_IN_3_2 -void gtk_menu_item_set_right_justified (GtkMenuItem *menu_item, - gboolean right_justified); -GDK_DEPRECATED_IN_3_2 -gboolean gtk_menu_item_get_right_justified (GtkMenuItem *menu_item); GDK_AVAILABLE_IN_ALL void gtk_menu_item_set_accel_path (GtkMenuItem *menu_item, const gchar *accel_path); |