-// comment out the line below if you want the thickness settings of v 0.2
-#define NEW_THICKNESS
-
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
0xffffffff, 0xa0e8ffff, 0x80ffc0ff, 0xffc0d4ff,
0xffc080ff, 0xffff80ff, 0xffffffff };
-#ifdef NEW_THICKNESS
double predef_thickness[NUM_STROKE_TOOLS][THICKNESS_MAX] =
{ { 0.42, 0.85, 1.41, 2.26, 5.67 }, // pen thicknesses = 0.15, 0.3, 0.5, 0.8, 2 mm
- { 2.83, 2.83, 8.50, 19.84, 19.84 }, // eraser thicknesses = 1, 2.5, 5 mm
- { 2.83, 2.83, 8.50, 19.84, 19.84 }, // highlighter thicknesses = 1, 2.5, 5 mm
+ { 2.83, 2.83, 8.50, 19.84, 19.84 }, // eraser thicknesses = 1, 3, 7 mm
+ { 2.83, 2.83, 8.50, 19.84, 19.84 }, // highlighter thicknesses = 1, 3, 7 mm
};
-#else
-double predef_thickness[NUM_STROKE_TOOLS][THICKNESS_MAX] =
- { { 0.42, 0.85, 1.41, 2.26, 5.67 }, // pen thicknesses = 0.15, 0.3, 0.5, 0.8, 2 mm
- { 2.83, 2.83, 7.08, 14.17, 14.17 }, // eraser thicknesses = 1, 2.5, 5 mm
- { 2.83, 2.83, 7.08, 14.17, 14.17 }, // highlighter thicknesses = 1, 2.5, 5 mm
- };
-#endif
// some manipulation functions
// in progressive mode we scale only visible pages
if (ui.progressive_bg && !is_visible(pg)) continue;
- if (pg->bg->type == BG_PIXMAP) { // do the rescaling ourselves
+ if (pg->bg->type == BG_PIXMAP && pg->bg->canvas_item!=NULL) { // do the rescaling ourselves
if (ui.antialias_bg) {
if (pg->bg->pixbuf_scale == ui.zoom) continue;
set_cursor_busy(TRUE);
set_cursor_busy(FALSE);
} else
{
- pix = GDK_PIXBUF(g_object_get_data(G_OBJECT(pg->bg->canvas_item), "pixbuf"));
+ g_object_get(G_OBJECT(pg->bg->canvas_item), "pixbuf", &pix, NULL);
if (pix!=pg->bg->pixbuf)
gnome_canvas_item_set(pg->bg->canvas_item, "pixbuf", pg->bg->pixbuf, NULL);
pg->bg->pixbuf_scale = 0;
gtk_toggle_tool_button_set_active(
GTK_TOGGLE_TOOL_BUTTON(GET_COMPONENT("buttonVerticalSpace")), TRUE);
break;
+ case TOOL_HAND:
+ gtk_toggle_tool_button_set_active(
+ GTK_TOGGLE_TOOL_BUTTON(GET_COMPONENT("buttonHand")), TRUE);
+ break;
}
gtk_toggle_tool_button_set_active(
gtk_check_menu_item_set_active(
GTK_CHECK_MENU_ITEM(GET_COMPONENT("toolsVerticalSpace")), TRUE);
break;
+ case TOOL_HAND:
+ gtk_check_menu_item_set_active(
+ GTK_CHECK_MENU_ITEM(GET_COMPONENT("toolsHand")), TRUE);
+ break;
}
gtk_check_menu_item_set_active(
void update_mappings_menu(void)
{
+ gtk_widget_set_sensitive(GET_COMPONENT("optionsButtonMappings"), ui.use_xinput);
+ gtk_widget_set_sensitive(GET_COMPONENT("optionsDiscardCoreEvents"), ui.use_xinput);
gtk_check_menu_item_set_active(
GTK_CHECK_MENU_ITEM(GET_COMPONENT("optionsButtonMappings")), ui.use_erasertip);
+ gtk_check_menu_item_set_active(
+ GTK_CHECK_MENU_ITEM(GET_COMPONENT("optionsDiscardCoreEvents")), ui.discard_corepointer);
switch(ui.toolno[1]) {
case TOOL_PEN:
update_mappings_menu_linkings();
}
}
+
+// update the ordering of components in the main vbox
+
+const char *vbox_component_names[VBOX_MAIN_NITEMS]=
+ {"scrolledwindowMain", "menubar", "toolbarMain", "toolbarPen", "hbox1"};
+
+void update_vbox_order(int *order)
+{
+ int i, j;
+ GtkWidget *child;
+ GtkBox *vboxMain = GTK_BOX(GET_COMPONENT("vboxMain"));
+ gboolean present[VBOX_MAIN_NITEMS];
+
+ for (i=0; i<VBOX_MAIN_NITEMS; i++) present[i] = FALSE;
+ j=0;
+ for (i=0; i<VBOX_MAIN_NITEMS; i++) {
+ if (order[i]<0 || order[i]>=VBOX_MAIN_NITEMS) continue;
+ present[order[i]] = TRUE;
+ child = GET_COMPONENT(vbox_component_names[order[i]]);
+ gtk_box_reorder_child(vboxMain, child, j++);
+ gtk_widget_show(child);
+ }
+ for (i=1; i<VBOX_MAIN_NITEMS; i++) // hide others, but not the drawing area!
+ if (!present[i]) gtk_widget_hide(GET_COMPONENT(vbox_component_names[i]));
+}
+