mirror of https://github.com/GNOME/gimp.git
Added session-managment support to the device-status-dialog.
The restore-function is still not working, will have a look at it tomorrow... --Sven
This commit is contained in:
parent
ae796a2b55
commit
72577b161b
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,11 @@
|
|||
Tue Jul 21 02:11:47 MEST 1998 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/app_procs.c
|
||||
* app/devices.[ch]
|
||||
* app/session.[ch]: added session-managment support to the
|
||||
device-status-dialog. The restore-function is still not working,
|
||||
will have a look at it tomorrow...
|
||||
|
||||
Mon Jul 20 21:35:33 BST 1998 Adam D. Moss <adam@gimp.org>
|
||||
|
||||
* plug-ins/animationplay/animationplay.c: UI tweaks.
|
||||
|
@ -10,7 +18,7 @@ Mon Jul 20 20:13:58 MEST 1998 Sven Neumann <sven@gimp.org>
|
|||
ellipse_select too. Made the entries use spinbuttons. Minor change
|
||||
to the selection_size indicator in the status-bar.
|
||||
|
||||
*plug-ins/png/png.c: made fopen() use "rb" and "wb" instead if "r"
|
||||
* plug-ins/png/png.c: made fopen() use "rb" and "wb" instead if "r"
|
||||
and "w" since the OS/2 port needs it
|
||||
|
||||
Mon Jul 20 11:07:32 EDT 1998 Matthew Wilson <msw@gimp.org>
|
||||
|
|
|
@ -581,6 +581,7 @@ app_exit_finish (void)
|
|||
paint_funcs_free ();
|
||||
plug_in_kill ();
|
||||
procedural_db_free ();
|
||||
device_status_free ();
|
||||
menus_quit ();
|
||||
tile_swap_exit ();
|
||||
|
||||
|
@ -702,3 +703,14 @@ quit_invoker (Argument *args)
|
|||
|
||||
return return_args;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "interface.h"
|
||||
#include "gimprc.h"
|
||||
#include "palette.h"
|
||||
#include "session.h"
|
||||
#include "tools.h"
|
||||
|
||||
typedef struct _DeviceInfo DeviceInfo;
|
||||
|
@ -578,6 +579,7 @@ create_device_status (void)
|
|||
|
||||
gtk_window_set_title (GTK_WINDOW(deviceD->shell), "Device Status");
|
||||
gtk_window_set_policy (GTK_WINDOW (deviceD->shell), FALSE, FALSE, TRUE);
|
||||
session_set_window_geometry (deviceD->shell, &device_status_session_info, TRUE);
|
||||
|
||||
deviceD->num_devices = 0;
|
||||
tmp_list = devices_info;
|
||||
|
@ -695,6 +697,16 @@ devices_close_callback (GtkWidget *w,
|
|||
gtk_widget_hide (GTK_WIDGET(data));
|
||||
}
|
||||
|
||||
void
|
||||
device_status_free (void)
|
||||
{
|
||||
if (deviceD)
|
||||
{
|
||||
session_get_window_info (deviceD->shell, &device_status_session_info);
|
||||
device_status_destroy_callback ();
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
device_status_update_current ()
|
||||
{
|
||||
|
|
|
@ -55,8 +55,10 @@ void devices_rc_update (gchar *name, DeviceValues values,
|
|||
gchar *brush_name, ToolType tool,
|
||||
guchar foreground[]);
|
||||
|
||||
/* Current device id */
|
||||
/* Free device status (only for session-managment) */
|
||||
void device_status_free (void);
|
||||
|
||||
/* Current device id */
|
||||
extern int current_device;
|
||||
|
||||
#endif /* __DEVICES_H__ */
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "interface.h"
|
||||
#include "gimprc.h"
|
||||
#include "palette.h"
|
||||
#include "session.h"
|
||||
#include "tools.h"
|
||||
|
||||
typedef struct _DeviceInfo DeviceInfo;
|
||||
|
@ -578,6 +579,7 @@ create_device_status (void)
|
|||
|
||||
gtk_window_set_title (GTK_WINDOW(deviceD->shell), "Device Status");
|
||||
gtk_window_set_policy (GTK_WINDOW (deviceD->shell), FALSE, FALSE, TRUE);
|
||||
session_set_window_geometry (deviceD->shell, &device_status_session_info, TRUE);
|
||||
|
||||
deviceD->num_devices = 0;
|
||||
tmp_list = devices_info;
|
||||
|
@ -695,6 +697,16 @@ devices_close_callback (GtkWidget *w,
|
|||
gtk_widget_hide (GTK_WIDGET(data));
|
||||
}
|
||||
|
||||
void
|
||||
device_status_free (void)
|
||||
{
|
||||
if (deviceD)
|
||||
{
|
||||
session_get_window_info (deviceD->shell, &device_status_session_info);
|
||||
device_status_destroy_callback ();
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
device_status_update_current ()
|
||||
{
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "interface.h"
|
||||
#include "gimprc.h"
|
||||
#include "palette.h"
|
||||
#include "session.h"
|
||||
#include "tools.h"
|
||||
|
||||
typedef struct _DeviceInfo DeviceInfo;
|
||||
|
@ -578,6 +579,7 @@ create_device_status (void)
|
|||
|
||||
gtk_window_set_title (GTK_WINDOW(deviceD->shell), "Device Status");
|
||||
gtk_window_set_policy (GTK_WINDOW (deviceD->shell), FALSE, FALSE, TRUE);
|
||||
session_set_window_geometry (deviceD->shell, &device_status_session_info, TRUE);
|
||||
|
||||
deviceD->num_devices = 0;
|
||||
tmp_list = devices_info;
|
||||
|
@ -695,6 +697,16 @@ devices_close_callback (GtkWidget *w,
|
|||
gtk_widget_hide (GTK_WIDGET(data));
|
||||
}
|
||||
|
||||
void
|
||||
device_status_free (void)
|
||||
{
|
||||
if (deviceD)
|
||||
{
|
||||
session_get_window_info (deviceD->shell, &device_status_session_info);
|
||||
device_status_destroy_callback ();
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
device_status_update_current ()
|
||||
{
|
||||
|
|
|
@ -76,6 +76,8 @@ SessionInfo pattern_select_session_info =
|
|||
{ "pattern-select", (GtkItemFactoryCallback)dialogs_patterns_cmd_callback, 160, 180, 0, 0, FALSE };
|
||||
SessionInfo gradient_editor_session_info =
|
||||
{ "gradient-editor", (GtkItemFactoryCallback)dialogs_gradient_editor_cmd_callback, 170, 180, 0, 0, FALSE };
|
||||
SessionInfo device_status_session_info =
|
||||
{ "device-status", (GtkItemFactoryCallback)dialogs_device_status_cmd_callback, 0, 600, 0, 0, FALSE };
|
||||
|
||||
/* public functions */
|
||||
void
|
||||
|
|
|
@ -44,6 +44,7 @@ extern SessionInfo palette_session_info;
|
|||
extern SessionInfo brush_select_session_info;
|
||||
extern SessionInfo pattern_select_session_info;
|
||||
extern SessionInfo gradient_editor_session_info;
|
||||
extern SessionInfo device_status_session_info;
|
||||
|
||||
extern GList *session_info_updates; /* This list holds all session_infos
|
||||
that should be written to the
|
||||
|
|
|
@ -378,11 +378,11 @@ rect_select_button_press (Tool *tool,
|
|||
}
|
||||
rect_sel->op = REPLACE;
|
||||
}
|
||||
rect_sel->context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id = gtk_statusbar_get_context_id (GTK_STATUSBAR(gdisp->statusbar),
|
||||
"selection");
|
||||
size = g_new (gchar, 24); /* strlen("Selection: x ") + 2*5 */
|
||||
sprintf (size, "Selection: %d x %d", abs(rect_sel->w), abs(rect_sel->h));
|
||||
gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
|
||||
gtk_statusbar_push(GTK_STATUSBAR (gdisp->statusbar),
|
||||
rect_sel->context_id, size);
|
||||
g_free (size);
|
||||
draw_core_start (rect_sel->core, gdisp->canvas->window, tool);
|
||||
|
@ -403,8 +403,8 @@ rect_select_button_release (Tool *tool,
|
|||
gdk_pointer_ungrab (bevent->time);
|
||||
gdk_flush ();
|
||||
|
||||
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id);
|
||||
gtk_statusbar_pop (GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id);
|
||||
draw_core_stop (rect_sel->core, tool);
|
||||
tool->state = INACTIVE;
|
||||
|
||||
|
@ -574,12 +574,12 @@ rect_select_motion (Tool *tool,
|
|||
|
||||
rect_sel->center = FALSE;
|
||||
}
|
||||
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id);
|
||||
gtk_statusbar_pop (GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id);
|
||||
size = g_new (gchar, 24); /* strlen("Selection: x ") + 2*5 */
|
||||
sprintf (size, "Selection: %d x %d", abs(rect_sel->w), abs(rect_sel->h));
|
||||
gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id, size);
|
||||
gtk_statusbar_push (GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id, size);
|
||||
g_free (size);
|
||||
draw_core_resume (rect_sel->core, tool);
|
||||
}
|
||||
|
|
|
@ -76,6 +76,8 @@ SessionInfo pattern_select_session_info =
|
|||
{ "pattern-select", (GtkItemFactoryCallback)dialogs_patterns_cmd_callback, 160, 180, 0, 0, FALSE };
|
||||
SessionInfo gradient_editor_session_info =
|
||||
{ "gradient-editor", (GtkItemFactoryCallback)dialogs_gradient_editor_cmd_callback, 170, 180, 0, 0, FALSE };
|
||||
SessionInfo device_status_session_info =
|
||||
{ "device-status", (GtkItemFactoryCallback)dialogs_device_status_cmd_callback, 0, 600, 0, 0, FALSE };
|
||||
|
||||
/* public functions */
|
||||
void
|
||||
|
|
|
@ -44,6 +44,7 @@ extern SessionInfo palette_session_info;
|
|||
extern SessionInfo brush_select_session_info;
|
||||
extern SessionInfo pattern_select_session_info;
|
||||
extern SessionInfo gradient_editor_session_info;
|
||||
extern SessionInfo device_status_session_info;
|
||||
|
||||
extern GList *session_info_updates; /* This list holds all session_infos
|
||||
that should be written to the
|
||||
|
|
|
@ -378,11 +378,11 @@ rect_select_button_press (Tool *tool,
|
|||
}
|
||||
rect_sel->op = REPLACE;
|
||||
}
|
||||
rect_sel->context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id = gtk_statusbar_get_context_id (GTK_STATUSBAR(gdisp->statusbar),
|
||||
"selection");
|
||||
size = g_new (gchar, 24); /* strlen("Selection: x ") + 2*5 */
|
||||
sprintf (size, "Selection: %d x %d", abs(rect_sel->w), abs(rect_sel->h));
|
||||
gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
|
||||
gtk_statusbar_push(GTK_STATUSBAR (gdisp->statusbar),
|
||||
rect_sel->context_id, size);
|
||||
g_free (size);
|
||||
draw_core_start (rect_sel->core, gdisp->canvas->window, tool);
|
||||
|
@ -403,8 +403,8 @@ rect_select_button_release (Tool *tool,
|
|||
gdk_pointer_ungrab (bevent->time);
|
||||
gdk_flush ();
|
||||
|
||||
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id);
|
||||
gtk_statusbar_pop (GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id);
|
||||
draw_core_stop (rect_sel->core, tool);
|
||||
tool->state = INACTIVE;
|
||||
|
||||
|
@ -574,12 +574,12 @@ rect_select_motion (Tool *tool,
|
|||
|
||||
rect_sel->center = FALSE;
|
||||
}
|
||||
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id);
|
||||
gtk_statusbar_pop (GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id);
|
||||
size = g_new (gchar, 24); /* strlen("Selection: x ") + 2*5 */
|
||||
sprintf (size, "Selection: %d x %d", abs(rect_sel->w), abs(rect_sel->h));
|
||||
gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id, size);
|
||||
gtk_statusbar_push (GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id, size);
|
||||
g_free (size);
|
||||
draw_core_resume (rect_sel->core, tool);
|
||||
}
|
||||
|
|
|
@ -378,11 +378,11 @@ rect_select_button_press (Tool *tool,
|
|||
}
|
||||
rect_sel->op = REPLACE;
|
||||
}
|
||||
rect_sel->context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id = gtk_statusbar_get_context_id (GTK_STATUSBAR(gdisp->statusbar),
|
||||
"selection");
|
||||
size = g_new (gchar, 24); /* strlen("Selection: x ") + 2*5 */
|
||||
sprintf (size, "Selection: %d x %d", abs(rect_sel->w), abs(rect_sel->h));
|
||||
gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
|
||||
gtk_statusbar_push(GTK_STATUSBAR (gdisp->statusbar),
|
||||
rect_sel->context_id, size);
|
||||
g_free (size);
|
||||
draw_core_start (rect_sel->core, gdisp->canvas->window, tool);
|
||||
|
@ -403,8 +403,8 @@ rect_select_button_release (Tool *tool,
|
|||
gdk_pointer_ungrab (bevent->time);
|
||||
gdk_flush ();
|
||||
|
||||
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id);
|
||||
gtk_statusbar_pop (GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id);
|
||||
draw_core_stop (rect_sel->core, tool);
|
||||
tool->state = INACTIVE;
|
||||
|
||||
|
@ -574,12 +574,12 @@ rect_select_motion (Tool *tool,
|
|||
|
||||
rect_sel->center = FALSE;
|
||||
}
|
||||
gtk_statusbar_pop(GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id);
|
||||
gtk_statusbar_pop (GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id);
|
||||
size = g_new (gchar, 24); /* strlen("Selection: x ") + 2*5 */
|
||||
sprintf (size, "Selection: %d x %d", abs(rect_sel->w), abs(rect_sel->h));
|
||||
gtk_statusbar_push(GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id, size);
|
||||
gtk_statusbar_push (GTK_STATUSBAR(gdisp->statusbar),
|
||||
rect_sel->context_id, size);
|
||||
g_free (size);
|
||||
draw_core_resume (rect_sel->core, tool);
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "interface.h"
|
||||
#include "gimprc.h"
|
||||
#include "palette.h"
|
||||
#include "session.h"
|
||||
#include "tools.h"
|
||||
|
||||
typedef struct _DeviceInfo DeviceInfo;
|
||||
|
@ -578,6 +579,7 @@ create_device_status (void)
|
|||
|
||||
gtk_window_set_title (GTK_WINDOW(deviceD->shell), "Device Status");
|
||||
gtk_window_set_policy (GTK_WINDOW (deviceD->shell), FALSE, FALSE, TRUE);
|
||||
session_set_window_geometry (deviceD->shell, &device_status_session_info, TRUE);
|
||||
|
||||
deviceD->num_devices = 0;
|
||||
tmp_list = devices_info;
|
||||
|
@ -695,6 +697,16 @@ devices_close_callback (GtkWidget *w,
|
|||
gtk_widget_hide (GTK_WIDGET(data));
|
||||
}
|
||||
|
||||
void
|
||||
device_status_free (void)
|
||||
{
|
||||
if (deviceD)
|
||||
{
|
||||
session_get_window_info (deviceD->shell, &device_status_session_info);
|
||||
device_status_destroy_callback ();
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
device_status_update_current ()
|
||||
{
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "interface.h"
|
||||
#include "gimprc.h"
|
||||
#include "palette.h"
|
||||
#include "session.h"
|
||||
#include "tools.h"
|
||||
|
||||
typedef struct _DeviceInfo DeviceInfo;
|
||||
|
@ -578,6 +579,7 @@ create_device_status (void)
|
|||
|
||||
gtk_window_set_title (GTK_WINDOW(deviceD->shell), "Device Status");
|
||||
gtk_window_set_policy (GTK_WINDOW (deviceD->shell), FALSE, FALSE, TRUE);
|
||||
session_set_window_geometry (deviceD->shell, &device_status_session_info, TRUE);
|
||||
|
||||
deviceD->num_devices = 0;
|
||||
tmp_list = devices_info;
|
||||
|
@ -695,6 +697,16 @@ devices_close_callback (GtkWidget *w,
|
|||
gtk_widget_hide (GTK_WIDGET(data));
|
||||
}
|
||||
|
||||
void
|
||||
device_status_free (void)
|
||||
{
|
||||
if (deviceD)
|
||||
{
|
||||
session_get_window_info (deviceD->shell, &device_status_session_info);
|
||||
device_status_destroy_callback ();
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
device_status_update_current ()
|
||||
{
|
||||
|
|
|
@ -55,8 +55,10 @@ void devices_rc_update (gchar *name, DeviceValues values,
|
|||
gchar *brush_name, ToolType tool,
|
||||
guchar foreground[]);
|
||||
|
||||
/* Current device id */
|
||||
/* Free device status (only for session-managment) */
|
||||
void device_status_free (void);
|
||||
|
||||
/* Current device id */
|
||||
extern int current_device;
|
||||
|
||||
#endif /* __DEVICES_H__ */
|
||||
|
|
Loading…
Reference in New Issue