]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtktogglebutton.c
filechooser: Use _gtk_file_has_native_path() throughout when testing for local_only
[~andy/gtk] / gtk / gtktogglebutton.c
index d88ed22e08c278ca84364abf9f038c058c3ca89d..999710c1671d93592c7f7a0f86e114a90356dc5d 100644 (file)
@@ -49,7 +49,7 @@
  *
  * A toggle button is created by calling either gtk_toggle_button_new() or
  * gtk_toggle_button_new_with_label(). If using the former, it is advisable to
- * pack a widget, (such as a #GtkLabel and/or a #GtkPixmap), into the toggle
+ * pack a widget, (such as a #GtkLabel and/or a #GtkImage), into the toggle
  * button's container. (See #GtkButton for more information).
  *
  * The state of a #GtkToggleButton can be set specifically using
@@ -113,8 +113,6 @@ enum {
 };
 
 
-static gint gtk_toggle_button_draw         (GtkWidget            *widget,
-                                           cairo_t              *cr);
 static gboolean gtk_toggle_button_mnemonic_activate  (GtkWidget            *widget,
                                                       gboolean              group_cycling);
 static void gtk_toggle_button_pressed       (GtkButton            *button);
@@ -159,7 +157,6 @@ gtk_toggle_button_class_init (GtkToggleButtonClass *class)
   gobject_class->set_property = gtk_toggle_button_set_property;
   gobject_class->get_property = gtk_toggle_button_get_property;
 
-  widget_class->draw = gtk_toggle_button_draw;
   widget_class->mnemonic_activate = gtk_toggle_button_mnemonic_activate;
 
   button_class->pressed = gtk_toggle_button_pressed;
@@ -451,7 +448,8 @@ gtk_toggle_button_get_mode (GtkToggleButton *toggle_button)
  *
  * Sets the status of the toggle button. Set to %TRUE if you want the
  * GtkToggleButton to be 'pressed in', and %FALSE to raise it.
- * This action causes the toggled signal to be emitted.
+ * This action causes the #GtkToggleButton::toggled signal and the
+ * #GtkButton::clicked signal to be emitted.
  */
 void
 gtk_toggle_button_set_active (GtkToggleButton *toggle_button,
@@ -563,34 +561,6 @@ gtk_toggle_button_get_inconsistent (GtkToggleButton *toggle_button)
   return toggle_button->priv->inconsistent;
 }
 
-static gint
-gtk_toggle_button_draw (GtkWidget *widget,
-                       cairo_t   *cr)
-{
-  GtkToggleButton *toggle_button = GTK_TOGGLE_BUTTON (widget);
-  GtkToggleButtonPrivate *priv = toggle_button->priv;
-  GtkWidget *child = gtk_bin_get_child (GTK_BIN (widget));
-  GtkButton *button = GTK_BUTTON (widget);
-  GtkStateType state;
-
-  state = gtk_widget_get_state_flags (widget);
-
-  if (priv->inconsistent)
-    state |= GTK_STATE_FLAG_INCONSISTENT;
-  else if (button->priv->depressed)
-    state |= GTK_STATE_FLAG_ACTIVE;
-
-  _gtk_button_paint (button, cr,
-                     gtk_widget_get_allocated_width (widget),
-                     gtk_widget_get_allocated_height (widget),
-                     state);
-
-  if (child)
-    gtk_container_propagate_draw (GTK_CONTAINER (widget), child, cr);
-
-  return FALSE;
-}
-
 static gboolean
 gtk_toggle_button_mnemonic_activate (GtkWidget *widget,
                                      gboolean   group_cycling)
@@ -674,7 +644,7 @@ gtk_toggle_button_update_state (GtkButton *button)
   else
     depressed = priv->active;
 
-  if (button->priv->in_button && (!button->priv->button_down || priv->draw_indicator))
+  if (button->priv->in_button)
     new_state |= GTK_STATE_FLAG_PRELIGHT;
 
   if (depressed)