Commits

portix committed 14306af Merge

merge

Comments (0)

Files changed (2)

   g_string_append_printf(buffer, SETTINGS_VIEW, dwb.color.settings_bg_color, dwb.color.settings_fg_color, dwb.misc.settings_border);
   g_string_append_printf(buffer, HTML_H2, "Keyboard Configuration", dwb.misc.profile);
 
+  dwb.keymap = g_list_sort(dwb.keymap, (GCompareFunc)dwb_util_keymap_sort_first);
   g_string_append(buffer, HTML_BODY_START);
   g_string_append(buffer, HTML_FORM_START);
   for (GList *l = dwb.keymap; l; l=l->next) {
     KeyMap *m = l->data;
     Navigation n = m->map->n;
     g_string_append(buffer, HTML_DIV_START);
-    g_string_append_printf(buffer, HTML_DIV_KEYS_TEXT, n.first, n.second);
+    g_string_append_printf(buffer, HTML_DIV_KEYS_TEXT, n.first);
     g_string_append_printf(buffer, HTML_DIV_KEYS_VALUE, n.first, dwb_modmask_to_string(m->mod), m->key ? m->key : "");
     g_string_append(buffer, HTML_DIV_END);
   }
     WebSettings *m = l->data;
     if (!m->global || (m->global && dwb.state.setting_apply == APPLY_GLOBAL)) {
       g_string_append(buffer, HTML_DIV_START);
-      g_string_append_printf(buffer, HTML_DIV_KEYS_TEXT, m->n.first, m->n.second);
+      g_string_append_printf(buffer, HTML_DIV_KEYS_TEXT, m->n.first);
       if (m->type == BOOLEAN) {
         const char *value = m->arg.b ? "checked" : "";
         g_string_append_printf(buffer, HTML_DIV_SETTINGS_CHECKBOX, m->n.first, value);
 #define SETTINGS_VIEW "<head>\n<style type=\"text/css\">\n \
   body { background-color: %s; color: %s; font: fantasy; font-size:16; font-weight: bold; text-align:center; }\n\
   table { border-spacing:0px; }\n\
-  th { border:thin solid black; }\n \
-.line { border: %s; vertical-align: middle; }\n \
+  th { border:%s; }\n \
+.line { vertical-align: middle; }\n \
 .text { float: left; font-variant: normal; font-size: 16;}\n \
 .key { text-align: center;  font-size: 12; }\n \
 .active { background-color: #660000; }\n \
 
 #define HTML_BODY_START "<body>\n"
 #define HTML_BODY_END "</body>\n"
-#define HTML_FORM_START "<div class=\"alignCenter\">\n <form onsubmit=\"return false\">\n"
-#define HTML_FORM_END "</form>\n</div>\n"
-#define HTML_DIV_START "<div class=\"line\">\n"
-#define HTML_DIV_KEYS_TEXT "<div class=\"text\">%s: <span style=\"text-align:block; font-style:oblique; font-size:12;\">%s</span></div>\n "
+#define HTML_FORM_START "<form onsubmit=\"return false\">\n<table width=100%; style=\"border:thin solid black\">"
+#define HTML_FORM_END "</form>\n</table>\n</div>\n"
+#define HTML_DIV_START "<tr>\n"
+#define HTML_DIV_KEYS_TEXT "<th width=100%%><div class=\"text\">%s</div>\n</th> "
 #define HTML_DIV_KEYS_VALUE "<th><div class=\"key\">\n <input onchange=\"get_value(this)\" id=\"%s\" value=\"%s %s\"/>\n</div></th>\n"
-#define HTML_DIV_SETTINGS_VALUE "<div class=\"key\">\n <input onchange=\"get_value(this);\" id=\"%s\" value=\"%s\"/>\n</div>\n"
-#define HTML_DIV_SETTINGS_CHECKBOX "<div class=\"key\"\n <input id=\"%s\" type=\"checkbox\" onchange=\"get_value(this);\" %s>\n</div>\n"
-#define HTML_DIV_END "</div>\n"
+#define HTML_DIV_SETTINGS_VALUE "<th><div class=\"key\">\n <input onchange=\"get_value(this);\" id=\"%s\" value=\"%s\"/>\n</div>\n</th>"
+#define HTML_DIV_SETTINGS_CHECKBOX "<th><div class=\"key\"\n <input id=\"%s\" type=\"checkbox\" onchange=\"get_value(this);\" %s>\n</div>\n</th>"
+#define HTML_DIV_END "</tr>\n"
 /*}}}*/
 #define INSERT "Insert Mode"
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.