]> Dogcows Code - chaz/openbox/commitdiff
initialize all vars.
authorDana Jansens <danakj@orodu.net>
Sat, 5 Apr 2003 00:10:47 +0000 (00:10 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 5 Apr 2003 00:10:47 +0000 (00:10 +0000)
change warnings to messages

plugins/keyboard/keyboard.c
plugins/keyboard/translate.c

index add2b473d665a01e887d08dab78ff33a5c2bf0f7..b0529e0a78205de9a2ca4b44bf53191fe79b49c3 100644 (file)
@@ -16,7 +16,7 @@ void plugin_setup_config()
     parse_reg_section("keyboard", keyparse);
 }
 
-KeyBindingTree *firstnode;
+KeyBindingTree *firstnode = NULL;
 
 static KeyBindingTree *curpos;
 static guint reset_key, reset_state;
@@ -58,12 +58,12 @@ gboolean kbind(GList *keylist, Action *action)
         return FALSE;
     if ((t = tree_find(tree, &conflict)) != NULL) {
        /* already bound to something */
-       g_warning("keychain is already bound");
+       g_message("keychain is already bound");
         tree_destroy(tree);
         return FALSE;
     }
     if (conflict) {
-        g_warning("conflict with binding");
+        g_message("conflict with binding");
         tree_destroy(tree);
         return FALSE;
     }
@@ -130,6 +130,9 @@ static void press(ObEvent *e, void *foo)
 
 void plugin_startup()
 {
+    curpos = NULL;
+    grabbed = FALSE;
+
     dispatch_register(Event_X_KeyPress, (EventHandler)press, NULL);
 
     translate_key("C-g", &reset_state, &reset_key);
index 25e1c6a6a0e388819ca117f4b88894537bd0977f..5a45f16723e28693fbd727305cd17d87ff39cdb6 100644 (file)
@@ -15,7 +15,7 @@ static guint translate_modifier(char *str)
              !g_ascii_strcasecmp("C", str)) return ControlMask;
     else if (!g_ascii_strcasecmp("Shift", str) ||
              !g_ascii_strcasecmp("S", str)) return ShiftMask;
-    g_warning("Invalid modifier '%s' in binding.", str);
+    g_message("Invalid modifier '%s' in binding.", str);
     return 0;
 }
 
@@ -47,12 +47,12 @@ gboolean translate_key(char *str, guint *state, guint *keycode)
     /* figure out the keycode */
     sym = XStringToKeysym(l);
     if (sym == NoSymbol) {
-       g_warning("Invalid key name '%s' in key binding.", l);
+       g_message("Invalid key name '%s' in key binding.", l);
        goto translation_fail;
     }
     *keycode = XKeysymToKeycode(ob_display, sym);
     if (!*keycode) {
-       g_warning("Key '%s' does not exist on the display.", l); 
+       g_message("Key '%s' does not exist on the display.", l); 
        goto translation_fail;
     }
 
This page took 0.024744 seconds and 4 git commands to generate.