Mercurial > pidgin.yaz
comparison console/libgnt/gntmain.c @ 13957:421259b9e06d
[gaim-migrate @ 16508]
Use alt+, and alt+. to change the order of the window.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 17 Jul 2006 13:37:08 +0000 |
parents | 841a5ffbfee4 |
children | 0a0d2a1fd2bc |
comparison
equal
deleted
inserted
replaced
13956:f61428cc4019 | 13957:421259b9e06d |
---|---|
273 lock_focus_list = 0; | 273 lock_focus_list = 0; |
274 | 274 |
275 g_signal_connect(G_OBJECT(tree), "activate", G_CALLBACK(window_list_activate), NULL); | 275 g_signal_connect(G_OBJECT(tree), "activate", G_CALLBACK(window_list_activate), NULL); |
276 } | 276 } |
277 | 277 |
278 static void | |
279 shift_window(GntWidget *widget, int dir) | |
280 { | |
281 GList *all = g_list_first(focus_list); | |
282 GList *list = g_list_find(all, widget); | |
283 int length, pos; | |
284 if (!list) | |
285 return; | |
286 | |
287 length = g_list_length(all); | |
288 pos = g_list_position(all, list); | |
289 | |
290 pos += dir; | |
291 if (dir > 0) | |
292 pos++; | |
293 | |
294 if (pos < 0) | |
295 pos = length; | |
296 else if (pos > length) | |
297 pos = 0; | |
298 | |
299 all = g_list_insert(all, widget, pos); | |
300 all = g_list_delete_link(all, list); | |
301 if (focus_list == list) | |
302 focus_list = g_list_find(all, widget); | |
303 draw_taskbar(); | |
304 } | |
305 | |
278 static gboolean | 306 static gboolean |
279 io_invoke(GIOChannel *source, GIOCondition cond, gpointer null) | 307 io_invoke(GIOChannel *source, GIOCondition cond, gpointer null) |
280 { | 308 { |
281 char buffer[256]; | 309 char buffer[256]; |
282 gboolean ret = FALSE; | 310 gboolean ret = FALSE; |
348 } | 376 } |
349 else if (strcmp(buffer + 1, "r") == 0 && focus_list) | 377 else if (strcmp(buffer + 1, "r") == 0 && focus_list) |
350 { | 378 { |
351 /* Resize window */ | 379 /* Resize window */ |
352 mode = GNT_KP_MODE_RESIZE; | 380 mode = GNT_KP_MODE_RESIZE; |
381 } | |
382 else if (strcmp(buffer + 1, ",") == 0 && focus_list) | |
383 { | |
384 /* Re-order the list of windows */ | |
385 shift_window(focus_list->data, -1); | |
386 } | |
387 else if (strcmp(buffer + 1, ".") == 0 && focus_list) | |
388 { | |
389 shift_window(focus_list->data, 1); | |
353 } | 390 } |
354 } | 391 } |
355 } | 392 } |
356 } | 393 } |
357 else if (mode == GNT_KP_MODE_MOVE && focus_list) | 394 else if (mode == GNT_KP_MODE_MOVE && focus_list) |