gimp-gap r790 - in trunk: . gap
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp-gap r790 - in trunk: . gap
- Date: Fri, 31 Oct 2008 19:48:45 +0000 (UTC)
Author: neo
Date: Fri Oct 31 19:48:45 2008
New Revision: 790
URL: http://svn.gnome.org/viewvc/gimp-gap?rev=790&view=rev
Log:
2008-10-31 Sven Neumann <sven gimp org>
* gap/gap_dbbrowser_utils.c: removed redeclaration of
gimp_proc_view_new(). This function is in libgimp since GIMP
2.4.
Declaring it here breaks the build with GIMP 2.6.
Modified:
trunk/ChangeLog
trunk/gap/gap_dbbrowser_utils.c
Modified: trunk/gap/gap_dbbrowser_utils.c
==============================================================================
--- trunk/gap/gap_dbbrowser_utils.c (original)
+++ trunk/gap/gap_dbbrowser_utils.c Fri Oct 31 19:48:45 2008
@@ -114,11 +114,6 @@
/* local functions */
-static GtkWidget * gimp_proc_view_create_params (GimpParamDef *params,
- gint n_params,
- GtkSizeGroup *name_group,
- GtkSizeGroup *type_group,
- GtkSizeGroup *desc_group);
static const gchar * GParamType_to_string (GimpPDBArgType type);
static const gchar * GimpPDBProcType_to_string (GimpPDBProcType type);
@@ -150,243 +145,6 @@
const char *help_id
);
-
-/* ------------------------
- * gimp_proc_view_new
- * ------------------------
- * this procedure is a copy of gimp-2.1.7/plug-ins/dbbrowser/gimpprocbrowser.c
- */
-GtkWidget *
-gimp_proc_view_new (const gchar *name,
- const gchar *menu_path,
- const gchar *blurb,
- const gchar *help,
- const gchar *author,
- const gchar *copyright,
- const gchar *date,
- GimpPDBProcType type,
- gint n_params,
- gint n_return_vals,
- GimpParamDef *params,
- GimpParamDef *return_vals)
-{
- GtkWidget *main_vbox;
- GtkWidget *frame;
- GtkWidget *vbox;
- GtkWidget *table;
- GtkWidget *label;
- GtkSizeGroup *name_group;
- GtkSizeGroup *type_group;
- GtkSizeGroup *desc_group;
- gint row;
-
- if (blurb && strlen (blurb) < 2) blurb = NULL;
- if (help && strlen (help) < 2) help = NULL;
- if (author && strlen (author) < 2) author = NULL;
- if (date && strlen (date) < 2) date = NULL;
- if (copyright && strlen (copyright) < 2) copyright = NULL;
-
- if (blurb && help && ! strcmp (blurb, help))
- help = NULL;
-
- main_vbox = gtk_vbox_new (FALSE, 12);
-
- /* show the name */
-
- frame = gimp_frame_new (name);
- label = gtk_frame_get_label_widget (GTK_FRAME (frame));
- gtk_label_set_selectable (GTK_LABEL (label), TRUE);
- gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
- gtk_widget_show (frame);
-
- vbox = gtk_vbox_new (FALSE, 8);
- gtk_container_add (GTK_CONTAINER (frame), vbox);
- gtk_widget_show (vbox);
-
- label = gtk_label_new (GimpPDBProcType_to_string (type));
- gimp_label_set_attributes (GTK_LABEL (label),
- PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC,
- -1);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
- gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
- gtk_widget_show (label);
-
- if (menu_path)
- {
- label = gtk_label_new_with_mnemonic (menu_path);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_label_set_selectable (GTK_LABEL (label), TRUE);
- gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
- gtk_widget_show (label);
- }
-
- if (blurb)
- {
- label = gtk_label_new (blurb);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
- gtk_widget_show (label);
- }
-
- name_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- type_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- desc_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
-
- /* in parameters */
- if (n_params)
- {
- frame = gimp_frame_new (_("Parameters"));
- gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
- gtk_widget_show (frame);
-
- table = gimp_proc_view_create_params (params, n_params,
- name_group, type_group, desc_group);
- gtk_container_add (GTK_CONTAINER (frame), table);
- gtk_widget_show (table);
- }
-
- /* out parameters */
- if (n_return_vals)
- {
- frame = gimp_frame_new (_("Return Values"));
- gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
- gtk_widget_show (frame);
-
- table = gimp_proc_view_create_params (return_vals, n_return_vals,
- name_group, type_group, desc_group);
- gtk_container_add (GTK_CONTAINER (frame), table);
- gtk_widget_show (table);
- }
-
- if (! help && ! author && ! date && ! copyright)
- return main_vbox;
-
- frame = gimp_frame_new (_("Additional Information"));
- gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
- gtk_widget_show (frame);
-
- vbox = gtk_vbox_new (FALSE, 8);
- gtk_container_add (GTK_CONTAINER (frame), vbox);
- gtk_widget_show (vbox);
-
- /* show the help */
- if (help)
- {
- label = gtk_label_new (help);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
- gtk_widget_show (label);
- }
-
- /* show the author & the copyright */
-
- if (! author && ! date && ! copyright)
- return main_vbox;
-
- table = gtk_table_new ((author != 0) + (date != 0) + (copyright != 0), 2,
- FALSE);
- gtk_table_set_col_spacings (GTK_TABLE (table), 6);
- gtk_table_set_row_spacings (GTK_TABLE (table), 4);
- gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
- gtk_widget_show (table);
-
- row = 0;
-
- if (author)
- {
- label = gtk_label_new (author);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-
- gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
- _("Author:"), 0.0, 0.0,
- label, 3, FALSE);
- }
-
- if (date)
- {
- label = gtk_label_new (date);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-
- gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
- _("Date:"), 0.0, 0.0,
- label, 3, FALSE);
- }
-
- if (copyright)
- {
- label = gtk_label_new (copyright);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
-
- gimp_table_attach_aligned (GTK_TABLE (table), 0, row++,
- _("Copyright:"), 0.0, 0.0,
- label, 3, FALSE);
- }
-
- return main_vbox;
-} /* end gimp_proc_view_new */
-
-
-
-static GtkWidget *
-gimp_proc_view_create_params (GimpParamDef *params,
- gint n_params,
- GtkSizeGroup *name_group,
- GtkSizeGroup *type_group,
- GtkSizeGroup *desc_group)
-{
- GtkWidget *table;
- GtkWidget *label;
- const gchar *type;
- gint i;
-
- table = gtk_table_new (n_params, 3, FALSE);
- gtk_table_set_col_spacings (GTK_TABLE (table), 6);
- gtk_table_set_row_spacings (GTK_TABLE (table), 4);
-
- for (i = 0; i < n_params; i++)
- {
- /* name */
- label = gtk_label_new (params[i].name);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
- gtk_size_group_add_widget (name_group, label);
- gtk_table_attach (GTK_TABLE (table), label,
- 0, 1, i, i + 1, GTK_FILL, GTK_FILL, 0, 0);
- gtk_widget_show (label);
-
- /* type */
- type = GParamType_to_string (params[i].type);
- label = gtk_label_new (type);
- gimp_label_set_attributes (GTK_LABEL (label),
- PANGO_ATTR_FAMILY, "monospace",
- PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC,
- -1);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
- gtk_size_group_add_widget (type_group, label);
- gtk_table_attach (GTK_TABLE (table), label,
- 1, 2, i, i + 1, GTK_FILL, GTK_FILL, 0, 0);
- gtk_widget_show (label);
-
- /* description */
- label = gtk_label_new (params[i].description);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_size_group_add_widget (desc_group, label);
- gtk_table_attach (GTK_TABLE (table), label,
- 2, 3, i, i + 1, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
- gtk_widget_show (label);
- }
-
- return table;
-} /* end gimp_proc_view_create_params */
-
-
-
/* create and perform the dialog */
int
gap_db_browser_dialog(char *title_txt,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]