wiget: Fix whitespace issues

Switch from tabs to spaces everywhere consistently and remove all
trailing whitespace.
This commit is contained in:
Timm Bäder 2020-12-27 13:10:35 +01:00
parent ebdf2989f8
commit f11f0da11c

View File

@ -457,11 +457,6 @@ typedef struct {
gssize offset; /* Instance private data offset where to set the automatic child (or 0) */
} AutomaticChildClass;
typedef struct {
char *callback_name;
GCallback callback_symbol;
} CallbackSymbol;
enum {
DESTROY,
SHOW,
@ -521,19 +516,16 @@ enum {
PROP_ACCESSIBLE_ROLE
};
static GParamSpec *widget_props[NUM_PROPERTIES] = { NULL, };
typedef struct _GtkStateData GtkStateData;
struct _GtkStateData
typedef struct
{
guint flags_to_set;
guint flags_to_unset;
int old_scale_factor;
};
} GtkStateData;
/* --- prototypes --- */
static void gtk_widget_base_class_init (gpointer g_class);
static void gtk_widget_class_init (GtkWidgetClass *klass);
static void gtk_widget_base_class_finalize (GtkWidgetClass *klass);
@ -552,12 +544,10 @@ static void gtk_widget_real_realize (GtkWidget *widget);
static void gtk_widget_real_unrealize (GtkWidget *widget);
static void gtk_widget_real_direction_changed (GtkWidget *widget,
GtkTextDirection previous_direction);
static void gtk_widget_real_css_changed (GtkWidget *widget,
GtkCssStyleChange *change);
static void gtk_widget_real_system_setting_changed (GtkWidget *widget,
GtkSystemSetting setting);
static void gtk_widget_real_set_focus_child (GtkWidget *widget,
GtkWidget *child);
static void gtk_widget_real_move_focus (GtkWidget *widget,
@ -580,7 +570,6 @@ static void gtk_widget_propagate_state (GtkWidget
static gboolean gtk_widget_real_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling);
static void gtk_widget_accessible_interface_init (GtkAccessibleInterface *iface);
static void gtk_widget_buildable_interface_init (GtkBuildableIface *iface);
static void gtk_widget_buildable_set_id (GtkBuildable *buildable,
const char *id);
@ -606,13 +595,9 @@ static void gtk_widget_buildable_custom_finished (GtkBuildable
gpointer data);
static void gtk_widget_buildable_parser_finished (GtkBuildable *buildable,
GtkBuilder *builder);
static void gtk_widget_set_accessible_role (GtkWidget *self,
GtkAccessibleRole role);
static GtkAccessibleRole gtk_widget_get_accessible_role (GtkWidget *self);
static void template_data_free (GtkWidgetTemplate*template_data);
static void gtk_widget_set_usize_internal (GtkWidget *widget,
int width,
int height);
@ -627,10 +612,10 @@ static void gtk_widget_queue_compute_expand (GtkWidget *widget);
/* --- variables --- */
static int GtkWidget_private_offset = 0;
static gpointer gtk_widget_parent_class = NULL;
static guint widget_signals[LAST_SIGNAL] = { 0 };
static GParamSpec *widget_props[NUM_PROPERTIES] = { NULL, };
GtkTextDirection gtk_default_direction = GTK_TEXT_DIR_LTR;
static GQuark quark_pango_context = 0;
@ -641,7 +626,6 @@ static GQuark quark_action_muxer = 0;
static GQuark quark_font_options = 0;
static GQuark quark_font_map = 0;
/* --- functions --- */
GType
gtk_widget_get_type (void)
{
@ -689,8 +673,7 @@ gtk_widget_get_type (void)
g_type_add_class_private (widget_type, sizeof (GtkWidgetClassPrivate));
GtkWidget_private_offset =
g_type_add_instance_private (widget_type, sizeof (GtkWidgetPrivate));
GtkWidget_private_offset = g_type_add_instance_private (widget_type, sizeof (GtkWidgetPrivate));
g_type_add_interface_static (widget_type, GTK_TYPE_ACCESSIBLE,
&accessible_info);
@ -1890,11 +1873,31 @@ gtk_widget_class_init (GtkWidgetClass *klass)
gtk_widget_class_set_accessible_role (klass, GTK_ACCESSIBLE_ROLE_WIDGET);
}
static void
template_child_class_free (AutomaticChildClass *child_class)
{
if (child_class)
{
g_free (child_class->name);
g_slice_free (AutomaticChildClass, child_class);
}
}
static void
gtk_widget_base_class_finalize (GtkWidgetClass *klass)
{
GtkWidgetTemplate *template_data = klass->priv->template;
if (template_data)
{
g_bytes_unref (template_data->data);
g_slist_free_full (template_data->children, (GDestroyNotify)template_child_class_free);
g_object_unref (template_data->scope);
g_slice_free (GtkWidgetTemplate, template_data);
}
template_data_free (klass->priv->template);
g_object_unref (klass->priv->shortcuts);
}
@ -3496,10 +3499,8 @@ gtk_widget_queue_resize_internal (GtkWidget *widget)
for (l = groups; l; l = l->next)
{
for (widgets = gtk_size_group_get_widgets (l->data); widgets; widgets = widgets->next)
{
gtk_widget_queue_resize_internal (widgets->data);
}
}
if (_gtk_widget_get_visible (widget))
{
@ -10669,30 +10670,6 @@ template_child_class_new (const char *name,
return child_class;
}
static void
template_child_class_free (AutomaticChildClass *child_class)
{
if (child_class)
{
g_free (child_class->name);
g_slice_free (AutomaticChildClass, child_class);
}
}
static void
template_data_free (GtkWidgetTemplate *template_data)
{
if (template_data)
{
g_bytes_unref (template_data->data);
g_slist_free_full (template_data->children, (GDestroyNotify)template_child_class_free);
g_object_unref (template_data->scope);
g_slice_free (GtkWidgetTemplate, template_data);
}
}
static GHashTable *
get_auto_child_hash (GtkWidget *widget,
GType type,