summaryrefslogtreecommitdiff
path: root/gtk/gtkcombobox.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-07-24 17:02:48 +0200
committerBenjamin Otte <otte@redhat.com>2015-07-26 17:18:42 +0200
commitfcb26376dfc317f0f45ec3a5d94fb697003b64e3 (patch)
tree3e45ad0f7310d16769afe2f17764c9f8e9a13fc5 /gtk/gtkcombobox.c
parent93a4030c453c3f7339fd387d01d4d44079bca142 (diff)
downloadgtk+-fcb26376dfc317f0f45ec3a5d94fb697003b64e3.tar.gz
combobox: Remove the separator
It was a special case and it's not used by themes anymore. Plus, in the CSS world, if a theme wants a separator, it can just style the button's border to create one.
Diffstat (limited to 'gtk/gtkcombobox.c')
-rw-r--r--gtk/gtkcombobox.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index b2e409bc18..1403de2746 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -34,11 +34,9 @@
#include "gtkmenuprivate.h"
#include "gtkmenushellprivate.h"
#include "gtkscrolledwindow.h"
-#include "gtkseparatormenuitem.h"
#include "deprecated/gtktearoffmenuitem.h"
#include "gtktogglebutton.h"
#include "gtktreeselection.h"
-#include "gtkseparator.h"
#include "gtkwidgetpath.h"
#include "gtkwidgetprivate.h"
#include "gtkwindow.h"
@@ -114,7 +112,6 @@ struct _GtkComboBoxPrivate
GtkWidget *button;
GtkWidget *box;
GtkWidget *arrow;
- GtkWidget *separator;
GtkWidget *popup_widget;
GtkWidget *popup_window;
@@ -170,7 +167,6 @@ struct _GtkComboBoxPrivate
* cell_view -> GtkCellView, regular child
* button -> GtkToggleButton set_parent to combo
* arrow -> GtkArrow set_parent to button
- * separator -> GtkVSepator set_parent to button
* popup_widget -> GtkMenu
* popup_window -> NULL
* scrolled_window -> NULL
@@ -181,7 +177,6 @@ struct _GtkComboBoxPrivate
* cell_view -> NULL
* button -> GtkToggleButton set_parent to combo
* arrow -> GtkArrow, child of button
- * separator -> NULL
* popup_widget -> GtkMenu
* popup_window -> NULL
* scrolled_window -> NULL
@@ -192,7 +187,6 @@ struct _GtkComboBoxPrivate
* cell_view -> GtkCellView, regular child
* button -> GtkToggleButton, set_parent to combo
* arrow -> GtkArrow, child of button
- * separator -> NULL
* popup_widget -> tree_view
* popup_window -> GtkWindow
* scrolled_window -> GtkScrolledWindow, child of popup_window
@@ -203,7 +197,6 @@ struct _GtkComboBoxPrivate
* cell_view -> NULL
* button -> GtkToggleButton, set_parent to combo
* arrow -> GtkArrow, child of button
- * separator -> NULL
* popup_widget -> tree_view
* popup_window -> GtkWindow
* scrolled_window -> GtkScrolledWindow, child of popup_window
@@ -1547,15 +1540,6 @@ gtk_combo_box_add (GtkContainer *container,
{
/* since the cell_view was unparented, it's gone now */
priv->cell_view = NULL;
-
- if (!priv->tree_view && priv->separator)
- {
- gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (priv->separator)),
- priv->separator);
- priv->separator = NULL;
-
- gtk_widget_queue_resize (GTK_WIDGET (container));
- }
}
if (priv->has_entry)
@@ -3070,9 +3054,6 @@ gtk_combo_box_menu_setup (GtkComboBox *combo_box)
priv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (priv->button), priv->box);
- priv->separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
- gtk_container_add (GTK_CONTAINER (priv->box), priv->separator);
-
priv->arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
gtk_container_add (GTK_CONTAINER (priv->box), priv->arrow);
gtk_widget_add_events (priv->button, GDK_SCROLL_MASK);
@@ -3153,7 +3134,6 @@ gtk_combo_box_menu_destroy (GtkComboBox *combo_box)
priv->box = NULL;
priv->button = NULL;
priv->arrow = NULL;
- priv->separator = NULL;
/* changing the popup window will unref the menu and the children */
}
@@ -3365,7 +3345,6 @@ gtk_combo_box_list_setup (GtkComboBox *combo_box)
priv->arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON);
gtk_container_add (GTK_CONTAINER (priv->button), priv->arrow);
- priv->separator = NULL;
gtk_widget_show_all (priv->button);
if (priv->cell_view)