#include "xo-paint.h"
#include "xo-image.h"
-const char *tool_names[NUM_TOOLS] = {"pen", "eraser", "highlighter", "text", "", "selectrect", "vertspace", "hand", "image"};
+const char *tool_names[NUM_TOOLS] = {"pen", "eraser", "highlighter", "text", "selectregion", "selectrect", "vertspace", "hand", "image"};
const char *color_names[COLOR_MAX] = {"black", "blue", "red", "green",
"gray", "lightblue", "lightgreen", "magenta", "orange", "yellow", "white"};
const char *bgtype_names[3] = {"solid", "pixmap", "pdf"};
{ *error = xoj_invalid(); return; }
tmpPage->bg->filename = refstring_ref(tmpbg->filename);
tmpPage->bg->pixbuf = tmpbg->pixbuf;
- if (tmpbg->pixbuf!=NULL) gdk_pixbuf_ref(tmpbg->pixbuf);
+ if (tmpbg->pixbuf!=NULL) g_object_ref(tmpbg->pixbuf);
tmpPage->bg->file_domain = tmpbg->file_domain;
}
else {
if (remnlen == 0) { // make a new bg
pix = gdk_pixbuf_loader_get_pixbuf(loader);
if (pix == NULL) break;
- gdk_pixbuf_ref(pix);
+ g_object_ref(pix);
gdk_pixbuf_loader_close(loader, NULL);
g_object_unref(loader);
loader = NULL;
bgpdf.npages++;
}
bgpg = g_list_nth_data(bgpdf.pages, req->pageno-1);
- if (bgpg->pixbuf!=NULL) gdk_pixbuf_unref(bgpg->pixbuf);
+ if (bgpg->pixbuf!=NULL) g_object_unref(bgpg->pixbuf);
bgpg->pixbuf = pixbuf;
bgpg->dpi = req->dpi;
bgpg->pixel_height = scaled_height;
refstring_unref(bgpdf.filename);
for (list = bgpdf.pages; list != NULL; list = list->next) {
pdfpg = (struct BgPdfPage *)list->data;
- if (pdfpg->pixbuf!=NULL) gdk_pixbuf_unref(pdfpg->pixbuf);
+ if (pdfpg->pixbuf!=NULL) g_object_unref(pdfpg->pixbuf);
g_free(pdfpg);
}
g_list_free(bgpdf.pages);
for (list = journal.pages; list!= NULL; list = list->next) {
pg = (struct Page *)list->data;
if (pg->bg->type == BG_PDF && pg->bg->file_page_seq == pageno) {
- if (pg->bg->pixbuf!=NULL) gdk_pixbuf_unref(pg->bg->pixbuf);
- pg->bg->pixbuf = gdk_pixbuf_ref(bgpg->pixbuf);
+ if (pg->bg->pixbuf!=NULL) g_object_unref(pg->bg->pixbuf);
+ pg->bg->pixbuf = g_object_ref(bgpg->pixbuf);
pg->bg->pixel_width = bgpg->pixel_width;
pg->bg->pixel_height = bgpg->pixel_height;
update_canvas_bg(pg);
ui.view_continuous = TRUE;
ui.allow_xinput = TRUE;
ui.discard_corepointer = FALSE;
+ ui.ignore_other_devices = TRUE;
ui.left_handed = FALSE;
ui.shorten_menus = FALSE;
ui.shorten_menu_items = g_strdup(DEFAULT_SHORTEN_MENUS);
update_keyval("general", "discard_corepointer",
_(" discard Core Pointer events in XInput mode (true/false)"),
g_strdup(ui.discard_corepointer?"true":"false"));
+ update_keyval("general", "ignore_other_devices",
+ _(" ignore events from other devices while drawing (true/false)"),
+ g_strdup(ui.ignore_other_devices?"true":"false"));
update_keyval("general", "use_erasertip",
_(" always map eraser tip to eraser (true/false)"),
g_strdup(ui.use_erasertip?"true":"false"));
g_strdup_printf("%d", PDFTOPPM_PRINTING_DPI));
update_keyval("tools", "startup_tool",
- _(" selected tool at startup (pen, eraser, highlighter, selectrect, vertspace, hand)"),
+ _(" selected tool at startup (pen, eraser, highlighter, selectregion, selectrect, vertspace, hand, image)"),
g_strdup(tool_names[ui.startuptool]));
update_keyval("tools", "pen_color",
_(" default pen color"),
_(" default highlighter is in shape recognizer mode (true/false)"),
g_strdup(ui.default_brushes[TOOL_HIGHLIGHTER].recognizer?"true":"false"));
update_keyval("tools", "btn2_tool",
- _(" button 2 tool (pen, eraser, highlighter, text, selectrect, vertspace, hand)"),
+ _(" button 2 tool (pen, eraser, highlighter, text, selectregion, selectrect, vertspace, hand, image)"),
g_strdup(tool_names[ui.toolno[1]]));
update_keyval("tools", "btn2_linked",
_(" button 2 brush linked to primary brush (true/false) (overrides all other settings)"),
_(" button 2 eraser mode (eraser only)"),
g_strdup_printf("%d", ui.brushes[1][TOOL_ERASER].tool_options));
update_keyval("tools", "btn3_tool",
- _(" button 3 tool (pen, eraser, highlighter, text, selectrect, vertspace, hand)"),
+ _(" button 3 tool (pen, eraser, highlighter, text, selectregion, selectrect, vertspace, hand, image)"),
g_strdup(tool_names[ui.toolno[2]]));
update_keyval("tools", "btn3_linked",
_(" button 3 brush linked to primary brush (true/false) (overrides all other settings)"),
parse_keyval_boolean("general", "view_continuous", &ui.view_continuous);
parse_keyval_boolean("general", "use_xinput", &ui.allow_xinput);
parse_keyval_boolean("general", "discard_corepointer", &ui.discard_corepointer);
+ parse_keyval_boolean("general", "ignore_other_devices", &ui.ignore_other_devices);
parse_keyval_boolean("general", "use_erasertip", &ui.use_erasertip);
parse_keyval_boolean("general", "buttons_switch_mappings", &ui.button_switch_mapping);
parse_keyval_boolean("general", "autoload_pdf_xoj", &ui.autoload_pdf_xoj);