]> granicus.if.org Git - vim/commitdiff
Avoid warnings for unused arguments when compiling with Gnome.
authorBram Moolenaar <Bram@vim.org>
Mon, 17 May 2010 20:07:15 +0000 (22:07 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 17 May 2010 20:07:15 +0000 (22:07 +0200)
src/gui_gtk_x11.c

index 74b6de94409ffa0d89c06a6d293562f285015c8f..baaed59ba2cf11281ddf8b2c8a424030a1de2cb9 100644 (file)
@@ -948,6 +948,10 @@ modifiers_gdk2vim(guint state)
        modifiers |= MOD_MASK_CTRL;
     if (state & GDK_MOD1_MASK)
        modifiers |= MOD_MASK_ALT;
+#ifdef GDK_SUPER_MASK
+    if (state & GDK_SUPER_MASK)
+       modifiers |= MOD_MASK_META;
+#endif
     if (state & GDK_MOD4_MASK)
        modifiers |= MOD_MASK_META;
 
@@ -1121,7 +1125,11 @@ key_press_event(GtkWidget *widget UNUSED,
      * Don't do this for double-byte encodings, it turns the char into a lead
      * byte. */
     if (len == 1
-           && (state & GDK_MOD1_MASK)
+           && ((state & GDK_MOD1_MASK)
+#ifdef GDK_SUPER_MASK
+               || (state & GDK_SUPER_MASK)
+#endif
+               )
            && !(key_sym == GDK_BackSpace || key_sym == GDK_Delete)
            && (string[0] & 0x80) == 0
            && !(key_sym == GDK_Tab && (state & GDK_SHIFT_MASK))
@@ -1182,7 +1190,11 @@ key_press_event(GtkWidget *widget UNUSED,
            || key_sym == GDK_Escape || key_sym == GDK_KP_Tab
            || key_sym == GDK_ISO_Enter || key_sym == GDK_3270_Enter
 #ifdef FEAT_MBYTE
-           || (enc_dbcs && len == 1 && (state & GDK_MOD1_MASK))
+           || (enc_dbcs && len == 1 && ((state & GDK_MOD1_MASK)
+# ifdef GDK_SUPER_MASK
+                   || (state & GDK_SUPER_MASK)
+# endif
+                   ))
 #endif
            )
     {
@@ -2214,10 +2226,10 @@ drag_data_received_cb(GtkWidget         *widget,
  * necessary.
  */
     static void
-sm_client_check_changed_any(GnomeClient            *client,
+sm_client_check_changed_any(GnomeClient            *client UNUSED,
                            gint            key,
-                           GnomeDialogType type,
-                           gpointer        data)
+                           GnomeDialogType type UNUSED,
+                           gpointer        data UNUSED)
 {
     cmdmod_T   save_cmdmod;
     gboolean   shutdown_cancelled;
@@ -2322,12 +2334,12 @@ write_session_file(char_u *filename)
  */
     static gboolean
 sm_client_save_yourself(GnomeClient        *client,
-                       gint                phase,
-                       GnomeSaveStyle      save_style,
-                       gboolean            shutdown,
+                       gint                phase UNUSED,
+                       GnomeSaveStyle      save_style UNUSED,
+                       gboolean            shutdown UNUSED,
                        GnomeInteractStyle  interact_style,
-                       gboolean            fast,
-                       gpointer            data)
+                       gboolean            fast UNUSED,
+                       gpointer            data UNUSED)
 {
     static const char  suffix[] = "-session.vim";
     char               *session_file;
@@ -2408,7 +2420,7 @@ sm_client_save_yourself(GnomeClient           *client,
  * is happening).
  */
     static void
-sm_client_die(GnomeClient *client, gpointer data)
+sm_client_die(GnomeClient *client UNUSED, gpointer data UNUSED)
 {
     /* Don't write messages to the GUI anymore */
     full_screen = FALSE;