comparison console/libgnt/gntmain.c @ 13911:b210409cdc56

[gaim-migrate @ 16410] Change some colors for terminals that don't support customizing colors. Make taskbar behave properly when moving a window. Read startup options from command-line (copy-paste from gtkgaim [sic]). I am doing #define _GNU_SOURCE and #include <getopt.h> ... I don't know if that's alright. So now you can specify a location to read config files from. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 03 Jul 2006 02:27:41 +0000
parents cc60d0861337
children fdf2dbed6faa
comparison
equal deleted inserted replaced
13910:6c907830a45f 13911:b210409cdc56
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <locale.h> 8 #include <locale.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 #include <string.h> 10 #include <string.h>
11 11
12 static int lock_focus_list;
12 static GList *focus_list; 13 static GList *focus_list;
14
13 static int X_MIN; 15 static int X_MIN;
14 static int X_MAX; 16 static int X_MAX;
15 static int Y_MIN; 17 static int Y_MIN;
16 static int Y_MAX; 18 static int Y_MAX;
17 19
39 41
40 void gnt_screen_take_focus(GntWidget *widget) 42 void gnt_screen_take_focus(GntWidget *widget)
41 { 43 {
42 GntWidget *w = NULL; 44 GntWidget *w = NULL;
43 45
46 if (lock_focus_list)
47 return;
48
44 if (focus_list) 49 if (focus_list)
45 w = focus_list->data; 50 w = focus_list->data;
46 51
47 /* XXX: ew */ 52 /* XXX: ew */
48 focus_list = g_list_first(focus_list); 53 focus_list = g_list_first(focus_list);
57 62
58 void gnt_screen_remove_widget(GntWidget *widget) 63 void gnt_screen_remove_widget(GntWidget *widget)
59 { 64 {
60 int pos = g_list_index(g_list_first(focus_list), widget); 65 int pos = g_list_index(g_list_first(focus_list), widget);
61 GList *next; 66 GList *next;
67
68 if (lock_focus_list)
69 return;
62 70
63 if (pos == -1) 71 if (pos == -1)
64 return; 72 return;
65 73
66 focus_list = g_list_first(focus_list); 74 focus_list = g_list_first(focus_list);
295 changed = TRUE; 303 changed = TRUE;
296 } 304 }
297 305
298 if (changed) 306 if (changed)
299 { 307 {
308 lock_focus_list = 1;
300 gnt_widget_hide(widget); 309 gnt_widget_hide(widget);
301 gnt_widget_set_position(widget, x, y); 310 gnt_widget_set_position(widget, x, y);
302 gnt_widget_show(widget); 311 gnt_widget_show(widget);
312 lock_focus_list = 0;
303 } 313 }
304 } 314 }
305 else if (*buffer == '\r') 315 else if (*buffer == '\r')
306 { 316 {
307 mode = GNT_KP_MODE_NORMAL; 317 mode = GNT_KP_MODE_NORMAL;