X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fmain.c;h=e35d50a096a3d3ba0be66a57393b184a50079c6c;hb=69037d6ddbe7e90d13d8a7a088d8c209a926190e;hp=433fc298c3c37000a14d7bb3827a149596161c47;hpb=cfd5ddfe5127ac20d01bd85c96ff16e39ca47696;p=xournal.git
diff --git a/src/main.c b/src/main.c
index 433fc29..e35d50a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,3 +1,18 @@
+/*
+ * 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 software 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, see .
+ */
+
#ifdef HAVE_CONFIG_H
# include
#endif
@@ -83,6 +98,7 @@ void init_stuff (int argc, char *argv[])
ui.selection = NULL;
ui.cursor = NULL;
+ ui.pen_cursor_pix = ui.hiliter_cursor_pix = NULL;
ui.cur_brush = &(ui.brushes[0][ui.toolno[0]]);
for (j=0; j<=NUM_BUTTONS; j++)
@@ -187,14 +203,14 @@ void init_stuff (int argc, char *argv[])
dev_list = gdk_devices_list();
while (dev_list != NULL) {
device = (GdkDevice *)dev_list->data;
- if (device != gdk_device_get_core_pointer()) {
+ if (device != gdk_device_get_core_pointer() && device->num_axes >= 2) {
/* get around a GDK bug: map the valuator range CORRECTLY to [0,1] */
#ifdef ENABLE_XINPUT_BUGFIX
gdk_device_set_axis_use(device, 0, GDK_AXIS_IGNORE);
gdk_device_set_axis_use(device, 1, GDK_AXIS_IGNORE);
#endif
gdk_device_set_mode(device, GDK_MODE_SCREEN);
- if (g_str_has_suffix(device->name, "eraser"))
+ if (g_strrstr(device->name, "raser"))
gdk_device_set_source(device, GDK_SOURCE_ERASER);
can_xinput = TRUE;
}
@@ -204,12 +220,13 @@ void init_stuff (int argc, char *argv[])
gtk_widget_set_sensitive(GET_COMPONENT("optionsUseXInput"), FALSE);
ui.use_xinput = ui.allow_xinput && can_xinput;
- ui.need_emergency_disable_xinput = FALSE;
gtk_check_menu_item_set_active(
GTK_CHECK_MENU_ITEM(GET_COMPONENT("optionsProgressiveBG")), ui.progressive_bg);
gtk_check_menu_item_set_active(
GTK_CHECK_MENU_ITEM(GET_COMPONENT("optionsPrintRuling")), ui.print_ruling);
+ gtk_check_menu_item_set_active(
+ GTK_CHECK_MENU_ITEM(GET_COMPONENT("optionsAutoloadPdfXoj")), ui.autoload_pdf_xoj);
gtk_check_menu_item_set_active(
GTK_CHECK_MENU_ITEM(GET_COMPONENT("optionsLeftHanded")), ui.left_handed);
gtk_check_menu_item_set_active(
@@ -265,12 +282,6 @@ void init_stuff (int argc, char *argv[])
"event", G_CALLBACK (filter_extended_events),
NULL);
}
- if (!gtk_check_version(2, 17, 0)) {
- g_signal_connect (
- GET_COMPONENT("comboLayer"),
- "notify::popup-shown", G_CALLBACK (combobox_popup_disable_xinput),
- NULL);
- }
// load the MRU