Commit 176f4c56 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/dialogs/module-dialog.c app/display/gimpscalecombobox.c

2008-11-16  Michael Natterer  <mitch@gimp.org>

	* app/dialogs/module-dialog.c
	* app/display/gimpscalecombobox.c
	* app/tools/gimpgegltool.c
	* app/tools/gimprectangleoptions.c
	* app/widgets/gimpactionview.[ch]
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainerentry.[ch]
	* app/widgets/gimpcontrollereditor.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpfileprocview.c: s/NUM_COLUMNS/N_COLUMNS/


svn path=/trunk/; revision=27674
parent 72d733ce
2008-11-16 Michael Natterer <mitch@gimp.org>
* app/dialogs/module-dialog.c
* app/display/gimpscalecombobox.c
* app/tools/gimpgegltool.c
* app/tools/gimprectangleoptions.c
* app/widgets/gimpactionview.[ch]
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainerentry.[ch]
* app/widgets/gimpcontrollereditor.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimpfileprocview.c: s/NUM_COLUMNS/N_COLUMNS/
2008-11-16 Martin Nordholts <martinn@svn.gnome.org>
* app/widgets/gimpcontainertreeview.[ch]: Move container tree view
......
......@@ -47,7 +47,7 @@ enum
COLUMN_NAME,
COLUMN_ENABLED,
COLUMN_MODULE,
NUM_COLUMNS
N_COLUMNS
};
enum
......@@ -57,7 +57,7 @@ enum
INFO_DATE,
INFO_COPYRIGHT,
INFO_LOCATION,
NUM_INFOS
N_INFOS
};
typedef struct
......@@ -69,7 +69,7 @@ typedef struct
GtkWidget *hint;
GtkWidget *table;
GtkWidget *label[NUM_INFOS];
GtkWidget *label[N_INFOS];
GtkWidget *error_box;
GtkWidget *error_label;
} ModuleDialog;
......@@ -164,7 +164,7 @@ module_dialog_new (Gimp *gimp)
gtk_widget_set_size_request (listbox, 124, 100);
gtk_widget_show (listbox);
dialog->list = gtk_list_store_new (NUM_COLUMNS,
dialog->list = gtk_list_store_new (N_COLUMNS,
G_TYPE_STRING,
G_TYPE_BOOLEAN,
GIMP_TYPE_MODULE);
......@@ -196,7 +196,7 @@ module_dialog_new (Gimp *gimp)
gtk_container_add (GTK_CONTAINER (listbox), view);
gtk_widget_show (view);
dialog->table = gtk_table_new (2, NUM_INFOS, FALSE);
dialog->table = gtk_table_new (2, N_INFOS, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (dialog->table), 6);
gtk_box_pack_start (GTK_BOX (vbox), dialog->table, FALSE, FALSE, 0);
gtk_widget_show (dialog->table);
......@@ -413,7 +413,7 @@ dialog_info_update (GimpModuleDB *db,
{
GtkTreeModel *model = GTK_TREE_MODEL (dialog->list);
GtkTreeIter iter;
const gchar *text[NUM_INFOS] = { NULL, };
const gchar *text[N_INFOS] = { NULL, };
gchar *location = NULL;
gboolean iter_valid;
gint i;
......@@ -443,7 +443,7 @@ dialog_info_update (GimpModuleDB *db,
if (! module)
{
for (i = 0; i < NUM_INFOS; i++)
for (i = 0; i < N_INFOS; i++)
gtk_label_set_text (GTK_LABEL (dialog->label[i]), NULL);
gtk_label_set_text (GTK_LABEL (dialog->error_label), NULL);
......@@ -469,7 +469,7 @@ dialog_info_update (GimpModuleDB *db,
location : _("No longer available"));
}
for (i = 0; i < NUM_INFOS; i++)
for (i = 0; i < N_INFOS; i++)
gtk_label_set_text (GTK_LABEL (dialog->label[i]),
text[i] ? text[i] : "--");
......
......@@ -40,10 +40,10 @@
enum
{
SCALE,
LABEL,
PERSISTENT,
NUM_COLUMNS
COLUMN_SCALE,
COLUMN_LABEL,
COLUMN_PERSISTENT,
N_COLUMNS
};
enum
......@@ -123,7 +123,7 @@ gimp_scale_combo_box_init (GimpScaleComboBox *combo_box)
combo_box->scale = 1.0;
combo_box->last_path = NULL;
store = gtk_list_store_new (NUM_COLUMNS,
store = gtk_list_store_new (N_COLUMNS,
G_TYPE_DOUBLE, /* SCALE */
G_TYPE_STRING, /* LABEL */
G_TYPE_BOOLEAN); /* PERSISTENT */
......@@ -131,7 +131,8 @@ gimp_scale_combo_box_init (GimpScaleComboBox *combo_box)
gtk_combo_box_set_model (GTK_COMBO_BOX (combo_box), GTK_TREE_MODEL (store));
g_object_unref (store);
gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (combo_box), LABEL);
gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (combo_box),
COLUMN_LABEL);
entry = gtk_bin_get_child (GTK_BIN (combo_box));
......@@ -151,7 +152,7 @@ gimp_scale_combo_box_init (GimpScaleComboBox *combo_box)
gtk_cell_layout_clear (layout);
gtk_cell_layout_pack_start (layout, cell, TRUE);
gtk_cell_layout_set_attributes (layout, cell,
"text", LABEL,
"text", COLUMN_LABEL,
NULL);
for (i = 8; i > 0; i /= 2)
......@@ -245,7 +246,7 @@ gimp_scale_combo_box_changed (GimpScaleComboBox *combo_box)
gdouble scale;
gtk_tree_model_get (model, &iter,
SCALE, &scale,
COLUMN_SCALE, &scale,
-1);
if (scale > 0.0)
{
......@@ -378,9 +379,9 @@ gimp_scale_combo_box_scale_iter_set (GtkListStore *store,
"%.3g\342\200\211%%", 100.0 * scale);
gtk_list_store_set (store, iter,
SCALE, scale,
LABEL, label,
PERSISTENT, persistent,
COLUMN_SCALE, scale,
COLUMN_LABEL, label,
COLUMN_PERSISTENT, persistent,
-1);
}
......@@ -479,7 +480,7 @@ gimp_scale_combo_box_set_scale (GimpScaleComboBox *combo_box,
gdouble this;
gtk_tree_model_get (model, &iter,
SCALE, &this,
COLUMN_SCALE, &this,
-1);
if (fabs (this - scale) < 0.0001)
......@@ -497,7 +498,7 @@ gimp_scale_combo_box_set_scale (GimpScaleComboBox *combo_box,
gdouble this;
gtk_tree_model_get (model, &sibling,
SCALE, &this,
COLUMN_SCALE, &this,
-1);
if (this < scale)
......@@ -511,7 +512,7 @@ gimp_scale_combo_box_set_scale (GimpScaleComboBox *combo_box,
gtk_combo_box_set_active_iter (GTK_COMBO_BOX (combo_box), &iter);
gtk_tree_model_get (model, &iter,
PERSISTENT, &persistent,
COLUMN_PERSISTENT, &persistent,
-1);
if (! persistent)
{
......
......@@ -51,7 +51,7 @@ enum
COLUMN_NAME,
COLUMN_LABEL,
COLUMN_STOCK_ID,
NUM_COLUMNS
N_COLUMNS
};
......@@ -336,7 +336,7 @@ gimp_gegl_tool_dialog (GimpImageMapTool *image_map_tool)
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
store = gtk_list_store_new (NUM_COLUMNS,
store = gtk_list_store_new (N_COLUMNS,
G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
opclasses = gimp_get_geglopclasses ();
......@@ -354,7 +354,7 @@ gimp_gegl_tool_dialog (GimpImageMapTool *image_map_tool)
{
const gchar *stock_id;
const gchar *label;
if (g_str_has_prefix (opclass->name, "gegl:"))
{
label = opclass->name + strlen ("gegl:");
......
......@@ -43,7 +43,7 @@ enum
COLUMN_LEFT_NUMBER,
COLUMN_RIGHT_NUMBER,
COLUMN_TEXT,
NUM_COLUMNS
N_COLUMNS
};
......@@ -335,12 +335,12 @@ gimp_rectangle_options_get_private (GimpRectangleOptions *options)
{
private = g_slice_new0 (GimpRectangleOptionsPrivate);
private->aspect_history = gtk_list_store_new (NUM_COLUMNS,
private->aspect_history = gtk_list_store_new (N_COLUMNS,
G_TYPE_DOUBLE,
G_TYPE_DOUBLE,
G_TYPE_STRING);
private->size_history = gtk_list_store_new (NUM_COLUMNS,
private->size_history = gtk_list_store_new (N_COLUMNS,
G_TYPE_DOUBLE,
G_TYPE_DOUBLE,
G_TYPE_STRING);
......
......@@ -205,7 +205,7 @@ gimp_action_view_new (GimpUIManager *manager,
g_return_val_if_fail (GIMP_IS_UI_MANAGER (manager), NULL);
store = gtk_tree_store_new (GIMP_ACTION_VIEW_NUM_COLUMNS,
store = gtk_tree_store_new (GIMP_ACTION_VIEW_N_COLUMNS,
G_TYPE_BOOLEAN, /* COLUMN_VISIBLE */
GTK_TYPE_ACTION, /* COLUMN_ACTION */
G_TYPE_STRING, /* COLUMN_STOCK_ID */
......
......@@ -34,7 +34,7 @@ enum
GIMP_ACTION_VIEW_COLUMN_ACCEL_KEY,
GIMP_ACTION_VIEW_COLUMN_ACCEL_MASK,
GIMP_ACTION_VIEW_COLUMN_ACCEL_CLOSURE,
GIMP_ACTION_VIEW_NUM_COLUMNS
GIMP_ACTION_VIEW_N_COLUMNS
};
......
......@@ -49,7 +49,7 @@ enum
COLUMN_VISIBLE,
COLUMN_RENDERER,
COLUMN_NAME,
NUM_COLUMNS
N_COLUMNS
};
......@@ -122,7 +122,7 @@ gimp_component_editor_init (GimpComponentEditor *editor)
gtk_box_pack_start (GTK_BOX (editor), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
list = gtk_list_store_new (NUM_COLUMNS,
list = gtk_list_store_new (N_COLUMNS,
G_TYPE_INT,
G_TYPE_BOOLEAN,
GIMP_TYPE_VIEW_RENDERER,
......
......@@ -128,7 +128,7 @@ gimp_container_entry_init (GimpContainerEntry *entry)
"popup-set-width", FALSE,
NULL);
store = gtk_list_store_new (GIMP_CONTAINER_ENTRY_NUM_COLUMNS,
store = gtk_list_store_new (GIMP_CONTAINER_ENTRY_N_COLUMNS,
GIMP_TYPE_VIEW_RENDERER,
G_TYPE_STRING);
......
......@@ -27,7 +27,7 @@ enum
{
GIMP_CONTAINER_ENTRY_COLUMN_RENDERER,
GIMP_CONTAINER_ENTRY_COLUMN_NAME,
GIMP_CONTAINER_ENTRY_NUM_COLUMNS
GIMP_CONTAINER_ENTRY_N_COLUMNS
};
......
......@@ -59,7 +59,7 @@ enum
COLUMN_BLURB,
COLUMN_STOCK_ID,
COLUMN_ACTION,
NUM_COLUMNS
N_COLUMNS
};
......@@ -272,7 +272,7 @@ gimp_controller_editor_constructor (GType type,
g_free (property_specs);
store = gtk_list_store_new (NUM_COLUMNS,
store = gtk_list_store_new (N_COLUMNS,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_STRING,
......
......@@ -65,7 +65,7 @@ enum
COLUMN_ICON,
COLUMN_NAME,
COLUMN_TYPE,
NUM_COLUMNS
N_COLUMNS
};
......@@ -169,7 +169,7 @@ gimp_controller_list_init (GimpControllerList *list)
gtk_box_pack_start (GTK_BOX (hbox), sw, TRUE, TRUE, 0);
gtk_widget_show (sw);
list->src = gtk_list_store_new (NUM_COLUMNS,
list->src = gtk_list_store_new (N_COLUMNS,
G_TYPE_STRING,
G_TYPE_STRING,
G_TYPE_GTYPE);
......
......@@ -43,7 +43,7 @@ enum
COLUMN_LABEL,
COLUMN_EXTENSIONS,
COLUMN_HELP_ID,
NUM_COLUMNS
N_COLUMNS
};
enum
......@@ -120,7 +120,7 @@ gimp_file_proc_view_new (Gimp *gimp,
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
store = gtk_list_store_new (NUM_COLUMNS,
store = gtk_list_store_new (N_COLUMNS,
GIMP_TYPE_PLUG_IN_PROCEDURE, /* COLUMN_PROC */
G_TYPE_STRING, /* COLUMN_LABEL */
G_TYPE_STRING, /* COLUMN_EXTENSIONS */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment