The statusbar can now be switched off just like the rulers.

--Sven
This commit is contained in:
Sven Neumann 1998-08-05 12:38:11 +00:00
parent c10a09ef0d
commit 6805b3be8f
49 changed files with 370 additions and 113 deletions

View File

@ -1,3 +1,16 @@
Wed Aug 5 14:32:51 MEST 1998 Sven Neumann <sven@gimp.org>
* gimprc.in
* app/commands.[ch]
* app/gdisplay.[ch]
* app/gimprc.[ch]
* app/interface.c
* app/menus.c
* app/plug_in.c
* app/preferences_dialog.c: The statusbar can now be switched off
like the rulers. Screen estate purists can make this the default
behaviour in their gimprc ;-)
1998-08-03 Federico Mena Quintero <federico@nuclecu.unam.mx>
* app/gradient.c: Fixed typo (sinuosidal -> sinusoidal).

View File

@ -603,6 +603,26 @@ view_snap_to_guides_cmd_callback (GtkWidget *widget,
gdisp->snap_to_guides = GTK_CHECK_MENU_ITEM (widget)->active;
}
void
view_toggle_statusbar_cmd_callback (GtkWidget *widget,
gpointer client_data)
{
GDisplay * gdisp;
gdisp = gdisplay_active ();
if (!GTK_CHECK_MENU_ITEM (widget)->active)
{
if (GTK_WIDGET_VISIBLE (gdisp->statusarea))
gtk_widget_hide (gdisp->statusarea);
}
else
{
if (!GTK_WIDGET_VISIBLE (gdisp->statusarea))
gtk_widget_show (gdisp->statusarea);
}
}
void
view_new_view_cmd_callback (GtkWidget *widget,
gpointer client_data)

View File

@ -51,6 +51,7 @@ void view_zoom_1_16_callback (GtkWidget *, gpointer);
void view_window_info_cmd_callback (GtkWidget *, gpointer);
void view_toggle_rulers_cmd_callback (GtkWidget *, gpointer);
void view_toggle_guides_cmd_callback (GtkWidget *, gpointer);
void view_toggle_statusbar_cmd_callback (GtkWidget *, gpointer);
void view_snap_to_guides_cmd_callback (GtkWidget *, gpointer);
void view_new_view_cmd_callback (GtkWidget *, gpointer);
void view_shrink_wrap_cmd_callback (GtkWidget *, gpointer);

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -603,6 +603,26 @@ view_snap_to_guides_cmd_callback (GtkWidget *widget,
gdisp->snap_to_guides = GTK_CHECK_MENU_ITEM (widget)->active;
}
void
view_toggle_statusbar_cmd_callback (GtkWidget *widget,
gpointer client_data)
{
GDisplay * gdisp;
gdisp = gdisplay_active ();
if (!GTK_CHECK_MENU_ITEM (widget)->active)
{
if (GTK_WIDGET_VISIBLE (gdisp->statusarea))
gtk_widget_hide (gdisp->statusarea);
}
else
{
if (!GTK_WIDGET_VISIBLE (gdisp->statusarea))
gtk_widget_show (gdisp->statusarea);
}
}
void
view_new_view_cmd_callback (GtkWidget *widget,
gpointer client_data)

View File

@ -51,6 +51,7 @@ void view_zoom_1_16_callback (GtkWidget *, gpointer);
void view_window_info_cmd_callback (GtkWidget *, gpointer);
void view_toggle_rulers_cmd_callback (GtkWidget *, gpointer);
void view_toggle_guides_cmd_callback (GtkWidget *, gpointer);
void view_toggle_statusbar_cmd_callback (GtkWidget *, gpointer);
void view_snap_to_guides_cmd_callback (GtkWidget *, gpointer);
void view_new_view_cmd_callback (GtkWidget *, gpointer);
void view_shrink_wrap_cmd_callback (GtkWidget *, gpointer);

View File

@ -1141,6 +1141,7 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
menus_set_state ("<Image>/View/Toggle Rulers", GTK_WIDGET_VISIBLE (gdisp->origin) ? 1 : 0);
menus_set_state ("<Image>/View/Toggle Guides", gdisp->draw_guides);
menus_set_state ("<Image>/View/Snap To Guides", gdisp->snap_to_guides);
menus_set_state ("<Image>/View/Toggle Statusbar", GTK_WIDGET_VISIBLE (gdisp->statusarea) ? 1 : 0);
plug_in_set_menu_sensitivity (type);
}

View File

@ -58,6 +58,7 @@ struct _GDisplay
GtkWidget *hrule, *vrule; /* widgets for rulers */
GtkWidget *origin; /* widgets for rulers */
GtkWidget *popup; /* widget for popup menu */
GtkWidget *statusarea; /* hbox holding the statusbar and stuff */
GtkWidget *statusbar; /* widget for statusbar */
GtkWidget *progressbar; /* widget for progressbar */
GtkWidget *cursor_label; /* widget for cursor position */

View File

@ -82,6 +82,8 @@ static int old_auto_save;
static int old_preview_size;
static int old_no_cursor_updating;
static int old_show_tool_tips;
static int old_show_rulers;
static int old_show_statusbar;
static int old_cubic_interpolation;
static int old_confirm_on_close;
static int old_save_session_info;
@ -296,6 +298,16 @@ file_prefs_save_callback (GtkWidget *widget,
update = g_list_append (update, "show-tool-tips");
remove = g_list_append (remove, "dont-show-tool-tips");
}
if (show_rulers != old_show_rulers)
{
update = g_list_append (update, "show-rulers");
remove = g_list_append (remove, "dont-show-rulers");
}
if (show_statusbar != old_show_statusbar)
{
update = g_list_append (update, "show-statusbar");
remove = g_list_append (remove, "dont-show-statusbar");
}
if (cubic_interpolation != old_cubic_interpolation)
update = g_list_append (update, "cubic-interpolation");
if (confirm_on_close != old_confirm_on_close)
@ -443,6 +455,8 @@ file_prefs_cancel_callback (GtkWidget *widget,
no_cursor_updating = old_no_cursor_updating;
perfectmouse = old_perfectmouse;
show_tool_tips = old_show_tool_tips;
show_rulers = old_show_rulers;
show_statusbar = old_show_statusbar;
cubic_interpolation = old_cubic_interpolation;
confirm_on_close = old_confirm_on_close;
save_session_info = old_save_session_info;
@ -499,6 +513,10 @@ file_prefs_toggle_callback (GtkWidget *widget,
perfectmouse = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &show_tool_tips)
show_tool_tips = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &show_rulers)
show_rulers = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &show_statusbar)
show_statusbar = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &cubic_interpolation)
cubic_interpolation = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &confirm_on_close)
@ -713,6 +731,8 @@ file_pref_cmd_callback (GtkWidget *widget,
old_preview_size = preview_size;
old_no_cursor_updating = no_cursor_updating;
old_show_tool_tips = show_tool_tips;
old_show_rulers = show_rulers;
old_show_statusbar = show_statusbar;
old_cubic_interpolation = cubic_interpolation;
old_confirm_on_close = confirm_on_close;
old_save_session_info = save_session_info;
@ -1030,6 +1050,24 @@ file_pref_cmd_callback (GtkWidget *widget,
&show_tool_tips);
gtk_widget_show (button);
button = gtk_check_button_new_with_label("Show rulers");
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button),
show_rulers);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
(GtkSignalFunc) file_prefs_toggle_callback,
&show_rulers);
gtk_widget_show (button);
button = gtk_check_button_new_with_label("Show statusbar");
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button),
show_statusbar);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
(GtkSignalFunc) file_prefs_toggle_callback,
&show_statusbar);
gtk_widget_show (button);
hbox = gtk_hbox_new (FALSE, 2);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);

View File

@ -1141,6 +1141,7 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
menus_set_state ("<Image>/View/Toggle Rulers", GTK_WIDGET_VISIBLE (gdisp->origin) ? 1 : 0);
menus_set_state ("<Image>/View/Toggle Guides", gdisp->draw_guides);
menus_set_state ("<Image>/View/Snap To Guides", gdisp->snap_to_guides);
menus_set_state ("<Image>/View/Toggle Statusbar", GTK_WIDGET_VISIBLE (gdisp->statusarea) ? 1 : 0);
plug_in_set_menu_sensitivity (type);
}

View File

@ -58,6 +58,7 @@ struct _GDisplay
GtkWidget *hrule, *vrule; /* widgets for rulers */
GtkWidget *origin; /* widgets for rulers */
GtkWidget *popup; /* widget for popup menu */
GtkWidget *statusarea; /* hbox holding the statusbar and stuff */
GtkWidget *statusbar; /* widget for statusbar */
GtkWidget *progressbar; /* widget for progressbar */
GtkWidget *cursor_label; /* widget for cursor position */

View File

@ -553,7 +553,6 @@ create_display_shell (GDisplay* gdisp,
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *table_inner;
GtkWidget *hbox;
GtkWidget *frame;
GtkWidget *arrow;
int n_width, n_height;
@ -627,8 +626,8 @@ create_display_shell (GDisplay* gdisp,
/* hbox for statusbar area */
hbox = gtk_hbox_new(0,2);
gtk_box_pack_start(GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
gdisp->statusarea = gtk_hbox_new(0,2);
gtk_box_pack_start(GTK_BOX (vbox), gdisp->statusarea, FALSE, TRUE, 0);
/* scrollbars, rulers, canvas, menu popup button */
gdisp->origin = gtk_button_new ();
@ -702,36 +701,37 @@ create_display_shell (GDisplay* gdisp,
if (! image_popup_menu)
menus_get_image_menu (&image_popup_menu, &image_accel_group);
gtk_container_set_resize_mode(GTK_CONTAINER(hbox), GTK_RESIZE_QUEUE);
gtk_container_set_resize_mode (GTK_CONTAINER (gdisp->statusarea),
GTK_RESIZE_QUEUE);
/* cursor, statusbar, progressbar */
frame = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, TRUE, 0);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (gdisp->statusarea), frame, FALSE, TRUE, 0);
gdisp->cursor_label = gtk_label_new(" 0000, 0000 ");
gdisp->cursor_label = gtk_label_new (" 0000, 0000 ");
/* This usize should be more intelligent and get the information
* size of the above string or some similar method */
gtk_widget_set_usize(gdisp->cursor_label, 50, -1);
gtk_container_add(GTK_CONTAINER (frame), gdisp->cursor_label);
gtk_widget_set_usize (gdisp->cursor_label, 50, -1);
gtk_container_add (GTK_CONTAINER (frame), gdisp->cursor_label);
gdisp->statusbar = gtk_statusbar_new();
gtk_widget_set_usize(gdisp->statusbar, 1, -1);
gdisp->statusbar = gtk_statusbar_new ();
gtk_widget_set_usize (gdisp->statusbar, 1, -1);
gtk_container_set_resize_mode (GTK_CONTAINER (gdisp->statusbar),
GTK_RESIZE_QUEUE);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->statusbar, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gdisp->statusarea), gdisp->statusbar, TRUE, TRUE, 0);
contextid = gtk_statusbar_get_context_id (GTK_STATUSBAR (gdisp->statusbar),
"title");
gtk_statusbar_push(GTK_STATUSBAR (gdisp->statusbar),
contextid,
title);
gtk_statusbar_push (GTK_STATUSBAR (gdisp->statusbar),
contextid,
title);
gdisp->progressbar = gtk_progress_bar_new();
gtk_widget_set_usize(gdisp->progressbar, 80, -1);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->progressbar, FALSE, TRUE, 0);
gtk_widget_set_usize (gdisp->progressbar, 80, -1);
gtk_box_pack_start (GTK_BOX (gdisp->statusarea), gdisp->progressbar, FALSE, TRUE, 0);
gdisp->cancelbutton = gtk_button_new_with_label("Cancel");
gtk_box_pack_start (GTK_BOX (hbox), gdisp->cancelbutton, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gdisp->statusarea), gdisp->cancelbutton, FALSE, TRUE, 0);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
/* the popup menu */
@ -743,9 +743,12 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_show (arrow);
gtk_widget_show (gdisp->hsb);
gtk_widget_show (gdisp->vsb);
gtk_widget_show (gdisp->origin);
gtk_widget_show (gdisp->hrule);
gtk_widget_show (gdisp->vrule);
if (show_rulers)
{
gtk_widget_show (gdisp->origin);
gtk_widget_show (gdisp->hrule);
gtk_widget_show (gdisp->vrule);
}
gtk_widget_show (gdisp->canvas);
gtk_widget_show (frame);
gtk_widget_show (gdisp->cursor_label);
@ -754,7 +757,10 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_show (gdisp->cancelbutton);
gtk_widget_show (table_inner);
gtk_widget_show (table);
gtk_widget_show (hbox);
if (show_statusbar)
{
gtk_widget_show (gdisp->statusarea);
}
gtk_widget_show (vbox);
gtk_widget_show (gdisp->shell);

View File

@ -553,7 +553,6 @@ create_display_shell (GDisplay* gdisp,
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *table_inner;
GtkWidget *hbox;
GtkWidget *frame;
GtkWidget *arrow;
int n_width, n_height;
@ -627,8 +626,8 @@ create_display_shell (GDisplay* gdisp,
/* hbox for statusbar area */
hbox = gtk_hbox_new(0,2);
gtk_box_pack_start(GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
gdisp->statusarea = gtk_hbox_new(0,2);
gtk_box_pack_start(GTK_BOX (vbox), gdisp->statusarea, FALSE, TRUE, 0);
/* scrollbars, rulers, canvas, menu popup button */
gdisp->origin = gtk_button_new ();
@ -702,36 +701,37 @@ create_display_shell (GDisplay* gdisp,
if (! image_popup_menu)
menus_get_image_menu (&image_popup_menu, &image_accel_group);
gtk_container_set_resize_mode(GTK_CONTAINER(hbox), GTK_RESIZE_QUEUE);
gtk_container_set_resize_mode (GTK_CONTAINER (gdisp->statusarea),
GTK_RESIZE_QUEUE);
/* cursor, statusbar, progressbar */
frame = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, TRUE, 0);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (gdisp->statusarea), frame, FALSE, TRUE, 0);
gdisp->cursor_label = gtk_label_new(" 0000, 0000 ");
gdisp->cursor_label = gtk_label_new (" 0000, 0000 ");
/* This usize should be more intelligent and get the information
* size of the above string or some similar method */
gtk_widget_set_usize(gdisp->cursor_label, 50, -1);
gtk_container_add(GTK_CONTAINER (frame), gdisp->cursor_label);
gtk_widget_set_usize (gdisp->cursor_label, 50, -1);
gtk_container_add (GTK_CONTAINER (frame), gdisp->cursor_label);
gdisp->statusbar = gtk_statusbar_new();
gtk_widget_set_usize(gdisp->statusbar, 1, -1);
gdisp->statusbar = gtk_statusbar_new ();
gtk_widget_set_usize (gdisp->statusbar, 1, -1);
gtk_container_set_resize_mode (GTK_CONTAINER (gdisp->statusbar),
GTK_RESIZE_QUEUE);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->statusbar, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gdisp->statusarea), gdisp->statusbar, TRUE, TRUE, 0);
contextid = gtk_statusbar_get_context_id (GTK_STATUSBAR (gdisp->statusbar),
"title");
gtk_statusbar_push(GTK_STATUSBAR (gdisp->statusbar),
contextid,
title);
gtk_statusbar_push (GTK_STATUSBAR (gdisp->statusbar),
contextid,
title);
gdisp->progressbar = gtk_progress_bar_new();
gtk_widget_set_usize(gdisp->progressbar, 80, -1);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->progressbar, FALSE, TRUE, 0);
gtk_widget_set_usize (gdisp->progressbar, 80, -1);
gtk_box_pack_start (GTK_BOX (gdisp->statusarea), gdisp->progressbar, FALSE, TRUE, 0);
gdisp->cancelbutton = gtk_button_new_with_label("Cancel");
gtk_box_pack_start (GTK_BOX (hbox), gdisp->cancelbutton, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gdisp->statusarea), gdisp->cancelbutton, FALSE, TRUE, 0);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
/* the popup menu */
@ -743,9 +743,12 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_show (arrow);
gtk_widget_show (gdisp->hsb);
gtk_widget_show (gdisp->vsb);
gtk_widget_show (gdisp->origin);
gtk_widget_show (gdisp->hrule);
gtk_widget_show (gdisp->vrule);
if (show_rulers)
{
gtk_widget_show (gdisp->origin);
gtk_widget_show (gdisp->hrule);
gtk_widget_show (gdisp->vrule);
}
gtk_widget_show (gdisp->canvas);
gtk_widget_show (frame);
gtk_widget_show (gdisp->cursor_label);
@ -754,7 +757,10 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_show (gdisp->cancelbutton);
gtk_widget_show (table_inner);
gtk_widget_show (table);
gtk_widget_show (hbox);
if (show_statusbar)
{
gtk_widget_show (gdisp->statusarea);
}
gtk_widget_show (vbox);
gtk_widget_show (gdisp->shell);

View File

@ -1141,6 +1141,7 @@ gdisplay_set_menu_sensitivity (GDisplay *gdisp)
menus_set_state ("<Image>/View/Toggle Rulers", GTK_WIDGET_VISIBLE (gdisp->origin) ? 1 : 0);
menus_set_state ("<Image>/View/Toggle Guides", gdisp->draw_guides);
menus_set_state ("<Image>/View/Snap To Guides", gdisp->snap_to_guides);
menus_set_state ("<Image>/View/Toggle Statusbar", GTK_WIDGET_VISIBLE (gdisp->statusarea) ? 1 : 0);
plug_in_set_menu_sensitivity (type);
}

View File

@ -58,6 +58,7 @@ struct _GDisplay
GtkWidget *hrule, *vrule; /* widgets for rulers */
GtkWidget *origin; /* widgets for rulers */
GtkWidget *popup; /* widget for popup menu */
GtkWidget *statusarea; /* hbox holding the statusbar and stuff */
GtkWidget *statusbar; /* widget for statusbar */
GtkWidget *progressbar; /* widget for progressbar */
GtkWidget *cursor_label; /* widget for cursor position */

View File

@ -107,6 +107,7 @@ int allow_resize_windows = 0;
int no_cursor_updating = 0;
int preview_size = 64;
int show_rulers = TRUE;
int show_statusbar = TRUE;
int ruler_units = GTK_PIXELS;
int auto_save = TRUE;
int cubic_interpolation = FALSE;
@ -213,6 +214,8 @@ static ParseFunc funcs[] =
{ "preview-size", TT_XPREVSIZE, NULL, NULL },
{ "show-rulers", TT_BOOLEAN, &show_rulers, NULL },
{ "dont-show-rulers", TT_BOOLEAN, NULL, &show_rulers },
{ "show-statusbar", TT_BOOLEAN, &show_statusbar, NULL },
{ "dont-show-statusbar", TT_BOOLEAN, NULL, &show_statusbar },
{ "ruler-units", TT_XRULERUNIT, NULL, NULL },
{ "auto-save", TT_BOOLEAN, &auto_save, NULL },
{ "dont-auto-save", TT_BOOLEAN, NULL, &auto_save },

View File

@ -52,6 +52,7 @@ extern int no_cursor_updating;
extern int preview_size;
extern int show_rulers;
extern int ruler_units;
extern int show_statusbar;
extern int auto_save;
extern int cubic_interpolation;
extern int confirm_on_close;

View File

@ -603,6 +603,26 @@ view_snap_to_guides_cmd_callback (GtkWidget *widget,
gdisp->snap_to_guides = GTK_CHECK_MENU_ITEM (widget)->active;
}
void
view_toggle_statusbar_cmd_callback (GtkWidget *widget,
gpointer client_data)
{
GDisplay * gdisp;
gdisp = gdisplay_active ();
if (!GTK_CHECK_MENU_ITEM (widget)->active)
{
if (GTK_WIDGET_VISIBLE (gdisp->statusarea))
gtk_widget_hide (gdisp->statusarea);
}
else
{
if (!GTK_WIDGET_VISIBLE (gdisp->statusarea))
gtk_widget_show (gdisp->statusarea);
}
}
void
view_new_view_cmd_callback (GtkWidget *widget,
gpointer client_data)

View File

@ -51,6 +51,7 @@ void view_zoom_1_16_callback (GtkWidget *, gpointer);
void view_window_info_cmd_callback (GtkWidget *, gpointer);
void view_toggle_rulers_cmd_callback (GtkWidget *, gpointer);
void view_toggle_guides_cmd_callback (GtkWidget *, gpointer);
void view_toggle_statusbar_cmd_callback (GtkWidget *, gpointer);
void view_snap_to_guides_cmd_callback (GtkWidget *, gpointer);
void view_new_view_cmd_callback (GtkWidget *, gpointer);
void view_shrink_wrap_cmd_callback (GtkWidget *, gpointer);

View File

@ -603,6 +603,26 @@ view_snap_to_guides_cmd_callback (GtkWidget *widget,
gdisp->snap_to_guides = GTK_CHECK_MENU_ITEM (widget)->active;
}
void
view_toggle_statusbar_cmd_callback (GtkWidget *widget,
gpointer client_data)
{
GDisplay * gdisp;
gdisp = gdisplay_active ();
if (!GTK_CHECK_MENU_ITEM (widget)->active)
{
if (GTK_WIDGET_VISIBLE (gdisp->statusarea))
gtk_widget_hide (gdisp->statusarea);
}
else
{
if (!GTK_WIDGET_VISIBLE (gdisp->statusarea))
gtk_widget_show (gdisp->statusarea);
}
}
void
view_new_view_cmd_callback (GtkWidget *widget,
gpointer client_data)

View File

@ -51,6 +51,7 @@ void view_zoom_1_16_callback (GtkWidget *, gpointer);
void view_window_info_cmd_callback (GtkWidget *, gpointer);
void view_toggle_rulers_cmd_callback (GtkWidget *, gpointer);
void view_toggle_guides_cmd_callback (GtkWidget *, gpointer);
void view_toggle_statusbar_cmd_callback (GtkWidget *, gpointer);
void view_snap_to_guides_cmd_callback (GtkWidget *, gpointer);
void view_new_view_cmd_callback (GtkWidget *, gpointer);
void view_shrink_wrap_cmd_callback (GtkWidget *, gpointer);

View File

@ -122,6 +122,7 @@ static GtkItemFactoryEntry image_entries[] =
{ "/View/Zoom/1:16", NULL, view_zoom_1_16_callback, 0 },
{ "/View/Window Info...", "<control><shift>I", view_window_info_cmd_callback, 0 },
{ "/View/Toggle Rulers", "<control><shift>R", view_toggle_rulers_cmd_callback, 0, "<ToggleItem>" },
{ "/View/Toggle Statusbar", "<control><shift>S", view_toggle_statusbar_cmd_callback, 0, "<ToggleItem>" },
{ "/View/Toggle Guides", "<control><shift>T", view_toggle_guides_cmd_callback, 0, "<ToggleItem>" },
{ "/View/Snap To Guides", NULL, view_snap_to_guides_cmd_callback, 0, "<ToggleItem>" },
{ "/View/---", NULL, NULL, 0, "<Separator>" },

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -82,6 +82,8 @@ static int old_auto_save;
static int old_preview_size;
static int old_no_cursor_updating;
static int old_show_tool_tips;
static int old_show_rulers;
static int old_show_statusbar;
static int old_cubic_interpolation;
static int old_confirm_on_close;
static int old_save_session_info;
@ -296,6 +298,16 @@ file_prefs_save_callback (GtkWidget *widget,
update = g_list_append (update, "show-tool-tips");
remove = g_list_append (remove, "dont-show-tool-tips");
}
if (show_rulers != old_show_rulers)
{
update = g_list_append (update, "show-rulers");
remove = g_list_append (remove, "dont-show-rulers");
}
if (show_statusbar != old_show_statusbar)
{
update = g_list_append (update, "show-statusbar");
remove = g_list_append (remove, "dont-show-statusbar");
}
if (cubic_interpolation != old_cubic_interpolation)
update = g_list_append (update, "cubic-interpolation");
if (confirm_on_close != old_confirm_on_close)
@ -443,6 +455,8 @@ file_prefs_cancel_callback (GtkWidget *widget,
no_cursor_updating = old_no_cursor_updating;
perfectmouse = old_perfectmouse;
show_tool_tips = old_show_tool_tips;
show_rulers = old_show_rulers;
show_statusbar = old_show_statusbar;
cubic_interpolation = old_cubic_interpolation;
confirm_on_close = old_confirm_on_close;
save_session_info = old_save_session_info;
@ -499,6 +513,10 @@ file_prefs_toggle_callback (GtkWidget *widget,
perfectmouse = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &show_tool_tips)
show_tool_tips = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &show_rulers)
show_rulers = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &show_statusbar)
show_statusbar = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &cubic_interpolation)
cubic_interpolation = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &confirm_on_close)
@ -713,6 +731,8 @@ file_pref_cmd_callback (GtkWidget *widget,
old_preview_size = preview_size;
old_no_cursor_updating = no_cursor_updating;
old_show_tool_tips = show_tool_tips;
old_show_rulers = show_rulers;
old_show_statusbar = show_statusbar;
old_cubic_interpolation = cubic_interpolation;
old_confirm_on_close = confirm_on_close;
old_save_session_info = save_session_info;
@ -1030,6 +1050,24 @@ file_pref_cmd_callback (GtkWidget *widget,
&show_tool_tips);
gtk_widget_show (button);
button = gtk_check_button_new_with_label("Show rulers");
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button),
show_rulers);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
(GtkSignalFunc) file_prefs_toggle_callback,
&show_rulers);
gtk_widget_show (button);
button = gtk_check_button_new_with_label("Show statusbar");
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button),
show_statusbar);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
(GtkSignalFunc) file_prefs_toggle_callback,
&show_statusbar);
gtk_widget_show (button);
hbox = gtk_hbox_new (FALSE, 2);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);

View File

@ -553,7 +553,6 @@ create_display_shell (GDisplay* gdisp,
GtkWidget *vbox;
GtkWidget *table;
GtkWidget *table_inner;
GtkWidget *hbox;
GtkWidget *frame;
GtkWidget *arrow;
int n_width, n_height;
@ -627,8 +626,8 @@ create_display_shell (GDisplay* gdisp,
/* hbox for statusbar area */
hbox = gtk_hbox_new(0,2);
gtk_box_pack_start(GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
gdisp->statusarea = gtk_hbox_new(0,2);
gtk_box_pack_start(GTK_BOX (vbox), gdisp->statusarea, FALSE, TRUE, 0);
/* scrollbars, rulers, canvas, menu popup button */
gdisp->origin = gtk_button_new ();
@ -702,36 +701,37 @@ create_display_shell (GDisplay* gdisp,
if (! image_popup_menu)
menus_get_image_menu (&image_popup_menu, &image_accel_group);
gtk_container_set_resize_mode(GTK_CONTAINER(hbox), GTK_RESIZE_QUEUE);
gtk_container_set_resize_mode (GTK_CONTAINER (gdisp->statusarea),
GTK_RESIZE_QUEUE);
/* cursor, statusbar, progressbar */
frame = gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, TRUE, 0);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
gtk_box_pack_start (GTK_BOX (gdisp->statusarea), frame, FALSE, TRUE, 0);
gdisp->cursor_label = gtk_label_new(" 0000, 0000 ");
gdisp->cursor_label = gtk_label_new (" 0000, 0000 ");
/* This usize should be more intelligent and get the information
* size of the above string or some similar method */
gtk_widget_set_usize(gdisp->cursor_label, 50, -1);
gtk_container_add(GTK_CONTAINER (frame), gdisp->cursor_label);
gtk_widget_set_usize (gdisp->cursor_label, 50, -1);
gtk_container_add (GTK_CONTAINER (frame), gdisp->cursor_label);
gdisp->statusbar = gtk_statusbar_new();
gtk_widget_set_usize(gdisp->statusbar, 1, -1);
gdisp->statusbar = gtk_statusbar_new ();
gtk_widget_set_usize (gdisp->statusbar, 1, -1);
gtk_container_set_resize_mode (GTK_CONTAINER (gdisp->statusbar),
GTK_RESIZE_QUEUE);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->statusbar, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gdisp->statusarea), gdisp->statusbar, TRUE, TRUE, 0);
contextid = gtk_statusbar_get_context_id (GTK_STATUSBAR (gdisp->statusbar),
"title");
gtk_statusbar_push(GTK_STATUSBAR (gdisp->statusbar),
contextid,
title);
gtk_statusbar_push (GTK_STATUSBAR (gdisp->statusbar),
contextid,
title);
gdisp->progressbar = gtk_progress_bar_new();
gtk_widget_set_usize(gdisp->progressbar, 80, -1);
gtk_box_pack_start (GTK_BOX (hbox), gdisp->progressbar, FALSE, TRUE, 0);
gtk_widget_set_usize (gdisp->progressbar, 80, -1);
gtk_box_pack_start (GTK_BOX (gdisp->statusarea), gdisp->progressbar, FALSE, TRUE, 0);
gdisp->cancelbutton = gtk_button_new_with_label("Cancel");
gtk_box_pack_start (GTK_BOX (hbox), gdisp->cancelbutton, FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (gdisp->statusarea), gdisp->cancelbutton, FALSE, TRUE, 0);
gtk_widget_set_sensitive (gdisp->cancelbutton, FALSE);
/* the popup menu */
@ -743,9 +743,12 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_show (arrow);
gtk_widget_show (gdisp->hsb);
gtk_widget_show (gdisp->vsb);
gtk_widget_show (gdisp->origin);
gtk_widget_show (gdisp->hrule);
gtk_widget_show (gdisp->vrule);
if (show_rulers)
{
gtk_widget_show (gdisp->origin);
gtk_widget_show (gdisp->hrule);
gtk_widget_show (gdisp->vrule);
}
gtk_widget_show (gdisp->canvas);
gtk_widget_show (frame);
gtk_widget_show (gdisp->cursor_label);
@ -754,7 +757,10 @@ create_display_shell (GDisplay* gdisp,
gtk_widget_show (gdisp->cancelbutton);
gtk_widget_show (table_inner);
gtk_widget_show (table);
gtk_widget_show (hbox);
if (show_statusbar)
{
gtk_widget_show (gdisp->statusarea);
}
gtk_widget_show (vbox);
gtk_widget_show (gdisp->shell);

View File

@ -122,6 +122,7 @@ static GtkItemFactoryEntry image_entries[] =
{ "/View/Zoom/1:16", NULL, view_zoom_1_16_callback, 0 },
{ "/View/Window Info...", "<control><shift>I", view_window_info_cmd_callback, 0 },
{ "/View/Toggle Rulers", "<control><shift>R", view_toggle_rulers_cmd_callback, 0, "<ToggleItem>" },
{ "/View/Toggle Statusbar", "<control><shift>S", view_toggle_statusbar_cmd_callback, 0, "<ToggleItem>" },
{ "/View/Toggle Guides", "<control><shift>T", view_toggle_guides_cmd_callback, 0, "<ToggleItem>" },
{ "/View/Snap To Guides", NULL, view_snap_to_guides_cmd_callback, 0, "<ToggleItem>" },
{ "/View/---", NULL, NULL, 0, "<Separator>" },

View File

@ -122,6 +122,7 @@ static GtkItemFactoryEntry image_entries[] =
{ "/View/Zoom/1:16", NULL, view_zoom_1_16_callback, 0 },
{ "/View/Window Info...", "<control><shift>I", view_window_info_cmd_callback, 0 },
{ "/View/Toggle Rulers", "<control><shift>R", view_toggle_rulers_cmd_callback, 0, "<ToggleItem>" },
{ "/View/Toggle Statusbar", "<control><shift>S", view_toggle_statusbar_cmd_callback, 0, "<ToggleItem>" },
{ "/View/Toggle Guides", "<control><shift>T", view_toggle_guides_cmd_callback, 0, "<ToggleItem>" },
{ "/View/Snap To Guides", NULL, view_snap_to_guides_cmd_callback, 0, "<ToggleItem>" },
{ "/View/---", NULL, NULL, 0, "<Separator>" },

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -3006,8 +3006,8 @@ plug_in_progress_init (PlugIn *plug_in,
if (gdisp_ID > 0)
gdisp = gdisplay_get_ID(gdisp_ID);
if (gdisp_ID > 0 && (gdisp->progressid == 0 ||
plug_in->progress_gdisp_ID > 0))
if (gdisp_ID > 0 && GTK_WIDGET_VISIBLE (gdisp->statusarea)
&& (gdisp->progressid == 0 || plug_in->progress_gdisp_ID > 0))
{
context_id = gtk_statusbar_get_context_id(GTK_STATUSBAR(gdisp->statusbar),
"progress");

View File

@ -82,6 +82,8 @@ static int old_auto_save;
static int old_preview_size;
static int old_no_cursor_updating;
static int old_show_tool_tips;
static int old_show_rulers;
static int old_show_statusbar;
static int old_cubic_interpolation;
static int old_confirm_on_close;
static int old_save_session_info;
@ -296,6 +298,16 @@ file_prefs_save_callback (GtkWidget *widget,
update = g_list_append (update, "show-tool-tips");
remove = g_list_append (remove, "dont-show-tool-tips");
}
if (show_rulers != old_show_rulers)
{
update = g_list_append (update, "show-rulers");
remove = g_list_append (remove, "dont-show-rulers");
}
if (show_statusbar != old_show_statusbar)
{
update = g_list_append (update, "show-statusbar");
remove = g_list_append (remove, "dont-show-statusbar");
}
if (cubic_interpolation != old_cubic_interpolation)
update = g_list_append (update, "cubic-interpolation");
if (confirm_on_close != old_confirm_on_close)
@ -443,6 +455,8 @@ file_prefs_cancel_callback (GtkWidget *widget,
no_cursor_updating = old_no_cursor_updating;
perfectmouse = old_perfectmouse;
show_tool_tips = old_show_tool_tips;
show_rulers = old_show_rulers;
show_statusbar = old_show_statusbar;
cubic_interpolation = old_cubic_interpolation;
confirm_on_close = old_confirm_on_close;
save_session_info = old_save_session_info;
@ -499,6 +513,10 @@ file_prefs_toggle_callback (GtkWidget *widget,
perfectmouse = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &show_tool_tips)
show_tool_tips = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &show_rulers)
show_rulers = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &show_statusbar)
show_statusbar = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &cubic_interpolation)
cubic_interpolation = GTK_TOGGLE_BUTTON (widget)->active;
else if (data == &confirm_on_close)
@ -713,6 +731,8 @@ file_pref_cmd_callback (GtkWidget *widget,
old_preview_size = preview_size;
old_no_cursor_updating = no_cursor_updating;
old_show_tool_tips = show_tool_tips;
old_show_rulers = show_rulers;
old_show_statusbar = show_statusbar;
old_cubic_interpolation = cubic_interpolation;
old_confirm_on_close = confirm_on_close;
old_save_session_info = save_session_info;
@ -1030,6 +1050,24 @@ file_pref_cmd_callback (GtkWidget *widget,
&show_tool_tips);
gtk_widget_show (button);
button = gtk_check_button_new_with_label("Show rulers");
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button),
show_rulers);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
(GtkSignalFunc) file_prefs_toggle_callback,
&show_rulers);
gtk_widget_show (button);
button = gtk_check_button_new_with_label("Show statusbar");
gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (button),
show_statusbar);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
(GtkSignalFunc) file_prefs_toggle_callback,
&show_statusbar);
gtk_widget_show (button);
hbox = gtk_hbox_new (FALSE, 2);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);

View File

@ -122,6 +122,7 @@ static GtkItemFactoryEntry image_entries[] =
{ "/View/Zoom/1:16", NULL, view_zoom_1_16_callback, 0 },
{ "/View/Window Info...", "<control><shift>I", view_window_info_cmd_callback, 0 },
{ "/View/Toggle Rulers", "<control><shift>R", view_toggle_rulers_cmd_callback, 0, "<ToggleItem>" },
{ "/View/Toggle Statusbar", "<control><shift>S", view_toggle_statusbar_cmd_callback, 0, "<ToggleItem>" },
{ "/View/Toggle Guides", "<control><shift>T", view_toggle_guides_cmd_callback, 0, "<ToggleItem>" },
{ "/View/Snap To Guides", NULL, view_snap_to_guides_cmd_callback, 0, "<ToggleItem>" },
{ "/View/---", NULL, NULL, 0, "<Separator>" },

View File

@ -147,8 +147,9 @@
# (dont-show-tool-tips)
# Controlling ruler visibility
# The default behavior is for rulers to be ON
# This can also be toggled with the View->Show Rulers command or shift+control+r
# The default behavior is for rulers to be ON.
# This can also be toggled with the View->Toggle Rulers command
# or shift+control+r
# (dont-show-rulers)
# Ruler units
@ -156,6 +157,12 @@
# The default is pixels
(ruler-units pixels)
# Controlling statusbar visibility
# The default behavior is to show the statusbar.
# This can also be toggled with the View->Toggle Statusbar command
# or shift+control+s
# (dont-show-statusbar)
# Disable auto saving
# Auto saving is not yet implemented! Nothing will be auto-saved, no matter
# how you set this here.

View File

@ -147,8 +147,9 @@
# (dont-show-tool-tips)
# Controlling ruler visibility
# The default behavior is for rulers to be ON
# This can also be toggled with the View->Show Rulers command or shift+control+r
# The default behavior is for rulers to be ON.
# This can also be toggled with the View->Toggle Rulers command
# or shift+control+r
# (dont-show-rulers)
# Ruler units
@ -156,6 +157,12 @@
# The default is pixels
(ruler-units pixels)
# Controlling statusbar visibility
# The default behavior is to show the statusbar.
# This can also be toggled with the View->Toggle Statusbar command
# or shift+control+s
# (dont-show-statusbar)
# Disable auto saving
# Auto saving is not yet implemented! Nothing will be auto-saved, no matter
# how you set this here.