mirror of https://github.com/GNOME/gimp.git
app/Makefile.am removed.
2001-07-20 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/dialog_handler.[ch]: removed. * app/widgets/gimpdialogfactory.[ch]: added the missing features from the dialog_handler: idle/unidle all dialogs and the show_all -> hide_all -> show_toolbox -> show_all cycling (a bit ugly currently because the toolbox's factory and it's identifier has to be passed to gimp_dialog_factories_toggle()). * app/disp_callbacks.c * app/gui/gui.c: call the new dialog factory class methods. * app/devices.c * app/docindex.c * app/errorconsole.c * app/nav_window.c * app/undo_history.c * app/gui/info-dialog.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c: currently "unmanaged" because they are not yet registered with a dialog factory. * app/gui/menus.c: ditto for the tearoff menus. * app/gui/brush-select.c * app/gui/colormap-dialog.c * app/gui/gradient-select.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/tool-options-dialog.c * app/gui/toolbox.c: these are already factory created so toggling and (un)idling works like before. * app/widgets/gimpdock.c: reduced the minimal width from 280 to 250. * app/widgets/gimplayerlistview.c: use a toggle button instead of a check button for "Keep transp.".
This commit is contained in:
parent
35d7c14121
commit
6ce4799995
40
ChangeLog
40
ChangeLog
|
@ -1,3 +1,43 @@
|
|||
2001-07-20 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/Makefile.am
|
||||
* app/dialog_handler.[ch]: removed.
|
||||
|
||||
* app/widgets/gimpdialogfactory.[ch]: added the missing features
|
||||
from the dialog_handler: idle/unidle all dialogs and the show_all
|
||||
-> hide_all -> show_toolbox -> show_all cycling (a bit ugly
|
||||
currently because the toolbox's factory and it's identifier has to
|
||||
be passed to gimp_dialog_factories_toggle()).
|
||||
|
||||
* app/disp_callbacks.c
|
||||
* app/gui/gui.c: call the new dialog factory class methods.
|
||||
|
||||
* app/devices.c
|
||||
* app/docindex.c
|
||||
* app/errorconsole.c
|
||||
* app/nav_window.c
|
||||
* app/undo_history.c
|
||||
* app/gui/info-dialog.c
|
||||
* app/gui/file-open-dialog.c
|
||||
* app/gui/file-save-dialog.c: currently "unmanaged" because they
|
||||
are not yet registered with a dialog factory.
|
||||
|
||||
* app/gui/menus.c: ditto for the tearoff menus.
|
||||
|
||||
* app/gui/brush-select.c
|
||||
* app/gui/colormap-dialog.c
|
||||
* app/gui/gradient-select.c
|
||||
* app/gui/palette-select.c
|
||||
* app/gui/pattern-select.c
|
||||
* app/gui/tool-options-dialog.c
|
||||
* app/gui/toolbox.c: these are already factory created so toggling
|
||||
and (un)idling works like before.
|
||||
|
||||
* app/widgets/gimpdock.c: reduced the minimal width from 280 to 250.
|
||||
|
||||
* app/widgets/gimplayerlistview.c: use a toggle button instead of
|
||||
a check button for "Keep transp.".
|
||||
|
||||
2001-07-19 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* configure.in: ran autoupdate on this file
|
||||
|
|
|
@ -14,8 +14,6 @@ gimp_SOURCES = @STRIP_BEGIN@ \
|
|||
colormaps.h \
|
||||
devices.c \
|
||||
devices.h \
|
||||
dialog_handler.c \
|
||||
dialog_handler.h \
|
||||
docindex.c \
|
||||
docindex.h \
|
||||
errorconsole.c \
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "devices.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -220,9 +219,6 @@ input_dialog_create (void)
|
|||
|
||||
inputd = gtk_input_dialog_new ();
|
||||
|
||||
/* register this one only */
|
||||
dialog_register (inputd);
|
||||
|
||||
gtk_container_set_border_width
|
||||
(GTK_CONTAINER (GTK_DIALOG (inputd)->action_area), 2);
|
||||
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (inputd)->action_area),
|
||||
|
@ -761,8 +757,6 @@ device_status_create (void)
|
|||
|
||||
NULL);
|
||||
|
||||
dialog_register (deviceD->shell);
|
||||
|
||||
deviceD->num_devices = 0;
|
||||
|
||||
for (list = device_info_list; list; list = g_list_next (list))
|
||||
|
|
|
@ -1,374 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
* Copyright (C) 1999 Andy Thomas (alt@picnic.demon.co.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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#define __DIALOG_HANDLER_C__ 1
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include <gmodule.h>
|
||||
|
||||
#include "widgets/widgets-types.h"
|
||||
|
||||
#include "widgets/gimpcursor.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
|
||||
|
||||
/* State of individual dialogs */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
VISIBILITY_INVISIBLE,
|
||||
VISIBILITY_VISIBLE,
|
||||
VISIBILITY_UNKNOWN
|
||||
} VisibilityState;
|
||||
|
||||
typedef struct _DialogState DialogState;
|
||||
|
||||
struct _DialogState
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
VisibilityState saved_state;
|
||||
};
|
||||
|
||||
/* This keeps track of the state the dialogs are in
|
||||
* ie how many times we have pressed the tab key
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SHOW_ALL,
|
||||
HIDE_ALL,
|
||||
SHOW_TOOLBOX,
|
||||
LAST_SHOW_STATE
|
||||
} ShowState;
|
||||
|
||||
/* Start off with all dialogs showing */
|
||||
static ShowState dialogs_showing = SHOW_ALL;
|
||||
|
||||
/* Prevent multiple keypresses from unsetting me. */
|
||||
static gboolean doing_update = FALSE;
|
||||
|
||||
/* List of dialogs that have been created and are on screen
|
||||
* (may be hidden already).
|
||||
*/
|
||||
static GSList * active_dialogs = NULL;
|
||||
|
||||
/* Used as a placeholder when a member of active_dialogs is removed due to
|
||||
* a detected error.
|
||||
*/
|
||||
static GSList error_tmp_list = { NULL, NULL };
|
||||
|
||||
/* Those have a special behaviour */
|
||||
static DialogState * toolbox_shell = NULL;
|
||||
static DialogState * fileload_shell = NULL;
|
||||
|
||||
/* Private */
|
||||
|
||||
/* Hide all currently registered dialogs */
|
||||
|
||||
static void
|
||||
dialog_hide_all (void)
|
||||
{
|
||||
DialogState *dstate;
|
||||
GSList *list;
|
||||
|
||||
for (list = active_dialogs; list; list = g_slist_next (list))
|
||||
{
|
||||
dstate = (DialogState *) list->data;
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (dstate->dialog))
|
||||
{
|
||||
dstate->saved_state = VISIBILITY_VISIBLE;
|
||||
gtk_widget_hide (dstate->dialog);
|
||||
}
|
||||
else
|
||||
{
|
||||
dstate->saved_state = VISIBILITY_INVISIBLE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Show all currently registered dialogs */
|
||||
|
||||
static void
|
||||
dialog_show_all (void)
|
||||
{
|
||||
DialogState *dstate;
|
||||
GSList *list;
|
||||
|
||||
for (list = active_dialogs; list; list = g_slist_next (list))
|
||||
{
|
||||
dstate = (DialogState *) list->data;
|
||||
|
||||
if (dstate->saved_state == VISIBILITY_VISIBLE &&
|
||||
!GTK_WIDGET_VISIBLE (dstate->dialog))
|
||||
gtk_widget_show(dstate->dialog);
|
||||
}
|
||||
}
|
||||
|
||||
/* Handle the tool box in a special way */
|
||||
|
||||
static void
|
||||
dialog_hide_toolbox (void)
|
||||
{
|
||||
if (toolbox_shell && GTK_WIDGET_VISIBLE (toolbox_shell->dialog))
|
||||
{
|
||||
gtk_widget_hide (toolbox_shell->dialog);
|
||||
toolbox_shell->saved_state = VISIBILITY_VISIBLE;
|
||||
}
|
||||
}
|
||||
|
||||
/* public */
|
||||
|
||||
void
|
||||
dialog_show_toolbox (void)
|
||||
{
|
||||
if (toolbox_shell &&
|
||||
toolbox_shell->saved_state == VISIBILITY_VISIBLE &&
|
||||
!GTK_WIDGET_VISIBLE (toolbox_shell->dialog))
|
||||
{
|
||||
gtk_widget_show (toolbox_shell->dialog);
|
||||
}
|
||||
}
|
||||
|
||||
/* Set hourglass cursor on all currently registered dialogs */
|
||||
|
||||
void
|
||||
dialog_idle_all (void)
|
||||
{
|
||||
DialogState *dstate;
|
||||
GSList *list;
|
||||
|
||||
for (list = active_dialogs; list; list = g_slist_next (list))
|
||||
{
|
||||
dstate = (DialogState *) list->data;
|
||||
|
||||
if(!GTK_IS_WIDGET (dstate->dialog) ||
|
||||
(GTK_WIDGET_VISIBLE (dstate->dialog) && !dstate->dialog->window))
|
||||
{
|
||||
g_warning("%s discovered non-widget thing %p in list of "
|
||||
"active_dialogs. Calling dialog_unregister on it.\n",
|
||||
G_GNUC_PRETTY_FUNCTION, dstate->dialog);
|
||||
|
||||
error_tmp_list.next=list->next;
|
||||
list=&error_tmp_list;
|
||||
dialog_unregister (dstate->dialog);
|
||||
}
|
||||
else if(GTK_WIDGET_VISIBLE (dstate->dialog))
|
||||
{
|
||||
GdkCursor *cursor;
|
||||
|
||||
cursor = gimp_cursor_new (GDK_WATCH,
|
||||
GIMP_TOOL_CURSOR_NONE,
|
||||
GIMP_CURSOR_MODIFIER_NONE);
|
||||
gdk_window_set_cursor (dstate->dialog->window, cursor);
|
||||
gdk_cursor_destroy (cursor);
|
||||
}
|
||||
}
|
||||
|
||||
if (toolbox_shell && GTK_WIDGET_VISIBLE (toolbox_shell->dialog))
|
||||
{
|
||||
GdkCursor *cursor;
|
||||
|
||||
cursor = gimp_cursor_new (GDK_WATCH,
|
||||
GIMP_TOOL_CURSOR_NONE,
|
||||
GIMP_CURSOR_MODIFIER_NONE);
|
||||
gdk_window_set_cursor (toolbox_shell->dialog->window, cursor);
|
||||
gdk_cursor_destroy (cursor);
|
||||
}
|
||||
|
||||
if (fileload_shell && GTK_WIDGET_VISIBLE (fileload_shell->dialog))
|
||||
{
|
||||
GdkCursor *cursor;
|
||||
|
||||
cursor = gimp_cursor_new (GDK_WATCH,
|
||||
GIMP_TOOL_CURSOR_NONE,
|
||||
GIMP_CURSOR_MODIFIER_NONE);
|
||||
gdk_window_set_cursor (fileload_shell->dialog->window, cursor);
|
||||
gdk_cursor_destroy (cursor);
|
||||
}
|
||||
}
|
||||
|
||||
/* And remove the hourglass again. */
|
||||
|
||||
void
|
||||
dialog_unidle_all (void)
|
||||
{
|
||||
DialogState *dstate;
|
||||
GSList *list;
|
||||
|
||||
for (list = active_dialogs; list; list = g_slist_next (list))
|
||||
{
|
||||
dstate = (DialogState *) list->data;
|
||||
|
||||
if(!GTK_IS_WIDGET(dstate->dialog) ||
|
||||
(GTK_WIDGET_VISIBLE (dstate->dialog) && !dstate->dialog->window))
|
||||
{
|
||||
g_warning("%s discovered non-widget thing %p in list of "
|
||||
"active_dialogs. Calling dialog_unregister on it.\n",
|
||||
G_GNUC_PRETTY_FUNCTION, dstate->dialog);
|
||||
|
||||
error_tmp_list.next=list->next;
|
||||
list=&error_tmp_list;
|
||||
dialog_unregister(dstate->dialog);
|
||||
}
|
||||
else if (GTK_WIDGET_VISIBLE (dstate->dialog))
|
||||
{
|
||||
gdk_window_set_cursor (dstate->dialog->window, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (toolbox_shell && GTK_WIDGET_VISIBLE (toolbox_shell->dialog))
|
||||
{
|
||||
gdk_window_set_cursor (toolbox_shell->dialog->window, NULL);
|
||||
}
|
||||
|
||||
if (fileload_shell && GTK_WIDGET_VISIBLE (fileload_shell->dialog))
|
||||
{
|
||||
gdk_window_set_cursor (fileload_shell->dialog->window, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* Register a dialog that we can handle */
|
||||
|
||||
G_MODULE_EXPORT
|
||||
void
|
||||
dialog_register (GtkWidget *dialog)
|
||||
{
|
||||
DialogState *dstate;
|
||||
|
||||
dstate = g_new (DialogState, 1);
|
||||
|
||||
dstate->dialog = dialog;
|
||||
dstate->saved_state = VISIBILITY_UNKNOWN;
|
||||
|
||||
active_dialogs = g_slist_append (active_dialogs, dstate);
|
||||
}
|
||||
|
||||
void
|
||||
dialog_register_toolbox (GtkWidget *dialog)
|
||||
{
|
||||
toolbox_shell = g_new (DialogState, 1);
|
||||
|
||||
toolbox_shell->dialog = dialog;
|
||||
toolbox_shell->saved_state = VISIBILITY_UNKNOWN;
|
||||
}
|
||||
|
||||
void
|
||||
dialog_register_fileload (GtkWidget *dialog)
|
||||
{
|
||||
fileload_shell = g_new (DialogState, 1);
|
||||
|
||||
fileload_shell->dialog = dialog;
|
||||
fileload_shell->saved_state = VISIBILITY_UNKNOWN;
|
||||
}
|
||||
|
||||
/* unregister dialog */
|
||||
|
||||
G_MODULE_EXPORT
|
||||
void
|
||||
dialog_unregister (GtkWidget *dialog)
|
||||
{
|
||||
DialogState *dstate = NULL;
|
||||
GSList *list;
|
||||
|
||||
for (list = active_dialogs; list; list = g_slist_next (list))
|
||||
{
|
||||
dstate = (DialogState *) list->data;
|
||||
|
||||
if (dstate->dialog == dialog)
|
||||
break;
|
||||
}
|
||||
|
||||
if (dstate != NULL)
|
||||
{
|
||||
active_dialogs = g_slist_remove (active_dialogs, dstate);
|
||||
g_free (dstate);
|
||||
}
|
||||
}
|
||||
|
||||
/* Toggle showing of dialogs
|
||||
*
|
||||
* States:-
|
||||
* SHOW_ALL -> HIDE_ALL -> SHOW_TOOLBOX -> SHOW_ALL ....
|
||||
*/
|
||||
|
||||
void
|
||||
dialog_toggle (void)
|
||||
{
|
||||
GSList *list;
|
||||
|
||||
if (doing_update)
|
||||
return;
|
||||
|
||||
doing_update = TRUE;
|
||||
|
||||
/* Paranoid error checking on our active_dialogs list, because
|
||||
3rd party modules access this list through dialog_register
|
||||
and we don't want them wreaking havoc on our internal state.
|
||||
Attempts to recover gracefully, but *is not bulletproof* since
|
||||
GTK_IS_WIDGET *may* succeed, even if it's pointing to garbage,
|
||||
if the garbage looks a little like a widget structure. */
|
||||
for (list = active_dialogs; list; list = g_slist_next (list))
|
||||
{
|
||||
DialogState* dstate = (DialogState *) list->data;
|
||||
|
||||
if(!GTK_IS_WIDGET(dstate->dialog))
|
||||
{
|
||||
g_warning("%s discovered non-widget thing %p in list of "
|
||||
"active_dialogs. Calling dialog_unregister on it.\n",
|
||||
G_GNUC_PRETTY_FUNCTION, dstate->dialog);
|
||||
|
||||
/* We must find the next list element before the current one
|
||||
is destroyed by the call to unregister. */
|
||||
error_tmp_list.next=list->next;
|
||||
list=&error_tmp_list;
|
||||
dialog_unregister(dstate->dialog);
|
||||
}
|
||||
}
|
||||
|
||||
switch (dialogs_showing)
|
||||
{
|
||||
case SHOW_ALL:
|
||||
dialogs_showing = HIDE_ALL;
|
||||
dialog_hide_all ();
|
||||
dialog_hide_toolbox ();
|
||||
break;
|
||||
case HIDE_ALL:
|
||||
dialogs_showing = SHOW_TOOLBOX;
|
||||
dialog_show_toolbox ();
|
||||
break;
|
||||
case SHOW_TOOLBOX:
|
||||
dialogs_showing = SHOW_ALL;
|
||||
dialog_show_all ();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
gdk_flush ();
|
||||
while (gtk_events_pending ())
|
||||
{
|
||||
gtk_main_iteration ();
|
||||
gdk_flush ();
|
||||
}
|
||||
|
||||
doing_update = FALSE;
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
/* The GIMP -- an image manipulation program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
* Copyright (C) 1999 Andy Thomas
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __DIALOG_HANDLER_H__
|
||||
#define __DIALOG_HANDLER_H__
|
||||
|
||||
#include <gmodule.h>
|
||||
G_MODULE_EXPORT
|
||||
void dialog_register (GtkWidget *dialog);
|
||||
G_MODULE_EXPORT
|
||||
void dialog_unregister (GtkWidget *dialog);
|
||||
|
||||
void dialog_register_toolbox (GtkWidget *dialog);
|
||||
void dialog_register_fileload (GtkWidget *dialog);
|
||||
|
||||
void dialog_toggle (void);
|
||||
void dialog_idle_all (void);
|
||||
void dialog_unidle_all (void);
|
||||
void dialog_show_toolbox (void);
|
||||
|
||||
|
||||
#endif /* __DIALOG_HANDLER_H__ */
|
|
@ -52,7 +52,6 @@
|
|||
#include "menus.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "docindex.h"
|
||||
#include "file-open.h"
|
||||
#include "file-utils.h"
|
||||
|
@ -213,8 +212,6 @@ file_open_dialog_create (void)
|
|||
gtk_container_set_border_width
|
||||
(GTK_CONTAINER (GTK_FILE_SELECTION (fileload)->button_area), 2);
|
||||
|
||||
dialog_register_fileload (fileload);
|
||||
|
||||
gtk_signal_connect_object
|
||||
(GTK_OBJECT (GTK_FILE_SELECTION (fileload)->cancel_button), "clicked",
|
||||
GTK_SIGNAL_FUNC (file_dialog_hide),
|
||||
|
|
|
@ -37,13 +37,12 @@
|
|||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
#include "docindex.h"
|
||||
#include "file-dialog-utils.h"
|
||||
#include "file-save-dialog.h"
|
||||
#include "menus.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "docindex.h"
|
||||
#include "gimprc.h"
|
||||
#include "file-save.h"
|
||||
#include "file-utils.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "core/core-types.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
#include "info-dialog.h"
|
||||
|
||||
#include "gimprc.h"
|
||||
|
@ -180,8 +179,6 @@ info_dialog_new_extended (gchar *title,
|
|||
gtk_window_set_wmclass (GTK_WINDOW (shell), "info_dialog", "Gimp");
|
||||
gtk_window_set_title (GTK_WINDOW (shell), title);
|
||||
|
||||
dialog_register (shell);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (shell), "delete_event",
|
||||
GTK_SIGNAL_FUNC (info_dialog_delete_callback),
|
||||
idialog);
|
||||
|
@ -256,8 +253,6 @@ info_dialog_free (InfoDialog *idialog)
|
|||
/* Free the actual field linked list */
|
||||
g_slist_free (idialog->field_list);
|
||||
|
||||
dialog_unregister (idialog->shell);
|
||||
|
||||
/* Destroy the associated widgets */
|
||||
gtk_widget_destroy (idialog->shell);
|
||||
|
||||
|
|
|
@ -48,13 +48,14 @@
|
|||
#include "tools/gimpmovetool.h"
|
||||
#include "tools/tool_manager.h"
|
||||
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "gui/dialogs.h"
|
||||
#include "gui/info-window.h"
|
||||
#include "gui/layer-select.h"
|
||||
|
||||
#include "devices.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "disp_callbacks.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gimprc.h"
|
||||
|
@ -585,7 +586,8 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
|
||||
/* Hide or show all dialogs */
|
||||
if (! kevent->state)
|
||||
dialog_toggle ();
|
||||
gimp_dialog_factories_toggle (global_dialog_factory,
|
||||
"gimp:toolbox");
|
||||
|
||||
return_val = TRUE;
|
||||
break;
|
||||
|
|
|
@ -48,13 +48,14 @@
|
|||
#include "tools/gimpmovetool.h"
|
||||
#include "tools/tool_manager.h"
|
||||
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "gui/dialogs.h"
|
||||
#include "gui/info-window.h"
|
||||
#include "gui/layer-select.h"
|
||||
|
||||
#include "devices.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "disp_callbacks.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gimprc.h"
|
||||
|
@ -585,7 +586,8 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
|
||||
/* Hide or show all dialogs */
|
||||
if (! kevent->state)
|
||||
dialog_toggle ();
|
||||
gimp_dialog_factories_toggle (global_dialog_factory,
|
||||
"gimp:toolbox");
|
||||
|
||||
return_val = TRUE;
|
||||
break;
|
||||
|
|
|
@ -48,13 +48,14 @@
|
|||
#include "tools/gimpmovetool.h"
|
||||
#include "tools/tool_manager.h"
|
||||
|
||||
#include "widgets/gimpdialogfactory.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "gui/dialogs.h"
|
||||
#include "gui/info-window.h"
|
||||
#include "gui/layer-select.h"
|
||||
|
||||
#include "devices.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "disp_callbacks.h"
|
||||
#include "gdisplay.h"
|
||||
#include "gimprc.h"
|
||||
|
@ -585,7 +586,8 @@ gdisplay_canvas_events (GtkWidget *canvas,
|
|||
|
||||
/* Hide or show all dialogs */
|
||||
if (! kevent->state)
|
||||
dialog_toggle ();
|
||||
gimp_dialog_factories_toggle (global_dialog_factory,
|
||||
"gimp:toolbox");
|
||||
|
||||
return_val = TRUE;
|
||||
break;
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "widgets/gimpnavigationpreview.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "gdisplay.h"
|
||||
#include "nav_window.h"
|
||||
|
||||
|
@ -211,11 +210,6 @@ nav_dialog_create (GDisplay *gdisp)
|
|||
|
||||
gtk_widget_hide (GTK_DIALOG (nav_dialog->shell)->action_area);
|
||||
|
||||
dialog_register (nav_dialog->shell);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (nav_dialog->shell), "destroy",
|
||||
GTK_SIGNAL_FUNC (dialog_unregister),
|
||||
nav_dialog);
|
||||
gtk_signal_connect_object (GTK_OBJECT (nav_dialog->shell), "destroy",
|
||||
GTK_SIGNAL_FUNC (g_free),
|
||||
(GtkObject *) nav_dialog);
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "widgets/gimpnavigationpreview.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "gdisplay.h"
|
||||
#include "nav_window.h"
|
||||
|
||||
|
@ -211,11 +210,6 @@ nav_dialog_create (GDisplay *gdisp)
|
|||
|
||||
gtk_widget_hide (GTK_DIALOG (nav_dialog->shell)->action_area);
|
||||
|
||||
dialog_register (nav_dialog->shell);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (nav_dialog->shell), "destroy",
|
||||
GTK_SIGNAL_FUNC (dialog_unregister),
|
||||
nav_dialog);
|
||||
gtk_signal_connect_object (GTK_OBJECT (nav_dialog->shell), "destroy",
|
||||
GTK_SIGNAL_FUNC (g_free),
|
||||
(GtkObject *) nav_dialog);
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "gui/file-commands.h"
|
||||
#include "gui/file-open-dialog.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
#include "docindex.h"
|
||||
#include "gdisplay.h"
|
||||
#include "ops_buttons.h"
|
||||
|
@ -732,7 +731,6 @@ idea_hide_callback (GtkWidget *widget,
|
|||
if (ideas)
|
||||
{
|
||||
create_idea_list ();
|
||||
dialog_unregister (ideas->window);
|
||||
|
||||
gtk_widget_destroy (ideas->window);
|
||||
g_free (ideas);
|
||||
|
@ -796,8 +794,6 @@ open_idea_window (void)
|
|||
|
||||
gimp_dnd_file_dest_set (ideas->window, gimp_dnd_open_files, NULL);
|
||||
|
||||
dialog_register (ideas->window);
|
||||
|
||||
main_vbox = gtk_vbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 4);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (ideas->window)->vbox),
|
||||
|
|
|
@ -53,8 +53,6 @@
|
|||
|
||||
#include "apptypes.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
|
||||
#include "appenv.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -292,8 +290,6 @@ error_console_create (void)
|
|||
text, NULL, NULL, TRUE, TRUE,
|
||||
|
||||
NULL);
|
||||
/* register this one only */
|
||||
dialog_register (error_console);
|
||||
|
||||
/* The next line should disappear when setting the size works in SM */
|
||||
gtk_widget_set_usize (error_console, 250, 300);
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
|
||||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -158,8 +157,6 @@ brush_select_new (gchar *title,
|
|||
else
|
||||
{
|
||||
bsp->context = gimp_get_user_context (the_gimp);
|
||||
|
||||
dialog_register (bsp->shell);
|
||||
}
|
||||
|
||||
if (no_data && first_call)
|
||||
|
|
|
@ -37,13 +37,12 @@
|
|||
#include "widgets/gimpdnd.h"
|
||||
|
||||
#include "color-notebook.h"
|
||||
#include "image_render.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "colormap-dialog.h"
|
||||
#include "color-area.h"
|
||||
#include "gdisplay.h"
|
||||
|
||||
#include "colormaps.h"
|
||||
#include "image_render.h"
|
||||
#include "gdisplay.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "devices.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -220,9 +219,6 @@ input_dialog_create (void)
|
|||
|
||||
inputd = gtk_input_dialog_new ();
|
||||
|
||||
/* register this one only */
|
||||
dialog_register (inputd);
|
||||
|
||||
gtk_container_set_border_width
|
||||
(GTK_CONTAINER (GTK_DIALOG (inputd)->action_area), 2);
|
||||
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (inputd)->action_area),
|
||||
|
@ -761,8 +757,6 @@ device_status_create (void)
|
|||
|
||||
NULL);
|
||||
|
||||
dialog_register (deviceD->shell);
|
||||
|
||||
deviceD->num_devices = 0;
|
||||
|
||||
for (list = device_info_list; list; list = g_list_next (list))
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
#include "menus.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "docindex.h"
|
||||
#include "file-open.h"
|
||||
#include "file-utils.h"
|
||||
|
@ -213,8 +212,6 @@ file_open_dialog_create (void)
|
|||
gtk_container_set_border_width
|
||||
(GTK_CONTAINER (GTK_FILE_SELECTION (fileload)->button_area), 2);
|
||||
|
||||
dialog_register_fileload (fileload);
|
||||
|
||||
gtk_signal_connect_object
|
||||
(GTK_OBJECT (GTK_FILE_SELECTION (fileload)->cancel_button), "clicked",
|
||||
GTK_SIGNAL_FUNC (file_dialog_hide),
|
||||
|
|
|
@ -37,13 +37,12 @@
|
|||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
#include "docindex.h"
|
||||
#include "file-dialog-utils.h"
|
||||
#include "file-save-dialog.h"
|
||||
#include "menus.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "docindex.h"
|
||||
#include "gimprc.h"
|
||||
#include "file-save.h"
|
||||
#include "file-utils.h"
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
|
||||
#include "widgets/gimpdatafactoryview.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
#include "dialogs-constructors.h"
|
||||
#include "gradient-select.h"
|
||||
|
||||
|
@ -124,8 +123,6 @@ gradient_select_new (gchar *title,
|
|||
else
|
||||
{
|
||||
gsp->context = gimp_get_user_context (the_gimp);
|
||||
|
||||
dialog_register (gsp->shell);
|
||||
}
|
||||
|
||||
if (no_data && first_call)
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
|
||||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "gdisplay.h" /* for gdisplay_*_override_cursor() */
|
||||
#include "gdisplay_ops.h" /* for gdisplay_xserver_resolution() */
|
||||
#include "gimprc.h"
|
||||
|
@ -350,7 +349,7 @@ gui_set_busy (Gimp *gimp)
|
|||
}
|
||||
|
||||
/* Dialogs */
|
||||
dialog_idle_all ();
|
||||
gimp_dialog_factories_idle ();
|
||||
|
||||
gdk_flush ();
|
||||
}
|
||||
|
@ -369,7 +368,7 @@ gui_unset_busy (Gimp *gimp)
|
|||
}
|
||||
|
||||
/* Dialogs */
|
||||
dialog_unidle_all ();
|
||||
gimp_dialog_factories_unidle ();
|
||||
}
|
||||
|
||||
static gint
|
||||
|
@ -462,7 +461,7 @@ gui_image_destroy (GimpImage *gimage,
|
|||
/* check if this is the last image */
|
||||
if (gimp_container_num_children (gimp->images) == 1)
|
||||
{
|
||||
dialog_show_toolbox ();
|
||||
gimp_dialog_factory_dialog_raise (global_dialog_factory, "gimp:toolbox");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "core/core-types.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
#include "info-dialog.h"
|
||||
|
||||
#include "gimprc.h"
|
||||
|
@ -180,8 +179,6 @@ info_dialog_new_extended (gchar *title,
|
|||
gtk_window_set_wmclass (GTK_WINDOW (shell), "info_dialog", "Gimp");
|
||||
gtk_window_set_title (GTK_WINDOW (shell), title);
|
||||
|
||||
dialog_register (shell);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (shell), "delete_event",
|
||||
GTK_SIGNAL_FUNC (info_dialog_delete_callback),
|
||||
idialog);
|
||||
|
@ -256,8 +253,6 @@ info_dialog_free (InfoDialog *idialog)
|
|||
/* Free the actual field linked list */
|
||||
g_slist_free (idialog->field_list);
|
||||
|
||||
dialog_unregister (idialog->shell);
|
||||
|
||||
/* Destroy the associated widgets */
|
||||
gtk_widget_destroy (idialog->shell);
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "devices.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -220,9 +219,6 @@ input_dialog_create (void)
|
|||
|
||||
inputd = gtk_input_dialog_new ();
|
||||
|
||||
/* register this one only */
|
||||
dialog_register (inputd);
|
||||
|
||||
gtk_container_set_border_width
|
||||
(GTK_CONTAINER (GTK_DIALOG (inputd)->action_area), 2);
|
||||
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (inputd)->action_area),
|
||||
|
@ -761,8 +757,6 @@ device_status_create (void)
|
|||
|
||||
NULL);
|
||||
|
||||
dialog_register (deviceD->shell);
|
||||
|
||||
deviceD->num_devices = 0;
|
||||
|
||||
for (list = device_info_list; list; list = g_list_next (list))
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#include "channels-commands.h"
|
||||
#include "commands.h"
|
||||
#include "data-commands.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "dialogs-commands.h"
|
||||
#include "edit-commands.h"
|
||||
#include "file-commands.h"
|
||||
|
@ -97,9 +96,6 @@ static gchar * menus_menu_translate_func (const gchar *path,
|
|||
static void menus_tearoff_cmd_callback (GtkWidget *widget,
|
||||
gpointer data,
|
||||
guint action);
|
||||
static gint menus_tearoff_delete_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data);
|
||||
|
||||
#ifdef ENABLE_DEBUG_ENTRY
|
||||
static void menus_debug_recurse_menu (GtkWidget *menu,
|
||||
|
@ -290,7 +286,7 @@ static GimpItemFactoryEntry toolbox_entries[] =
|
|||
"gimp:about-dialog",
|
||||
"help/dialogs/about.html", NULL },
|
||||
#ifdef ENABLE_DEBUG_ENTRY
|
||||
{ { N_("/Help/Dump Items (Debug)"), NULL,
|
||||
{ { "/Help/Dump Items (Debug)", NULL,
|
||||
menus_debug_cmd_callback, 0 },
|
||||
NULL,
|
||||
NULL, NULL }
|
||||
|
@ -747,23 +743,6 @@ static GimpItemFactoryEntry image_entries[] =
|
|||
|
||||
SEPARATOR ("/Dialogs/---"),
|
||||
|
||||
{ { "/Dialogs/Old/Brushes...", NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0 },
|
||||
"gimp:brush-select-dialog",
|
||||
"dialogs/brush_selection.html", NULL },
|
||||
{ { "/Dialogs/Old/Patterns...", NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0 },
|
||||
"gimp:pattern-select-dialog",
|
||||
"dialogs/pattern_selection.html", NULL },
|
||||
{ { "/Dialogs/Old/Gradients...", NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0 },
|
||||
"gimp:gradient-select-dialog",
|
||||
"dialogs/gradient_selection.html", NULL },
|
||||
{ { "/Dialogs/Old/Palette...", NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0 },
|
||||
"gimp:palette-select-dialog",
|
||||
"dialogs/palette_selection.html", NULL },
|
||||
|
||||
{ { N_("/Dialogs/Brushes..."), "<control><shift>B",
|
||||
dialogs_create_dockable_cmd_callback, 0 },
|
||||
"gimp:brush-grid",
|
||||
|
@ -2668,12 +2647,9 @@ menus_tearoff_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
else
|
||||
{
|
||||
dialog_register (toplevel);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (toplevel), "delete_event",
|
||||
GTK_SIGNAL_FUNC (menus_tearoff_delete_cb),
|
||||
NULL);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: register tearoffs
|
||||
#endif
|
||||
gtk_object_set_data (GTK_OBJECT (widget), "tearoff-menu-toplevel",
|
||||
toplevel);
|
||||
|
||||
|
@ -2694,23 +2670,14 @@ menus_tearoff_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
else
|
||||
{
|
||||
dialog_unregister (toplevel);
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: unregister tearoffs
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
menus_tearoff_delete_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
/* Unregister if dialog is deleted as well */
|
||||
dialog_unregister (widget);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_DEBUG_ENTRY
|
||||
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "widgets/gimpdatafactoryview.h"
|
||||
#include "widgets/gimpdnd.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
#include "dialogs-constructors.h"
|
||||
#include "palette-editor.h"
|
||||
#include "palette-select.h"
|
||||
|
@ -129,13 +128,6 @@ palette_select_new (const gchar *title,
|
|||
else
|
||||
{
|
||||
psp->context = gimp_get_user_context (the_gimp);
|
||||
|
||||
/*
|
||||
session_set_window_geometry (psp->shell, &palette_select_session_info,
|
||||
TRUE);
|
||||
*/
|
||||
|
||||
dialog_register (psp->shell);
|
||||
}
|
||||
|
||||
if (no_data && first_call)
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
|
||||
#include "widgets/gimpdatafactoryview.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
#include "pattern-select.h"
|
||||
|
||||
#include "appenv.h"
|
||||
|
@ -134,8 +133,6 @@ pattern_select_new (gchar *title,
|
|||
else
|
||||
{
|
||||
psp->context = gimp_get_user_context (the_gimp);
|
||||
|
||||
dialog_register (psp->shell);
|
||||
}
|
||||
|
||||
if (no_data && first_call)
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#include "tool-options-dialog.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "dialog_handler.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
@ -113,9 +112,6 @@ tool_options_dialog_create (void)
|
|||
/* hide the separator between the dialog's vbox and the action area */
|
||||
gtk_widget_hide (GTK_WIDGET (g_list_nth_data (gtk_container_children (GTK_CONTAINER (GTK_BIN (options_shell)->child)), 0)));
|
||||
|
||||
/* Register dialog */
|
||||
dialog_register (options_shell);
|
||||
|
||||
/* The outer frame */
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
|
||||
#include "color-area.h"
|
||||
#include "devices.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "dialogs.h"
|
||||
#include "dialogs-commands.h"
|
||||
#include "gdisplay.h"
|
||||
|
@ -344,9 +343,6 @@ toolbox_create (void)
|
|||
gtk_window_set_title (GTK_WINDOW (window), _("The GIMP"));
|
||||
gtk_window_set_policy (GTK_WINDOW (window), TRUE, TRUE, FALSE);
|
||||
|
||||
/* Register dialog */
|
||||
dialog_register_toolbox (window);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
|
||||
GTK_SIGNAL_FUNC (toolbox_delete),
|
||||
NULL);
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#include "channels-commands.h"
|
||||
#include "commands.h"
|
||||
#include "data-commands.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "dialogs-commands.h"
|
||||
#include "edit-commands.h"
|
||||
#include "file-commands.h"
|
||||
|
@ -97,9 +96,6 @@ static gchar * menus_menu_translate_func (const gchar *path,
|
|||
static void menus_tearoff_cmd_callback (GtkWidget *widget,
|
||||
gpointer data,
|
||||
guint action);
|
||||
static gint menus_tearoff_delete_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data);
|
||||
|
||||
#ifdef ENABLE_DEBUG_ENTRY
|
||||
static void menus_debug_recurse_menu (GtkWidget *menu,
|
||||
|
@ -290,7 +286,7 @@ static GimpItemFactoryEntry toolbox_entries[] =
|
|||
"gimp:about-dialog",
|
||||
"help/dialogs/about.html", NULL },
|
||||
#ifdef ENABLE_DEBUG_ENTRY
|
||||
{ { N_("/Help/Dump Items (Debug)"), NULL,
|
||||
{ { "/Help/Dump Items (Debug)", NULL,
|
||||
menus_debug_cmd_callback, 0 },
|
||||
NULL,
|
||||
NULL, NULL }
|
||||
|
@ -747,23 +743,6 @@ static GimpItemFactoryEntry image_entries[] =
|
|||
|
||||
SEPARATOR ("/Dialogs/---"),
|
||||
|
||||
{ { "/Dialogs/Old/Brushes...", NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0 },
|
||||
"gimp:brush-select-dialog",
|
||||
"dialogs/brush_selection.html", NULL },
|
||||
{ { "/Dialogs/Old/Patterns...", NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0 },
|
||||
"gimp:pattern-select-dialog",
|
||||
"dialogs/pattern_selection.html", NULL },
|
||||
{ { "/Dialogs/Old/Gradients...", NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0 },
|
||||
"gimp:gradient-select-dialog",
|
||||
"dialogs/gradient_selection.html", NULL },
|
||||
{ { "/Dialogs/Old/Palette...", NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0 },
|
||||
"gimp:palette-select-dialog",
|
||||
"dialogs/palette_selection.html", NULL },
|
||||
|
||||
{ { N_("/Dialogs/Brushes..."), "<control><shift>B",
|
||||
dialogs_create_dockable_cmd_callback, 0 },
|
||||
"gimp:brush-grid",
|
||||
|
@ -2668,12 +2647,9 @@ menus_tearoff_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
else
|
||||
{
|
||||
dialog_register (toplevel);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (toplevel), "delete_event",
|
||||
GTK_SIGNAL_FUNC (menus_tearoff_delete_cb),
|
||||
NULL);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: register tearoffs
|
||||
#endif
|
||||
gtk_object_set_data (GTK_OBJECT (widget), "tearoff-menu-toplevel",
|
||||
toplevel);
|
||||
|
||||
|
@ -2694,23 +2670,14 @@ menus_tearoff_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
else
|
||||
{
|
||||
dialog_unregister (toplevel);
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: unregister tearoffs
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
menus_tearoff_delete_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
/* Unregister if dialog is deleted as well */
|
||||
dialog_unregister (widget);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_DEBUG_ENTRY
|
||||
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "widgets/gimpnavigationpreview.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "gdisplay.h"
|
||||
#include "nav_window.h"
|
||||
|
||||
|
@ -211,11 +210,6 @@ nav_dialog_create (GDisplay *gdisp)
|
|||
|
||||
gtk_widget_hide (GTK_DIALOG (nav_dialog->shell)->action_area);
|
||||
|
||||
dialog_register (nav_dialog->shell);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (nav_dialog->shell), "destroy",
|
||||
GTK_SIGNAL_FUNC (dialog_unregister),
|
||||
nav_dialog);
|
||||
gtk_signal_connect_object (GTK_OBJECT (nav_dialog->shell), "destroy",
|
||||
GTK_SIGNAL_FUNC (g_free),
|
||||
(GtkObject *) nav_dialog);
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-mask.h"
|
||||
|
||||
#include "dialog_handler.h"
|
||||
#include "gimprc.h"
|
||||
#include "undo.h"
|
||||
|
||||
|
@ -455,7 +454,7 @@ undo_history_gimage_destroy_callback (GimpImage *gimage,
|
|||
undo_history_st *st = data;
|
||||
|
||||
st->gimage = NULL; /* not allowed to use this any more */
|
||||
dialog_unregister (st->shell);
|
||||
|
||||
gtk_widget_destroy (GTK_WIDGET (st->shell));
|
||||
/* which continues in the function below: */
|
||||
}
|
||||
|
@ -777,8 +776,6 @@ undo_history_new (GimpImage *gimage)
|
|||
st, NULL, NULL, TRUE, TRUE,
|
||||
|
||||
NULL);
|
||||
dialog_register (st->shell);
|
||||
|
||||
g_free (title);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,13 +37,12 @@
|
|||
#include "widgets/gimpdnd.h"
|
||||
|
||||
#include "color-notebook.h"
|
||||
#include "image_render.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "colormap-dialog.h"
|
||||
#include "color-area.h"
|
||||
#include "gdisplay.h"
|
||||
|
||||
#include "colormaps.h"
|
||||
#include "image_render.h"
|
||||
#include "gdisplay.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "devices.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -220,9 +219,6 @@ input_dialog_create (void)
|
|||
|
||||
inputd = gtk_input_dialog_new ();
|
||||
|
||||
/* register this one only */
|
||||
dialog_register (inputd);
|
||||
|
||||
gtk_container_set_border_width
|
||||
(GTK_CONTAINER (GTK_DIALOG (inputd)->action_area), 2);
|
||||
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (inputd)->action_area),
|
||||
|
@ -761,8 +757,6 @@ device_status_create (void)
|
|||
|
||||
NULL);
|
||||
|
||||
dialog_register (deviceD->shell);
|
||||
|
||||
deviceD->num_devices = 0;
|
||||
|
||||
for (list = device_info_list; list; list = g_list_next (list))
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#include "appenv.h"
|
||||
#include "app_procs.h"
|
||||
#include "devices.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "gimprc.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
@ -220,9 +219,6 @@ input_dialog_create (void)
|
|||
|
||||
inputd = gtk_input_dialog_new ();
|
||||
|
||||
/* register this one only */
|
||||
dialog_register (inputd);
|
||||
|
||||
gtk_container_set_border_width
|
||||
(GTK_CONTAINER (GTK_DIALOG (inputd)->action_area), 2);
|
||||
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (inputd)->action_area),
|
||||
|
@ -761,8 +757,6 @@ device_status_create (void)
|
|||
|
||||
NULL);
|
||||
|
||||
dialog_register (deviceD->shell);
|
||||
|
||||
deviceD->num_devices = 0;
|
||||
|
||||
for (list = device_info_list; list; list = g_list_next (list))
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "core/gimpcontext.h"
|
||||
|
||||
#include "gimpcursor.h"
|
||||
#include "gimpdialogfactory.h"
|
||||
#include "gimpdock.h"
|
||||
#include "gimpdockbook.h"
|
||||
|
@ -36,19 +37,52 @@
|
|||
#include "gimpimagedock.h"
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_DIALOG_VISIBILITY_UNKNOWN = 0,
|
||||
GIMP_DIALOG_VISIBILITY_INVISIBLE,
|
||||
GIMP_DIALOG_VISIBILITY_VISIBLE
|
||||
} GimpDialogVisibilityState;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GIMP_DIALOG_SHOW_ALL,
|
||||
GIMP_DIALOG_HIDE_ALL,
|
||||
GIMP_DIALOG_SHOW_TOOLBOX
|
||||
} GimpDialogShowState;
|
||||
|
||||
|
||||
static void gimp_dialog_factory_class_init (GimpDialogFactoryClass *klass);
|
||||
static void gimp_dialog_factory_init (GimpDialogFactory *factory);
|
||||
|
||||
static void gimp_dialog_factory_destroy (GtkObject *object);
|
||||
static void gimp_dialog_factory_destroy (GtkObject *object);
|
||||
|
||||
static void gimp_dialog_factory_get_window_info (GtkWidget *window,
|
||||
GimpSessionInfo *info);
|
||||
static void gimp_dialog_factory_set_window_geometry (GtkWidget *window,
|
||||
GimpSessionInfo *info);
|
||||
static void gimp_dialog_factory_get_aux_info (GtkWidget *dialog,
|
||||
GimpSessionInfo *info);
|
||||
static void gimp_dialog_factory_set_aux_info (GtkWidget *dialog,
|
||||
GimpSessionInfo *info);
|
||||
static void gimp_dialog_factories_save_foreach (gchar *name,
|
||||
GimpDialogFactory *factory,
|
||||
FILE *fp);
|
||||
static void gimp_dialog_factories_restore_foreach (gchar *name,
|
||||
GimpDialogFactory *factory,
|
||||
gpointer data);
|
||||
static void gimp_dialog_factory_get_window_info (GtkWidget *window,
|
||||
GimpSessionInfo *info);
|
||||
static void gimp_dialog_factory_set_window_geometry (GtkWidget *window,
|
||||
GimpSessionInfo *info);
|
||||
static void gimp_dialog_factory_get_aux_info (GtkWidget *dialog,
|
||||
GimpSessionInfo *info);
|
||||
static void gimp_dialog_factory_set_aux_info (GtkWidget *dialog,
|
||||
GimpSessionInfo *info);
|
||||
static void gimp_dialog_factories_hide_foreach (gchar *name,
|
||||
GimpDialogFactory *factory,
|
||||
gpointer data);
|
||||
static void gimp_dialog_factories_show_foreach (gchar *name,
|
||||
GimpDialogFactory *factory,
|
||||
gpointer data);
|
||||
static void gimp_dialog_factories_idle_foreach (gchar *name,
|
||||
GimpDialogFactory *factory,
|
||||
gpointer data);
|
||||
static void gimp_dialog_factories_unidle_foreach (gchar *name,
|
||||
GimpDialogFactory *factory,
|
||||
gpointer data);
|
||||
|
||||
|
||||
static GimpObjectClass *parent_class = NULL;
|
||||
|
@ -760,10 +794,112 @@ gimp_dialog_factory_remove_dialog (GimpDialogFactory *factory,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
gimp_dialog_factories_session_save (FILE *file)
|
||||
{
|
||||
GimpDialogFactoryClass *factory_class;
|
||||
|
||||
g_return_if_fail (file != NULL);
|
||||
|
||||
factory_class = gtk_type_class (GIMP_TYPE_DIALOG_FACTORY);
|
||||
|
||||
g_hash_table_foreach (factory_class->factories,
|
||||
(GHFunc) gimp_dialog_factories_save_foreach,
|
||||
file);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_dialog_factories_session_restore (void)
|
||||
{
|
||||
GimpDialogFactoryClass *factory_class;
|
||||
|
||||
factory_class =
|
||||
GIMP_DIALOG_FACTORY_CLASS (gtk_type_class (GIMP_TYPE_DIALOG_FACTORY));
|
||||
|
||||
g_hash_table_foreach (factory_class->factories,
|
||||
(GHFunc) gimp_dialog_factories_restore_foreach,
|
||||
NULL);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_dialog_factories_toggle (GimpDialogFactory *toolbox_factory,
|
||||
const gchar *toolbox_identifier)
|
||||
{
|
||||
static GimpDialogShowState toggle_state = GIMP_DIALOG_SHOW_ALL;
|
||||
static gboolean doing_update = FALSE;
|
||||
|
||||
GimpDialogFactoryClass *factory_class;
|
||||
|
||||
if (doing_update)
|
||||
return;
|
||||
|
||||
doing_update = TRUE;
|
||||
|
||||
factory_class =
|
||||
GIMP_DIALOG_FACTORY_CLASS (gtk_type_class (GIMP_TYPE_DIALOG_FACTORY));
|
||||
|
||||
switch (toggle_state)
|
||||
{
|
||||
case GIMP_DIALOG_SHOW_ALL:
|
||||
toggle_state = GIMP_DIALOG_HIDE_ALL;
|
||||
|
||||
g_hash_table_foreach (factory_class->factories,
|
||||
(GHFunc) gimp_dialog_factories_hide_foreach,
|
||||
NULL);
|
||||
break;
|
||||
|
||||
case GIMP_DIALOG_HIDE_ALL:
|
||||
toggle_state = GIMP_DIALOG_SHOW_TOOLBOX;
|
||||
|
||||
gimp_dialog_factory_dialog_raise (toolbox_factory, toolbox_identifier);
|
||||
break;
|
||||
|
||||
case GIMP_DIALOG_SHOW_TOOLBOX:
|
||||
toggle_state = GIMP_DIALOG_SHOW_ALL;
|
||||
|
||||
g_hash_table_foreach (factory_class->factories,
|
||||
(GHFunc) gimp_dialog_factories_show_foreach,
|
||||
NULL);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
doing_update = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gimp_dialog_factories_idle (void)
|
||||
{
|
||||
GimpDialogFactoryClass *factory_class;
|
||||
|
||||
factory_class =
|
||||
GIMP_DIALOG_FACTORY_CLASS (gtk_type_class (GIMP_TYPE_DIALOG_FACTORY));
|
||||
|
||||
g_hash_table_foreach (factory_class->factories,
|
||||
(GHFunc) gimp_dialog_factories_idle_foreach,
|
||||
NULL);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_dialog_factories_unidle (void)
|
||||
{
|
||||
GimpDialogFactoryClass *factory_class;
|
||||
|
||||
factory_class =
|
||||
GIMP_DIALOG_FACTORY_CLASS (gtk_type_class (GIMP_TYPE_DIALOG_FACTORY));
|
||||
|
||||
g_hash_table_foreach (factory_class->factories,
|
||||
(GHFunc) gimp_dialog_factories_unidle_foreach,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
gimp_dialog_factories_session_save_foreach (gchar *name,
|
||||
GimpDialogFactory *factory,
|
||||
FILE *fp)
|
||||
gimp_dialog_factories_save_foreach (gchar *name,
|
||||
GimpDialogFactory *factory,
|
||||
FILE *fp)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
|
@ -871,24 +1007,10 @@ gimp_dialog_factories_session_save_foreach (gchar *name,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
gimp_dialog_factories_session_save (FILE *file)
|
||||
{
|
||||
GimpDialogFactoryClass *factory_class;
|
||||
|
||||
g_return_if_fail (file != NULL);
|
||||
|
||||
factory_class = gtk_type_class (GIMP_TYPE_DIALOG_FACTORY);
|
||||
|
||||
g_hash_table_foreach (factory_class->factories,
|
||||
(GHFunc) gimp_dialog_factories_session_save_foreach,
|
||||
file);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_dialog_factories_session_restore_foreach (gchar *name,
|
||||
GimpDialogFactory *factory,
|
||||
gpointer data)
|
||||
gimp_dialog_factories_restore_foreach (gchar *name,
|
||||
GimpDialogFactory *factory,
|
||||
gpointer data)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
|
@ -965,22 +1087,6 @@ gimp_dialog_factories_session_restore_foreach (gchar *name,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
gimp_dialog_factories_session_restore (void)
|
||||
{
|
||||
GimpDialogFactoryClass *factory_class;
|
||||
|
||||
factory_class =
|
||||
GIMP_DIALOG_FACTORY_CLASS (gtk_type_class (GIMP_TYPE_DIALOG_FACTORY));
|
||||
|
||||
g_hash_table_foreach (factory_class->factories,
|
||||
(GHFunc) gimp_dialog_factories_session_restore_foreach,
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
/* private functions */
|
||||
|
||||
static void
|
||||
gimp_dialog_factory_get_window_info (GtkWidget *window,
|
||||
GimpSessionInfo *info)
|
||||
|
@ -1092,3 +1198,103 @@ gimp_dialog_factory_set_aux_info (GtkWidget *dialog,
|
|||
menu_shown);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_dialog_factories_hide_foreach (gchar *name,
|
||||
GimpDialogFactory *factory,
|
||||
gpointer data)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = factory->open_dialogs; list; list = g_list_next (list))
|
||||
{
|
||||
if (GTK_IS_WIDGET (list->data) && GTK_WIDGET_TOPLEVEL (list->data))
|
||||
{
|
||||
GimpDialogVisibilityState visibility = GIMP_DIALOG_VISIBILITY_UNKNOWN;
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (list->data))
|
||||
{
|
||||
visibility = GIMP_DIALOG_VISIBILITY_VISIBLE;
|
||||
|
||||
gtk_widget_hide (GTK_WIDGET (list->data));
|
||||
}
|
||||
else
|
||||
{
|
||||
visibility = GIMP_DIALOG_VISIBILITY_INVISIBLE;
|
||||
}
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT (list->data),
|
||||
"gimp-dialog-visibility",
|
||||
GINT_TO_POINTER (visibility));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_dialog_factories_show_foreach (gchar *name,
|
||||
GimpDialogFactory *factory,
|
||||
gpointer data)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = factory->open_dialogs; list; list = g_list_next (list))
|
||||
{
|
||||
if (GTK_IS_WIDGET (list->data) && GTK_WIDGET_TOPLEVEL (list->data))
|
||||
{
|
||||
GimpDialogVisibilityState visibility;
|
||||
|
||||
visibility =
|
||||
GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (list->data),
|
||||
"gimp-dialog-visibility"));
|
||||
|
||||
if (! GTK_WIDGET_VISIBLE (list->data) &&
|
||||
visibility == GIMP_DIALOG_VISIBILITY_VISIBLE)
|
||||
{
|
||||
gtk_widget_show (GTK_WIDGET (list->data));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_dialog_factories_idle_foreach (gchar *name,
|
||||
GimpDialogFactory *factory,
|
||||
gpointer data)
|
||||
{
|
||||
GdkCursor *cursor;
|
||||
GList *list;
|
||||
|
||||
cursor = gimp_cursor_new (GDK_WATCH,
|
||||
GIMP_TOOL_CURSOR_NONE,
|
||||
GIMP_CURSOR_MODIFIER_NONE);
|
||||
|
||||
for (list = factory->open_dialogs; list; list = g_list_next (list))
|
||||
{
|
||||
if (GTK_IS_WIDGET (list->data) &&
|
||||
GTK_WIDGET_TOPLEVEL (list->data) &&
|
||||
GTK_WIDGET_VISIBLE (list->data))
|
||||
{
|
||||
gdk_window_set_cursor (GTK_WIDGET (list->data)->window, cursor);
|
||||
}
|
||||
}
|
||||
|
||||
gdk_cursor_destroy (cursor);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_dialog_factories_unidle_foreach (gchar *name,
|
||||
GimpDialogFactory *factory,
|
||||
gpointer data)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = factory->open_dialogs; list; list = g_list_next (list))
|
||||
{
|
||||
if (GTK_IS_WIDGET (list->data) &&
|
||||
GTK_WIDGET_TOPLEVEL (list->data) &&
|
||||
GTK_WIDGET_VISIBLE (list->data))
|
||||
{
|
||||
gdk_window_set_cursor (GTK_WIDGET (list->data)->window, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,5 +141,11 @@ void gimp_dialog_factory_remove_dialog (GimpDialogFactory *factory,
|
|||
void gimp_dialog_factories_session_save (FILE *file);
|
||||
void gimp_dialog_factories_session_restore (void);
|
||||
|
||||
void gimp_dialog_factories_toggle (GimpDialogFactory *toolbox_factory,
|
||||
const gchar *toolbox_identifier);
|
||||
|
||||
void gimp_dialog_factories_idle (void);
|
||||
void gimp_dialog_factories_unidle (void);
|
||||
|
||||
|
||||
#endif /* __GIMP_DIALOG_FACTORY_H__ */
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "gimpdockbook.h"
|
||||
|
||||
|
||||
#define GIMP_DOCK_MINIMAL_WIDTH 280
|
||||
#define GIMP_DOCK_MINIMAL_WIDTH 250
|
||||
#define GIMP_DOCK_SEPARATOR_HEIGHT 8
|
||||
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#include "channels-commands.h"
|
||||
#include "commands.h"
|
||||
#include "data-commands.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "dialogs-commands.h"
|
||||
#include "edit-commands.h"
|
||||
#include "file-commands.h"
|
||||
|
@ -97,9 +96,6 @@ static gchar * menus_menu_translate_func (const gchar *path,
|
|||
static void menus_tearoff_cmd_callback (GtkWidget *widget,
|
||||
gpointer data,
|
||||
guint action);
|
||||
static gint menus_tearoff_delete_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data);
|
||||
|
||||
#ifdef ENABLE_DEBUG_ENTRY
|
||||
static void menus_debug_recurse_menu (GtkWidget *menu,
|
||||
|
@ -290,7 +286,7 @@ static GimpItemFactoryEntry toolbox_entries[] =
|
|||
"gimp:about-dialog",
|
||||
"help/dialogs/about.html", NULL },
|
||||
#ifdef ENABLE_DEBUG_ENTRY
|
||||
{ { N_("/Help/Dump Items (Debug)"), NULL,
|
||||
{ { "/Help/Dump Items (Debug)", NULL,
|
||||
menus_debug_cmd_callback, 0 },
|
||||
NULL,
|
||||
NULL, NULL }
|
||||
|
@ -747,23 +743,6 @@ static GimpItemFactoryEntry image_entries[] =
|
|||
|
||||
SEPARATOR ("/Dialogs/---"),
|
||||
|
||||
{ { "/Dialogs/Old/Brushes...", NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0 },
|
||||
"gimp:brush-select-dialog",
|
||||
"dialogs/brush_selection.html", NULL },
|
||||
{ { "/Dialogs/Old/Patterns...", NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0 },
|
||||
"gimp:pattern-select-dialog",
|
||||
"dialogs/pattern_selection.html", NULL },
|
||||
{ { "/Dialogs/Old/Gradients...", NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0 },
|
||||
"gimp:gradient-select-dialog",
|
||||
"dialogs/gradient_selection.html", NULL },
|
||||
{ { "/Dialogs/Old/Palette...", NULL,
|
||||
dialogs_create_toplevel_cmd_callback, 0 },
|
||||
"gimp:palette-select-dialog",
|
||||
"dialogs/palette_selection.html", NULL },
|
||||
|
||||
{ { N_("/Dialogs/Brushes..."), "<control><shift>B",
|
||||
dialogs_create_dockable_cmd_callback, 0 },
|
||||
"gimp:brush-grid",
|
||||
|
@ -2668,12 +2647,9 @@ menus_tearoff_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
else
|
||||
{
|
||||
dialog_register (toplevel);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (toplevel), "delete_event",
|
||||
GTK_SIGNAL_FUNC (menus_tearoff_delete_cb),
|
||||
NULL);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: register tearoffs
|
||||
#endif
|
||||
gtk_object_set_data (GTK_OBJECT (widget), "tearoff-menu-toplevel",
|
||||
toplevel);
|
||||
|
||||
|
@ -2694,23 +2670,14 @@ menus_tearoff_cmd_callback (GtkWidget *widget,
|
|||
}
|
||||
else
|
||||
{
|
||||
dialog_unregister (toplevel);
|
||||
#ifdef __GNUC__
|
||||
#warning FIXME: unregister tearoffs
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
menus_tearoff_delete_cb (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
/* Unregister if dialog is deleted as well */
|
||||
dialog_unregister (widget);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_DEBUG_ENTRY
|
||||
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -131,6 +131,7 @@ gimp_layer_list_view_init (GimpLayerListView *view)
|
|||
{
|
||||
GimpDrawableListView *drawable_view;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *abox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *slider;
|
||||
GtkWidget *pixmap;
|
||||
|
@ -142,7 +143,7 @@ gimp_layer_list_view_init (GimpLayerListView *view)
|
|||
gtk_box_reorder_child (GTK_BOX (view), view->options_box, 0);
|
||||
gtk_widget_show (view->options_box);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_box_pack_start (GTK_BOX (view->options_box), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
|
@ -155,7 +156,7 @@ gimp_layer_list_view_init (GimpLayerListView *view)
|
|||
view->paint_mode_menu =
|
||||
gimp_paint_mode_menu_new (gimp_layer_list_view_paint_mode_menu_callback,
|
||||
view, FALSE, NORMAL_MODE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), view->paint_mode_menu, FALSE, FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), view->paint_mode_menu, FALSE, FALSE, 0);
|
||||
gtk_widget_show (view->paint_mode_menu);
|
||||
|
||||
gimp_help_set_help_data (view->paint_mode_menu,
|
||||
|
@ -163,10 +164,13 @@ gimp_layer_list_view_init (GimpLayerListView *view)
|
|||
|
||||
/* Preserve transparency toggle */
|
||||
|
||||
abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), abox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (abox);
|
||||
|
||||
view->preserve_trans_toggle =
|
||||
gtk_check_button_new_with_label (_("Keep Trans."));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), view->preserve_trans_toggle,
|
||||
FALSE, FALSE, 2);
|
||||
gtk_toggle_button_new_with_label (_("Keep Trans."));
|
||||
gtk_container_add (GTK_CONTAINER (abox), view->preserve_trans_toggle);
|
||||
gtk_widget_show (view->preserve_trans_toggle);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (view->preserve_trans_toggle), "toggled",
|
||||
|
@ -176,7 +180,7 @@ gimp_layer_list_view_init (GimpLayerListView *view)
|
|||
gimp_help_set_help_data (view->preserve_trans_toggle,
|
||||
_("Keep Transparency"), "#keep_trans_button");
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_box_pack_start (GTK_BOX (view->options_box), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
|
|
|
@ -131,6 +131,7 @@ gimp_layer_list_view_init (GimpLayerListView *view)
|
|||
{
|
||||
GimpDrawableListView *drawable_view;
|
||||
GtkWidget *hbox;
|
||||
GtkWidget *abox;
|
||||
GtkWidget *label;
|
||||
GtkWidget *slider;
|
||||
GtkWidget *pixmap;
|
||||
|
@ -142,7 +143,7 @@ gimp_layer_list_view_init (GimpLayerListView *view)
|
|||
gtk_box_reorder_child (GTK_BOX (view), view->options_box, 0);
|
||||
gtk_widget_show (view->options_box);
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_box_pack_start (GTK_BOX (view->options_box), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
|
@ -155,7 +156,7 @@ gimp_layer_list_view_init (GimpLayerListView *view)
|
|||
view->paint_mode_menu =
|
||||
gimp_paint_mode_menu_new (gimp_layer_list_view_paint_mode_menu_callback,
|
||||
view, FALSE, NORMAL_MODE);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), view->paint_mode_menu, FALSE, FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), view->paint_mode_menu, FALSE, FALSE, 0);
|
||||
gtk_widget_show (view->paint_mode_menu);
|
||||
|
||||
gimp_help_set_help_data (view->paint_mode_menu,
|
||||
|
@ -163,10 +164,13 @@ gimp_layer_list_view_init (GimpLayerListView *view)
|
|||
|
||||
/* Preserve transparency toggle */
|
||||
|
||||
abox = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), abox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (abox);
|
||||
|
||||
view->preserve_trans_toggle =
|
||||
gtk_check_button_new_with_label (_("Keep Trans."));
|
||||
gtk_box_pack_start (GTK_BOX (hbox), view->preserve_trans_toggle,
|
||||
FALSE, FALSE, 2);
|
||||
gtk_toggle_button_new_with_label (_("Keep Trans."));
|
||||
gtk_container_add (GTK_CONTAINER (abox), view->preserve_trans_toggle);
|
||||
gtk_widget_show (view->preserve_trans_toggle);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (view->preserve_trans_toggle), "toggled",
|
||||
|
@ -176,7 +180,7 @@ gimp_layer_list_view_init (GimpLayerListView *view)
|
|||
gimp_help_set_help_data (view->preserve_trans_toggle,
|
||||
_("Keep Transparency"), "#keep_trans_button");
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_box_pack_start (GTK_BOX (view->options_box), hbox, FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
|
||||
#include "color-area.h"
|
||||
#include "devices.h"
|
||||
#include "dialog_handler.h"
|
||||
#include "dialogs.h"
|
||||
#include "dialogs-commands.h"
|
||||
#include "gdisplay.h"
|
||||
|
@ -344,9 +343,6 @@ toolbox_create (void)
|
|||
gtk_window_set_title (GTK_WINDOW (window), _("The GIMP"));
|
||||
gtk_window_set_policy (GTK_WINDOW (window), TRUE, TRUE, FALSE);
|
||||
|
||||
/* Register dialog */
|
||||
dialog_register_toolbox (window);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
|
||||
GTK_SIGNAL_FUNC (toolbox_delete),
|
||||
NULL);
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#include "tool-options-dialog.h"
|
||||
|
||||
#include "app_procs.h"
|
||||
#include "dialog_handler.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
@ -113,9 +112,6 @@ tool_options_dialog_create (void)
|
|||
/* hide the separator between the dialog's vbox and the action area */
|
||||
gtk_widget_hide (GTK_WIDGET (g_list_nth_data (gtk_container_children (GTK_CONTAINER (GTK_BIN (options_shell)->child)), 0)));
|
||||
|
||||
/* Register dialog */
|
||||
dialog_register (options_shell);
|
||||
|
||||
/* The outer frame */
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||
|
|
Loading…
Reference in New Issue