comparison console/libgnt/gntentry.c @ 13943:25be562aaca8

[gaim-migrate @ 16480] New widget GntLine to use as a separator. A partial dialog for add-account callback. Updating the dialog as a result of selection-change in the prpl dropdown is way ickier than I had expected it to be. It 'works' now, but quite a bit quirky. I will try to smooth things up later, perhaps next week. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 10 Jul 2006 23:55:24 +0000
parents 3dbcbc5e57e1
children a71678d2da16
comparison
equal deleted inserted replaced
13942:b14fdab68eac 13943:25be562aaca8
81 if (entry->cursor - entry->scroll > widget->priv.width) 81 if (entry->cursor - entry->scroll > widget->priv.width)
82 entry->scroll++; 82 entry->scroll++;
83 entry_redraw(widget); 83 entry_redraw(widget);
84 } 84 }
85 /* XXX: handle other keys, like home/end, and ctrl+ goodness */ 85 /* XXX: handle other keys, like home/end, and ctrl+ goodness */
86 else
87 return FALSE;
88
89 return TRUE;
86 } 90 }
87 else 91 else
88 { 92 {
89 if (!iscntrl(text[0])) 93 if (!iscntrl(text[0]))
90 { 94 {
134 138
135 if (entry->scroll > entry->start) 139 if (entry->scroll > entry->start)
136 entry->scroll--; 140 entry->scroll--;
137 141
138 entry_redraw(widget); 142 entry_redraw(widget);
143 return TRUE;
139 } 144 }
140 } 145 }
141 } 146 }
142 147
143 return FALSE; 148 return FALSE;
164 } 169 }
165 170
166 static void 171 static void
167 gnt_entry_init(GTypeInstance *instance, gpointer class) 172 gnt_entry_init(GTypeInstance *instance, gpointer class)
168 { 173 {
174 GntWidget *widget = GNT_WIDGET(instance);
169 GntEntry *entry = GNT_ENTRY(instance); 175 GntEntry *entry = GNT_ENTRY(instance);
170 176
171 entry->flag = GNT_ENTRY_FLAG_ALL; 177 entry->flag = GNT_ENTRY_FLAG_ALL;
172 entry->max = 0; 178 entry->max = 0;
173 179
174 GNT_WIDGET_SET_FLAGS(GNT_WIDGET(entry), 180 GNT_WIDGET_SET_FLAGS(GNT_WIDGET(entry),
175 GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW | GNT_WIDGET_CAN_TAKE_FOCUS); 181 GNT_WIDGET_NO_BORDER | GNT_WIDGET_NO_SHADOW | GNT_WIDGET_CAN_TAKE_FOCUS);
176 GNT_WIDGET_SET_FLAGS(GNT_WIDGET(entry), GNT_WIDGET_GROW_X); 182 GNT_WIDGET_SET_FLAGS(GNT_WIDGET(entry), GNT_WIDGET_GROW_X);
183
184 widget->priv.minw = 3;
185 widget->priv.minh = 1;
177 186
178 DEBUG; 187 DEBUG;
179 } 188 }
180 189
181 /****************************************************************************** 190 /******************************************************************************