Remove commented out code.
[geeqie.git] / src / lirc.c
index ef57632..475defc 100644 (file)
@@ -1,3 +1,11 @@
+/*
+ * Geeqie
+ * Copyright (C) 2008 - 2012 The Geeqie Team
+ *
+ */
+
+#include <glib/gprintf.h>
+
 #include "lirc.h"
 
 #include "misc.h"
@@ -8,7 +16,7 @@
 
 gint lirc_fd = -1;
 struct lirc_config *config = NULL;
-guint input_tag;
+guint input_tag = 0; /* event source id */
 GIOChannel *gio_chan;
 
 /*
@@ -124,6 +132,10 @@ static gboolean lirc_input_callback(GIOChannel *source, GIOCondition condition,
                                {
                                layout_image_zoom_set(lw, 0.0, FALSE);
                                }
+                       else if (g_ascii_strcasecmp("FULL_SCREEN", cmd) == 0)
+                               {
+                               layout_image_full_screen_toggle(lw);
+                               }
                        else if (g_ascii_strncasecmp("SET_ZOOM", cmd, 8) == 0)
                                {
                                ptr = cmd + 8;
@@ -156,11 +168,11 @@ static gboolean lirc_input_callback(GIOChannel *source, GIOCondition condition,
                                }
                        else if (g_ascii_strcasecmp("ROTATE_90", cmd) == 0)
                                {
-                               layout_image_alter(lw, ALTER_ROTATE_90);
+                               layout_image_alter_orientation(lw, ALTER_ROTATE_90);
                                }
                        else if (g_ascii_strcasecmp("ROTATE_90_CC", cmd) == 0)
                                {
-                               layout_image_alter(lw, ALTER_ROTATE_90_CC);
+                               layout_image_alter_orientation(lw, ALTER_ROTATE_90_CC);
                                }
                        else if (g_ascii_strcasecmp("INFO", cmd) == 0)
                                {
@@ -176,13 +188,13 @@ static gboolean lirc_input_callback(GIOChannel *source, GIOCondition condition,
                }
        if (x != 0 || y != 0)
                {
-               layout_image_scroll(lw, x, y);
+               layout_image_scroll(lw, x, y, FALSE);
                }
 
        if (ret == -1)
                {
                /* something went badly wrong */
-               fprintf(stderr, _("disconnected from LIRC\n"));
+               g_fprintf(stderr, _("disconnected from LIRC\n"));
                lirc_cleanup();
                return (gboolean)FALSE;
                }
@@ -197,13 +209,13 @@ void layout_image_lirc_init(LayoutWindow *lw)
        lirc_fd = lirc_init(GQ_APPNAME_LC, get_debug_level() > 0);
        if (lirc_fd == -1)
                {
-               fprintf(stderr, _("Could not init LIRC support\n"));
+               g_fprintf(stderr, _("Could not init LIRC support\n"));
                return;
                }
        if (lirc_readconfig(NULL, &config, NULL) == -1)
                {
                lirc_deinit();
-               fprintf(stderr,
+               g_fprintf(stderr,
                        _("could not read LIRC config file\n"
                        "please read the documentation of LIRC to \n"
                        "know how to create a proper config file\n"));
@@ -219,3 +231,4 @@ void layout_image_lirc_init(LayoutWindow *lw)
 }
 
 #endif /* HAVE_LIRC */
+/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */