]> git.donarmstrong.com Git - xournal.git/blobdiff - src/xo-misc.c
Print via gtk-print instead of libgnomeprint
[xournal.git] / src / xo-misc.c
index 90ff4f59e16c2198b3c143807a3c7e45eda2d87a..5733f5b1ae018e46e39725426913491b0c294200 100644 (file)
@@ -1970,13 +1970,34 @@ void hide_unimplemented(void)
   gtk_widget_hide(GET_COMPONENT("colorOther"));
   gtk_widget_hide(GET_COMPONENT("helpIndex")); 
 
-  /* config file only works with glib 2.6 */
+  /* config file only works with glib 2.6 and beyond */
   if (glib_minor_version<6) {
     gtk_widget_hide(GET_COMPONENT("optionsAutoSavePrefs"));
     gtk_widget_hide(GET_COMPONENT("optionsSavePreferences"));
   }
+  /* gtkprint only works with gtk+ 2.10 and beyond */
+  if (gtk_check_version(2, 10, 0)) {
+    gtk_widget_hide(GET_COMPONENT("filePrint"));
+  }  
 }  
 
+// toggle fullscreen mode
+void do_fullscreen(gboolean active)
+{
+  end_text();
+  reset_focus();
+  ui.fullscreen = active;
+  gtk_check_menu_item_set_active(
+    GTK_CHECK_MENU_ITEM(GET_COMPONENT("viewFullscreen")), ui.fullscreen);
+  gtk_toggle_tool_button_set_active(
+    GTK_TOGGLE_TOOL_BUTTON(GET_COMPONENT("buttonFullscreen")), ui.fullscreen);
+
+  if (ui.fullscreen) gtk_window_fullscreen(GTK_WINDOW(winMain));
+  else gtk_window_unfullscreen(GTK_WINDOW(winMain));
+  
+  update_vbox_order(ui.vertical_order[ui.fullscreen?1:0]);
+}
+
 /* attempt to work around GTK+ 2.16/2.17 bugs where random interface
    elements receive XInput events that they can't handle properly    */