[gtk+] fontchooser: Sanitize variable declarations
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] fontchooser: Sanitize variable declarations
- Date: Thu, 22 Sep 2011 21:46:41 +0000 (UTC)
commit 2b83d036048783b5aa2c10ab3eef6d321498ec04
Author: Benjamin Otte <otte redhat com>
Date: Wed Sep 21 00:19:51 2011 +0200
fontchooser: Sanitize variable declarations
- no empty lines between variables
- no unnecessary casts
- use glib-style casts
- no spaces
gtk/gtkfontchooserwidget.c | 32 ++++++++++++++------------------
1 files changed, 14 insertions(+), 18 deletions(-)
---
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c
index f80c900..f721046 100644
--- a/gtk/gtkfontchooserwidget.c
+++ b/gtk/gtkfontchooserwidget.c
@@ -363,16 +363,13 @@ static void
cursor_changed_cb (GtkTreeView *treeview,
gpointer user_data)
{
- GtkFontChooserWidget *fontchooser = (GtkFontChooserWidget*)user_data;
+ GtkFontChooserWidget *fontchooser = user_data;
GtkFontChooserWidgetPrivate *priv = fontchooser->priv;
-
PangoFontFamily *family;
PangoFontFace *face;
PangoFontDescription *desc;
-
gint *sizes;
gint i, n_sizes;
-
GtkTreeIter iter;
GtkTreePath *path = NULL;
@@ -430,9 +427,8 @@ zoom_preview_cb (GtkWidget *scrolled_window,
GdkEventScroll *event,
gpointer user_data)
{
- GtkFontChooserWidget *fc = (GtkFontChooserWidget*)user_data;
- GtkFontChooserWidgetPrivate *priv = fc->priv;
-
+ GtkFontChooserWidget *fc = user_data;
+ GtkFontChooserWidgetPrivate *priv = fc->priv;
GtkAdjustment *adj = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (priv->size_spin));
if (event->direction == GDK_SCROLL_UP || event->direction == GDK_SCROLL_RIGHT)
@@ -452,8 +448,8 @@ row_inserted_cb (GtkTreeModel *model,
GtkTreeIter *iter,
gpointer user_data)
{
- GtkFontChooserWidget *fontchooser = (GtkFontChooserWidget*)user_data;
- GtkFontChooserWidgetPrivate *priv = fontchooser->priv;
+ GtkFontChooserWidget *fontchooser = user_data;
+ GtkFontChooserWidgetPrivate *priv = fontchooser->priv;
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->list_notebook), 0);
}
@@ -463,8 +459,8 @@ row_deleted_cb (GtkTreeModel *model,
GtkTreePath *path,
gpointer user_data)
{
- GtkFontChooserWidget *fontchooser = (GtkFontChooserWidget*)user_data;
- GtkFontChooserWidgetPrivate *priv = fontchooser->priv;
+ GtkFontChooserWidget *fontchooser = user_data;
+ GtkFontChooserWidgetPrivate *priv = fontchooser->priv;
if (gtk_tree_model_iter_n_children (model, NULL) == 0)
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->list_notebook), 1);
@@ -473,10 +469,10 @@ row_deleted_cb (GtkTreeModel *model,
static void
gtk_font_chooser_widget_init (GtkFontChooserWidget *fontchooser)
{
- GIcon *icon;
- GtkFontChooserWidgetPrivate *priv;
- GtkWidget *scrolled_win;
- GtkWidget *grid;
+ GIcon *icon;
+ GtkFontChooserWidgetPrivate *priv;
+ GtkWidget *scrolled_win;
+ GtkWidget *grid;
fontchooser->priv = G_TYPE_INSTANCE_GET_PRIVATE (fontchooser,
GTK_TYPE_FONT_CHOOSER_WIDGET,
@@ -789,8 +785,8 @@ static void
gtk_font_chooser_widget_bootstrap_fontlist (GtkFontChooserWidget *fontchooser)
{
GtkFontChooserWidgetPrivate *priv = fontchooser->priv;
- GtkTreeView *treeview = GTK_TREE_VIEW (priv->family_face_list);
- GtkCellRenderer *cell;
+ GtkTreeView *treeview = GTK_TREE_VIEW (priv->family_face_list);
+ GtkCellRenderer *cell;
GtkTreeViewColumn *col;
priv->model = GTK_TREE_MODEL (gtk_list_store_new (4,
@@ -1086,7 +1082,7 @@ gtk_font_chooser_widget_set_filter_func (GtkFontChooser *chooser,
gpointer data,
GDestroyNotify destroy)
{
- GtkFontChooserWidget *fontchooser = GTK_FONT_CHOOSER_WIDGET (chooser);
+ GtkFontChooserWidget *fontchooser = GTK_FONT_CHOOSER_WIDGET (chooser);
GtkFontChooserWidgetPrivate *priv = fontchooser->priv;
if (priv->filter_data_destroy)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]