Commit 7d065360 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

configure.in added new directory app/dialogs and link libappdialogs.c into

2004-09-13  Michael Natterer  <mitch@gimp.org>

	* configure.in
	* app/Makefile.am: added new directory app/dialogs and link
	libappdialogs.c into the gimp binary.

	* app/gui/Makefile.am
	* app/gui/gui-types.h
	* app/gui/gui-vtable.c
	* app/gui/gui.c

	* app/gui/about-dialog.[ch]
	* app/gui/authors.h
	* app/gui/color-notebook.[ch]
	* app/gui/convert-dialog.[ch]
	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs.[ch]
	* app/gui/file-dialog-utils.[ch]
	* app/gui/file-new-dialog.[ch]
	* app/gui/file-open-dialog.[ch]
	* app/gui/file-open-location-dialog.[ch]
	* app/gui/file-save-dialog.[ch]
	* app/gui/grid-dialog.[ch]
	* app/gui/info-dialog.[ch]
	* app/gui/info-window.[ch]
	* app/gui/module-browser.[ch]
	* app/gui/offset-dialog.[ch]
	* app/gui/palette-import-dialog.[ch]
	* app/gui/preferences-dialog.[ch]
	* app/gui/quit-dialog.[ch]
	* app/gui/resize-dialog.[ch]
	* app/gui/resolution-calibrate-dialog.[ch]
	* app/gui/stroke-dialog.[ch]
	* app/gui/tips-dialog.[ch]
	* app/gui/tips-parser.[ch]
	* app/gui/user-install-dialog.[ch]: removed these files...

	* app/dialogs/Makefile.am
	* app/dialogs/dialogs-types.h

	* app/dialogs/*.[ch]: ...and added them here. Changed some
	filenames like module-browser -> module-dialog.

	* app/app_procs.c
	* app/actions/actions-types.h
	* app/actions/actions.c
	* app/actions/dialogs-actions.c
	* app/actions/dialogs-commands.c
	* app/actions/dockable-commands.c
	* app/actions/drawable-commands.c
	* app/actions/edit-commands.c
	* app/actions/file-commands.c
	* app/actions/gradient-editor-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/select-commands.c
	* app/actions/templates-commands.c
	* app/actions/templates-commands.h
	* app/actions/vectors-commands.c
	* app/actions/view-commands.c
	* app/display/gimpdisplayshell-cursor.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpdisplayshell.[ch]
	* app/tools/gimpcroptool.c
	* app/tools/gimpperspectivetool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c
	* app/tools/gimptransformtool.[ch]
	* app/tools/gimpvectortool.c
	* app/widgets/gimpcolormapeditor.[ch]
	* app/widgets/gimpcolorpanel.c
	* app/widgets/gimpgradienteditor.[ch]
	* app/widgets/gimppaletteeditor.[ch]
	* app/widgets/gimptoolbox-color-area.c
	* menus/toolbox-menu.xml.in
	* tools/authorsgen/authorsgen.pl: changed accordingly.
parent 95da4fd6
Makefile
Makefile.in
.deps
.libs
*.lo
libappdialogs.la
## Process this file with automake to produce Makefile.in
noinst_LIBRARIES = libappdialogs.a
libappdialogs_a_SOURCES = \
dialogs-types.h \
dialogs.c \
dialogs.h \
dialogs-constructors.c \
dialogs-constructors.h \
\
about-dialog.c \
about-dialog.h \
color-dialog.c \
color-dialog.h \
convert-dialog.c \
convert-dialog.h \
file-dialog-utils.c \
file-dialog-utils.h \
file-open-dialog.c \
file-open-dialog.h \
file-open-location-dialog.c \
file-open-location-dialog.h \
file-save-dialog.c \
file-save-dialog.h \
grid-dialog.h \
grid-dialog.c \
image-new-dialog.c \
image-new-dialog.h \
info-dialog.c \
info-dialog.h \
info-window.c \
info-window.h \
module-dialog.c \
module-dialog.h \
offset-dialog.c \
offset-dialog.h \
palette-import-dialog.c \
palette-import-dialog.h \
preferences-dialog.c \
preferences-dialog.h \
quit-dialog.c \
quit-dialog.h \
resize-dialog.c \
resize-dialog.h \
resolution-calibrate-dialog.c \
resolution-calibrate-dialog.h \
stroke-dialog.c \
stroke-dialog.h \
tips-dialog.c \
tips-dialog.h \
tips-parser.c \
tips-parser.h \
user-install-dialog.c \
user-install-dialog.h
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gimp-Dialogs\" \
@GIMP_THREAD_FLAGS@ \
@GIMP_MP_FLAGS@
INCLUDES = \
-I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_builddir)/app \
-I$(top_srcdir)/app \
$(GTK_CFLAGS) \
-I$(includedir)
......@@ -28,7 +28,7 @@
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "gui-types.h"
#include "dialogs-types.h"
#include "core/gimptoolinfo.h"
......
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* color_notebook module (C) 1998 Austin Donnelly <austin@greenend.org.uk>
* color_dialog module (C) 1998 Austin Donnelly <austin@greenend.org.uk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -25,15 +25,16 @@
#include "libgimpcolor/gimpcolor.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "gui-types.h"
#include "dialogs-types.h"
#include "core/gimpviewable.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpviewabledialog.h"
#include "color-history.h"
#include "color-notebook.h"
#include "gui/color-history.h"
#include "color-dialog.h"
#include "gimp-intl.h"
......@@ -42,45 +43,45 @@
#define COLOR_AREA_SIZE 20
struct _ColorNotebook
struct _ColorDialog
{
GtkWidget *shell;
GtkWidget *selection;
GtkWidget *history[COLOR_HISTORY_SIZE];
ColorNotebookCallback callback;
ColorDialogCallback callback;
gpointer client_data;
gboolean wants_updates;
};
static void color_notebook_help_func (const gchar *help_id,
static void color_dialog_help_func (const gchar *help_id,
gpointer help_data);
static void color_notebook_response (GtkWidget *widget,
static void color_dialog_response (GtkWidget *widget,
gint response_id,
ColorNotebook *cnp);
ColorDialog *cnp);
static void color_notebook_color_changed (GimpColorSelection *selection,
ColorNotebook *cnp);
static void color_dialog_color_changed (GimpColorSelection *selection,
ColorDialog *cnp);
static void color_history_color_clicked (GtkWidget *widget,
ColorNotebook *cnp);
ColorDialog *cnp);
static void color_history_color_changed (GtkWidget *widget,
gpointer data);
static void color_history_add_clicked (GtkWidget *widget,
ColorNotebook *cnp);
ColorDialog *cnp);
static GList *color_notebooks = NULL;
static GList *color_dialogs = NULL;
/* public functions */
ColorNotebook *
color_notebook_new (GimpViewable *viewable,
ColorDialog *
color_dialog_new (GimpViewable *viewable,
const gchar *title,
const gchar *stock_id,
const gchar *desc,
......@@ -88,12 +89,12 @@ color_notebook_new (GimpViewable *viewable,
GimpDialogFactory *dialog_factory,
const gchar *dialog_identifier,
const GimpRGB *color,
ColorNotebookCallback callback,
ColorDialogCallback callback,
gpointer client_data,
gboolean wants_updates,
gboolean show_alpha)
{
ColorNotebook *cnp;
ColorDialog *cnp;
GtkWidget *table;
GtkWidget *button;
GtkWidget *arrow;
......@@ -108,7 +109,7 @@ color_notebook_new (GimpViewable *viewable,
NULL);
g_return_val_if_fail (color != NULL, NULL);
cnp = g_new0 (ColorNotebook, 1);
cnp = g_new0 (ColorDialog, 1);
cnp->callback = callback;
cnp->client_data = client_data;
......@@ -121,7 +122,7 @@ color_notebook_new (GimpViewable *viewable,
cnp->shell = gimp_viewable_dialog_new (viewable, title, role,
stock_id, desc,
parent,
color_notebook_help_func, NULL,
color_dialog_help_func, NULL,
NULL);
gtk_window_set_resizable (GTK_WINDOW (cnp->shell), FALSE);
......@@ -130,11 +131,11 @@ color_notebook_new (GimpViewable *viewable,
{
cnp->shell = gimp_dialog_new (title, role,
parent, 0,
color_notebook_help_func, NULL,
color_dialog_help_func, NULL,
NULL);
}
g_object_set_data (G_OBJECT (cnp->shell), "color-notebook", cnp);
g_object_set_data (G_OBJECT (cnp->shell), "color-dialog", cnp);
gtk_dialog_add_buttons (GTK_DIALOG (cnp->shell),
GIMP_STOCK_RESET, RESPONSE_RESET,
......@@ -144,7 +145,7 @@ color_notebook_new (GimpViewable *viewable,
gtk_dialog_set_default_response (GTK_DIALOG (cnp->shell), GTK_RESPONSE_OK);
g_signal_connect (cnp->shell, "response",
G_CALLBACK (color_notebook_response),
G_CALLBACK (color_dialog_response),
cnp);
g_object_add_weak_pointer (G_OBJECT (cnp->shell), (gpointer *) &cnp->shell);
......@@ -165,7 +166,7 @@ color_notebook_new (GimpViewable *viewable,
gtk_widget_show (cnp->selection);
g_signal_connect (cnp->selection, "color_changed",
G_CALLBACK (color_notebook_color_changed),
G_CALLBACK (color_dialog_color_changed),
cnp);
/* The color history */
......@@ -226,17 +227,17 @@ color_notebook_new (GimpViewable *viewable,
gtk_widget_show (cnp->shell);
color_notebooks = g_list_prepend (color_notebooks, cnp);
color_dialogs = g_list_prepend (color_dialogs, cnp);
return cnp;
}
void
color_notebook_free (ColorNotebook *cnp)
color_dialog_free (ColorDialog *cnp)
{
g_return_if_fail (cnp != NULL);
color_notebooks = g_list_remove (color_notebooks, cnp);
color_dialogs = g_list_remove (color_dialogs, cnp);
/* may be already destroyed by dialog factory */
if (cnp->shell)
......@@ -250,7 +251,7 @@ color_notebook_free (ColorNotebook *cnp)
}
void
color_notebook_set_viewable (ColorNotebook *cnb,
color_dialog_set_viewable (ColorDialog *cnb,
GimpViewable *viewable)
{
g_return_if_fail (cnb != NULL);
......@@ -261,7 +262,7 @@ color_notebook_set_viewable (ColorNotebook *cnb,
}
void
color_notebook_set_title (ColorNotebook *cnb,
color_dialog_set_title (ColorDialog *cnb,
const gchar *title)
{
g_return_if_fail (cnb != NULL);
......@@ -271,14 +272,14 @@ color_notebook_set_title (ColorNotebook *cnb,
}
void
color_notebook_set_color (ColorNotebook *cnp,
color_dialog_set_color (ColorDialog *cnp,
const GimpRGB *color)
{
g_return_if_fail (cnp != NULL);
g_return_if_fail (color != NULL);
g_signal_handlers_block_by_func (cnp->selection,
color_notebook_color_changed,
color_dialog_color_changed,
cnp);
gimp_color_selection_set_color (GIMP_COLOR_SELECTION (cnp->selection), color);
......@@ -286,12 +287,12 @@ color_notebook_set_color (ColorNotebook *cnp,
color);
g_signal_handlers_unblock_by_func (cnp->selection,
color_notebook_color_changed,
color_dialog_color_changed,
cnp);
}
void
color_notebook_get_color (ColorNotebook *cnp,
color_dialog_get_color (ColorDialog *cnp,
GimpRGB *color)
{
g_return_if_fail (cnp != NULL);
......@@ -301,7 +302,7 @@ color_notebook_get_color (ColorNotebook *cnp,
}
void
color_notebook_show (ColorNotebook *cnp)
color_dialog_show (ColorDialog *cnp)
{
g_return_if_fail (cnp != NULL);
......@@ -309,7 +310,7 @@ color_notebook_show (ColorNotebook *cnp)
}
void
color_notebook_hide (ColorNotebook *cnp)
color_dialog_hide (ColorDialog *cnp)
{
g_return_if_fail (cnp != NULL);
......@@ -320,10 +321,10 @@ color_notebook_hide (ColorNotebook *cnp)
/* private functions */
static void
color_notebook_help_func (const gchar *help_id,
color_dialog_help_func (const gchar *help_id,
gpointer help_data)
{
ColorNotebook *cnp;
ColorDialog *cnp;
GimpColorNotebook *notebook;
cnp = g_object_get_data (G_OBJECT (help_data), "color-notebook");
......@@ -337,9 +338,9 @@ color_notebook_help_func (const gchar *help_id,
}
static void
color_notebook_response (GtkWidget *widget,
color_dialog_response (GtkWidget *widget,
gint response_id,
ColorNotebook *cnp)
ColorDialog *cnp)
{
GimpRGB color;
......@@ -357,7 +358,7 @@ color_notebook_response (GtkWidget *widget,
if (cnp->callback)
cnp->callback (cnp, &color,
COLOR_NOTEBOOK_OK,
COLOR_DIALOG_OK,
cnp->client_data);
break;
......@@ -367,15 +368,15 @@ color_notebook_response (GtkWidget *widget,
if (cnp->callback)
cnp->callback (cnp, &color,
COLOR_NOTEBOOK_CANCEL,
COLOR_DIALOG_CANCEL,
cnp->client_data);
break;
}
}
static void
color_notebook_color_changed (GimpColorSelection *selection,
ColorNotebook *cnp)
color_dialog_color_changed (GimpColorSelection *selection,
ColorDialog *cnp)
{
GimpRGB color;
......@@ -384,7 +385,7 @@ color_notebook_color_changed (GimpColorSelection *selection,
if (cnp->wants_updates && cnp->callback)
cnp->callback (cnp,
&color,
COLOR_NOTEBOOK_UPDATE,
COLOR_DIALOG_UPDATE,
cnp->client_data);
}
......@@ -393,7 +394,7 @@ color_notebook_color_changed (GimpColorSelection *selection,
static void
color_history_color_clicked (GtkWidget *widget,
ColorNotebook *cnp)
ColorDialog *cnp)
{
GimpColorArea *color_area;
GimpRGB color;
......@@ -419,20 +420,20 @@ color_history_color_changed (GtkWidget *widget,
color_history_set (color_index, &changed_color);
for (list = color_notebooks; list; list = g_list_next (list))
for (list = color_dialogs; list; list = g_list_next (list))
{
ColorNotebook *notebook = list->data;
ColorDialog *dialog = list->data;
if (notebook->history[color_index] != widget)
if (dialog->history[color_index] != widget)
{
g_signal_handlers_block_by_func (notebook->history[color_index],
g_signal_handlers_block_by_func (dialog->history[color_index],
color_history_color_changed,
data);
gimp_color_area_set_color
(GIMP_COLOR_AREA (notebook->history[color_index]), &changed_color);
(GIMP_COLOR_AREA (dialog->history[color_index]), &changed_color);
g_signal_handlers_unblock_by_func (notebook->history[color_index],
g_signal_handlers_unblock_by_func (dialog->history[color_index],
color_history_color_changed,
data);
}
......@@ -441,7 +442,7 @@ color_history_color_changed (GtkWidget *widget,
static void
color_history_add_clicked (GtkWidget *widget,
ColorNotebook *cnp)
ColorDialog *cnp)
{
GimpRGB color;
gint shift_begin;
......
......@@ -16,25 +16,25 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __COLOR_NOTEBOOK_H__
#define __COLOR_NOTEBOOK_H__
#ifndef __COLOR_DIALOG_H__
#define __COLOR_DIALOG_H__
typedef enum
{
COLOR_NOTEBOOK_OK,
COLOR_NOTEBOOK_CANCEL,
COLOR_NOTEBOOK_UPDATE
} ColorNotebookState;
COLOR_DIALOG_OK,
COLOR_DIALOG_CANCEL,
COLOR_DIALOG_UPDATE
} ColorDialogState;
typedef void (* ColorNotebookCallback) (ColorNotebook *cnb,
typedef void (* ColorDialogCallback) (ColorDialog *cnb,
const GimpRGB *color,
ColorNotebookState state,
ColorDialogState state,
gpointer callback_data);
ColorNotebook * color_notebook_new (GimpViewable *viewable,
ColorDialog * color_dialog_new (GimpViewable *viewable,
const gchar *title,
const gchar *stock_id,
const gchar *desc,
......@@ -42,25 +42,25 @@ ColorNotebook * color_notebook_new (GimpViewable *viewable,
GimpDialogFactory *dialog_factory,
const gchar *dialog_identifier,
const GimpRGB *color,
ColorNotebookCallback callback,
ColorDialogCallback callback,
gpointer callback_data,
gboolean wants_update,
gboolean show_alpha);
void color_notebook_free (ColorNotebook *cnb);
void color_dialog_free (ColorDialog *cnb);
void color_notebook_set_viewable (ColorNotebook *cnb,
void color_dialog_set_viewable (ColorDialog *cnb,
GimpViewable *viewable);
void color_notebook_set_title (ColorNotebook *cnb,
void color_dialog_set_title (ColorDialog *cnb,
const gchar *title);
void color_notebook_show (ColorNotebook *cnb);
void color_notebook_hide (ColorNotebook *cnb);
void color_dialog_show (ColorDialog *cnb);
void color_dialog_hide (ColorDialog *cnb);
void color_notebook_set_color (ColorNotebook *cnb,
void color_dialog_set_color (ColorDialog *cnb,
const GimpRGB *color);
void color_notebook_get_color (ColorNotebook *cnb,
void color_dialog_get_color (ColorDialog *cnb,
GimpRGB *color);
#endif /* __COLOR_NOTEBOOK_H__ */
#endif /* __COLOR_DIALOG_H__ */
......@@ -22,7 +22,7 @@
#include "libgimpwidgets/gimpwidgets.h"
#include "gui-types.h"
#include "dialogs-types.h"
#include "core/gimp.h"
#include "core/gimpcontainer-filter.h"
......
......@@ -22,7 +22,7 @@
#include "libgimpwidgets/gimpwidgets.h"
#include "gui-types.h"
#include "dialogs-types.h"
#include "core/gimp.h"
#include "core/gimpchannel.h"
......@@ -80,9 +80,9 @@
#include "about-dialog.h"
#include "dialogs.h"
#include "dialogs-constructors.h"
#include "file-new-dialog.h"
#include "file-open-location-dialog.h"
#include "module-browser.h"
#include "image-new-dialog.h"
#include "module-dialog.h"
#include "preferences-dialog.h"
#include "tips-dialog.h"
......@@ -107,11 +107,11 @@ static void dialogs_indexed_palette_selected (GimpColormapEditor *editor,
/**********************/
GtkWidget *
dialogs_file_new_new (GimpDialogFactory *factory,
dialogs_image_new_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
return file_new_dialog_new (context->gimp);
return image_new_dialog_new (context->gimp);
}
GtkWidget *
......@@ -131,11 +131,11 @@ dialogs_preferences_get (GimpDialogFactory *factory,
}
GtkWidget *
dialogs_module_browser_get (GimpDialogFactory *factory,
dialogs_module_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size)
{
return module_browser_new (context->gimp);
return module_dialog_new (context->gimp);
}
GtkWidget *
......
......@@ -22,7 +22,7 @@
/* toplevel dialogs */
GtkWidget * dialogs_file_new_new (GimpDialogFactory *factory,
GtkWidget * dialogs_image_new_new (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size);
GtkWidget * dialogs_file_open_location_new (GimpDialogFactory *factory,
......@@ -31,7 +31,7 @@ GtkWidget * dialogs_file_open_location_new (GimpDialogFactory *factory,
GtkWidget * dialogs_preferences_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size);
GtkWidget * dialogs_module_browser_get (GimpDialogFactory *factory,
GtkWidget * dialogs_module_get (GimpDialogFactory *factory,
GimpContext *context,
gint preview_size);
GtkWidget * dialogs_tips_get (GimpDialogFactory *factory,
......
......@@ -16,12 +16,15 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __OFFSET_DIALOG_H__
#define __OFFSET_DIALOG_H__
#ifndef __DIALOGS_TYPES_H__
#define __DIALOGS_TYPES_H__
GtkWidget * offset_dialog_new (GimpDrawable *drawable,
GtkWidget *parent);
#include "display/display-types.h"
#endif /* __OFFSET_DIALOG_H__ */
typedef struct _ColorDialog ColorDialog;
typedef struct _InfoDialog InfoDialog;
#endif /* __DIALOGS_TYPES_H__ */
......@@ -20,7 +20,7 @@
#include <gtk/gtk.h>
#include "gui-types.h"
#include "dialogs-types.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
......@@ -90,7 +90,7 @@ static const GimpDialogFactoryEntry toplevel_entries[] =
NULL, 0, FALSE, TRUE, FALSE, FALSE },
/* ordinary toplevels */
{ "gimp-file-new-dialog", dialogs_file_new_new,
{ "gimp-image-new-dialog", dialogs_image_new_new,
0, FALSE, TRUE, FALSE, FALSE },
{ "gimp-file-open-location-dialog", dialogs_file_open_location_new,
0, FALSE, TRUE, FALSE, FALSE },
......@@ -98,7 +98,7 @@ static const GimpDialogFactoryEntry toplevel_entries[] =
/* singleton toplevels */
{ "gimp-preferences-dialog", dialogs_preferences_get,
0, TRUE, TRUE, FALSE, FALSE },
{ "gimp-module-manager-dialog", dialogs_module_browser_get,
{ "gimp-module-dialog", dialogs_module_get,
0, TRUE, TRUE, TRUE, FALSE },
{ "gimp-tips-dialog", dialogs_tips_get,
0, TRUE, FALSE, FALSE, FALSE },
......