]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkseparator.c
filechooserbutton: whitespace fixes
[~andy/gtk] / gtk / gtkseparator.c
index d67ab2ec6fee3d92b0e6876c8999b149e14bff7c..0ed0bee310e318e0a87fdd322a86c35b0a94b1a6 100644 (file)
@@ -12,9 +12,7 @@
  * 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/>.
  */
 
 /*
@@ -72,7 +70,6 @@ static void       gtk_separator_get_preferred_height
                                               gint           *natural);
 static gboolean   gtk_separator_draw         (GtkWidget      *widget,
                                               cairo_t        *cr);
-static AtkObject *gtk_separator_get_accessible (GtkWidget    *widget);
 
 
 G_DEFINE_TYPE_WITH_CODE (GtkSeparator, gtk_separator, GTK_TYPE_WIDGET,
@@ -93,7 +90,8 @@ gtk_separator_class_init (GtkSeparatorClass *class)
   widget_class->get_preferred_height = gtk_separator_get_preferred_height;
 
   widget_class->draw = gtk_separator_draw;
-  widget_class->get_accessible = gtk_separator_get_accessible;
+
+  gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_SEPARATOR);
 
   g_object_class_override_property (object_class, PROP_ORIENTATION, "orientation");
 
@@ -243,9 +241,6 @@ gtk_separator_draw (GtkWidget *widget,
 
   gtk_style_context_get_padding (context, state, &padding);
 
-  gtk_style_context_save (context);
-  gtk_style_context_set_state (context, state);
-
   if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
     {
       if (wide_separators)
@@ -269,23 +264,9 @@ gtk_separator_draw (GtkWidget *widget,
                          (width - padding.left) / 2, height - 1);
     }
 
-  gtk_style_context_restore (context);
-
   return FALSE;
 }
 
-static AtkObject *
-gtk_separator_get_accessible (GtkWidget *widget)
-{
-  AtkObject *obj;
-
-  obj = GTK_WIDGET_CLASS (gtk_separator_parent_class)->get_accessible (widget);
-
-  atk_object_set_role (obj, ATK_ROLE_SEPARATOR);
-
-  return obj;
-}
-
 /**
  * gtk_separator_new:
  * @orientation: the separator's orientation.