~noskcaj/ubuntu/utopic/lxpanel/0.6.2

« back to all changes in this revision

Viewing changes to src/misc.c

  • Committer: Package Import Robot
  • Author(s): Julien Lavergne
  • Date: 2013-01-03 19:49:15 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20130103194915-l7520qegcw8mlisu
Tags: 0.5.10+git20121126-0ubuntu1
* New upstream snapshot.
* debian/control:
 - Build-depends on libmenu-cache-dev to follow the name change.

Show diffs side-by-side

added added

removed removed

Lines of Context:
722
722
 
723
723
 
724
724
    ENTER;
725
 
    bzero(nws, sizeof(nws));
 
725
    memset(nws, 0, sizeof(*nws));
726
726
    if (!(state = get_xaproperty(win, a_NET_WM_STATE, XA_ATOM, &num3)))
727
727
        RET();
728
728
 
760
760
 
761
761
 
762
762
    ENTER;
763
 
    bzero(nwwt, sizeof(*nwwt));
 
763
    memset(nwwt, 0, sizeof(*nwwt));
764
764
    if (!(state = get_xaproperty(win, a_NET_WM_WINDOW_TYPE, XA_ATOM, &num3)))
765
765
        RET();
766
766
 
1429
1429
                    file = g_shell_quote( tmp );
1430
1430
                    g_free( tmp );
1431
1431
                    g_string_append( cmd, file );
1432
 
                    g_string_append_c( cmd, ' ' );
 
1432
                    if (l->next)
 
1433
                        g_string_append_c( cmd, ' ' );
1433
1434
                    g_free( file );
1434
1435
                }
1435
1436
                add_files = TRUE;
1453
1454
                    file = (char*)l->data;
1454
1455
                    tmp = g_shell_quote( file );
1455
1456
                    g_string_append( cmd, tmp );
1456
 
                    g_string_append_c( cmd, ' ' );
 
1457
                    if (l->next)
 
1458
                        g_string_append_c( cmd, ' ' );
1457
1459
                    g_free( tmp );
1458
1460
                }
1459
1461
                add_files = TRUE;
1476
1478
                    file = g_shell_quote( tmp );
1477
1479
                    g_free( tmp );
1478
1480
                    g_string_append( cmd, file );
1479
 
                    g_string_append_c( cmd, ' ' );
 
1481
                    if (l->next)
 
1482
                        g_string_append_c( cmd, ' ' );
1480
1483
                    g_free( file );
1481
1484
                }
1482
1485
                add_files = TRUE;
1529
1532
_finish:
1530
1533
    if( ! add_files )
1531
1534
    {
1532
 
        g_string_append_c ( cmd, ' ' );
1533
1535
        for( l = file_list; l; l = l->next )
1534
1536
        {
 
1537
            g_string_append_c( cmd, ' ' );
1535
1538
            file = (char*)l->data;
1536
1539
            tmp = g_shell_quote( file );
1537
1540
            g_string_append( cmd, tmp );
1538
 
            g_string_append_c( cmd, ' ' );
1539
1541
            g_free( tmp );
1540
1542
        }
1541
1543
    }
1564
1566
            g_free(cmd);
1565
1567
        cmd = term_cmd;
1566
1568
    }
 
1569
    LOG(LOG_INFO, "lxpanel: spawning \"%s\"...\n", cmd);
1567
1570
    if (! g_spawn_command_line_async(cmd, &error) ) {
1568
1571
        ERR("can't spawn %s\nError is %s\n", cmd, error->message);
1569
1572
        g_error_free (error);