comparison console/libgnt/gntwm.c @ 15815:1c8f1dc50685

Enable DEBUG_CFLAGS in libgnt and fix up a number of compile warnings and errors this showed up
author Stu Tomlinson <stu@nosnilmot.com>
date Sun, 18 Mar 2007 17:28:21 +0000
parents 94867b2f38f5
children
comparison
equal deleted inserted replaced
15812:71b017348c39 15815:1c8f1dc50685
6 #include "config.h" 6 #include "config.h"
7 7
8 #include <ctype.h> 8 #include <ctype.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
11 #include <time.h>
11 12
12 #include "gntwm.h" 13 #include "gntwm.h"
13 #include "gntstyle.h" 14 #include "gntstyle.h"
14 #include "gntmarshal.h" 15 #include "gntmarshal.h"
15 #include "gnt.h" 16 #include "gnt.h"
335 336
336 if (list) 337 if (list)
337 n = GPOINTER_TO_INT(list->data); 338 n = GPOINTER_TO_INT(list->data);
338 else 339 else
339 n = 0; 340 n = 0;
340 341
341 w = wm->ordered->data; 342 w = wm->ordered->data;
342 343
343 if ((l = g_list_nth(wm->list, n)) != NULL) 344 if ((l = g_list_nth(wm->list, n)) != NULL)
344 { 345 {
345 gnt_wm_raise_window(wm, l->data); 346 gnt_wm_raise_window(wm, l->data);
356 window_scroll_up(GntBindable *bindable, GList *null) 357 window_scroll_up(GntBindable *bindable, GList *null)
357 { 358 {
358 GntWM *wm = GNT_WM(bindable); 359 GntWM *wm = GNT_WM(bindable);
359 GntWidget *window; 360 GntWidget *window;
360 GntNode *node; 361 GntNode *node;
361 int w, h;
362 362
363 if (!wm->ordered) 363 if (!wm->ordered)
364 return TRUE; 364 return TRUE;
365 365
366 window = wm->ordered->data; 366 window = wm->ordered->data;
371 if (node->scroll) { 371 if (node->scroll) {
372 node->scroll--; 372 node->scroll--;
373 copy_win(window, node); 373 copy_win(window, node);
374 update_screen(wm); 374 update_screen(wm);
375 } 375 }
376 return TRUE;
376 } 377 }
377 378
378 static gboolean 379 static gboolean
379 window_scroll_down(GntBindable *bindable, GList *null) 380 window_scroll_down(GntBindable *bindable, GList *null)
380 { 381 {
1034 NULL, 1035 NULL,
1035 NULL, /* class_data */ 1036 NULL, /* class_data */
1036 sizeof(GntWM), 1037 sizeof(GntWM),
1037 0, /* n_preallocs */ 1038 0, /* n_preallocs */
1038 gnt_wm_init, /* instance_init */ 1039 gnt_wm_init, /* instance_init */
1040 NULL /* value_table */
1039 }; 1041 };
1040 1042
1041 type = g_type_register_static(GNT_TYPE_BINDABLE, 1043 type = g_type_register_static(GNT_TYPE_BINDABLE,
1042 "GntWM", 1044 "GntWM",
1043 &info, 0); 1045 &info, 0);
1367 1369
1368 static void 1370 static void
1369 write_gdi(gpointer key, gpointer value, gpointer data) 1371 write_gdi(gpointer key, gpointer value, gpointer data)
1370 { 1372 {
1371 GntPosition *p = value; 1373 GntPosition *p = value;
1372 fprintf(data, ".%s = %d;%d\n", key, p->x, p->y); 1374 fprintf(data, ".%s = %d;%d\n", (char *)key, p->x, p->y);
1373 } 1375 }
1374 1376
1375 static gboolean 1377 static gboolean
1376 write_already(gpointer data) 1378 write_already(gpointer data)
1377 { 1379 {