Mercurial > pidgin
comparison console/libgnt/gntwidget.c @ 15741:50c25be2563b
Better handle large windows that don't fit into the screen (eg. the preference
window when we add more prefs there). The default binding for scrolling in such
a window are, for the moment, alt-ctrl-l and alt-ctrl-k.
Things still to be done:
* Give a clear onscreen indication that there is more to the window than meets the eye.
* Update the scrolling when the window is resized.
* Use some better binding.
* Update the manual.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 27 Feb 2007 09:06:05 +0000 |
parents | 9ca8095b6243 |
children | 9de8f4e810cb |
comparison
equal
deleted
inserted
replaced
15740:2273694a865d | 15741:50c25be2563b |
---|---|
321 gnt_widget_map(widget); | 321 gnt_widget_map(widget); |
322 } | 322 } |
323 | 323 |
324 if (widget->window == NULL) | 324 if (widget->window == NULL) |
325 { | 325 { |
326 #if 0 | |
326 int x, y, maxx, maxy, w, h; | 327 int x, y, maxx, maxy, w, h; |
327 int oldw, oldh; | 328 int oldw, oldh; |
328 gboolean shadow = TRUE; | 329 gboolean shadow = TRUE; |
329 | 330 |
330 if (!gnt_widget_has_shadow(widget)) | 331 if (!gnt_widget_has_shadow(widget)) |
353 if (w != oldw || h != oldh) { | 354 if (w != oldw || h != oldh) { |
354 widget->priv.width = w - shadow; | 355 widget->priv.width = w - shadow; |
355 widget->priv.height = h - shadow; | 356 widget->priv.height = h - shadow; |
356 g_signal_emit(widget, signals[SIG_SIZE_CHANGED], 0, oldw, oldh); | 357 g_signal_emit(widget, signals[SIG_SIZE_CHANGED], 0, oldw, oldh); |
357 } | 358 } |
358 | 359 #else |
359 widget->window = newwin(widget->priv.height + shadow, widget->priv.width + shadow, | 360 widget->window = newpad(150, 350); /* XXX: */ |
360 widget->priv.y, widget->priv.x); | 361 #endif |
361 init_widget(widget); | 362 init_widget(widget); |
362 } | 363 } |
363 | 364 |
364 g_signal_emit(widget, signals[SIG_DRAW], 0); | 365 g_signal_emit(widget, signals[SIG_DRAW], 0); |
365 gnt_widget_queue_update(widget); | 366 gnt_widget_queue_update(widget); |
522 | 523 |
523 g_signal_emit(widget, signals[SIG_SIZE_CHANGED], 0, oldw, oldh); | 524 g_signal_emit(widget, signals[SIG_SIZE_CHANGED], 0, oldw, oldh); |
524 | 525 |
525 if (widget->window) | 526 if (widget->window) |
526 { | 527 { |
527 wresize(widget->window, height + shadow, width + shadow); | |
528 init_widget(widget); | 528 init_widget(widget); |
529 } | 529 } |
530 if (GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_MAPPED)) | 530 if (GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_MAPPED)) |
531 init_widget(widget); | 531 init_widget(widget); |
532 else | 532 else |