From ac72d96a8afd638bf1e7fe0bf31e45f5d6bbd7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 11 Oct 2016 16:41:22 +0200 Subject: menuitem: Remove right-justify --- gtk/gtkmenuitem.c | 84 ------------------------------------------------------- gtk/gtkmenuitem.h | 5 ---- 2 files changed, 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, @@ -729,21 +728,6 @@ gtk_menu_item_class_init (GtkMenuItemClass *klass) NULL, 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: * @@ -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; @@ -932,22 +915,6 @@ gtk_menu_item_dispose (GObject *object) G_OBJECT_CLASS (gtk_menu_item_parent_class)->dispose (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, @@ -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); -- cgit v1.2.1