summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2012-08-22 10:57:51 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2012-08-22 10:57:51 +0000
commitd859563fb7d076edffef62d065cb8e9702692a17 (patch)
tree372c0afe566a3e413d597e652137ff29db604adc /src
parent0d5b09207cc54f1348477d736d822979438d9c38 (diff)
add some shortcuts to "g" termcmd.
SVN revision: 75539
Diffstat (limited to 'src')
-rw-r--r--src/bin/termcmd.c48
1 files changed, 43 insertions, 5 deletions
diff --git a/src/bin/termcmd.c b/src/bin/termcmd.c
index 4489a5b..97c7952 100644
--- a/src/bin/termcmd.c
+++ b/src/bin/termcmd.c
@@ -86,17 +86,55 @@ termcmd_do(Evas_Object *obj, Evas_Object *win, Evas_Object *bg, const char *cmd)
86 } 86 }
87 return EINA_TRUE; 87 return EINA_TRUE;
88 } 88 }
89 if ((cmd[0] == 'g') || (cmd[0] == 'G')) // font size 89 if ((cmd[0] == 'g') || (cmd[0] == 'G')) // grid size
90 { 90 {
91 int w = -1, h = -1; 91 int w = -1, h = -1;
92 92 int r = sscanf(cmd, "g%ix%i", &w, &h);
93 if (sscanf(cmd, "g%ix%i", &w, &h) == 2) 93
94 if (r == 1)
94 { 95 {
95 if ((w > 0) && (h > 0)) 96 switch (w)
96 { 97 {
97 termio_grid_size_set(obj, w, h); 98 case 0:
99 w = 80;
100 h = 24;
101 break;
102 case 1:
103 w = 80;
104 h = 40;
105 break;
106 case 2:
107 w = 80;
108 h = 60;
109 break;
110 case 3:
111 w = 80;
112 h = 80;
113 break;
114 case 4:
115 w = 120;
116 h = 24;
117 break;
118 case 5:
119 w = 120;
120 h = 40;
121 break;
122 case 6:
123 w = 120;
124 h = 60;
125 break;
126 case 7:
127 w = 120;
128 h = 80;
129 break;
130 case 8:
131 w = 120;
132 h = 120;
133 break;
98 } 134 }
99 } 135 }
136 if ((w > 0) && (h > 0))
137 termio_grid_size_set(obj, w, h);
100 return EINA_TRUE; 138 return EINA_TRUE;
101 } 139 }
102 return EINA_FALSE; 140 return EINA_FALSE;